diff --git a/data/glade/join_groupchat_window.glade b/data/glade/join_groupchat_window.glade index 6e08f2826..2a3d63c34 100644 --- a/data/glade/join_groupchat_window.glade +++ b/data/glade/join_groupchat_window.glade @@ -1,12 +1,12 @@ - + + + - - 6 Join Group Chat - + True @@ -14,7 +14,7 @@ True - 6 + 7 2 12 6 @@ -132,17 +132,18 @@ - Join this room automatically when I connect True + False True - False + Join this room automatically when I connect True + 0 True 2 - 5 - 6 + 6 + 7 GTK_FILL @@ -170,30 +171,43 @@ GTK_FILL + + + True + True + Bookmark this room + 0 + True + + + + 2 + 5 + 6 + GTK_FILL + + + - - 0 - True 12 - end + GTK_BUTTONBOX_END - gtk-cancel True True True - False + gtk-cancel True + 0 False False - 0 @@ -202,7 +216,7 @@ True True True - False + 0 @@ -221,7 +235,6 @@ False False - 0 diff --git a/src/dialogs.py b/src/dialogs.py index 0b1ad3400..fd60111b8 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -1975,7 +1975,7 @@ class JoinGroupchatWindow: self.xml.get_widget('join_button').set_sensitive(False) if account and not gajim.connections[account].private_storage_supported: - self.xml.get_widget('auto_join_checkbutton').set_sensitive(False) + self.xml.get_widget('bookmark_checkbutton').set_sensitive(False) self.window.show_all() @@ -2015,6 +2015,13 @@ class JoinGroupchatWindow: '''When Cancel button is clicked''' self.window.destroy() + def on_bookmark_checkbutton_toggled(self, widget): + auto_join_checkbutton = self.xml.get_widget('auto_join_checkbutton') + if widget.get_active(): + auto_join_checkbutton.set_sensitive(True) + else: + auto_join_checkbutton.set_sensitive(False) + def on_join_button_clicked(self, widget): '''When Join button is clicked''' if not self.account: @@ -2058,10 +2065,14 @@ class JoinGroupchatWindow: gajim.config.set('recently_groupchat', ' '.join(self.recently_groupchat)) - if self.xml.get_widget('auto_join_checkbutton').get_active(): + if self.xml.get_widget('bookmark_checkbutton').get_active(): + if self.xml.get_widget('auto_join_checkbutton').get_active(): + autojoin = '1' + else: + autojoin = '0' # Add as bookmark, with autojoin and not minimized name = gajim.get_nick_from_jid(room_jid) - gajim.interface.add_gc_bookmark(self.account, name, room_jid, '1', \ + gajim.interface.add_gc_bookmark(self.account, name, room_jid, autojoin, '0', password, nickname) if self.automatic: