[PATCH to gcharmap] properly deal with gtk theme's colors and i18n



 Hi, 

 Here is a patch to gcharmap (from gnome-utils module) that will use
locale-specific fonts instead of adobe ones (adobe produced only fonts for
iso-8859-1), will use gtktheme's font for gnome font picker, and will properly
compute colors to use for drawing characters on top of "buttons"
 - gtk_widget_ensure_style(widget) is required for widget to inherit style
from gtk theme (otherwise builtin defaults will be used for widget's font, and
it will have black as a text color).

 This is a patch against gcharmap from gnome-1.4b1.
 Could it be applied?

 Best regards,
  -Vlad
diff -ru gcharmap~/src/interface.c gcharmap/src/interface.c
--- gcharmap~/src/interface.c	Sun Jan 21 23:17:58 2001
+++ gcharmap/src/interface.c	Fri Mar  2 15:51:37 2001
@@ -164,9 +164,9 @@
         gnome_font_picker_set_mode (GNOME_FONT_PICKER (app->fontpicker),
           GNOME_FONT_PICKER_MODE_FONT_INFO);
         gnome_font_picker_fi_set_use_font_in_label (GNOME_FONT_PICKER (app->fontpicker),
-          TRUE, 12);
+          FALSE, 12);
         gnome_font_picker_set_font_name (GNOME_FONT_PICKER (app->fontpicker),
-          "-adobe-helvetica-medium-r-normal-*-12-*-*-*-p-*-iso8859-1");
+          "-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-*-*");
         gtk_button_set_relief (GTK_BUTTON (app->fontpicker), GTK_RELIEF_NONE);
         gtk_box_pack_start (GTK_BOX (hbox), app->fontpicker, FALSE, TRUE, 0);
         gtk_signal_connect (GTK_OBJECT (app->fontpicker), "font_set",
@@ -197,9 +197,10 @@
         GtkWidget *tmp;
 
         tmp = gtk_button_new ();
+        gtk_widget_ensure_style(tmp);
         app->btnstyle = gtk_style_copy (gtk_widget_get_style (tmp));
         app->btnstyle->font = gdk_fontset_load (
-          "-adobe-helvetica-medium-r-normal-*-12-*-*-*-p-*-iso8859-1"
+          "-*-helvetica-medium-r-normal-*-12-*-*-*-p-*-*-*"
         );
         gtk_widget_destroy (tmp);
 
@@ -245,7 +246,7 @@
         for (i = 0; i < 5; i++) style->fg[i] = white;
         for (i = 0; i < 5; i++) style->bg[i] = black;
         style->font = gdk_fontset_load (
-          "-adobe-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*,*-r-*"
+          "-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*,*-r-*"
         );
 
         gtk_widget_set_style (viewport, style);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]