diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-21 16:28:13 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-11-18 10:43:05 +0000 |
commit | c63263f038c938839e5a3ec5e4809955b877a381 (patch) | |
tree | be6a3a862112d72602f1f85792b74c56bb211d44 /plugins | |
parent | 00e1ca483ad07ddcd2a059130e3e186ae12fbd63 (diff) | |
download | telepathy-gabble-c63263f038c938839e5a3ec5e4809955b877a381.tar.gz |
xmpp-console: add radio buttons for get vs. set
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/telepathy-gabble-xmpp-console | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/telepathy-gabble-xmpp-console b/plugins/telepathy-gabble-xmpp-console index ad0cc3482..751f6ed26 100755 --- a/plugins/telepathy-gabble-xmpp-console +++ b/plugins/telepathy-gabble-xmpp-console @@ -67,10 +67,18 @@ class Window(Gtk.Window): 'To:', below=request_label) self.recipient_entry = recipient_entry - type_label, type_entry = self.add_label_entry_pair( - 'IQ Type:', below=recipient_label) - type_entry.set_text('get') - self.type_entry = type_entry + type_label = self.add_label('IQ Type:', below=recipient_label) + self.get_button = Gtk.RadioButton.new_with_label([], "get") + self.get_button.set_active(True) + self.set_button = Gtk.RadioButton.new_with_label_from_widget( + self.get_button, "set") + + box = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL) + box.set_layout(Gtk.ButtonBoxStyle.START) + box.add(self.get_button) + box.add(self.set_button) + self.grid.attach_next_to(box, type_label, + Gtk.PositionType.RIGHT, 1, 1) body_label, body_entry = self.add_label_entry_pair( 'Body:', below=type_label) @@ -135,7 +143,7 @@ class Window(Gtk.Window): return label, entry def send_iq(self, *misc): - type = self.type_entry.get_text() + type = 'get' if self.get_button.get_active() else 'set' to = self.recipient_entry.get_text() body = self.body_entry.get_text() |