diff options
Diffstat (limited to 'lib/widgets')
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 14 | ||||
-rw-r--r-- | lib/widgets/ephy-tree-model-sort.c | 6 |
2 files changed, 19 insertions, 1 deletions
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); diff --git a/lib/widgets/ephy-tree-model-sort.c b/lib/widgets/ephy-tree-model-sort.c index 1d03effb8..b91946e8d 100644 --- a/lib/widgets/ephy-tree-model-sort.c +++ b/lib/widgets/ephy-tree-model-sort.c @@ -250,6 +250,7 @@ each_node_get_data_binder (EphyDragEachSelectedItemDataGet iteratee, GtkTreeIter iter; GtkTreePath *path = gtk_tree_row_reference_get_path (i->data); EphyNode *node = NULL; + EphyNodeDb *db; char *value; gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); @@ -259,7 +260,10 @@ each_node_get_data_binder (EphyDragEachSelectedItemDataGet iteratee, if (node == NULL) return; - value = g_strdup_printf ("%ld", ephy_node_get_id (node)); + db = ephy_node_get_db (node); + value = g_strdup_printf ("%s;%ld", + ephy_node_db_get_name (db), + ephy_node_get_id (node)); iteratee (value, -1, -1, -1, -1, data); g_free (value); } |