summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2011-03-11 11:31:11 +0100
committerNikola Pajkovsky <npajkovs@redhat.com>2011-03-11 11:31:11 +0100
commit2c1ca7753ca7d11640c14491c3d76124d2cba7d8 (patch)
tree9c395beebff50d8e59181365db14bffddfd21753 /src
parent066ea25800e36c8f4514d487a29ecd1bb926da53 (diff)
parent2a6a90726044304c2bc3f3f25fd59b2d004b5095 (diff)
downloadabrt-2c1ca7753ca7d11640c14491c3d76124d2cba7d8.tar.gz
abrt-2c1ca7753ca7d11640c14491c3d76124d2cba7d8.tar.xz
abrt-2c1ca7753ca7d11640c14491c3d76124d2cba7d8.zip
Merge branch 'prune-old-gui'
* prune-old-gui: remove old python gui override old gui by new one
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/applet/applet.c14
-rw-r--r--src/applet/applet_gtk.c11
-rw-r--r--src/applet/applet_gtk.h2
-rw-r--r--src/daemon/Daemon.cpp10
-rw-r--r--src/gui-gtk/Makefile.am13
-rw-r--r--src/gui-gtk/abrt.desktop.in (renamed from src/gui/abrt.desktop.in)0
-rw-r--r--src/gui/ABRTExceptions.py17
-rw-r--r--src/gui/ABRTPlugin.py109
-rw-r--r--src/gui/CCDBusBackend.py224
-rw-r--r--src/gui/CCDump.py177
-rw-r--r--src/gui/CCDumpList.py49
-rw-r--r--src/gui/CCMainWindow.py462
-rw-r--r--src/gui/CC_gui_functions.py253
-rw-r--r--src/gui/CReporterAssistant.py1149
-rw-r--r--src/gui/ConfBackend.py248
-rw-r--r--src/gui/Makefile.am33
-rw-r--r--src/gui/PluginList.py69
-rw-r--r--src/gui/PluginSettingsUI.py92
-rw-r--r--src/gui/PluginsSettingsDialog.py162
-rw-r--r--src/gui/SettingsDialog.py198
-rwxr-xr-xsrc/gui/abrt-gui8
-rw-r--r--src/gui/abrt.pngbin2791 -> 0 bytes
-rw-r--r--src/gui/abrt_utils.py47
-rw-r--r--src/gui/ccgui.glade734
-rw-r--r--src/gui/dialogs.glade139
-rw-r--r--src/gui/progress_window.glade57
-rw-r--r--src/gui/report.glade827
-rw-r--r--src/gui/settings.glade594
-rw-r--r--src/gui/settings_wizard.glade129
30 files changed, 30 insertions, 5799 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c6d3abd9..066fadf2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1 +1 @@
-SUBDIRS = include lib report-python hooks btparser daemon applet gui gui-gtk cli plugins gui-wizard-gtk retrace
+SUBDIRS = include lib report-python hooks btparser daemon applet gui-gtk cli plugins gui-wizard-gtk retrace
diff --git a/src/applet/applet.c b/src/applet/applet.c
index 1a2bf5c0..56266f12 100644
--- a/src/applet/applet.c
+++ b/src/applet/applet.c
@@ -46,8 +46,8 @@ static void Crash(DBusMessage* signal)
error_msg("dbus signal %s: parameter type mismatch", __func__);
return;
}
- const char* crash_id = NULL;
- r = load_charp(&in_iter, &crash_id);
+ const char* crash_dir = NULL;
+ r = load_charp(&in_iter, &crash_dir);
/* 3rd param: dir */
//dir parameter is not used for now, use is planned in the future
@@ -94,10 +94,10 @@ static void Crash(DBusMessage* signal)
*/
static time_t last_time = 0;
static char* last_package_name = NULL;
- static char* last_crash_id = NULL;
+ static char* last_crash_dir = NULL;
time_t cur_time = time(NULL);
if (last_package_name && strcmp(last_package_name, package_name) == 0
- && last_crash_id && strcmp(last_crash_id, crash_id) == 0
+ && last_crash_dir && strcmp(last_crash_dir, crash_dir) == 0
&& (unsigned)(cur_time - last_time) < 2 * 60 * 60
) {
log_msg("repeated crash in %s, not showing the notification", package_name);
@@ -106,10 +106,10 @@ static void Crash(DBusMessage* signal)
last_time = cur_time;
free(last_package_name);
last_package_name = xstrdup(package_name);
- free(last_crash_id);
- last_crash_id = xstrdup(crash_id);
+ free(last_crash_dir);
+ last_crash_dir = xstrdup(dir);
- show_crash_notification(applet, crash_id, message, package_name);
+ show_crash_notification(applet, dir, message, package_name);
}
static void QuotaExceeded(DBusMessage* signal)
diff --git a/src/applet/applet_gtk.c b/src/applet/applet_gtk.c
index d31328aa..04349648 100644
--- a/src/applet/applet_gtk.c
+++ b/src/applet/applet_gtk.c
@@ -65,12 +65,13 @@ static void action_report(NotifyNotification *notification, gchar *action, gpoin
perror_msg("vfork");
if (pid == 0)
{ /* child */
- char *buf = xasprintf("--report=%s", applet->ap_last_crash_id);
signal(SIGCHLD, SIG_DFL); /* undo SIG_IGN in abrt-applet */
- execl(BIN_DIR"/abrt-gui", "abrt-gui", buf, (char*) NULL);
+ execl(BIN_DIR"/bug-reporting-wizard", "bug-reporting-wizard",
+ applet->ap_last_crash_id, (char*) NULL);
/* Did not find abrt-gui in installation directory. Oh well */
/* Trying to find it in PATH */
- execlp("abrt-gui", "abrt-gui", buf, (char*) NULL);
+ execlp("bug-reporting-wizard", "bug-reporting-wizard",
+ applet->ap_last_crash_id, (char*) NULL);
perror_msg_and_die("Can't execute abrt-gui");
}
GError *err = NULL;
@@ -348,9 +349,9 @@ void set_icon_tooltip(struct applet *applet, const char *format, ...)
free(buf);
}
-void show_crash_notification(struct applet *applet, const char* crash_id, const char *format, ...)
+void show_crash_notification(struct applet *applet, const char* crash_dir, const char *format, ...)
{
- applet->ap_last_crash_id = crash_id;
+ applet->ap_last_crash_id = crash_dir;
va_list args;
va_start(args, format);
char *buf = xvasprintf(format, args);
diff --git a/src/applet/applet_gtk.h b/src/applet/applet_gtk.h
index 0bcf47b7..ca1a39c7 100644
--- a/src/applet/applet_gtk.h
+++ b/src/applet/applet_gtk.h
@@ -56,7 +56,7 @@ void applet_destroy(struct applet *applet);
void show_icon(struct applet *applet);
void hide_icon(struct applet *applet);
void set_icon_tooltip(struct applet *applet, const char *format, ...);
-void show_crash_notification(struct applet *applet, const char* crash_id, const char *format, ...);
+void show_crash_notification(struct applet *applet, const char* crash_dir, const char *format, ...);
void show_msg_notification(struct applet *applet, const char *format, ...);
void disable(struct applet *applet, const char *reason);
void enable(struct applet *applet, const char *reason);
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index 2d2c85ed..5555138c 100644
--- a/src/daemon/Daemon.cpp
+++ b/src/daemon/Daemon.cpp
@@ -382,6 +382,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
crash_data_t *crash_data = NULL;
fullname = concat_path_file(DEBUG_DUMPS_DIR, name);
mw_result_t res = LoadDebugDump(fullname, &crash_data);
+ const char *first = get_crash_item_content_or_NULL(crash_data, CD_DUMPDIR);
switch (res)
{
case MW_OK:
@@ -392,7 +393,6 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
{
if (res != MW_OK)
{
- const char *first = get_crash_item_content_or_NULL(crash_data, CD_DUMPDIR);
log("Deleting crash %s (dup of %s), sending dbus signal",
strrchr(fullname, '/') + 1,
strrchr(first, '/') + 1);
@@ -408,10 +408,12 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
get_crash_item_content_or_NULL(crash_data, FILENAME_UID),
get_crash_item_content_or_NULL(crash_data, FILENAME_UUID)
);
+ /* when dupe occurs we need to return first occure not the one which
+ * is deleted */
send_dbus_sig_Crash(get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE),
- crash_id, //TODO: stop passing this param, it is unused
- fullname,
- uid_str
+ crash_id, //TODO: stop passing this param, it is unused
+ (first)? first: fullname,
+ uid_str
);
free(crash_id);
break;
diff --git a/src/gui-gtk/Makefile.am b/src/gui-gtk/Makefile.am
index 64754080..2c525245 100644
--- a/src/gui-gtk/Makefile.am
+++ b/src/gui-gtk/Makefile.am
@@ -1,10 +1,10 @@
-bin_PROGRAMS = abrt-gtk
+bin_PROGRAMS = abrt-gui
-abrt_gtk_SOURCES = \
+abrt_gui_SOURCES = \
abrt-gtk.h abrt-gtk.c \
event_config_dialog.h event_config_dialog.c \
main.c
-abrt_gtk_CFLAGS = \
+abrt_gui_CFLAGS = \
-I$(srcdir)/../include/report -I$(srcdir)/../include \
-I$(srcdir)/../lib \
-DBIN_DIR=\"$(bindir)\" \
@@ -22,7 +22,7 @@ abrt_gtk_CFLAGS = \
# -I/usr/lib/glib-2.0/include
# $(LIBNOTIFY_CFLAGS)
# $(DBUS_GLIB_CFLAGS)
-abrt_gtk_LDADD = \
+abrt_gui_LDADD = \
../lib/libreport.la \
../lib/libabrt_dbus.la \
-lglib-2.0 \
@@ -44,3 +44,8 @@ abrt_gtk_LDADD = \
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
@INTLTOOL_DESKTOP_RULE@
+desktopdir = $(datadir)/applications
+desktop_in_files = abrt.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+EXTRA_DIST = $(desktop_in_files)
diff --git a/src/gui/abrt.desktop.in b/src/gui-gtk/abrt.desktop.in
index 99d7f8f8..99d7f8f8 100644
--- a/src/gui/abrt.desktop.in
+++ b/src/gui-gtk/abrt.desktop.in
diff --git a/src/gui/ABRTExceptions.py b/src/gui/ABRTExceptions.py
deleted file mode 100644
index f383da94..00000000
--- a/src/gui/ABRTExceptions.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- coding: utf-8 -*-
-from abrt_utils import _, log, log1, log2
-
-class IsRunning(Exception):
- def __init__(self):
- Exception.__init__(self)
- self.what = _("Another client is already running, trying to wake it...")
- def __str__(self):
- return self.what
-
-class WrongData(Exception):
- def __init__(self):
- Exception.__init__(self)
- self.what = _("Got unexpected data from the daemon (is the database properly updated?).")
-
- def __str__(self):
- return self.what
diff --git a/src/gui/ABRTPlugin.py b/src/gui/ABRTPlugin.py
deleted file mode 100644
index e01d4b93..00000000
--- a/src/gui/ABRTPlugin.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- coding: utf-8 -*-
-
-""" PluginInfo keys:
-WWW
-Name
-Enabled
-GTKBuilder
-Version
-Type
-Email
-Description
-"""
-from abrt_utils import _, log, log1, log2
-from ConfBackend import getCurrentConfBackend, ConfBackendInitError
-
-class PluginSettings(dict):
- def __init__(self):
- dict.__init__(self)
- self.client_side_conf = None
- try:
- self.client_side_conf = getCurrentConfBackend()
- except ConfBackendInitError, e:
- print e
-
- def check(self):
- # if present, these should be non-empty
- for key in ["Password", "Login"]:
- if key in self.keys():
- if not self[key]:
- # some of the required keys are missing
- return False
- # settings are OK
- return True
-
- def load_daemon_settings(self, name, daemon_settings):
- # load settings from daemon
- for key in daemon_settings.keys():
- log2("daemon-side setting: %s[%s]='%s'", name, key, daemon_settings[key])
- self[str(key)] = str(daemon_settings[key])
-
- if self.client_side_conf:
- # FIXME: this fails when gk-authorization fails.
- # We need to show a dialog to user and let him know
- # for now just silently ignore it to avoid rhbz#559342
- settings = {}
- try:
- settings = self.client_side_conf.load(name)
- except Exception, e:
- print e
- # overwrite daemon data with user setting
- for key in settings.keys():
- # only rewrite keys which exist in plugin's keys.
- # e.g. we don't want a password field for logger plugin
- if key in daemon_settings.keys():
- log2("client-side override: %s[%s]='%s'", name, key, settings[key])
- self[str(key)] = str(settings[key])
-
- def save_on_client_side(self, name):
- if self.client_side_conf:
- self.client_side_conf.save(name, self)
-
-class PluginInfo():
- """Class to represent common plugin info"""
- types = {"":_("Not loaded plugins"),
- "Analyzer":_("Analyzer plugins"),
- "Action":_("Action plugins"),
- "Reporter":_("Reporter plugins"),
- "Database":_("Database plugins")}
- keys = ["WWW", "Name", "Enabled",
- "GTKBuilder", "Version",
- "Type", "Email", "Description"]
-
- def __init__(self):
- self.WWW = None
- self.Name = None
- self.Enabled = None
- self.GTKBuilder = None
- self.Version = None
- self.Type = None
- self.Email = None
- self.Description = None
- self.Settings = PluginSettings()
-
- def getName(self):
- return self.Name
-
- def getDescription(self):
- return self.Description
-
- def getType(self):
- return self.Type
-
- def getGUI(self):
- return self.GTKBuilder
-
- def __str__(self):
- return self.Name
-
- def __getitem__(self, item):
- return self.__dict__[item]
-
- def load_daemon_settings(self, daemon_settings):
- if self.Name:
- self.Settings.load_daemon_settings(self.Name, daemon_settings)
- else:
- log("Plugin name is not set, can't load its settings")
-
- def save_settings_on_client_side(self):
- self.Settings.save_on_client_side(str(self.Name))
diff --git a/src/gui/CCDBusBackend.py b/src/gui/CCDBusBackend.py
deleted file mode 100644
index d2b867c7..00000000
--- a/src/gui/CCDBusBackend.py
+++ /dev/null
@@ -1,224 +0,0 @@
-# -*- coding: utf-8 -*-
-import time # for sleep()
-import gobject
-import dbus
-import dbus.service
-from dbus.mainloop.glib import DBusGMainLoop
-from dbus.exceptions import *
-import ABRTExceptions
-from abrt_utils import _, log, log1, log2
-
-ABRTD_DBUS_NAME = 'com.redhat.abrt'
-ABRTD_DBUS_PATH = '/com/redhat/abrt'
-ABRTD_DBUS_IFACE = 'com.redhat.abrt'
-
-APP_NAME = 'com.redhat.abrt.gui'
-APP_PATH = '/com/redhat/abrt/gui'
-APP_IFACE = 'com.redhat.abrt.gui'
-
-class DBusManager(gobject.GObject):
- """ Class to provide communication with daemon over dbus """
- # and later with policyKit
- bus = None
- def __init__(self):
-
- session = None
- # binds the dbus to glib mainloop
- DBusGMainLoop(set_as_default=True)
- class DBusInterface(dbus.service.Object):
- def __init__(self, dbusmanager):
- self.dbusmanager = dbusmanager
- dbus.service.Object.__init__(self, dbus.SessionBus(), APP_PATH)
-
- @dbus.service.method(dbus_interface=APP_IFACE)
- def show(self):
- self.dbusmanager.emit("show")
- try:
- session = dbus.SessionBus()
- except Exception:
- # probably run after "$ su"
- pass
-
- if session:
- try:
- app_proxy = session.get_object(APP_NAME, APP_PATH)
- app_iface = dbus.Interface(app_proxy, dbus_interface=APP_IFACE)
- # app is running, so make it show it self
- app_iface.show()
- raise ABRTExceptions.IsRunning()
- except DBusException, e:
- # cannot create proxy or call the method => gui is not running
- pass
-
- gobject.GObject.__init__(self)
- # signal emited when new crash is detected
- gobject.signal_new("crash", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING,))
- # signal emited when new analyze is complete
- gobject.signal_new("analyze-complete", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
- # signal emited when smth fails
- gobject.signal_new("abrt-error", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
- gobject.signal_new("warning", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
- # signal emited to update gui with current status
- gobject.signal_new("update", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
- # signal emited to show gui if user try to run it again
- gobject.signal_new("show_gui", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ())
- gobject.signal_new("daemon-state-changed", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
- gobject.signal_new("report-done", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,))
-
- # export the app dbus interface
- if session:
- session.request_name(APP_NAME)
- iface = DBusInterface(self)
-
- self.bus = dbus.SystemBus()
- if not self.bus:
- raise Exception(_("Cannot connect to system dbus."))
- self.bus.add_signal_receiver(self.owner_changed_cb, "NameOwnerChanged", dbus_interface="org.freedesktop.DBus")
- # new crash notification
- self.bus.add_signal_receiver(self.crash_cb, "Crash", dbus_interface=ABRTD_DBUS_IFACE)
- # watch for updates
- self.bus.add_signal_receiver(self.update_cb, "Update", dbus_interface=ABRTD_DBUS_IFACE)
- # watch for warnings
- self.bus.add_signal_receiver(self.warning_cb, "Warning", dbus_interface=ABRTD_DBUS_IFACE)
- # watch for job-done signals
- self.bus.add_signal_receiver(self.jobdone_cb, "JobDone", dbus_interface=ABRTD_DBUS_IFACE)
-
- # We use this function instead of caching and reusing of
- # dbus.Interface(proxy, dbus_interface=ABRTD_DBUS_IFACE) because we want
- # to restart abrtd in this scenario:
- # (1) abrt-gui was run
- # (2) user generated the report, then left for coffee break
- # (3) abrtd exited on inactivity timeout
- # (4) user returned and wants to submit the report
- # for (4) to restart abrtd, we must recreate proxy and daemon
- def daemon(self):
- if not self.bus:
- self.bus = dbus.SystemBus()
- if not self.bus:
- raise Exception(_("Cannot connect to system dbus."))
- # Autostart hack
- # Theoretically, this is not needed, the first dbus call
- # should autostart daemon if needed. In practice,
- # without this code autostart is not reliable.
- # Update: fixed the problem on daemon side,
- # but retaining this code for now. More stability won't hurt us...
- try:
- (always_true, rc) = self.bus.start_service_by_name(ABRTD_DBUS_NAME, flags=0)
- # rc is either self.bus.START_REPLY_SUCCESS or self.bus.START_REPLY_ALREADY_RUNNING
- if rc == self.bus.START_REPLY_SUCCESS:
- # Better solution may be to have daemon emit a signal and wait for it
- log1("dbus auto-started abrt daemon, giving it 1 sec to initialize")
- time.sleep(1)
- except DBusException:
- raise Exception("abrt daemon is not running, and DBus can't start it")
- # End of autostart hack
- try:
- # follow_name_owner_changes=True: switch to new daemon if daemon is restarted
- proxy = self.bus.get_object(ABRTD_DBUS_NAME, ABRTD_DBUS_PATH, introspect=False, follow_name_owner_changes=True)
- except DBusException:
- raise Exception("Can't connect to abrt daemon")
- if not proxy:
- raise Exception(_("Please check if the abrt daemon is running."))
- daemon = dbus.Interface(proxy, dbus_interface=ABRTD_DBUS_IFACE)
- if not daemon:
- raise Exception(_("Please check if the abrt daemon is running."))
- return daemon
-
-# # disconnect callback
-# def disconnected(self, *args):
-# print "disconnect"
-
- def error_handler_cb(self, error):
- self.emit("abrt-error", error)
-
- def warning_handler_cb(self, arg):
- self.emit("warning", arg)
-
- def error_handler(self, arg):
- # used to silently ingore dbus timeouts
- pass
-
- def dummy(self, *args):
- # dummy function for async method call to workaround the timeout
- pass
-
- def crash_cb(self, package, uuid, crashdir, uid="",):
- self.emit("crash", package, uuid, uid)
-
- def update_cb(self, message):
- log1("Update:%s", message)
- self.emit("update", message)
-
- def warning_cb(self, message):
- log1("Warning:%s", message)
- self.emit("warning", message)
-
- def owner_changed_cb(self, name, old_owner, new_owner):
- if name == ABRTD_DBUS_NAME:
- if new_owner:
- self.emit("daemon-state-changed", "up")
- else:
- self.emit("daemon-state-changed", "down")
-
- def jobdone_cb(self):
- log1("Our job for crash_id %s is done", self.job_crash_id)
- report = self.daemon().CreateReport(self.job_crash_id)
- if report:
- self.emit("analyze-complete", report)
- else:
- # FIXME: BUG: BarWindow remains. (how2reproduce: delete "component" in a dump dir and try to report it)
- self.emit("abrt-error", _("Daemon did not return a valid report info.\nIs debuginfo missing?"))
-
- def report_done(self, result):
- self.emit("report-done", result)
-
- def start_job(self, crash_id, force=0):
- # 2nd param is "force recreating of backtrace etc"
- self.daemon().StartJob(crash_id, force, timeout=60)
- self.job_crash_id = crash_id
-
- def Report(self, report, reporters, reporters_settings = None):
- # map < Plugin_name vec <status, message> >
- # daemon expects plugin names, not the objects
- reporters_names = [str(reporter) for reporter in reporters]
- # Timeout needs to be BIG: some reporters upload stuff over Internet,
- # and uploading of, say, 200meg+ file can easily take ten minutes or more.
- if reporters_settings:
- self.daemon().Report(report, reporters_names, reporters_settings, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=3600)
- else:
- self.daemon().Report(report, reporters_names, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=3600)
-
- def DeleteDebugDump(self, crash_id):
- return self.daemon().DeleteDebugDump(crash_id)
-
- def getDumps(self):
- row_dict = None
- rows = []
- # FIXME check the arguments
- for row in self.daemon().GetCrashInfos():
- row_dict = {}
- for column in row:
- row_dict[column] = row[column]
- rows.append(row_dict)
- return rows
-
- def getPluginsInfo(self):
- return self.daemon().GetPluginsInfo()
-
- def getPluginSettings(self, plugin_name):
- settings = self.daemon().GetPluginSettings(plugin_name)
- return settings
-
- def getSettings(self):
- return self.daemon().GetSettings()
-
- ### looks unused to me.
- ### Ok to grep for setSettings and delete after 2011-04-01.
- ### def setSettings(self, settings):
- ### # FIXME: STUB!!!!
- ### log1("setSettings stub")
- ### retval = self.daemon().SetSettings(self.daemon().GetSettings())
- ### print ">>>", retval
-
- def __del__(self):
- log1("CCDBusBackend is about to be deleted")
diff --git a/src/gui/CCDump.py b/src/gui/CCDump.py
deleted file mode 100644
index 10d7c2a3..00000000
--- a/src/gui/CCDump.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# -*- coding: utf-8 -*-
-from datetime import datetime
-
-from abrt_utils import _, init_logging, log, log1, log2
-
-# Keep in sync with [abrt_]crash_data.h!
-CD_TYPE = 0
-CD_EDITABLE = 1
-CD_CONTENT = 2
-
-CD_SYS = "s"
-CD_BIN = "b"
-CD_TXT = "t"
-
-FILENAME_ANALYZER = "analyzer"
-FILENAME_EXECUTABLE = "executable"
-FILENAME_BINARY = "binary"
-FILENAME_CMDLINE = "cmdline"
-FILENAME_REASON = "reason"
-FILENAME_COREDUMP = "coredump"
-FILENAME_BACKTRACE = "backtrace"
-FILENAME_MEMORYMAP = "memorymap"
-FILENAME_DUPHASH = "global_uuid"
-FILENAME_CRASH_FUNCTION = "crash_function"
-FILENAME_ARCHITECTURE = "architecture"
-FILENAME_KERNEL = "kernel"
-FILENAME_TIME = "time"
-FILENAME_OS_RELEASE = "os_release"
-FILENAME_PACKAGE = "package"
-FILENAME_COMPONENT = "component"
-FILENAME_COMMENT = "comment"
-FILENAME_REPRODUCE = "reproduce"
-FILENAME_RATING = "rating"
-FILENAME_HOSTNAME = "hostname"
-FILENAME_REMOTE = "remote"
-
-FILENAME_UID = "uid"
-FILENAME_UUID = "uuid"
-FILENAME_INFORMALL = "inform_all_users"
-FILENAME_COUNT = "count"
-FILENAME_MESSAGE = "message"
-
-CD_DUMPDIR = "DumpDir"
-CD_EVENTS = "Events"
-
-# FIXME - create method or smth that returns type|editable|content
-
-#EVENTS PARSING
-REPORT_EVENT = "report"
-REPORT_EVENT_PREFIX = "report_"
-
-class Dump():
- """Class for mapping the debug dump to python object"""
- not_required_fields = [FILENAME_COMMENT, FILENAME_MESSAGE]
- def __init__(self):
- # we set all attrs dynamically, so no need to have it in init
- for field in self.not_required_fields:
- self.__dict__[field] = None
-
- 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 __str__(self):
- return "Dump instance"
-
- def getUUID(self):
- return self.uuid
-
- def getUID(self):
- return self.uid
-
- def getDumpDir(self):
- return self.DumpDir
-
- def getCount(self):
- return int(self.count)
-
- def getExecutable(self):
- try:
- return self.executable
- except AttributeError, err:
- # try to rethrow the exception with the directory path, as
- # it's useful to know it in this case
- if "DumpDir" in self.__dict__:
- raise AttributeError("{0} (dump directory: {1})".format(str(err), self.DumpDir))
- else:
- raise
-
- def getPackage(self):
- return self.package
-
- def getMessage(self):
- if not self.message:
- return "" #[]
- #return self.message[CD_CONTENT].split('\n')
- return self.message
-
- def getTime(self, fmt=None):
- if self.time:
- if fmt:
- try:
- return datetime.fromtimestamp(int(self.time)).strftime(fmt)
- except Exception, ex:
- log1(ex)
- return int(self.time)
- return self.time
-
- def getPackageName(self):
- name_delimiter_pos = self.package[:self.package.rfind("-")].rfind("-")
- # fix for kerneloops
- if name_delimiter_pos > 0:
- return self.package[:name_delimiter_pos]
- return self.package
-
- def getDescription(self):
- return self.description
-
- def getAnalyzerName(self):
- return self.analyzer
-
- def get_release(self):
- # Old dump dir format compat. Delete in abrt-2.1:
- try:
- return self.os_release
- except AttributeError:
- return self.release # old name
-
- def get_reason(self):
- return self.reason
-
- def get_comment(self):
- return self.comment
-
- def get_component(self):
- return self.component
-
- def get_cmdline(self):
- return self.cmdline
-
- def get_arch(self):
- return self.architecture
-
- def get_kernel(self):
- return self.kernel
-
- def get_backtrace(self):
- try:
- return self.backtrace
- except AttributeError:
- return None
-
- def get_rating(self):
- try:
- return self.rating
- except AttributeError:
- return None
-
- def get_hostname(self):
- try:
- return self.hostname
- except AttributeError:
- return None
-
- def get_report_event_names(self):
- try:
- return [x for x in self.Events.split('\n') if (x == REPORT_EVENT or x[:len(REPORT_EVENT_PREFIX)] == REPORT_EVENT_PREFIX)]
- except AttributeError:
- return []
diff --git a/src/gui/CCDumpList.py b/src/gui/CCDumpList.py
deleted file mode 100644
index ccc87560..00000000
--- a/src/gui/CCDumpList.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-from CCDump import Dump
-
-from abrt_utils import _, init_logging, log, log1, log2
-
-class DumpList(list):
- """Class to store list of debug dumps"""
- def __init__(self,dbus_manager=None):
- list.__init__(self)
- self.dm = dbus_manager
-
- def load(self):
- if self.dm:
- #print "loading DumpList"
- try:
- rows = self.dm.getDumps()
- #print rows
- for row in rows:
- entry = Dump()
- for column in row:
- log2(" Dump.%s='%s'", column, row[column])
- entry.__setattr__(column, row[column])
- self.append(entry)
- except Exception:
- # FIXME handle exception better
- # this is just temporary workaround for rhbz#543725
- raise
- else:
- print "db == None!"
-
- def getDumpByCrashID(self, crashid):
- for dump in self:
- if crashid == dump.getDumpDir():
- return dump
-
-__PFList = None
-__PFList_dbmanager = None
-
-def getDumpList(dbmanager,refresh=None):
- global __PFList
- global __PFList_dbmanager
-
- if __PFList == None or refresh or __PFList_dbmanager != dbmanager:
- __PFList = DumpList(dbus_manager=dbmanager)
- __PFList.load()
- __PFList_dbmanager = dbmanager
- return __PFList
-
-__PFList = None
diff --git a/src/gui/CCMainWindow.py b/src/gui/CCMainWindow.py
deleted file mode 100644
index c6642f78..00000000
--- a/src/gui/CCMainWindow.py
+++ /dev/null
@@ -1,462 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-import pwd
-import getopt
-
-from abrt_utils import _, init_logging, log, log1, log2
-import gobject
-gobject.set_prgname(_("Automatic Bug Reporting Tool"))
-import pygtk
-pygtk.require("2.0")
-try:
- import gtk
-except RuntimeError,e:
- # rhbz#552039
- print e
- sys.exit()
-import gtk.glade
-
-from ConfBackend import getCurrentConfBackend, ConfBackendInitError
-import CCDBusBackend
-from CC_gui_functions import *
-from CCDumpList import getDumpList
-from CCDump import * # FILENAME_xxx, CD_xxx
-from CReporterAssistant import ReporterAssistant
-from PluginsSettingsDialog import PluginsSettingsDialog
-from SettingsDialog import SettingsDialog
-from PluginList import getPluginInfoList
-import ABRTExceptions
-
-
-class MainWindow():
- ccdaemon = None
- def __init__(self, daemon):
- self.theme = gtk.icon_theme_get_default()
- self.updates = ""
- self.ccdaemon = daemon
- #Set the Glade file
- self.gladefile = "%s/ccgui.glade" % sys.path[0]
- self.wTree = gtk.glade.XML(self.gladefile)
-
-
- #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(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:
- STATUS_COL = 0
- APP_NAME_COL = 1
- TIME_STR_COL = 2
- 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"))
- icon_column.cell = gtk.CellRendererPixbuf()
- #icon_column.cell.set_property('cell-background', "#C9C9C9")
- n = self.dlist.append_column(icon_column)
- 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(_("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
- 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, text=(n-1))
- column.set_resizable(True)
- #connect signals
- self.dlist.connect("cursor-changed", self.on_tvDumps_cursor_changed)
- self.dlist.connect("row-activated", self.on_dumpRowActivated)
- 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_miOnlineHelp_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("miOnlineHelp").connect("activate", self.on_miOnlineHelp_clicked)
- self.wTree.get_widget("miPlugins").connect("activate", self.on_miPreferences_clicked)
- self.wTree.get_widget("miPreferences").connect("activate", self.on_miSettings_clicked)
- self.wTree.get_widget("miReport").connect("activate", self.on_bReport_clicked)
- self.wTree.get_widget("miDelete").connect("activate", self.on_bDelete_clicked, self.dlist)
- # connect handlers for daemon signals
- self.ccdaemon.connect("crash", self.on_data_changed_cb, None)
- self.ccdaemon.connect("abrt-error", self.error_cb)
- #self.ccdaemon.connect("update", self.update_cb)
- # for now, just treat them the same (w/o this, we don't even see daemon warnings in logs!):
- #self.ccdaemon.connect("warning", self.update_cb)
- self.ccdaemon.connect("show_gui", self.show_cb)
- self.ccdaemon.connect("daemon-state-changed", self.on_daemon_state_changed_cb)
- self.ccdaemon.connect("report-done", self.on_report_done_cb)
-
- self.pluginlist = None
-
- def on_report_done_cb(self, daemon, result):
- self.hydrate()
-
- def on_daemon_state_changed_cb(self, widget, state):
- if state == "up":
- self.hydrate() # refresh crash list
- #self.window.set_sensitive(True)
- # abrtd might just die on timeout, it's not fatal
- #elif state == "down":
- # self.window.set_sensitive(False)
-
- def on_popupActivate(self, widget, event):
- menu = self.wTree.get_widget("popup_menu")
- # 3 == right mouse button
- if event.button == 3:
- menu.popup(None, None, None, event.button, event.time)
-
- def on_miAbout_clicked(self, widget):
- dialog = self.wTree.get_widget("about")
- result = dialog.run()
- dialog.hide()
-
- def on_miOnlineHelp_clicked(self, widget):
- # opens default browser and shows ABRT chapter from deployment guide
- gtk.show_uri(None, "http://docs.fedoraproject.org/en-US/Fedora/14/html/Deployment_Guide/ch-abrt.html", gtk.gdk.CURRENT_TIME)
-
- def on_miPreferences_clicked(self, widget):
- dialog = PluginsSettingsDialog(self.window,self.ccdaemon)
- dialog.hydrate()
- dialog.show()
-
- def on_miSettings_clicked(self, widget):
- dialog = SettingsDialog(self.window, self.ccdaemon)
- try:
- dialog.hydrate()
- except Exception, ex:
- gui_error_message(_("Cannot show the settings dialog.\n%s" % ex))
- return
- dialog.show()
-
- def error_cb(self, daemon, message=None):
- gui_error_message(_("Unable to finish the current task!\n%s" % message), parent_dialog=self.window)
-
- def update_cb(self, daemon, message):
- self.updates += message
- if self.updates[-1] != '\n':
- self.updates += '\n'
- message = message.replace('\n',' ')
- self.wTree.get_widget("lStatus").set_text(message)
- buff = gtk.TextBuffer()
- buff.set_text(self.updates)
- end = buff.get_insert()
- tvUpdates = self.wTree.get_widget("tvUpdates")
- tvUpdates.set_buffer(buff)
- tvUpdates.scroll_mark_onscreen(end)
-
- def get_username_from_uid(self, uid):
- # if uid == None or "" return it back
- if not uid:
- return 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()
- try:
- dumplist = getDumpList(self.ccdaemon, refresh=True)
- except Exception, ex:
- # there is something wrong with the daemon if we cant get the dumplist
- gui_error_message(_("Error while loading the dumplist.\n%s" % ex))
- # so we shouldn't continue..
- sys.exit()
- for entry in dumplist[::-1]:
- n = self.dumpsListStore.append([["gtk-no","gtk-yes"][entry.getMessage() != ""],
- entry.getExecutable(),
- entry.get_hostname(),
- 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?
- self.dlist.set_cursor(self.dumpsListStore.get_path(self.dumpsListStore.get_iter_first()))
-
- def filter_dumps(self, model, miter, data):
- # 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()
- return dumpsListStore, path
- else:
- return None, None
-
- def on_tvDumps_cursor_changed(self, treeview):
- 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)
- self.wTree.get_widget("b_copy").set_sensitive(False)
- # create an empty dump to fill the labels with empty strings
- self.wTree.get_widget("sw_details").hide()
- return
- else:
- self.wTree.get_widget("sw_details").show()
- self.wTree.get_widget("bDelete").set_sensitive(True)
- self.wTree.get_widget("bReport").set_sensitive(True)
- self.wTree.get_widget("b_copy").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_icon_name("application-x-executable", 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()))
-
- #move this to Dump class
- hb_reports = self.wTree.get_widget("hb_reports")
- lReported = self.wTree.get_widget("l_message")
- if dump.getMessage() != "":
- 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(';'):
- if message:
- report_message = tag_urls_in_text(message)
- report_label += "%s\n" % report_message
- report_label_raw += "%s\n" % message
- log2("setting markup '%s'", report_label)
- # 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()
- # in "fill the details" above acts as a fallback
- lReported.set_markup(report_label)
- else:
- hb_reports.hide()
-
- def mark_last_selected_row(self, dump_list_store, path, iter, last_selected_DumpDir):
- # Get dump object from list (in our list it's in last col)
- dump = dump_list_store.get_value(iter, dump_list_store.get_n_columns()-1)
- if dump.getDumpDir() == last_selected_DumpDir:
- self.dlist.set_cursor(dump_list_store.get_path(iter)[0])
- return True # done, stop iteration
- return False
-
- def on_bDelete_clicked(self, button, treeview):
- dumpsListStore, path = self.dumplist_get_selected()
- if not path:
- return
- # this should work until we keep the dump object in the last position
- dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)
- next_iter = dumpsListStore.iter_next(dumpsListStore.get_iter(path[0]))
- last_dump = None
- if next_iter:
- last_dump = dumpsListStore.get_value(next_iter, dumpsListStore.get_n_columns()-1)
- try:
- self.ccdaemon.DeleteDebugDump(dump.getDumpDir())
- self.hydrate()
- if last_dump:
- # we deleted the selected line, so we want to select the next one
- dumpsListStore.foreach(self.mark_last_selected_row, last_dump.getDumpDir())
- treeview.emit("cursor-changed")
- except Exception, ex:
- print ex
-
- 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_values()
- 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()
-
- def on_data_changed_cb(self, *_args):
- # FIXME mark the new entry somehow....
- # remember the selected row
- last_dump = None
- 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()
- if last_dump:
- # re-select the line that was selected before a new crash happened
- dumpsListStore.foreach(self.mark_last_selected_row, last_dump.getDumpDir())
-
- def on_bReport_clicked(self, button):
- 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 = self.dumplist_get_selected()
- if not path:
- return
- dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1)
-
- # Do we want to let user decide which UI they want to use?
- #rs = ReporterSelector(dump, self.ccdaemon, parent=self.window)
- #rs.show()
- assistant = ReporterAssistant(dump, self.ccdaemon, parent=self.window)
- assistant.hydrate()
-
- def delete_event_cb(self, widget, event, data=None):
- gtk.main_quit()
-
- def focus_in_cb(self, widget, event, data=None):
- self.window.set_urgency_hint(False)
-
- def on_bQuit_clicked(self, widget):
- try:
- gtk.main_quit()
- except: # prevent "RuntimeError: called outside of a mainloop"
- sys.exit()
-
- def show(self):
- self.window.show_all()
-
- def show_cb(self, daemon):
- if self.window:
- if self.window.is_active():
- return
- self.window.set_urgency_hint(True)
- self.window.present()
-
-if __name__ == "__main__":
- verbose = 0
- crashid = None
- try:
- opts, args = getopt.getopt(sys.argv[1:], "vh", ["help", "report="])
- except getopt.GetoptError, err:
- print str(err) # prints something like "option -a not recognized"
- sys.exit(2)
-
- for opt, arg in opts:
- if opt == "-v":
- verbose += 1
- elif opt == "--report":
- crashid=arg
- elif opt in ("-h", "--help"):
- print _("Usage: abrt-gui [OPTIONS]"
- "\n\t-v[vv]\t\t\tVerbose"
- "\n\t--report=CRASH_ID\tDirectly report crash with CRASH_ID"
- )
- sys.exit()
-
- init_logging("abrt-gui", verbose)
- log1("log level:%d", verbose)
-
- try:
- daemon = CCDBusBackend.DBusManager()
- except ABRTExceptions.IsRunning:
- # another instance is running, so exit quietly
- sys.exit()
- except Exception, ex:
- # show error message if connection fails
- gui_error_message("%s" % ex)
- sys.exit()
-
- if crashid:
- dumplist = getDumpList(daemon)
- crashdump = dumplist.getDumpByCrashID(crashid)
- if not crashdump:
- gui_error_message(_("No such crash in the database, probably wrong crashid."
- "\ncrashid=%s" % crashid))
- sys.exit()
- assistant = ReporterAssistant(crashdump, daemon, parent=None)
- assistant.hydrate()
- # Do we want to let the users to decide which UI to use?
-# rs = ReporterSelector(crashdump, daemon, parent=None)
-# rs.show()
- else:
- cc = MainWindow(daemon)
- cc.hydrate()
- cc.show()
- gtk.main()
diff --git a/src/gui/CC_gui_functions.py b/src/gui/CC_gui_functions.py
deleted file mode 100644
index 56abae1b..00000000
--- a/src/gui/CC_gui_functions.py
+++ /dev/null
@@ -1,253 +0,0 @@
-# -*- coding: utf-8 -*-
-from glib import markup_escape_text
-import gtk
-import pango
-import subprocess
-import sys
-
-try:
- # we don't want to add dependency to rpm, but if we have it, we can use it
- import rpm
-except ImportError:
- rpm = None
-from abrt_utils import _, log, log1, log2
-
-
-def tag_urls_in_text(text):
- url_marks = ["http://", "https://", "ftp://", "ftps://", "file://"]
- text = markup_escape_text(text)
- lines = text.split('\n')
- lines_dict = {}
- for index in xrange(len(lines)):
- lines_dict[index] = lines[index]
-
- for mark in url_marks:
- for ix,line in lines_dict.items():
- last_mark = line.find(mark)
- if last_mark != -1:
- url_end = line.find(' ',last_mark)
- if url_end == -1:
- url_end = len(line)
- url = line[last_mark:url_end]
- tagged_url = "<a href=\"%s\">%s</a>" % (url, url)
- lines_dict[ix] = line.replace(url, tagged_url)
- retval = ""
- for line in lines_dict.itervalues():
- retval += line
- retval +='\n'
- # strip the trailing \n
- return retval[:-1]
-
-def on_label_resize(label, allocation):
- label.set_size_request(allocation.width,-1)
-
-def gui_report_dialog ( report_status_dict, parent_dialog,
- message_type=gtk.MESSAGE_INFO,
- widget=None, page=0, broken_widget=None ):
- MAX_WIDTH = 50
- builder = gtk.Builder()
- builderfile = "%s%sdialogs.glade" % (sys.path[0],"/")
- builder.add_from_file(builderfile)
- dialog = builder.get_object("ReportDialog")
- dialog.set_geometry_hints(dialog, min_width=450, min_height=150)
- dialog.set_resizable(True)
- main_hbox = builder.get_object("main_hbox")
-
- STATUS = 0
- MESSAGE = 1
- status_vbox = gtk.VBox()
- for plugin, res in report_status_dict.iteritems():
- plugin_status_vbox = gtk.VBox()
- plugin_label = gtk.Label()
- plugin_label.set_markup("<b>%s</b>: " % plugin)
- plugin_label.set_justify(gtk.JUSTIFY_RIGHT)
- plugin_label.set_alignment(0, 0)
- status_label = gtk.Label()
- status_label.connect("size-allocate",on_label_resize)
- status_label.set_max_width_chars(MAX_WIDTH)
- status_label.set_size_request(400,-1)
- status_label.set_selectable(True)
- status_label.set_line_wrap(True)
- status_label.set_line_wrap_mode(pango.WRAP_CHAR)
- status_label.set_alignment(0, 0)
- plugin_status_vbox.pack_start(plugin_label, expand=False)
- plugin_status_vbox.pack_start(status_label, fill=True, expand=True)
- # 0 means not succesfull
- #if report_status_dict[plugin][STATUS] == '0':
- # this first one is actually a fallback to set at least
- # a raw text in case when set_markup() fails
- status_label.set_text(report_status_dict[plugin][MESSAGE])
- status_label.set_markup("<span foreground='red'>%s</span>" % markup_escape_text(report_status_dict[plugin][MESSAGE]))
- # if the report was not succesful then this won't pass so this runs only
- # if report succeds and gets overwriten by the status message
- if report_status_dict[plugin][STATUS] == '1':
- status_label.set_markup(tag_urls_in_text(report_status_dict[plugin][MESSAGE]))
-
- if len(report_status_dict[plugin][1]) > MAX_WIDTH:
- status_label.set_tooltip_text(report_status_dict[plugin][1])
- status_vbox.pack_start(plugin_status_vbox, fill=True, expand=False)
- main_hbox.pack_start(status_vbox)
-
- if widget != None:
- if isinstance (widget, gtk.CList):
- widget.select_row (page, 0)
- elif isinstance (widget, gtk.Notebook):
- widget.set_current_page (page)
- if broken_widget != None:
- broken_widget.grab_focus ()
- if isinstance (broken_widget, gtk.Entry):
- broken_widget.select_region (0, -1)
-
- if parent_dialog:
- dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
- dialog.set_transient_for(parent_dialog)
- else:
- dialog.set_position (gtk.WIN_POS_CENTER)
-
- main_hbox.show_all()
- ret = dialog.run()
- dialog.destroy()
- return ret
-
-def gui_info_dialog ( message, parent=None,
- message_type=gtk.MESSAGE_INFO,
- widget=None, page=0, broken_widget=None ):
-
- dialog = gtk.MessageDialog( parent,
- gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT,
- message_type, gtk.BUTTONS_OK,
- message )
- dialog.set_markup(message)
- if widget != None:
- if isinstance (widget, gtk.CList):
- widget.select_row (page, 0)
- elif isinstance (widget, gtk.Notebook):
- widget.set_current_page (page)
- if broken_widget != None:
- broken_widget.grab_focus ()
- if isinstance (broken_widget, gtk.Entry):
- broken_widget.select_region (0, -1)
-
- if parent:
- dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
- dialog.set_transient_for(parent)
- else:
- dialog.set_position (gtk.WIN_POS_CENTER)
-
- ret = dialog.run ()
- dialog.destroy()
- return ret
-
-def gui_error_message ( message, parent_dialog=None,
- message_type=gtk.MESSAGE_ERROR,
- widget=None, page=0, broken_widget=None ):
-
- dialog = gtk.MessageDialog( parent_dialog,
- gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT,
- message_type, gtk.BUTTONS_OK, message )
- dialog.set_markup(message)
- if parent_dialog:
- dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
- dialog.set_transient_for(parent_dialog)
- else:
- dialog.set_position (gtk.WIN_POS_CENTER)
-
- ret = dialog.run ()
- dialog.destroy()
- return ret
-
-def gui_question_dialog ( message, parent_dialog=None,
- message_type=gtk.MESSAGE_QUESTION,
- widget=None, page=0, broken_widget=None ):
-
- dialog = gtk.MessageDialog( parent_dialog,
- gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT,
- message_type, gtk.BUTTONS_NONE,
- message )
- dialog.add_button("gtk-cancel", gtk.RESPONSE_CANCEL)
- dialog.add_button("gtk-no", gtk.RESPONSE_NO)
- dialog.add_button("gtk-yes", gtk.RESPONSE_YES)
- dialog.set_markup(message)
- if parent_dialog:
- dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
- dialog.set_transient_for(parent_dialog)
- else:
- dialog.set_position (gtk.WIN_POS_CENTER)
-
- ret = dialog.run ()
- dialog.destroy()
- return ret
-
-def get_icon_for_package(theme, package):
- log2("get_icon_for_package('%s')", package)
- package_icon = None
- try:
- package_icon = theme.load_icon(package, 48, gtk.ICON_LOOKUP_USE_BUILTIN)
- except:
- # try to find icon filename by manually
- if not rpm:
- return None
- ts = rpm.TransactionSet()
- mi = ts.dbMatch('name', package)
- possible_icons = []
- icon_filename = ""
- icon_name = ""
- filenames = ""
- for h in mi:
- filenames = h['filenames']
- for filename in filenames:
- # add check only for last 4 chars
- if filename.rfind(".png") != -1:
- possible_icons.append(filename)
- if filename.rfind(".desktop") != -1:
- log2("desktop file:'%s'", filename)
- desktop_file = open(filename, 'r')
- lines = desktop_file.readlines()
- for line in lines:
- if line.find("Icon=") != -1:
- log2("Icon='%s'", line[5:-1])
- icon_name = line[5:-1]
- break
- desktop_file.close()
- # .desktop file found
- if icon_name:
- try:
- package_icon = theme.load_icon(icon_name, 48, gtk.ICON_LOOKUP_USE_BUILTIN)
- except:
- # we should get here only if the .desktop file is wrong..
- for filename in h['filenames']:
- if filename.rfind("%s.png" % icon_name) != -1:
- icon_filename = filename
- # if we found size 48x48 we don't need to continue
- if "48x48" in icon_filename:
- log2("png file:'%s'", filename)
- break
- if icon_filename:
- log1("icon created from %s", icon_filename)
- package_icon = gtk.gdk.pixbuf_new_from_file_at_size(icon_filename, 48, 48)
- return package_icon
-
-def show_log(message_log, parent=None):
- builder = gtk.Builder()
- builderfile = "%s%sdialogs.glade" % (sys.path[0],"/")
- builder.add_from_file(builderfile)
- dialog = builder.get_object("LogViewer")
- tevLog = builder.get_object("tevLog")
-
- if parent:
- dialog.set_position (gtk.WIN_POS_CENTER_ON_PARENT)
- dialog.set_transient_for(parent)
- else:
- dialog.set_position (gtk.WIN_POS_CENTER)
-
- buff = gtk.TextBuffer()
- buff.set_text(message_log)
- tevLog.set_buffer(buff)
-
- dialog.run()
- dialog.destroy()
-
-if __name__ == "__main__":
- window = gtk.Window()
- gui_report_dialog("<b>Bugzilla</b>: <span foreground='red'>CReporterBugzilla::Report(): CReporterBugzilla::Login(): RPC response indicates failure. The username or password you entered is not valid.</span>\n<b>Logger</b>: Report was stored into: /var/log/abrt.log", window)
- gtk.main()
diff --git a/src/gui/CReporterAssistant.py b/src/gui/CReporterAssistant.py
deleted file mode 100644
index 300ddc3f..00000000
--- a/src/gui/CReporterAssistant.py
+++ /dev/null
@@ -1,1149 +0,0 @@
-# -*- coding: utf-8 -*-
-import gtk
-from PluginList import getPluginInfoList
-from abrt_utils import _, log, log1, log2, get_verbose_level, g_verbose, warn
-from CCDump import * # FILENAME_xxx, CD_xxx
-from PluginSettingsUI import PluginSettingsUI
-import sys
-import gobject
-from CC_gui_functions import *
-import pango
-
-# assistant pages
-PAGE_REPORTER_SELECTOR = 0
-PAGE_BACKTRACE_APPROVAL = 1
-PAGE_EXTRA_INFO = 2
-PAGE_CONFIRM = 3
-PAGE_REPORT_DONE = 4
-NO_PROBLEMS_DETECTED = -50
-HOW_TO_HINT_TEXT = "1.\n2.\n3.\n"
-COMMENT_HINT_TEXT = _("Brief description of how to reproduce this or what you did...")
-MISSING_BACKTRACE_TEXT = _("Crash info doesn't contain a backtrace")
-
-DEFAULT_WIDTH = 800
-DEFAULT_HEIGHT = 500
-
-
-class Log(gtk.ScrolledWindow):
- def __init__(self, log=""):
- gtk.ScrolledWindow.__init__(self)
- self.tv = gtk.TextView()
- self.tv.set_editable(False)
- self.add(self.tv)
- # FIXME: log shouldn't be None
- self.buff = gtk.TextBuffer()
- self.buff.set_text(log)
- self.tv.set_buffer(self.buff)
- self.scroll = False
-
- def append_line(self, text):
- end_iter = self.buff.get_end_iter()
- self.buff.insert(end_iter, "%s\n" % text)
- self.scroll_to_end()
-
-
- def append_warning(self, text):
- """ stub """
- pass
-
- def append_error(self, text):
- """ do we need this? shouldn't error be an exception? """
- pass
-
- def set_scroll(self, scroll):
- """ enables/disables scrolling to end, when new text is added """
- self.scroll = scroll
-
- def scroll_to_end(self):
- if self.scroll:
- mark = self.buff.get_insert()
- self.tv.scroll_mark_onscreen(mark)
-
-class ReporterAssistant():
- def __init__(self, report, daemon, log=None, parent=None):
- self.connected_signals = []
- self.plugins_cb = []
- self.daemon = daemon
- self.updates = []
- self.pdict = {}
- self.report = report
- self.parent = parent
- self.comment_changed = False
- self.howto_changed = False
- self.report_has_bt = False
- self.selected_report_events = []
- self.ev_warning = None
- self.log = Log()
- self.log.set_scroll(True)
- """ create the assistant """
- self.assistant = gtk.Assistant()
- self.assistant.set_icon_name("abrt")
- self.assistant.set_default_size(DEFAULT_WIDTH,DEFAULT_HEIGHT)
- self.assistant.set_size_request(DEFAULT_WIDTH,DEFAULT_HEIGHT)
- self.connect_signal(self.assistant, "prepare",self.on_page_prepare)
- self.connect_signal(self.assistant, "cancel",self.on_cancel_clicked)
- self.connect_signal(self.assistant, "close",self.on_close_clicked)
- self.connect_signal(self.assistant, "apply",self.on_apply_clicked)
- self.parent = parent
- if parent:
- self.assistant.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- self.assistant.set_transient_for(parent)
- else:
- # if we don't have parent we want to quit the mainloop on close
- self.assistant.set_position(gtk.WIN_POS_CENTER)
-
- ### progress bar window
- self.builder = gtk.Builder()
- builderfile = "%s/progress_window.glade" % sys.path[0]
- self.builder.add_from_file(builderfile)
- self.pBarWindow = self.builder.get_object("pBarWindow")
- if self.pBarWindow:
- self.connect_signal(self.pBarWindow, "delete_event", self.sw_delete_event_cb)
- pb_log_expander = self.builder.get_object("pb_log_expander")
- pb_log_expander.add(self.log)
-
- self.connect_signal(daemon, "analyze-complete", self.on_analyze_complete_cb, self.pBarWindow)
- self.connect_signal(daemon, "report-done", self.on_report_done_cb)
- self.connect_signal(daemon, "update", self.update_cb)
-
- # add view log button, when in verbose mode
- if get_verbose_level():
- b_view_log = gtk.Button(_("View log"))
- b_view_log.connect("clicked", self.on_show_log_cb)
- self.assistant.add_action_widget(b_view_log)
- b_view_log.show()
-
-
- def on_show_log_cb(self, button):
- viewer = gtk.Window()
- viewer.set_icon_name("abrt")
- viewer.set_default_size(600,500)
- viewer.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- viewer.set_transient_for(self.assistant)
- vbox = gtk.VBox()
- viewer.add(vbox)
- log = Log()
- for line in self.updates:
- log.append_line(line)
- vbox.pack_start(log)
- b_close = gtk.Button(stock=gtk.STOCK_CLOSE)
- b_close.connect("clicked",lambda *w: viewer.destroy())
- vbox.pack_start(b_close, False)
- viewer.show_all()
-
- # call to update the progressbar
- def progress_update_cb(self, *args):
- self.pBar.pulse()
- return True
-
- def on_show_bt_clicked(self, button):
- viewer = gtk.Window()
- viewer.set_icon_name("abrt")
- viewer.set_default_size(600,500)
- viewer.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- viewer.set_transient_for(self.assistant)
- vbox = gtk.VBox()
- viewer.add(vbox)
- bt_tev = gtk.TextView()
- # rhbz#621871
- bt_tev.set_editable(False)
- backtrace_scroll_w = gtk.ScrolledWindow()
- backtrace_scroll_w.add(bt_tev)
- backtrace_scroll_w.set_policy(gtk.POLICY_AUTOMATIC,
- gtk.POLICY_AUTOMATIC)
- bt_tev.set_buffer(self.backtrace_buff)
- vbox.pack_start(backtrace_scroll_w)
- b_close = gtk.Button(stock=gtk.STOCK_CLOSE)
- b_close.connect("clicked",lambda *w: viewer.destroy())
- vbox.pack_start(b_close, False)
- viewer.show_all()
-
- def on_report_done_cb(self, daemon, result):
- self.hide_progress()
- STATUS = 0
- MESSAGE = 1
- # 0 means not succesfull
- #if report_status_dict[plugin][STATUS] == '0':
- # this first one is actually a fallback to set at least
- # a raw text in case when set_markup() fails
- for plugin, res in result.iteritems():
- bug_report = gtk.Label()
- bug_report.set_selectable(True)
- bug_report.set_line_wrap(True)
- bug_report.set_alignment(0.0, 0.0)
- bug_report.set_justify(gtk.JUSTIFY_LEFT)
- bug_report.set_size_request(DEFAULT_WIDTH-50, -1)
- bug_report.set_text(result[plugin][MESSAGE])
- bug_report.set_markup("<span foreground='red'>%s</span>" % markup_escape_text(result[plugin][MESSAGE]))
- # if the report was not succesful then this won't pass so this runs only
- # if report succeds and gets overwriten by the status message
- if result[plugin][STATUS] == '1':
- bug_report.set_markup(tag_urls_in_text(result[plugin][MESSAGE]))
- self.bug_reports_vbox.pack_start(bug_report, expand=False)
- bug_report.show()
-
-
- #if len(result[plugin][1]) > MAX_WIDTH:
- # self.bug_reports.set_tooltip_text(result[plugin][1])
- #gui_report_dialog(result, self.parent)
-
- def cleanup_and_exit(self):
- self.disconnect_signals()
- self.assistant.destroy()
- if not self.parent:
- gtk.main_quit()
-
- def update_cb(self, daemon, message):
- self.updates.append(message)
- message = message.replace('\n',' ')
- self.builder.get_object("lStatus").set_text(message)
- self.log.append_line(message)
-
- def sw_delete_event_cb(self, widget, event, data=None):
- if self.timer:
- gobject.source_remove(self.timer)
- widget.hide()
- return True
-
- def connect_signal(self, obj, signal, callback, data=None):
- if data:
- signal_id = obj.connect(signal, callback, data)
- else:
- signal_id = obj.connect(signal, callback)
- log1("connected signal %s:%s" % (signal, signal_id))
- self.connected_signals.append((obj, signal_id))
-
- def disconnect_signals(self):
- # we need to disconnect all signals in order to break all references
- # to this object, otherwise python won't destroy this object and the
- # signals emmited by daemon will get caught by multiple instances of
- # this class
- for obj, signal_id in self.connected_signals:
- log1("disconnect %s:%s" % (obj, signal_id))
- obj.disconnect(signal_id)
-
- def on_cancel_clicked(self, assistant, user_data=None):
- self.cleanup_and_exit()
-
- def on_close_clicked(self, assistant, user_data=None):
- self.cleanup_and_exit()
-
- def on_apply_clicked(self, assistant, user_data=None):
- self.send_report(self.result)
-
- def show_progress(self):
- if not self.pBarWindow:
- log1("couldn't create the progressbar window")
- return
- if self.assistant.get_property("visible"):
- parent = self.assistant
- log1("progress bar parent is self.assistant")
- else:
- log1("progress bar parent is main window")
- parent = self.parent
-
- if parent:
- self.pBarWindow.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- self.pBarWindow.set_transient_for(parent)
- else:
- self.pBarWindow.set_position(gtk.WIN_POS_CENTER)
- self.pBar = self.builder.get_object("pBar")
-
- self.pBarWindow.show_all()
-
-
- def hide_progress(self):
- try:
- gobject.source_remove(self.timer)
- except:
- pass
- self.pBarWindow.hide()
-
- def on_config_plugin_clicked(self, button, parent, plugin, image):
- try:
- ui = PluginSettingsUI(plugin, parent=parent)
- except Exception, ex:
- gui_error_message(str(ex))
- return
-
- ui.hydrate()
- response = ui.run()
- if response == gtk.RESPONSE_APPLY:
- ui.dehydrate()
- if plugin.Settings.check():
- try:
- plugin.save_settings_on_client_side()
- except Exception, e:
- gui_error_message(_("Cannot save plugin settings:\n %s" % e))
- box = image.get_parent()
- im = gtk.Image()
- im.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_MENU)
- box.remove(image)
- box.pack_start(im, expand = False, fill = False)
- im.show()
- image.destroy()
- button.set_sensitive(False)
- elif response == gtk.RESPONSE_CANCEL:
- log1("cancel")
- ui.destroy()
-
- def check_settings(self, reporters):
- wrong_conf_plugs = []
- for reporter in reporters:
- if reporter.Settings.check() == False:
- wrong_conf_plugs.append(reporter)
-
- if wrong_conf_plugs:
- gladefile = "%s%ssettings_wizard.glade" % (sys.path[0],"/")
- builder = gtk.Builder()
- builder.add_from_file(gladefile)
- dialog = builder.get_object("WrongSettings")
- vbWrongSettings = builder.get_object("vbWrongSettings")
- for plugin in wrong_conf_plugs:
- hbox = gtk.HBox()
- hbox.set_spacing(6)
- image = gtk.Image()
- image.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_MENU)
- button = gtk.Button(_("Configure %s options" % plugin.getName()))
- button.connect("clicked", self.on_config_plugin_clicked, dialog, plugin, image)
- hbox.pack_start(button)
- hbox.pack_start(image, expand = False, fill = False)
- vbWrongSettings.pack_start(hbox)
- vbWrongSettings.show_all()
- dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- dialog.set_transient_for(self.assistant)
- dialog.set_modal(True)
- response = dialog.run()
- dialog.destroy()
- if response == gtk.RESPONSE_YES:
- return True
- else:
- # user cancelled reporting
- return False
- else:
- return NO_PROBLEMS_DETECTED
-
- def warn_user(self, warnings):
- # FIXME: show in lError
- #self.lErrors = self.builder.get_object("lErrors")
- warning_lbl = None
- for warning in warnings:
- if warning_lbl:
- warning_lbl += "\n• %s" % warning
- else:
- warning_lbl = "• %s" % warning
- # fallback
- self.lbl_errors.set_label(warning_lbl)
- self.lbl_errors.set_markup(warning_lbl)
- self.errors_hbox.show_all()
- #fErrors.show_all()
-
- def hide_warning(self):
- self.errors_hbox.hide()
-
- def allow_send(self, send_toggle):
- self.hide_warning()
- #bSend = self.builder.get_object("bSend")
- SendBacktrace = send_toggle.get_active()
- send = True
- error_msgs = []
- rating_required = False
-
- ###for reporter in self.selected_report_events:
- ### if "RatingRequired" in reporter.Settings.keys():
- ### if reporter.Settings["RatingRequired"] == "yes":
- ### rating_required = True
- ### log1(_("Rating is required by the %s plugin") % reporter)
- ###if self.selected_report_events and not rating_required:
- ### log1(_("Rating is not required by any plugin, skipping the check..."))
-
- try:
- rating = int(self.result[FILENAME_RATING][CD_CONTENT])
- log1(_("Rating is %s" % rating))
- except Exception, ex:
- rating = None
- log1(_("Crashdump doesn't have rating => we suppose it's not required"))
-
- # FIXME: temporary warning about low rating because of
- # removal the code that checks if reporter requires rating
- if rating != None and rating < 4:
- error_msgs.append(_("The backtrace is incomplete, please make sure"
- " you provide the steps to reproduce."))
-
-
- # active buttons acording to required fields
- # if an backtrace has rating use it
- if not SendBacktrace:
- send = False
- error_msgs.append(_("You should check the backtrace for sensitive data."))
- error_msgs.append(_("You must agree with sending the backtrace."))
- # we have both SendBacktrace and rating
- # if analyzer doesn't provide the rating, then we suppose that it's
- # not required e.g.: kerneloops, python
- if rating_required and rating != None:
- try:
- package = self.result[FILENAME_PACKAGE][CD_CONTENT]
- # if we don't have package for some reason
- except:
- package = None
- # not usable report
- if rating < 3:
- if package:
- error_msgs.append(_("Reporting disabled because the backtrace is unusable.\nPlease try to install debuginfo manually using the command: <b>debuginfo-install %s</b> \nthen use the Refresh button to regenerate the backtrace." % self.report.getPackageName()))
- else:
- error_msgs.append(_("Reporting disabled because the backtrace is unusable."))
- send = False
- # probably usable 3
- elif rating < 4:
- error_msgs.append(_("The backtrace is incomplete, please make sure you provide the steps to reproduce."))
-
- if error_msgs:
- self.warn_user(error_msgs)
- #bSend.set_sensitive(send)
- self.assistant.set_page_complete(self.pdict_get_page(PAGE_BACKTRACE_APPROVAL), send)
-
- def on_page_prepare(self, assistant, page):
- if page == self.pdict_get_page(PAGE_REPORTER_SELECTOR):
- pass
-
- # this is where dehydrate happens
- elif page == self.pdict_get_page(PAGE_EXTRA_INFO):
- if not self.howto_changed:
- # howto
- buff = gtk.TextBuffer()
- try:
- buff.set_text(self.result[FILENAME_REPRODUCE][CD_CONTENT])
- self.howto_changed = True
- except KeyError:
- buff.set_text(HOW_TO_HINT_TEXT)
- self.howto_tev.set_buffer(buff)
- # don't refresh the comment if user changed it
- if not self.comment_changed:
- # comment
- buff = gtk.TextBuffer()
- try:
- buff.set_text(self.result[FILENAME_COMMENT][CD_CONTENT])
- self.comment_changed = True
- except KeyError:
- buff.set_text(COMMENT_HINT_TEXT)
- self.comment_tev.set_buffer(buff)
- self.on_howto_changed(self.howto_tev, None, self.howto_vbox, page)
- elif page == self.pdict_get_page(PAGE_CONFIRM):
- # howto
- if self.howto_changed:
- howto_buff = self.howto_tev.get_buffer()
- howto_text = howto_buff.get_text(howto_buff.get_start_iter(), howto_buff.get_end_iter())
- # user has changed the steps to reproduce
- self.steps.set_text(howto_text)
- self.result[FILENAME_REPRODUCE] = [CD_TXT, 'y', howto_text]
- else:
- self.steps.set_text(_("You did not provide any steps to reproduce."))
- try:
- del self.result[FILENAME_REPRODUCE]
- except KeyError:
- # if this is a first time, then we don't have key FILENAME_REPRODUCE
- pass
- #comment
- if self.comment_changed:
- comment_buff = self.comment_tev.get_buffer()
- comment_text = comment_buff.get_text(comment_buff.get_start_iter(), comment_buff.get_end_iter())
- # user has changed the comment
- self.comments.set_text(comment_text)
- self.result[FILENAME_COMMENT] = [CD_TXT, 'y', comment_text]
- else:
- self.comments.set_text(_("You did not provide any comments."))
- try:
- del self.result[FILENAME_COMMENT]
- except KeyError:
- # if this is a first time, then we don't have key FILENAME_COMMENT
- pass
-
- # backtrace
- backtrace_text = self.backtrace_buff.get_text(self.backtrace_buff.get_start_iter(), self.backtrace_buff.get_end_iter())
- if self.report_has_bt:
- self.result[FILENAME_BACKTRACE] = [CD_TXT, 'y', backtrace_text]
- if page == self.pdict_get_page(PAGE_BACKTRACE_APPROVAL):
- self.allow_send(self.backtrace_cb)
-
- def send_report(self, report):
- try:
- self.show_progress()
- self.timer = gobject.timeout_add(100, self.progress_update_cb)
- pluginlist = getPluginInfoList(self.daemon)
- reporters_settings = pluginlist.getReporterPluginsSettings()
- log2("Report(report, reporters, settings):")
- log2(" result:%s", str(report))
- # Careful, this will print reporters_settings["Password"] too
- log2(" settings:%s", str(reporters_settings))
- self.daemon.Report(report, self.selected_report_events, reporters_settings)
- log2("Report() returned")
- #self.hydrate()
- except Exception, ex:
- self.hide_progress()
- gui_error_message(_("Reporting failed!\n%s" % ex))
-
- def on_plugin_toggled(self, plugin, plugins, event_name, page):
- complete = False
- if plugin.get_active():
- log1("Plugin >>%s<< activated" % event_name)
- self.selected_report_events.append(event_name)
- ###check_result = self.check_settings([reporter])
- ###if check_result == NO_PROBLEMS_DETECTED:
- ### pass
- ###elif check_result:
- ### page_n = self.assistant.get_current_page()
- ### self.assistant.set_page_complete(page, True)
- ### self.assistant.set_current_page(page_n+1)
- ###else:
- ### plugin.set_active(False)
- else:
- self.selected_report_events.remove(event_name)
- log1("Plugin >>%s<< de-activated" % event_name)
- if self.selected_report_events:
- complete = True
- log1("Selected reporters: %s" % [x for x in self.selected_report_events])
- self.assistant.set_page_complete(page, complete)
-
- def on_bt_toggled(self, togglebutton, page):
- self.allow_send(togglebutton)
-
- def pdict_add_page(self, page, name):
- # FIXME try, except??
- if name not in self.pdict:
- self.pdict[name] = page
- else:
- warn("The page %s is already in the dictionary" % name)
- #raise Exception("The page %s is already in the dictionary" % name)
-
- def pdict_get_page(self, name):
- try:
- return self.pdict[name]
- except Exception, e:
- log2(e)
- return None
-
- def prepare_page_1(self):
- plugins_cb = []
- page = gtk.VBox(spacing=10)
- page.set_border_width(10)
- self.assistant.insert_page(page, PAGE_REPORTER_SELECTOR)
- lbl_default_info = gtk.Label()
- lbl_default_info.set_line_wrap(True)
- lbl_default_info.set_alignment(0.0, 0.0)
- lbl_default_info.set_justify(gtk.JUSTIFY_LEFT)
- lbl_default_info.set_size_request(DEFAULT_WIDTH-50, -1)
- lbl_default_info.set_markup(_("It looks like an application from the "
- "package <b>%s</b> has crashed "
- "on your system. It is a good idea to send "
- "a bug report about this issue. The report "
- "will provide software maintainers with "
- "information essential in figuring out how "
- "to provide a bug fix for you.\n\n"
- "Please review the information that follows "
- "and modify it as needed to ensure your bug "
- "report does not contain any sensitive data "
- "you would rather not share.\n\n"
- "Select where you would like to report the "
- "bug, and press 'Forward' to continue.")
- % self.report.getPackageName())
- page.pack_start(lbl_default_info, expand=True, fill=True)
- vbox_plugins = gtk.VBox()
- page.pack_start(vbox_plugins)
-
- # add checkboxes for enabled reporters
- # the logic for package specific reporters has been moved
- # to abrt-handle-crashdump with configuration in abrt_events.conf
- pluginlist = getPluginInfoList(self.daemon)
- self.selected_report_events = []
- self.possible_report_events = []
- for event_name in self.report.get_report_event_names():
- log1("Adding >>%s<< to report events", event_name)
- self.possible_report_events.append(event_name)
- if len(self.possible_report_events) == 0:
- # WTF?? Try running "report" event anyway...
- self.possible_report_events.append("report")
- for event_name in self.possible_report_events:
- display_name = "Report"
- if event_name != "report": # then it's "report_foo"
- display_name = event_name[7:]
- cb = gtk.CheckButton(display_name)
- cb.connect("toggled", self.on_plugin_toggled, plugins_cb, event_name, page)
- plugins_cb.append(cb)
- vbox_plugins.pack_start(cb, fill=True, expand=False)
- # automatically select the report event if we have only one
- if len(self.possible_report_events) == 1:
- self.assistant.set_page_complete(page, True)
- log1(_("Only one reporter plugin is configured."))
- # this is safe, because in python the variable is visible even
- # outside the for loop it was created (in this case, cb)
- cb.set_active(True)
- self.pdict_add_page(page, PAGE_REPORTER_SELECTOR)
- self.assistant.set_page_type(page, gtk.ASSISTANT_PAGE_INTRO)
- self.assistant.set_page_title(page, _("Send a bug report"))
- page.show_all()
-
- def on_bt_copy(self, button, bt_text_view):
- buff = bt_text_view.get_buffer()
- bt_text = buff.get_text(buff.get_start_iter(), buff.get_end_iter())
- clipboard = gtk.clipboard_get()
- clipboard.set_text(bt_text)
-
- def tv_text_changed(self, textview, default_text):
- buff = textview.get_buffer()
- text = buff.get_text(buff.get_start_iter(), buff.get_end_iter())
- if text:
- if text and text != default_text:
- return True
- return False
- else:
- buff.set_text(default_text)
-
- def on_howto_focusout_cb(self, textview, event):
- self.howto_changed = self.tv_text_changed(textview, HOW_TO_HINT_TEXT)
-
- def on_comment_focusin_cb(self, textview, event):
- if not self.comment_changed:
- # clear "hint" text by supplying a fresh, empty TextBuffer
- textview.set_buffer(gtk.TextBuffer())
-
- def on_comment_focusout_cb(self, textview, event):
- self.comment_changed = self.tv_text_changed(textview, COMMENT_HINT_TEXT)
-
- def prepare_page_2(self):
- page = gtk.VBox(spacing=10)
- page.set_border_width(10)
- lbl_default_info = gtk.Label()
- lbl_default_info.set_line_wrap(True)
- lbl_default_info.set_alignment(0.0, 0.0)
- lbl_default_info.set_justify(gtk.JUSTIFY_FILL)
- lbl_default_info.set_size_request(DEFAULT_WIDTH-50, -1)
- lbl_default_info.set_text(_("Below is the backtrace associated with your "
- "crash. A crash backtrace provides developers with details about "
- "how the crash happened, helping them track down the source of the "
- "problem.\n\n"
- "Please review the backtrace below and modify it as needed to "
- "ensure your bug report does not contain any sensitive data you would "
- "rather not share:")
- )
- page.pack_start(lbl_default_info, expand=False, fill=True)
- self.backtrace_tev = gtk.TextView()
- self.backtrace_tev.set_wrap_mode(gtk.WRAP_WORD)
- # global?
- self.backtrace_buff = gtk.TextBuffer()
- # a tag to highlight searched word
- # OPTION search background
- self.backtrace_buff.create_tag("search_result_bg", background="red")
- # OPTION current possiotion bg
- self.backtrace_buff.create_tag("current_pos_bg", background="yellow")
- #self.backtrace_buff.set_text(self.report[FILENAME_BACKTRACE][CD_CONTENT])
- self.backtrace_tev.set_buffer(self.backtrace_buff)
-
- backtrace_scroll_w = gtk.ScrolledWindow()
- backtrace_scroll_w.add(self.backtrace_tev)
- backtrace_scroll_w.set_policy(gtk.POLICY_AUTOMATIC,
- gtk.POLICY_AUTOMATIC)
- # backtrace
- hbox_bt = gtk.HBox()
- vbox_bt = gtk.VBox(homogeneous=False, spacing=5)
- hbox_bt.pack_start(vbox_bt)
- backtrace_alignment = gtk.Alignment()
- hbox_bt.pack_start(backtrace_alignment, expand=False, padding=10)
- vbox_bt.pack_start(backtrace_scroll_w)
-
- self.last_highlighted_text = []
- self.last_search = 0
-
- # highlights the arrow (or any other widget)
- def highlight(widget, event):
- widget.drag_highlight()
-
- def unhighlight(widget, event):
- widget.drag_unhighlight()
-
- # highlights the current possition with yellow
- def highlight_current():
- start_it = self.backtrace_buff.get_iter_at_mark(self.last_highlighted_text[self.last_search][0])
- end_it = self.backtrace_buff.get_iter_at_mark(self.last_highlighted_text[self.last_search][1])
- self.backtrace_buff.apply_tag_by_name("current_pos_bg", start_it, end_it)
- self.backtrace_buff.place_cursor(start_it)
- self.backtrace_tev.scroll_to_iter(
- start_it, 0, use_align=False,
- xalign=0.5, yalign=0.5)
-
- # remove the yellow highlighting from last position
- def unhighlight_last():
- start_it = self.backtrace_buff.get_iter_at_mark(self.last_highlighted_text[self.last_search][0])
- end_it = self.backtrace_buff.get_iter_at_mark(self.last_highlighted_text[self.last_search][1])
- self.backtrace_buff.remove_tag_by_name("current_pos_bg", start_it, end_it)
-
- def highlight_result(position_mark):
- start_it = self.backtrace_buff.get_iter_at_mark(position_mark[0])
- end_it = self.backtrace_buff.get_iter_at_mark(position_mark[1])
- self.backtrace_buff.apply_tag_by_name("search_result_bg", start_it, end_it)
-
- def search_down(widget, event):
- if event.button == 1:
- if self.last_search+1 < len(self.last_highlighted_text):
- unhighlight_last()
- self.last_search += 1
- # mark current possition yellow
- highlight_current()
- self.lbl_occur.set_text(_("Found %i occurence(s) [at: %i of %i]" %
- (len(self.last_highlighted_text),
- self.last_search+1,
- len(self.last_highlighted_text)
- )))
-
- def search_up(widget, event):
- if event.button == 1:
- if self.last_highlighted_text and (self.last_search-1 >= 0):
- unhighlight_last()
- self.last_search -= 1
- # mark current possition yellow
- highlight_current()
- self.lbl_occur.set_text(_("Found %i occurence(s) [at: %i of %i]" %
- (len(self.last_highlighted_text),
- self.last_search+1,
- len(self.last_highlighted_text)
- )))
-
- def highlight_search(entry):
- if self.last_highlighted_text:
- # clear the search
- self.last_highlighted_text = []
- self.last_search = 0
- # clears everything
- # this will remove even tags, that might be added from a different
- # place
- start_iter = self.backtrace_buff.get_start_iter()
- end_iter = self.backtrace_buff.get_end_iter()
- self.backtrace_buff.remove_all_tags(start_iter, end_iter)
- search_start_iter = start_iter
- search_text = entry.get_text()
- self.lbl_occur.set_text("")
- if search_text:
- while True:
- match = search_start_iter.forward_search(search_text,
- gtk.TEXT_SEARCH_TEXT_ONLY, limit=None)
- if not match:
- break
- start_mark = self.backtrace_buff.create_mark(None, match[0])
- end_mark = self.backtrace_buff.create_mark(None, match[1])
- self.last_highlighted_text.append((start_mark, end_mark))
- highlight_result(self.last_highlighted_text[-1])
- search_start_iter = match[1]
-
- if self.last_highlighted_text:
- highlight_current()
- self.lbl_occur.set_text(_("Found %i occurence(s) [at: %i of %i]" %
- (len(self.last_highlighted_text),
- self.last_search+1,
- len(self.last_highlighted_text)
- )))
-
-
- self.s_timeout = 0
- def search_timeout(entry):
- if self.s_timeout:
- gobject.source_remove(self.s_timeout)
- self.s_timeout = gobject.timeout_add(500, highlight_search, entry)
-
- #arrows vbox
- vbox_arrows = gtk.VBox()
- # up arrow
- arrow_up = gtk.Arrow(gtk.ARROW_UP, gtk.SHADOW_NONE)
- event_up = gtk.EventBox()
- event_up.add(arrow_up)
- event_up.connect("enter-notify-event", highlight)
- event_up.connect("leave-notify-event", unhighlight)
- event_up.connect("button-press-event", search_up)
- # down arrow
- event_down = gtk.EventBox()
- arrow_down = gtk.Arrow(gtk.ARROW_DOWN, gtk.SHADOW_NONE)
- event_down.add(arrow_down)
- event_down.connect("enter-notify-event", highlight)
- event_down.connect("leave-notify-event", unhighlight)
- event_down.connect("button-press-event", search_down)
- vbox_arrows.pack_start(event_up)
- vbox_arrows.pack_start(event_down)
- # search box
- hbox_search_wrap = gtk.HBox()
- search_entry = gtk.Entry()
- search_entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_FIND)
- search_entry.set_icon_activatable(gtk.ENTRY_ICON_SECONDARY, False)
- search_entry.connect("changed", search_timeout)
- lbl_search = gtk.Label(_("Search:"))
- hbox_search_wrap.pack_start(lbl_search, False, False)
- hbox_search_wrap.pack_start(search_entry)
- hbox_search_wrap.pack_start(vbox_arrows, False, False)
- # the big hbox
- align_search = gtk.Alignment()
- hbox_search = gtk.HBox(homogeneous=True)
- hbox_search.pack_start(align_search)
- vb = gtk.VBox()
- self.lbl_occur = gtk.Label()
- vb.pack_start(hbox_search_wrap)
- vb.pack_start(self.lbl_occur)
- hbox_search.pack_start(vb)
- vbox_bt.pack_start(hbox_search, False, False)
- # bad backtrace, reporting disabled
- # warnings about wrong bt
- self.errors_hbox = gtk.HBox()
- self.warning_image = gtk.Image()
- self.warning_image.set_from_stock(gtk.STOCK_DIALOG_WARNING,gtk.ICON_SIZE_DIALOG)
- self.lbl_errors = gtk.Label()
- self.lbl_errors.set_line_wrap(True)
- #self.lbl_errors.set_alignment(0.0, 0.0)
- self.lbl_errors.set_justify(gtk.JUSTIFY_FILL)
- self.lbl_errors.set_size_request(DEFAULT_WIDTH-50, -1)
- self.lbl_errors.set_selectable(True)
- self.errors_hbox.pack_start(self.warning_image, False, False)
- self.errors_hbox.pack_start(self.lbl_errors)
- ###
- vbox_bt.pack_start(self.errors_hbox, False, False)
- hbox_buttons = gtk.HBox(homogeneous=True)
- button_alignment = gtk.Alignment()
- b_refresh = gtk.Button(_("Refresh"))
- b_refresh.connect("clicked", self.hydrate, 1)
- b_copy = gtk.Button(_("Copy"))
- b_copy.connect("clicked", self.on_bt_copy, self.backtrace_tev)
- hbox_buttons.pack_start(button_alignment)
- hbox_buttons.pack_start(b_refresh, expand=False, fill=True)
- hbox_buttons.pack_start(b_copy, expand=False, fill=True)
- vbox_bt.pack_start(hbox_buttons, expand=False, fill=False)
- self.backtrace_cb = gtk.CheckButton(_("I agree with submitting the backtrace"))
- self.backtrace_cb.connect("toggled", self.on_bt_toggled, page)
- self.assistant.insert_page(page, PAGE_BACKTRACE_APPROVAL)
- self.pdict_add_page(page, PAGE_BACKTRACE_APPROVAL)
- self.assistant.set_page_type(page, gtk.ASSISTANT_PAGE_CONTENT)
- self.assistant.set_page_title(page, _("Approve the backtrace"))
- page.pack_start(hbox_bt)
- page.pack_start(self.backtrace_cb, expand=False, fill=False)
- page.show_all()
-
- def show_warning_for_tev(self, vbox, message):
- if type(vbox) == gtk.VBox:
- if not self.ev_warning:
- lbl_warning = gtk.Label(message)
- self.ev_warning = gtk.EventBox()
- self.ev_warning.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#CC3333'))
- self.ev_warning.add(lbl_warning)
- vbox.pack_start(self.ev_warning, False, False)
- self.ev_warning.show_all()
- else:
- log("Can't show warning because page is not a VBox")
-
- # TODO: per page warning
- def hide_warning_for_tev(self, vbox=None):
- if self.ev_warning:
- self.ev_warning.hide()
-
- def is_howto_filled(self, howto_buff):
- text = ""
- start_it = howto_buff.get_start_iter()
- end_it = howto_buff.get_end_iter()
- text = howto_buff.get_text(start_it, end_it)
- # ingore new lines and spaces in the text
- clean_text = text.strip().replace("\n","").replace(" ","")
- clean_howto_hint = HOW_TO_HINT_TEXT.strip().replace("\n","").replace(" ","")
- # howto has to be longer then the hint
- # and must not be same as the hint
- if ( len(clean_text) >= len(clean_howto_hint) and
- clean_text != clean_howto_hint
- ):
- return True
- else:
- return False
-
- def on_howto_changed(self, textview, event, vbox, page):
- textbuffer = textview.get_buffer()
- howto_filled = self.is_howto_filled(textbuffer)
- if not howto_filled:
- self.show_warning_for_tev(vbox, _("You need to fill the how to before you can proceed..."))
- else:
- self.hide_warning_for_tev()
- self.assistant.set_page_complete(page, self.is_howto_filled(textbuffer))
-
- def prepare_page_3(self):
- page = gtk.VBox(spacing=10)
- page.set_border_width(10)
- #lbl_default_info = gtk.Label()
- #lbl_default_info.set_line_wrap(True)
- #lbl_default_info.set_alignment(0.0, 0.0)
- #lbl_default_info.set_justify(gtk.JUSTIFY_FILL)
- #lbl_default_info.set_size_request(600, -1)
- #page.pack_start(lbl_default_info, expand=False, fill=True)
- details_hbox = gtk.HBox()
- details_hbox.set_border_width(10)
- details_alignment = gtk.Alignment()
- details_vbox = gtk.VBox(spacing=10)
- details_hbox.pack_start(details_vbox)
- details_hbox.pack_start(details_alignment, expand=False, padding=30)
-
- # how to reproduce
- self.howto_vbox = gtk.VBox(spacing=0)
- howto_lbl = gtk.Label(_("How did this crash happen (step-by-step)? "
- "How would you reproduce it?"))
- howto_lbl.set_alignment(0.0, 0.0)
- howto_lbl.set_justify(gtk.JUSTIFY_FILL)
- self.howto_tev = gtk.TextView()
- self.howto_tev.set_wrap_mode(gtk.WRAP_WORD)
- self.howto_tev.set_accepts_tab(False)
- self.howto_tev.connect("focus-out-event", self.on_howto_focusout_cb)
- self.howto_tev.connect("key-release-event", self.on_howto_changed, self.howto_vbox, page)
- howto_buff = gtk.TextBuffer()
- howto_buff.set_text(HOW_TO_HINT_TEXT)
- self.howto_tev.set_buffer(howto_buff)
- howto_scroll_w = gtk.ScrolledWindow()
- howto_scroll_w.add(self.howto_tev)
- howto_scroll_w.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
- self.howto_vbox.pack_start(howto_lbl, expand=False, fill=True)
- self.howto_vbox.pack_start(howto_scroll_w)
-
- # comment
- comment_vbox = gtk.VBox(spacing=5)
- comment_lbl = gtk.Label(_("Are there any comments you would like to share "
- "with the software maintainers?"))
- comment_lbl.set_alignment(0.0, 0.0)
- comment_lbl.set_justify(gtk.JUSTIFY_FILL)
- self.comment_tev = gtk.TextView()
- self.comment_tev.set_wrap_mode(gtk.WRAP_WORD)
- self.comment_tev.set_accepts_tab(False)
- self.comment_tev.connect("focus-in-event", self.on_comment_focusin_cb)
- self.comment_tev.connect("focus-out-event", self.on_comment_focusout_cb)
- comment_scroll_w = gtk.ScrolledWindow()
- comment_scroll_w.add(self.comment_tev)
- comment_scroll_w.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
- comment_vbox.pack_start(comment_lbl, expand=False, fill=True)
- comment_vbox.pack_start(comment_scroll_w)
-
- details_vbox.pack_start(self.howto_vbox)
- details_vbox.pack_start(comment_vbox)
- self.assistant.insert_page(page, PAGE_EXTRA_INFO)
- self.pdict_add_page(page, PAGE_EXTRA_INFO)
- self.assistant.set_page_type(page, gtk.ASSISTANT_PAGE_CONTENT)
- self.assistant.set_page_title(page, _("Provide additional details"))
- self.assistant.set_page_complete(page, True)
- tip_hbox = gtk.HBox()
- tip_image = gtk.Image()
- tip_lbl = gtk.Label("")
- tip_lbl.set_alignment(0.0, 0.0)
- tip_lbl.set_justify(gtk.JUSTIFY_FILL)
- tip_lbl.set_markup(_("<b>Tip:</b> Your comments are not private. "
- "Please watch what you say accordingly."))
- #tip_hbox.pack_start(tip_image)
- tip_hbox.pack_start(tip_lbl, expand=False)
- page.pack_start(details_hbox)
- tip_alignment = gtk.Alignment()
- #page.pack_start(tip_alignment, padding=10)
- page.pack_start(tip_hbox, expand=False)
- page.show_all()
-
- def prepare_page_4(self):
- lines_in_table = {}
- width, height = self.assistant.get_size()
- def add_info_to_table(table, heading, text):
- line = 0
- if table in lines_in_table:
- line = lines_in_table[table]
-
- heading_lbl = gtk.Label()
- heading_lbl.set_alignment(0.0, 0.0)
- heading_lbl.set_justify(gtk.JUSTIFY_LEFT)
- heading_lbl.set_markup("<b>%s:</b>" % heading)
- table.attach(heading_lbl, 0, 1, line, line+1,
- xoptions=gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL,
- xpadding=5, ypadding=5)
- lbl = gtk.Label(text)
- lbl.set_line_wrap(True)
- lbl.set_size_request(width/4, -1)
- lbl.set_alignment(0.0, 0.0)
- lbl.set_justify(gtk.JUSTIFY_LEFT)
- table.attach(lbl, 1, 2, line, line+1,
- xoptions=gtk.FILL, yoptions=gtk.EXPAND|gtk.FILL,
- xpadding=5, ypadding=5)
-
- lines_in_table[table] = line+1
-
- page = gtk.VBox(spacing=20)
- page.set_border_width(10)
- self.assistant.insert_page(page, PAGE_CONFIRM)
- self.pdict_add_page(page, PAGE_CONFIRM)
- self.assistant.set_page_type(page, gtk.ASSISTANT_PAGE_CONFIRM)
- self.assistant.set_page_title(page, _("Confirm and send the report"))
- self.assistant.set_page_complete(page, True)
- summary_lbl = gtk.Label(_("Below is a summary of your bug report. "
- "Please click 'Apply' to submit it."))
- summary_lbl.set_alignment(0.0, 0.0)
- summary_lbl.set_justify(gtk.JUSTIFY_FILL)
- basic_details_lbl = gtk.Label()
- basic_details_lbl.set_markup(_("<b>Basic details</b>"))
- basic_details_lbl.set_alignment(0.0, 0.0)
- basic_details_lbl.set_justify(gtk.JUSTIFY_FILL)
-
- summary_table_left = gtk.Table(rows=4, columns=2)
- summary_table_right = gtk.Table(rows=4, columns=2)
- # left table
- add_info_to_table(summary_table_left, _("Component"), "%s" % self.report.get_component())
- add_info_to_table(summary_table_left, _("Package"), "%s" % self.report.getPackageName())
- add_info_to_table(summary_table_left, _("Executable"), "%s" % self.report.getExecutable())
- add_info_to_table(summary_table_left, _("Cmdline"), "%s" % self.report.get_cmdline())
- #right table
- add_info_to_table(summary_table_right, _("Architecture"), "%s" % self.report.get_arch())
- add_info_to_table(summary_table_right, _("Kernel"), "%s" % self.report.get_kernel())
- add_info_to_table(summary_table_right, _("Release"),"%s" % self.report.get_release())
- add_info_to_table(summary_table_right, _("Reason"), "%s" % self.report.get_reason())
-
- summary_hbox = gtk.HBox(spacing=5, homogeneous=True)
- left_table_vbox = gtk.VBox()
- left_table_vbox.pack_start(summary_table_left, expand=False, fill=False)
- left_table_vbox.pack_start(gtk.Alignment())
- summary_hbox.pack_start(left_table_vbox, expand=False, fill=True)
- summary_hbox.pack_start(summary_table_right, expand=False, fill=True)
-
- # backtrace
- backtrace_lbl = gtk.Label()
- backtrace_lbl.set_markup(_("<b>Backtrace</b>"))
- backtrace_lbl.set_alignment(0.0, 0.5)
- backtrace_lbl.set_justify(gtk.JUSTIFY_LEFT)
- backtrace_show_btn = gtk.Button(_("Click to view..."))
- backtrace_show_btn.connect("clicked", self.on_show_bt_clicked)
- backtrace_hbox = gtk.HBox(homogeneous=True)
- hb = gtk.HBox()
- hb.pack_start(backtrace_lbl)
- hb.pack_start(backtrace_show_btn, expand=False)
- backtrace_hbox.pack_start(hb)
- alignment = gtk.Alignment()
- backtrace_hbox.pack_start(alignment)
-
- # steps to reporoduce
- reproduce_lbl = gtk.Label()
- reproduce_lbl.set_markup(_("<b>Steps to reproduce:</b>"))
- reproduce_lbl.set_alignment(0.0, 0.0)
- reproduce_lbl.set_justify(gtk.JUSTIFY_LEFT)
- self.steps = gtk.Label()
- self.steps.set_alignment(0.0, 0.0)
- self.steps.set_justify(gtk.JUSTIFY_LEFT)
- self.steps.set_line_wrap(True)
- self.steps.set_line_wrap_mode(pango.WRAP_CHAR)
- self.steps.set_size_request(int(DEFAULT_WIDTH*0.8), -1)
- #self.steps_lbl.set_text("1. Fill in information about step 1.\n"
- # "2. Fill in information about step 2.\n"
- # "3. Fill in information about step 3.\n")
- steps_aligned_hbox = gtk.HBox()
- self.steps_hbox = gtk.HBox(spacing=10)
- self.steps_hbox.pack_start(reproduce_lbl)
- self.steps_hbox.pack_start(self.steps)
- steps_aligned_hbox.pack_start(self.steps_hbox, expand=False)
- steps_aligned_hbox.pack_start(gtk.Alignment())
-
- # comments
- comments_lbl = gtk.Label()
- comments_lbl.set_markup(_("<b>Comments:</b>"))
- comments_lbl.set_alignment(0.0, 0.0)
- comments_lbl.set_justify(gtk.JUSTIFY_LEFT)
- self.comments = gtk.Label(_("No comment provided!"))
- self.comments.set_line_wrap(True)
- self.comments.set_line_wrap_mode(pango.WRAP_CHAR)
- self.comments.set_size_request(int(DEFAULT_WIDTH*0.8), -1)
- comments_hbox = gtk.HBox(spacing=10)
- comments_hbox.pack_start(comments_lbl)
- comments_hbox.pack_start(self.comments)
- comments_aligned_hbox = gtk.HBox()
- comments_aligned_hbox.pack_start(comments_hbox, expand=False)
- comments_aligned_hbox.pack_start(gtk.Alignment())
-
- # pack all into the page
-
- summary_vbox = gtk.VBox(spacing=20)
- summary_vbox.pack_start(summary_hbox, expand=False)
- summary_vbox.pack_start(backtrace_hbox, expand=False)
- summary_vbox.pack_start(steps_aligned_hbox, expand=False)
- summary_vbox.pack_start(comments_aligned_hbox, expand=False)
- summary_scroll = gtk.ScrolledWindow()
- summary_scroll.set_shadow_type(gtk.SHADOW_NONE)
- summary_scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
- scroll_viewport = gtk.Viewport()
- scroll_viewport.set_shadow_type(gtk.SHADOW_NONE)
- scroll_viewport.add(summary_vbox)
- summary_scroll.add(scroll_viewport)
- page.pack_start(summary_lbl, expand=False)
- page.pack_start(basic_details_lbl, expand=False)
- page.pack_start(summary_scroll)
- page.show_all()
-
- def prepare_page_5(self):
- page = gtk.VBox(spacing=20)
- page.set_border_width(10)
- self.assistant.insert_page(page, PAGE_REPORT_DONE)
- self.pdict_add_page(page, PAGE_REPORT_DONE)
- self.assistant.set_page_type(page, gtk.ASSISTANT_PAGE_SUMMARY)
- self.assistant.set_page_title(page, _("Finished sending the bug report"))
- bug_reports_lbl = gtk.Label()
- bug_reports_lbl.set_alignment(0.0, 0.0)
- bug_reports_lbl.set_justify(gtk.JUSTIFY_LEFT)
- bug_reports_lbl.set_markup(_("<b>Bug reports:</b>"))
- width, height = self.assistant.get_size()
- self.bug_reports_vbox = gtk.VBox(spacing=5)
- self.bug_reports_vbox.pack_start(bug_reports_lbl, expand=False)
- page.pack_start(self.bug_reports_vbox)
- page.show_all()
-
- def __del__(self):
- log1("wizard: about to be deleted")
-
- def on_analyze_complete_cb(self, daemon, result, pBarWindow):
- try:
- gobject.source_remove(self.timer)
- except:
- pass
- self.pBarWindow.hide()
- if not result:
- gui_error_message(_("Unable to get report!\nIs debuginfo missing?"))
- return
- self.result = result
- # set the backtrace text
- try:
- self.backtrace_buff.set_text(self.result[FILENAME_BACKTRACE][CD_CONTENT])
- self.report_has_bt = True
- except:
- self.backtrace_buff.set_text(MISSING_BACKTRACE_TEXT)
- self.backtrace_cb.set_active(True)
- log1("Crash info doesn't contain a backtrace, is it disabled?")
-
- self.allow_send(self.backtrace_cb)
- self.show()
-
- def hydrate(self, button=None, force=0):
- if not force:
- self.prepare_page_1()
- self.prepare_page_2()
- self.prepare_page_3()
- self.prepare_page_4()
- self.prepare_page_5()
- # FIXME don't duplicate the code, move to function
- self.show_progress()
- self.timer = gobject.timeout_add(100, self.progress_update_cb)
-
- # show the report window with selected report
- # when getReport is done it emits "analyze-complete" and on_analyze_complete_cb is called
- # FIXME: does it make sense to change it to use callback rather then signal emitting?
- try:
- self.daemon.start_job(self.report.getDumpDir(), force)
- except Exception, ex:
- # FIXME #3 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply
- # do this async and wait for yum to end with debuginfoinstal
- if self.timer:
- gobject.source_remove(self.timer)
- self.pBarWindow.hide()
- gui_error_message(_("Error acquiring the report: %s" % ex))
- return
-
- def show(self):
- self.assistant.show()
-
-
-if __name__ == "__main__":
- wiz = ReporterAssistant()
- wiz.show()
- gtk.main()
diff --git a/src/gui/ConfBackend.py b/src/gui/ConfBackend.py
deleted file mode 100644
index 36c15ff2..00000000
--- a/src/gui/ConfBackend.py
+++ /dev/null
@@ -1,248 +0,0 @@
-# -*- coding: utf-8 -*-
-from abrt_utils import _, log, log1, log2
-
-# Doc on Gnome keyring API:
-# http://library.gnome.org/devel/gnome-keyring/stable/
-# Python bindings are in gnome-python2-desktop package
-
-try:
- import gnomekeyring as gkey
-except ImportError, e:
- gkey = None
-
-# Exceptions
-class ConfBackendInitError(Exception):
- def __init__(self, msg):
- Exception.__init__(self)
- self.what = msg
-
- def __str__(self):
- return self.what
-
-class ConfBackendSaveError(Exception):
- def __init__(self, msg):
- Exception.__init__(self)
- self.what = msg
-
- def __str__(self):
- return self.what
-
-class ConfBackendLoadError(Exception):
- def __init__(self, msg):
- Exception.__init__(self)
- self.what = msg
-
- def __str__(self):
- return self.what
-
-
-class ConfBackend(object):
- def __init__(self):
- pass
-
- def save(self, name, settings):
- """ Default save method has to be implemented in derived class """
- raise NotImplementedError
-
- def load(self, name):
- """ Default load method has to be implemented in derived class """
- raise NotImplementedError
-
-
-# We use Gnome keyring in the following way:
-# we store passwords for each plugin in a key named "abrt:<plugin_name>".
-# The value of the key becomes the value of "Password" setting.
-# Other settings (if plugin has them) are stored as attributes of this key.
-#
-# Example: Key "abrt:Bugzilla" with bugzilla password as value, and with attributes:
-#
-# Application: abrt
-# AbrtPluginInfo: Bugzilla
-# NoSSLVerify: yes
-# Login: user@host.com
-# BugzillaURL: https://host.with.bz.com/
-#
-# Attributes "Application" and "AbrtPluginInfo" are special, they are used
-# for efficient key retrieval via keyring API find_items_sync() function.
-
-g_default_key_ring = None
-
-class ConfBackendGnomeKeyring(ConfBackend):
- def __init__(self):
- global g_default_key_ring
-
- ConfBackend.__init__(self)
- if g_default_key_ring:
- return
- if not gkey or not gkey.is_available():
- raise ConfBackendInitError(_("Cannot connect to the Gnome Keyring daemon."))
- try:
- g_default_key_ring = gkey.get_default_keyring_sync()
- except:
- # could happen if keyring daemon is running, but we run gui under
- # user who is not the owner of the running session - using su
- raise ConfBackendInitError(_("Cannot get the default keyring."))
-
- def save(self, name, settings):
- settings_tmp = settings.copy()
- settings_tmp["Application"] = "abrt"
- settings_tmp["AbrtPluginInfo"] = name
-
- # delete all keyring items containing "AbrtPluginInfo":"<plugin_name>",
- # so we always have only 1 item per plugin
- try:
- item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, { "AbrtPluginInfo": str(name) })
- for item in item_list:
- log2("found old keyring item: ring:'%s' item_id:%s attrs:%s", item.keyring, item.item_id, str(item.attributes))
- log2("deleting it from keyring '%s'", g_default_key_ring)
- gkey.item_delete_sync(g_default_key_ring, item.item_id)
- except gkey.NoMatchError:
- # nothing found
- pass
- except gkey.DeniedError:
- raise ConfBackendSaveError(_("Access to gnome-keyring has been denied, plugins settings will not be saved."))
- # if plugin has a "Password" setting, we handle it specially: in keyring,
- # it is stored as item.secret, not as one of attributes
- password = ""
- if "Password" in settings_tmp:
- password = settings_tmp["Password"]
- del settings_tmp["Password"]
- # store new settings for this plugin as one keyring item
- try:
- gkey.item_create_sync(g_default_key_ring,
- gkey.ITEM_GENERIC_SECRET,
- "abrt:%s" % name, # display_name
- settings_tmp, # attrs
- password, # secret
- True)
- log2("saved new keyring item:%s", str(settings_tmp))
- except gkey.DeniedError:
- raise ConfBackendSaveError(_("Access to gnome-keyring has been denied, plugins settings will not be saved."))
-
- def load(self, name):
- item_list = None
- #FIXME: make this configurable
- # this actually makes GUI to ask twice per every plugin
- # which have it's settings stored in keyring
- attempts = 2
- while attempts:
- try:
- log2("looking for keyring items with 'AbrtPluginInfo:%s' attr", str(name))
- item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, {"AbrtPluginInfo":str(name)})
- for item in item_list:
- # gnome keyring is weeeeird. why display_name, type, mtime, ctime
- # aren't available in find_items_sync() results? why we need to
- # get them via additional call, item_get_info_sync()?
- # internally, item has GNOME_KEYRING_TYPE_FOUND type,
- # and info has GNOME_KEYRING_TYPE_ITEM_INFO type.
- # why not use the same type for both?
- #
- # and worst of all, this information took four hours of googling...
- #
- #info = gkey.item_get_info_sync(item.keyring, item.item_id)
- log2("found keyring item: ring:'%s' item_id:%s attrs:%s", # "secret:'%s' display_name:'%s'"
- item.keyring, item.item_id, str(item.attributes) #, item.secret, info.get_display_name()
- )
- except gkey.NoMatchError:
- # nothing found
- pass
- except gkey.DeniedError:
- attempts -= 1
- log2("gk-authorization has failed %i time(s)", 2-attempts)
- if attempts == 0:
- # we tried 2 times, so giving up the authorization
- raise ConfBackendLoadError(_("Access to gnome-keyring has been denied, cannot load the settings for %s!" % name))
- continue
- break
-
- if item_list:
- retval = item_list[0].attributes.copy()
- retval["Password"] = item_list[0].secret
- return retval
- return {}
-
- # This routine loads setting for all plugins. It doesn't need plugin name.
- # Thus we can avoid talking to abrtd just in order to get plugin names.
- def load_all(self):
- retval = {}
- item_list = {}
-
- # UGLY compat cludge for users who has saved items without "Application" attr
- # (abrt <= 1.0.3 was saving those)
- item_ids = gkey.list_item_ids_sync(g_default_key_ring)
- log2("all keyring item ids:%s", item_ids)
- for item_id in item_ids:
- info = gkey.item_get_info_sync(g_default_key_ring, item_id)
- attrs = gkey.item_get_attributes_sync(g_default_key_ring, item_id)
- log2("keyring item %s: attrs:%s", item_id, str(attrs))
- if "AbrtPluginInfo" in attrs:
- if not "Application" in attrs:
- log2("updating old-style keyring item")
- attrs["Application"] = "abrt"
- try:
- gkey.item_set_attributes_sync(g_default_key_ring, item_id, attrs)
- except:
- log2("error updating old-style keyring item")
- plugin_name = attrs["AbrtPluginInfo"]
- # If plugin has a "Password" setting, we handle it specially: in keyring,
- # it is stored as item.secret, not as one of attributes
- if info.get_secret():
- attrs["Password"] = info.get_secret()
- # avoiding sending useless duplicate info over dbus...
- del attrs["AbrtPluginInfo"]
- try:
- del attrs["Application"]
- except:
- pass
- retval[plugin_name] = attrs;
- # end of UGLY compat cludge
-
- try:
- log2("looking for keyring items with 'Application:abrt' attr")
- item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, { "Application": "abrt" })
- except gkey.NoMatchError:
- # nothing found
- pass
- except gkey.DeniedError:
- raise ConfBackendLoadError(_("Access to gnome-keyring has been denied, cannot load settings."))
-
- for item in item_list:
- # gnome keyring is weeeeird. why display_name, type, mtime, ctime
- # aren't available in find_items_sync() results? why we need to
- # get them via additional call, item_get_info_sync()?
- # internally, item has GNOME_KEYRING_TYPE_FOUND type,
- # and info has GNOME_KEYRING_TYPE_ITEM_INFO type.
- # why not use the same type for both?
- #
- # and worst of all, this information took four hours of googling...
- #
- #info = gkey.item_get_info_sync(item.keyring, item.item_id)
- log2("found keyring item: ring:%s item_id:%s attrs:%s", # "secret:%s display_name:'%s'"
- item.keyring, item.item_id, str(item.attributes) #, item.secret, info.get_display_name()
- )
- attrs = item.attributes.copy()
- if "AbrtPluginInfo" in attrs:
- plugin_name = attrs["AbrtPluginInfo"]
- # If plugin has a "Password" setting, we handle it specially: in keyring,
- # it is stored as item.secret, not as one of attributes
- if item.secret:
- attrs["Password"] = item.secret
- # avoiding sending useless duplicate info over dbus...
- del attrs["AbrtPluginInfo"]
- try:
- del attrs["Application"]
- except:
- pass
- retval[plugin_name] = attrs
- return retval
-
-
-# Rudimentary backend factory
-
-currentConfBackend = None
-
-def getCurrentConfBackend():
- global currentConfBackend
- if not currentConfBackend:
- currentConfBackend = ConfBackendGnomeKeyring()
- return currentConfBackend
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
deleted file mode 100644
index 61725d6f..00000000
--- a/src/gui/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-bin_SCRIPTS = abrt-gui
-
-PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py \
- abrt_utils.py \
- CCMainWindow.py ABRTExceptions.py \
- SettingsDialog.py ABRTPlugin.py PluginList.py PluginSettingsUI.py \
- PluginsSettingsDialog.py ConfBackend.py CReporterAssistant.py
-
-GLADE_FILES = ccgui.glade report.glade settings.glade dialogs.glade \
- settings_wizard.glade progress_window.glade
-
-pkgdata_PYTHON = $(PYTHON_FILES)
-pkgdata_DATA = $(GLADE_FILES)
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-desktop_in_files = abrt.desktop.in
-
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-
-EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) abrt-gui $(desktop_in_files)
-
-CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc))
-
-install-exec-hook:
- for b in $(bin_SCRIPTS); do \
- sed 's:/usr/share:$(datadir):g' -i $(DESTDIR)$(bindir)/$$b || exit $$?; \
- sed 's:VERSION:@VERSION@:g' -i $(DESTDIR)$(bindir)/$$b || exit $$?; \
- done
-
-install-data-hook:
- sed 's:@VER@:$(VERSION):g' -i $(DESTDIR)$(pkgdatadir)/ccgui.glade || exit $$?
diff --git a/src/gui/PluginList.py b/src/gui/PluginList.py
deleted file mode 100644
index f93e64e4..00000000
--- a/src/gui/PluginList.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# -*- coding: utf-8 -*-
-import CCDBusBackend
-from ABRTPlugin import PluginInfo, PluginSettings
-from abrt_utils import _, log, log1, log2
-
-class PluginInfoList(list):
- """Class to store list of PluginInfos"""
- def __init__(self,dbus_manager=None):
- list.__init__(self)
- self.dm = dbus_manager
-
- def load(self):
- if self.dm:
- rows = self.dm.getPluginsInfo()
- for plugin_name in rows:
- row = rows[plugin_name]
- entry = PluginInfo()
- for attr_name in row:
- log2("PluginInfoList: adding %s[%s]:%s", plugin_name, attr_name, row[attr_name])
- entry.__dict__[attr_name] = row[attr_name]
- daemon_settings = self.dm.getPluginSettings(plugin_name)
- entry.load_daemon_settings(daemon_settings)
- self.append(entry)
- else:
- log("PluginInfoList: db == None")
-
- def getReporterByName(self, name):
- try:
- return [x for x in self if x["Name"] == name and x.Type == "Reporter" ][0]
- except:
- # if such reporter doesnt't exist return None
- return None
-
- def getEnabledPlugins(self):
- return [x for x in self if x["Enabled"] == 'yes']
-
- def getActionPlugins(self):
- return [x for x in self if x["Enabled"] == 'yes' and x["Type"] == 'Action']
-
- def getDatabasePlugins(self):
- return [x for x in self if x["Enabled"] == 'yes' and x["Type"] == 'Database']
-
- def getAnalyzerPlugins(self):
- return [x for x in self if x["Enabled"] == 'yes' and x["Type"] == 'Analyzer']
-
- def getReporterPlugins(self):
- return [x for x in self if x["Enabled"] == 'yes' and x["Type"] == 'Reporter']
-
- def getReporterPluginsSettings(self):
- reporters_settings = {}
- for plugin in self.getReporterPlugins():
- reporters_settings[str(plugin)] = plugin.Settings
- return reporters_settings
-
-
-__PFList = None
-__PFList_dbmanager = None
-
-def getPluginInfoList(dbmanager,refresh=None):
- global __PFList
- global __PFList_dbmanager
-
- if __PFList == None or refresh or __PFList_dbmanager != dbmanager:
- __PFList = PluginInfoList(dbus_manager=dbmanager)
- __PFList.load()
- __PFList_dbmanager = dbmanager
- return __PFList
-
-__PFList = None
diff --git a/src/gui/PluginSettingsUI.py b/src/gui/PluginSettingsUI.py
deleted file mode 100644
index 92cb8a53..00000000
--- a/src/gui/PluginSettingsUI.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 -*-
-import gtk
-from abrt_utils import _, log, log1, log2
-
-class PluginSettingsUI():
- def __init__(self, pluginfo, parent=None):
- #print "Init PluginSettingsUI"
- self.plugin_name = pluginfo.Name
- self.Settings = pluginfo.Settings
- self.pluginfo = pluginfo
- self.plugin_gui = None
-
- if pluginfo.getGUI():
- self.plugin_gui = gtk.Builder()
- self.plugin_gui.add_from_file(pluginfo.getGUI())
- self.dialog = self.plugin_gui.get_object("PluginDialog")
- if not self.dialog:
- raise Exception(_("Cannot find PluginDialog widget in the UI description!"))
- self.dialog.set_title("%s" % pluginfo.getName())
- if parent:
- self.dialog.set_transient_for(parent)
- else:
- # we shouldn't get here, but just to be safe
- log1("No UI for plugin %s" % pluginfo)
- raise Exception(_("No UI for the plugin <b>%s</b>, this is probably a bug.\n"
- "Please report it at "
- "<a href=\"https://fedorahosted.org/abrt/newticket\">"
- "https://fedorahosted.org/abrt/newticket</a>") % pluginfo)
- return
-
- if parent:
- self.dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- self.dialog.set_transient_for(parent)
- self.dialog.set_modal(True)
-
- def on_show_pass_toggled(self, button, entry=None):
- if entry:
- entry.set_visibility(button.get_active())
-
- def hydrate(self):
- if self.plugin_gui:
- if self.pluginfo.Enabled == "yes":
- if self.Settings:
- #print "Hydrating %s" % self.plugin_name
- for key, value in self.Settings.iteritems():
- #print "%s:%s" % (key,value)
- widget = self.plugin_gui.get_object("conf_%s" % key)
- if type(widget) == gtk.Entry:
- widget.set_text(value)
- if widget.get_visibility() == False:
- # if we find toggle button called the same name as entry and entry has
- # visibility set to False, connect set_visible to it
- # coz I guess it's toggle for revealing the password
- button = self.plugin_gui.get_object("cb_%s" % key)
- if type(button) == gtk.CheckButton:
- button.connect("toggled", self.on_show_pass_toggled, widget)
- elif type(widget) == gtk.CheckButton:
- widget.set_active(value == "yes")
- elif type(widget) == gtk.ComboBox:
- print _("Combo box is not implemented")
- else:
- #print "Plugin %s has no configuration." % self.plugin_name
- pass
- else:
- #print "Plugin %s is disabled." % self.plugin_name
- pass
-
- else:
- print _("Nothing to hydrate!")
-
- def dehydrate(self):
- #print "dehydrating %s" % self.pluginfo.getName()
- if self.Settings:
- for key in self.Settings.keys():
- #print key
- #print "%s:%s" % (key,value)
- widget = self.plugin_gui.get_object("conf_%s" % key)
- if type(widget) == gtk.Entry:
- self.Settings[key] = widget.get_text()
- elif type(widget) == gtk.CheckButton:
- if widget.get_active():
- self.Settings[key] = "yes"
- else:
- self.Settings[key] = "no"
- elif type(widget) == gtk.ComboBox:
- print _("Combo box is not implemented")
-
- def destroy(self):
- self.dialog.destroy()
-
- def run(self):
- return self.dialog.run()
diff --git a/src/gui/PluginsSettingsDialog.py b/src/gui/PluginsSettingsDialog.py
deleted file mode 100644
index 55e82ec3..00000000
--- a/src/gui/PluginsSettingsDialog.py
+++ /dev/null
@@ -1,162 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-import gtk
-from PluginList import getPluginInfoList, PluginInfoList
-from CC_gui_functions import *
-from PluginSettingsUI import PluginSettingsUI
-from ABRTPlugin import PluginSettings, PluginInfo
-from abrt_utils import _, log, log1, log2
-
-
-class PluginsSettingsDialog:
- def __init__(self, parent, daemon):
- #print "Settings dialog init"
- self.ccdaemon = daemon
-
- self.builder = gtk.Builder()
- builderfile = "%s%ssettings.glade" % (sys.path[0], "/")
- #print builderfile
- try:
- self.builder.add_from_file(builderfile)
- except Exception, e:
- print e
- self.window = self.builder.get_object("wPluginsSettings")
- if not self.window:
- raise Exception(_("Cannot load the GUI description for SettingsDialog!"))
-
- if parent:
- self.window.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- self.window.set_transient_for(parent)
- self.window.set_modal(True)
-
- self.pluginlist = self.builder.get_object("tvSettings") # a TreeView
- # cell_text, toggle_active, toggle_visible, group_name_visible, color, plugin
- self.pluginsListStore = gtk.TreeStore(str, bool, bool, bool, str, object)
- # set filter
- modelfilter = self.pluginsListStore.filter_new()
- modelfilter.set_visible_func(self.filter_plugins, None)
- self.pluginlist.set_model(modelfilter)
-
- # Create/configure columns and add them to pluginlist
- # column "name" has two kind of cells:
- column = gtk.TreeViewColumn(_("Name"))
- # cells for individual plugins (white)
- cell_name = gtk.CellRendererText()
- column.pack_start(cell_name, True)
- column.set_attributes(cell_name, markup=0, visible=2) # show 0th field (plugin name) from data items if 2th field is true
- # cells for plugin types (gray)
- cell_plugin_type = gtk.CellRendererText()
- column.pack_start(cell_plugin_type, True)
- column.add_attribute(cell_plugin_type, "visible", 3)
- column.add_attribute(cell_plugin_type, "markup", 0)
- column.add_attribute(cell_plugin_type, "cell_background", 4)
- # column "name" is ready, insert
- column.set_resizable(True)
- self.pluginlist.append_column(column)
-
- #connect signals
- self.pluginlist.connect("cursor-changed", self.on_tvDumps_cursor_changed)
- self.builder.get_object("bConfigurePlugin").connect("clicked", self.on_bConfigurePlugin_clicked, self.pluginlist)
- self.builder.get_object("bClose").connect("clicked", self.on_bClose_clicked)
- self.builder.get_object("bConfigurePlugin").set_sensitive(False)
-
- def filter_plugins(self, model, miter, data):
- return True
-
- def hydrate(self):
- #print "settings hydrate"
- self.pluginsListStore.clear()
- try:
- #pluginlist = getPluginInfoList(self.ccdaemon, refresh=True)
- # don't force refresh as it will overwrite settings if g-k is not available
- pluginlist = getPluginInfoList(self.ccdaemon)
- except Exception, e:
- log("Error while loading plugins info: %s", e)
- #gui_error_message("Error while loading plugins info, please check if abrt daemon is running\n %s" % e)
- return
- plugin_rows = {}
- group_empty = {}
- for plugin_type in PluginInfo.types.keys():
- it = self.pluginsListStore.append(None,
- # cell_text, toggle_active, toggle_visible, group_name_visible, color, plugin
- ["<b>%s</b>" % PluginInfo.types[plugin_type], 0, 0, 1, "gray", None])
- plugin_rows[plugin_type] = it
- group_empty[plugin_type] = it
- for entry in pluginlist:
- if entry.Description:
- text = "<b>%s</b>\n%s" % (entry.getName(), entry.Description)
- else:
- # non-loaded plugins have empty description
- text = "<b>%s</b>" % entry.getName()
- plugin_type = entry.getType()
- self.pluginsListStore.append(plugin_rows[plugin_type],
- # cell_text, toggle_active, toggle_visible, group_name_visible, color, plugin
- [text, entry.Enabled == "yes", 1, 0, "white", entry])
- if group_empty.has_key(plugin_type):
- del group_empty[plugin_type]
- # rhbz#560971 "Don't show empty 'Not loaded plugins' section"
- # don't show any empty groups
- for it in group_empty.values():
- self.pluginsListStore.remove(it)
-
- self.pluginlist.expand_all()
-
- def dehydrate(self):
- # we have nothing to save, plugin's does the work
- pass
-
- def show(self):
- self.window.show()
- #if result == gtk.RESPONSE_APPLY:
- # self.dehydrate()
- #self.window.destroy()
- #return result
-
- def on_bConfigurePlugin_clicked(self, button, pluginview):
- pluginsListStore, path = pluginview.get_selection().get_selected_rows()
- if not path:
- gui_info_dialog(_("Please select a plugin from the list to edit its options."), parent=self.window)
- return
- # this should work until we keep the row object in the last position
- pluginfo = pluginsListStore.get_value(pluginsListStore.get_iter(path[0]), pluginsListStore.get_n_columns()-1)
- if pluginfo:
- try:
- ui = PluginSettingsUI(pluginfo, parent=self.window)
- except Exception, e:
- gui_error_message(_("Error while opening the plugin settings UI: \n\n%s" % e))
- return
- ui.hydrate()
- response = ui.run()
- if response == gtk.RESPONSE_APPLY:
- ui.dehydrate()
- if pluginfo.Settings:
- try:
- pluginfo.save_settings_on_client_side()
- except Exception, e:
- gui_error_message(_("Cannot save plugin settings:\n %s" % e))
- #for key, val in pluginfo.Settings.iteritems():
- # print "%s:%s" % (key, val)
- elif response == gtk.RESPONSE_CANCEL:
- pass
- else:
- log("unknown response from settings dialog:%d", response)
- ui.destroy()
-
- def on_bClose_clicked(self, button):
- self.window.destroy()
-
- def on_tvDumps_cursor_changed(self, treeview):
- pluginsListStore, path = treeview.get_selection().get_selected_rows()
- if not path:
- self.builder.get_object("lDescription").set_label("No description")
- return
- # this should work until we keep the row object in the last position
- pluginfo = pluginsListStore.get_value(pluginsListStore.get_iter(path[0]), pluginsListStore.get_n_columns()-1)
- if pluginfo:
- self.builder.get_object("lPluginAuthor").set_text(pluginfo.Email)
- self.builder.get_object("lPluginVersion").set_text(pluginfo.Version)
- self.builder.get_object("lPluginWebSite").set_text(pluginfo.WWW)
- self.builder.get_object("lPluginName").set_text(pluginfo.Name)
- self.builder.get_object("lPluginDescription").set_text(pluginfo.Description)
- # print (pluginfo.Enabled == "yes" and pluginfo.GTKBuilder != "")
- self.builder.get_object("bConfigurePlugin").set_sensitive(pluginfo != None and pluginfo.Enabled == "yes" and pluginfo.GTKBuilder != "")
diff --git a/src/gui/SettingsDialog.py b/src/gui/SettingsDialog.py
deleted file mode 100644
index 41fb9829..00000000
--- a/src/gui/SettingsDialog.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-import gtk
-from PluginList import getPluginInfoList
-from CC_gui_functions import *
-#from PluginSettingsUI import PluginSettingsUI
-from abrt_utils import _, log, log1, log2
-
-
-#FIXME: create a better struct, to automatize hydrate/dehydrate process
-settings_dict = { "Common":
- {"OpenGPGCheck":bool,
- "Database":object,
- "EnabledPlugins": list,
- "BlackList": list,
- "MaxCrashReportsSize": int,
- "OpenGPGPublicKeys": list,
- },
- }
-
-class SettingsDialog:
- def __init__(self, parent, daemon):
- builderfile = "%s%ssettings.glade" % (sys.path[0],"/")
- self.ccdaemon = daemon
- self.builder = gtk.Builder()
- self.builder.add_from_file(builderfile)
- self.window = self.builder.get_object("wGlobalSettings")
- self.builder.get_object("bSaveSettings").connect("clicked", self.on_ok_clicked)
- self.builder.get_object("bCancelSettings").connect("clicked", self.on_cancel_clicked)
- # blacklist edit
- self.builder.get_object("bEditBlackList").connect("clicked", self.on_blacklistEdit_clicked)
-
- self.builder.get_object("bOpenGPGPublicKeys").connect("clicked", self.on_GPGKeysEdit_clicked)
- # GPG keys
- self.wGPGKeys = self.builder.get_object("wGPGKeys")
- self.GPGKeysListStore = gtk.ListStore(str)
- self.tvGPGKeys = self.builder.get_object("tvGPGKeys")
- self.tvGPGKeys.set_model(self.GPGKeysListStore)
- self.builder.get_object("bCancelGPGKeys").connect("clicked", self.on_bCancelGPGKeys_clicked)
- self.builder.get_object("bSaveGPGKeys").connect("clicked", self.on_bSaveGPGKeys_clicked)
-
- gpg_column = gtk.TreeViewColumn()
- cell = gtk.CellRendererText()
- gpg_column.pack_start(cell)
- gpg_column.add_attribute(cell, "text", 0)
- self.tvGPGKeys.append_column(gpg_column)
-
- def filter_settings(self, model, miter, data):
- return True
-
- def hydrate(self):
- try:
- self.settings = self.ccdaemon.getSettings()
- except Exception, e:
- # FIXME: this should be error gui message!
- print e
- try:
- self.pluginlist = getPluginInfoList(self.ccdaemon, refresh=True)
- except Exception, e:
- raise Exception("Comunication with daemon has failed, have you restarted the daemon after update?")
-
- # hydrate common
- common = self.settings["Common"]
- # ensure that all expected keys exist:
- if "OpenGPGCheck" not in common:
- common["OpenGPGCheck"] = "no" # check unsigned pkgs too
- ## gpgcheck
- self.builder.get_object("cbOpenGPGCheck").set_active(common["OpenGPGCheck"] == 'yes')
- ## MaxCrashSize
- self.builder.get_object("sbMaxCrashReportsSize").set_value(float(common["MaxCrashReportsSize"]))
- ## GPG keys
- try:
- self.builder.get_object("eOpenGPGPublicKeys").set_text(common["OpenGPGPublicKeys"])
- self.gpgkeys = common["OpenGPGPublicKeys"].split(',')
- for gpgkey in self.gpgkeys:
- self.GPGKeysListStore.append([gpgkey])
- except:
- pass
-
- ## blacklist
- self.builder.get_object("eBlacklist").set_text(common["BlackList"])
-
- def on_bCancelGPGKeys_clicked(self, button):
- self.wGPGKeys.hide()
-
- def on_bSaveGPGKeys_clicked(self, button):
- self.wGPGKeys.hide()
-
- def on_bAddGPGKey_clicked(self, button):
- print "add GPG key"
-
- def on_bRemoveGPGKey_clicked(self, button):
- print "add GPG key"
-
- def on_blacklistEdit_clicked(self, button):
- print "edit blacklist"
-
- def on_GPGKeysEdit_clicked(self, button):
- self.wGPGKeys.show()
-
- def on_ok_clicked(self, button):
- self.dehydrate()
- self.window.hide()
-
- def on_cancel_clicked(self, button):
- self.window.hide()
-
- def removeHBoxWihtChildren(self, job_hbox):
- job_hbox.get_parent().remove(job_hbox)
- for child in job_hbox.get_children():
- child.destroy()
- job_hbox.destroy()
-
- def add_CronJob(self, job=None):
- hbox = gtk.HBox()
- hbox.set_spacing(6)
- time = gtk.Entry()
- remove_image = gtk.Image()
- remove_image.set_from_stock("gtk-remove",gtk.ICON_SIZE_MENU)
- remove_button = gtk.Button()
- remove_button.set_image(remove_image)
- remove_button.set_tooltip_text(_("Remove this job"))
- remove_button.connect("clicked", self.on_remove_CronJob_clicked, hbox)
- plugins = gtk.ComboBox()
- cell = gtk.CellRendererText()
-
- plugins.pack_start(cell)
- plugins.add_attribute(cell, 'markup', 0)
- plugins.set_model(self.actionPluginsListStore)
-
- if job:
- time.set_text(job[0])
- plugins.set_active_iter(job[1])
- else:
- plugins.set_active(0)
- hbox.pack_start(plugins,True)
- hbox.pack_start(time,True)
- hbox.pack_start(remove_button,False)
- self.builder.get_object("vbCronJobs").pack_start(hbox,False)
-
- hbox.show_all()
-
- def on_bAddCronJob_clicked(self, button):
- self.add_CronJob()
- print "add"
-
- def on_bEditAction_clicked(self, button, data=None):
- print "edit action"
-
- def add_AnalyzerAction(self, action=None):
- #print "add_AnalyzerAction"
- hbox = gtk.HBox()
- hbox.set_spacing(6)
- action_list = gtk.Entry()
- edit_actions = gtk.Button()
- edit_actions.set_tooltip_text("Edit actions")
- edit_image = gtk.Image()
- edit_image.set_from_stock("gtk-edit", gtk.ICON_SIZE_MENU)
- edit_actions.set_image(edit_image)
- edit_actions.connect("clicked", self.on_bEditAction_clicked)
-
- remove_image = gtk.Image()
- remove_image.set_from_stock("gtk-remove",gtk.ICON_SIZE_MENU)
- remove_button = gtk.Button()
- remove_button.set_image(remove_image)
- remove_button.set_tooltip_text(_("Remove this action"))
- remove_button.connect("clicked", self.on_remove_Action_clicked, hbox)
-
- reporters = gtk.ComboBox()
- cell = gtk.CellRendererText()
- reporters.pack_start(cell)
- reporters.add_attribute(cell, 'markup', 0)
- reporters.set_model(self.analyzerPluginsListStore)
-
- if action:
- action_list.set_text(action[0])
- reporters.set_active_iter(action[1])
- else:
- reporters.set_active(0)
-
- hbox.pack_start(reporters,True)
- hbox.pack_start(action_list,True)
- hbox.pack_start(edit_actions,False)
- hbox.pack_start(remove_button,False)
- self.builder.get_object("vbActions").pack_start(hbox,False)
- hbox.show_all()
-
- def on_bAddAction_clicked(self, button):
- self.add_AnalyzerAction()
-
- def dehydrate(self):
- pass
- ### looks unused to me.
- ### Ok to grep for setSettings and delete after 2011-04-01.
- ### self.ccdaemon.setSettings(self.settings)
-
- def show(self):
- self.window.show()
diff --git a/src/gui/abrt-gui b/src/gui/abrt-gui
deleted file mode 100755
index 059d8676..00000000
--- a/src/gui/abrt-gui
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-if test x"$1" = x"--version"; then
- echo "abrt-gui VERSION"
- exit 0
-fi
-export PYTHONPATH=/usr/share/abrt
-export XLOGNAME=$LOGNAME
-exec /usr/bin/python /usr/share/abrt/CCMainWindow.py "$@"
diff --git a/src/gui/abrt.png b/src/gui/abrt.png
deleted file mode 100644
index dc24865e..00000000
--- a/src/gui/abrt.png
+++ /dev/null
Binary files differ
diff --git a/src/gui/abrt_utils.py b/src/gui/abrt_utils.py
deleted file mode 100644
index f0dc8ba2..00000000
--- a/src/gui/abrt_utils.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- coding: utf-8 -*-
-import sys
-
-GETTEXT_PROGNAME = "abrt"
-PROGNAME = "abrt-gui"
-g_verbose = 0
-
-import locale
-import gettext
-
-_ = lambda x: gettext.lgettext(x)
-
-def init_logging(progname, v):
- import gtk.glade
- global PROGNAME, g_verbose
- PROGNAME = progname
- g_verbose = v
- try:
- locale.setlocale(locale.LC_ALL, "")
- except locale.Error:
- import os
- os.environ['LC_ALL'] = 'C'
- locale.setlocale(locale.LC_ALL, "")
- gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET))
- gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale')
- gtk.glade.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale')
- gtk.glade.textdomain(GETTEXT_PROGNAME)
- gettext.textdomain(GETTEXT_PROGNAME)
-
-def get_verbose_level():
- # Just importing g_verbose from another module doesn't work (why!?),
- # need to use a function
- return g_verbose
-
-def log(fmt, *args):
- sys.stderr.write("%s: %s\n" % (PROGNAME, fmt % args))
-
-def log1(fmt, *args):
- if g_verbose >= 1:
- sys.stderr.write("%s: %s\n" % (PROGNAME, fmt % args))
-
-def log2(fmt, *args):
- if g_verbose >= 2:
- sys.stderr.write("%s: %s\n" % (PROGNAME, fmt % args))
-
-def warn(fmt, *args):
- sys.stderr.write("WARNING: %s: %s\n" % (PROGNAME, fmt % args))
diff --git a/src/gui/ccgui.glade b/src/gui/ccgui.glade
deleted file mode 100644
index c2efa148..00000000
--- a/src/gui/ccgui.glade
+++ /dev/null
@@ -1,734 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
- <!-- interface-requires gtk+ 2.14 -->
- <!-- interface-naming-policy toplevel-contextual -->
- <widget class="GtkAboutDialog" id="about">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">About ABRT</property>
- <property name="resizable">False</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">abrt</property>
- <property name="type_hint">dialog</property>
- <property name="program_name">ABRT</property>
- <property name="version">@VER@</property>
- <property name="copyright" translatable="yes">(C) 2009, 2010 Red Hat, Inc.</property>
- <property name="website">http://fedorahosted.org/abrt/</property>
- <property name="license" translatable="yes">This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</property>
- <property name="authors">Anton Arapov &lt;aarapov@redhat.com&gt;
-Karel Klic &lt;kklic@redhat.com&gt;
-Jiri Moskovcak &lt;jmoskovc@redhat.com&gt;
-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;
-Lapo Calamandrei
-
-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">
- <widget class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <placeholder/>
- </child>
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <widget class="GtkWindow" id="main_window">
- <property name="title" translatable="yes">Automatic Bug Reporting Tool</property>
- <property name="window_position">center</property>
- <property name="icon_name">abrt</property>
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkMenuBar" id="menubar2">
- <property name="visible">True</property>
- <child>
- <widget class="GtkMenuItem" id="menuitem5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_File</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu4">
- <property name="visible">True</property>
- <child>
- <widget class="GtkImageMenuItem" id="miQuit">
- <property name="label">gtk-quit</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <property name="always_show_image">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkMenuItem" id="edit">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu1">
- <property name="visible">True</property>
- <child>
- <widget class="GtkMenuItem" id="miPlugins">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Plugins</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="miPreferences">
- <property name="label">gtk-preferences</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <property name="always_show_image">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkMenuItem" id="menuitem8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Help</property>
- <property name="use_underline">True</property>
- <child>
- <widget class="GtkMenu" id="menu6">
- <property name="visible">True</property>
- <child>
- <widget class="GtkMenuItem" id="mi_view_log">
- <property name="label" translatable="yes">View log</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="miOnlineHelp">
- <property name="label" translatable="yes">Online _Help</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">False</property>
- <child internal-child="image">
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-help</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="miAbout">
- <property name="label">gtk-about</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <property name="always_show_image">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVPaned" id="vpaned1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkScrolledWindow" id="swDumps">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <widget class="GtkTreeView" id="tvDumps">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="reorderable">True</property>
- <property name="search_column">1</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkScrolledWindow" id="sw_details">
- <property name="can_focus">False</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <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="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">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>
- <property name="wrap">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="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>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="resize">False</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="border_width">10</property>
- <property name="spacing">5</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="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <accelerator key="Delete" signal="clicked"/>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="b_copy">
- <property name="label" translatable="yes">Copy to Clipboard</property>
- <property name="visible">True</property>
- <property name="sensitive">False</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="sensitive">False</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="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="padding">10</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="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="yalign">0</property>
- <property name="stock">gtk-help</property>
- </widget>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Online _Help</property>
- <property name="use_underline">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </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="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="padding">10</property>
- <property name="position">5</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <widget class="GtkMenu" id="popup_menu">
- <property name="visible">True</property>
- <child>
- <widget class="GtkImageMenuItem" id="miDelete">
- <property name="label">gtk-delete</property>
- <property name="visible">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <property name="always_show_image">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="miReport">
- <property name="label" translatable="yes">Report</property>
- <property name="visible">True</property>
- <property name="use_stock">False</property>
- <property name="always_show_image">True</property>
- <child internal-child="image">
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-go-up</property>
- <property name="icon-size">1</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
-</glade-interface>
diff --git a/src/gui/dialogs.glade b/src/gui/dialogs.glade
deleted file mode 100644
index 1f251de5..00000000
--- a/src/gui/dialogs.glade
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkDialog" id="ReportDialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Report done</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="destroy_with_parent">True</property>
- <property name="icon_name">abrt</property>
- <property name="type_hint">normal</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkHBox" id="main_hbox">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="stock">gtk-dialog-info</property>
- <property name="icon-size">6</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">button1</action-widget>
- </action-widgets>
- </object>
- <object class="GtkDialog" id="LogViewer">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Log</property>
- <property name="modal">True</property>
- <property name="default_width">450</property>
- <property name="default_height">260</property>
- <property name="type_hint">normal</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkTextView" id="tevLog">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="bClose">
- <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>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="0">bClose</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/src/gui/progress_window.glade b/src/gui/progress_window.glade
deleted file mode 100644
index 6fae1486..00000000
--- a/src/gui/progress_window.glade
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkWindow" id="pBarWindow">
- <property name="width_request">500</property>
- <property name="border_width">12</property>
- <property name="title" translatable="yes">Please wait...</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">abrt</property>
- <child>
- <object class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="lStatus">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkProgressBar" id="pBar">
- <property name="visible">True</property>
- <property name="text_xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander" id="pb_log_expander">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <placeholder/>
- </child>
- <child type="label">
- <object class="GtkLabel" id="lUpdates">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Details</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/src/gui/report.glade b/src/gui/report.glade
deleted file mode 100644
index 2f79b39f..00000000
--- a/src/gui/report.glade
+++ /dev/null
@@ -1,827 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkDialog" id="reporter_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Automatic Bug Reporting Tool</property>
- <property name="modal">True</property>
- <property name="icon_name">abrt</property>
- <property name="type_hint">normal</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkViewport" id="viewport1">
- <property name="visible">True</property>
- <property name="resize_mode">queue</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkFrame" id="fSysInfo">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <child>
- <object class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="l">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Package:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Component:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Executable:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Cmdline:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="lpackage">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lcomponent">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lexecutable">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lcmdline">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Architecture:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Kernel:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Release:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;span fgcolor="blue"&gt;Reason:&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="larchitecture">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lkernel">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lrelease">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lreason">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">N/A</property>
- <property name="selectable">True</property>
- <property name="max_width_chars">40</property>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label_item">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fBacktrace">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkTextView" id="tvBacktrace">
- <property name="height_request">200</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="accepts_tab">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <child>
- <object class="GtkCheckButton" id="cbSendBacktrace">
- <property name="label" translatable="yes">I checked the backtrace and removed sensitive data (passwords, etc)</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment10">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes">&lt;b&gt;Backtrace&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fUserInfo">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vboxNonError">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkFrame" id="fReproducer">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkTextView" id="tevHowToReproduce">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="wrap_mode">word-char</property>
- <property name="accepts_tab">False</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;How to reproduce (in a few simple steps)&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fComments">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <child>
- <object class="GtkTextView" id="tvComment">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="wrap_mode">word-char</property>
- <property name="accepts_tab">False</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Comment&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label_item">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fAttachment">
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbAttachments">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="fAttachments">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Attachments&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="fErrors">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkHBox" id="ebErrors">
- <property name="visible">True</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon-size">6</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Please fix the following problems:&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lErrors">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </property>
- <property name="use_markup">True</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label_item">
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">4</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="bLog">
- <property name="label" translatable="yes">Show log</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bCancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bRefresh">
- <property name="label">gtk-refresh</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Forces ABRT to regenerate the backtrace.</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bSend">
- <property name="label" translatable="yes">Send report</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-60">bLog</action-widget>
- <action-widget response="-6">bCancel</action-widget>
- <action-widget response="-50">bRefresh</action-widget>
- <action-widget response="-10">bSend</action-widget>
- </action-widgets>
- </object>
- <object class="GtkWindow" id="w_reporters">
- <property name="title" translatable="yes">Reporter Selector</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">abrt</property>
- <child>
- <object class="GtkVBox" id="vb_main">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="ypad">10</property>
- <property name="label" translatable="yes">&lt;b&gt;Where do you want to report this incident?&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vb_reporters">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment9">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="padding">9</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <child>
- <object 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>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <object class="GtkWindow" id="pBarWindow">
- <property name="width_request">500</property>
- <property name="border_width">12</property>
- <property name="title" translatable="yes">Please wait...</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">abrt</property>
- <property name="transient_for">w_reporters</property>
- <child>
- <object class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="lStatus">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkProgressBar" id="pBar">
- <property name="visible">True</property>
- <property name="text_xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander" id="expander1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
- <child>
- <object class="GtkTextView" id="tvUpdates">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="lUpdates">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Details</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/src/gui/settings.glade b/src/gui/settings.glade
deleted file mode 100644
index 9dc1b96f..00000000
--- a/src/gui/settings.glade
+++ /dev/null
@@ -1,594 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkWindow" id="wPluginsSettings">
- <property name="title" translatable="yes">Plugins</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="default_width">450</property>
- <property name="default_height">400</property>
- <property name="icon_name">abrt</property>
- <child>
- <object class="GtkVBox" id="vboxabc1">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vboxl1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindowx1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="resize_mode">immediate</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="tvSettings">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander" id="expander1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hboxx1">
- <property name="visible">True</property>
- <child>
- <object class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Web Site:</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="xalign">2.2351741291171123e-10</property>
- <property name="label" translatable="yes">Author:</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Version:</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPluginVersion">
- <property name="visible">True</property>
- <property name="xalign">2.2351741291171123e-10</property>
- <property name="selectable">True</property>
- </object>
- <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>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPluginAuthor">
- <property name="visible">True</property>
- <property name="xalign">2.2351741291171123e-10</property>
- <property name="selectable">True</property>
- </object>
- <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>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPluginWebSite">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="selectable">True</property>
- </object>
- <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>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Description:</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Name:</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="lPluginDescription">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="selectable">True</property>
- </object>
- <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>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPluginName">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Plugin details&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="bConfigurePlugin">
- <property name="label" translatable="yes">C_onfigure Plugin</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bClose">
- <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>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <object class="GtkWindow" id="wGlobalSettings">
- <property name="title" translatable="yes">Preferences</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="default_width">450</property>
- <property name="default_height">400</property>
- <property name="icon_name">abrt</property>
- <child>
- <object class="GtkVBox" id="gsvbox1">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkNotebook" id="notebook1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_border">False</property>
- <child>
- <object class="GtkTable" id="common_table">
- <property name="visible">True</property>
- <property name="border_width">6</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="cbOpenGPGCheck">
- <property name="label" translatable="yes">Check package GPG signature</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lBlacklist">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Blacklisted packages: </property>
- </object>
- <packing>
- <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>
- <object class="GtkLabel" id="lMaxCrashReportsSize">
- <property name="visible">True</property>
- <property name="xalign">2.2351741291171123e-10</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">Max coredump storage size (MB):</property>
- </object>
- <packing>
- <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>
- <object class="GtkSpinButton" id="sbMaxCrashReportsSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- <property name="adjustment">adjMaxRepSize</property>
- <property name="numeric">True</property>
- </object>
- <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="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="blhbox">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkEntry" id="eBlacklist">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bEditBlackList">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">imEdit</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <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="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lOpenGPGPublicKeys">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">GPG keys: </property>
- </object>
- <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>
- <object class="GtkHBox" id="gpghbox">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkEntry" id="eOpenGPGPublicKeys">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bOpenGPGPublicKeys">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">imEdit1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <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="y_options">GTK_FILL</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="pCommon">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Common</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonboxx1">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="bCancelSettings">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bSaveSettings">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <object class="GtkAdjustment" id="adjMaxRepSize">
- <property name="upper">1000000</property>
- <property name="step_increment">1</property>
- </object>
- <object class="GtkWindow" id="wGPGKeys">
- <property name="title" translatable="yes">GPG Keys</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="default_width">400</property>
- <property name="default_height">400</property>
- <property name="icon_name">abrt</property>
- <property name="transient_for">wGlobalSettings</property>
- <child>
- <object class="GtkVBox" id="gpgkeys_vbox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkTreeView" id="tvGPGKeys">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonboxblabla1">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="spacing">12</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="bAddGPGKey">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bRemoveGPGKey">
- <property name="label">gtk-remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bSaveGPGKeys">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bCancelGPGKeys">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <object class="GtkImage" id="imEdit">
- <property name="visible">True</property>
- <property name="stock">gtk-edit</property>
- <property name="icon-size">1</property>
- </object>
- <object class="GtkImage" id="imEdit1">
- <property name="visible">True</property>
- <property name="stock">gtk-edit</property>
- <property name="icon-size">1</property>
- </object>
-</interface>
diff --git a/src/gui/settings_wizard.glade b/src/gui/settings_wizard.glade
deleted file mode 100644
index 24cb200a..00000000
--- a/src/gui/settings_wizard.glade
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkDialog" id="WrongSettings">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Wrong Settings Detected</property>
- <property name="resizable">False</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">abrt</property>
- <property name="type_hint">normal</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkVBox" id="ws_vbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon-size">6</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lWrongSettingsWarning">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Wrong settings were detected for some of the enabled reporter plugins. Please use the buttons below to open the respective configuration and fix it before you proceed, otherwise, the reporting process may fail.
-</property>
- <property name="use_markup">True</property>
- <property name="justify">fill</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbWrongSettings">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lWrongSettings_question">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Do you want to continue?&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="bCancel">
- <property name="label">gtk-no</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bContinue">
- <property name="label">gtk-yes</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-9">bCancel</action-widget>
- <action-widget response="-8">bContinue</action-widget>
- </action-widgets>
- </object>
-</interface>