ports/135612: Fix annouying collection replication bug in audio/exaile-devel

Joseph S. Atkinson jsa at wickedmachine.net
Tue Jun 16 01:20:02 UTC 2009


>Number:         135612
>Category:       ports
>Synopsis:       Fix annouying collection replication bug in audio/exaile-devel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 16 01:20:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Joseph S. Atkinson
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:


System: FreeBSD 8.0-CURRENT #0 r194047: Fri Jun 12 04:13:43 EDT 2009
    jsa at shaitan.wickedmachine.net:/usr/obj/usr/src/sys/SHAITAN



>Description:


This fixes the collection manager from duplicating album entries when adding to the playlist or collapsing the menu entry.

Obtained from exaile bzr.


>How-To-Repeat:





>Fix:


This bumps PORTREVISION

--- exaile_collection_fix.diff begins here ---
--- audio/exaile-devel/Makefile	2009-06-12 04:26:42.000000000 -0400
+++ audio/exaile-devel/Makefile	2009-06-15 21:04:46.205743466 -0400
@@ -7,6 +7,7 @@
 
 PORTNAME=	exaile
 DISTVERSION=	0.2.99.2
+PORTREVISION=	1
 CATEGORIES=	audio
 MASTER_SITES=	http://www.exaile.org/files/ \
 		http://wickedmachine.net/~jsa/FreeBSD/distfiles/
--- exaile_collection_fix.diff ends here ---
--- patch-xlgui:panel:collection.py begins here ---
=== modified file 'xlgui/panel/collection.py'
--- xlgui/panel/collection.py	2009-06-08 03:19:00 +0000

This goes in audio/exaile-devel/files/

+++ xlgui/panel/collection.py	2009-06-16 00:49:34 +0000
@@ -224,11 +224,7 @@
             self.menu.popup(event)
 
     def on_expanded(self, tree, iter, path):
-        if self.model.iter_n_children(iter) == 1 and \
-            self.model.get_value(self.model.iter_children(iter), 1) == None:
-            iter_sep = self.model.iter_children(iter)
-            self.load_subtree(iter)
-            self.model.remove(iter_sep)
+        self.load_subtree(iter)
 
     def get_node_keywords(self, parent):
         if not parent:
@@ -291,10 +287,16 @@
         self.controller.main.update_track_counts()
 
     def load_subtree(self, parent):
+        iter_sep = None
         if parent == None:
             depth = 0
         else:
-            depth = self.model.iter_depth(parent) +1
+            if self.model.iter_n_children(parent) != 1 or \
+                self.model.get_value(self.model.iter_children(parent), 1) != None:
+                return
+            iter_sep = self.model.iter_children(parent)
+            depth = self.model.iter_depth(parent) + 1
+
         terms = self.get_node_search_terms(parent)
         if terms:
             search = " ".join(terms)
@@ -378,3 +380,6 @@
             iter = self.model.append(parent, [image, v, None])
             if not bottom:
                 self.model.append(iter, [None, None, None])
+
+        if iter_sep is not None:
+            self.model.remove(iter_sep)

--- patch-xlgui:panel:collection.py ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list