diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-02-04 03:09:50 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-02-04 03:11:02 +0800 |
commit | 9a8f21c44bfe5d0efad1ae0ca1758c0d7c41f590 (patch) | |
tree | d80b7eccb92219ddba8bb69f3d48157e0c31b6c4 /composer | |
parent | f5c6386947043c620fbfd2a6848d025b50a50bed (diff) | |
download | gsoc2013-evolution-9a8f21c44bfe5d0efad1ae0ca1758c0d7c41f590.tar.gz gsoc2013-evolution-9a8f21c44bfe5d0efad1ae0ca1758c0d7c41f590.tar.zst gsoc2013-evolution-9a8f21c44bfe5d0efad1ae0ca1758c0d7c41f590.zip |
Composer: Add Edit -> Preferences
Opens the Preferences window to the Composer Preferences section.
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-composer-actions.c | 75 | ||||
-rw-r--r-- | composer/e-composer-private.h | 1 | ||||
-rw-r--r-- | composer/evolution-composer.ui | 4 |
3 files changed, 60 insertions, 20 deletions
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c index 1f1cb44a7c..bbd2aacfd0 100644 --- a/composer/e-composer-actions.c +++ b/composer/e-composer-actions.c @@ -61,6 +61,19 @@ action_close_cb (GtkAction *action, } static void +action_new_message_cb (GtkAction *action, + EMsgComposer *composer) +{ + EMsgComposer *new_composer; + EShell *shell; + + shell = e_msg_composer_get_shell (composer); + + new_composer = e_msg_composer_new (shell); + gtk_widget_show (GTK_WIDGET (new_composer)); +} + +static void action_pgp_encrypt_cb (GtkToggleAction *action, EMsgComposer *composer) { @@ -81,6 +94,34 @@ action_pgp_sign_cb (GtkToggleAction *action, } static void +action_preferences_cb (GtkAction *action, + EMsgComposer *composer) +{ + EShell *shell; + GtkWidget *preferences_window; + const gchar *page_name = "composer"; + + shell = e_msg_composer_get_shell (composer); + preferences_window = e_shell_get_preferences_window (shell); + e_preferences_window_setup (E_PREFERENCES_WINDOW (preferences_window)); + + gtk_window_set_transient_for ( + GTK_WINDOW (preferences_window), + GTK_WINDOW (composer)); + gtk_window_set_position ( + GTK_WINDOW (preferences_window), + GTK_WIN_POS_CENTER_ON_PARENT); + gtk_window_present (GTK_WINDOW (preferences_window)); + + if (e_shell_get_express_mode (shell)) + e_preferences_window_filter_page ( + E_PREFERENCES_WINDOW (preferences_window), page_name); + else + e_preferences_window_show_page ( + E_PREFERENCES_WINDOW (preferences_window), page_name); +} + +static void action_print_cb (GtkAction *action, EMsgComposer *composer) { @@ -218,19 +259,6 @@ action_send_cb (GtkAction *action, } static void -action_new_message_cb (GtkAction *action, - EMsgComposer *composer) -{ - EMsgComposer *new_composer; - EShell *shell; - - shell = e_msg_composer_get_shell (composer); - - new_composer = e_msg_composer_new (shell); - gtk_widget_show (GTK_WIDGET (new_composer)); -} - -static void action_smime_encrypt_cb (GtkToggleAction *action, EMsgComposer *composer) { @@ -266,6 +294,20 @@ static GtkActionEntry entries[] = { N_("Close the current file"), G_CALLBACK (action_close_cb) }, + { "new-message", + "mail-message-new", + N_("New _Message"), + "<Control>n", + N_("Open New Message window"), + G_CALLBACK (action_new_message_cb) }, + + { "preferences", + GTK_STOCK_PREFERENCES, + NULL, + NULL, + N_("Configure Evolution"), + G_CALLBACK (action_preferences_cb) }, + { "save", GTK_STOCK_SAVE, N_("_Save"), @@ -280,13 +322,6 @@ static GtkActionEntry entries[] = { N_("Save the current file with a different name"), G_CALLBACK (action_save_as_cb) }, - { "new-message", - "mail-message-new", - N_("New _Message"), - "<Control>n", - N_("Open New Message window"), - G_CALLBACK (action_new_message_cb) }, - /* Menus */ { "charset-menu", diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h index 5cf503e735..9ed3b11c59 100644 --- a/composer/e-composer-private.h +++ b/composer/e-composer-private.h @@ -52,6 +52,7 @@ #include "widgets/misc/e-attachment-paned.h" #include "widgets/misc/e-attachment-store.h" #include "widgets/misc/e-picture-gallery.h" +#include "widgets/misc/e-preferences-window.h" #include "widgets/misc/e-signature-combo-box.h" #include "widgets/misc/e-web-view.h" #include "shell/e-shell.h" diff --git a/composer/evolution-composer.ui b/composer/evolution-composer.ui index d1eb10c76c..91fce38a2b 100644 --- a/composer/evolution-composer.ui +++ b/composer/evolution-composer.ui @@ -20,6 +20,10 @@ <menuitem action='close'/> </menu> </placeholder> + <menu action='edit-menu'> + <separator/> + <menuitem action='preferences'/> + </menu> <placeholder name='pre-insert-menu'> <menu action='view-menu'> <menuitem action='view-reply-to'/> |