[misc & asterix] improve privacy_list and privacy_lists window
This commit is contained in:
parent
06609bcb89
commit
8caa122a64
|
@ -725,50 +725,28 @@ to</property>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="last_buttons_hbox">
|
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
||||||
|
<property name="border_width">6</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="privacy_list_refresh_button">
|
<widget class="GtkButton" id="close_button">
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label">gtk-refresh</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
|
||||||
<property name="focus_on_click">True</property>
|
|
||||||
<signal name="clicked" handler="on_privacy_list_refresh_button_clicked" last_modification_time="Sat, 01 Jul 2006 13:09:35 GMT"/>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkButton" id="privacy_list_close_button">
|
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label">gtk-close</property>
|
<property name="label">gtk-close</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="focus_on_click">True</property>
|
<property name="focus_on_click">True</property>
|
||||||
<signal name="clicked" handler="on_privacy_list_close_button_clicked" last_modification_time="Sat, 01 Jul 2006 13:09:28 GMT"/>
|
<signal name="clicked" handler="on_close_button_clicked" last_modification_time="Wed, 18 Oct 2006 08:31:02 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
|
@ -166,22 +166,9 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkButton" id="privacy_lists_refresh_button">
|
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label">gtk-refresh</property>
|
|
||||||
<property name="use_stock">True</property>
|
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
|
||||||
<property name="focus_on_click">True</property>
|
|
||||||
<signal name="clicked" handler="on_privacy_lists_refresh_button_clicked" last_modification_time="Sun, 02 Jul 2006 16:46:48 GMT"/>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="close_privacy_lists_window_button">
|
<widget class="GtkButton" id="close_privacy_lists_window_button">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
|
|
|
@ -1807,7 +1807,6 @@ class PrivacyListWindow:
|
||||||
'privacy_list_default_checkbutton']:
|
'privacy_list_default_checkbutton']:
|
||||||
self.__dict__[widget_to_add] = self.xml.get_widget(widget_to_add)
|
self.__dict__[widget_to_add] = self.xml.get_widget(widget_to_add)
|
||||||
|
|
||||||
|
|
||||||
self.privacy_lists_title_label.set_label(
|
self.privacy_lists_title_label.set_label(
|
||||||
_('Privacy List <b><i>%s</i></b>') % \
|
_('Privacy List <b><i>%s</i></b>') % \
|
||||||
gtkgui_helpers.escape_for_pango_markup(self.privacy_list_name))
|
gtkgui_helpers.escape_for_pango_markup(self.privacy_list_name))
|
||||||
|
@ -1821,6 +1820,7 @@ class PrivacyListWindow:
|
||||||
self.open_rule_button.set_sensitive(False)
|
self.open_rule_button.set_sensitive(False)
|
||||||
self.privacy_list_active_checkbutton.set_sensitive(False)
|
self.privacy_list_active_checkbutton.set_sensitive(False)
|
||||||
self.privacy_list_default_checkbutton.set_sensitive(False)
|
self.privacy_list_default_checkbutton.set_sensitive(False)
|
||||||
|
self.list_of_rules_combobox.set_sensitive(False)
|
||||||
|
|
||||||
if action == 'EDIT':
|
if action == 'EDIT':
|
||||||
self.refresh_rules()
|
self.refresh_rules()
|
||||||
|
@ -2061,13 +2061,9 @@ class PrivacyListWindow:
|
||||||
if active_bool:
|
if active_bool:
|
||||||
self.allow_deny = radiobutton
|
self.allow_deny = radiobutton
|
||||||
|
|
||||||
def on_privacy_list_close_button_clicked(self, widget):
|
def on_close_button_clicked(self, widget):
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
||||||
def on_privacy_list_refresh_button_clicked(self, widget):
|
|
||||||
self.refresh_rules()
|
|
||||||
self.add_edit_vbox.hide()
|
|
||||||
|
|
||||||
class PrivacyListsWindow:
|
class PrivacyListsWindow:
|
||||||
'''Window that is the main window for Privacy Lists;
|
'''Window that is the main window for Privacy Lists;
|
||||||
we can list there the privacy lists and ask to create a new one
|
we can list there the privacy lists and ask to create a new one
|
||||||
|
@ -2132,11 +2128,6 @@ class PrivacyListsWindow:
|
||||||
self.list_of_privacy_lists_combobox.set_sensitive(False)
|
self.list_of_privacy_lists_combobox.set_sensitive(False)
|
||||||
self.open_privacy_list_button.set_sensitive(False)
|
self.open_privacy_list_button.set_sensitive(False)
|
||||||
self.delete_privacy_list_button.set_sensitive(False)
|
self.delete_privacy_list_button.set_sensitive(False)
|
||||||
elif len(self.privacy_lists_save) == 1:
|
|
||||||
self.list_of_privacy_lists_combobox.set_active(0)
|
|
||||||
self.list_of_privacy_lists_combobox.set_sensitive(False)
|
|
||||||
self.open_privacy_list_button.set_sensitive(True)
|
|
||||||
self.delete_privacy_list_button.set_sensitive(True)
|
|
||||||
else:
|
else:
|
||||||
self.list_of_privacy_lists_combobox.set_sensitive(True)
|
self.list_of_privacy_lists_combobox.set_sensitive(True)
|
||||||
self.list_of_privacy_lists_combobox.set_active(0)
|
self.list_of_privacy_lists_combobox.set_active(0)
|
||||||
|
|
Loading…
Reference in New Issue