give full control of display or non-display of Execute icon to Custom toolbar settings
authorPaul Mangan <paul@claws-mail.org>
Fri, 23 Aug 2002 10:40:16 +0000 (10:40 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 23 Aug 2002 10:40:16 +0000 (10:40 +0000)
ChangeLog.claws
configure.in
src/mainwindow.c
src/mainwindow.h
src/toolbar.c

index c26e34889451f9b01ede84e8d4fa38dd1c348e63..101a4ee719ae709e7c5132fb1eade86b79a805e0 100644 (file)
@@ -1,3 +1,17 @@
+2002-08-23 [paul]      0.8.1claws107
+
+       * src/mainwindow.[ch]
+         src/toolbar.c
+               give full control of display or non-display 
+               of the Execute icon to Custom toolbar settings.
+               add new sensitivity condition to maninwindow.h: 
+               M_DELAY_EXEC
+
+       * ChangeLog
+         ChangeLog.jp
+         NEWS
+               more sync with 0.8.1cvs29
+
 2002-08-23 [melvin]    0.8.1claws106
 
        * src/alertpanel.c
 2002-08-23 [melvin]    0.8.1claws106
 
        * src/alertpanel.c
index f79563f736df66e7b0361b771bbb36ce29ea43bf..0e0ffa0c6a38803a4dee51ade84a10b4d12e65d8 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws106
+EXTRA_VERSION=claws107
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index da5416fa41a65fe255e64036a5afe1dc8e3dd85d..782bb2d0ac814eac144b2d1a58f28758a7a91160 100644 (file)
@@ -1055,11 +1055,6 @@ void main_window_reflect_prefs_all_real(gboolean pixmap_theme_changed)
                        summary_reflect_prefs_pixmap_theme(mainwin->summaryview);
                }
                
                        summary_reflect_prefs_pixmap_theme(mainwin->summaryview);
                }
                
-               if (prefs_common.immediate_exec)
-                       gtk_widget_hide(mainwin->toolbar->exec_btn);
-               else
-                       gtk_widget_show(mainwin->toolbar->exec_btn);
-
                summary_redisplay_msg(mainwin->summaryview);
                headerview_set_visibility(mainwin->messageview->headerview,
                                          prefs_common.display_header_pane);
                summary_redisplay_msg(mainwin->summaryview);
                headerview_set_visibility(mainwin->messageview->headerview,
                                          prefs_common.display_header_pane);
@@ -1420,6 +1415,10 @@ SensitiveCond main_window_get_current_state(MainWindow *mainwin)
                /*              if (item->folder->type != F_NEWS) */
                state |= M_ALLOW_DELETE;
 
                /*              if (item->folder->type != F_NEWS) */
                state |= M_ALLOW_DELETE;
 
+               if (prefs_common.immediate_exec == 0
+                   && mainwin->lock_count == 0)
+                       state |= M_DELAY_EXEC;
+
                if ((selection == SUMMARY_NONE && item->hide_read_msgs)
                    || selection != SUMMARY_NONE)
                        state |= M_HIDE_READ_MSG;       
                if ((selection == SUMMARY_NONE && item->hide_read_msgs)
                    || selection != SUMMARY_NONE)
                        state |= M_HIDE_READ_MSG;       
@@ -1529,7 +1528,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/Tools/Filter messages"           , M_MSG_EXIST|M_EXEC|M_UNLOCKED},
                {"/Tools/Create filter rule"        , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
                {"/Tools/Actions"                   , M_TARGET_EXIST|M_UNLOCKED},
                {"/Tools/Filter messages"           , M_MSG_EXIST|M_EXEC|M_UNLOCKED},
                {"/Tools/Create filter rule"        , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
                {"/Tools/Actions"                   , M_TARGET_EXIST|M_UNLOCKED},
-               {"/Tools/Execute"                   , M_MSG_EXIST|M_EXEC|M_UNLOCKED},
+               {"/Tools/Execute"                   , M_DELAY_EXEC},
                {"/Tools/Delete duplicated messages", M_MSG_EXIST|M_ALLOW_DELETE|M_UNLOCKED},
 
                {"/Configuration", M_UNLOCKED},
                {"/Tools/Delete duplicated messages", M_MSG_EXIST|M_ALLOW_DELETE|M_UNLOCKED},
 
                {"/Configuration", M_UNLOCKED},
index 31cb2438be6bad0a015b79c086ce167befab414d..271b2d8d640f17a12f5ec5e2d7d3cb2c492f5262 100644 (file)
@@ -40,13 +40,14 @@ typedef enum
        M_EXEC                = 1 << 4,
        M_ALLOW_REEDIT        = 1 << 5,
        M_HAVE_ACCOUNT        = 1 << 6,
        M_EXEC                = 1 << 4,
        M_ALLOW_REEDIT        = 1 << 5,
        M_HAVE_ACCOUNT        = 1 << 6,
-       M_THREADED          = 1 << 7,
-       M_UNTHREADED        = 1 << 8,
-       M_ALLOW_DELETE      = 1 << 9,
-       M_INC_ACTIVE        = 1 << 10,
+       M_THREADED            = 1 << 7,
+       M_UNTHREADED          = 1 << 8,
+       M_ALLOW_DELETE        = 1 << 9,
+       M_INC_ACTIVE          = 1 << 10,
        M_NEWS                = 1 << 11,
        M_HAVE_NEWS_ACCOUNT   = 1 << 12,
        M_NEWS                = 1 << 11,
        M_HAVE_NEWS_ACCOUNT   = 1 << 12,
-       M_HIDE_READ_MSG     = 1 << 13
+       M_HIDE_READ_MSG       = 1 << 13,
+       M_DELAY_EXEC          = 1 << 14
 } SensitiveCond;
 
 typedef enum
 } SensitiveCond;
 
 typedef enum
index f70ed8dfc1dcd4e6fd3e62d67a42386b435b06c8..5544e0bab6f84bd6988e110971930e23694dde28 100644 (file)
@@ -732,7 +732,7 @@ void toolbar_set_sensitive(MainWindow *mainwin)
        SET_WIDGET_COND(toolbar->next_btn, M_MSG_EXIST);
        SET_WIDGET_COND(toolbar->delete_btn,
                        M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED);
        SET_WIDGET_COND(toolbar->next_btn, M_MSG_EXIST);
        SET_WIDGET_COND(toolbar->delete_btn,
                        M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED);
-       SET_WIDGET_COND(toolbar->exec_btn, M_MSG_EXIST|M_EXEC|M_UNLOCKED);
+       SET_WIDGET_COND(toolbar->exec_btn, M_DELAY_EXEC);
 
        for (cur = toolbar->syl_action; cur != NULL;  cur = cur->next) {
                ToolbarSylpheedActions *act = (ToolbarSylpheedActions*)cur->data;
 
        for (cur = toolbar->syl_action; cur != NULL;  cur = cur->next) {
                ToolbarSylpheedActions *act = (ToolbarSylpheedActions*)cur->data;
@@ -985,6 +985,9 @@ void toolbar_create(MainWindow *mainwin,
                        break;
                case A_EXECUTE:
                        mainwin->toolbar->exec_btn = item;
                        break;
                case A_EXECUTE:
                        mainwin->toolbar->exec_btn = item;
+                       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
+                                            mainwin->toolbar->exec_btn,
+                                          _("Execute"), NULL);
                        break;
                case A_GOTO_NEXT:
                        mainwin->toolbar->next_btn = item;
                        break;
                case A_GOTO_NEXT:
                        mainwin->toolbar->next_btn = item;
@@ -1008,31 +1011,6 @@ void toolbar_create(MainWindow *mainwin,
 
        mainwin->toolbar->toolbar = toolbar;
 
 
        mainwin->toolbar->toolbar = toolbar;
 
-       /* we always create an exec button, if there isn't one yet 
-          the user might decide to change prefs_common.immediate_exec 
-          --> better be prepared 
-       */
-       if (!mainwin->toolbar->exec_btn) {
-               toolbar_item = g_new0(ToolbarItem, 1);
-               toolbar_item->action = A_EXECUTE;
-               toolbar_item->file   = stock_pixmap_get_name(STOCK_PIXMAP_EXEC);
-               toolbar_item->text   = toolbar_ret_descr_from_val(A_EXECUTE);
-
-               icon_wid = stock_pixmap_widget(container, STOCK_PIXMAP_EXEC);
-               item = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
-                                              toolbar_item->text,
-                                              (""),
-                                              (""),
-                                              icon_wid, toolbar_actions_cb,
-                                              toolbar_item);
-               mainwin->toolbar->exec_btn = item;
-               g_free(toolbar_item);
-       }
-
-       gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
-                            mainwin->toolbar->exec_btn,
-                            _("Execute"), NULL);
-
        activate_compose_button(mainwin->toolbar, 
                                prefs_common.toolbar_style, 
                                mainwin->toolbar->compose_btn_type);
        activate_compose_button(mainwin->toolbar, 
                                prefs_common.toolbar_style, 
                                mainwin->toolbar->compose_btn_type);