From: Eric W. <war...@us...> - 2001-11-19 11:15:00
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv13645/src Modified Files: conversation.c dialogs.c gtkimhtml.c ui.h Log Message: decklin's patch Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.299 retrieving revision 1.300 diff -u -d -r1.299 -r1.300 --- conversation.c 2001/11/18 21:23:36 1.299 +++ conversation.c 2001/11/19 11:14:54 1.300 @@ -509,10 +509,11 @@ if (!strcmp(pre_fontface, "<FONT FACE=\"\">")) { g_free(pre_fontface); alloc--; - pre_fontface = "<FONT FACE=\"Helvetica\">"; + pre_fontface = "<FONT FACE=\"" DEFAULT_FONT_FACE "\">"; } - sprintf(c->fontface, "%s", newfont ? (newfont[0] ? newfont : "Helvetica") : "Helvetica"); + sprintf(c->fontface, "%s", newfont ? + (newfont[0] ? newfont : DEFAULT_FONT_FACE) : DEFAULT_FONT_FACE); c->hasfont = 1; surround(c->entry, pre_fontface, "</FONT>"); gtk_widget_grab_focus(c->entry); Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.287 retrieving revision 1.288 diff -u -d -r1.287 -r1.288 --- dialogs.c 2001/11/19 01:01:08 1.287 +++ dialogs.c 2001/11/19 11:14:54 1.288 @@ -76,8 +76,6 @@ #include "pixmaps/admin_icon.xpm" #include "pixmaps/ab.xpm" -#define DEFAULT_FONT_NAME "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" - #define PATHSIZE 1024 int smiley_array[FACE_TOTAL]; @@ -2723,7 +2721,7 @@ return; fontseld = gtk_font_selection_dialog_new(_("Select Font")); gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), - DEFAULT_FONT_NAME); + DEFAULT_FONT_XFLD); gtk_object_set_user_data(GTK_OBJECT(fontseld), NULL); gtk_signal_connect(GTK_OBJECT(fontseld), "delete_event", @@ -2748,7 +2746,7 @@ gtk_object_set_user_data(GTK_OBJECT(c->font_dialog), NULL); gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *) c->font_dialog, - DEFAULT_FONT_NAME); + DEFAULT_FONT_XFLD); gtk_signal_connect(GTK_OBJECT(c->font_dialog), "delete_event", GTK_SIGNAL_FUNC(delete_event_dialog), c); @@ -2758,7 +2756,7 @@ "clicked", GTK_SIGNAL_FUNC(cancel_font), c); gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *) c->font_dialog, - DEFAULT_FONT_NAME); + DEFAULT_FONT_XFLD); gtk_widget_realize(c->font_dialog); Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- gtkimhtml.c 2001/11/17 13:57:30 1.75 +++ gtkimhtml.c 2001/11/19 11:14:54 1.76 @@ -59,10 +59,13 @@ #include "pixmaps/wink.xpm" #include "pixmaps/yell.xpm" -#define MAX_SIZE 7 +#define MAX_FONT_SIZE 7 +#define DEFAULT_FONT_SIZE 3 -gint font_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; +gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; +#define DEFAULT_PRE_FACE "courier" + #define BORDER_SIZE 2 #define TOP_BORDER 10 #define MIN_HEIGHT 20 @@ -1927,7 +1930,7 @@ if (italics) newvals [SLANT] = "i"; if (fontsize) { - g_snprintf (fs, sizeof (fs), "%d", font_sizes [MIN (fontsize, MAX_SIZE) - 1]); + g_snprintf (fs, sizeof (fs), "%d", _point_sizes [MIN (fontsize, MAX_FONT_SIZE) - 1]); newvals [PXLSZ] = "*"; newvals [PTSZ] = fs; } @@ -1958,7 +1961,7 @@ newvals [FMLY] = names [i]; g_snprintf (fs, sizeof (fs), "%d", - font_sizes [MIN (fontsize, MAX_SIZE) - 1] / 10); + _point_sizes [MIN (fontsize, MAX_FONT_SIZE) - 1] / 10); newvals [PXLSZ] = fs; newvals [PTSZ] = "*"; @@ -2501,13 +2504,13 @@ if ((font != NULL) || bold || italics || pre) { if (font && (bold || italics || font->size || font->face || pre)) { if (pre) { - bit->font = gtk_imhtml_font_load (imhtml, "courier", bold, italics, font->size); + bit->font = gtk_imhtml_font_load (imhtml, DEFAULT_PRE_FACE, bold, italics, font->size); } else { bit->font = gtk_imhtml_font_load (imhtml, font->face, bold, italics, font->size); } } else if (bold || italics || pre) { if (pre) { - bit->font = gtk_imhtml_font_load (imhtml, "courier", bold, italics, 0); + bit->font = gtk_imhtml_font_load (imhtml, DEFAULT_PRE_FACE, bold, italics, 0); } else { bit->font = gtk_imhtml_font_load (imhtml, NULL, bold, italics, 0); } @@ -2992,7 +2995,7 @@ break; sscanf (value + 1, "%hd", &font->size); - font->size += 3; + font->size += DEFAULT_FONT_SIZE; break; } @@ -3005,7 +3008,7 @@ sscanf (value + 1, "%hd", &font->size); font->size = MIN (font->size, 2); - font->size = 3 - font->size; + font->size = DEFAULT_FONT_SIZE - font->size; break; } @@ -3036,7 +3039,7 @@ font->back = gdk_color_copy (oldfont->back); } else { if (!font->size) - font->size = 3; + font->size = DEFAULT_FONT_SIZE; } fonts = g_slist_prepend (fonts, font); Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ui.h 2001/11/15 22:47:04 1.18 +++ ui.h 2001/11/19 11:14:55 1.19 @@ -49,6 +49,9 @@ #define gtk_style_set_font(s, f) (s)->font = f #endif +#define DEFAULT_FONT_XFLD "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" +#define DEFAULT_FONT_FACE "helvetica" + #define BROWSER_NETSCAPE 0 #define BROWSER_KFM 1 #define BROWSER_MANUAL 2 |