From 3a8ca6e3b0be3c6c92b32269ebbebead0d061df1 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Sun, 21 Oct 2001 04:10:22 +0000 Subject: stick with the style font if the efont bold font does not exist. 2001-10-20 Larry Ewing * 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 --- addressbook/ChangeLog | 6 +++++ .../gui/component/select-names/e-select-names.c | 26 +++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 2e0c3d8e62..ca78bbf83f 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2001-10-20 Larry Ewing + + * 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. + 2001-10-20 Jon Trowbridge * gui/component/select-names/e-select-names-completion.c 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); + } } } } + + + + + -- cgit v1.2.3