aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/print.c70
-rw-r--r--configure.in11
-rw-r--r--libical/src/test/Makefile.in64
5 files changed, 91 insertions, 64 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b93e43135..f0aee08d25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-12 Federico Mena Quintero <federico@helixcode.com>
+
+ * configure.in: Make gnome-print-0.20 mandatory. We will bail out
+ with CVS HEAD versions to avoid breakage.
+
2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
* Version 0.2.
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index b9fb26cf09..8825891d4c 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-12 Federico Mena Quintero <federico@helixcode.com>
+
+ * gui/print.c: Revert Michael's GnomeFont patch until the
+ gnome-print API stabilizes.
+
2000-07-12 Michael Meeks <michael@helixcode.com>
* gui/print.c (titled_box, print_text, print_month_small),
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 66f8a81283..3b4f2c4a18 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -220,7 +220,7 @@ print_text(GnomePrintContext *pc, GnomeFont *font, const char *text, enum align_
x = l+((r-l)-w)/2;
break;
}
- gnome_print_moveto(pc, x, t - gnome_font_get_size (font));
+ gnome_print_moveto(pc, x, t-font->size);
gnome_print_setfont(pc, font);
gnome_print_setrgbcolor (pc, 0,0,0);
gnome_print_show(pc, text);
@@ -239,23 +239,19 @@ print_text_size(GnomePrintContext *pc, double size, const char *text, enum align
}
static void
-titled_box (GnomePrintContext *pc, const char *text,
- GnomeFont *font, enum align_box align,
- double *l, double *r, double *t, double *b, double linewidth)
+titled_box(GnomePrintContext *pc, const char *text, GnomeFont *font, enum align_box align, double *l, double *r, double *t, double *b, double linewidth)
{
- double size = gnome_font_get_size (font);
-
- if (align & ALIGN_BORDER) {
- gnome_print_gsave (pc);
- print_border (pc, *l, *r, *t, *t - size - size * 0.4, linewidth, 0.9);
- print_border (pc, *l, *r, *t - size - size * 0.4, *b, linewidth, -1.0);
- gnome_print_grestore (pc);
- *l += 2;
- *r -= 2;
- *b += 2;
+ if (align&ALIGN_BORDER) {
+ gnome_print_gsave(pc);
+ print_border(pc, *l, *r, *t, *t-font->size-font->size*0.4, linewidth, 0.9);
+ print_border(pc, *l, *r, *t-font->size-font->size*0.4, *b, linewidth, -1.0);
+ gnome_print_grestore(pc);
+ *l+=2;
+ *r-=2;
+ *b+=2;
}
- print_text (pc, font, text, align, *l, *r, *t, *b);
- *t -= size * 1.4;
+ print_text(pc, font, text, align, *l, *r, *t, *b);
+ *t-=font->size*1.4;
}
enum datefmt {
@@ -326,7 +322,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal,
int day;
char buf[100];
struct tm tm;
- double xpad, ypad, size, font_size;
+ double xpad, ypad, size;
char *daynames[] = { _("Su"), _("Mo"), _("Tu"), _("We"), _("Th"), _("Fr"), _("Sa") };
xpad = (right-left)/7;
@@ -349,15 +345,12 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal,
/* get title */
format_date(month, titleflags, buf, 100);
font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 1, size*1.2); /* title font */
-
- font_size = gnome_font_get_size (font);
-
if (bordertitle)
print_border(pc,
- left, left+7*xpad, top, top-font_size*1.3,
+ left, left+7*xpad, top, top-font->size*1.3,
1.0, 0.9);
print_text(pc, font, buf, ALIGN_CENTRE,
- left, left+7*xpad, top, top - font_size);
+ left, left+7*xpad, top, top - font->size);
gtk_object_unref (GTK_OBJECT (font));
font_normal = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, size);
@@ -366,8 +359,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal,
gnome_print_setrgbcolor (pc, 0,0,0);
for (x=0;x<7;x++) {
print_text(pc, font_bold, daynames[(week_starts_on_monday?x+1:x)%7], ALIGN_CENTRE,
- left+x*xpad, left+(x+1)*xpad, bottom+7*ypad,
- bottom+7*ypad-gnome_font_get_size (font_bold));
+ left+x*xpad, left+(x+1)*xpad, bottom+7*ypad, bottom+7*ypad-font_bold->size);
}
for (y=0;y<6;y++) {
@@ -391,12 +383,12 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal,
print_border(pc,
left+x*xpad+xpad*0.1,
left+(x+1)*xpad+xpad*0.1,
- bottom+(5-y)*ypad+font_size-ypad*0.15,
+ bottom+(5-y)*ypad+font->size-ypad*0.15,
bottom+(5-y)*ypad-ypad*0.15,
-1.0, 0.75);
}
print_text(pc, font, buf, ALIGN_RIGHT,
- left+x*xpad, left+(x+1)*xpad, bottom+(5-y)*ypad+font_size, bottom+(5-y)*ypad);
+ left+x*xpad, left+(x+1)*xpad, bottom+(5-y)*ypad+font->size, bottom+(5-y)*ypad);
now = next;
}
}
@@ -412,7 +404,7 @@ static double
bound_text(GnomePrintContext *pc, GnomeFont *font, char *text, double left, double right, double top, double bottom, double indent)
{
double maxwidth = right-left;
- double width, font_size;
+ double width;
char *p;
char *wordstart;
int c;
@@ -432,9 +424,7 @@ bound_text(GnomePrintContext *pc, GnomeFont *font, char *text, double left, doub
outbuffer = g_malloc(outbufflen);
outbuffendmarker = outbuffer+outbufflen-2;
- font_size = gnome_font_get_size (font);
-
- top -= font_size;
+ top -= font->size;
gnome_print_setfont (pc, font);
width=0;
@@ -459,7 +449,7 @@ bound_text(GnomePrintContext *pc, GnomeFont *font, char *text, double left, doub
*o++=c;
if (c==' ')
wordstart = o;
- width+=gnome_font_get_glyph_width (font, c);
+ width+=gnome_font_get_width(font, c);
if (width>maxwidth)
dump=1;
else
@@ -477,7 +467,7 @@ bound_text(GnomePrintContext *pc, GnomeFont *font, char *text, double left, doub
width = gnome_font_get_width_string_n(font, outbuffer, o-wordstart);
o=outbuffer+(o-wordstart);
wordstart = outbuffer;
- top -= font_size;
+ top -= font->size;
if (top<bottom) {
/* too much to fit, drop the rest */
g_free(outbuffer);
@@ -495,7 +485,7 @@ bound_text(GnomePrintContext *pc, GnomeFont *font, char *text, double left, doub
*o=0;
gnome_print_moveto(pc, left, top);
gnome_print_show(pc, outbuffer);
- top -= font_size;
+ top -= font->size;
}
g_free(outbuffer);
return top;
@@ -692,14 +682,14 @@ print_day_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
x = left + incsmall;
xend = right - inc;
- if (y - gnome_font_get_size (font_summary) < bottom)
+ if (y - font_summary->size < bottom)
break;
tm = *localtime (&coi->start);
strftime (buf, 100, TIME_FMT, &tm);
gnome_print_moveto (pc, x + (margin
- gnome_font_get_width_string (font_summary, buf)),
- y - gnome_font_get_size (font_summary));
+ y - font_summary->size);
gnome_print_show (pc, buf);
if (totime) {
@@ -709,7 +699,7 @@ print_day_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
(x + margin + inc
+ (margin
- gnome_font_get_width_string (font_summary, buf))),
- y - gnome_font_get_size (font_summary));
+ y - font_summary->size);
gnome_print_show (pc, buf);
y = bound_text (pc, font_summary, ico->summary,
@@ -722,7 +712,7 @@ print_day_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
y, yend, -margin + inc);
}
- y += gnome_font_get_size (font_summary) - inc;
+ y += font_summary->size - inc;
ical_object_unref (ico);
}
@@ -838,9 +828,9 @@ print_month_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
format_date(today, DATE_DAYNAME, buf, 100);
print_text(pc, font_days, buf, ALIGN_CENTRE,
(right-left)*x/7+left, (right-left)*(x+1)/7+left,
- top, top-gnome_font_get_size (font_days));
+ top, top-font_days->size);
}
- top -= gnome_font_get_size (font_days) * 1.5;
+ top -= font_days->size*1.5;
gtk_object_unref (GTK_OBJECT (font_days));
for (y=0;y<6;y++) {
@@ -904,7 +894,7 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t start, ti
break;
y = bound_text (pc, font_summary, ico->summary, x + 2, xend, y, yend, 0);
- y += gnome_font_get_size (font_summary);
+ y += font_summary->size;
gnome_print_moveto (pc, x, y - 3);
gnome_print_lineto (pc, xend, y - 3);
gnome_print_stroke (pc);
diff --git a/configure.in b/configure.in
index 4e90fec199..da4f2523e8 100644
--- a/configure.in
+++ b/configure.in
@@ -193,17 +193,16 @@ fi
dnl **************************************************
dnl * Print check
dnl **************************************************
-AC_MSG_CHECKING(for GnomePrint libraries >= 0.20)
+AC_MSG_CHECKING(for GnomePrint libraries version 0.20)
if gnome-config --libs print > /dev/null 2>&1; then
- vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" | \
- awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
- if test "$vers" -ge 13; then
+ vers=`gnome-config --modversion print | sed -e "s/gnome-print-//"`
+ if test "$vers" = "0.20"; then
AC_MSG_RESULT(found)
else
- AC_MSG_ERROR(You need at least GNOME print 0.13)
+ AC_MSG_ERROR(Please make sure you are using the released version of gnome-print-0.20. Please note that CVS HEAD versions will not work.)
fi
else
- AC_MSG_ERROR(Did not find GnomePrint installed)
+ AC_MSG_ERROR(Did not find GnomePrint installed. Please make sure you are using the released version of gnome-print-0.20. Please note that CVS HEAD versions will not work.)
fi
GNOME_PRINT_LIBS=`gnome-config --libs print`
GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
diff --git a/libical/src/test/Makefile.in b/libical/src/test/Makefile.in
index c97dbd0026..8a7cf257c3 100644
--- a/libical/src/test/Makefile.in
+++ b/libical/src/test/Makefile.in
@@ -57,11 +57,17 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
@@ -121,8 +127,9 @@ stow_DEPENDENCIES = ../libical/libical.a ../libicalss/libicalss.a
stow_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
@@ -137,7 +144,7 @@ OBJECTS = $(usecases_OBJECTS) $(copycluster_OBJECTS) $(regression_OBJECTS) $(par
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .o .s
+.SUFFIXES: .S .c .lo .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu src/test/Makefile
@@ -171,6 +178,22 @@ distclean-compile:
maintainer-clean-compile:
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
usecases: $(usecases_OBJECTS) $(usecases_DEPENDENCIES)
@rm -f usecases
$(LINK) $(usecases_LDFLAGS) $(usecases_OBJECTS) $(usecases_LDADD) $(LIBS)
@@ -316,24 +339,27 @@ distclean-generic:
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-depend mostlyclean-generic
+ mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
+ mostlyclean-generic
mostlyclean: mostlyclean-am
-clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
- clean-generic mostlyclean-am
+clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-depend clean-generic mostlyclean-am
clean: clean-am
-distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
- distclean-depend distclean-generic clean-am
+distclean-am: distclean-noinstPROGRAMS distclean-compile \
+ distclean-libtool distclean-tags distclean-depend \
+ distclean-generic clean-am
+ -rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-depend maintainer-clean-generic \
- distclean-am
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-depend \
+ maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@@ -342,14 +368,16 @@ maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir mostlyclean-depend \
-distclean-depend clean-depend maintainer-clean-depend info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.