diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-31 08:36:46 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-31 08:36:46 +0000 |
commit | f21da65fd163dc94e5440fbf21ba97c7825df39e (patch) | |
tree | 91936b30ae750b153e925d13647a6696a3b0cf02 /src | |
parent | f319e36f2e97904017924de7a5281d2cae4b2900 (diff) |
added the option 'Text at the right of icon' for the toolbar.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1516 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/compose.c | 21 | ||||
-rw-r--r-- | src/mainwindow.c | 43 | ||||
-rw-r--r-- | src/prefs_toolbar.h | 1 |
3 files changed, 39 insertions, 26 deletions
diff --git a/src/compose.c b/src/compose.c index 5eefede0..9fb15715 100644 --- a/src/compose.c +++ b/src/compose.c @@ -4855,23 +4855,23 @@ static void compose_connect_changed_callbacks(Compose *compose) static PrefsToolbarItem items[] = { {T_SEND, N_("Send message"), - STOCK_PIXMAP_MAIL_SEND, NULL, toolbar_send_cb}, + STOCK_PIXMAP_MAIL_SEND, NULL, TRUE, toolbar_send_cb}, {T_SEND_LATER, N_("Put into queue folder and send later"), - STOCK_PIXMAP_MAIL_SEND_QUEUE, NULL, toolbar_send_later_cb}, + STOCK_PIXMAP_MAIL_SEND_QUEUE, NULL, TRUE, toolbar_send_later_cb}, {T_DRAFT, N_("Save to draft folder"), - STOCK_PIXMAP_MAIL, NULL, toolbar_draft_cb}, + STOCK_PIXMAP_MAIL, NULL, TRUE, toolbar_draft_cb}, {T_INSERT_FILE, N_("Insert file"), - STOCK_PIXMAP_INSERT_FILE, NULL, toolbar_insert_cb}, + STOCK_PIXMAP_INSERT_FILE, NULL, FALSE, toolbar_insert_cb}, {T_ATTACH_FILE, N_("Attach file"), - STOCK_PIXMAP_MAIL_ATTACH, NULL, toolbar_attach_cb}, + STOCK_PIXMAP_MAIL_ATTACH, NULL, FALSE, toolbar_attach_cb}, {T_SIGNATURE, N_("Append signature"), - STOCK_PIXMAP_SIGN, NULL, toolbar_sig_cb}, + STOCK_PIXMAP_SIGN, NULL, FALSE, toolbar_sig_cb}, {T_EDITOR, N_("Edit with external editor"), - STOCK_PIXMAP_MAIL_COMPOSE, NULL, toolbar_ext_editor_cb}, + STOCK_PIXMAP_MAIL_COMPOSE, NULL, FALSE, toolbar_ext_editor_cb}, {T_LINEWRAP, N_("Wrap all long lines"), - STOCK_PIXMAP_LINEWRAP, NULL, toolbar_linewrap_cb}, + STOCK_PIXMAP_LINEWRAP, NULL, FALSE, toolbar_linewrap_cb}, {T_ADDRESS_BOOK, N_("Address book"), - STOCK_PIXMAP_ADDRESS_BOOK, NULL, toolbar_address_cb}, + STOCK_PIXMAP_ADDRESS_BOOK, NULL, FALSE, toolbar_address_cb}, {-1, NULL, -1, NULL, NULL} }; @@ -4957,6 +4957,7 @@ static GtkWidget *compose_toolbar_create_from_list(Compose *compose, &width, NULL); gtk_tool_item_set_homogeneous (toolitem, width < 52 ? TRUE : FALSE); + gtk_tool_item_set_is_important(toolitem, item->is_important); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1); @@ -4986,6 +4987,8 @@ static void compose_set_toolbar_button_visibility(Compose *compose) style = GTK_TOOLBAR_TEXT; else if (prefs_common.toolbar_style == TOOLBAR_BOTH) style = GTK_TOOLBAR_BOTH; + else if (prefs_common.toolbar_style == TOOLBAR_BOTH_HORIZ) + style = GTK_TOOLBAR_BOTH_HORIZ; if (style != -1) { gtk_toolbar_set_style(GTK_TOOLBAR(compose->toolbar), style); diff --git a/src/mainwindow.c b/src/mainwindow.c index 61a0e581..b4a073e9 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -563,6 +563,8 @@ static GtkItemFactoryEntry mainwin_entries[] = NULL, NULL, 0, "<Branch>"}, {N_("/_View/Show or hi_de/_Toolbar/Icon _and text"), NULL, toggle_toolbar_cb, TOOLBAR_BOTH, "<RadioItem>"}, + {N_("/_View/Show or hi_de/_Toolbar/Text at the _right of icon"), + NULL, toggle_toolbar_cb, TOOLBAR_BOTH_HORIZ, "/View/Show or hide/Toolbar/Icon and text"}, {N_("/_View/Show or hi_de/_Toolbar/_Icon"), NULL, toggle_toolbar_cb, TOOLBAR_ICON, "/View/Show or hide/Toolbar/Icon and text"}, {N_("/_View/Show or hi_de/_Toolbar/_Text"), @@ -1107,6 +1109,10 @@ MainWindow *main_window_create(SeparateType type) menuitem = gtk_item_factory_get_item (ifactory, "/View/Show or hide/Toolbar/Icon and text"); break; + case TOOLBAR_BOTH_HORIZ: + menuitem = gtk_item_factory_get_item + (ifactory, "/View/Show or hide/Toolbar/Text at the right of icon"); + break; } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE); @@ -1930,6 +1936,8 @@ static void main_window_set_toolbar_button_visibility(MainWindow *mainwin) style = GTK_TOOLBAR_TEXT; else if (prefs_common.toolbar_style == TOOLBAR_BOTH) style = GTK_TOOLBAR_BOTH; + else if (prefs_common.toolbar_style == TOOLBAR_BOTH_HORIZ) + style = GTK_TOOLBAR_BOTH_HORIZ; if (style != -1) { gtk_toolbar_set_style(GTK_TOOLBAR(mainwin->toolbar), style); @@ -2382,39 +2390,39 @@ static GtkItemFactoryEntry forward_entries[] = static PrefsToolbarItem items[] = { {T_GET, N_("Incorporate new mail"), - STOCK_PIXMAP_MAIL_RECEIVE, NULL, toolbar_inc_cb}, + STOCK_PIXMAP_MAIL_RECEIVE, NULL, TRUE, toolbar_inc_cb}, {T_GET_ALL, N_("Incorporate new mail of all accounts"), - STOCK_PIXMAP_MAIL_RECEIVE_ALL, NULL, toolbar_inc_all_cb}, + STOCK_PIXMAP_MAIL_RECEIVE_ALL, NULL, TRUE, toolbar_inc_all_cb}, {T_SEND_QUEUE, N_("Send queued message(s)"), - STOCK_PIXMAP_MAIL_SEND, NULL, toolbar_send_cb}, + STOCK_PIXMAP_MAIL_SEND, NULL, TRUE, toolbar_send_cb}, {T_COMPOSE, N_("Compose new message"), - STOCK_PIXMAP_MAIL_COMPOSE, NULL, toolbar_compose_cb}, + STOCK_PIXMAP_MAIL_COMPOSE, NULL, TRUE, toolbar_compose_cb}, {T_REPLY, N_("Reply to the message"), - STOCK_PIXMAP_MAIL_REPLY, NULL, toolbar_reply_cb}, + STOCK_PIXMAP_MAIL_REPLY, NULL, TRUE, toolbar_reply_cb}, {T_REPLY_ALL, N_("Reply to all"), - STOCK_PIXMAP_MAIL_REPLY_TO_ALL, NULL, toolbar_reply_to_all_cb}, + STOCK_PIXMAP_MAIL_REPLY_TO_ALL, NULL, TRUE, toolbar_reply_to_all_cb}, {T_FORWARD, N_("Forward the message"), - STOCK_PIXMAP_MAIL_FORWARD, NULL, toolbar_forward_cb}, + STOCK_PIXMAP_MAIL_FORWARD, NULL, TRUE, toolbar_forward_cb}, {T_DELETE, N_("Delete the message"), - STOCK_PIXMAP_DELETE, NULL, toolbar_delete_cb}, + STOCK_PIXMAP_DELETE, NULL, FALSE, toolbar_delete_cb}, {T_JUNK, N_("Set as junk mail"), - STOCK_PIXMAP_SPAM, NULL, toolbar_junk_cb}, + STOCK_PIXMAP_SPAM, NULL, TRUE, toolbar_junk_cb}, {T_EXECUTE, N_("Execute marked process"), - -1, GTK_STOCK_EXECUTE, toolbar_exec_cb}, + -1, GTK_STOCK_EXECUTE, FALSE, toolbar_exec_cb}, {T_NEXT, N_("Next unread message"), - -1, GTK_STOCK_GO_DOWN, toolbar_next_unread_cb}, + -1, GTK_STOCK_GO_DOWN, FALSE, toolbar_next_unread_cb}, {T_PREV, N_("Previous unread message"), - -1, GTK_STOCK_GO_UP, toolbar_prev_unread_cb}, + -1, GTK_STOCK_GO_UP, FALSE, toolbar_prev_unread_cb}, {T_ADDRESS_BOOK, N_("Address book"), - STOCK_PIXMAP_ADDRESS_BOOK, NULL, toolbar_address_cb}, + STOCK_PIXMAP_ADDRESS_BOOK, NULL, FALSE, toolbar_address_cb}, {T_PRINT, N_("Print message"), - -1, GTK_STOCK_PRINT, toolbar_print_cb}, + -1, GTK_STOCK_PRINT, FALSE, toolbar_print_cb}, {T_COMMON_PREFS, N_("Common preferences"), - -1, GTK_STOCK_PREFERENCES, toolbar_prefs_common_cb}, + -1, GTK_STOCK_PREFERENCES, FALSE, toolbar_prefs_common_cb}, {T_ACCOUNT_PREFS, N_("Account preferences"), - -1, GTK_STOCK_PREFERENCES, toolbar_prefs_account_cb}, + -1, GTK_STOCK_PREFERENCES, FALSE, toolbar_prefs_account_cb}, - {-1, NULL, -1, NULL, NULL} + {-1, NULL, -1, NULL, FALSE, NULL} }; static GtkWidget *main_window_toolbar_create(MainWindow *mainwin) @@ -2510,6 +2518,7 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin, &width, NULL); gtk_tool_item_set_homogeneous (toolitem, width < 52 ? TRUE : FALSE); + gtk_tool_item_set_is_important(toolitem, item->is_important); gtk_toolbar_insert(GTK_TOOLBAR(toolbar), toolitem, -1); diff --git a/src/prefs_toolbar.h b/src/prefs_toolbar.h index 0f3fe6fb..50697276 100644 --- a/src/prefs_toolbar.h +++ b/src/prefs_toolbar.h @@ -73,6 +73,7 @@ struct _PrefsToolbarItem gchar *tooltip; StockPixmap icon; const gchar *stock_id; + gboolean is_important; void (*callback) (GtkWidget *widget, gpointer data); gpointer data; }; |