summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgusi <gusi@df743ca5-7f9a-e211-a948-0013205c9059>2014-05-31 17:31:25 +0800
committergusi <gusi@df743ca5-7f9a-e211-a948-0013205c9059>2014-05-31 17:31:25 +0800
commite56edc950dac83a8779cf1759af2dc4b904561ef (patch)
tree8cf750dc2157983d27633db7628f8058e7d3492b
parent4ecb648e6b0f5ba6b4cb9389d7b0e8944b555693 (diff)
downloadmarcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.tar
marcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.tar.gz
marcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.tar.bz2
marcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.tar.lz
marcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.tar.xz
marcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.tar.zst
marcuscom-ports-e56edc950dac83a8779cf1759af2dc4b904561ef.zip
Pull in a few changes in the gnome-music git repository.
[1] commits 118f270f9b and e357c1fcda git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@19714 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--audio/gnome-music/Makefile5
-rw-r--r--audio/gnome-music/files/patch-gnomemusic_grilo.py30
-rw-r--r--audio/gnome-music/files/patch-gnomemusic_view.py76
-rw-r--r--audio/gnome-music/files/patch-gnomemusic_widget.py29
-rw-r--r--audio/gnome-music/files/patch-gnomemusic_window.py52
5 files changed, 189 insertions, 3 deletions
diff --git a/audio/gnome-music/Makefile b/audio/gnome-music/Makefile
index 6a319d4f2..41f26bfa4 100644
--- a/audio/gnome-music/Makefile
+++ b/audio/gnome-music/Makefile
@@ -4,6 +4,7 @@
PORTNAME= gnome-music
PORTVERSION= 3.12.2.1
+PORTREVISION= 1
CATEGORIES= audio gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome3
@@ -25,10 +26,8 @@ INSTALLS_ICONS= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV= XDG_CACHE_HOME=${WRKDIR}
+INSTALL_TARGET= install-strip
GLIB_SCHEMAS= org.gnome.Music.gschema.xml
-post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gnome-music/libgd.so
-
.include <bsd.port.mk>
diff --git a/audio/gnome-music/files/patch-gnomemusic_grilo.py b/audio/gnome-music/files/patch-gnomemusic_grilo.py
new file mode 100644
index 000000000..7a0125093
--- /dev/null
+++ b/audio/gnome-music/files/patch-gnomemusic_grilo.py
@@ -0,0 +1,30 @@
+From e357c1fcda9ed1404137f1f941a63c50767250cc Mon Sep 17 00:00:00 2001
+From: Sai Suman Prayaga <suman.sai14@gmail.com>
+Date: Thu, 22 May 2014 22:27:58 +0530
+Subject: Dont update in selection mode
+
+https://bugzilla.gnome.org/show_bug.cgi?id=726713
+
+diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
+index efcea25..0de28df 100644
+--- gnomemusic/grilo.py
++++ gnomemusic/grilo.py
+@@ -68,6 +68,8 @@ class Grilo(GObject.GObject):
+ self.tracker = None
+ self.changed_media_ids = []
+ self.pending_event_id = 0
++ self.changes_pending = {'Albums': False, 'Artists': False, 'Songs': False}
++ self.registry = Grl.Registry.get_default()
+
+ self.registry = Grl.Registry.get_default()
+ self.registry.connect('source_added', self._on_source_added)
+@@ -112,6 +114,9 @@ class Grilo(GObject.GObject):
+ def emit_change_signal(self):
+ self.changed_media_ids = []
+ self.pending_event_id = 0
++ self.changes_pending['Albums'] = True
++ self.changes_pending['Artists'] = True
++ self.changes_pending['Songs'] = True
+ self.emit('changes-pending')
+ return False
+
diff --git a/audio/gnome-music/files/patch-gnomemusic_view.py b/audio/gnome-music/files/patch-gnomemusic_view.py
new file mode 100644
index 000000000..2a6a38c66
--- /dev/null
+++ b/audio/gnome-music/files/patch-gnomemusic_view.py
@@ -0,0 +1,76 @@
+--- gnomemusic/view.py 2014-05-31 11:19:51.201606678 +0000
++++ gnomemusic/view.py.orig 2014-05-31 11:19:51.157607277 +0000
+@@ -372,17 +372,11 @@
+
+ @log
+ def _on_changes_pending(self, data=None):
+- if (self._init and self.header_bar._selectionMode is False):
++ if (self._init):
+ self._offset = 0
+ self._cached_count = -1
+ self._model.clear()
+ self.populate()
+- grilo.changes_pending['Albums'] = False
+-
+- @log
+- def _on_selection_mode_changed(self, widget, data=None):
+- if self.header_bar._selectionMode is False and grilo.changes_pending['Albums'] is True:
+- self._on_changes_pending()
+
+ @log
+ def _back_button_clicked(self, widget, data=None):
+@@ -465,17 +459,11 @@
+
+ @log
+ def _on_changes_pending(self, data=None):
+- if (self._init and self.header_bar._selectionMode is False):
++ if (self._init):
+ self._model.clear()
+ self._offset = 0
+ self._cached_count = -1
+ self.populate()
+- grilo.changes_pending['Songs'] = False
+-
+- @log
+- def _on_selection_mode_changed(self, widget, data=None):
+- if self.header_bar._selectionMode is False and grilo.changes_pending['Songs'] is True:
+- self._on_changes_pending()
+
+ @log
+ def _on_item_activated(self, widget, id, path):
+@@ -658,13 +646,12 @@
+
+ @log
+ def _on_changes_pending(self, data=None):
+- if (self._init and self.header_bar._selectionMode is False):
++ if (self._init):
+ self._model.clear()
+ self._artists.clear()
+ self._offset = 0
+ self._cached_count = -1
+ self._populate()
+- grilo.changes_pending['Artists'] = False
+
+ @log
+ def _populate(self, data=None):
+@@ -776,12 +763,6 @@
+ self._last_selection)
+
+ @log
+- def _on_selection_mode_changed(self, widget, data=None):
+- self.artistAlbumsStack.set_sensitive(not self.header_bar._selectionMode)
+- if self.header_bar._selectionMode is False and grilo.changes_pending['Artists'] is True:
+- self._on_changes_pending()
+-
+- @log
+ def get_selected_track_uris(self, callback):
+ self.items_selected = []
+ self.items_selected_callback = callback
+@@ -1108,7 +1089,6 @@
+ self.playlists_sidebar.set_sensitive(not self.header_bar._selectionMode)
+ self.menubutton.set_sensitive(not self.header_bar._selectionMode)
+
+-
+ @log
+ def _on_play_activate(self, menuitem, data=None):
+ _iter = self._model.get_iter_first()
diff --git a/audio/gnome-music/files/patch-gnomemusic_widget.py b/audio/gnome-music/files/patch-gnomemusic_widget.py
new file mode 100644
index 000000000..21610eed4
--- /dev/null
+++ b/audio/gnome-music/files/patch-gnomemusic_widget.py
@@ -0,0 +1,29 @@
+diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
+index ee5835d..81c48c3 100644
+--- gnomemusic/widgets.py
++++ gnomemusic/widgets.py
+@@ -140,11 +140,13 @@ class AlbumWidget(Gtk.EventBox):
+ )
+ self.view.set_view_type(Gd.MainViewType.LIST)
+ self.album = None
++ self.header_bar = None
+ self.view.connect('item-activated', self._on_item_activated)
+ self.monitors = []
+ view_box = self.ui.get_object('view')
+ self.ui.get_object('scrolledWindow').set_placement(Gtk.CornerType.
+ TOP_LEFT)
++ self.view.connect('selection-mode-request', self._on_selection_mode_request)
+ child_view = self.view.get_children()[0]
+ child_view.set_margin_top(64)
+ child_view.set_margin_bottom(64)
+@@ -159,6 +161,10 @@ class AlbumWidget(Gtk.EventBox):
+ self.show_all()
+
+ @log
++ def _on_selection_mode_request(self, *args):
++ self.header_bar._select_button.clicked()
++
++ @log
+ def _on_item_activated(self, widget, id, path):
+ child_path = self.filter.convert_path_to_child_path(path)
+ _iter = self.model.get_iter(child_path)
diff --git a/audio/gnome-music/files/patch-gnomemusic_window.py b/audio/gnome-music/files/patch-gnomemusic_window.py
new file mode 100644
index 000000000..c2503a6ed
--- /dev/null
+++ b/audio/gnome-music/files/patch-gnomemusic_window.py
@@ -0,0 +1,52 @@
+diff --git a/gnomemusic/window.py b/gnomemusic/window.py
+index 33c49b9..fc59150 100644
+--- gnomemusic/window.py
++++ gnomemusic/window.py
+@@ -116,17 +116,17 @@ class Window(Gtk.ApplicationWindow):
+ if cursor is not None and cursor.next(None):
+ count = cursor.get_integer(0)
+ if not count > 0:
+- print("switching to Empty view")
+- self._stack.disconnect(self._on_notify_model_id)
+- self.disconnect(self._key_press_event_id)
+- for i in range(0, 4):
+- view = self.views.pop()
+- view.destroy()
+- self.toolbar.hide_stack()
+- self._switch_to_empty_view()
++ if self.toolbar._selectionMode is False and len(self.views) != 1:
++ self._stack.disconnect(self._on_notify_model_id)
++ self.disconnect(self._key_press_event_id)
++ view_count = len(self.views)
++ for i in range(0, view_count):
++ view = self.views.pop()
++ view.destroy()
++ self.toolbar.hide_stack()
++ self._switch_to_empty_view()
+ else:
+ if (self.views[0] == self.views[-1]):
+- print("switching to player view")
+ view = self.views.pop()
+ view.destroy()
+ self._switch_to_player_view()
+@@ -207,7 +207,8 @@ class Window(Gtk.ApplicationWindow):
+ self._switch_to_player_view()
+ # To revert to the No Music View when no songs are found
+ else:
+- self._switch_to_empty_view()
++ if self.toolbar._selectionMode is False:
++ self._switch_to_empty_view()
+
+ self.toolbar._search_button.connect('toggled', self._on_search_toggled)
+ self.toolbar.connect('selection-mode-changed', self._on_selection_mode_changed)
+@@ -340,7 +341,9 @@ class Window(Gtk.ApplicationWindow):
+
+ @log
+ def _on_selection_mode_changed(self, widget, data=None):
+- if self.toolbar._selectionMode:
++ if self.toolbar._selectionMode is False:
++ self._on_changes_pending()
++ else:
+ in_playlist = self._stack.get_visible_child() == self.views[3]
+ self.selection_toolbar._add_to_playlist_button.set_visible(not in_playlist)
+ self.selection_toolbar._remove_from_playlist_button.set_visible(in_playlist)