[ontv] ChannelDialog works again



commit c65ab0c49641ced9b7e67795ed4499789008056b
Author: Olof Kindgren <olki src gnome org>
Date:   Tue May 4 18:46:19 2010 +0200

    ChannelDialog works again
    
    Channel dialog has been broken for some time due to two reasons.
    One mistake was my fault, and the other was glade that sometimes
    drops the model of a view when the ui file is loaded.

 data/channel_dialog.ui |    1 +
 ontv/dialogs.py        |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/data/channel_dialog.ui b/data/channel_dialog.ui
index ada9bf2..010face 100644
--- a/data/channel_dialog.ui
+++ b/data/channel_dialog.ui
@@ -40,6 +40,7 @@
               <object class="GtkIconView" id="channel_iconview">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="model">channel_icon_store</property>
                 <signal name="item_activated" handler="on_channel_iconview_item_activated"/>
                 <signal name="selection_changed" handler="on_channel_iconview_selection_changed"/>
               </object>
diff --git a/ontv/dialogs.py b/ontv/dialogs.py
index c78441d..c21d9e8 100644
--- a/ontv/dialogs.py
+++ b/ontv/dialogs.py
@@ -412,7 +412,9 @@ class PreferencesDialog:
             menu.popup(None, None, None, event.button, event.time)
 
     def __edit_channel_imi_activate(self, menuitem):
-        channel = gui.get_selected_value(self.channels_treeview)
+        selection = self.channels_treeview.get_selection()
+        (model, iter) = selection.get_selected()
+        channel = model.get_value(iter,0)
         if channel:
             cd = ChannelDialog(channel, self)
             cd.dialog.show()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]