2004-12-30 [colin] 0.9.13cvs22.4
authorColin Leroy <colin@colino.net>
Thu, 30 Dec 2004 15:28:43 +0000 (15:28 +0000)
committerColin Leroy <colin@colino.net>
Thu, 30 Dec 2004 15:28:43 +0000 (15:28 +0000)
* src/account.c
* src/action.c
* src/export.c
* src/foldersel.c
* src/import.c
* src/message_search.c
* src/prefs_actions.c
* src/prefs_common.c
* src/prefs_customheader.c
* src/prefs_filtering.c
* src/prefs_summary_column.c
* src/summary_search.c
* src/gtk/about.c
* src/gtk/description_window.c
* src/gtk/gtkutils.c
* src/gtk/gtkutils.h
* src/gtk/inputdialog.c
* src/gtk/prefswindow.c
Use GTK2 stock buttons. Patches by Alfons.

21 files changed:
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/account.c
src/action.c
src/export.c
src/foldersel.c
src/gtk/about.c
src/gtk/description_window.c
src/gtk/gtkutils.c
src/gtk/gtkutils.h
src/gtk/inputdialog.c
src/gtk/prefswindow.c
src/import.c
src/message_search.c
src/prefs_actions.c
src/prefs_common.c
src/prefs_customheader.c
src/prefs_filtering.c
src/prefs_summary_column.c
src/summary_search.c

index 18135008f8bff207a45f29c20179ca21b6e23a5e..00763670e9cd903517c6f77e5df500705246a1dc 100644 (file)
@@ -1,3 +1,25 @@
+2004-12-30 [colin]     0.9.13cvs22.4
+
+       * src/account.c
+       * src/action.c
+       * src/export.c
+       * src/foldersel.c
+       * src/import.c
+       * src/message_search.c
+       * src/prefs_actions.c
+       * src/prefs_common.c
+       * src/prefs_customheader.c
+       * src/prefs_filtering.c
+       * src/prefs_summary_column.c
+       * src/summary_search.c
+       * src/gtk/about.c
+       * src/gtk/description_window.c
+       * src/gtk/gtkutils.c
+       * src/gtk/gtkutils.h
+       * src/gtk/inputdialog.c
+       * src/gtk/prefswindow.c
+               Use GTK2 stock buttons. Patches by Alfons.
+
 2004-12-30 [colin]     0.9.13cvs22.3
 
        * src/account.c
index c24e0d1ee672ac73f965e7b4f25cb498361e3412..8ba86c4c4b223236ea3c5e989220b00ae0f2fb46 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.396.2.17 -r 1.396.2.18 ChangeLog; cvs diff -u -r 1.2504.2.40 -r 1.2504.2.41 ChangeLog.claws; cvs diff -u -r 1.391.2.17 -r 1.391.2.18 ChangeLog.jp; cvs diff -u -r 1.42.2.7 -r 1.42.2.8 NEWS; cvs diff -u -r 1.654.2.326 -r 1.654.2.327 configure.ac; cvs diff -u -r 1.61.2.15 -r 1.61.2.16 src/account.c; ) > 0.9.13cvs22.1.patchset
 ( cvs diff -u -r 1.26.2.6 -r 1.26.2.7 src/foldersel.c; ) > 0.9.13cvs22.2.patchset
 ( cvs diff -u -r 1.61.2.16 -r 1.61.2.17 src/account.c; cvs diff -u -r 1.60.2.5 -r 1.60.2.6 src/prefs_actions.c; cvs diff -u -r 1.16.2.4 -r 1.16.2.5 src/prefs_customheader.c; cvs diff -u -r 1.59.2.10 -r 1.59.2.11 src/prefs_filtering.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/prefs_msg_colors.c; cvs diff -u -r 1.10.2.2 -r 1.10.2.3 src/prefs_summary_column.c; cvs diff -u -r 1.12.2.11 -r 1.12.2.12 src/gtk/prefswindow.c; ) > 0.9.13cvs22.3.patchset
+( cvs diff -u -r 1.61.2.17 -r 1.61.2.18 src/account.c; cvs diff -u -r 1.12.2.17 -r 1.12.2.18 src/action.c; cvs diff -u -r 1.8.2.3 -r 1.8.2.4 src/export.c; cvs diff -u -r 1.26.2.7 -r 1.26.2.8 src/foldersel.c; cvs diff -u -r 1.13.2.4 -r 1.13.2.5 src/import.c; cvs diff -u -r 1.3.12.5 -r 1.3.12.6 src/message_search.c; cvs diff -u -r 1.60.2.6 -r 1.60.2.7 src/prefs_actions.c; cvs diff -u -r 1.204.2.25 -r 1.204.2.26 src/prefs_common.c; cvs diff -u -r 1.16.2.5 -r 1.16.2.6 src/prefs_customheader.c; cvs diff -u -r 1.59.2.11 -r 1.59.2.12 src/prefs_filtering.c; cvs diff -u -r 1.10.2.3 -r 1.10.2.4 src/prefs_summary_column.c; cvs diff -u -r 1.15.2.11 -r 1.15.2.12 src/summary_search.c; cvs diff -u -r 1.4.2.4 -r 1.4.2.5 src/gtk/about.c; cvs diff -u -r 1.5.2.5 -r 1.5.2.6 src/gtk/description_window.c; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.5 -r 1.4.2.6 src/gtk/gtkutils.h; cvs diff -u -r 1.2.2.2 -r 1.2.2.3 src/gtk/inputdialog.c; cvs diff -u -r 1.12.2.12 -r 1.12.2.13 src/gtk/prefswindow.c; ) > 0.9.13cvs22.4.patchset
index 9b54b2468276d4957fb167573c4251db92925b6f..4f943f11cb97eb888337ae9e41aa034de121861e 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=22
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.3
+EXTRA_GTK2_VERSION=.4
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index de12078ffd975553b478fa471293f949bd57fccf..6a79b53e7dbf2d3f4489346be94d9eb941ddfb3a 100644 (file)
@@ -157,6 +157,20 @@ static void account_double_clicked         (GtkTreeView            *list_view,
                                                 GtkTreePath            *path,
                                                 GtkTreeViewColumn      *column,
                                                 gpointer                data);
+                                                
+static void drag_begin                         (GtkTreeView *list_view,
+                                                GdkDragContext *context,
+                                                gpointer data);
+
+static void drag_end                           (GtkTreeView *list_view,
+                                                GdkDragContext *context,
+                                                gpointer data);
+                     
+static void account_row_changed_while_drag_drop        (GtkTreeModel *model, 
+                                                GtkTreePath  *path,
+                                                GtkTreeIter  *iter,
+                                                gpointer      arg3,
+                                                GtkTreeView  *list_view);
 
 void account_read_config_all(void)
 {
@@ -647,37 +661,37 @@ static void account_edit_create(void)
        gtk_widget_show (vbox2);
        gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
 
-       add_btn = gtk_button_new_with_label (_("Add"));
+       add_btn = gtk_button_new_from_stock(GTK_STOCK_ADD);
        gtk_widget_show (add_btn);
        gtk_box_pack_start (GTK_BOX (vbox2), add_btn, FALSE, FALSE, 4);
        g_signal_connect (G_OBJECT(add_btn), "clicked",
                          G_CALLBACK (account_add), NULL);
 
-       edit_btn = gtk_button_new_with_label (_("Edit"));
+       edit_btn = gtk_button_new_from_stock(GTK_STOCK_PROPERTIES);
        gtk_widget_show (edit_btn);
        gtk_box_pack_start (GTK_BOX (vbox2), edit_btn, FALSE, FALSE, 4);
        g_signal_connect (G_OBJECT(edit_btn), "clicked",
                          G_CALLBACK (account_edit_prefs), NULL);
 
-       del_btn = gtk_button_new_with_label (_(" Delete "));
+       del_btn = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
        gtk_widget_show (del_btn);
        gtk_box_pack_start (GTK_BOX (vbox2), del_btn, FALSE, FALSE, 4);
        g_signal_connect (G_OBJECT(del_btn), "clicked",
                          G_CALLBACK (account_delete), NULL);
 
-       clone_btn = gtk_button_new_with_label (_(" Clone "));
+       clone_btn = gtk_button_new_from_stock(GTK_STOCK_COPY);
        gtk_widget_show (clone_btn);
        gtk_box_pack_start (GTK_BOX (vbox2), clone_btn, FALSE, FALSE, 4);
        g_signal_connect(G_OBJECT(clone_btn), "clicked",
                         G_CALLBACK(account_clone), NULL);
        
-       down_btn = gtk_button_new_with_label (_("Down"));
+       down_btn = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
        gtk_widget_show (down_btn);
        gtk_box_pack_end (GTK_BOX (vbox2), down_btn, FALSE, FALSE, 4);
        g_signal_connect (G_OBJECT(down_btn), "clicked",
                          G_CALLBACK (account_down), NULL);
 
-       up_btn = gtk_button_new_with_label (_("Up"));
+       up_btn = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
        gtk_widget_show (up_btn);
        gtk_box_pack_end (GTK_BOX (vbox2), up_btn, FALSE, FALSE, 4);
        g_signal_connect (G_OBJECT(up_btn), "clicked",
@@ -697,9 +711,14 @@ static void account_edit_create(void)
        g_signal_connect (G_OBJECT(default_btn), "clicked",
                          G_CALLBACK (account_set_default), NULL);
 
-       gtkut_button_set_create(&hbbox, &close_btn, _("Close"),
-                               NULL, NULL, NULL, NULL);
+       hbbox = gtk_hbutton_box_new();
+       gtk_button_box_set_layout(GTK_BUTTON_BOX(hbbox), GTK_BUTTONBOX_END);
+       gtk_box_set_spacing(GTK_BOX(hbbox), 5);
+
+       gtkut_button_set_create_stock(&hbbox, &close_btn, GTK_STOCK_CLOSE,
+                                     NULL, NULL, NULL, NULL);
        gtk_widget_show(hbbox);
+
        gtk_box_pack_end (GTK_BOX (hbox), hbbox, FALSE, FALSE, 0);
        gtk_widget_grab_default (close_btn);
 
@@ -1282,10 +1301,11 @@ static GtkWidget *account_list_view_create(void)
 {
        GtkTreeView *list_view;
        GtkTreeSelection *selector;
+       GtkListStore *store = account_create_data_store();
+
+       list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)));
+       g_object_unref(G_OBJECT(store));
 
-       list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(GTK_TREE_MODEL
-               (account_create_data_store())));
-       
        gtk_tree_view_set_rules_hint(list_view, TRUE);
        
        selector = gtk_tree_view_get_selection(list_view);
@@ -1302,6 +1322,15 @@ static GtkWidget *account_list_view_create(void)
                         G_CALLBACK(account_double_clicked),
                         list_view);
 
+       g_signal_connect(G_OBJECT(list_view), "drag_begin",                      
+                        G_CALLBACK(drag_begin),
+                        list_view);
+                        
+       g_signal_connect(G_OBJECT(list_view), "drag_end",                        
+                        G_CALLBACK(drag_end),
+                        list_view);
+                        
+       gtk_tree_view_set_reorderable(list_view, TRUE);
        return GTK_WIDGET(list_view);
 }
 
@@ -1562,3 +1591,37 @@ static void account_double_clicked(GtkTreeView           *list_view,
 {
        account_edit_prefs(NULL, NULL); 
 }
+
+static void drag_begin(GtkTreeView *list_view,
+                     GdkDragContext *context,
+                     gpointer data)
+{
+       /* XXX unfortunately a completed drag & drop does not emit 
+        * a "rows_reordered" signal, but a "row_changed" signal.
+        * So during drag and drop, listen to "row_changed", and
+        * update the account list accordingly */
+
+       GtkTreeModel *model = gtk_tree_view_get_model(list_view);
+       g_signal_connect(G_OBJECT(model), "row_changed",
+                        G_CALLBACK(account_row_changed_while_drag_drop),
+                        list_view);
+}
+
+static void drag_end(GtkTreeView *list_view,
+                   GdkDragContext *context,
+                   gpointer data)
+{
+       GtkTreeModel *model = gtk_tree_view_get_model(list_view);
+       g_signal_handlers_disconnect_by_func(G_OBJECT(model),
+                                            G_CALLBACK(account_row_changed_while_drag_drop),
+                                            list_view);
+}
+
+static void account_row_changed_while_drag_drop(GtkTreeModel *model, 
+                                  GtkTreePath  *path,
+                                  GtkTreeIter  *iter,
+                                  gpointer      arg3,
+                                  GtkTreeView  *list_view)
+{      
+       account_list_set();     
+}
index 73e7e2eb235993f38fb3068959fae26711f8ca30..36c5f47b8eaefe1eb9362c682c4c1b0c121f77ff 100644 (file)
@@ -1207,7 +1207,7 @@ static void create_io_dialog(Children *children)
                        gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
                gtk_widget_show(entry);
 
-               send_button = gtk_button_new_with_label(_(" Send "));
+               send_button = gtk_button_new_from_stock(GTK_STOCK_EXECUTE);
                g_signal_connect(G_OBJECT(send_button), "clicked",
                                 G_CALLBACK(send_input), children);
                gtk_box_pack_start(GTK_BOX(input_hbox), send_button, FALSE,
@@ -1233,8 +1233,8 @@ static void create_io_dialog(Children *children)
                gtk_widget_show(progress_bar);
        }
 
-       gtkut_button_set_create(&hbox, &abort_button, _("Abort"),
-                               &close_button, _("Close"), NULL, NULL);
+       gtkut_button_set_create_stock(&hbox, &abort_button, GTK_STOCK_STOP,
+                                     &close_button, GTK_STOCK_CLOSE, NULL, NULL);
        g_signal_connect(G_OBJECT(abort_button), "clicked",
                         G_CALLBACK(kill_children_cb), children);
        g_signal_connect(G_OBJECT(close_button), "clicked",
index bc73c9dd1cb4a3a8f16dca490d45340939553c92..cc00d849dd20e6456ea419a707618d5bd9900b7b 100644 (file)
@@ -185,22 +185,22 @@ static void export_create(void)
        gtk_table_attach(GTK_TABLE(table), file_entry, 1, 2, 1, 2,
                         GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       src_button = gtk_button_new_with_label(_(" Select... "));
+       src_button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
        gtk_table_attach(GTK_TABLE(table), src_button, 2, 3, 0, 1,
                         0, 0, 0, 0);
        g_signal_connect(G_OBJECT(src_button), "clicked",
                         G_CALLBACK(export_srcsel_cb), NULL);
 
-       file_button = gtk_button_new_with_label(_(" Select... "));
+       file_button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
        gtk_table_attach(GTK_TABLE(table), file_button, 2, 3, 1, 2,
                         0, 0, 0, 0);
        g_signal_connect(G_OBJECT(file_button), "clicked",
                         G_CALLBACK(export_filesel_cb), NULL);
 
-       gtkut_button_set_create(&confirm_area,
-                               &ok_button,     _("OK"),
-                               &cancel_button, _("Cancel"),
-                               NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area,
+                                     &ok_button,     GTK_STOCK_OK,
+                                     &cancel_button, GTK_STOCK_CANCEL,
+                                     NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(ok_button);
 
index 7130350cef147d594bf9391f63f7b81623cdc842..a031a1fbcd0b4c2e852ac1b1c3d888fc748afc55 100644 (file)
@@ -394,10 +394,10 @@ static void foldersel_create(void)
        g_signal_connect(G_OBJECT(entry), "activate",
                         G_CALLBACK(foldersel_activated), NULL);
 
-       gtkut_button_set_create(&confirm_area,
-                               &ok_button,     _("OK"),
-                               &cancel_button, _("Cancel"),
-                               NULL,           NULL);
+       gtkut_button_set_create_stock(&confirm_area,
+                                     &ok_button,       GTK_STOCK_OK,
+                                     &cancel_button,   GTK_STOCK_CANCEL,
+                                     NULL,     NULL);
 
        gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(ok_button);
index 43c7185bc476e1e980a2223cf0e4cc6bb171ffbe..17670f514153c60e694475dd5be699e7019b4d36 100644 (file)
@@ -220,8 +220,8 @@ static void about_create(void)
                  "Foundation, Inc., 59 Temple Place - Suite 330, Boston, "
                  "MA 02111-1307, USA."), -1);
 
-       gtkut_button_set_create(&confirm_area, &ok_button, _("OK"),
-                               NULL, NULL, NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area, &ok_button, GTK_STOCK_OK,
+                                     NULL, NULL, NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(ok_button);
        g_signal_connect_closure
index b81396dd8efb4c2d062e85d83e92975f5c7e0012..b7d58e2e600e481d1853d3e628a2f143c2fcff7c 100644 (file)
@@ -117,8 +117,8 @@ static void description_create(DescriptionWindow * dwindow)
                line++;
        }
 
-       gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
-                               NULL, NULL, NULL, NULL);
+       gtkut_button_set_create_stock(&hbbox, &ok_btn, GTK_STOCK_OK,
+                                     NULL, NULL, NULL, NULL);
        gtk_widget_show(hbbox);
 
        vbox = gtk_vbox_new(FALSE, 0);
index f37241f09812997679fb6c4da39a643571d1cadd..223cf852a714b7367f57d044a15bb0e92729d3b7 100644 (file)
@@ -110,6 +110,38 @@ void gtkut_button_set_create(GtkWidget **bbox,
        }
 }
 
+void gtkut_button_set_create_stock(GtkWidget **bbox,
+                                  GtkWidget **button1, const gchar *label1,
+                                  GtkWidget **button2, const gchar *label2,
+                                  GtkWidget **button3, const gchar *label3)
+{
+       g_return_if_fail(bbox != NULL);
+       g_return_if_fail(button1 != NULL);
+
+       *bbox = gtk_hbutton_box_new();
+       gtk_button_box_set_layout(GTK_BUTTON_BOX(*bbox), GTK_BUTTONBOX_END);
+       gtk_box_set_spacing(GTK_BOX(*bbox), 5);
+
+       *button1 = gtk_button_new_from_stock(label1);
+       GTK_WIDGET_SET_FLAGS(*button1, GTK_CAN_DEFAULT);
+       gtk_box_pack_start(GTK_BOX(*bbox), *button1, TRUE, TRUE, 0);
+       gtk_widget_show(*button1);
+
+       if (button2) {
+               *button2 = gtk_button_new_from_stock(label2);
+               GTK_WIDGET_SET_FLAGS(*button2, GTK_CAN_DEFAULT);
+               gtk_box_pack_start(GTK_BOX(*bbox), *button2, TRUE, TRUE, 0);
+               gtk_widget_show(*button2);
+       }
+
+       if (button3) {
+               *button3 = gtk_button_new_from_stock(label3);
+               GTK_WIDGET_SET_FLAGS(*button3, GTK_CAN_DEFAULT);
+               gtk_box_pack_start(GTK_BOX(*bbox), *button3, TRUE, TRUE, 0);
+               gtk_widget_show(*button3);
+       }
+}
+
 static void combo_button_size_request(GtkWidget *widget,
                                      GtkRequisition *requisition,
                                      gpointer data)
index d007c4b4abfbe3d3ac05c9512f35d0b70d08495a..b320854681126f8f3c860f8b1680b558c5f0aa76 100644 (file)
@@ -103,6 +103,14 @@ void gtkut_button_set_create               (GtkWidget      **bbox,
                                         const gchar     *label2,
                                         GtkWidget      **button3,
                                         const gchar     *label3);
+                                        
+void gtkut_button_set_create_stock     (GtkWidget      **bbox,
+                                        GtkWidget      **button1,
+                                        const gchar     *label1,
+                                        GtkWidget      **button2,
+                                        const gchar     *label2,
+                                        GtkWidget      **button3,
+                                        const gchar     *label3);
 
 ComboButton *gtkut_combo_button_create (GtkWidget              *button,
                                         GtkItemFactoryEntry    *entries,
index 8de62eed48c21d2c0eda969797575482f76d90dc..8a4376dcf846341bc022471f4b1f0e0c64c2bd78 100644 (file)
@@ -35,6 +35,7 @@
 #include <gtk/gtkcombo.h>
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkhbbox.h>
+#include <gtk/gtkstock.h>
 
 #include "intl.h"
 #include "inputdialog.h"
@@ -198,10 +199,10 @@ static void input_dialog_create(void)
        g_signal_connect(G_OBJECT(GTK_COMBO(combo)->entry), "activate",
                         G_CALLBACK(combo_activated), NULL);
 
-       gtkut_button_set_create(&confirm_area,
-                               &ok_button,     _("OK"),
-                               &cancel_button, _("Cancel"),
-                               NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area,
+                                     &ok_button,     GTK_STOCK_OK,
+                                     &cancel_button, GTK_STOCK_CANCEL,
+                                     NULL, NULL);
        gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
                          confirm_area);
        gtk_widget_grab_default(ok_button);
index c149064a78c390747a54528a034286ed4c164fbb..5149036c62d3beba1a35705ea39ce77fcd2fd51b 100644 (file)
@@ -397,10 +397,10 @@ void prefswindow_open_full(const gchar *title, GSList *prefs_pages, gpointer dat
 
        gtk_widget_grab_focus(prefswindow->tree_view);
 
-       gtkut_button_set_create(&prefswindow->confirm_area,
-                               &prefswindow->ok_btn,           _("OK"),
-                               &prefswindow->cancel_btn,       _("Cancel"),
-                               &prefswindow->apply_btn,        _("Apply"));
+       gtkut_button_set_create_stock(&prefswindow->confirm_area,
+                                     &prefswindow->ok_btn,     GTK_STOCK_OK,
+                                     &prefswindow->cancel_btn, GTK_STOCK_CANCEL,
+                                     &prefswindow->apply_btn,  GTK_STOCK_APPLY);
 
        gtk_widget_show_all(prefswindow->confirm_area);
 
index b6bc4186be8598c453a1bf2e6e23c03644c185d4..632f246182e51ddac97a354926e70f6ad80d57b1 100644 (file)
@@ -190,22 +190,23 @@ static void import_create(void)
        gtk_table_attach(GTK_TABLE(table), dest_entry, 1, 2, 1, 2,
                         GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       file_button = gtk_button_new_with_label(_(" Select... "));
+       file_button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
        gtk_table_attach(GTK_TABLE(table), file_button, 2, 3, 0, 1,
                         0, 0, 0, 0);
        g_signal_connect(G_OBJECT(file_button), "clicked",
                         G_CALLBACK(import_filesel_cb), NULL);
 
-       dest_button = gtk_button_new_with_label(_(" Select... "));
+       /* XXX GTK 2.6: GTK_STOCK_DIRECTORY */
+       dest_button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
        gtk_table_attach(GTK_TABLE(table), dest_button, 2, 3, 1, 2,
                         0, 0, 0, 0);
        g_signal_connect(G_OBJECT(dest_button), "clicked",
                         G_CALLBACK(import_destsel_cb), NULL);
 
-       gtkut_button_set_create(&confirm_area,
-                               &ok_button,     _("OK"),
-                               &cancel_button, _("Cancel"),
-                               NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area,
+                                     &ok_button,     GTK_STOCK_OK,
+                                     &cancel_button, GTK_STOCK_CANCEL,
+                                     NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(ok_button);
 
index d5f0808c1e12166a9700a6e69bf362043b79c7e0..6d1040117195a2a20d7210ba7e7e6c73364821f2 100644 (file)
@@ -130,10 +130,10 @@ static void message_search_create(MessageView *messageview)
        gtk_box_pack_start (GTK_BOX (checkbtn_hbox), backward_checkbtn,
                            FALSE, FALSE, 0);
 
-       gtkut_button_set_create(&confirm_area,
-                               &search_btn, _("Search"),
-                               &clear_btn,  _("Clear"),
-                               &close_btn,  _("Close"));
+       gtkut_button_set_create_stock(&confirm_area,
+                                     &search_btn, GTK_STOCK_FIND,
+                                     &clear_btn,  GTK_STOCK_CLEAR,
+                                     &close_btn,  GTK_STOCK_CLOSE);
        gtk_widget_show (confirm_area);
        gtk_box_pack_start (GTK_BOX (vbox1), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(search_btn);
index bbfad0f4d3cc688731ca384d38060ea671f9e21b..f0fb6ecd0f963989dd2f458ba02a99b50206526a 100644 (file)
@@ -174,8 +174,8 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_widget_show(vbox);
        gtk_container_add(GTK_CONTAINER(window), vbox);
 
-       gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
-                               &cancel_btn, _("Cancel"), NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
+                                     &cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
        gtk_widget_show(confirm_area);
        gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(ok_btn);
@@ -280,13 +280,13 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_widget_show(btn_vbox);
        gtk_box_pack_start(GTK_BOX(cond_hbox), btn_vbox, FALSE, FALSE, 0);
 
-       up_btn = gtk_button_new_with_label(_("Up"));
+       up_btn = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
        gtk_widget_show(up_btn);
        gtk_box_pack_start(GTK_BOX(btn_vbox), up_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(up_btn), "clicked",
                         G_CALLBACK(prefs_actions_up), NULL);
 
-       down_btn = gtk_button_new_with_label(_("Down"));
+       down_btn = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
        gtk_widget_show(down_btn);
        gtk_box_pack_start(GTK_BOX(btn_vbox), down_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT(down_btn), "clicked",
index d5364e359697d839064fd09de3d36994f60bb16f..ad2be7d2b7bbb42edf1701e62ab8f8d9e29fba6a 100644 (file)
@@ -2515,8 +2515,8 @@ static void prefs_keybind_select(void)
        hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
 
-       gtkut_button_set_create (&confirm_area, &ok_btn, _("OK"),
-                                &cancel_btn, _("Cancel"), NULL, NULL);
+       gtkut_button_set_create_stock (&confirm_area, &ok_btn, GTK_STOCK_OK,
+                                      &cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
        gtk_box_pack_end (GTK_BOX (hbox1), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default (ok_btn);
 
index 91fff8cb356c2fd71ad739c1195aa2d85925d9c7..cd81a48bb91e3fecf88f4c6b844a40be0e8fe8f8 100644 (file)
@@ -168,8 +168,8 @@ static void prefs_custom_header_create(void)
        gtk_widget_show (vbox);
        gtk_container_add (GTK_CONTAINER (window), vbox);
 
-       gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
-                               &cancel_btn, _("Cancel"), NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
+                                     &cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
        gtk_widget_show (confirm_area);
        gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default (ok_btn);
@@ -245,14 +245,14 @@ static void prefs_custom_header_create(void)
        gtk_widget_show (btn_hbox);
        gtk_box_pack_start (GTK_BOX (reg_hbox), btn_hbox, FALSE, FALSE, 0);
 
-       add_btn = gtk_button_new_with_label (_("Add"));
+       add_btn = gtk_button_new_from_stock (GTK_STOCK_ADD);
        gtk_widget_show (add_btn);
        gtk_box_pack_start (GTK_BOX (btn_hbox), add_btn, FALSE, TRUE, 0);
        g_signal_connect (G_OBJECT (add_btn), "clicked",
                          G_CALLBACK (prefs_custom_header_add_cb),
                          NULL);
 
-       del_btn = gtk_button_new_with_label (_(" Delete "));
+       del_btn = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
        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",
@@ -280,13 +280,13 @@ static void prefs_custom_header_create(void)
        gtk_widget_show (btn_vbox);
        gtk_box_pack_start (GTK_BOX (ch_hbox), btn_vbox, FALSE, FALSE, 0);
 
-       up_btn = gtk_button_new_with_label (_("Up"));
+       up_btn = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
        gtk_widget_show (up_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), up_btn, FALSE, FALSE, 0);
        g_signal_connect (G_OBJECT (up_btn), "clicked",
                          G_CALLBACK (prefs_custom_header_up), NULL);
 
-       down_btn = gtk_button_new_with_label (_("Down"));
+       down_btn = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
        gtk_widget_show (down_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), down_btn, FALSE, FALSE, 0);
        g_signal_connect (G_OBJECT (down_btn), "clicked",
index d8602954cbb4d078e74060663c5172d4e49806c0..9a5c10c6603509ff8cbf6643db45d966fc56bd2d 100644 (file)
@@ -217,8 +217,8 @@ static void prefs_filtering_create(void)
        gtk_widget_show (vbox);
        gtk_container_add (GTK_CONTAINER (window), vbox);
 
-       gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
-                               &cancel_btn, _("Cancel"), NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
+                                     &cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
        gtk_widget_show (confirm_area);
        gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default (ok_btn);
@@ -338,7 +338,7 @@ static void prefs_filtering_create(void)
        gtk_widget_show (btn_vbox);
        gtk_box_pack_start (GTK_BOX (cond_hbox), btn_vbox, FALSE, FALSE, 0);
 
-       top_btn = gtk_button_new_with_label (_("Top"));
+       top_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_TOP);
        gtk_widget_show (top_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), top_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (top_btn), "clicked",
@@ -346,13 +346,13 @@ static void prefs_filtering_create(void)
 
        PACK_VSPACER (btn_vbox, spc_vbox, VSPACING_NARROW_2);
 
-       up_btn = gtk_button_new_with_label (_("Up"));
+       up_btn = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
        gtk_widget_show (up_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), up_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (up_btn), "clicked",
                         G_CALLBACK(prefs_filtering_up), NULL);
 
-       down_btn = gtk_button_new_with_label (_("Down"));
+       down_btn = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
        gtk_widget_show (down_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), down_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (down_btn), "clicked",
@@ -360,7 +360,7 @@ static void prefs_filtering_create(void)
 
        PACK_VSPACER (btn_vbox, spc_vbox, VSPACING_NARROW_2);
 
-       bottom_btn = gtk_button_new_with_label (_("Bottom"));
+       bottom_btn = gtk_button_new_from_stock (GTK_STOCK_GOTO_BOTTOM);
        gtk_widget_show (bottom_btn);
        gtk_box_pack_start (GTK_BOX (btn_vbox), bottom_btn, FALSE, FALSE, 0);
        g_signal_connect(G_OBJECT (bottom_btn), "clicked",
index 5a4c6bb9dc5bd4ab4920a3a01e709f2b56e26a1f..f2f4a4baf74845675e51ed2c09ed2376b04babe9 100644 (file)
@@ -313,11 +313,11 @@ static void prefs_summary_column_create(void)
        gtk_widget_show(btn_vbox1);
        gtk_box_pack_start(GTK_BOX(btn_vbox), btn_vbox1, TRUE, FALSE, 0);
 
-       up_btn = gtk_button_new_with_label(_("Up"));
+       up_btn = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
        gtk_widget_show(up_btn);
        gtk_box_pack_start(GTK_BOX(btn_vbox1), up_btn, FALSE, FALSE, 0);
 
-       down_btn = gtk_button_new_with_label(_("Down"));
+       down_btn = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
        gtk_widget_show(down_btn);
        gtk_box_pack_start(GTK_BOX(btn_vbox1), down_btn, FALSE, FALSE, 0);
 
@@ -341,8 +341,8 @@ static void prefs_summary_column_create(void)
                         G_CALLBACK(prefs_summary_column_set_to_default),
                         NULL);
 
-       gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
-                               &cancel_btn, _("Cancel"), NULL, NULL);
+       gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
+                                     &cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
        gtk_widget_show(confirm_area);
        gtk_box_pack_end(GTK_BOX(btn_hbox), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(ok_btn);
index 875ac0b8949f7b5cda122266c4c077e8a0909c05..4d756d0ef80d826c11109a00ab4a596a854c51ce 100644 (file)
@@ -219,10 +219,10 @@ static void summary_search_create(SummaryView *summaryview)
        g_signal_connect(G_OBJECT(all_checkbtn), "clicked",
                         G_CALLBACK(all_clicked), summaryview);
 
-       gtkut_button_set_create(&confirm_area,
-                               &search_btn, _("Search"),
-                               &clear_btn,  _("Clear"),
-                               &close_btn,  _("Close"));
+       gtkut_button_set_create_stock(&confirm_area,
+                                     &search_btn, GTK_STOCK_FIND,
+                                     &clear_btn,  GTK_STOCK_CLEAR,
+                                     &close_btn,  GTK_STOCK_CLOSE);
        gtk_widget_show (confirm_area);
        gtk_box_pack_start (GTK_BOX (vbox1), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default(search_btn);