r52953 - in /desktop/unstable/eog/debian: changelog patches/0001-Add-a-traditional-menu-bar.patch patches/0002-Show-traditional-title-bar-in-unity.patch
jbicha-guest at users.alioth.debian.org
jbicha-guest at users.alioth.debian.org
Tue Aug 29 18:26:41 UTC 2017
Author: jbicha-guest
Date: Tue Aug 29 18:26:40 2017
New Revision: 52953
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=52953
Log:
Refresh patches (copied from Ubuntu)
Modified:
desktop/unstable/eog/debian/changelog
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
Modified: desktop/unstable/eog/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/eog/debian/changelog?rev=52953&op=diff
==============================================================================
--- desktop/unstable/eog/debian/changelog [utf-8] (original)
+++ desktop/unstable/eog/debian/changelog [utf-8] Tue Aug 29 18:26:40 2017
@@ -1,6 +1,7 @@
eog (3.25.90-1) UNRELEASED; urgency=medium
* New upstream release
+ * Refresh patches (copied from Ubuntu)
-- Jeremy Bicha <jbicha at ubuntu.com> Tue, 29 Aug 2017 14:24:31 -0400
Modified: 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=52953&op=diff
==============================================================================
--- desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch [utf-8] (original)
+++ desktop/unstable/eog/debian/patches/0001-Add-a-traditional-menu-bar.patch [utf-8] Tue Aug 29 18:26:40 2017
@@ -6,17 +6,27 @@
Bug-Debian: https://bugs.debian.org/793445
---
- 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(-)
+ data/Makefile.am | 1
+ data/eog-menubar.ui | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ po/POTFILES.in | 1
+ src/eog-application.c | 35 ++++++++
+ src/eog-window.c | 59 +++++++-------
+ src/eog.gresource.xml | 1
+ 6 files changed, 280 insertions(+), 26 deletions(-)
create mode 100644 data/eog-menubar.xml
-Index: b/data/eog-menubar.xml
-===================================================================
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -39,6 +39,7 @@ EXTRA_DIST = \
+ eog-app-menu.ui \
+ eog-gear-menu.ui \
+ eog-image-properties-dialog.ui \
++ eog-menubar.ui \
+ eog-multiple-save-as-dialog.ui \
+ eog-preferences-dialog.ui \
+ eog-zoom-entry.ui \
--- /dev/null
-+++ b/data/eog-menubar.xml
++++ b/data/eog-menubar.ui
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="utf-8"?>
+<interface>
@@ -154,12 +164,12 @@
+ <item>
+ <attribute name="label" translatable="yes">Zoom _In</attribute>
+ <attribute name="action">win.zoom-in</attribute>
-+ <attribute name="accel"><Ctrl>plus</attribute>
++ <attribute name="accel">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>
++ <attribute name="accel">minus</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">_Best Fit</attribute>
@@ -227,13 +237,72 @@
+ </submenu>
+ </menu>
+</interface>
-Index: b/src/eog-window.c
-===================================================================
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -5,6 +5,7 @@ data/eog.appdata.xml.in
+ data/eog.desktop.in.in
+ data/eog-gear-menu.ui
+ data/eog-image-properties-dialog.ui
++data/eog-menubar.ui
+ data/eog-multiple-save-as-dialog.ui
+ data/eog-preferences-dialog.ui
+ data/eog-zoom-entry.ui
+--- a/src/eog-application.c
++++ b/src/eog-application.c
+@@ -267,6 +267,29 @@ on_extension_removed (PeasExtensionSet *
+ eog_application_activatable_deactivate (EOG_APPLICATION_ACTIVATABLE (exten));
+ }
+
++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
+ eog_application_startup (GApplication *application)
+ {
+@@ -329,6 +352,18 @@ eog_application_startup (GApplication *a
+ G_CALLBACK (on_extension_removed), app);
+
+ peas_extension_set_call (app->priv->extensions, "activate");
++
++ if (!in_desktop("GNOME"))
++ {
++ GtkBuilder *builder;
++ builder = gtk_builder_new_from_resource ("/org/gnome/eog/gtk/menu/menus-traditional.ui");
++
++ gtk_application_set_app_menu (GTK_APPLICATION (application), NULL);
++ gtk_application_set_menubar (GTK_APPLICATION (application),
++ G_MENU_MODEL (gtk_builder_get_object (builder, "menubar")));
++
++ g_object_unref (builder);
++ }
+ }
+
+ static void
--- a/src/eog-window.c
+++ b/src/eog-window.c
-@@ -4332,23 +4332,36 @@
- priv->zoom_scale);
+@@ -4243,23 +4243,36 @@ eog_window_construct_ui (EogWindow *wind
gtk_widget_show (priv->zoom_scale);
+ #endif
- menu_button = gtk_menu_button_new ();
- menu_image = gtk_image_new_from_icon_name ("open-menu-symbolic",
@@ -255,7 +324,7 @@
+ 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))) {
++ if (in_desktop ("GNOME")) {
+ menu_button = gtk_menu_button_new ();
+ menu_image = gtk_image_new_from_icon_name ("open-menu-symbolic",
+ GTK_ICON_SIZE_BUTTON);
@@ -285,7 +354,7 @@
fullscreen_button = gtk_button_new_from_icon_name ("view-fullscreen-symbolic",
GTK_ICON_SIZE_BUTTON);
-@@ -4359,15 +4372,6 @@
+@@ -4270,15 +4283,6 @@ eog_window_construct_ui (EogWindow *wind
gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), fullscreen_button);
gtk_widget_show (fullscreen_button);
@@ -301,7 +370,7 @@
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);
-@@ -5307,6 +5311,9 @@
+@@ -5250,6 +5254,9 @@ eog_window_get_gear_menu_section (EogWin
GObject *object;
g_return_val_if_fail (EOG_IS_WINDOW (window), NULL);
@@ -311,27 +380,13 @@
object = gtk_builder_get_object (window->priv->gear_menu_builder, id);
if (object == NULL || !G_IS_MENU (object))
return NULL;
-Index: b/src/eog.gresource.xml
-===================================================================
--- a/src/eog.gresource.xml
+++ b/src/eog.gresource.xml
-@@ -13,6 +13,7 @@
+@@ -14,6 +14,7 @@
</gresource>
<gresource prefix="/org/gnome/eog/gtk">
- <file alias="menus.ui" compressed="true" preprocess="xml-stripblanks">eog-app-menu.xml</file>
-+ <file alias="menus-traditional.ui" compressed="true" preprocess="xml-stripblanks">eog-menubar.xml</file>
+ <file alias="menus.ui" compressed="true" preprocess="xml-stripblanks">eog-app-menu.ui</file>
++ <file alias="menu/menus-traditional.ui" compressed="true" preprocess="xml-stripblanks">eog-menubar.ui</file>
<file compressed="true" preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>
</gresources>
-Index: b/po/POTFILES.in
-===================================================================
---- a/po/POTFILES.in
-+++ b/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
Modified: 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=52953&op=diff
==============================================================================
--- desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch [utf-8] (original)
+++ desktop/unstable/eog/debian/patches/0002-Show-traditional-title-bar-in-unity.patch [utf-8] Tue Aug 29 18:26:40 2017
@@ -5,22 +5,20 @@
Based on a patch by Iain Lane <iain at orangesquash.org.uk>
---
- src/eog-window.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 55 insertions(+), 11 deletions(-)
+ src/eog-window.c | 51 +++++++++++++++++++++++++++++++++++++++------------
+ 1 file changed, 39 insertions(+), 12 deletions(-)
-Index: b/src/eog-window.c
-===================================================================
--- a/src/eog-window.c
+++ b/src/eog-window.c
-@@ -134,6 +134,7 @@
- GtkWidget *zoom_revealer;
- GtkWidget *zoom_scale;
+@@ -133,6 +133,7 @@ struct _EogWindowPrivate {
+ GtkWidget *nav;
+ GtkWidget *message_area;
GtkWidget *properties_dlg;
+ GtkWidget *headerbar;
GMenu *open_with_menu;
GPtrArray *appinfo;
-@@ -4260,6 +4261,20 @@
+@@ -4170,6 +4171,24 @@ eog_window_view_previous_image_cb (EogSc
}
static void
@@ -32,6 +30,10 @@
+ EogWindow *window = user_data;
+ EogWindowPrivate *priv = window->priv;
+
++ gtk_application_window_set_show_menubar ((GtkApplicationWindow*)window,
++ priv->mode != EOG_WINDOW_MODE_FULLSCREEN &&
++ priv->mode != EOG_WINDOW_MODE_SLIDESHOW);
++
+ gtk_widget_set_visible (GTK_WIDGET (priv->headerbar),
+ priv->mode != EOG_WINDOW_MODE_FULLSCREEN &&
+ priv->mode != EOG_WINDOW_MODE_SLIDESHOW);
@@ -41,15 +43,15 @@
eog_window_construct_ui (EogWindow *window)
{
EogWindowPrivate *priv;
-@@ -4270,7 +4285,6 @@
+@@ -4180,7 +4199,6 @@ eog_window_construct_ui (EogWindow *wind
GtkWidget *popup_menu;
GtkWidget *hpaned;
- GtkWidget *headerbar;
- GtkWidget *zoom_button;
- GtkWidget *zoom_image;
+ GtkWidget *zoom_entry;
GtkWidget *menu_button;
-@@ -4285,12 +4299,19 @@
+ GtkWidget *menu_image;
+@@ -4194,12 +4212,20 @@ eog_window_construct_ui (EogWindow *wind
gtk_container_add (GTK_CONTAINER (window), priv->box);
gtk_widget_show (priv->box);
@@ -60,11 +62,12 @@
- gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
- gtk_widget_show (headerbar);
+ priv->headerbar = gtk_header_bar_new ();
-+ if (!in_desktop ("Unity")) {
++ if (in_desktop ("GNOME")) {
+ 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_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), TRUE);
+ gtk_container_add (GTK_CONTAINER (priv->box), priv->headerbar);
+
+ /* Need to hide toolbar when fullscreen (slideshow or normal fullscreen) */
@@ -73,9 +76,9 @@
+ }
+ gtk_widget_show (priv->headerbar);
+ #if 0
zoom_button = gtk_toggle_button_new ();
- zoom_image = gtk_image_new_from_icon_name ("zoom-in-symbolic",
-@@ -4301,7 +4322,7 @@
+@@ -4211,7 +4237,7 @@ eog_window_construct_ui (EogWindow *wind
g_signal_connect (zoom_button, "toggled",
G_CALLBACK (eog_window_zoom_button_toggled_cb),
window);
@@ -84,7 +87,7 @@
/* disable zoom button if no image is loaded */
g_object_bind_property (g_action_map_lookup_action (G_ACTION_MAP(window),
"zoom-normal"),
-@@ -4312,7 +4333,7 @@
+@@ -4222,7 +4248,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);
@@ -93,7 +96,7 @@
priv->zoom_revealer);
gtk_widget_show (priv->zoom_revealer);
-@@ -4346,7 +4367,7 @@
+@@ -4257,7 +4283,7 @@ eog_window_construct_ui (EogWindow *wind
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menu_button),
G_MENU_MODEL (builder_object));
@@ -102,7 +105,7 @@
gtk_widget_show (menu_button);
builder_object = gtk_builder_get_object (builder, "open-with-menu");
-@@ -4369,7 +4390,7 @@
+@@ -4280,7 +4306,7 @@ eog_window_construct_ui (EogWindow *wind
"win.view-fullscreen");
gtk_widget_set_tooltip_text(fullscreen_button,
_("Show the current image in fullscreen mode"));
@@ -111,3 +114,20 @@
gtk_widget_show (fullscreen_button);
priv->cbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+@@ -4397,7 +4423,7 @@ eog_window_construct_ui (EogWindow *wind
+ zoom_entry = eog_zoom_entry_new (EOG_SCROLL_VIEW (priv->view),
+ G_MENU (gtk_builder_get_object (builder,
+ "zoom-menu")));
+- gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), zoom_entry);
++ gtk_header_bar_pack_start (GTK_HEADER_BAR (priv->headerbar), zoom_entry);
+
+ priv->thumbview = g_object_ref (eog_thumb_view_new ());
+
+@@ -5103,6 +5129,7 @@ eog_window_new (EogStartupFlags flags)
+ window = EOG_WINDOW (g_object_new (EOG_TYPE_WINDOW,
+ "type", GTK_WINDOW_TOPLEVEL,
+ "application", EOG_APP,
++ "show-menubar", FALSE,
+ "startup-flags", flags,
+ NULL));
+
More information about the pkg-gnome-commits
mailing list