diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/SettingsDialog.py | 48 | ||||
-rw-r--r-- | src/gui/settings.glade | 295 |
2 files changed, 17 insertions, 326 deletions
diff --git a/src/gui/SettingsDialog.py b/src/gui/SettingsDialog.py index f70f81ec..41fb9829 100644 --- a/src/gui/SettingsDialog.py +++ b/src/gui/SettingsDialog.py @@ -27,28 +27,10 @@ class SettingsDialog: 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) - self.builder.get_object("bAddCronJob").connect("clicked", self.on_bAddCronJob_clicked) - - # action plugin list for Cron tab - self.actionPluginsListStore = gtk.ListStore(str, object) - self.actionPluginsListStore.append([_("<b>Select plugin</b>"), None]) - # database plugin list - self.databasePluginsListStore = gtk.ListStore(str, object) - self.databasePluginsListStore.append([_("<b>Select database backend</b>"), None]) - - self.dbcombo = self.builder.get_object("cbDatabase") - self.dbcombo.set_model(self.databasePluginsListStore) - cell = gtk.CellRendererText() - self.dbcombo.pack_start(cell) - self.dbcombo.add_attribute(cell, "markup", 0) # blacklist edit self.builder.get_object("bEditBlackList").connect("clicked", self.on_blacklistEdit_clicked) self.builder.get_object("bOpenGPGPublicKeys").connect("clicked", self.on_GPGKeysEdit_clicked) - self.builder.get_object("bAddAction").connect("clicked", self.on_bAddAction_clicked) - # AnalyzerActionsAndReporters - self.analyzerPluginsListStore = gtk.ListStore(str, object) - self.analyzerPluginsListStore.append([_("<b>Select plugin</b>"), None]) # GPG keys self.wGPGKeys = self.builder.get_object("wGPGKeys") self.GPGKeysListStore = gtk.ListStore(str) @@ -77,18 +59,6 @@ class SettingsDialog: except Exception, e: raise Exception("Comunication with daemon has failed, have you restarted the daemon after update?") - ## hydrate cron jobs: - for key,val in self.settings["Cron"].iteritems(): - # actions are separated by ',' - actions = val.split(',') - self.settings["Cron"][key] = actions - for plugin in self.pluginlist.getActionPlugins(): - it = self.actionPluginsListStore.append([plugin.getName(), plugin]) - for key,val in self.settings["Cron"].iteritems(): - if plugin.getName() in val: - cron_job = (key,it) - self.add_CronJob(cron_job) - self.settings["Cron"][key].remove(plugin.getName()) # hydrate common common = self.settings["Common"] # ensure that all expected keys exist: @@ -96,11 +66,6 @@ class SettingsDialog: common["OpenGPGCheck"] = "no" # check unsigned pkgs too ## gpgcheck self.builder.get_object("cbOpenGPGCheck").set_active(common["OpenGPGCheck"] == 'yes') - ## database - for dbplugin in self.pluginlist.getDatabasePlugins(): - it = self.databasePluginsListStore.append([dbplugin.getName(), dbplugin]) - if common["Database"] == dbplugin.getName(): - self.dbcombo.set_active_iter(it) ## MaxCrashSize self.builder.get_object("sbMaxCrashReportsSize").set_value(float(common["MaxCrashReportsSize"])) ## GPG keys @@ -114,13 +79,6 @@ class SettingsDialog: ## blacklist self.builder.get_object("eBlacklist").set_text(common["BlackList"]) - # hydrate AnalyzerActionsAndReporters - AnalyzerActionsAndReporters = self.settings["AnalyzerActionsAndReporters"] - for analplugin in self.pluginlist.getAnalyzerPlugins(): - it = self.analyzerPluginsListStore.append([analplugin.getName(), analplugin]) - if analplugin.getName() in AnalyzerActionsAndReporters: - action = (AnalyzerActionsAndReporters[analplugin.getName()], it) - self.add_AnalyzerAction(action) def on_bCancelGPGKeys_clicked(self, button): self.wGPGKeys.hide() @@ -147,12 +105,6 @@ class SettingsDialog: def on_cancel_clicked(self, button): self.window.hide() - def on_remove_CronJob_clicked(self, button, job_hbox): - self.removeHBoxWihtChildren(job_hbox) - - def on_remove_Action_clicked(self, button, binding_hbox): - self.removeHBoxWihtChildren(binding_hbox) - def removeHBoxWihtChildren(self, job_hbox): job_hbox.get_parent().remove(job_hbox) for child in job_hbox.get_children(): diff --git a/src/gui/settings.glade b/src/gui/settings.glade index b83e6617..9dc1b96f 100644 --- a/src/gui/settings.glade +++ b/src/gui/settings.glade @@ -276,7 +276,7 @@ <object class="GtkTable" id="common_table"> <property name="visible">True</property> <property name="border_width">6</property> - <property name="n_rows">5</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> @@ -294,32 +294,6 @@ </packing> </child> <child> - <object class="GtkLabel" id="lDatabasePlugin"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="xpad">5</property> - <property name="label" translatable="yes">Database backend: </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="GtkComboBox" id="cbDatabase"> - <property name="visible">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> - <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> @@ -348,20 +322,6 @@ </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">4</property> - <property name="bottom_attach">5</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> @@ -414,6 +374,20 @@ </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> @@ -445,8 +419,8 @@ <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="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options">GTK_FILL</property> </packing> </child> @@ -461,241 +435,6 @@ <property name="tab_fill">False</property> </packing> </child> - <child> - <object class="GtkVBox" id="cron_vbox"> - <property name="visible">True</property> - <property name="border_width">6</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkScrolledWindow" id="swCronJobs"> - <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="GtkViewport" id="vpCronJobs"> - <property name="visible">True</property> - <property name="resize_mode">queue</property> - <property name="shadow_type">none</property> - <child> - <object class="GtkVBox" id="cjvbox1"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkHBox" id="cjhbox1"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="lPlugin"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Plugin</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lTime"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Time (or period)</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbCronJobs"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHButtonBox" id="hbuttonboxy1"> - <property name="visible">True</property> - <property name="spacing">12</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="bAddCronJob"> - <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> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="pCron"> - <property name="visible">True</property> - <property name="label" translatable="yes">Cron</property> - </object> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="actions_vbox"> - <property name="visible">True</property> - <property name="border_width">6</property> - <property name="orientation">vertical</property> - <property name="spacing">6</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="GtkViewport" id="viewportA1"> - <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> - <child> - <object class="GtkHBox" id="ahbox1"> - <property name="visible">True</property> - <child> - <object class="GtkLabel" id="lReporter"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Analyzer plugin</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lAssociatedActions"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Associated action</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="action_lbl_align"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkVBox" id="vbActions"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkHButtonBox" id="hbuttonbox2"> - <property name="visible">True</property> - <property name="spacing">12</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="bAddAction"> - <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> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - <child type="tab"> - <object class="GtkLabel" id="pAnacre"> - <property name="visible">True</property> - <property name="label" translatable="yes">Analyzers, Actions, Reporters</property> - </object> - <packing> - <property name="position">2</property> - <property name="tab_fill">False</property> - </packing> - </child> </object> <packing> <property name="position">0</property> |