fix bug 2986, 'Down and Delete buttons have same hotkey in filtering config' and...
authorPaul <paul@claws-mail.org>
Wed, 14 Aug 2013 07:51:16 +0000 (08:51 +0100)
committerPaul <paul@claws-mail.org>
Wed, 14 Aug 2013 07:51:16 +0000 (08:51 +0100)
src/prefs_actions.c
src/prefs_filtering.c
src/prefs_filtering_action.c
src/prefs_matcher.c
src/prefs_template.c
src/prefs_toolbar.c

index aa4b359..673d9b5 100644 (file)
@@ -326,7 +326,7 @@ static void prefs_actions_create(MainWindow *mainwin)
        CLAWS_SET_TIP(reg_btn,
                        _("Append the new action above to the list"));
 
-       subst_btn = gtkut_get_replace_btn(_("Replace"));
+       subst_btn = gtkut_get_replace_btn(_("_Replace"));
        gtk_widget_show(subst_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
@@ -334,7 +334,9 @@ static void prefs_actions_create(MainWindow *mainwin)
        CLAWS_SET_TIP(subst_btn,
                        _("Replace the selected action in list with the action above"));
 
-       del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
+       del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+       gtk_button_set_image(GTK_BUTTON(del_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show(del_btn);
        gtk_box_pack_start(GTK_BOX(btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
@@ -342,7 +344,9 @@ static void prefs_actions_create(MainWindow *mainwin)
        CLAWS_SET_TIP(del_btn,
                        _("Delete the selected action from the list"));
 
-       clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+       clear_btn = gtk_button_new_with_mnemonic (_("C_lear"));
+       gtk_button_set_image(GTK_BUTTON(clear_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_CLEAR,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show (clear_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), clear_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (clear_btn), "clicked",
index 9ba59cc..4077324 100644 (file)
@@ -421,7 +421,7 @@ static void prefs_filtering_create(void)
                          (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
                          (GtkAttachOptions) (0), 0, 0);
 
-       cond_btn = gtk_button_new_with_label (_(" Define... "));
+       cond_btn =  gtk_button_new_with_mnemonic (_(" D_efine... "));
        gtk_widget_show (cond_btn);
        gtk_table_attach (GTK_TABLE (table), cond_btn, 2, 3, 2, 3,
                          (GtkAttachOptions) (GTK_FILL),
@@ -443,7 +443,7 @@ static void prefs_filtering_create(void)
                          (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
                          (GtkAttachOptions) (0), 0, 0);
 
-       action_btn = gtk_button_new_with_label (_(" Define... "));
+       action_btn =  gtk_button_new_with_mnemonic (_(" De_fine... "));
        gtk_widget_show (action_btn);
        gtk_table_attach (GTK_TABLE (table), action_btn, 2, 3, 3, 4,
                          (GtkAttachOptions) (GTK_FILL),
@@ -474,7 +474,7 @@ static void prefs_filtering_create(void)
        CLAWS_SET_TIP(reg_btn,
                        _("Append the new rule above to the list"));
 
-       subst_btn = gtkut_get_replace_btn (_("Replace"));
+       subst_btn = gtkut_get_replace_btn (_("_Replace"));
        gtk_widget_show (subst_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (subst_btn), "clicked",
@@ -483,15 +483,18 @@ static void prefs_filtering_create(void)
        CLAWS_SET_TIP(subst_btn,
                        _("Replace the selected rule in list with the rule above"));
 
-       del_btn = gtk_button_new_from_stock (GTK_STOCK_DELETE);
-       gtk_widget_show (del_btn);
+       del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+       gtk_button_set_image(GTK_BUTTON(del_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
        gtk_box_pack_start (GTK_BOX (btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (del_btn), "clicked",
                        G_CALLBACK(prefs_filtering_delete_cb), NULL);
        CLAWS_SET_TIP(del_btn,
                        _("Delete the selected rule from the list"));
 
-       clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+       clear_btn = gtk_button_new_with_mnemonic (_("C_lear"));
+       gtk_button_set_image(GTK_BUTTON(clear_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_CLEAR,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show (clear_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), clear_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (clear_btn), "clicked",
@@ -529,7 +532,7 @@ static void prefs_filtering_create(void)
                        _("Move the selected rule to the top"));
 
 #ifndef GENERIC_UMPC
-       page_up_btn = gtk_button_new_with_mnemonic (_("Page up"));
+       page_up_btn = gtk_button_new_with_mnemonic (_("Page u_p"));
        gtk_button_set_image(GTK_BUTTON(page_up_btn),
                        gtk_image_new_from_stock(GTK_STOCK_GO_UP,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show (page_up_btn);
@@ -557,7 +560,7 @@ static void prefs_filtering_create(void)
                        _("Move the selected rule down"));
 
 #ifndef GENERIC_UMPC
-       page_down_btn = gtk_button_new_with_mnemonic (_("Page down"));
+       page_down_btn = gtk_button_new_with_mnemonic (_("Page dow_n"));
        gtk_button_set_image(GTK_BUTTON(page_down_btn),
                        gtk_image_new_from_stock(GTK_STOCK_GO_DOWN,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show (page_down_btn);
index 9cb7af0..92bc5b5 100644 (file)
@@ -607,13 +607,15 @@ static void prefs_filtering_action_create(void)
        g_signal_connect(G_OBJECT(reg_btn), "clicked",
                         G_CALLBACK(prefs_filtering_action_register_cb), NULL);
 
-       subst_btn = gtkut_get_replace_btn(_("Replace"));
+       subst_btn = gtkut_get_replace_btn(_("_Replace"));
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
                         G_CALLBACK(prefs_filtering_action_substitute_cb),
                         NULL);
 
-       del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
+       del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+       gtk_button_set_image(GTK_BUTTON(del_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
        gtk_box_pack_start(GTK_BOX(btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
                         G_CALLBACK(prefs_filtering_action_delete_cb), NULL);
index 04516f1..e0d2580 100644 (file)
@@ -765,13 +765,15 @@ static void prefs_matcher_create(void)
        g_signal_connect(G_OBJECT(reg_btn), "clicked",
                         G_CALLBACK(prefs_matcher_register_cb), NULL);
 
-       subst_btn = gtkut_get_replace_btn(_("Replace"));
+       subst_btn = gtkut_get_replace_btn(_("_Replace"));
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
                         G_CALLBACK(prefs_matcher_substitute_cb),
                         NULL);
 
-       del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
+       del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+       gtk_button_set_image(GTK_BUTTON(del_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
        gtk_box_pack_start(GTK_BOX(btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
                         G_CALLBACK(prefs_matcher_delete_cb), NULL);
index 9335472..68173cb 100644 (file)
@@ -306,7 +306,7 @@ static void prefs_template_window_create(void)
        CLAWS_SET_TIP(reg_btn,
                        _("Append the new template above to the list"));
 
-       subst_btn = gtkut_get_replace_btn(_("Replace"));
+       subst_btn = gtkut_get_replace_btn(_("_Replace"));
        gtk_widget_show(subst_btn);
        gtk_box_pack_start(GTK_BOX(hbox3), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
@@ -315,7 +315,9 @@ static void prefs_template_window_create(void)
        CLAWS_SET_TIP(subst_btn,
                        _("Replace the selected template in list with the template above"));
 
-       del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
+       del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+       gtk_button_set_image(GTK_BUTTON(del_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show(del_btn);
        gtk_box_pack_start(GTK_BOX(hbox3), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
@@ -323,7 +325,9 @@ static void prefs_template_window_create(void)
        CLAWS_SET_TIP(del_btn,
                        _("Delete the selected template from the list"));
 
-       clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+       clear_btn = gtk_button_new_with_mnemonic (_("C_lear"));
+       gtk_button_set_image(GTK_BUTTON(clear_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_CLEAR,GTK_ICON_SIZE_BUTTON));
        gtk_widget_show (clear_btn);
        gtk_box_pack_start (GTK_BOX (hbox3), clear_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT (clear_btn), "clicked",
index 8dd7a42..9969063 100644 (file)
@@ -1039,19 +1039,23 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar)
        btn_hbox = gtk_hbox_new(TRUE, 4);
        gtk_box_pack_start(GTK_BOX(reg_hbox), btn_hbox, FALSE, FALSE, 0);
 
-       reg_btn = gtk_button_new_from_stock(GTK_STOCK_ADD);
+       reg_btn = gtk_button_new_with_mnemonic (_("A_dd"));
+       gtk_button_set_image(GTK_BUTTON(reg_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
        gtk_box_pack_start(GTK_BOX(btn_hbox), reg_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(reg_btn), "clicked",
                         G_CALLBACK(prefs_toolbar_register), 
                         prefs_toolbar);
 
-       subst_btn = gtkut_get_replace_btn(_("Replace"));
+       subst_btn = gtkut_get_replace_btn(_("_Replace"));
        gtk_box_pack_start(GTK_BOX(btn_hbox), subst_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(subst_btn), "clicked",
                         G_CALLBACK(prefs_toolbar_substitute),
                         prefs_toolbar);
 
-       del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
+       del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+       gtk_button_set_image(GTK_BUTTON(del_btn),
+                       gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
        gtk_box_pack_start(GTK_BOX(btn_hbox), del_btn, FALSE, TRUE, 0);
        g_signal_connect(G_OBJECT(del_btn), "clicked",
                         G_CALLBACK(prefs_toolbar_delete),