diff options
author | <ole.andre.ravnaas@collabora.co.uk> | 2006-04-09 17:07:46 +0000 |
---|---|---|
committer | <ole.andre.ravnaas@collabora.co.uk> | 2006-04-09 17:07:46 +0000 |
commit | 708599787330c7e74c0b304e70e84cb2bf7b9b54 (patch) | |
tree | 81af1d34429449819162b4379f19086aa24dc81e | |
parent | d1cd58f8d53b058435b965ffc540dc78ba6d76d3 (diff) |
tabby: Misc MUC-related fixes.
-rw-r--r-- | tabby/room.py | 19 | ||||
-rw-r--r-- | tabby/tabby.py | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/tabby/room.py b/tabby/room.py index e689e2d..cdbf9cc 100644 --- a/tabby/room.py +++ b/tabby/room.py @@ -245,10 +245,11 @@ class Room(gobject.GObject): widget.set_sensitive(sensitive) if hasattr(widget, "set_active"): - widget.set_active(value) + if value is not None: + widget.set_active(value) elif hasattr(widget, "set_text"): if value is not None: - widget.set_text(value) + widget.set_text(str(value)) if cn == "Label": widget.set_text("N/A") @@ -261,6 +262,7 @@ class Room(gobject.GObject): self.props[id][3] = new_flags if (new_flags & CHANNEL_ROOM_PROPERTY_FLAG_READ) != 0: + print "update_property_flags: requesting property id %d" % id props = self._room_chan[CHANNEL_INTERFACE_ROOM_PROPERTIES].GetProperties((id,)) value = props[id] else: @@ -277,14 +279,14 @@ class Room(gobject.GObject): if (flags & CHANNEL_ROOM_PROPERTY_FLAG_WRITE) == 0: continue - if value is None: - continue - if type in ("s", "u"): val = widget.get_text() elif type == "b": val = widget.get_active() + if val == "" and value is None: + continue + if val != value: modified = True break @@ -299,18 +301,19 @@ class Room(gobject.GObject): if (flags & CHANNEL_ROOM_PROPERTY_FLAG_WRITE) == 0: continue - if value is None: - continue - if type in ("s", "u"): val = widget.get_text() elif type == "b": val = widget.get_active() + if val == "" and value is None: + continue + if val != value: info[2] = val changed_props[id] = val + print "changing properties: '%s'" % changed_props self._room_chan[CHANNEL_INTERFACE_ROOM_PROPERTIES].SetProperties(changed_props) button.set_sensitive(False) diff --git a/tabby/tabby.py b/tabby/tabby.py index 39413f3..8393e9a 100644 --- a/tabby/tabby.py +++ b/tabby/tabby.py @@ -38,7 +38,7 @@ DEFAULT_SSL = True DEFAULT_USERNAME = "oleavr@jabber.no" DEFAULT_PASSWORD = "" -DEFAULT_ROOM_ENTRY_TEXT = "tryggve@conference.jabber.no" +DEFAULT_ROOM_ENTRY_TEXT = "tryggve@conference.jabber.belnet.be" class MainWindow(gtk.Window): def __init__(self): |