add a warning icon next to warning message in ACE. Fixes #7759

This commit is contained in:
Yann Leboulanger 2014-05-29 22:46:48 +02:00
parent 5d62740700
commit 8dd4730240
2 changed files with 82 additions and 62 deletions

View File

@ -1,40 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="2.16"/>
<requires lib="gtk+" version="3.10"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-warning</property>
</object>
<object class="GtkWindow" id="advanced_configuration_window">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Advanced Configuration Editor</property>
<property name="window_position">center-on-parent</property>
<property name="role">ace</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">650</property>
<property name="default_height">540</property>
<property name="type_hint">dialog</property>
<signal name="destroy" handler="on_advanced_configuration_window_destroy" swapped="no"/>
<child>
<object class="GtkVBox" id="vbox70">
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkTable" id="table26">
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">7</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label248">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Filter:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
@ -44,41 +47,41 @@
<signal name="changed" handler="on_advanced_entry_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="y_options"></property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow36">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow36">
<object class="GtkTreeView" id="advanced_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="advanced_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="rules_hint">True</property>
<signal name="row-activated" handler="on_advanced_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object>
<property name="rules_hint">True</property>
<signal name="row-activated" handler="on_advanced_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection"/>
</child>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="padding">1</property>
<property name="position">1</property>
</packing>
</child>
<child>
@ -116,25 +119,46 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="restart_label">
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;NOTE:&lt;/b&gt; You should restart Gajim for some settings to take effect</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="hbuttonbox18">
<object class="GtkBox" id="restart_box">
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="image3">
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-warning</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="restart_label">
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;NOTE:&lt;/b&gt; You should restart Gajim for some settings to take effect</property>
<property name="use_markup">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@ -142,12 +166,10 @@
<child>
<object class="GtkButton" id="reset_button">
<property name="label" translatable="yes">_Reset to default</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="image">image1</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_reset_button_clicked" swapped="no"/>
@ -161,12 +183,10 @@
<child>
<object class="GtkButton" id="advanced_close_button">
<property name="label">gtk-close</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_advanced_close_button_clicked" swapped="no"/>
</object>
@ -180,14 +200,13 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkImage" id="image1">
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-undo</property>

View File

@ -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):