From 3389ee02736c231e61877abd5d9663e57f27a276 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 20 May 2003 20:52:47 +0000 Subject: Fix nodes drag and drop. Make double click select the whole address in 2003-05-20 Marco Pesenti Gritti * lib/ephy-dnd.c: (ephy_dnd_drag_data_get), (ephy_dnd_node_list_extract_nodes): * lib/ephy-node-db.c: (ephy_node_db_set_name), (node_from_id_real), (ephy_node_db_get_name): * lib/ephy-node-db.h: * lib/ephy-node.c: (ephy_node_get_db): * lib/ephy-node.h: * lib/widgets/ephy-location-entry.c: (ephy_location_entry_button_press_event_cb), (ephy_location_entry_build): * lib/widgets/ephy-tree-model-sort.c: (each_node_get_data_binder): Fix nodes drag and drop. Make double click select the whole address in toolbar entry. --- lib/widgets/ephy-location-entry.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/widgets/ephy-location-entry.c') diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 0db0694ee..a9884f3c3 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -194,6 +194,18 @@ ephy_location_entry_new (void) return GTK_WIDGET (g_object_new (EPHY_TYPE_LOCATION_ENTRY, NULL)); } +static gboolean +ephy_location_entry_button_press_event_cb (GtkWidget *entry, GdkEventButton *event, EphyLocationEntry *w) +{ + if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) + { + ephy_location_entry_activate (w); + return TRUE; + } + + return FALSE; +} + static void ephy_location_entry_build (EphyLocationEntry *w) { @@ -207,6 +219,8 @@ ephy_location_entry_build (EphyLocationEntry *w) g_signal_connect (p->entry, "key-press-event", G_CALLBACK (ephy_location_entry_key_press_event_cb), w); + g_signal_connect (p->entry, "button-press-event", + G_CALLBACK (ephy_location_entry_button_press_event_cb), w); g_signal_connect (p->entry, "activate", G_CALLBACK (ephy_location_entry_activate_cb), w); -- cgit v1.2.3