[gegl-edit] Added functionality to 'Arrange' menu item



commit 143d85cef9d41a7af74ae7ae1e00e2343e756fa4
Author: Isaac Wagner <isaacbw src gnome org>
Date:   Wed Aug 8 15:45:57 2012 -0400

    Added functionality to 'Arrange' menu item

 gegl-edit/gegl-edit.c |    7 +++++++
 gegl-edit/menubar.ui  |   13 +++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/gegl-edit/gegl-edit.c b/gegl-edit/gegl-edit.c
index 568bb6b..e2f14ad 100644
--- a/gegl-edit/gegl-edit.c
+++ b/gegl-edit/gegl-edit.c
@@ -229,6 +229,13 @@ nodes_disconnected(GraphGtkView *view, GraphGtkNode *from, const gchar* output,
 
 
 //////////Gtk+ callbacks//////////
+G_MODULE_EXPORT void activated_arrange(GtkMenuItem *menuitem, gpointer user_data)
+{
+  CallbackData *data = user_data;
+  GraphGtkView *view = g_queue_peek_head(data->view_stack);
+  graph_gtk_view_arrange(view);
+}
+
 G_MODULE_EXPORT void activated_context_return(GtkMenuItem *menuitem, gpointer user_data)
 {
   CallbackData *data = user_data;
diff --git a/gegl-edit/menubar.ui b/gegl-edit/menubar.ui
index 8976574..7df9047 100644
--- a/gegl-edit/menubar.ui
+++ b/gegl-edit/menubar.ui
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkImage" id="image2">
+  <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="xalign">0.49000000953674316</property>
-    <property name="yalign">0.41999998688697815</property>
+    <property name="xalign">0.4699999988079071</property>
     <property name="stock">gtk-add</property>
   </object>
-  <object class="GtkImage" id="image1">
+  <object class="GtkImage" id="image2">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="xalign">0.4699999988079071</property>
+    <property name="xalign">0.49000000953674316</property>
+    <property name="yalign">0.41999998688697815</property>
     <property name="stock">gtk-add</property>
   </object>
   <object class="GtkImage" id="image3">
@@ -234,7 +234,7 @@
       </object>
     </child>
     <child>
-      <object class="GtkMenuItem" id="menuitem2">
+      <object class="GtkMenuItem" id="gegl">
         <property name="use_action_appearance">False</property>
         <property name="visible">True</property>
         <property name="can_focus">False</property>
@@ -252,6 +252,7 @@
                 <property name="tooltip_text" translatable="yes">Auto-arrange graph nodes using the 'dot' algorithm from GraphVis</property>
                 <property name="label" translatable="yes">Arrange</property>
                 <property name="use_underline">True</property>
+                <signal name="activate" handler="activated_arrange" swapped="no"/>
               </object>
             </child>
             <child>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]