bug fixes for pixmap theming related code
authorCarsten Schurig <Carsten.Schurig@web.de>
Sat, 16 Feb 2002 15:50:38 +0000 (15:50 +0000)
committerCarsten Schurig <Carsten.Schurig@web.de>
Sat, 16 Feb 2002 15:50:38 +0000 (15:50 +0000)
ChangeLog.claws
configure.in
src/mainwindow.c
src/mainwindow.h
src/prefs_common.c
src/summaryview.c

index d8cad89f685ec88feb7091736254d08fe6e40578..1c671431f777126465263d44d4d5d124bbc3adbf 100644 (file)
@@ -1,3 +1,13 @@
+2002-02-16 [carsten]   0.7.1claws7
+       * src/mainwindow.[ch]
+         src/summaryview.c
+         src/prefs_common.c
+               fixes for pixmap theming code:
+                       - recently changed mail attributes shouldn't get
+                         lost any longer
+                       - theme is only reloaded iff another theme was
+                         selected
+
 2002-02-16 [paul]      0.7.1claws6
 
        * sync with sylpheed 0.7.2 release
index 55b4ad5453bbb5c5a0485ea41764bb09ea66d983..a817b25e4eea9693749b870b56081ba6e1f71bfb 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws6
+EXTRA_VERSION=claws7
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index e50f2a5af33c9ea88e1f34be5aa2667c690b2d77..dcfffb9d5cc3cb3063b26048bf9c12f7ef7abac3 100644 (file)
@@ -1076,6 +1076,11 @@ static void main_window_menu_callback_unblock(MainWindow *mainwin)
 }
 
 void main_window_reflect_prefs_all(void)
+{
+       main_window_reflect_prefs_all_real(FALSE);
+}
+
+void main_window_reflect_prefs_all_real(gboolean pixmap_theme_changed)
 {
        GList *cur;
        MainWindow *mainwin;
@@ -1088,14 +1093,17 @@ void main_window_reflect_prefs_all(void)
                main_window_set_toolbar_sensitive(mainwin);
 
                /* pixmap themes */
-               gtk_container_remove(GTK_CONTAINER(mainwin->handlebox), GTK_WIDGET(mainwin->toolbar));
-               mainwin->toolbar = NULL;
-               main_window_toolbar_create(mainwin, mainwin->handlebox);
-               set_toolbar_style(mainwin);
-               activate_compose_button(mainwin, prefs_common.toolbar_style, mainwin->compose_btn_type);
-               folderview_reflect_prefs_pixmap_theme(mainwin->folderview);
-               summary_reflect_prefs_pixmap_theme(mainwin->summaryview);
-
+               if (pixmap_theme_changed)
+               {
+                       gtk_container_remove(GTK_CONTAINER(mainwin->handlebox), GTK_WIDGET(mainwin->toolbar));
+                       mainwin->toolbar = NULL;
+                       main_window_toolbar_create(mainwin, mainwin->handlebox);
+                       set_toolbar_style(mainwin);
+                       activate_compose_button(mainwin, prefs_common.toolbar_style, mainwin->compose_btn_type);
+                       folderview_reflect_prefs_pixmap_theme(mainwin->folderview);
+                       summary_reflect_prefs_pixmap_theme(mainwin->summaryview);
+               }
+               
                summary_redisplay_msg(mainwin->summaryview);
                headerview_set_visibility(mainwin->messageview->headerview,
                                          prefs_common.display_header_pane);
index a058647112cb4c48dccf6a89304c91a00898b0f5..fe8b8f75039f0f8e7f13ba253d87289619c90599 100644 (file)
@@ -147,7 +147,8 @@ void main_window_cursor_normal              (MainWindow     *mainwin);
 void main_window_lock                  (MainWindow     *mainwin);
 void main_window_unlock                        (MainWindow     *mainwin);
 
-void main_window_reflect_prefs_all                     (void);
+void main_window_reflect_prefs_all_real                (gboolean pixmap_theme_changed);
+void main_window_reflect_prefs_all     (void);
 void main_window_set_summary_column    (void);
 void main_window_set_account_menu      (GList          *account_list);
 void main_window_separation_change     (MainWindow     *mainwin,
index 032b4ca3f5e3d968f9f4c657d10225b22354dfa9..a64a107bc4208e9c8ce16fdb984668513d3bae68 100644 (file)
@@ -3988,9 +3988,25 @@ static void prefs_common_ok(void)
 
 static void prefs_common_apply(void)
 {
+       gchar *entry_pixmap_theme_str;
+       gboolean update_pixmap_theme;
+       
+       entry_pixmap_theme_str = gtk_entry_get_text(GTK_ENTRY(interface.entry_pixmap_theme));
+       if (entry_pixmap_theme_str && 
+               (strcmp(prefs_common.pixmap_theme_path, entry_pixmap_theme_str) != 0) )
+               update_pixmap_theme = TRUE;
+       else
+               update_pixmap_theme = FALSE;
+       
        prefs_set_data_from_dialog(param);
-       main_window_reflect_prefs_all();
-       compose_reflect_prefs_pixmap_theme();
+       
+       if (update_pixmap_theme)
+       {
+               main_window_reflect_prefs_all_real(TRUE);
+               compose_reflect_prefs_pixmap_theme();
+       } else
+               main_window_reflect_prefs_all_real(FALSE);
+       
        prefs_common_save_config();
 
        inc_autocheck_timer_remove();
index 8c3439b6c9371851b7e332d6a3e71f8dd0d1216e..339c3c2fa1310e755e1228e8b4d0abe8ffdf4fa0 100644 (file)
@@ -5046,6 +5046,8 @@ void summary_reflect_prefs_pixmap_theme(SummaryView *summaryview)
        gtk_widget_show(pixmap);
        summaryview->folder_pixmap = pixmap; 
 
+       summary_write_cache(summaryview);
+
        folderview_unselect(summaryview->folderview);
        folderview_select(summaryview->folderview, summaryview->folder_item);
 }