>From 0613ab3f31a3e55949b68ae35f9f5c4338360e61 Mon Sep 17 00:00:00 2001
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Thu, 25 Mar 2010 16:02:26 +0100
Subject: [PATCH 2/2] GUI: main window rewrite

---
 src/Gui/CCDump.py           |   58 +++--
 src/Gui/CCDumpList.py       |    2 +-
 src/Gui/CCMainWindow.py     |  169 ++++++++++----
 src/Gui/CC_gui_functions.py |    4 +-
 src/Gui/ccgui.glade         |  514 ++++++++++++++++++++++++++++++++++++++-----
 5 files changed, 615 insertions(+), 132 deletions(-)

diff --git a/src/Gui/CCDump.py b/src/Gui/CCDump.py
index fe90384..af486af 100644
--- a/src/Gui/CCDump.py
+++ b/src/Gui/CCDump.py
@@ -44,56 +44,68 @@ CD_MESSAGE      = "Message"
 
 class Dump():
     """Class for mapping the debug dump to python object"""
+    not_required_fields = ["comment", "Message"]
     def __init__(self):
-        self.UUID = None
-        self.uid = None
-        self.Count = None
-        self.executable = None
-        self.package = None
-        self.time = None
-        self.description = None
-        self.Message = None
-        self.Reported = None
-        self.analyzer = None
+        # we set all attrs dynamically, so no need to have it in init
+        pass
+
+    def __setattr__(self, name, value):
+        if value != None:
+            if name == "time":
+                try:
+                    self.__dict__["date"] = datetime.fromtimestamp(int(value[CD_CONTENT])).strftime("%c")
+                except Exception, ex:
+                    self.__dict__["date"] = value[CD_CONTENT]
+                    log2("can't convert timestamp to date: %s" % ex)
+            self.__dict__[name] = value[CD_CONTENT]
+        else:
+            self.__dict__[name] = value
 
     def getUUID(self):
-        return self.UUID[CD_CONTENT]
+        return self.UUID
 
     def getUID(self):
-        return self.uid[CD_CONTENT]
+        return self.uid
 
     def getCount(self):
-        return int(self.Count[CD_CONTENT])
+        return int(self.Count)
 
     def getExecutable(self):
-        return self.executable[CD_CONTENT]
+        return self.executable
 
     def getPackage(self):
-        return self.package[CD_CONTENT]
+        return self.package
 
     def isReported(self):
-        return self.Reported[CD_CONTENT] == "1"
+        return self.Reported == "1"
 
     def getMessage(self):
         if not self.Message:
             return "" #[]
         #return self.Message[CD_CONTENT].split('\n')
-        return self.Message[CD_CONTENT]
+        return self.Message
 
-    def getTime(self, fmt):
+    def getTime(self, fmt=None):
         #print format
         if fmt:
             try:
-                return datetime.fromtimestamp(int(self.time[CD_CONTENT])).strftime(fmt)
+                return datetime.fromtimestamp(int(self.time)).strftime(fmt)
             except Exception, e:
                 print e
-        return int(self.time[CD_CONTENT])
+        return int(self.time)
 
     def getPackageName(self):
-        return self.package[CD_CONTENT][:self.package[CD_CONTENT].find("-")]
+        name_delimiter_pos = self.package[:self.package.rfind("-")].rfind("-")
+        return self.package[:name_delimiter_pos]
 
     def getDescription(self):
-        return self.description[CD_CONTENT]
+        return self.description
 
     def getAnalyzerName(self):
-        return self.analyzer[CD_CONTENT]
+        return self.analyzer
+
+    def get_reason(self):
+        return self.reason
+
+    def get_comment(self):
+        return self.comment
diff --git a/src/Gui/CCDumpList.py b/src/Gui/CCDumpList.py
index c962f21..3c555d8 100644
--- a/src/Gui/CCDumpList.py
+++ b/src/Gui/CCDumpList.py
@@ -19,7 +19,7 @@ class DumpList(list):
                     entry = Dump()
                     for column in row:
                         log2(" Dump.%s='%s'", column, row[column])
-                        entry.__dict__[column] = row[column]
+                        entry.__setattr__(column, row[column])
                     self.append(entry)
             except Exception:
                 # FIXME handle exception better
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index 781a801..d2bda00 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -41,54 +41,41 @@ class MainWindow():
         #Get the Main Window, and connect the "destroy" event
         self.window = self.wTree.get_widget("main_window")
         if self.window:
-            self.window.set_default_size(700, 480)
+            self.window.set_default_size(600, 700)
             self.window.connect("delete_event", self.delete_event_cb)
             self.window.connect("destroy", self.destroy)
             self.window.connect("focus-in-event", self.focus_in_cb)
-
+        self.wTree.get_widget("vp_details").modify_bg(gtk.STATE_NORMAL,gtk.gdk.color_parse("#FFFFFF"))
         #init the dumps treeview
         self.dlist = self.wTree.get_widget("tvDumps")
         #rows of items with:
-        ICON_COL = 0
-        PACKAGE_COL = 1
-        APPLICATION_COL = 2
-        TIME_STR_COL = 3
-        CRASH_RATE_COL = 4
-        USER_COL = 5
-        IS_REPORTED_COL = 6
-        UNIX_TIME_COL = 7
-        DUMP_OBJECT_COL = 8
-        #icon, package_name, application, date, crash_rate, user, is_reported, time_in_sec ?object?
-        self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,int,str,bool, int, object)
+        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)
         self.dlist.set_model(self.dumpsListStore)
         # add pixbuff separatelly
-        icon_column = gtk.TreeViewColumn(_("Icon"))
+        icon_column = gtk.TreeViewColumn(_("Reported"))
         icon_column.cell = gtk.CellRendererPixbuf()
-        icon_column.cell.set_property('cell-background', "#C9C9C9")
+        #icon_column.cell.set_property('cell-background', "#C9C9C9")
         n = self.dlist.append_column(icon_column)
-        icon_column.pack_start(icon_column.cell, False)
-        icon_column.set_attributes(icon_column.cell, pixbuf=(n-1), cell_background_set=6)
+        icon_column.pack_start(icon_column.cell, True)
+        icon_column.set_attributes(icon_column.cell, stock_id=(n-1))# cell_background_set=6)
         # ===============================================
         columns = []
-        columns.append(gtk.TreeViewColumn(_("Package")))
-        columns[-1].set_sort_column_id(PACKAGE_COL)
         columns.append(gtk.TreeViewColumn(_("Application")))
-        columns[-1].set_sort_column_id(APPLICATION_COL)
-        columns.append(gtk.TreeViewColumn(_("Date")))
+        columns[-1].set_sort_column_id(APP_NAME_COL)
+        columns.append(gtk.TreeViewColumn(_("Latest Crash")))
         columns[-1].set_sort_column_id(UNIX_TIME_COL)
-        columns.append(gtk.TreeViewColumn(_("Crash count")))
-        columns[-1].set_sort_column_id(CRASH_RATE_COL)
-        columns.append(gtk.TreeViewColumn(_("User")))
-        columns[-1].set_sort_column_id(USER_COL)
-        # create list
+        # add cells to colums and bind cells to the liststore values
         for column in columns:
             n = self.dlist.append_column(column)
             column.cell = gtk.CellRendererText()
             column.pack_start(column.cell, False)
-            #column.set_attributes(column.cell, )
-            # FIXME: use some relative indexing
-            column.cell.set_property('cell-background', "#C9C9C9")
-            column.set_attributes(column.cell, text=(n-1), cell_background_set=6)
+            column.set_attributes(column.cell, text=(n-1))
             column.set_resizable(True)
         #connect signals
         self.dlist.connect("cursor-changed", self.on_tvDumps_cursor_changed)
@@ -96,6 +83,9 @@ class MainWindow():
         self.dlist.connect("button-press-event", self.on_popupActivate)
         self.wTree.get_widget("bDelete").connect("clicked", self.on_bDelete_clicked, self.dlist)
         self.wTree.get_widget("bReport").connect("clicked", self.on_bReport_clicked)
+        self.wTree.get_widget("b_close").connect("clicked", self.on_bQuit_clicked)
+        self.wTree.get_widget("b_copy").connect("clicked", self.on_b_copy_clicked)
+        self.wTree.get_widget("b_help").connect("clicked", self.on_miAbout_clicked)
         self.wTree.get_widget("miQuit").connect("activate", self.on_bQuit_clicked)
         self.wTree.get_widget("miAbout").connect("activate", self.on_miAbout_clicked)
         self.wTree.get_widget("miPlugins").connect("activate", self.on_miPreferences_clicked)
@@ -166,6 +156,15 @@ class MainWindow():
         tvUpdates.set_buffer(buff)
         tvUpdates.scroll_mark_onscreen(end)
 
+    def get_username_from_uid(self, uid):
+        user = "N/A"
+        if uid != "-1":   # compat: only abrt <= 1.0.9 used UID = -1
+            try:
+                user = pwd.getpwuid(int(uid))[0]
+            except Exception, ex:
+                user = "UID: %s" % uid
+        return user
+
     def hydrate(self):
         n = None
         self.dumpsListStore.clear()
@@ -177,18 +176,11 @@ class MainWindow():
             # so we shouldn't continue..
             sys.exit()
         for entry in dumplist[::-1]:
-            try:
-                icon = get_icon_for_package(self.theme, entry.getPackageName())
-            except:
-                icon = None
-            user = "N/A"
-            if entry.getUID() != "-1":   # compat: only abrt <= 1.0.9 used UID = -1
-                try:
-                    user = pwd.getpwuid(int(entry.getUID()))[0]
-                except Exception, ex:
-                    user = "UID: %s" % entry.getUID()
-            n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(),
-                                            entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry.getTime(""), entry])
+            n = self.dumpsListStore.append([["gtk-no","gtk-yes"][entry.isReported()],
+                                            entry.getExecutable(),
+                                            entry.getTime("%c"),
+                                            entry.getTime(),
+                                            entry])
         # activate the first row if any..
         if n:
             # we can use (0,) as path for the first row, but what if API changes?
@@ -208,11 +200,63 @@ class MainWindow():
         self.wTree.get_widget("bReport").set_sensitive(True)
         # this should work until we keep the row object in the last position
         dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)
+
+        try:
+            icon = get_icon_for_package(self.theme, dump.getPackageName())
+        except:
+            icon = None
+
+        i_package_icon = self.wTree.get_widget("i_package_icon")
+        if icon:
+            i_package_icon.set_from_pixbuf(icon)
+        else:
+            i_package_icon.set_from_stock(gtk.STOCK_MISSING_IMAGE, gtk.ICON_SIZE_DIALOG)
+
+        l_heading = self.wTree.get_widget("l_detail_heading")
+        l_heading.set_markup(_("<b>%s Crash</b>\n%s") % (dump.getPackageName().title(),dump.getPackage()))
+
+        # process the labels in sw_details
+        # hide the fields that are not filled by daemon - e.g. comments
+        # and how to reproduce
+        for field in dump.not_required_fields:
+            self.wTree.get_widget("l_%s" % field.lower()).hide()
+            self.wTree.get_widget("l_%s_heading" % field.lower()).hide()
+
+        # fill the details
+        # read attributes from CCDump object and if a corresponding label is
+        # found, then the label text is set to the attribute's value
+        # field names in glade file:
+        #   heading label: l_<field>_heading
+        #   text label:    l_<field>
+        for att in dump.__dict__:
+            label = self.wTree.get_widget("l_%s" % str(att).lower())
+            if label:
+                label.show()
+                if att in dump.not_required_fields:
+                    try:
+                        lbl_heading = self.wTree.get_widget("l_%s_heading" % str(att).lower())
+                        lbl_heading.show()
+                    except:
+                        # we don't care if we fail to show the heading, it will
+                        # break the gui a little, but it's better then exit
+                        log2("failed to show the heading for >%s< : %s" % (att,e))
+                        pass
+                if dump.__dict__[att] != None:
+                    label.set_text(dump.__dict__[att])
+                else:
+                    label.set_text("")
+        self.wTree.get_widget("l_date").set_text(dump.getTime("%c"))
+        self.wTree.get_widget("l_user").set_text(self.get_username_from_uid(dump.getUID()))
+
+        b_copy = self.wTree.get_widget("b_copy")
+        b_copy.set_sensitive(dump.isReported())
         #move this to Dump class
-        lReported = self.wTree.get_widget("lReported")
+        hb_reports = self.wTree.get_widget("hb_reports")
+        lReported = self.wTree.get_widget("l_message")
         if dump.isReported():
-            report_label_raw = _("This crash has been reported:\n")
-            report_label = _("<b>This crash has been reported:</b>\n")
+            hb_reports.show()
+            report_label_raw = ""
+            report_label = ""
             # plugin message follows, but at least in case of kerneloops,
             # it is not informative (no URL to the report)
             for message in dump.getMessage().split(';'):
@@ -221,13 +265,13 @@ class MainWindow():
                     report_label += "%s\n" % report_message
                     report_label_raw += "%s\n" % message
             log2("setting markup '%s'", report_label)
-            lReported.set_text(report_label_raw)
             # Sometimes (!) set_markup() fails with
-            # "GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag 'a'"
-            # If it does, then set_text() above acts as a fallback
+            # "GtkWarning: Failed to set text from markup due to error parsing
+            # markup: Unknown tag 'a'" If it does, then set_text()
+            # in "fill the details" above acts as a fallback
             lReported.set_markup(report_label)
         else:
-            lReported.set_markup(_("<b>Not reported!</b>"))
+            hb_reports.hide()
 
     def mark_last_selected_row(self, dump_list_store, path, iter, last_selected_uuid):
         # Get dump object from list (in our list it's in last col)
@@ -257,6 +301,33 @@ class MainWindow():
         except Exception, ex:
             print ex
 
+    def dumplist_get_selected(self):
+        dumpsListStore, path = self.dlist.get_selection().get_selected_rows()
+        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()
+        if not dump:
+            gui_info_dialog(_("You have to select a crash to copy."),
+                            parent=self.window)
+            return
+        # dictionaries are not sorted, so we need this as a workaround
+        dumpinfo = [("Package:", dump.package),
+                    ("Latest Crash:", dump.date),
+                    ("Command:", dump.cmdline),
+                    ("Reason:", dump.reason),
+                    ("Comment:", dump.comment),
+                    ("Bug Reports:", dump.Message),
+        ]
+        dumpinfo_text = ""
+        for line in dumpinfo:
+            dumpinfo_text += ("%-12s\t%s" % (line[0], line[1])).replace('\n','\n\t\t')
+            dumpinfo_text += '\n'
+        clipboard.set_text(dumpinfo_text)
+
     def destroy(self, widget, data=None):
         gtk.main_quit()
 
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py
index f8f1c9e..570aba1 100644
--- a/src/Gui/CC_gui_functions.py
+++ b/src/Gui/CC_gui_functions.py
@@ -182,7 +182,7 @@ def gui_question_dialog ( message, parent_dialog=None,
 def get_icon_for_package(theme, package):
     log2("get_icon_for_package('%s')", package)
     try:
-        return theme.load_icon(package, 22, gtk.ICON_LOOKUP_USE_BUILTIN)
+        return theme.load_icon(package, 48, gtk.ICON_LOOKUP_USE_BUILTIN)
     except:
         # try to find icon filename by manually
         if not rpm:
@@ -225,7 +225,7 @@ def get_icon_for_package(theme, package):
                 break
         if icon_filename:
             log1("icon created from %s", icon_filename)
-            return gtk.gdk.pixbuf_new_from_file_at_size(icon_filename, 22, 22)
+            return gtk.gdk.pixbuf_new_from_file_at_size(icon_filename, 48, 48)
         else:
             return None
 
diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade
index 7311468..e10fe55 100644
--- a/src/Gui/ccgui.glade
+++ b/src/Gui/ccgui.glade
@@ -27,7 +27,10 @@ Nikola Pajkovsky &lt;npajkovs@redhat.com&gt;
 Zdenek Prikryl &lt;zprikryl@redhat.com&gt;
 Denys Vlasenko &lt;dvlasenk@redhat.com&gt;</property>
     <property name="translator_credits" translatable="yes">translator-credits</property>
-    <property name="artists">Patrick Connelly &lt;pcon@fedoraproject.org&gt;</property>
+    <property name="artists">Patrick Connelly &lt;pcon@fedoraproject.org&gt;
+
+UI Design:
+M&#xE1;ir&#xED;n Duffy &lt;duffy@redhat.com&gt;</property>
     <property name="logo_icon_name">abrt</property>
     <property name="wrap_license">True</property>
     <child internal-child="vbox">
@@ -119,6 +122,13 @@ Denys Vlasenko &lt;dvlasenk@redhat.com&gt;</property>
                   <widget class="GtkMenu" id="menu6">
                     <property name="visible">True</property>
                     <child>
+                      <widget class="GtkMenuItem" id="mi_view_log">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">View log</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                    </child>
+                    <child>
                       <widget class="GtkImageMenuItem" id="miAbout">
                         <property name="label">gtk-about</property>
                         <property name="visible">True</property>
@@ -138,49 +148,6 @@ Denys Vlasenko &lt;dvlasenk@redhat.com&gt;</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkToolbar" id="toolbar1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkToolButton" id="bDelete">
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="tooltip" translatable="yes">Delete</property>
-                <property name="label" translatable="yes">Delete</property>
-                <property name="stock_id">gtk-delete</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkToolButton" id="bReport">
-                <property name="visible">True</property>
-                <property name="tooltip" translatable="yes">Report</property>
-                <property name="label" translatable="yes">Report</property>
-                <property name="stock_id">gtk-go-up</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkSeparatorToolItem" id="toolbutton1">
-                <property name="visible">True</property>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
           <widget class="GtkVPaned" id="vpaned1">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -208,30 +175,323 @@ Denys Vlasenko &lt;dvlasenk@redhat.com&gt;</property>
               </packing>
             </child>
             <child>
-              <widget class="GtkScrolledWindow" id="scrolledwindow2">
+              <widget class="GtkScrolledWindow" id="sw_details">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="hscrollbar_policy">automatic</property>
+                <property name="hscrollbar_policy">never</property>
                 <property name="vscrollbar_policy">automatic</property>
                 <property name="shadow_type">in</property>
                 <child>
-                  <widget class="GtkViewport" id="viewport2">
+                  <widget class="GtkViewport" id="vp_details">
                     <property name="visible">True</property>
                     <property name="resize_mode">queue</property>
                     <property name="shadow_type">none</property>
                     <child>
-                      <widget class="GtkAlignment" id="alignment1">
+                      <widget class="GtkVBox" id="vbox2">
                         <property name="visible">True</property>
-                        <property name="top_padding">6</property>
-                        <property name="left_padding">6</property>
+                        <property name="orientation">vertical</property>
                         <child>
-                          <widget class="GtkLabel" id="lReported">
+                          <widget class="GtkHBox" id="hbox1">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="yalign">0</property>
-                            <property name="label" translatable="yes">Not Reported</property>
-                            <property name="selectable">True</property>
+                            <property name="spacing">10</property>
+                            <child>
+                              <widget class="GtkImage" id="i_package_icon">
+                                <property name="visible">True</property>
+                                <property name="xpad">5</property>
+                                <property name="stock">gtk-missing-image</property>
+                                <property name="icon-size">6</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="l_detail_heading">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
                           </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">10</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hb_reports">
+                            <property name="visible">True</property>
+                            <property name="spacing">5</property>
+                            <child>
+                              <widget class="GtkLabel" id="l_message_heading">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="yalign">0</property>
+                                <property name="xpad">5</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Bug Reports:&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="l_message">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="yalign">0</property>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox2">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkTable" id="t_details">
+                                <property name="visible">True</property>
+                                <property name="n_rows">5</property>
+                                <property name="n_columns">2</property>
+                                <property name="column_spacing">5</property>
+                                <property name="row_spacing">5</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label1">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">&lt;b&gt;Latest Crash:&lt;/b&gt;</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label2">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">&lt;b&gt;Command:&lt;/b&gt;</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label3">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">&lt;b&gt;User:&lt;/b&gt;</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label4">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">&lt;b&gt;Crash count:&lt;/b&gt;</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_date">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="wrap">True</property>
+                                    <property name="width_chars">30</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_cmdline">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="wrap">True</property>
+                                    <property name="width_chars">30</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options"></property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_user">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">1.862645149230957e-09</property>
+                                    <property name="yalign">0</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_count">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</property>
+                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="y_options">GTK_FILL</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment6">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="top_attach">4</property>
+                                    <property name="bottom_attach">5</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment7">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">4</property>
+                                    <property name="bottom_attach">5</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="padding">5</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkVBox" id="vbox1">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <property name="spacing">5</property>
+                                <child>
+                                  <widget class="GtkLabel" id="label5">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">&lt;b&gt;Reason:&lt;/b&gt;</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_reason">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="wrap">True</property>
+                                    <property name="width_chars">40</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_comment_heading">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="label" translatable="yes">&lt;b&gt;Comment:&lt;/b&gt;</property>
+                                    <property name="use_markup">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="l_comment">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="yalign">0</property>
+                                    <property name="wrap">True</property>
+                                    <property name="width_chars">40</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
                         </child>
                       </widget>
                     </child>
@@ -240,23 +500,163 @@ Denys Vlasenko &lt;dvlasenk@redhat.com&gt;</property>
               </widget>
               <packing>
                 <property name="resize">False</property>
-                <property name="shrink">True</property>
+                <property name="shrink">False</property>
               </packing>
             </child>
           </widget>
           <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox4">
+            <property name="visible">True</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment4">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="bDelete">
+                <property name="label">gtk-delete</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="b_copy">
+                <property name="label">Copy to Clipboard</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="bReport">
+                <property name="label" translatable="yes">Report</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
             <property name="position">2</property>
           </packing>
         </child>
         <child>
-          <widget class="GtkStatusbar" id="statusbar1">
+          <widget class="GtkAlignment" id="alignment5">
             <property name="visible">True</property>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="padding">20</property>
             <property name="position">3</property>
           </packing>
         </child>
+        <child>
+          <widget class="GtkHBox" id="hbox3">
+            <property name="visible">True</property>
+            <property name="homogeneous">True</property>
+            <child>
+              <widget class="GtkButton" id="b_help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </widget>
+              <packing>
+                <property name="padding">10</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="b_close">
+                <property name="label">gtk-close</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </widget>
+              <packing>
+                <property name="padding">10</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkStatusbar" id="statusbar1">
+            <property name="visible">True</property>
+            <property name="spacing">2</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
       </widget>
     </child>
   </widget>
-- 
1.6.6.1

