[empathy] allow to choose irc network with ENTER
- From: Felix Kaser <kaserf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] allow to choose irc network with ENTER
- Date: Thu, 26 Aug 2010 14:25:04 +0000 (UTC)
commit 3962499d4caedcce812fe1ce9b09b7a775e33a86
Author: Felix Kaser <f kaser gmx net>
Date: Thu Aug 26 16:04:47 2010 +0200
allow to choose irc network with ENTER
while searching, the enter key allows you to select an irc network
.../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 a42c21f..afe2593 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]