From 9fac90866f5936fc507463faade2bc6be56f7182 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Wed, 20 Jan 2010 21:41:46 +0100 Subject: Fixed reporting from abrt-gui when g-keyring is not accessible - when g-k is not available to user, GUI let him to insert his credentials, but only remembers it until he closes the gui --- src/Gui/CCMainWindow.py | 10 ++-------- src/Gui/PluginList.py | 7 ++++++- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index f67cd06a..e7853f52 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -303,14 +303,8 @@ class MainWindow(): try: self.pBarWindow.show_all() self.timer = gobject.timeout_add(100, self.progress_update_cb) - # Old way: it needs to talk to daemon - #reporters_settings = {} - ## self.pluginlist = getPluginInfoList(self.ccdaemon, refresh=True) - ## don't force refresh! - #self.pluginlist = getPluginInfoList(self.ccdaemon) - #for plugin in self.pluginlist.getReporterPlugins(): - # reporters_settings[str(plugin)] = plugin.Settings - reporters_settings = getCurrentConfBackend().load_all() + pluginlist = getPluginInfoList(self.ccdaemon) + reporters_settings = pluginlist.getReporterPluginsSettings() log2("Report(result,settings):") log2(" result:%s", str(result)) # Careful, this will print reporters_settings["Password"] too diff --git a/src/Gui/PluginList.py b/src/Gui/PluginList.py index d2232bbc..78e58298 100644 --- a/src/Gui/PluginList.py +++ b/src/Gui/PluginList.py @@ -38,7 +38,12 @@ class PluginInfoList(list): 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 -- cgit