Bug 135612 - Fix annoying collection replication bug in audio/exaile-devel
Summary: Fix annoying collection replication bug in audio/exaile-devel
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Philip M. Gollucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-16 02:20 UTC by Joseph S. Atkinson
Modified: 2009-06-16 04:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Atkinson 2009-06-16 02:20:00 UTC

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

Obtained from exaile bzr.

Fix: This bumps PORTREVISION



=== 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 -----i1K1RGHtmUkThcIHdCWY0sbRLgqVJLCjc0ym8AdF9eIJkmPS
Content-Type: text/plain; name="exaile_collection_fix.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="exaile_collection_fix.diff"

--- 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/
Comment 1 Philip M. Gollucci freebsd_committer 2009-06-16 03:07:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

I'll take it.
Comment 2 dfilter service freebsd_committer 2009-06-16 04:20:20 UTC
pgollucci    2009-06-16 03:20:06 UTC

  FreeBSD ports repository

  Modified files:
    audio/exaile-devel   Makefile 
  Added files:
    audio/exaile-devel/files patch-xlgui__panel__collection.py 
  Log:
  This fixes the collection manager from duplicating album entries
  when adding to the playlist or collapsing the menu entry.
  
  PR:             ports/135612
  Obtained from:  exaile bzr.
  Submitted by:       "Joseph S. Atkinson" <jsa@wickedmachine.net> (maintainer)
  
  Revision  Changes    Path
  1.19      +1 -0      ports/audio/exaile-devel/Makefile
  1.1       +40 -0     ports/audio/exaile-devel/files/patch-xlgui__panel__collection.py (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Philip M. Gollucci freebsd_committer 2009-06-16 04:20:30 UTC
State Changed
From-To: open->closed

Committed. Thanks!