summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-04-02 13:30:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-02 13:30:16 +0200
commit2fbeaa3f46cfba6d9eb084229fffda33bbe02ddc (patch)
tree2a787e904770c300b80edebe3044f99f8b7b09ad /src
parent4680765883c0ecad4aaf6540d78aea30a1f16f19 (diff)
downloadabrt-2fbeaa3f46cfba6d9eb084229fffda33bbe02ddc.tar.gz
abrt-2fbeaa3f46cfba6d9eb084229fffda33bbe02ddc.tar.xz
abrt-2fbeaa3f46cfba6d9eb084229fffda33bbe02ddc.zip
gui: fix 551989 "crash detected in abrt-gui-1.0.0-1.fc12" and such
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Acked-by: Jiri Moskovcak <jmoskovc@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/Gui/CCMainWindow.py26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index 50ce3acb..a850f52a 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -194,8 +194,18 @@ class MainWindow():
# for later..
return True
+ def dumplist_get_selected(self):
+ selection = self.dlist.get_selection()
+ if selection:
+ # returns (dumpsListStore, path) tuple
+ dumpsListStore, path = selection.get_selected_rows()
+ print path
+ return dumpsListStore, path
+ else:
+ return None, None
+
def on_tvDumps_cursor_changed(self, treeview):
- dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
+ dumpsListStore, path = self.dumplist_get_selected()
if not path:
self.wTree.get_widget("bDelete").set_sensitive(False)
self.wTree.get_widget("bReport").set_sensitive(False)
@@ -291,7 +301,7 @@ class MainWindow():
return False
def on_bDelete_clicked(self, button, treeview):
- dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
+ dumpsListStore, path = self.dumplist_get_selected()
if not path:
return
# this should work until we keep the dump object in the last position
@@ -310,15 +320,15 @@ class MainWindow():
except Exception, ex:
print ex
- def dumplist_get_selected(self):
- dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
+ def dumplist_get_selected_values(self):
+ dumpsListStore, path = self.dumplist_get_selected()
if path and dumpsListStore:
return dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)
return None
def on_b_copy_clicked(self, button):
clipboard = gtk.clipboard_get()
- dump = self.dumplist_get_selected()
+ dump = self.dumplist_get_selected_values()
if not dump:
gui_info_dialog(_("You have to select a crash to copy."), parent=self.window)
return
@@ -343,7 +353,7 @@ class MainWindow():
# FIXME mark the new entry somehow....
# remember the selected row
last_dump = None
- dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
+ dumpsListStore, path = self.dumplist_get_selected()
if path and dumpsListStore:
last_dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)
self.hydrate()
@@ -353,11 +363,11 @@ class MainWindow():
def on_bReport_clicked(self, button):
- dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
+ dumpsListStore, path = self.dumplist_get_selected()
self.on_dumpRowActivated(self.dlist, None, path, None)
def on_dumpRowActivated(self, treeview, it, path, user_data=None):
- dumpsListStore, path = treeview.get_selection().get_selected_rows()
+ dumpsListStore, path = self.dumplist_get_selected()
if not path:
return
dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)