summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-06-23 14:19:22 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2010-06-23 14:19:22 +0200
commitc7969056a65a74bfa4d7979880ee02a8e89356eb (patch)
treeca3ee2f177bcf47dc6212d5bfdacf57584508d25 /src
parent6c1b3040c4f9ba1e91c52911c05b856b946cc97b (diff)
downloadabrt-c7969056a65a74bfa4d7979880ee02a8e89356eb.tar.gz
abrt-c7969056a65a74bfa4d7979880ee02a8e89356eb.tar.xz
abrt-c7969056a65a74bfa4d7979880ee02a8e89356eb.zip
GUI: add a hostname column
Diffstat (limited to 'src')
-rw-r--r--src/Gui/CCDump.py9
-rw-r--r--src/Gui/CCMainWindow.py12
2 files changed, 15 insertions, 6 deletions
diff --git a/src/Gui/CCDump.py b/src/Gui/CCDump.py
index 23535bf9..d8a15f9a 100644
--- a/src/Gui/CCDump.py
+++ b/src/Gui/CCDump.py
@@ -136,12 +136,17 @@ class Dump():
def get_backtrace(self):
try:
return self.backtrace
- except KeyError:
+ except AttributeError:
return None
def get_rating(self):
try:
return self.rating
- except KeyError:
+ except AttributeError:
return None
+ def get_hostname(self):
+ try:
+ return self.hostname
+ except AttributeError:
+ return None
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index 2bc5db7b..44227149 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -53,10 +53,11 @@ class MainWindow():
STATUS_COL = 0
APP_NAME_COL = 1
TIME_STR_COL = 2
- UNIX_TIME_COL = 3
- DUMP_OBJECT_COL = 4
- #is_reported, application_name, date, time_in_sec ?object?
- self.dumpsListStore = gtk.ListStore(str, str, str, int, object)
+ HOSTNAME_COL = 3
+ UNIX_TIME_COL = 4
+ DUMP_OBJECT_COL = 5
+ #is_reported, application_name, hostname, date, time_in_sec ?object?
+ self.dumpsListStore = gtk.ListStore(str, str, str, str, int, object)
self.dlist.set_model(self.dumpsListStore)
# add pixbuff separatelly
icon_column = gtk.TreeViewColumn(_("Reported"))
@@ -69,6 +70,8 @@ class MainWindow():
columns = []
columns.append(gtk.TreeViewColumn(_("Application")))
columns[-1].set_sort_column_id(APP_NAME_COL)
+ columns.append(gtk.TreeViewColumn(_("Hostname")))
+ columns[-1].set_sort_column_id(HOSTNAME_COL)
columns.append(gtk.TreeViewColumn(_("Latest Crash")))
columns[-1].set_sort_column_id(UNIX_TIME_COL)
# add cells to colums and bind cells to the liststore values
@@ -183,6 +186,7 @@ class MainWindow():
for entry in dumplist[::-1]:
n = self.dumpsListStore.append([["gtk-no","gtk-yes"][entry.isReported()],
entry.getExecutable(),
+ entry.get_hostname(),
entry.getTime("%c"),
entry.getTime(),
entry])