summaryrefslogtreecommitdiff
path: root/gladeui/glade-signal-model.c
diff options
context:
space:
mode:
authorJohannes Schmid <jhs@gnome.org>2010-08-01 16:21:10 +0200
committerJohannes Schmid <jhs@gnome.org>2010-08-01 16:21:10 +0200
commit03f6fb63040d8b98e70304c1c6a572b115404f47 (patch)
treedb6b6779ba2e280772fae098fab34103017e5d1a /gladeui/glade-signal-model.c
parent5299bcfdc68d27f66581e3fee2d8494dd28f504f (diff)
downloadglade-03f6fb63040d8b98e70304c1c6a572b115404f47.tar.gz
signal-editor: Add drag and drop animation
Diffstat (limited to 'gladeui/glade-signal-model.c')
-rw-r--r--gladeui/glade-signal-model.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gladeui/glade-signal-model.c b/gladeui/glade-signal-model.c
index dbe16508..a027c120 100644
--- a/gladeui/glade-signal-model.c
+++ b/gladeui/glade-signal-model.c
@@ -945,10 +945,16 @@ glade_signal_model_row_draggable (GtkTreeDragSource* model,
GtkTreePath* path)
{
GtkTreeIter iter;
+ gboolean is_handler;
+ gboolean not_dummy;
gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path);
- return glade_signal_model_not_dummy_handler (GLADE_SIGNAL_MODEL (model),
- &iter);
+ gtk_tree_model_get (GTK_TREE_MODEL (model), &iter,
+ GLADE_SIGNAL_COLUMN_IS_HANDLER, &is_handler,
+ GLADE_SIGNAL_COLUMN_NOT_DUMMY, &not_dummy,
+ -1);
+
+ return (is_handler && not_dummy);
}
static gboolean
@@ -968,10 +974,14 @@ glade_signal_model_drag_data_get (GtkTreeDragSource* model,
GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1);
dnd_text = g_strdup_printf ("%s:%s:%s", widget, signal->name, signal->handler);
- gtk_selection_data_set_text (data, dnd_text, strlen (dnd_text));
+ g_message ("Sent: %s", dnd_text);
+ gtk_selection_data_set (data,
+ gdk_atom_intern_static_string ("application/x-glade-signal"),
+ 8,
+ (guchar*) dnd_text,
+ strlen (dnd_text));
g_free (dnd_text);
-
return TRUE;
}
else