aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@svn.gnome.org>2007-09-10 06:36:29 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-09-10 06:36:29 +0800
commit7a9491270389f22445a70f56aadf25d140960836 (patch)
treed2e16e3ba25fc04fc386cb87cd0e96081f3574ef /src
parentae3696a199b3ba3a6641956bbf95049ecfdacd68 (diff)
downloadgsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.tar
gsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.tar.gz
gsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.tar.bz2
gsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.tar.lz
gsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.tar.xz
gsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.tar.zst
gsoc2013-epiphany-7a9491270389f22445a70f56aadf25d140960836.zip
Forces the display of "Close print preview" on the relative toolbar button
2007-09-10 Cosimo Cecchi <cosimoc@svn.gnome.org> * src/ppview-toolbar.c: (ppview_toolbar_set_window): Forces the display of "Close print preview" on the relative toolbar button in the print preview window. See bug #109063. Patch by Cyril Brulebois. svn path=/trunk/; revision=7363
Diffstat (limited to 'src')
-rw-r--r--src/ppview-toolbar.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ppview-toolbar.c b/src/ppview-toolbar.c
index 59842eca1..b13acaa4c 100644
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -28,6 +28,7 @@
#include <gtk/gtkentry.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkstock.h>
+#include <gtk/gtktoolbar.h>
#include <gtk/gtkuimanager.h>
static void ppview_toolbar_class_init (PPViewToolbarClass *klass);
@@ -224,6 +225,10 @@ toolbar_update_sensitivity (PPViewToolbar *t)
static void
ppview_toolbar_set_window (PPViewToolbar *t, EphyWindow *window)
{
+ GtkAction *action;
+ GtkWidget *widget;
+ GtkToolbarStyle style;
+
g_return_if_fail (t->priv->window == NULL);
t->priv->window = window;
@@ -238,6 +243,25 @@ ppview_toolbar_set_window (PPViewToolbar *t, EphyWindow *window)
t->priv->ui_id = gtk_ui_manager_add_ui_from_string
(t->priv->manager, ui_info, -1, NULL);
+ action = gtk_action_group_get_action (t->priv->action_group,
+ "PPVClose");
+ g_object_set (action,
+ "short-label",
+ _("Close print preview"),
+ "is-important",
+ TRUE,
+ NULL);
+
+ /* Force the display of the text only when needed */
+ widget = gtk_ui_manager_get_widget (t->priv->manager,
+ "/PPViewToolbar");
+ style = gtk_toolbar_get_style (GTK_TOOLBAR (widget));
+ if (style == GTK_TOOLBAR_ICONS)
+ {
+ gtk_toolbar_set_style (GTK_TOOLBAR (widget),
+ GTK_TOOLBAR_BOTH_HORIZ);
+ }
+
toolbar_update_sensitivity (t);
}