diff options
author | Felix Kaser <f.kaser@gmx.net> | 2010-08-26 22:04:47 +0800 |
---|---|---|
committer | Felix Kaser <f.kaser@gmx.net> | 2010-08-26 22:04:47 +0800 |
commit | 3962499d4caedcce812fe1ce9b09b7a775e33a86 (patch) | |
tree | 88feffcead94dd0174fb262f441ac6253b6adb6f /libempathy-gtk | |
parent | 692cee58aba936f5df2c791b89b697c1b05d208c (diff) | |
download | gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.tar gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.tar.gz gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.tar.bz2 gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.tar.lz gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.tar.xz gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.tar.zst gsoc2013-empathy-3962499d4caedcce812fe1ce9b09b7a775e33a86.zip |
allow to choose irc network with ENTER
while searching, the enter key allows you to select an irc network
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-irc-network-chooser-dialog.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.c b/libempathy-gtk/empathy-irc-network-chooser-dialog.c index a42c21f19..afe259364 100644 --- a/libempathy-gtk/empathy-irc-network-chooser-dialog.c +++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.c @@ -61,6 +61,7 @@ typedef struct { GtkWidget *select_button; gulong search_sig; + gulong activate_sig; } EmpathyIrcNetworkChooserDialogPriv; enum { @@ -419,6 +420,13 @@ filter_visible_func (GtkTreeModel *model, return visible; } +static void +search_activate_cb (GtkWidget *search, + EmpathyIrcNetworkChooserDialog *self) +{ + gtk_widget_hide (search); + gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_CLOSE); +} static void search_text_notify_cb (EmpathyLiveSearch *search, @@ -468,6 +476,7 @@ dialog_destroy_cb (GtkWidget *widget, EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self); g_signal_handler_disconnect (priv->search, priv->search_sig); + g_signal_handler_disconnect (priv->search, priv->activate_sig); } static void @@ -532,6 +541,9 @@ empathy_irc_network_chooser_dialog_constructed (GObject *object) priv->search_sig = g_signal_connect (priv->search, "notify::text", G_CALLBACK (search_text_notify_cb), self); + priv->activate_sig = g_signal_connect (priv->search, "activate", + G_CALLBACK (search_activate_cb), self); + /* Add buttons */ gtk_dialog_add_buttons (dialog, GTK_STOCK_ADD, GTK_RESPONSE_OK, |