evolution/evolution-2.9.2-gtk-font-button.patch

154 lines
6.7 KiB
Diff
Raw Normal View History

--- evolution-2.9.2/mail/em-mailer-prefs.c.gtk-font-button 2006-08-09 04:43:27.000000000 -0400
+++ evolution-2.9.2/mail/em-mailer-prefs.c 2006-11-11 08:31:53.000000000 -0500
@@ -36,8 +36,8 @@
#include <bonobo/bonobo-generic-factory.h>
#include <libgnomeui/gnome-color-picker.h>
-#include <libgnomeui/gnome-font-picker.h>
#include <gtk/gtkfilechooserbutton.h>
+#include <gtk/gtkfontbutton.h>
#include <glade/glade.h>
@@ -535,12 +535,14 @@
}
static void
-font_changed (GnomeFontPicker *fontpicker, const char *arg1, EMMailerPrefs *prefs)
+font_changed (GtkFontButton *font_button, EMMailerPrefs *prefs)
{
- const char *key;
+ const gchar *key;
+ const gchar *font_name;
- key = g_object_get_data ((GObject *) fontpicker, "key");
- gconf_client_set_string (prefs->gconf, key, gnome_font_picker_get_font_name (fontpicker), NULL);
+ key = g_object_get_data (G_OBJECT (font_button), "key");
+ font_name = gtk_font_button_get_font_name (font_button);
+ gconf_client_set_string (prefs->gconf, key, font_name, NULL);
}
static void
@@ -841,8 +843,8 @@
/* Mail Fonts */
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
- prefs->font_fixed = GNOME_FONT_PICKER (glade_xml_get_widget (gui, "FontFixed"));
- gnome_font_picker_set_font_name (prefs->font_fixed, font);
+ prefs->font_fixed = GTK_FONT_BUTTON (glade_xml_get_widget (gui, "FontFixed"));
+ gtk_font_button_set_font_name (prefs->font_fixed, font);
g_free (font);
g_object_set_data ((GObject *) prefs->font_fixed, "key", "/apps/evolution/mail/display/fonts/monospace");
g_signal_connect (prefs->font_fixed, "font-set", G_CALLBACK (font_changed), prefs);
@@ -850,8 +852,8 @@
gtk_widget_set_sensitive ((GtkWidget *) prefs->font_fixed, FALSE);
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
- prefs->font_variable = GNOME_FONT_PICKER (glade_xml_get_widget (gui, "FontVariable"));
- gnome_font_picker_set_font_name (prefs->font_variable, font);
+ prefs->font_variable = GTK_FONT_BUTTON (glade_xml_get_widget (gui, "FontVariable"));
+ gtk_font_button_set_font_name (prefs->font_variable, font);
g_free (font);
g_object_set_data ((GObject *) prefs->font_variable, "key", "/apps/evolution/mail/display/fonts/variable");
g_signal_connect (prefs->font_variable, "font-set", G_CALLBACK (font_changed), prefs);
--- evolution-2.9.2/mail/em-mailer-prefs.h.gtk-font-button 2006-05-25 00:59:47.000000000 -0400
+++ evolution-2.9.2/mail/em-mailer-prefs.h 2006-11-11 08:31:53.000000000 -0500
@@ -39,7 +39,7 @@
struct _GladeXML;
struct _GnomeColorPicker;
struct _GtkFileChooserbutton;
-struct _GnomeFontPicker;
+struct _GtkFontButton;
struct _GConfClient;
struct _GtkButton;
struct _GtkTreeView;
@@ -92,8 +92,8 @@
struct _GtkFileChooserButton *notify_sound_file;
/* HTML Mail tab */
- struct _GnomeFontPicker *font_variable;
- struct _GnomeFontPicker *font_fixed;
+ struct _GtkFontButton *font_variable;
+ struct _GtkFontButton *font_fixed;
struct _GtkToggleButton *font_share;
/* Loading Images */
--- evolution-2.9.2/mail/mail-config.glade.gtk-font-button 2006-07-19 11:26:27.000000000 -0400
+++ evolution-2.9.2/mail/mail-config.glade 2006-11-11 08:31:53.000000000 -0500
@@ -4700,14 +4700,14 @@
</child>
<child>
- <widget class="GnomeFontPicker" id="FontFixed">
+ <widget class="GtkFontButton" id="FontFixed">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="title" translatable="yes">Select HTML fixed width font</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
+ <property name="show_style">True</property>
<property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
+ <property name="use_font">False</property>
+ <property name="use_size">False</property>
<property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
@@ -4722,14 +4722,14 @@
</child>
<child>
- <widget class="GnomeFontPicker" id="FontVariable">
+ <widget class="GtkFontButton" id="FontVariable">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="title" translatable="yes">Select HTML variable width font</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
+ <property name="show_style">True</property>
<property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
+ <property name="use_font">False</property>
+ <property name="use_size">False</property>
<property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
@@ -8484,14 +8484,14 @@
</child>
<child>
- <widget class="GnomeFontPicker" id="print_fixed">
+ <widget class="GtkFontButton" id="print_fixed">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="title" translatable="yes">Select HTML fixed width font for printing</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
+ <property name="show_style">True</property>
<property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
+ <property name="use_font">False</property>
+ <property name="use_size">False</property>
<property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>
@@ -8506,14 +8506,14 @@
</child>
<child>
- <widget class="GnomeFontPicker" id="print_variable">
+ <widget class="GtkFontButton" id="print_variable">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="title" translatable="yes">Select HTML variable width font for printing</property>
- <property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
+ <property name="show_style">True</property>
<property name="show_size">True</property>
- <property name="use_font_in_label">False</property>
- <property name="label_font_size">14</property>
+ <property name="use_font">False</property>
+ <property name="use_size">False</property>
<property name="focus_on_click">True</property>
<signal name="font_set" handler="changed"/>
</widget>