From 8dd47302408f8392f0002d3e99449ebe93b62e16 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 29 May 2014 22:46:48 +0200 Subject: [PATCH] add a warning icon next to warning message in ACE. Fixes #7759 --- data/gui/advanced_configuration_window.ui | 135 ++++++++++++---------- src/advanced_configuration_window.py | 9 +- 2 files changed, 82 insertions(+), 62 deletions(-) diff --git a/data/gui/advanced_configuration_window.ui b/data/gui/advanced_configuration_window.ui index 72c058b15..c5620471c 100644 --- a/data/gui/advanced_configuration_window.ui +++ b/data/gui/advanced_configuration_window.ui @@ -1,40 +1,43 @@ + - + + + True + False + gtk-dialog-warning + False 6 Advanced Configuration Editor - center-on-parent ace + center-on-parent 650 540 dialog - + True False - 6 + vertical 6 - + True False - 2 - 2 - 12 - 7 + 12 - + True False - 0 Filter: - GTK_FILL - + False + True + 0 @@ -44,41 +47,41 @@ - 1 - 2 - + True + True + 1 + + + False + True + 0 + + + + + True + True + never + in - + True True - never - in - - - True - True - True - - - - - + True + + + - - 2 - 1 - 2 - GTK_FILL - True True - 0 + 1 + 1 @@ -116,25 +119,46 @@ False True - 1 - - - - - False - 0 - <b>NOTE:</b> You should restart Gajim for some settings to take effect - True - True - - - False - False 2 - + + False + + + False + gtk-dialog-warning + + + False + True + 0 + + + + + False + 0 + <b>NOTE:</b> You should restart Gajim for some settings to take effect + True + True + + + True + True + 1 + + + + + False + True + 3 + + + + True False 6 @@ -142,12 +166,10 @@ _Reset to default - False True False True True - False image1 True @@ -161,12 +183,10 @@ gtk-close - False True True True False - False True @@ -180,14 +200,13 @@ False True - 6 - 3 + 4 - + True False gtk-undo diff --git a/src/advanced_configuration_window.py b/src/advanced_configuration_window.py index 6cadd5bef..16ef488e9 100644 --- a/src/advanced_configuration_window.py +++ b/src/advanced_configuration_window.py @@ -81,7 +81,7 @@ class AdvancedConfigurationWindow(object): gajim.interface.instances['preferences'].window) self.entry = self.xml.get_object('advanced_entry') self.desc_label = self.xml.get_object('advanced_desc_label') - self.restart_label = self.xml.get_object('restart_label') + self.restart_box = self.xml.get_object('restart_box') self.reset_button = self.xml.get_object('reset_button') # Format: @@ -133,8 +133,8 @@ class AdvancedConfigurationWindow(object): self.on_advanced_treeview_selection_changed) self.xml.connect_signals(self) + self.restart_box.set_no_show_all(True) self.window.show_all() - self.restart_label.hide() gajim.interface.instances['advanced_config'] = self def cb_value_column_data(self, col, cell, model, iter_, data): @@ -218,7 +218,7 @@ class AdvancedConfigurationWindow(object): self.check_for_restart() def check_for_restart(self): - self.restart_label.hide() + self.restart_box.hide() for opt in self.changed_opts: opt_path = opt.split('\n') if len(opt_path)==3: @@ -228,7 +228,8 @@ class AdvancedConfigurationWindow(object): restart = gajim.config.get_restart(opt_path[0]) if restart: if self.changed_opts[opt][0] != self.changed_opts[opt][1]: - self.restart_label.show() + self.restart_box.set_no_show_all(False) + self.restart_box.show_all() break def on_config_edited(self, cell, path, text):