[evolution] I#2087 - Composer: Extra separators shown on the toolbar
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#2087 - Composer: Extra separators shown on the toolbar
- Date: Wed, 19 Oct 2022 07:06:45 +0000 (UTC)
commit cfbcd0e2e3563c4ebf5e873c8596d9491a5e1b5e
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 19 09:05:40 2022 +0200
I#2087 - Composer: Extra separators shown on the toolbar
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2087
src/composer/e-composer-private.c | 25 ++++++++++++++-----------
src/composer/evolution-composer.ui | 6 +++---
2 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/src/composer/e-composer-private.c b/src/composer/e-composer-private.c
index 6de29fad88..adad36c4a4 100644
--- a/src/composer/e-composer-private.c
+++ b/src/composer/e-composer-private.c
@@ -309,21 +309,24 @@ e_composer_private_constructed (EMsgComposer *composer)
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
if (e_util_get_use_header_bar ()) {
+ const gchar *items[] = {
+ "/main-toolbar/pre-main-toolbar/send",
+ "/main-toolbar/pre-main-toolbar/send-separator",
+ "/main-toolbar/pre-main-toolbar/save-draft",
+ "/main-toolbar/pre-main-toolbar/save-draft-separator",
+ "/main-toolbar/prioritize-message-separator",
+ "/main-toolbar/toolbar-prioritize-message",
+ "/main-toolbar/toolbar-request-read-receipt"
+ };
+ guint ii;
widget = composer_construct_header_bar (composer, menu_button);
gtk_window_set_titlebar (window, widget);
/* Destroy items from the toolbar, which are in the header bar */
- widget = gtk_ui_manager_get_widget (ui_manager, "/main-toolbar/pre-main-toolbar/send");
- gtk_widget_destroy (widget);
-
- widget = gtk_ui_manager_get_widget (ui_manager, "/main-toolbar/pre-main-toolbar/save-draft");
- gtk_widget_destroy (widget);
-
- widget = gtk_ui_manager_get_widget (ui_manager, "/main-toolbar/toolbar-prioritize-message");
- gtk_widget_destroy (widget);
-
- widget = gtk_ui_manager_get_widget (ui_manager, "/main-toolbar/toolbar-request-read-receipt");
- gtk_widget_destroy (widget);
+ for (ii = 0; ii < G_N_ELEMENTS (items); ii++) {
+ widget = gtk_ui_manager_get_widget (ui_manager, items[ii]);
+ gtk_widget_destroy (widget);
+ }
} else {
/* We set the send button as important to have a label */
widget = gtk_ui_manager_get_widget (ui_manager, "/main-toolbar/pre-main-toolbar/send");
diff --git a/src/composer/evolution-composer.ui b/src/composer/evolution-composer.ui
index ae0367a82d..54bd45548c 100644
--- a/src/composer/evolution-composer.ui
+++ b/src/composer/evolution-composer.ui
@@ -62,11 +62,11 @@
<toolbar name='main-toolbar'>
<placeholder name='pre-main-toolbar'>
<toolitem action='send'/>
- <separator/>
+ <separator name='send-separator'/>
<toolitem action='save-draft'/>
- <separator/>
+ <separator name='save-draft-separator'/>
</placeholder>
- <separator/>
+ <separator name='prioritize-message-separator'/>
<toolitem action='toolbar-prioritize-message'/>
<toolitem action='toolbar-request-read-receipt'/>
<separator/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]