# HG changeset patch # User Eric Warmenhoven # Date 1006168495 0 # Node ID 367d1913391792a6ca07ebc691bdacb6f6fd0843 # Parent 72272d43e2654135f0512dd201a70bfc51a6af7a [gaim-migrate @ 2774] decklin's patch committer: Tailor Script diff -r 72272d43e265 -r 367d19133917 src/conversation.c --- a/src/conversation.c Mon Nov 19 10:06:59 2001 +0000 +++ b/src/conversation.c Mon Nov 19 11:14:55 2001 +0000 @@ -509,10 +509,11 @@ if (!strcmp(pre_fontface, "")) { g_free(pre_fontface); alloc--; - pre_fontface = ""; + pre_fontface = ""; } - 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, ""); gtk_widget_grab_focus(c->entry); diff -r 72272d43e265 -r 367d19133917 src/dialogs.c --- a/src/dialogs.c Mon Nov 19 10:06:59 2001 +0000 +++ b/src/dialogs.c Mon Nov 19 11:14:55 2001 +0000 @@ -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); diff -r 72272d43e265 -r 367d19133917 src/gtkimhtml.c --- a/src/gtkimhtml.c Mon Nov 19 10:06:59 2001 +0000 +++ b/src/gtkimhtml.c Mon Nov 19 11:14:55 2001 +0000 @@ -59,9 +59,12 @@ #include "pixmaps/wink.xpm" #include "pixmaps/yell.xpm" -#define MAX_SIZE 7 - -gint font_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; +#define MAX_FONT_SIZE 7 +#define DEFAULT_FONT_SIZE 3 + +gint _point_sizes [] = { 80, 100, 120, 140, 200, 300, 400 }; + +#define DEFAULT_PRE_FACE "courier" #define BORDER_SIZE 2 #define TOP_BORDER 10 @@ -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); diff -r 72272d43e265 -r 367d19133917 src/ui.h --- a/src/ui.h Mon Nov 19 10:06:59 2001 +0000 +++ b/src/ui.h Mon Nov 19 11:14:55 2001 +0000 @@ -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