[67134] trunk/dports/python/quodlibet

rmsfisher at macports.org rmsfisher at macports.org
Thu Apr 29 19:53:16 PDT 2010


Revision: 67134
          http://trac.macports.org/changeset/67134
Author:   rmsfisher at macports.org
Date:     2010-04-29 19:53:14 -0700 (Thu, 29 Apr 2010)
Log Message:
-----------
python/quodlibet applied patch from upstream to fix http://code.google.com/p/quodlibet/issues/detail?id=417

Modified Paths:
--------------
    trunk/dports/python/quodlibet/Portfile

Added Paths:
-----------
    trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-properties.py.diff
    trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-x.py.diff

Modified: trunk/dports/python/quodlibet/Portfile
===================================================================
--- trunk/dports/python/quodlibet/Portfile	2010-04-30 02:47:48 UTC (rev 67133)
+++ trunk/dports/python/quodlibet/Portfile	2010-04-30 02:53:14 UTC (rev 67134)
@@ -6,7 +6,7 @@
 
 name                quodlibet
 version             2.2.1
-revision            1
+revision            2
 categories-append   audio gnome
 maintainers         elelay rmsfisher openmaintainer
 platforms           darwin
@@ -39,8 +39,9 @@
                     port:py26-feedparser \
                     port:python-musicbrainz2
 
-patchfiles          patch-setup.py.diff
-
+patchfiles          patch-setup.py.diff \
+                    patch-quodlibet-qltk-properties.py.diff \
+                    patch-quodlibet-qltk-x.py.diff
 post-patch {
     foreach file { quodlibet.py exfalso.py } {
         reinplace "s|/usr/bin/env python|${frameworks_dir}/Python.framework/Versions/2.6/bin/python2.6|g" \

Added: trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-properties.py.diff
===================================================================
--- trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-properties.py.diff	                        (rev 0)
+++ trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-properties.py.diff	2010-04-30 02:53:14 UTC (rev 67134)
@@ -0,0 +1,11 @@
+--- quodlibet/qltk/properties.py.orig	2010-04-29 21:21:40.000000000 -0500
++++ quodlibet/qltk/properties.py	2010-04-29 21:21:59.000000000 -0500
+@@ -24,7 +24,7 @@
+                      }
+ 
+     def __init__(self, library, songs, parent=None):
+-        super(SongProperties, self).__init__()
++        super(SongProperties, self).__init__(dialog=False)
+         self.set_transient_for(qltk.get_top_parent(parent))
+         if len(songs) > 1: self.set_default_size(600, 400)
+         else: self.set_default_size(400, 400)

Added: trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-x.py.diff
===================================================================
--- trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-x.py.diff	                        (rev 0)
+++ trunk/dports/python/quodlibet/files/patch-quodlibet-qltk-x.py.diff	2010-04-30 02:53:14 UTC (rev 67134)
@@ -0,0 +1,72 @@
+--- quodlibet/qltk/x.py.orig	2010-04-29 21:21:46.000000000 -0500
++++ quodlibet/qltk/x.py	2010-04-29 21:21:59.000000000 -0500
+@@ -11,6 +11,7 @@
+ import gtk
+ 
+ from quodlibet import util
++from quodlibet.qltk import get_top_parent
+ 
+ class Window(gtk.Window):
+     """A Window that binds the ^W accelerator to close. This should not
+@@ -21,11 +22,14 @@
+     __gsignals__ = {"close-accel": (
+         gobject.SIGNAL_RUN_LAST|gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())}
+     def __init__(self, *args, **kwargs):
++        dialog = kwargs.pop("dialog", True)
+         super(Window, self).__init__(*args, **kwargs)
+         type(self).childs.append(self)
+         self.__accels = gtk.AccelGroup()
+-        self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
++        if dialog:
++            self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
+         self.set_destroy_with_parent(True)
++        self.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
+         self.add_accel_group(self.__accels)
+         self.add_accelerator(
+             'close-accel', self.__accels, ord('w'), gtk.gdk.CONTROL_MASK, 0)
+@@ -34,11 +38,17 @@
+         self.connect_object('destroy', type(self).childs.remove, self)
+ 
+     def set_transient_for(self, parent):
++        if parent is None:
++            from quodlibet.widgets import main as parent
+         super(Window, self).set_transient_for(parent)
+-        if parent is not None:
+-            self.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
+ 
+     def do_close_accel(self):
++        #Do not close the window if we edit a gtk.CellRendererText.
++        #Focus the treeview instead.
++        if isinstance(self.get_focus(), gtk.Entry) and \
++            isinstance(self.get_focus().parent, gtk.TreeView):
++            self.get_focus().parent.grab_focus()
++            return
+         if not self.emit('delete-event', gtk.gdk.Event(gtk.gdk.DELETE)):
+             self.destroy()
+ 
+@@ -50,11 +60,21 @@
+     __window = None
+ 
+     def __new__(klass, *args):
+-        if klass.__window is None:
++        window = klass.__window
++        if window is None:
+             return super(UniqueWindow, klass).__new__(klass, *args)
+-        else:
+-            klass.__window.present()
+-            return klass.__window
++        #Look for widgets in the args, if there is one and it has
++        #a new top level window, reparent and reposition the window.
++        widgets = filter(lambda x: isinstance(x, gtk.Widget), args)
++        if widgets:
++            parent = window.get_transient_for()
++            new_parent = get_top_parent(widgets[0])
++            if parent and new_parent and parent is not new_parent:
++                window.set_transient_for(new_parent)
++                window.hide()
++                window.show()
++        window.present()
++        return window
+ 
+     @classmethod
+     def is_not_unique(klass):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100429/f2990edf/attachment-0001.html>


More information about the macports-changes mailing list