[evince] shell: Use textual Open button instead of icon
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Use textual Open button instead of icon
- Date: Sat, 30 Jun 2018 02:52:31 +0000 (UTC)
commit c1cde87f4e6b89d39a8aaad8abeae9b50a8e108d
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Fri Jun 29 22:50:06 2018 -0400
shell: Use textual Open button instead of icon
Having space in the headerbar, use text that is clearer than an
icon.
Fixes #518
shell/ev-toolbar.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index d209b619..af8c5e54 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -92,6 +92,7 @@ static GtkWidget *
ev_toolbar_create_button (EvToolbar *ev_toolbar,
const gchar *action_name,
const gchar *icon_name,
+ const gchar *label,
const gchar *tooltip)
{
GtkWidget *button = gtk_button_new ();
@@ -100,7 +101,10 @@ ev_toolbar_create_button (EvToolbar *ev_toolbar,
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
- gtk_button_set_image (GTK_BUTTON (button), image);
+ if (icon_name)
+ gtk_button_set_image (GTK_BUTTON (button), image);
+ if (label)
+ gtk_button_set_label (GTK_BUTTON (button), label);
ev_toolbar_set_button_action (ev_toolbar, GTK_BUTTON (button), action_name, tooltip);
return button;
@@ -198,7 +202,8 @@ ev_toolbar_constructed (GObject *object)
builder = gtk_builder_new_from_resource ("/org/gnome/evince/gtk/menus.ui");
button = ev_toolbar_create_button (ev_toolbar, "win.open",
- "document-open-symbolic",
+ NULL,
+ _("Open…"),
_("Open an existing document"));
ev_toolbar->priv->open_button = button;
gtk_container_add (GTK_CONTAINER (ev_toolbar), button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]