sync with 0.9.5cvs6
authorPaul Mangan <paul@claws-mail.org>
Tue, 16 Sep 2003 07:27:46 +0000 (07:27 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 16 Sep 2003 07:27:46 +0000 (07:27 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/folderview.c

index d1bc3b5..2d599ff 100644 (file)
--- 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
index d0a8e19..ea789ef 100644 (file)
@@ -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
index 1516f0a..3c303e4 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-16
+
+       * src/folderview.c: folderview_init(): ¥Õ¥©¥ó¥È¤¬Æɤ߹þ¤á¤Ê¤¤¾ì¹ç¤Ï
+         gtk ¤Î¥Ç¥Õ¥©¥ë¥È¤Ë fallback ¤¹¤ë¤è¤¦¤Ë¤·¤¿(µ¯Æ°»þ¤Î¥¯¥é¥Ã¥·¥å¤ò
+         ½¤Àµ)¡£¤µ¤é¤ËÉÔÍפʥ³¡¼¥É¤ò½üµî¡£
+
 2003-09-15
 
        * src/compose.c: compose_insert_sig(): ¥Þ¥Ë¥å¥¢¥ëÁàºî¤Î¤È¤­¤Ï¸½ºß¤Î
index 21db1af..5cf5969 100644 (file)
@@ -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
index 3f459b9..1148630 100644 (file)
@@ -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)