[nanny] Remove edit button from nanny blacklist manager
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny] Remove edit button from nanny blacklist manager
- Date: Sun, 23 Jan 2011 18:07:13 +0000 (UTC)
commit 283b3e6336ba4331409a126d83cd6aab857bf478
Author: Roberto Majadas <roberto majadas openshine com>
Date: Mon Jan 10 04:25:17 2011 +0100
Remove edit button from nanny blacklist manager
client/gnome/admin/data/ui/nbm_pbl_dialog.ui | 8 ++----
client/gnome/admin/src/BlacklistManager.py | 31 --------------------------
2 files changed, 3 insertions(+), 36 deletions(-)
---
diff --git a/client/gnome/admin/data/ui/nbm_pbl_dialog.ui b/client/gnome/admin/data/ui/nbm_pbl_dialog.ui
index 13595d8..edb8197 100644
--- a/client/gnome/admin/data/ui/nbm_pbl_dialog.ui
+++ b/client/gnome/admin/data/ui/nbm_pbl_dialog.ui
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
@@ -17,7 +17,6 @@
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
@@ -86,7 +85,6 @@ Click this button if you want to make changes.</property>
<child>
<object class="GtkVButtonBox" id="vbuttonbox1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout_style">start</property>
<child>
@@ -104,8 +102,8 @@ Click this button if you want to make changes.</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="nbm_blacklist_edit_button">
- <property name="label">gtk-edit</property>
+ <object class="GtkButton" id="nbm_blacklist_update_button">
+ <property name="label">gtk-refresh</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
diff --git a/client/gnome/admin/src/BlacklistManager.py b/client/gnome/admin/src/BlacklistManager.py
index 9473d61..e94208c 100644
--- a/client/gnome/admin/src/BlacklistManager.py
+++ b/client/gnome/admin/src/BlacklistManager.py
@@ -47,7 +47,6 @@ class BlacklistManager:
self.dialog.get_content_area().add (self.alignment)
self.blacklist_import_button.connect ('clicked', self.__on_blacklist_import_button_clicked)
- self.blacklist_edit_button.connect ('clicked', self.__on_blacklist_edit_button_clicked)
self.blacklist_remove_button.connect ('clicked', self.__on_blacklist_remove_button_clicked)
self.unlock_button.connect('clicked', self.__on_unlock_button_clicked)
@@ -96,7 +95,6 @@ class BlacklistManager:
self.unlock_area.show()
self.blacklist_import_button.set_sensitive(lock_status)
- self.blacklist_edit_button.set_sensitive(lock_status)
self.blacklist_remove_button.set_sensitive(lock_status)
@@ -141,32 +139,6 @@ class BlacklistManager:
file_selection_dialog.destroy()
- def __on_blacklist_edit_button_clicked (self, widget, data=None):
- edit_dialog = gtk.Dialog (title=_("Blacklist Filter Configuration"),
- buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
- gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
-
- nanny.client.common.Utils.ui_magic (edit_dialog,
- ui_file = os.path.join (nanny.client.gnome.admin.ui_files_dir, "nbm_pbl_edit_dialog.ui"),
- prefix = "nbm")
-
- edit_dialog.main_alignment.unparent()
- edit_dialog.get_content_area().add (edit_dialog.main_alignment)
-
- name, description = self.dbus_client.get_pkg_filter_metadata (self.__selected_blacklist)
- edit_dialog.name_entry.set_text (name)
- edit_dialog.description_entry.set_text (description)
-
- response = edit_dialog.run()
-
- if response == gtk.RESPONSE_ACCEPT:
- name = edit_dialog.name_entry.get_text ()
- description = edit_dialog.description_entry.get_text ()
- self.dbus_client.set_pkg_filter_metadata (self.__selected_blacklist, name, description)
- self.__fill_treeview ()
-
- edit_dialog.destroy()
-
def __on_blacklist_remove_button_clicked (self, widget, data=None):
if self.__selected_blacklist == None:
return
@@ -189,14 +161,11 @@ class BlacklistManager:
read_only = model.get_value (itera, 0)
if read_only:
- self.blacklist_edit_button.set_sensitive (False)
self.blacklist_remove_button.set_sensitive (False)
else:
- self.blacklist_edit_button.set_sensitive (True)
self.blacklist_remove_button.set_sensitive (True)
else:
- self.blacklist_edit_button.set_sensitive (False)
self.blacklist_remove_button.set_sensitive (False)
self.__selected_blacklist = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]