aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-dnd.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-21 04:52:47 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-21 04:52:47 +0800
commit3389ee02736c231e61877abd5d9663e57f27a276 (patch)
treefb09a5a53a779f673e7bcc1f9d98d3fea23370b0 /lib/ephy-dnd.c
parentdef97c979d02aed973fb1443d89ab81f1d570b7c (diff)
downloadgsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.tar
gsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.tar.gz
gsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.tar.bz2
gsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.tar.lz
gsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.tar.xz
gsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.tar.zst
gsoc2013-epiphany-3389ee02736c231e61877abd5d9663e57f27a276.zip
Fix nodes drag and drop. Make double click select the whole address in
2003-05-20 Marco Pesenti Gritti <marco@it.gnome.org> * 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.
Diffstat (limited to 'lib/ephy-dnd.c')
-rw-r--r--lib/ephy-dnd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/ephy-dnd.c b/lib/ephy-dnd.c
index 8c18bd754..9f10c5a3c 100644
--- a/lib/ephy-dnd.c
+++ b/lib/ephy-dnd.c
@@ -92,6 +92,7 @@ ephy_dnd_drag_data_get (GtkWidget *widget,
{
result = g_string_new (NULL);
(* each_selected_item_iterator) (add_one_node, container_context, result);
+ g_string_erase (result, result->len - 1, -1);
}
else
{
@@ -110,21 +111,21 @@ ephy_dnd_drag_data_get (GtkWidget *widget,
GList *
ephy_dnd_node_list_extract_nodes (const char *node_list)
{
- EphyNodeDb *db;
GList *result = NULL;
char **nodes;
int i;
nodes = g_strsplit (node_list, ";", -1);
- db = ephy_node_db_get_by_name (nodes[0]);
- g_return_val_if_fail (db != NULL, NULL);
-
- for (i = 1; nodes[i] != NULL; i++)
+ for (i = 0; nodes[i] != NULL; i = i + 2)
{
gulong id;
+ EphyNodeDb *db;
+
+ db = ephy_node_db_get_by_name (nodes[i]);
+ g_return_val_if_fail (db != NULL, NULL);
- if (ephy_str_to_int (nodes[i], &id))
+ if (ephy_str_to_int (nodes[i + 1], &id))
{
EphyNode *node;