From: Paul Mangan Date: Tue, 16 Sep 2003 07:27:46 +0000 (+0000) Subject: sync with 0.9.5cvs6 X-Git-Tag: ch_branch_last_merge~25 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=2a805fcc6a4820312bf2829ecad4213a88ac643b sync with 0.9.5cvs6 --- diff --git a/ChangeLog b/ChangeLog index d1bc3b5ce..2d599ffd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-09-16 + + * src/folderview.c: folderview_init(): if font can't be loaded, fall + back to gtk default (fixes crashes on startup). Also removed the + redundant code. + 2003-09-15 * src/compose.c: compose_insert_sig(): insert signature at the diff --git a/ChangeLog.claws b/ChangeLog.claws index d0a8e197d..ea789ef57 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2003-09-16 [paul] 0.9.5claws16 + + * sync with 0.9.5cvs6 + see ChangeLog 2003-09-16 + 2003-09-15 [paul] 0.9.5claws15 * sync with 0.9.5cvs5 diff --git a/ChangeLog.jp b/ChangeLog.jp index 1516f0a85..3c303e4a5 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,9 @@ +2003-09-16 + + * src/folderview.c: folderview_init(): ¥Õ¥©¥ó¥È¤¬Æɤ߹þ¤á¤Ê¤¤¾ì¹ç¤Ï + gtk ¤Î¥Ç¥Õ¥©¥ë¥È¤Ë fallback ¤¹¤ë¤è¤¦¤Ë¤·¤¿(µ¯Æ°»þ¤Î¥¯¥é¥Ã¥·¥å¤ò + ½¤Àµ)¡£¤µ¤é¤ËÉÔÍפʥ³¡¼¥É¤ò½üµî¡£ + 2003-09-15 * src/compose.c: compose_insert_sig(): ¥Þ¥Ë¥å¥¢¥ëÁàºî¤Î¤È¤­¤Ï¸½ºß¤Î diff --git a/configure.ac b/configure.ac index 21db1afc3..5cf59699f 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=5 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=15 +EXTRA_VERSION=16 if test $EXTRA_VERSION -eq 0; then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws else diff --git a/src/folderview.c b/src/folderview.c index 3f459b9af..114863013 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -78,9 +78,6 @@ typedef enum static GList *folderview_list = NULL; -static GdkFont *normalfont; -static GdkFont *boldfont; - static GtkStyle *normal_style; static GtkStyle *normal_color_style; static GtkStyle *bold_style; @@ -535,6 +532,8 @@ FolderView *folderview_create(void) void folderview_init(FolderView *folderview) { + static GdkFont *boldfont = NULL; + static GdkFont *normalfont = NULL; GtkWidget *ctree = folderview->ctree; GtkWidget *label_new; GtkWidget *label_unread; @@ -589,27 +588,32 @@ void folderview_init(FolderView *folderview) gtk_clist_set_column_widget(GTK_CLIST(ctree),COL_UNREAD,hbox_unread); if (!normalfont) { - if (gtkut_font_load(NORMAL_FONT) == NULL) { - GtkStyle *style = gtk_style_new(); + normalfont = gtkut_font_load(prefs_common.normalfont); + if (!normalfont) { + GtkStyle *style; + style = gtk_widget_get_style(ctree); normalfont = style->font; gdk_font_ref(normalfont); - gtk_style_unref(style); } - else - normalfont = gtkut_font_load(NORMAL_FONT); } + if (!normal_style) { + normal_style = gtk_style_copy(gtk_widget_get_style(ctree)); + normal_style->font = normalfont; + normal_color_style = gtk_style_copy(normal_style); + normal_color_style->fg[GTK_STATE_NORMAL] = folderview->color_new; + } + if (!boldfont) { - if (gtkut_font_load(BOLD_FONT) == NULL) { - GtkStyle *style = gtk_style_new(); + boldfont = gtkut_font_load(prefs_common.boldfont); + if (!boldfont) { + GtkStyle *style; + style = gtk_widget_get_style(ctree); boldfont = style->font; gdk_font_ref(boldfont); - gtk_style_unref(style); } - else - boldfont = gtkut_font_load(BOLD_FONT); } - + if (!bold_style) { bold_style = gtk_style_copy(gtk_widget_get_style(ctree)); bold_style->font = boldfont; @@ -619,12 +623,6 @@ void folderview_init(FolderView *folderview) bold_tgtfold_style = gtk_style_copy(bold_style); bold_tgtfold_style->fg[GTK_STATE_NORMAL] = folderview->color_op; } - if (!normal_style) { - normal_style = gtk_style_copy(gtk_widget_get_style(ctree)); - normal_style->font = normalfont; - normal_color_style = gtk_style_copy(normal_style); - normal_color_style->fg[GTK_STATE_NORMAL] = folderview->color_new; - } } void folderview_set(FolderView *folderview)