diff options
author | Larry Ewing <lewing@ximian.com> | 2001-10-21 12:10:22 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2001-10-21 12:10:22 +0800 |
commit | 3a8ca6e3b0be3c6c92b32269ebbebead0d061df1 (patch) | |
tree | 396f3442e45e43b23f5a81ce30475c239c0d5762 /addressbook/gui/component | |
parent | a4667973f5e59c9b7bb566d8e6e850ba7e840951 (diff) | |
download | gsoc2013-evolution-3a8ca6e3b0be3c6c92b32269ebbebead0d061df1.tar.gz gsoc2013-evolution-3a8ca6e3b0be3c6c92b32269ebbebead0d061df1.tar.zst gsoc2013-evolution-3a8ca6e3b0be3c6c92b32269ebbebead0d061df1.zip |
stick with the style font if the efont bold font does not exist.
2001-10-20 Larry Ewing <lewing@ximian.com>
* gui/component/select-names/e-select-names.c
(e_select_names_set_default): stick with the style font if the
efont bold font does not exist.
svn path=/trunk/; revision=13838
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index ceae5fc754..39225bb180 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -922,22 +922,32 @@ e_select_names_set_default (ESelectNames *e_select_names, if (child) { EFont *efont; GdkFont *gdkfont; - GtkStyle *style, *oldstyle; + GtkStyle *oldstyle; oldstyle = gtk_widget_get_style(child->label); - style = gtk_style_copy(oldstyle); - efont = e_font_from_gdk_font(style->font); + efont = e_font_from_gdk_font(oldstyle->font); gdkfont = e_font_to_gdk_font(efont, E_FONT_BOLD); e_font_unref(efont); + + if (gdkfont != NULL) { + GtkStyle *style; - gdk_font_ref(gdkfont); - gdk_font_unref(style->font); - style->font = gdkfont; + style = gtk_style_copy(oldstyle); + + gdk_font_ref(gdkfont); + gdk_font_unref(style->font); + style->font = gdkfont; - gtk_widget_set_style(child->label, style); + gtk_widget_set_style(child->label, style); - gtk_style_unref(oldstyle); + gtk_style_unref(oldstyle); + } } } } + + + + + |