"Listen Now" menu option no longer works

Bug #626980 reported by Stephen Ostrow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pithos
Fix Released
Medium
Kevin Mehall

Bug Description

You changed the code for this menu function for efficiency, which made sense; however, your method does not work.

With the code from the trunk I get

<pre>
Traceback (most recent call last):
  File "/home/sostrow/src/pithos/./pithos/StationsDialog.py", line 129, in on_menuitem_listen
    stationslist_iter = model.convert_iter_to_child_iter(iter)
TypeError: Required argument 'sorted_iter' (pos 2) not found
</pre>

If I add the following patch as the api for gtk.TreeModelSort::convert_iter_to_child_iter calls for (http://www.pygtk.org/docs/pygtk/class-gtktreemodelsort.html#method-gtktreemodelsort--convert-iter-to-child-iter)
<pre>
=== modified file 'pithos/StationsDialog.py'
--- pithos/StationsDialog.py 2010-08-12 17:05:00 +0000
+++ pithos/StationsDialog.py 2010-08-30 18:29:31 +0000
@@ -126,7 +126,7 @@
         sel = self.treeview.get_selection().get_selected()
         if sel:
             model, iter = sel
- stationslist_iter = model.convert_iter_to_child_iter(iter)
+ stationslist_iter = model.convert_iter_to_child_iter(None, iter)
             self.pithos.stations_combo.set_active_iter(stationslist_iter)
             self.hide()
</pre>

I still get the following error

<pre>
/home/sostrow/src/pithos/./pithos/StationsDialog.py:130: GtkWarning: gtk_list_store_get_path: assertion `iter->stamp == GTK_LIST_STORE (tree_model)->stamp' failed
  self.pithos.stations_combo.set_active_iter(stationslist_iter)
</pre>

I think this has to do with it coming from a different model, but it shouldn't be. I'm guess you had it working with this method so I'll put a bug in for you.

Thanks.

Changed in pithos:
status: New → Fix Committed
assignee: nobody → Kevin Mehall (kevin-mehall)
importance: Undecided → Medium
Changed in pithos:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.