[gegl-edit] Added functionality to the right click Delete menu item
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-edit] Added functionality to the right click Delete menu item
- Date: Thu, 9 Aug 2012 22:05:46 +0000 (UTC)
commit c48bed23b2e1bbfe3b60a1fc1634446fa077130c
Author: Isaac Wagner <isaacbw src gnome org>
Date: Thu Aug 9 17:41:52 2012 -0400
Added functionality to the right click Delete menu item
gegl-edit/contextmenu.ui | 1 +
gegl-edit/gegl-edit.c | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gegl-edit/contextmenu.ui b/gegl-edit/contextmenu.ui
index 6067eda..fdab034 100644
--- a/gegl-edit/contextmenu.ui
+++ b/gegl-edit/contextmenu.ui
@@ -21,6 +21,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes">Delete</property>
<property name="use_underline">True</property>
+ <signal name="activate" handler="activated_context_delete" swapped="no"/>
</object>
</child>
</object>
diff --git a/gegl-edit/gegl-edit.c b/gegl-edit/gegl-edit.c
index d9adc6e..a5d86fa 100644
--- a/gegl-edit/gegl-edit.c
+++ b/gegl-edit/gegl-edit.c
@@ -343,6 +343,8 @@ G_MODULE_EXPORT void activated_disconnect(GtkMenuItem *menuitem, gpointer user_d
graph_gtk_pad_disconnect((GraphGtkPad*)(pad->data));
}
}
+
+ update_images(g_queue_peek_head(data->view_stack));
}
G_MODULE_EXPORT void activated_arrange(GtkMenuItem *menuitem, gpointer user_data)
@@ -411,7 +413,10 @@ G_MODULE_EXPORT void activated_context_edit(GtkMenuItem *menuitem, gpointer user
G_MODULE_EXPORT void activated_context_delete(GtkMenuItem *menuitem, gpointer user_data)
{
CallbackData *data = user_data;
+ gegl_node_disconnect_all_pads(data->context->user_data);
+ gegl_node_remove_child(g_queue_peek_head(data->graph_stack), data->context->user_data);
graph_gtk_view_remove_node(g_queue_peek_head(data->view_stack), data->context);
+ update_images(g_queue_peek_head(data->view_stack));
}
G_MODULE_EXPORT void activated_add_subgraph(GtkMenuItem *menuitem, gpointer user_data)
@@ -736,6 +741,8 @@ G_MODULE_EXPORT void activated_delete(GtkMenuItem *menuitem, gpointer user_data)
}
graph_gtk_view_remove_selected_nodes(g_queue_peek_head(data->view_stack));
+
+ update_images(g_queue_peek_head(data->view_stack));
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]