gegl r2716 - in trunk: . bin
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2716 - in trunk: . bin
- Date: Sun, 9 Nov 2008 20:09:53 +0000 (UTC)
Author: ok
Date: Sun Nov 9 20:09:53 2008
New Revision: 2716
URL: http://svn.gnome.org/viewvc/gegl?rev=2716&view=rev
Log:
* bin/editor.c: (raise), (lower), (gui_press_event):
* bin/gegl-tree-editor-action.c: (gegl_move_item_up),
(gegl_move_item_down): added raise/lower commands to the menu when in
move mode.
Modified:
trunk/ChangeLog
trunk/bin/editor.c
trunk/bin/gegl-tree-editor-action.c
Modified: trunk/bin/editor.c
==============================================================================
--- trunk/bin/editor.c (original)
+++ trunk/bin/editor.c Sun Nov 9 20:09:53 2008
@@ -933,6 +933,35 @@
}
void gegl_remove_item (GeglNode *node);
+void gegl_move_item_up (GeglNode *node);
+void gegl_move_item_down (GeglNode *node);
+
+
+static gint raise (gint argc, char **argv)
+{
+ GeglNode *self = tree_editor_get_active (editor.tree_editor);
+ GeglNode *parent = gegl_parent (self);
+
+ if (g_str_equal (gegl_node_get_operation (parent), "gegl:over"))
+ {
+ gegl_move_item_up (parent);
+ tree_editor_set_active (editor.tree_editor, self);
+ }
+ return 0;
+}
+
+static gint lower (gint argc, char **argv)
+{
+ GeglNode *self = tree_editor_get_active (editor.tree_editor);
+ GeglNode *parent = gegl_parent (self);
+
+ if (g_str_equal (gegl_node_get_operation (parent), "gegl:over"))
+ {
+ gegl_move_item_down (parent);
+ tree_editor_set_active (editor.tree_editor, self);
+ }
+ return 0;
+}
static gint remove_item (gint argc, char **argv)
{
@@ -1284,6 +1313,8 @@
case STATE_MOVE:
menu_add ("paint", G_CALLBACK (do_command), "set-state strokes");
menu_add ("path", G_CALLBACK (do_command), "set-state edit-nodes");
+ menu_add ("raise", G_CALLBACK (do_command), "raise");
+ menu_add ("lower", G_CALLBACK (do_command), "lower");
menu_add ("width", G_CALLBACK (do_command), "set-state edit-width");
menu_add ("remove", G_CALLBACK (do_command), "remove-item");
/* check the current curve type,. */
Modified: trunk/bin/gegl-tree-editor-action.c
==============================================================================
--- trunk/bin/gegl-tree-editor-action.c (original)
+++ trunk/bin/gegl-tree-editor-action.c Sun Nov 9 20:09:53 2008
@@ -403,6 +403,27 @@
gtk_tree_selection_select_iter (tree_selection, &iter);
}
+void gegl_move_item_up (GeglNode *node);
+void gegl_move_item_up (GeglNode *node)
+{
+ /* hack hack */
+ tree_editor_set_active (editor.tree_editor, node);
+ move_up (NULL, tree_editor_get_treeview (editor.tree_editor));
+ node = tree_editor_get_active (editor.tree_editor);
+ property_editor_rebuild (editor.property_editor, node);
+}
+
+
+void gegl_move_item_down (GeglNode *node);
+void gegl_move_item_down (GeglNode *node)
+{
+ /* hack hack */
+ tree_editor_set_active (editor.tree_editor, node);
+ move_down (NULL, tree_editor_get_treeview (editor.tree_editor));
+ node = tree_editor_get_active (editor.tree_editor);
+ property_editor_rebuild (editor.property_editor, node);
+}
+
void gegl_remove_item (GeglNode *node);
void gegl_remove_item (GeglNode *node)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]