reporter selection window patch v2. just fixes the problems Denys found, doesn't add the report message label, I will add this in a separate patch/commit.
J.
On 03/04/2010 11:49 AM, Jiri Moskovcak wrote:
On 03/03/2010 08:02 PM, Denys Vlasenko wrote:
On Wed, 2010-03-03 at 15:18 +0100, Jiri Moskovcak wrote:
Patch v1, please review, any ideas for UI improvement are welcome.
Only in abrt/src/Gui/: abrt.desktop
Need to use "diff -N"...
--- abrt-clean/src/Gui/CCMainWindow.py 2010-03-03 14:27:39.798191413 +0100 +++ abrt/src/Gui/CCMainWindow.py 2010-03-03 13:51:22.034941365 +0100 @@ -120,19 +112,20 @@ class MainWindow(): 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("analyze-complete", self.on_analyze_complete_cb, self.pBarWindow)
#self.ccdaemon.connect("analyze-complete", self.on_analyze_complete_cb, self.pBarWindow)
will remove this ^
self.ccdaemon.connect("abrt-error", self.error_cb)
self.ccdaemon.connect("update", self.update_cb)
#self.ccdaemon.connect("update", self.update_cb)
but this ^ one I plan to use again
# 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("warning", self.update_cb)
Perhaps just delete it, not comment out?
diff -urp abrt-clean/src/Gui/CCReporterDialog.py abrt/src/Gui/CCReporterDialog.py --- abrt-clean/src/Gui/CCReporterDialog.py 2010-03-03 14:27:39.799190493 +0100 +++ abrt/src/Gui/CCReporterDialog.py 2010-03-03 14:22:59.809190907 +0100 @@ -325,3 +325,216 @@ class ReporterDialog(): result = self.window.run() self.window.destroy() return (result, self.report)
+class ReporterSelector():
- def __init__(self, crashdump, daemon, log=None, parent=None):
self.connected_signals = []
self.updates = ""
self.daemon = daemon
self.dump = crashdump
self.selected_reporters = []
#FIXME: cache settings! Create some class to represent it like PluginList
Will caching save any noticeable time?
the comment is not precise, I'd like to use some class to represent the settings for sake of more comfortable usage, the caching would be just the side effect.
self.settings = daemon.getSettings()
pluginlist = getPluginInfoList(daemon)
self.reporters = []
AnalyzerActionsAndReporters = self.settings["AnalyzerActionsAndReporters"]
for reporter_name in AnalyzerActionsAndReporters[crashdump.getAnalyzerName()].split(','):
reporter = pluginlist.getReporterByName(reporter_name)
if reporter:
self.reporters.append(reporter)
The resulting window does not have message field. I have a patch on top of yours which adds it. I didn't code up the means to fill it, though.
I decided to split this into two patches as it turned out to be pretty long
- add the window for selecting the reporters
- add the result message label as we agreed
parent_window = [self.window.get_transient_for(),self.window][self.window.get_property("visible")]
report_dialog = ReporterDialog(report, self.daemon, log=self.updates, parent=parent_window)
I must admit my python-fu fails me. What v = [a,b][f()] means?
Translated to C it would look like this: f() ? b : a
# show the report window with selected dump
# when getReport is done it emits "analyze-complete" and on_analyze_completed is called
There is no "on_analyze_completed". It's called "on_analyze_complete_cb".
will send v2 asap.
Thx, Jirka _______________________________________________ Crash-catcher mailing list Crash-catcher@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/crash-catcher