diff --git a/src/dialogs.py b/src/dialogs.py
index 2ecb8ce8c..bce2debbb 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -677,6 +677,21 @@ _('You can not join a group chat unless you are connected.')).get_response()
if event.keyval == gtk.keysyms.Escape: # ESCAPE
widget.destroy()
+ def on_room_entry_key_press_event(self, widget, event):
+ # Check for pressed @ and jump to server_entry if found
+ if event.keyval == gtk.keysyms.at:
+ self.xml.get_widget('server_entry').grab_focus()
+ return True
+
+ def on_server_entry_key_press_event(self, widget, event):
+ # If backspace is pressed in empty server_entry, return to the room entry
+ backspace = event.keyval == gtk.keysyms.BackSpace
+ server_entry = self.xml.get_widget('server_entry')
+ empty = len(server_entry.get_text()) == 0
+ if backspace and empty:
+ self.xml.get_widget('room_entry').grab_focus()
+ return True
+
def on_recently_combobox_changed(self, widget):
model = widget.get_model()
iter = widget.get_active_iter()
diff --git a/src/gtkgui.glade b/src/gtkgui.glade
index 68ecca9b7..a0ad89ce5 100644
--- a/src/gtkgui.glade
+++ b/src/gtkgui.glade
@@ -9835,6 +9835,7 @@ topic
True
*
True
+
1
@@ -9857,6 +9858,7 @@ topic
True
*
True
+
1
@@ -16195,7 +16197,7 @@ Banner
True
-
+
True
gtk-jump-to
1
@@ -16215,7 +16217,7 @@ Banner
True
-
+
True
gtk-new
1
@@ -16234,7 +16236,7 @@ Banner
True
-
+
True
gtk-refresh
1
@@ -16268,7 +16270,7 @@ Banner
-
+
True
gtk-file
1
@@ -16288,7 +16290,7 @@ Banner
-
+
True
gtk-dialog-authentication
1
@@ -16313,7 +16315,7 @@ Banner
True
-
+
True
gtk-dialog-question
1
@@ -16334,7 +16336,7 @@ Banner
True
-
+
True
gtk-go-up
1
@@ -16354,7 +16356,7 @@ Banner
True
-
+
True
gtk-go-down
1
@@ -16375,7 +16377,7 @@ Banner
-
+
True
gtk-stop
1
@@ -16398,7 +16400,7 @@ Banner
True
-
+
True
gtk-add
1
@@ -16417,7 +16419,7 @@ Banner
True
-
+
True
gtk-remove
1
@@ -16449,7 +16451,7 @@ Banner
True
-
+
True
gtk-justify-fill
1