Control: tags 826250 + patch

Dear maintainer,

I've prepared an NMU for goobox (versioned as 3.4.1-6.1). The diff
is attached to this message.

Regards.
diff -Nru goobox-3.4.1/debian/changelog goobox-3.4.1/debian/changelog
--- goobox-3.4.1/debian/changelog       2016-03-20 16:20:40.000000000 +0100
+++ goobox-3.4.1/debian/changelog       2016-07-05 17:37:01.000000000 +0200
@@ -1,3 +1,15 @@
+goobox (3.4.1-6.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Drop the dependency against gnome-icon-theme-symbolic package, goobox uses
+    gtk3 that uses adwaita-icon-theme which is pulled by default (Closes:
+    #826250)
+  * d/p/0001-Let-s-GTK-automatically-load-rtl-icon-variants.patch: GTK3 should
+    now load the RTL version of the icons when needed, this makes the icons
+    from the adwaita icons theme display properly in that case.
+
+ -- Laurent Bigonville <[email protected]>  Tue, 05 Jul 2016 17:37:00 +0200
+
 goobox (3.4.1-6) unstable; urgency=medium
 
   * po/tr.po added from upstream git.
diff -Nru goobox-3.4.1/debian/control goobox-3.4.1/debian/control
--- goobox-3.4.1/debian/control 2016-02-09 18:05:22.000000000 +0100
+++ goobox-3.4.1/debian/control 2016-07-05 17:34:46.000000000 +0200
@@ -14,7 +14,7 @@
 Package: goobox
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, 
-    gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, 
gnome-icon-theme-symbolic
+    gstreamer1.0-plugins-base, gstreamer1.0-plugins-good
 Recommends: dbus-x11, yelp
 Suggests: gstreamer1.0-plugins-ugly
 Description: CD player and ripper with GNOME 3 integration
diff -Nru 
goobox-3.4.1/debian/patches/0001-Let-s-GTK-automatically-load-rtl-icon-variants.patch
 
goobox-3.4.1/debian/patches/0001-Let-s-GTK-automatically-load-rtl-icon-variants.patch
--- 
goobox-3.4.1/debian/patches/0001-Let-s-GTK-automatically-load-rtl-icon-variants.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
goobox-3.4.1/debian/patches/0001-Let-s-GTK-automatically-load-rtl-icon-variants.patch
       2016-07-05 17:24:48.000000000 +0200
@@ -0,0 +1,200 @@
+From f8290c3f1f4e3da4fcdf4f789d187020896bd403 Mon Sep 17 00:00:00 2001
+From: Laurent Bigonville <[email protected]>
+Date: Tue, 5 Jul 2016 17:20:55 +0200
+Subject: [PATCH] Let's GTK+ automatically load rtl icon variants
+
+Since GTK 3.13.2, it will automatically load the RTL variant of the
+icons when needed.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=768451
+---
+ configure.ac         |  2 +-
+ src/dlg-properties.c |  7 ++-----
+ src/goo-player-bar.c | 11 ++++-------
+ src/goo-window.c     |  8 ++------
+ src/gtk-utils.h      |  3 ---
+ src/main.c           |  7 ++-----
+ 6 files changed, 11 insertions(+), 27 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9cadce8..94694c9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,7 +16,7 @@ GNOME_MAINTAINER_MODE_DEFINES
+ GLIB_GSETTINGS
+ 
+ GLIB_REQUIRED=2.36
+-GTK_REQUIRED=3.10.0
++GTK_REQUIRED=3.13.2
+ GSTREAMER_REQUIRED=1.0.0
+ LIBNOTIFY_REQUIRED=0.4.3
+ LIBMUSICBRAINZ5_REQUIRED=5.0.0
+diff --git a/src/dlg-properties.c b/src/dlg-properties.c
+index 2e05511..5e84180 100644
+--- a/src/dlg-properties.c
++++ b/src/dlg-properties.c
+@@ -484,15 +484,12 @@ dlg_properties (GooWindow *window)
+ {
+       DialogData *data;
+       GtkWidget *image;
+-      gboolean rtl;
+ 
+         if (window->properties_dialog != NULL) {
+               gtk_window_present (GTK_WINDOW (window->properties_dialog));
+               return;
+         }
+ 
+-        rtl = gtk_widget_get_direction (GTK_WIDGET (window)) == 
GTK_TEXT_DIR_RTL;
+-
+       data = g_new0 (DialogData, 1);
+       data->window = window;
+       data->builder = _gtk_builder_new_from_resource ("properties.ui");
+@@ -507,11 +504,11 @@ dlg_properties (GooWindow *window)
+ 
+       image = GET_WIDGET ("prev_album_image");
+       gtk_image_set_from_icon_name (GTK_IMAGE (image),
+-                                    rtl ? "go-previous-rtl-symbolic" : 
"go-previous-symbolic",
++                                    "go-previous-symbolic",
+                                     GTK_ICON_SIZE_MENU);
+       image = GET_WIDGET ("next_album_image");
+       gtk_image_set_from_icon_name (GTK_IMAGE (image),
+-                                    rtl ? "go-next-rtl-symbolic" : 
"go-next-symbolic",
++                                    "go-next-symbolic",
+                                     GTK_ICON_SIZE_MENU);
+ 
+       /* Set widgets data. */
+diff --git a/src/goo-player-bar.c b/src/goo-player-bar.c
+index 8734c27..9776d43 100644
+--- a/src/goo-player-bar.c
++++ b/src/goo-player-bar.c
+@@ -219,9 +219,6 @@ goo_player_bar_construct (GooPlayerBar     *self,
+       GtkWidget *main_box;
+       GtkWidget *button_box;
+       GtkWidget *button;
+-      gboolean   rtl;
+-
+-      rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
+ 
+       frame = gtk_event_box_new ();
+       gtk_style_context_add_class (gtk_widget_get_style_context (frame), 
GTK_STYLE_CLASS_BACKGROUND);
+@@ -237,7 +234,7 @@ goo_player_bar_construct (GooPlayerBar     *self,
+ 
+       /* Play buttons */
+ 
+-      self->priv->play_button_image = gtk_image_new_from_icon_name (rtl ? 
GOO_ICON_NAME_PLAY_RTL : GOO_ICON_NAME_PLAY, PLAY_BUTTON_SIZE);
++      self->priv->play_button_image = gtk_image_new_from_icon_name 
(GOO_ICON_NAME_PLAY, PLAY_BUTTON_SIZE);
+       button = gtk_button_new ();
+       gtk_container_add (GTK_CONTAINER (button), 
self->priv->play_button_image);
+       gtk_actionable_set_action_name (GTK_ACTIONABLE (button), 
"win.toggle-play");
+@@ -247,11 +244,11 @@ goo_player_bar_construct (GooPlayerBar   *self,
+       gtk_style_context_add_class (gtk_widget_get_style_context (button_box), 
GTK_STYLE_CLASS_LINKED);
+       gtk_box_pack_start (GTK_BOX (main_box), button_box, FALSE, FALSE, 0);
+ 
+-      button = gtk_button_new_from_icon_name (rtl ? GOO_ICON_NAME_PREV_RTL : 
GOO_ICON_NAME_PREV, GTK_ICON_SIZE_SMALL_TOOLBAR);
++      button = gtk_button_new_from_icon_name (GOO_ICON_NAME_PREV, 
GTK_ICON_SIZE_SMALL_TOOLBAR);
+       gtk_actionable_set_action_name (GTK_ACTIONABLE (button), 
"win.previous-track");
+       gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
+ 
+-      button = gtk_button_new_from_icon_name (rtl ? GOO_ICON_NAME_NEXT_RTL : 
GOO_ICON_NAME_NEXT, GTK_ICON_SIZE_SMALL_TOOLBAR);
++      button = gtk_button_new_from_icon_name (GOO_ICON_NAME_NEXT, 
GTK_ICON_SIZE_SMALL_TOOLBAR);
+       gtk_actionable_set_action_name (GTK_ACTIONABLE (button), 
"win.next-track");
+       gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 0);
+ 
+@@ -452,7 +449,7 @@ _goo_player_bar_update_play_button_icon (GooPlayerBar 
*self,
+                                        gboolean      playing)
+ {
+       gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->play_button_image),
+-                                    playing ? GOO_ICON_NAME_PAUSE : 
(gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL ? 
GOO_ICON_NAME_PLAY_RTL : GOO_ICON_NAME_PLAY),
++                                    playing ? GOO_ICON_NAME_PAUSE : 
GOO_ICON_NAME_PLAY,
+                                     PLAY_BUTTON_SIZE);
+ }
+ 
+diff --git a/src/goo-window.c b/src/goo-window.c
+index cdfd12e..eaffc06 100644
+--- a/src/goo-window.c
++++ b/src/goo-window.c
+@@ -1531,12 +1531,8 @@ player_done_cb (GooPlayer       *player,
+               GError          *error,
+               GooWindow       *window)
+ {
+-      gboolean rtl;
+-
+       debug (DEBUG_INFO, "DONE [%s]\n", get_action_name (action));
+ 
+-      rtl = gtk_widget_get_direction (GTK_WIDGET (window)) == 
GTK_TEXT_DIR_RTL;
+-
+       switch (action) {
+       case GOO_PLAYER_ACTION_LIST:
+               goo_window_update_album (window);
+@@ -1566,14 +1562,14 @@ player_done_cb (GooPlayer       *player,
+       case GOO_PLAYER_ACTION_SEEK_SONG:
+               goo_window_set_current_track (window, 
goo_player_get_current_track (window->priv->player));
+               goo_window_select_current_track (window);
+-              set_current_track_icon (window, rtl ? GOO_ICON_NAME_PLAY_RTL : 
GOO_ICON_NAME_PLAY);
++              set_current_track_icon (window, GOO_ICON_NAME_PLAY);
+               break;
+ 
+       case GOO_PLAYER_ACTION_PLAY:
+       case GOO_PLAYER_ACTION_STOP:
+       case GOO_PLAYER_ACTION_MEDIUM_REMOVED:
+               if (action == GOO_PLAYER_ACTION_PLAY) {
+-                      set_current_track_icon (window, rtl ? 
GOO_ICON_NAME_PLAY_RTL : GOO_ICON_NAME_PLAY);
++                      set_current_track_icon (window, GOO_ICON_NAME_PLAY);
+                       window->priv->next_timeout_handle = g_idle_add 
(next_time_idle, window);
+               }
+               else if (action == GOO_PLAYER_ACTION_STOP)
+diff --git a/src/gtk-utils.h b/src/gtk-utils.h
+index 0538917..b6b9d5f 100644
+--- a/src/gtk-utils.h
++++ b/src/gtk-utils.h
+@@ -40,13 +40,10 @@ G_BEGIN_DECLS
+ #define _GTK_LABEL_RESET _("_Reset")
+ 
+ #define GOO_ICON_NAME_PLAY        "media-playback-start-symbolic"
+-#define GOO_ICON_NAME_PLAY_RTL    "media-playback-start-rtl-symbolic"
+ #define GOO_ICON_NAME_PAUSE       "media-playback-pause-symbolic"
+ #define GOO_ICON_NAME_STOP        "media-playback-stop-symbolic"
+ #define GOO_ICON_NAME_NEXT        "media-skip-forward-symbolic"
+-#define GOO_ICON_NAME_NEXT_RTL    "media-skip-forward-rtl-symbolic"
+ #define GOO_ICON_NAME_PREV        "media-skip-backward-symbolic"
+-#define GOO_ICON_NAME_PREV_RTL    "media-skip-backward-rtl-symbolic"
+ #define GOO_ICON_NAME_EJECT       "media-eject-symbolic"
+ #define GOO_ICON_NAME_EXTRACT     "document-save-symbolic"
+ #define GOO_ICON_NAME_RESET       "goo-reset"
+diff --git a/src/main.c b/src/main.c
+index 06fe5f0..3e6a0e7 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -260,12 +260,9 @@ system_notify (GooWindow       *window,
+       notify_notification_set_image_from_pixbuf (notification, cover);
+ 
+       if (notification_supports_actions) {
+-              gboolean rtl;
+ 
+               notify_notification_clear_actions (notification);
+ 
+-              rtl = gtk_widget_get_direction (GTK_WIDGET (window)) == 
GTK_TEXT_DIR_RTL;
+-
+               if (goo_player_get_state (goo_window_get_player (window)) == 
GOO_PLAYER_STATE_PLAYING)
+                       notify_notification_add_action (notification,
+                                                       GOO_ICON_NAME_PAUSE,
+@@ -275,14 +272,14 @@ system_notify (GooWindow       *window,
+                                                       NULL);
+               else
+                       notify_notification_add_action (notification,
+-                                                      rtl ? 
GOO_ICON_NAME_PLAY : GOO_ICON_NAME_PLAY,
++                                                      GOO_ICON_NAME_PLAY,
+                                                       _("Play"),
+                                                       
notify_action_toggle_play_cb,
+                                                       window,
+                                                       NULL);
+ 
+               notify_notification_add_action (notification,
+-                                              rtl ? GOO_ICON_NAME_NEXT_RTL : 
GOO_ICON_NAME_NEXT,
++                                              GOO_ICON_NAME_NEXT,
+                                               _("Next"),
+                                               notify_action_next_cb,
+                                               window,
+-- 
+2.8.1
+
diff -Nru goobox-3.4.1/debian/patches/series goobox-3.4.1/debian/patches/series
--- goobox-3.4.1/debian/patches/series  2016-03-20 16:15:08.000000000 +0100
+++ goobox-3.4.1/debian/patches/series  2016-07-05 17:26:14.000000000 +0200
@@ -3,3 +3,4 @@
 enhance_desktopfile
 update_lt.diff
 add_tr.patch
+0001-Let-s-GTK-automatically-load-rtl-icon-variants.patch

Reply via email to