[Xfce4-commits] <gigolo:master> Allow finishing the Connect / Bookmark Edit dialog by pressing Enter

Enrico Tröger noreply at xfce.org
Mon Jul 26 20:14:01 CEST 2010


Updating branch refs/heads/master
         to 6a01eb372a7235fc933d0a3bce0aa9b520920ccb (commit)
       from c1dfb5c2c3bdaad9e165233b696d4a03640704d1 (commit)

commit 6a01eb372a7235fc933d0a3bce0aa9b520920ccb
Author: Enrico Tröger <enrico at xfce.org>
Date:   Mon Jul 26 20:02:56 2010 +0200

    Allow finishing the Connect / Bookmark Edit dialog by pressing Enter

 src/bookmarkeditdialog.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/bookmarkeditdialog.c b/src/bookmarkeditdialog.c
index 2931b82..db1cbca 100644
--- a/src/bookmarkeditdialog.c
+++ b/src/bookmarkeditdialog.c
@@ -923,6 +923,12 @@ static void host_entry_changed_cb(GtkEditable *editable, GtkWidget *btn)
 }
 
 
+static void entry_activate_cb(G_GNUC_UNUSED GtkEditable *editable, GigoloBookmarkEditDialog *dialog)
+{
+	gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+}
+
+
 static void gigolo_bookmark_edit_dialog_init(GigoloBookmarkEditDialog *dialog)
 {
 	GtkWidget *label;
@@ -1033,6 +1039,13 @@ static void gigolo_bookmark_edit_dialog_init(GigoloBookmarkEditDialog *dialog)
 	g_signal_connect(priv->host_entry, "changed",
 		G_CALLBACK(host_entry_changed_cb), priv->share_button);
 
+	g_signal_connect(priv->name_entry, "activate", G_CALLBACK(entry_activate_cb), dialog);
+	g_signal_connect(priv->uri_entry, "activate", G_CALLBACK(entry_activate_cb), dialog);
+	g_signal_connect(priv->host_entry, "activate", G_CALLBACK(entry_activate_cb), dialog);
+	g_signal_connect(priv->folder_entry, "activate", G_CALLBACK(entry_activate_cb), dialog);
+	g_signal_connect(priv->path_entry, "activate", G_CALLBACK(entry_activate_cb), dialog);
+	g_signal_connect(priv->user_entry, "activate", G_CALLBACK(entry_activate_cb), dialog);
+
 	/* We need an extra ref so we can remove them from the table */
 	g_object_ref(priv->uri_entry);
 	g_object_ref(priv->uri_label);



More information about the Xfce4-commits mailing list