glade fixes in advanced window and applying patch to make filter work [thanks Vincent Hanquez]
This commit is contained in:
parent
526430c9b2
commit
229863bc0b
|
@ -69,7 +69,8 @@ class Advanced_window:
|
|||
type = val[OPT_TYPE][0]
|
||||
model.append(iter, [name, val[OPT_VAL], type])
|
||||
|
||||
def visible_func(self, model, iter, str):
|
||||
def visible_func(self, model, iter):
|
||||
str = self.entry.get_text()
|
||||
if str is None or str == '':
|
||||
return True # show all
|
||||
name = model.get_value(iter, 0)
|
||||
|
@ -79,12 +80,15 @@ class Advanced_window:
|
|||
|
||||
def on_advanced_entry_changed(self, widget):
|
||||
text = widget.get_text()
|
||||
self.modelfilter.refilter()
|
||||
|
||||
def __init__(self, plugin):
|
||||
self.plugin = plugin
|
||||
|
||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'advanced_window', None)
|
||||
self.window = self.xml.get_widget('advanced_window')
|
||||
self.entry = self.xml.get_widget('advanced_entry')
|
||||
|
||||
self.xml.signal_autoconnect(self)
|
||||
|
||||
treeview = self.xml.get_widget('advanced_treeview')
|
||||
|
@ -92,6 +96,8 @@ class Advanced_window:
|
|||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING)
|
||||
self.model.set_sort_column_id(0, gtk.SORT_ASCENDING)
|
||||
self.modelfilter = self.model.filter_new()
|
||||
self.modelfilter.set_visible_func(self.visible_func)
|
||||
|
||||
renderer_text = gtk.CellRendererText()
|
||||
treeview.insert_column_with_attributes(-1, 'Preference Name',
|
||||
|
@ -112,7 +118,7 @@ class Advanced_window:
|
|||
# add data to model
|
||||
gajim.config.foreach(self.fill, self.model)
|
||||
|
||||
treeview.set_model(self.model)
|
||||
treeview.set_model(self.modelfilter)
|
||||
|
||||
self.plugin.windows['advanced_config'] = self
|
||||
self.window.show_all()
|
||||
|
|
|
@ -3611,17 +3611,17 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="time_never_radiobutton">
|
||||
<widget class="GtkRadioButton" id="time_always_radiobutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Never</property>
|
||||
<property name="label" translatable="yes">On every line</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_time_never_radiobutton_toggled" last_modification_time="Tue, 08 Mar 2005 12:58:31 GMT"/>
|
||||
<signal name="toggled" handler="on_time_always_radiobutton_toggled" last_modification_time="Tue, 08 Mar 2005 13:00:42 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -3641,7 +3641,7 @@
|
|||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">time_never_radiobutton</property>
|
||||
<property name="group">time_always_radiobutton</property>
|
||||
<signal name="toggled" handler="on_time_sometimes_radiobutton_toggled" last_modification_time="Tue, 08 Mar 2005 13:00:36 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
|
@ -3652,18 +3652,18 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="time_always_radiobutton">
|
||||
<widget class="GtkRadioButton" id="time_never_radiobutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">On every line</property>
|
||||
<property name="label" translatable="yes">Never</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">time_never_radiobutton</property>
|
||||
<signal name="toggled" handler="on_time_always_radiobutton_toggled" last_modification_time="Tue, 08 Mar 2005 13:00:42 GMT"/>
|
||||
<property name="group">time_always_radiobutton</property>
|
||||
<signal name="toggled" handler="on_time_never_radiobutton_toggled" last_modification_time="Tue, 08 Mar 2005 12:58:31 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -10758,10 +10758,9 @@ send a chat message to</property>
|
|||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox70">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="spacing">5</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table26">
|
||||
|
@ -10854,17 +10853,6 @@ send a chat message to</property>
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHSeparator" id="hseparator14">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox18">
|
||||
<property name="visible">True</property>
|
||||
|
|
Loading…
Reference in New Issue