Keep changing the width of the roster(when a gtk.Paned widget handle is dragged)

This commit is contained in:
Denis Fomin 2010-11-16 13:56:12 +03:00
parent c8dcfc771b
commit bed900a1c8
2 changed files with 10 additions and 0 deletions

View File

@ -325,6 +325,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="notify" handler="on_roster_hpaned_notify"/>
<child>
<object class="GtkVBox" id="roster_vbox2">
<property name="visible">True</property>

View File

@ -4069,6 +4069,15 @@ class RosterWindow:
if self.hpaned.get_child2() is not None:
self.show_roster_vbox(widget.get_active())
def on_roster_hpaned_notify(self, pane, gparamspec):
"""
Keep changing the width of the roster
(when a gtk.Paned widget handle is dragged)
"""
if gparamspec.name == 'position':
roster_width = pane.get_child1().allocation.width
gajim.config.set('roster_width', roster_width)
################################################################################
### Drag and Drop handling
################################################################################