EComposer: Add an option to hide main toolbar
This commit is contained in:

committed by
Milan Crha

parent
c07df7aaab
commit
436b7a2c5f
@ -242,6 +242,11 @@
|
|||||||
<default>10</default>
|
<default>10</default>
|
||||||
<_summary>Number of To and CC recipients to ask “prompt-on-many-to-cc-recips” from</_summary>
|
<_summary>Number of To and CC recipients to ask “prompt-on-many-to-cc-recips” from</_summary>
|
||||||
<_description>When to ask, when the number of To and CC recipients reaches this value.</_description>
|
<_description>When to ask, when the number of To and CC recipients reaches this value.</_description>
|
||||||
|
</key>
|
||||||
|
<key name="composer-show-main-toolbar" type="b">
|
||||||
|
<default>true</default>
|
||||||
|
<_summary>Whether to always show main toolbar</_summary>
|
||||||
|
<_description>If set to “true”, the main toolbar will be visible.</_description>
|
||||||
</key>
|
</key>
|
||||||
<key name="composer-show-edit-toolbar" type="b">
|
<key name="composer-show-edit-toolbar" type="b">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
|
@ -413,6 +413,14 @@ static GtkActionEntry async_entries[] = {
|
|||||||
|
|
||||||
static GtkToggleActionEntry toggle_entries[] = {
|
static GtkToggleActionEntry toggle_entries[] = {
|
||||||
|
|
||||||
|
{ "toolbar-show-main",
|
||||||
|
NULL,
|
||||||
|
N_("_Main toolbar"),
|
||||||
|
NULL,
|
||||||
|
N_("Main toolbar"),
|
||||||
|
NULL,
|
||||||
|
FALSE },
|
||||||
|
|
||||||
{ "toolbar-show-edit",
|
{ "toolbar-show-edit",
|
||||||
NULL,
|
NULL,
|
||||||
N_("Edit _toolbar"),
|
N_("Edit _toolbar"),
|
||||||
@ -668,11 +676,19 @@ e_composer_actions_init (EMsgComposer *composer)
|
|||||||
#undef init_toolbar_option
|
#undef init_toolbar_option
|
||||||
|
|
||||||
settings = e_util_ref_settings ("org.gnome.evolution.mail");
|
settings = e_util_ref_settings ("org.gnome.evolution.mail");
|
||||||
|
|
||||||
|
action = ACTION (TOOLBAR_SHOW_MAIN);
|
||||||
|
g_settings_bind (
|
||||||
|
settings, "composer-show-main-toolbar",
|
||||||
|
action, "active",
|
||||||
|
G_SETTINGS_BIND_DEFAULT);
|
||||||
|
|
||||||
action = ACTION (TOOLBAR_SHOW_EDIT);
|
action = ACTION (TOOLBAR_SHOW_EDIT);
|
||||||
g_settings_bind (
|
g_settings_bind (
|
||||||
settings, "composer-show-edit-toolbar",
|
settings, "composer-show-edit-toolbar",
|
||||||
action, "active",
|
action, "active",
|
||||||
G_SETTINGS_BIND_DEFAULT);
|
G_SETTINGS_BIND_DEFAULT);
|
||||||
|
|
||||||
g_object_unref (settings);
|
g_object_unref (settings);
|
||||||
|
|
||||||
/* Borrow a GnuPG icon from gcr to distinguish between GPG and S/MIME Sign/Encrypt actions */
|
/* Borrow a GnuPG icon from gcr to distinguish between GPG and S/MIME Sign/Encrypt actions */
|
||||||
|
@ -56,6 +56,8 @@
|
|||||||
E_COMPOSER_ACTION ((composer), "smime-encrypt")
|
E_COMPOSER_ACTION ((composer), "smime-encrypt")
|
||||||
#define E_COMPOSER_ACTION_SMIME_SIGN(composer) \
|
#define E_COMPOSER_ACTION_SMIME_SIGN(composer) \
|
||||||
E_COMPOSER_ACTION ((composer), "smime-sign")
|
E_COMPOSER_ACTION ((composer), "smime-sign")
|
||||||
|
#define E_COMPOSER_ACTION_TOOLBAR_SHOW_MAIN(composer) \
|
||||||
|
E_COMPOSER_ACTION ((composer), "toolbar-show-main")
|
||||||
#define E_COMPOSER_ACTION_TOOLBAR_SHOW_EDIT(composer) \
|
#define E_COMPOSER_ACTION_TOOLBAR_SHOW_EDIT(composer) \
|
||||||
E_COMPOSER_ACTION ((composer), "toolbar-show-edit")
|
E_COMPOSER_ACTION ((composer), "toolbar-show-edit")
|
||||||
#define E_COMPOSER_ACTION_TOOLBAR_PGP_ENCRYPT(composer) \
|
#define E_COMPOSER_ACTION_TOOLBAR_PGP_ENCRYPT(composer) \
|
||||||
|
@ -309,6 +309,11 @@ e_composer_private_constructed (EMsgComposer *composer)
|
|||||||
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (widget);
|
gtk_widget_show (widget);
|
||||||
|
|
||||||
|
e_binding_bind_property (
|
||||||
|
ACTION (TOOLBAR_SHOW_MAIN), "active",
|
||||||
|
widget, "visible",
|
||||||
|
G_BINDING_SYNC_CREATE);
|
||||||
|
|
||||||
/* Construct the header table. */
|
/* Construct the header table. */
|
||||||
|
|
||||||
widget = e_composer_header_table_new (client_cache);
|
widget = e_composer_header_table_new (client_cache);
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<menuitem action='view-bcc'/>
|
<menuitem action='view-bcc'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='picture-gallery'/>
|
<menuitem action='picture-gallery'/>
|
||||||
|
<menuitem action='toolbar-show-main'/>
|
||||||
<menuitem action='toolbar-show-edit'/>
|
<menuitem action='toolbar-show-edit'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='visually-wrap-long-lines'/>
|
<menuitem action='visually-wrap-long-lines'/>
|
||||||
|
Reference in New Issue
Block a user