aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-23 18:01:05 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-23 18:01:05 +0000
commit90999c9a9932fe8d8f1bed21d7799db84f310076 (patch)
tree79e48eeacd4427fe31f4226e7584f9ed16fb292a
parent68457eb396400cc621286817298e3912e08361b1 (diff)
use GTK stock button for dialog button set.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@30 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog20
-rw-r--r--ChangeLog.ja20
-rw-r--r--src/about.c8
-rw-r--r--src/account.c4
-rw-r--r--src/alertpanel.c12
-rw-r--r--src/alertpanel.h3
-rw-r--r--src/compose.c5
-rw-r--r--src/foldersel.c8
-rw-r--r--src/gtkutils.c34
-rw-r--r--src/gtkutils.h11
-rw-r--r--src/inc.c4
-rw-r--r--src/inputdialog.c8
-rw-r--r--src/main.c8
-rw-r--r--src/mainwindow.c9
-rw-r--r--src/prefs.c8
-rw-r--r--src/prefs_actions.c7
-rw-r--r--src/prefs_common.c17
-rw-r--r--src/prefs_filter.c5
-rw-r--r--src/prefs_template.c6
-rw-r--r--src/progressdialog.c8
-rw-r--r--src/progressdialog.h2
-rw-r--r--src/summaryview.c24
22 files changed, 161 insertions, 70 deletions
diff --git a/ChangeLog b/ChangeLog
index 584b42b1..00389363 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2005-01-24
+
+ * src/compose.c
+ src/inc.c
+ src/prefs_actions.c
+ src/prefs.c
+ src/progressdialog.c
+ src/account.c
+ src/prefs_template.c
+ src/foldersel.c
+ src/main.c
+ src/alertpanel.c
+ src/inputdialog.c
+ src/prefs_common.c
+ src/summaryview.c
+ src/about.c
+ src/mainwindow.c
+ src/prefs_filter.c: use GTK stock button for button set.
+ * src/gtkutils.[ch]: gtkut_stock_button_set_create(): added.
+
2005-01-21
* src/gtkshruler.c: use PangoLayout instead of GdkFont (thanks to
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 3e2c1295..cb02661d 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,23 @@
+2005-01-24
+
+ * src/compose.c
+ src/inc.c
+ src/prefs_actions.c
+ src/prefs.c
+ src/progressdialog.c
+ src/account.c
+ src/prefs_template.c
+ src/foldersel.c
+ src/main.c
+ src/alertpanel.c
+ src/inputdialog.c
+ src/prefs_common.c
+ src/summaryview.c
+ src/about.c
+ src/mainwindow.c
+ src/prefs_filter.c: ボタンセットに GTK のストックボタンを使用。
+ * src/gtkutils.[ch]: gtkut_stock_button_set_create(): 追加。
+
2005-01-21
* src/gtkshruler.c: GdkFont でなく PangoLayout を使用するようにした
diff --git a/src/about.c b/src/about.c
index 12b158be..ae98b38f 100644
--- a/src/about.c
+++ b/src/about.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -166,7 +166,7 @@ static void about_create(void)
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
label = gtk_label_new
- ("Copyright (C) 1999-2004 Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>");
+ ("Copyright (C) 1999-2005 Hiroyuki Yamamoto <hiro-y@kcn.ne.jp>");
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
@@ -235,8 +235,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_stock_button_set_create(&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
diff --git a/src/account.c b/src/account.c
index 582b5d2d..15a5dda4 100644
--- a/src/account.c
+++ b/src/account.c
@@ -710,8 +710,8 @@ 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);
+ gtkut_stock_button_set_create(&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);
diff --git a/src/alertpanel.c b/src/alertpanel.c
index c1f13c8b..4370a715 100644
--- a/src/alertpanel.c
+++ b/src/alertpanel.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -283,16 +283,16 @@ static void alertpanel_create(const gchar *title,
/* for button(s) */
if (!button1_label)
- button1_label = _("OK");
+ button1_label = GTK_STOCK_OK;
label2 = button2_label;
label3 = button3_label;
if (label2 && *label2 == '+') label2++;
if (label3 && *label3 == '+') label3++;
- gtkut_button_set_create(&confirm_area,
- &button1, button1_label,
- button2_label ? &button2 : NULL, label2,
- button3_label ? &button3 : NULL, label3);
+ gtkut_stock_button_set_create(&confirm_area,
+ &button1, button1_label,
+ button2_label ? &button2 : NULL, label2,
+ button3_label ? &button3 : NULL, label3);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(button1);
diff --git a/src/alertpanel.h b/src/alertpanel.h
index 8b0d4e1b..7492cead 100644
--- a/src/alertpanel.h
+++ b/src/alertpanel.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@
#define __ALERTPANEL_H__
#include <glib.h>
-#include <gtk/gtkwindow.h>
typedef enum
{
diff --git a/src/compose.c b/src/compose.c
index 7520acf9..668891eb 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -4826,8 +4826,9 @@ static void compose_attach_property_create(gboolean *cancelled)
SET_LABEL_AND_ENTRY(_("Path"), path_entry, 2);
SET_LABEL_AND_ENTRY(_("File name"), filename_entry, 3);
- gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
- &cancel_btn, _("Cancel"), NULL, NULL);
+ gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
+ &cancel_btn, GTK_STOCK_CANCEL,
+ NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
diff --git a/src/foldersel.c b/src/foldersel.c
index 7ca6afbf..7a11ac8f 100644
--- a/src/foldersel.c
+++ b/src/foldersel.c
@@ -202,10 +202,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"),
- &new_button, _("New folder"));
+ gtkut_stock_button_set_create(&confirm_area,
+ &ok_button, GTK_STOCK_OK,
+ &cancel_button, GTK_STOCK_CANCEL,
+ &new_button, GTK_STOCK_NEW);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_button);
diff --git a/src/gtkutils.c b/src/gtkutils.c
index f19f5cdf..5c5fab44 100644
--- a/src/gtkutils.c
+++ b/src/gtkutils.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,6 +106,38 @@ void gtkut_button_set_create(GtkWidget **bbox,
}
}
+void gtkut_stock_button_set_create(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)
diff --git a/src/gtkutils.h b/src/gtkutils.h
index 23e7af51..0a4da843 100644
--- a/src/gtkutils.h
+++ b/src/gtkutils.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -97,6 +97,14 @@ void gtkut_button_set_create (GtkWidget **bbox,
GtkWidget **button3,
const gchar *label3);
+void gtkut_stock_button_set_create (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,
gint n_entries,
@@ -159,7 +167,6 @@ void gtkut_window_popup (GtkWidget *window);
void gtkut_widget_get_uposition (GtkWidget *widget,
gint *px,
gint *py);
-//void gtkut_widget_disable_theme_engine (GtkWidget *widget);
void gtkut_widget_wait_for_draw (GtkWidget *widget);
void gtkut_widget_init (void);
diff --git a/src/inc.c b/src/inc.c
index d8ab5132..a8373999 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -637,8 +637,8 @@ static gint inc_start(IncProgressDialog *inc_dialog)
else {
gtk_window_set_title(GTK_WINDOW(inc_dialog->dialog->window),
fin_msg);
- gtk_label_set_text(GTK_LABEL(GTK_BIN(inc_dialog->dialog->cancel_btn)->child),
- _("Close"));
+ gtk_button_set_label(GTK_BUTTON(inc_dialog->dialog->cancel_btn),
+ GTK_STOCK_CLOSE);
}
g_free(fin_msg);
diff --git a/src/inputdialog.c b/src/inputdialog.c
index 6e5473c4..bd8b285e 100644
--- a/src/inputdialog.c
+++ b/src/inputdialog.c
@@ -200,10 +200,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_stock_button_set_create(&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);
diff --git a/src/main.c b/src/main.c
index 65a755a4..b48f0c6b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -445,7 +445,8 @@ void app_will_exit(GtkWidget *widget, gpointer data)
if (compose_get_compose_list()) {
if (alertpanel(_("Notice"),
_("Composing message exists. Really quit?"),
- _("OK"), _("Cancel"), NULL) != G_ALERTDEFAULT)
+ GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
+ != G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}
@@ -453,7 +454,8 @@ void app_will_exit(GtkWidget *widget, gpointer data)
if (prefs_common.warn_queued_on_exit && get_queued_message_num() > 0) {
if (alertpanel(_("Queued messages"),
_("Some unsent messages are queued. Exit now?"),
- _("OK"), _("Cancel"), NULL) != G_ALERTDEFAULT)
+ GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
+ != G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}
@@ -695,7 +697,7 @@ static void migrate_old_config(void)
if (alertpanel(_("Migration of configuration"),
_("The previous version of configuration found.\n"
"Do you want to migrate it?"),
- _("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
return;
debug_print("Migrating old configuration...\n");
diff --git a/src/mainwindow.c b/src/mainwindow.c
index e01cfc9e..9d0b0c05 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1472,7 +1472,8 @@ gboolean main_window_toggle_online_if_offline(MainWindow *mainwin)
if (!prefs_common.online_mode) {
if (alertpanel(_("Offline"),
_("You are offline. Go online?"),
- _("Yes"), _("No"), NULL) == G_ALERTDEFAULT)
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL)
+ == G_ALERTDEFAULT)
main_window_toggle_online(mainwin, TRUE);
}
@@ -1486,7 +1487,8 @@ void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
if (confirm) {
if (alertpanel(_("Empty all trash"),
_("Empty messages in all trash?"),
- _("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL)
+ != G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}
@@ -2607,7 +2609,8 @@ static void app_exit_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
{
if (prefs_common.confirm_on_exit) {
if (alertpanel(_("Exit"), _("Exit this program?"),
- _("OK"), _("Cancel"), NULL) != G_ALERTDEFAULT)
+ GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
+ != G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}
diff --git a/src/prefs.c b/src/prefs.c
index 07bf5d97..230bf2a0 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -497,10 +497,10 @@ void prefs_dialog_create(PrefsDialog *dialog)
/* GTK_WIDGET_UNSET_FLAGS (notebook, GTK_CAN_FOCUS); */
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
- gtkut_button_set_create(&confirm_area,
- &ok_btn, _("OK"),
- &cancel_btn, _("Cancel"),
- &apply_btn, _("Apply"));
+ gtkut_stock_button_set_create(&confirm_area,
+ &ok_btn, GTK_STOCK_OK,
+ &cancel_btn, GTK_STOCK_CANCEL,
+ &apply_btn, GTK_STOCK_APPLY);
gtk_widget_show(confirm_area);
gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
diff --git a/src/prefs_actions.c b/src/prefs_actions.c
index 22e7c4e2..ce252695 100644
--- a/src/prefs_actions.c
+++ b/src/prefs_actions.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto & The Sylpheed Claws Team
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto & The Sylpheed Claws Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -159,8 +159,9 @@ 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_stock_button_set_create(&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);
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 86476bc6..bfe6a8d0 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -2478,8 +2478,8 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
gtk_label_set_justify(GTK_LABEL(label3), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5);
- gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
- &cancel_btn, _("Cancel"), NULL, NULL);
+ gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
+ &cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_box_pack_start(GTK_BOX(vbox1), confirm_area, FALSE, FALSE, 0);
gtk_widget_show(confirm_area);
@@ -2614,8 +2614,8 @@ static void prefs_quote_colors_dialog_create(void)
PACK_CHECK_BUTTON (vbox, recycle_colors_btn,
_("Recycle quote colors"));
- gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
- NULL, NULL, NULL, NULL);
+ gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
+ NULL, NULL, NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
@@ -2907,8 +2907,8 @@ static void prefs_quote_description_create(void)
#undef PACK_LABEL
- gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
- NULL, NULL, NULL, NULL);
+ gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
+ NULL, NULL, NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
@@ -3037,8 +3037,9 @@ 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_stock_button_set_create (&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);
diff --git a/src/prefs_filter.c b/src/prefs_filter.c
index 36c820c4..d1b26532 100644
--- a/src/prefs_filter.c
+++ b/src/prefs_filter.c
@@ -179,8 +179,9 @@ static void prefs_filter_create(void)
gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(window), vbox);
- gtkut_button_set_create(&confirm_area, &close_btn, _("Close"),
- NULL, NULL, NULL, NULL);
+ gtkut_stock_button_set_create(&confirm_area,
+ &close_btn, GTK_STOCK_CLOSE,
+ NULL, NULL, NULL, NULL);
gtk_widget_show(confirm_area);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(close_btn);
diff --git a/src/prefs_template.c b/src/prefs_template.c
index 024378de..a1e0ccbf 100644
--- a/src/prefs_template.c
+++ b/src/prefs_template.c
@@ -1,7 +1,7 @@
/*
* Sylpheed templates subsystem
* Copyright (C) 2001 Alexander Barinov
- * Copyright (C) 2001-2004 Hiroyuki Yamamoto
+ * Copyright (C) 2001-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -258,8 +258,8 @@ static void prefs_template_window_create(void)
G_CALLBACK (prefs_template_select_cb), NULL);
/* ok | cancel */
- gtkut_button_set_create(&confirm_area, &ok_btn, _("OK"),
- &cancel_btn, _("Cancel"), NULL, NULL);
+ gtkut_stock_button_set_create(&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(vbox2), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
diff --git a/src/progressdialog.c b/src/progressdialog.c
index 31295372..b7a21e1b 100644
--- a/src/progressdialog.c
+++ b/src/progressdialog.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
#include <gtk/gtkprogressbar.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkbutton.h>
+#include <gtk/gtkstock.h>
#include "intl.h"
#include "progressdialog.h"
@@ -74,8 +75,9 @@ ProgressDialog *progress_dialog_create(void)
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 8);
gtk_widget_show(label);
- gtkut_button_set_create(&cancel_area, &cancel_btn, _("Cancel"),
- NULL, NULL, NULL, NULL);
+ gtkut_stock_button_set_create
+ (&cancel_area, &cancel_btn, GTK_STOCK_CANCEL,
+ NULL, NULL, NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), cancel_area, FALSE, FALSE, 0);
gtk_widget_grab_default(cancel_btn);
gtk_widget_show_all(cancel_area);
diff --git a/src/progressdialog.h b/src/progressdialog.h
index 047524ef..26887a26 100644
--- a/src/progressdialog.h
+++ b/src/progressdialog.h
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/summaryview.c b/src/summaryview.c
index fb006d83..a67a3496 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -595,7 +595,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item,
val = alertpanel(_("Process mark"),
_("Some marks are left. Process it?"),
- _("Yes"), _("No"), _("Cancel"));
+ GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_CANCEL);
if (G_ALERTDEFAULT == val) {
summary_unlock(summaryview);
summary_execute(summaryview);
@@ -936,7 +936,7 @@ void summary_select_prev_unread(SummaryView *summaryview)
val = alertpanel(_("No more unread messages"),
_("No unread message found. "
"Search from the end?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_UNREAD, FALSE);
@@ -960,7 +960,8 @@ void summary_select_next_unread(SummaryView *summaryview)
val = alertpanel(_("No more unread messages"),
_("No unread message found. "
"Go to next folder?"),
- _("Yes"), _("Search again"), _("No"));
+ GTK_STOCK_YES, _("Search again"),
+ GTK_STOCK_NO);
if (val == G_ALERTDEFAULT) {
#if 0
if (gtk_signal_n_emissions_by_name
@@ -994,7 +995,7 @@ void summary_select_prev_new(SummaryView *summaryview)
val = alertpanel(_("No more new messages"),
_("No new message found. "
"Search from the end?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_NEW, FALSE);
@@ -1018,7 +1019,8 @@ void summary_select_next_new(SummaryView *summaryview)
val = alertpanel(_("No more new messages"),
_("No new message found. "
"Go to next folder?"),
- _("Yes"), _("Search again"), _("No"));
+ GTK_STOCK_YES, _("Search again"),
+ GTK_STOCK_NO);
if (val == G_ALERTDEFAULT) {
#if 0
if (gtk_signal_n_emissions_by_name
@@ -1052,7 +1054,7 @@ void summary_select_prev_marked(SummaryView *summaryview)
val = alertpanel(_("No more marked messages"),
_("No marked message found. "
"Search from the end?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_MARKED, TRUE);
@@ -1077,7 +1079,7 @@ void summary_select_next_marked(SummaryView *summaryview)
val = alertpanel(_("No more marked messages"),
_("No marked message found. "
"Search from the beginning?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_next_flagged_msg(summaryview, NULL,
MSG_MARKED, TRUE);
@@ -1102,7 +1104,7 @@ void summary_select_prev_labeled(SummaryView *summaryview)
val = alertpanel(_("No more labeled messages"),
_("No labeled message found. "
"Search from the end?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_CLABEL_FLAG_MASK, TRUE);
@@ -1127,7 +1129,7 @@ void summary_select_next_labeled(SummaryView *summaryview)
val = alertpanel(_("No more labeled messages"),
_("No labeled message found. "
"Search from the beginning?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_next_flagged_msg(summaryview, NULL,
MSG_CLABEL_FLAG_MASK, TRUE);
@@ -2409,7 +2411,7 @@ void summary_delete(SummaryView *summaryview)
aval = alertpanel(_("Delete message(s)"),
_("Do you really want to delete message(s) from the trash?"),
- _("Yes"), _("No"), NULL);
+ GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (aval != G_ALERTDEFAULT) return;
}
@@ -2731,7 +2733,7 @@ void summary_save_as(SummaryView *summaryview)
aval = alertpanel(_("Overwrite"),
_("Overwrite existing file?"),
- _("OK"), _("Cancel"), NULL);
+ GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL);
if (G_ALERTDEFAULT != aval) return;
}