2012-02-08 [pawel] 3.8.0cvs27
[claws.git] / src / prefs_toolbar.c
index 22982d2cf77cddb970bb297f4f201eec40bf6868..38cc74fb261af26da261fd47e2efb5c822391bbc 100644 (file)
@@ -41,6 +41,7 @@
 #include "mainwindow.h"
 #include "alertpanel.h"
 #include "prefs_common.h"
+#include "prefs_actions.h"
 
 #include "utils.h"
 
@@ -291,7 +292,6 @@ static void prefs_toolbar_save(PrefsPage *_page)
                        item->index = toolbar_ret_val_from_descr(event);
                        g_free(event);
 
-                       /* TODO: save A_CLAWS_ACTIONS only if they are still active */
                        toolbar_set_list_item(item, prefs_toolbar->source);
 
                        g_free(item->file);
@@ -1266,6 +1266,24 @@ void prefs_toolbar_done(void)
        g_free(prefs_toolbar_messageview);
 }
 
+void prefs_toolbar_update_action_btns(void) 
+{
+       if (toolbar_check_action_btns(TOOLBAR_MAIN)) {
+               toolbar_save_config_file(TOOLBAR_MAIN);
+               toolbar_update(TOOLBAR_MAIN, mainwindow_get_mainwindow());
+       }
+
+       if (toolbar_check_action_btns(TOOLBAR_COMPOSE)) {
+               toolbar_save_config_file(TOOLBAR_COMPOSE);
+               compose_reflect_prefs_pixmap_theme();
+       }
+
+       if (toolbar_check_action_btns(TOOLBAR_MSGVIEW)) {
+               toolbar_save_config_file(TOOLBAR_MSGVIEW);
+               messageview_reflect_prefs_pixmap_theme();
+       }
+}
+
 static void set_visible_if_not_text(GtkTreeViewColumn *col,
                                    GtkCellRenderer   *renderer,
                                    GtkTreeModel      *model,