diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/mainwindow.c | 34 | ||||
-rw-r--r-- | src/mainwindow.h | 1 | ||||
-rw-r--r-- | src/prefs_toolbar.c | 4 | ||||
-rw-r--r-- | src/prefs_toolbar.h | 3 |
6 files changed, 40 insertions, 12 deletions
@@ -1,3 +1,8 @@ +2007-04-02 + + * src/prefs_toolbar.[ch] + src/mainwindow.[ch]: added Stop button to the toolbar. + 2007-03-30 * libsylph/utils.[ch]: scan_mailto_url(): added an argument for diff --git a/ChangeLog.ja b/ChangeLog.ja index e0aec6e4..82b07387 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2007-04-02 + + * src/prefs_toolbar.[ch] + src/mainwindow.[ch]: ツールバーに中止ボタンを追加。 + 2007-03-30 * libsylph/utils.[ch]: scan_mailto_url(): in-reply-to ヘッダの diff --git a/src/mainwindow.c b/src/mainwindow.c index 4f45fb77..32332e4f 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -166,6 +166,8 @@ static void toolbar_search_cb (GtkWidget *widget, gpointer data); static void toolbar_print_cb (GtkWidget *widget, gpointer data); +static void toolbar_stop_cb (GtkWidget *widget, + gpointer data); static void toolbar_prefs_common_cb (GtkWidget *widget, gpointer data); static void toolbar_prefs_account_cb (GtkWidget *widget, @@ -307,7 +309,7 @@ static void inc_mail_cb (MainWindow *mainwin, static void inc_all_account_mail_cb (MainWindow *mainwin, guint action, GtkWidget *widget); -static void inc_cancel_cb (MainWindow *mainwin, +static void inc_stop_cb (MainWindow *mainwin, guint action, GtkWidget *widget); @@ -750,8 +752,8 @@ static GtkItemFactoryEntry mainwin_entries[] = "<control>I", inc_mail_cb, 0, NULL}, {N_("/_Message/Recei_ve/Get from _all accounts"), "<shift><control>I", inc_all_account_mail_cb, 0, NULL}, - {N_("/_Message/Recei_ve/Cancel receivin_g"), - NULL, inc_cancel_cb, 0, NULL}, + {N_("/_Message/Recei_ve/Stop receivin_g"), + NULL, inc_stop_cb, 0, NULL}, {N_("/_Message/Recei_ve/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Message/_Send queued messages"), NULL, send_queue_cb, 0, NULL}, {N_("/_Message/---"), NULL, NULL, 0, "<Separator>"}, @@ -1895,7 +1897,7 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin) struct { GtkWidget *widget; SensitiveCond cond; - } entry[18]; + } entry[19]; #define SET_WIDGET_COND(w, c) \ { \ @@ -1929,6 +1931,7 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin) SET_WIDGET_COND(mainwin->next_btn, M_MSG_EXIST); SET_WIDGET_COND(mainwin->prev_btn, M_MSG_EXIST); SET_WIDGET_COND(mainwin->print_btn, M_TARGET_EXIST); + SET_WIDGET_COND(mainwin->stop_btn, M_INC_ACTIVE); SET_WIDGET_COND(mainwin->prefs_common_btn, M_UNLOCKED); SET_WIDGET_COND(mainwin->prefs_account_btn, M_HAVE_ACCOUNT|M_UNLOCKED); @@ -2045,7 +2048,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin) , M_HAVE_ACCOUNT|M_UNLOCKED}, {"/Message/Receive/Get from all accounts" , M_HAVE_ACCOUNT|M_UNLOCKED}, - {"/Message/Receive/Cancel receiving" + {"/Message/Receive/Stop receiving" , M_INC_ACTIVE}, {"/Message/Send queued messages" , M_HAVE_ACCOUNT|M_HAVE_QUEUED_MSG}, @@ -2429,6 +2432,7 @@ static PrefsToolbarItem items[] = {T_PREV, FALSE, toolbar_prev_unread_cb}, {T_SEARCH, FALSE, toolbar_search_cb}, {T_PRINT, FALSE, toolbar_print_cb}, + {T_STOP, FALSE, toolbar_stop_cb}, {T_ADDRESS_BOOK, FALSE, toolbar_address_cb}, {T_EXECUTE, FALSE, toolbar_exec_cb}, {T_COMMON_PREFS, FALSE, toolbar_prefs_common_cb}, @@ -2489,11 +2493,12 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin, items[11].data = &mainwin->prev_btn; items[12].data = &mainwin->search_btn; items[13].data = &mainwin->print_btn; - items[14].data = &mainwin->address_btn; - items[15].data = &mainwin->exec_btn; - items[16].data = &mainwin->prefs_common_btn; - items[17].data = &mainwin->prefs_account_btn; - for (i = 0; i <= 17; i++) + items[14].data = &mainwin->stop_btn; + items[15].data = &mainwin->address_btn; + items[16].data = &mainwin->exec_btn; + items[17].data = &mainwin->prefs_common_btn; + items[18].data = &mainwin->prefs_account_btn; + for (i = 0; i <= 18; i++) *(GtkWidget **)items[i].data = NULL; mainwin->reply_combo = NULL; mainwin->fwd_combo = NULL; @@ -2733,6 +2738,13 @@ static void toolbar_print_cb(GtkWidget *widget, gpointer data) print_cb(mainwin, 0, NULL); } +static void toolbar_stop_cb(GtkWidget *widget, gpointer data) +{ + MainWindow *mainwin = (MainWindow *)data; + + inc_stop_cb(mainwin, 0, NULL); +} + static void toolbar_prefs_common_cb(GtkWidget *widget, gpointer data) { MainWindow *mainwin = (MainWindow *)data; @@ -3256,7 +3268,7 @@ static void inc_all_account_mail_cb(MainWindow *mainwin, guint action, inc_all_account_mail(mainwin, FALSE); } -static void inc_cancel_cb(MainWindow *mainwin, guint action, GtkWidget *widget) +static void inc_stop_cb(MainWindow *mainwin, guint action, GtkWidget *widget) { inc_cancel_all(); } diff --git a/src/mainwindow.h b/src/mainwindow.h index b37efebc..9aaa08a3 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -94,6 +94,7 @@ struct _MainWindow GtkWidget *address_btn; GtkWidget *search_btn; GtkWidget *print_btn; + GtkWidget *stop_btn; GtkWidget *prefs_common_btn; GtkWidget *prefs_account_btn; diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c index 36ce59e9..12e5d3d8 100644 --- a/src/prefs_toolbar.c +++ b/src/prefs_toolbar.c @@ -78,6 +78,9 @@ static PrefsDisplayItem all_items[] = {T_PRINT, "print", N_("Print"), N_("Print message"), -1, GTK_STOCK_PRINT, FALSE, FALSE}, + {T_STOP, "stop", N_("Stop"), + N_("Stop receiving"), + -1, GTK_STOCK_STOP, FALSE, FALSE}, {T_ADDRESS_BOOK, "address-book", N_("Address"), N_("Address book"), STOCK_PIXMAP_ADDRESS_BOOK, NULL, FALSE, FALSE}, @@ -140,6 +143,7 @@ static gint main_available_items[] = T_PREV, T_SEARCH, T_PRINT, + T_STOP, T_ADDRESS_BOOK, T_EXECUTE, T_COMMON_PREFS, diff --git a/src/prefs_toolbar.h b/src/prefs_toolbar.h index cd122824..034df03b 100644 --- a/src/prefs_toolbar.h +++ b/src/prefs_toolbar.h @@ -52,8 +52,9 @@ typedef enum T_NEXT, T_PREV, T_ADDRESS_BOOK, - T_PRINT, T_SEARCH, + T_PRINT, + T_STOP, T_COMMON_PREFS, T_ACCOUNT_PREFS, |