r47342 - in /desktop/unstable/eog/debian: ./ patches/

laney at users.alioth.debian.org laney at users.alioth.debian.org
Mon Feb 15 16:32:38 UTC 2016


Author: laney
Date: Mon Feb 15 16:32:38 2016
New Revision: 47342

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=47342
Log:
Update menubar patches


Added:
    desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch
    desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch
    desktop/unstable/eog/debian/patches/Put-Exit-Fullscreen-button-into-toolbar.patch
Removed:
    desktop/unstable/eog/debian/patches/disable-appmenu-when-not-needed.patch
Modified:
    desktop/unstable/eog/debian/changelog
    desktop/unstable/eog/debian/patches/series

Modified: desktop/unstable/eog/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/eog/debian/changelog?rev=47342&op=diff
==============================================================================
--- desktop/unstable/eog/debian/changelog	[utf-8] (original)
+++ desktop/unstable/eog/debian/changelog	[utf-8] Mon Feb 15 16:32:38 2016
@@ -1,6 +1,17 @@
 eog (3.18.2-1) UNRELEASED; urgency=medium
 
   * New upstrem release.
+  * debian/patches/0001-Add-a-traditional-menu-bar.patch: Show a traditional
+    menu bar if the DE requests it - happens for Xfce for example. (Closes:
+    #793445)
+  * debian/patches/0002-Show-traditional-title-bar-in-unity.patch: Since we're
+    doing ↑, take a small patch to not use the headerbar on Unity - easily
+    extended to other desktops in Debian if they want it.
+  * debian/patches/Put-Exit-Fullscreen-button-into-toolbar.patch: Cherry-pick
+    from upstream to pack the "Exit Fullscreen" button correctly, so that it
+    is themed right.
+  * debian/patches/disable-appmenu-when-not-needed.patch: Drop, not needed
+    with the above.
 
  -- Iain Lane <laney at debian.org>  Mon, 15 Feb 2016 15:03:28 +0000
 

Added: desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch?rev=47342&op=file
==============================================================================
--- desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch	(added)
+++ desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch	[utf-8] Mon Feb 15 16:32:38 2016
@@ -0,0 +1,368 @@
+From b7cf1b9c79f6c547ac8daec82d3fa851ceec839d Mon Sep 17 00:00:00 2001
+From: Lars Uebernickel <lars.uebernickel at canonical.com>
+Date: Fri, 25 Sep 2015 10:27:24 +0200
+Subject: [PATCH 1/2] Add a traditional menu bar
+
+---
+ data/eog-menubar.xml  | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/eog-application.c |  39 +++++++---
+ src/eog-window.c      |  44 ++++++-----
+ src/eog.gresource.xml |   1 +
+ 4 files changed, 259 insertions(+), 30 deletions(-)
+ create mode 100644 data/eog-menubar.xml
+
+Index: eog-3.18.0/data/eog-menubar.xml
+===================================================================
+--- /dev/null
++++ eog-3.18.0/data/eog-menubar.xml
+@@ -0,0 +1,205 @@
++<?xml version="1.0" encoding="utf-8"?>
++<interface>
++  <menu id="menubar">
++    <submenu>
++      <attribute name="label" translatable="yes">_Image</attribute>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Open…</attribute>
++          <attribute name="action">win.open</attribute>
++          <attribute name="accel"><Ctrl>o</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Save</attribute>
++          <attribute name="action">win.save</attribute>
++          <attribute name="accel"><Ctrl>s</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_Save As…</attribute>
++          <attribute name="action">win.save-as</attribute>
++          <attribute name="accel"><Ctrl><Shift>s</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">Print…</attribute>
++          <attribute name="action">win.print</attribute>
++          <attribute name="accel"><Ctrl>p</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">Set as _Wallpaper</attribute>
++          <attribute name="action">win.set-wallpaper</attribute>
++          <attribute name="accel"><Ctrl>F8</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">Show Containing _Folder</attribute>
++          <attribute name="action">win.open-folder</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">Image Properties</attribute>
++          <attribute name="action">win.properties</attribute>
++          <attribute name="accel"><Alt>Return</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Close</attribute>
++          <attribute name="action">win.close</attribute>
++          <attribute name="accel"><Ctrl>w</attribute>
++        </item>
++      </section>
++    </submenu>
++    <submenu>
++      <attribute name="label" translatable="yes">_Edit</attribute>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Undo</attribute>
++          <attribute name="action">win.undo</attribute>
++          <attribute name="accel"><Ctrl>z</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Copy Image</attribute>
++          <attribute name="action">win.copy</attribute>
++          <attribute name="accel"><Ctrl>c</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">Flip _Horizontal</attribute>
++          <attribute name="action">win.flip-horizontal</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">Flip _Vertical</attribute>
++          <attribute name="action">win.flip-vertical</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Rotate Clockwise</attribute>
++          <attribute name="action">win.rotate-90</attribute>
++          <attribute name="accel"><Ctrl>r</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">Rotate Counter_clockwise</attribute>
++          <attribute name="action">win.rotate-270</attribute>
++          <attribute name="accel"><Ctrl><Shift>r</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">Move to _Trash</attribute>
++          <attribute name="action">win.move-trash</attribute>
++          <attribute name="accel">Delete</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_Delete</attribute>
++          <attribute name="action">win.delete</attribute>
++          <attribute name="accel"><Shift>Delete</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Preferences</attribute>
++          <attribute name="action">app.preferences</attribute>
++        </item>
++      </section>
++    </submenu>
++    <submenu>
++      <attribute name="label" translatable="yes">_View</attribute>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Statusbar</attribute>
++          <attribute name="action">win.view-statusbar</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_Image Gallery</attribute>
++          <attribute name="action">win.view-gallery</attribute>
++          <attribute name="accel">F9</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">Side _Pane</attribute>
++          <attribute name="action">win.view-sidebar</attribute>
++          <attribute name="accel"><Ctrl>F9</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">Zoom _In</attribute>
++          <attribute name="action">win.zoom-in</attribute>
++          <attribute name="accel"><Ctrl>plus</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">Zoom _Out</attribute>
++          <attribute name="action">win.zoom-out</attribute>
++          <attribute name="accel"><Ctrl>minus</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_Best Fit</attribute>
++          <attribute name="action">win.toggle-zoom-fit</attribute>
++          <attribute name="accel">F</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Fullscreen</attribute>
++          <attribute name="action">win.view-fullscreen</attribute>
++          <attribute name="accel">F11</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">Slide Show</attribute>
++          <attribute name="action">win.view-slideshow</attribute>
++          <attribute name="accel">F5</attribute>
++        </item>
++      </section>
++    </submenu>
++    <submenu>
++      <attribute name="label" translatable="yes">_Go</attribute>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Previous Image</attribute>
++          <attribute name="action">win.go-previous</attribute>
++          <attribute name="accel">Left</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_Next Image</attribute>
++          <attribute name="action">win.go-next</attribute>
++          <attribute name="accel">Right</attribute>
++        </item>
++      </section>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_First Image</attribute>
++          <attribute name="action">win.go-first</attribute>
++          <attribute name="accel"><Alt>Home</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_Last Image</attribute>
++          <attribute name="action">win.go-last</attribute>
++          <attribute name="accel"><Alt>End</attribute>
++        </item>
++      </section>
++    </submenu>
++    <submenu>
++      <attribute name="label" translatable="yes">_Help</attribute>
++      <section>
++        <item>
++          <attribute name="label" translatable="yes">_Contents</attribute>
++          <attribute name="action">win.manual</attribute>
++          <attribute name="accel">F1</attribute>
++        </item>
++        <item>
++          <attribute name="label" translatable="yes">_About</attribute>
++          <attribute name="action">app.about</attribute>
++        </item>
++      </section>
++    </submenu>
++  </menu>
++</interface>
+Index: eog-3.18.0/src/eog-application.c
+===================================================================
+--- eog-3.18.0.orig/src/eog-application.c
++++ eog-3.18.0/src/eog-application.c
+@@ -169,17 +169,34 @@ eog_application_init_app_menu (EogApplic
+ 					 application);
+ 
+ 	builder = gtk_builder_new ();
+-	gtk_builder_add_from_resource (builder,
+-				       "/org/gnome/eog/ui/eog-app-menu.xml",
+-				       &error);
+ 
+-	if (error == NULL) {
+-		gtk_application_set_app_menu (GTK_APPLICATION (application),
+-					      G_MENU_MODEL (gtk_builder_get_object (builder,
+-		                                                                    "app-menu")));
+-	} else {
+-		g_critical ("Unable to add the application menu: %s\n", error->message);
+-		g_error_free (error);
++	if (gtk_application_prefers_app_menu (GTK_APPLICATION (application))) {
++		gtk_builder_add_from_resource (builder,
++					       "/org/gnome/eog/ui/eog-app-menu.xml",
++					       &error);
++
++		if (error == NULL) {
++			gtk_application_set_app_menu (GTK_APPLICATION (application),
++						      G_MENU_MODEL (gtk_builder_get_object (builder,
++											    "app-menu")));
++		} else {
++			g_critical ("Unable to add the application menu: %s\n", error->message);
++			g_error_free (error);
++		}
++	}
++	else {
++		gtk_builder_add_from_resource (builder,
++					       "/org/gnome/eog/ui/eog-menubar.xml",
++					       &error);
++
++		if (error == NULL) {
++			gtk_application_set_menubar (GTK_APPLICATION (application),
++						     G_MENU_MODEL (gtk_builder_get_object (builder,
++											   "menubar")));
++		} else {
++			g_critical ("Unable to add the application menu: %s\n", error->message);
++			g_error_free (error);
++		}
+ 	}
+ 
+ 	action = g_action_map_lookup_action (G_ACTION_MAP (application),
+Index: eog-3.18.0/src/eog-window.c
+===================================================================
+--- eog-3.18.0.orig/src/eog-window.c
++++ eog-3.18.0/src/eog-window.c
+@@ -4330,18 +4330,30 @@ eog_window_construct_ui (EogWindow *wind
+ 			   priv->zoom_scale);
+ 	gtk_widget_show (priv->zoom_scale);
+ 
+-	menu_button = gtk_menu_button_new ();
+-	menu_image = gtk_image_new_from_icon_name ("open-menu-symbolic",
+-						   GTK_ICON_SIZE_BUTTON);
+-	gtk_button_set_image (GTK_BUTTON (menu_button), menu_image);
+-
+-	builder = gtk_builder_new_from_resource ("/org/gnome/eog/ui/eog-gear-menu.ui");
+-	builder_object = gtk_builder_get_object (builder, "gear-menu");
+-	gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button),
+-					G_MENU_MODEL (builder_object));
++	priv->open_with_menu = g_menu_new ();
++	priv->appinfo = g_ptr_array_new_with_free_func (g_object_unref);
++
++	if (gtk_application_prefers_app_menu (GTK_APPLICATION (EOG_APP))) {
++		menu_button = gtk_menu_button_new ();
++		menu_image = gtk_image_new_from_icon_name ("open-menu-symbolic",
++							   GTK_ICON_SIZE_BUTTON);
++		gtk_button_set_image (GTK_BUTTON (menu_button), menu_image);
+ 
+-	gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button);
+-	gtk_widget_show (menu_button);
++		builder = gtk_builder_new_from_resource ("/org/gnome/eog/ui/eog-gear-menu.ui");
++		builder_object = gtk_builder_get_object (builder, "gear-menu");
++		gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button),
++						G_MENU_MODEL (builder_object));
++
++		gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button);
++		gtk_widget_show (menu_button);
++
++		builder_object = gtk_builder_get_object (builder, "open-with-menu");
++		g_menu_append_section (G_MENU (builder_object),
++				       NULL,
++				       G_MENU_MODEL (priv->open_with_menu));
++		priv->gear_menu_builder = builder;
++		builder = NULL;
++	}
+ 
+ 	fullscreen_button = gtk_button_new_from_icon_name ("view-fullscreen-symbolic",
+ 							   GTK_ICON_SIZE_BUTTON);
+@@ -4352,15 +4364,6 @@ eog_window_construct_ui (EogWindow *wind
+ 	gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), fullscreen_button);
+ 	gtk_widget_show (fullscreen_button);
+ 
+-	priv->open_with_menu = g_menu_new ();
+-	priv->appinfo = g_ptr_array_new_with_free_func (g_object_unref);
+-	builder_object = gtk_builder_get_object (builder, "open-with-menu");
+-	g_menu_append_section (G_MENU (builder_object),
+-			       NULL,
+-			       G_MENU_MODEL (priv->open_with_menu));
+-	priv->gear_menu_builder = builder;
+-	builder = NULL;
+-
+ 	priv->cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ 	gtk_box_pack_start (GTK_BOX (priv->box), priv->cbox, TRUE, TRUE, 0);
+ 	gtk_widget_show (priv->cbox);
+@@ -5300,6 +5303,9 @@ eog_window_get_gear_menu_section (EogWin
+ 	GObject *object;
+ 	g_return_val_if_fail (EOG_IS_WINDOW (window), NULL);
+ 
++	if (window->priv->gear_menu_builder == NULL)
++		return NULL;
++
+ 	object = gtk_builder_get_object (window->priv->gear_menu_builder, id);
+ 	if (object == NULL || !G_IS_MENU (object))
+ 		return NULL;
+Index: eog-3.18.0/src/eog.gresource.xml
+===================================================================
+--- eog-3.18.0.orig/src/eog.gresource.xml
++++ eog-3.18.0/src/eog.gresource.xml
+@@ -3,6 +3,7 @@
+   <gresource prefix="/org/gnome/eog/ui">
+     <file>eog.css</file>
+     <file compressed="true" preprocess="xml-stripblanks">eog-app-menu.xml</file>
++    <file compressed="true" preprocess="xml-stripblanks">eog-menubar.xml</file>
+     <file compressed="true" preprocess="xml-stripblanks">eog-gear-menu.ui</file>
+     <file compressed="true" preprocess="xml-stripblanks">eog-image-properties-dialog.ui</file>
+     <file compressed="true" preprocess="xml-stripblanks">eog-multiple-save-as-dialog.ui</file>
+Index: eog-3.18.0/po/POTFILES.in
+===================================================================
+--- eog-3.18.0.orig/po/POTFILES.in
++++ eog-3.18.0/po/POTFILES.in
+@@ -1,6 +1,7 @@
+ # List of source files containing translatable strings.
+ # Please keep this file sorted alphabetically.
+ [encoding: UTF-8]
++[type: gettext/glade]data/eog-menubar.xml
+ [type: gettext/glade]data/eog-app-menu.xml
+ data/eog.appdata.xml.in
+ data/eog.desktop.in.in

Added: desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch?rev=47342&op=file
==============================================================================
--- desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch	(added)
+++ desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch	[utf-8] Mon Feb 15 16:32:38 2016
@@ -0,0 +1,136 @@
+From fd12d0136bfd9abc8a121f47775c2200237e535f Mon Sep 17 00:00:00 2001
+From: Lars Uebernickel <lars.uebernickel at canonical.com>
+Date: Tue, 29 Sep 2015 12:25:29 +0200
+Subject: [PATCH 2/2] Show traditional title bar in unity
+
+Based on a patch by Iain Lane <iain at orangesquash.org.uk>
+---
+ src/eog-window.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 55 insertions(+), 11 deletions(-)
+
+Index: eog-3.18.0/src/eog-window.c
+===================================================================
+--- eog-3.18.0.orig/src/eog-window.c
++++ eog-3.18.0/src/eog-window.c
+@@ -134,6 +134,7 @@ struct _EogWindowPrivate {
+ 	GtkWidget           *zoom_revealer;
+ 	GtkWidget           *zoom_scale;
+ 	GtkWidget           *properties_dlg;
++	GtkWidget           *headerbar;
+ 
+ 	GMenu               *open_with_menu;
+ 	GPtrArray           *appinfo;
+@@ -4257,6 +4258,43 @@ eog_window_zoom_button_toggled_cb (GtkTo
+ 	gtk_button_set_image (GTK_BUTTON (button), zoom_image);
+ }
+ 
++static gboolean
++in_desktop (const gchar *name)
++{
++	const gchar *desktop_name_list;
++	gchar **names;
++	gboolean in_list = FALSE;
++	gint i;
++
++	desktop_name_list = g_getenv ("XDG_CURRENT_DESKTOP");
++	if (!desktop_name_list)
++		return FALSE;
++
++	names = g_strsplit (desktop_name_list, ":", -1);
++	for (i = 0; names[i] && !in_list; i++)
++		if (strcmp (names[i], name) == 0) {
++			in_list = TRUE;
++			break;
++		}
++	g_strfreev (names);
++
++	return in_list;
++}
++
++static void
++on_action_state_changed (GActionGroup *action_group,
++			 gchar        *name,
++			 GVariant     *value,
++			 gpointer      user_data)
++{
++	EogWindow *window = user_data;
++	EogWindowPrivate *priv = window->priv;
++
++	gtk_widget_set_visible (GTK_WIDGET (priv->headerbar),
++				priv->mode != EOG_WINDOW_MODE_FULLSCREEN &&
++				priv->mode != EOG_WINDOW_MODE_SLIDESHOW);
++}
++
+ static void
+ eog_window_construct_ui (EogWindow *window)
+ {
+@@ -4268,7 +4306,6 @@ eog_window_construct_ui (EogWindow *wind
+ 
+ 	GtkWidget *popup_menu;
+ 	GtkWidget *hpaned;
+-	GtkWidget *headerbar;
+ 	GtkWidget *zoom_button;
+ 	GtkWidget *zoom_image;
+ 	GtkWidget *menu_button;
+@@ -4283,12 +4320,19 @@ eog_window_construct_ui (EogWindow *wind
+ 	gtk_container_add (GTK_CONTAINER (window), priv->box);
+ 	gtk_widget_show (priv->box);
+ 
+-	headerbar = gtk_header_bar_new ();
+-	gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (headerbar), TRUE);
+-	gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar),
+-				  g_get_application_name ());
+-	gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
+-	gtk_widget_show (headerbar);
++	priv->headerbar = gtk_header_bar_new ();
++	if (!in_desktop ("Unity")) {
++		gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (priv->headerbar), TRUE);
++		gtk_header_bar_set_title (GTK_HEADER_BAR (priv->headerbar), g_get_application_name ());
++		gtk_window_set_titlebar (GTK_WINDOW (window), priv->headerbar);
++	} else {
++		gtk_container_add (GTK_CONTAINER (priv->box), priv->headerbar);
++
++		/* Need to hide toolbar when fullscreen (slideshow or normal fullscreen) */
++		g_signal_connect (window, "action-state-changed",
++				  G_CALLBACK (on_action_state_changed), window);
++	}
++	gtk_widget_show (priv->headerbar);
+ 
+ 	zoom_button = gtk_toggle_button_new ();
+ 	zoom_image = gtk_image_new_from_icon_name ("zoom-in-symbolic",
+@@ -4299,7 +4343,7 @@ eog_window_construct_ui (EogWindow *wind
+ 	g_signal_connect (zoom_button, "toggled",
+ 			  G_CALLBACK (eog_window_zoom_button_toggled_cb),
+ 			  window);
+-	gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), zoom_button);
++	gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), zoom_button);
+ 	/* disable zoom button if no image is loaded */
+ 	g_object_bind_property (g_action_map_lookup_action (G_ACTION_MAP(window),
+ 							    "zoom-normal"),
+@@ -4310,7 +4354,7 @@ eog_window_construct_ui (EogWindow *wind
+ 	priv->zoom_revealer = gtk_revealer_new ();
+ 	gtk_revealer_set_transition_type (GTK_REVEALER (priv->zoom_revealer),
+ 					  GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
+-	gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar),
++	gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar),
+ 				   priv->zoom_revealer);
+ 	gtk_widget_show (priv->zoom_revealer);
+ 
+@@ -4344,7 +4388,7 @@ eog_window_construct_ui (EogWindow *wind
+ 		gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button),
+ 						G_MENU_MODEL (builder_object));
+ 
+-		gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), menu_button);
++		gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), menu_button);
+ 		gtk_widget_show (menu_button);
+ 
+ 		builder_object = gtk_builder_get_object (builder, "open-with-menu");
+@@ -4361,7 +4405,7 @@ eog_window_construct_ui (EogWindow *wind
+ 					"win.view-fullscreen");
+ 	gtk_widget_set_tooltip_text(fullscreen_button,
+ 				    _("Show the current image in fullscreen mode"));
+-	gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), fullscreen_button);
++	gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->headerbar), fullscreen_button);
+ 	gtk_widget_show (fullscreen_button);
+ 
+ 	priv->cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);

Added: desktop/unstable/eog/debian/patches/Put-Exit-Fullscreen-button-into-toolbar.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/eog/debian/patches/Put-Exit-Fullscreen-button-into-toolbar.patch?rev=47342&op=file
==============================================================================
--- desktop/unstable/eog/debian/patches/Put-Exit-Fullscreen-button-into-toolbar.patch	(added)
+++ desktop/unstable/eog/debian/patches/Put-Exit-Fullscreen-button-into-toolbar.patch	[utf-8] Mon Feb 15 16:32:38 2016
@@ -0,0 +1,105 @@
+From c716887f49fd6c2d65f18da6d8784b5e84bb24b6 Mon Sep 17 00:00:00 2001
+From: Lars Uebernickel <lars.uebernickel at canonical.com>
+Date: Tue, 29 Sep 2015 18:25:08 +0200
+Subject: [PATCH] Put "Exit Fullscreen" button into toolbar
+Origin: upstream, commit:2c5e528a948afd811f3a15936ae746032c1ea892
+
+So that the button has the same background as the toolbar itself.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=755799
+---
+ data/fullscreen-toolbar.ui | 18 +++++++++++++++++-
+ src/eog-window.c           | 31 +++++--------------------------
+ 2 files changed, 22 insertions(+), 27 deletions(-)
+
+Index: eog-3.18.0/data/fullscreen-toolbar.ui
+===================================================================
+--- eog-3.18.0.orig/data/fullscreen-toolbar.ui
++++ eog-3.18.0/data/fullscreen-toolbar.ui
+@@ -5,7 +5,7 @@
+   <object class="GtkToolbar" id="fullscreen_toolbar">
+     <property name="visible">True</property>
+     <property name="can_focus">False</property>
+-    <property name="toolbar_style">icons</property>
++    <property name="toolbar_style">both-horiz</property>
+     <child>
+       <object class="GtkToolButton" id="first_button">
+         <property name="visible">True</property>
+@@ -226,5 +226,21 @@
+         <property name="homogeneous">True</property>
+       </packing>
+     </child>
++    <child>
++      <object class="GtkToolButton" id="exit_fullscreen_button">
++        <property name="visible">True</property>
++        <property name="can_focus">False</property>
++        <property name="label" translatable="yes">_Leave Fullscreen</property>
++        <property name="use_underline">True</property>
++        <property name="tooltip_text" translatable="yes">Leave fullscreen mode</property>
++        <property name="icon_name">view-restore</property>
++        <property name="halign">end</property>
++        <property name="is_important">True</property>
++      </object>
++      <packing>
++        <property name="expand">True</property>
++        <property name="homogeneous">False</property>
++      </packing>
++    </child>
+   </object>
+ </interface>
+Index: eog-3.18.0/src/eog-window.c
+===================================================================
+--- eog-3.18.0.orig/src/eog-window.c
++++ eog-3.18.0/src/eog-window.c
+@@ -1895,28 +1895,6 @@ exit_fullscreen_button_clicked_cb (GtkWi
+ }
+ 
+ static GtkWidget *
+-eog_window_get_exit_fullscreen_button (EogWindow *window)
+-{
+-	GtkWidget *button;
+-	GtkWidget *image;
+-
+-	button = gtk_button_new_with_mnemonic (_("_Leave Fullscreen"));
+-	image = gtk_image_new_from_icon_name ("view-restore-symbolic",
+-					      GTK_ICON_SIZE_BUTTON);
+-	gtk_button_set_image (GTK_BUTTON (button), image);
+-	gtk_button_set_always_show_image (GTK_BUTTON (button), TRUE);
+-	gtk_widget_set_tooltip_text(button,
+-				    _("Leave fullscreen mode"));
+-
+-
+-	g_signal_connect (button, "clicked",
+-			  G_CALLBACK (exit_fullscreen_button_clicked_cb),
+-			  window);
+-
+-	return button;
+-}
+-
+-static GtkWidget *
+ eog_window_create_fullscreen_popup (EogWindow *window)
+ {
+ 	GtkWidget *revealer;
+@@ -1941,10 +1919,10 @@ eog_window_create_fullscreen_popup (EogW
+ 
+ 	gtk_box_pack_start (GTK_BOX (hbox), toolbar, TRUE, TRUE, 0);
+ 
+-	g_object_unref (builder);
+-
+-	button = eog_window_get_exit_fullscreen_button (window);
+-	gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
++	button = GTK_WIDGET (gtk_builder_get_object (builder, "exit_fullscreen_button"));
++	g_signal_connect (button, "clicked",
++			  G_CALLBACK (exit_fullscreen_button_clicked_cb),
++			  window);
+ 
+ 	/* Disable timer when the pointer enters the toolbar window. */
+ 	g_signal_connect (revealer,
+@@ -1952,6 +1930,7 @@ eog_window_create_fullscreen_popup (EogW
+ 			  G_CALLBACK (fullscreen_leave_notify_cb),
+ 			  window);
+ 
++	g_object_unref (builder);
+ 	return revealer;
+ }
+ 

Modified: desktop/unstable/eog/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/eog/debian/patches/series?rev=47342&op=diff
==============================================================================
--- desktop/unstable/eog/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/eog/debian/patches/series	[utf-8] Mon Feb 15 16:32:38 2016
@@ -1 +1,3 @@
-disable-appmenu-when-not-needed.patch
+0001-Add-a-traditional-menu-bar.patch
+0002-Show-traditional-title-bar-in-unity.patch
+Put-Exit-Fullscreen-button-into-toolbar.patch




More information about the pkg-gnome-commits mailing list