Gtk3: Fix Report and Tool selection dialogs

svn: r20231
This commit is contained in:
Nick Hall 2012-08-18 23:13:28 +00:00
parent 379fc274ad
commit 885523602d
2 changed files with 6 additions and 7 deletions

View File

@ -73,12 +73,12 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<child> <child>
<object class="GtkScrolledWindow" id="scrolledwindow3"> <object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="width_request">250</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="shadow_type">in</property> <property name="shadow_type">in</property>
<child> <child>
<object class="GtkTreeView" id="tree"> <object class="GtkTreeView" id="tree">
<property name="width_request">200</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="headers_visible">False</property> <property name="headers_visible">False</property>

View File

@ -82,8 +82,7 @@ class PluginDialog(ManagedWindow):
self.content = content self.content = content
self._pmgr = GuiPluginManager.get_instance() self._pmgr = GuiPluginManager.get_instance()
ManagedWindow.__init__(self, uistate, track, ManagedWindow.__init__(self, uistate, track, self.__class__)
self.__class__)
self.state = state self.state = state
self.uistate = uistate self.uistate = uistate
@ -100,7 +99,7 @@ class PluginDialog(ManagedWindow):
window = self.dialog.get_object("report") window = self.dialog.get_object("report")
self.title = self.dialog.get_object("title") self.title = self.dialog.get_object("title")
self.set_window(window, self.title, msg ) self.set_window(window, self.title, msg)
self.store = Gtk.TreeStore(str) self.store = Gtk.TreeStore(str)
self.selection = self.tree.get_selection() self.selection = self.tree.get_selection()
@ -156,7 +155,7 @@ class PluginDialog(ManagedWindow):
store, node = self.selection.get_selected() store, node = self.selection.get_selected()
if node: if node:
path = store.get_path(node) path = store.get_path(node).to_string()
if not node or path not in self.imap: if not node or path not in self.imap:
return return
pdata = self.imap[path] pdata = self.imap[path]
@ -225,7 +224,7 @@ class PluginDialog(ManagedWindow):
ilist.append((next, item)) ilist.append((next, item))
self.store.set(next, 0, item.name) self.store.set(next, 0, item.name)
for next, tab in ilist: for next, tab in ilist:
path = self.store.get_path(next) path = self.store.get_path(next).to_string()
self.imap[path] = tab self.imap[path] = tab
def run_plugin(self, pdata): def run_plugin(self, pdata):