[gimp/soc-2009-dynamics] Debug dynamics editor, and solve many bugs.



commit 4da7c67406fc15d635cad875ccd01e18785a87f2
Author: zhenfeng zhao <zhzzf_0808 hotmail com>
Date:   Sun Aug 2 17:18:09 2009 -0300

    Debug dynamics editor, and solve many bugs.

 app/dialogs/dialogs-constructors.c |    5 ++-
 app/widgets/gimpdynamicseditor.c   |   48 +++++++++++++++++++++---------------
 app/widgets/gimpdynamicseditor.h   |    5 ++-
 devel-docs/app/app-sections.txt    |   16 ++++++++++++
 4 files changed, 50 insertions(+), 24 deletions(-)
---
diff --git a/app/dialogs/dialogs-constructors.c b/app/dialogs/dialogs-constructors.c
index 6babfbf..68abf8c 100644
--- a/app/dialogs/dialogs-constructors.c
+++ b/app/dialogs/dialogs-constructors.c
@@ -675,8 +675,9 @@ dialogs_dynamics_editor_get (GimpDialogFactory *factory,
                           GimpContext       *context,
                           gint               view_size)
 {
-  return gimp_dynamics_editor_new (context,
-                                factory->menu_factory);
+  return gimp_dynamics_editor_new (factory->menu_factory);
+  //return gimp_dynamics_editor_new (context,
+  //                              factory->menu_factory);
 }
 
 GtkWidget *
diff --git a/app/widgets/gimpdynamicseditor.c b/app/widgets/gimpdynamicseditor.c
index e81d554..7374f2e 100644
--- a/app/widgets/gimpdynamicseditor.c
+++ b/app/widgets/gimpdynamicseditor.c
@@ -28,16 +28,23 @@
 #include "widgets-types.h"
 
 #include "core/gimp.h"
-#include "core/gimpbrushgenerated.h"
+//#include "core/gimpbrushgenerated.h"
 #include "core/gimpcontext.h"
 
-#include "gimpbrusheditor.h"
 #include "gimpdocked.h"
 #include "gimpview.h"
 #include "gimpviewrenderer.h"
 
 #include "gimp-intl.h"
 
+#include "gimpdynamicseditor.h"
+//To do: 
+// discard unneeded ones. 
+// needs to be fixed to gimppaintdynamics.h when that works.
+
+/*
+#include "paint/gimppaintoptions.h"
+ 
 #include "core/gimptoolinfo.h"
 
 #include "widgets/gimppropwidgets.h"
@@ -57,13 +64,7 @@
 #include "tools/gimpsmudgetool.h"
 #include "tools/gimptooloptions-gui.h"
 
-//To do: 
-// discard unneeded ones. 
-// needs to be fixed to gimppaintdynamics.h when that works.
-#include "paint/gimppaintoptions.h"
-#include "gimpdynamicseditor.h"
-
-
+*/
 
 
 /*  local function prototypes  */
@@ -81,7 +82,7 @@ static void   gimp_dynamics_editor_set_context    (GimpDocked         *docked,
                                                    GimpContext        *context);
 
 /*dynamics options gui*/
-
+/*
 static gboolean    tool_has_opacity_dynamics      (GType       tool_type);
 static gboolean    tool_has_hardness_dynamics     (GType       tool_type);
 static gboolean    tool_has_rate_dynamics         (GType       tool_type);
@@ -111,12 +112,12 @@ static void        random_options_gui    (GimpPaintOptions *paint_options,
                                           GType             tool_type,
                                           GtkTable         *table,
                                           gint              row);
-/**/
+
 static void        fading_options_gui    (GimpPaintOptions *paint_options,
                                           GType             tool_type,
                                           GtkTable         *table,
                                           gint              row);
-/**/
+*/
 
 
 G_DEFINE_TYPE_WITH_CODE (GimpDynamicsEditor, gimp_dynamics_editor,
@@ -175,9 +176,6 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
   gtk_widget_show (frame);
 	
 }
-
-
-
 	
 static GObject *
 gimp_dynamics_editor_constructor (GType                  type,
@@ -209,25 +207,35 @@ gimp_dynamics_editor_set_context (GimpDocked  *docked,
 
 
 GtkWidget *
-gimp_dynamics_editor_new (GimpContext     *context,
-                          GimpMenuFactory *menu_factory)
+gimp_dynamics_editor_new (GimpMenuFactory *menu_factory)
+//gimp_dynamics_editor_new (GimpContext     *context,
+//                          GimpMenuFactory *menu_factory)
 {
-  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
+  g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
+  //g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
 
   return g_object_new (GIMP_TYPE_DYNAMICS_EDITOR,
                        "menu-factory",    menu_factory,
                        "menu-identifier", "<DynamicsEditor>",
                        "ui-path",         "/dynamics-editor-popup",
+                       NULL);
+
+/*
+  return g_object_new (GIMP_TYPE_DYNAMICS_EDITOR,
+                       "menu-factory",    menu_factory,
+                       "menu-identifier", "<DynamicsEditor>",
+                       "ui-path",         "/dynamics-editor-popup",
                        "data-factory",    context->gimp->brush_factory,
                        "context",         context,
                        "data",            gimp_context_get_brush (context),
                        NULL);
+*/
 }
 
 
 
 /*  private functions  */
-
+/*
 static gboolean
 tool_has_opacity_dynamics (GType tool_type)
 {
@@ -720,7 +728,7 @@ fading_options_gui (GimpPaintOptions *paint_options,
    gtk_widget_show (scalebutton);
 }
 
-
+*/
 /*
 GtkWidget *
 gimp_paint_options_gui (GimpToolOptions *tool_options)
diff --git a/app/widgets/gimpdynamicseditor.h b/app/widgets/gimpdynamicseditor.h
index eb0e97c..edcc0ea 100644
--- a/app/widgets/gimpdynamicseditor.h
+++ b/app/widgets/gimpdynamicseditor.h
@@ -50,8 +50,9 @@ struct _GimpDynamicsEditorClass
 
 GType       gimp_dynamics_editor_get_type (void) G_GNUC_CONST;
 
-GtkWidget * gimp_dynamics_editor_new       (GimpContext      *context,
-                                            GimpMenuFactory  *menu_factory);
+GtkWidget * gimp_dynamics_editor_new (GimpMenuFactory *menu_factory)
+//gimp_dynamics_editor_new       (GimpContext      *context,
+//                                            GimpMenuFactory  *menu_factory);
 
 
 
diff --git a/devel-docs/app/app-sections.txt b/devel-docs/app/app-sections.txt
index a5048cf..a33f1f2 100644
--- a/devel-docs/app/app-sections.txt
+++ b/devel-docs/app/app-sections.txt
@@ -5615,6 +5615,22 @@ GIMP_BLOB_EDITOR_GET_CLASS
 </SECTION>
 
 <SECTION>
+<FILE>gimpdynamicseditor</FILE>
+<TITLE>GimpDynamicsEditor</TITLE>
+GimpDynamicsEditor
+gimp_dynamics_editor_new
+<SUBSECTION Standard>
+GimpDynamicsEditorClass
+GIMP_Dynamics_EDITOR
+GIMP_IS_DYNAMICS_EDITOR
+GIMP_TYPE_DYNAMICS_EDITOR
+gimp_dynamics_editor_get_type
+GIMP_DYNAMICS_EDITOR_CLASS
+GIMP_IS_DYNAMICS_EDITOR_CLASS
+GIMP_DYNAMICS_EDITOR_GET_CLASS
+</SECTION>
+
+<SECTION>
 <FILE>gimpbrusheditor</FILE>
 <TITLE>GimpBrushEditor</TITLE>
 GimpBrushEditor



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