aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-03-29 22:13:28 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-03-29 22:13:28 +0800
commitb12d14e70117e2287cf3b11137c1f2636c09f4d9 (patch)
tree24bd819d294134b7ce7e8fa0c1ce3fcdf9a3c242
parentd6d482da86493010499d7aa31165d5296a1ed924 (diff)
downloadgsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.tar
gsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.tar.gz
gsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.tar.bz2
gsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.tar.lz
gsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.tar.xz
gsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.tar.zst
gsoc2013-evolution-b12d14e70117e2287cf3b11137c1f2636c09f4d9.zip
Migrate from GnomeFontPicker to GtkFontButton (#373837).
2007-03-27 Matthew Barnes <mbarnes@redhat.com> * em-mailer-prefs.c: * em-mailer-prefs.h: * mail-config.glade: Migrate from GnomeFontPicker to GtkFontButton (#373837). svn path=/trunk/; revision=33337
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-mailer-prefs.c20
-rw-r--r--mail/em-mailer-prefs.h6
-rw-r--r--mail/mail-config.glade32
4 files changed, 37 insertions, 28 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 72f22728a9..923c4e1610 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
2007-03-27 Matthew Barnes <mbarnes@redhat.com>
+ * em-mailer-prefs.c:
+ * em-mailer-prefs.h:
+ * mail-config.glade:
+ Migrate from GnomeFontPicker to GtkFontButton (#373837).
+
+2007-03-27 Matthew Barnes <mbarnes@redhat.com>
+
* em-folder-browser.c:
* em-format.c:
* em-popup.c:
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 4b944fccb6..7302ff842a 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -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>
@@ -545,12 +545,14 @@ custom_font_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs)
}
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
@@ -861,8 +863,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
/* 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);
@@ -870,8 +872,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
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);
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index c74f021e68..582938a2d9 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -39,7 +39,7 @@ struct _GtkWidget;
struct _GladeXML;
struct _GnomeColorPicker;
struct _GtkFileChooserbutton;
-struct _GnomeFontPicker;
+struct _GtkFontButton;
struct _GConfClient;
struct _GtkButton;
struct _GtkTreeView;
@@ -94,8 +94,8 @@ struct _EMMailerPrefs {
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 */
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 637c6b2a30..9a14bd8881 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -4700,14 +4700,14 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
</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 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
</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>
@@ -8560,14 +8560,14 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
</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>
@@ -8582,14 +8582,14 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
</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>