[gnac/gnac-video] Prevent warnings when no font is set in gconf.
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnac/gnac-video] Prevent warnings when no font is set in gconf.
- Date: Wed, 19 Aug 2009 07:27:12 +0000 (UTC)
commit 53403561c1fdf6e037f20bec62ec153c59651cfa
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Wed Aug 19 09:26:42 2009 +0200
Prevent warnings when no font is set in gconf.
src/gnac-prefs.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/gnac-prefs.c b/src/gnac-prefs.c
index d9265c9..10b04ee 100644
--- a/src/gnac-prefs.c
+++ b/src/gnac-prefs.c
@@ -153,6 +153,7 @@ gnac_prefs_gconf_retrieve(void)
GtkFontButton *font_button;
GtkComboBox *combo;
GtkWidget *temp;
+ gchar *font_name;
gint folder_type;
check_button = GTK_TOGGLE_BUTTON(gtk_builder_get_object(gnac_prefs_builder,
@@ -170,8 +171,12 @@ gnac_prefs_gconf_retrieve(void)
font_button = GTK_FONT_BUTTON(gtk_builder_get_object(gnac_prefs_builder,
"subtitles_font_button"));
- gtk_font_button_set_font_name(font_button,
- gnac_gconf_get_string(GNAC_GCONF_SUBTITLES_FONT));
+ font_name = gnac_gconf_get_string(GNAC_GCONF_SUBTITLES_FONT);
+ if (font_name)
+ {
+ gtk_font_button_set_font_name(font_button, font_name);
+ g_free(font_name);
+ }
folder_type = gnac_gconf_get_int(GNAC_GCONF_FOLDER_TYPE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]