[gimp/soc-2009-dynamics] Make the dynamics editor build and move the commented out mess to the end of the file.
- From: Alexia Death <alexiade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Make the dynamics editor build and move the commented out mess to the end of the file.
- Date: Fri, 21 Aug 2009 18:14:49 +0000 (UTC)
commit 0a90a7570538959e46fed9f1a4d8cab6e0edc9d9
Author: Alexia Death <alexiadeath gmail com>
Date: Fri Aug 21 21:14:23 2009 +0300
Make the dynamics editor build and move the commented out mess to the end of the file.
app/widgets/gimpdynamicseditor.c | 286 +++++++++++++++++++------------------
1 files changed, 147 insertions(+), 139 deletions(-)
---
diff --git a/app/widgets/gimpdynamicseditor.c b/app/widgets/gimpdynamicseditor.c
index a7d924d..e086aed 100644
--- a/app/widgets/gimpdynamicseditor.c
+++ b/app/widgets/gimpdynamicseditor.c
@@ -45,33 +45,6 @@
#include "widgets/gimpdynamicseditor.h"
#include "core/gimpdynamics.h"
#include "core/gimpbrush.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"
-#include "widgets/gimpviewablebox.h"
-#include "widgets/gimpwidgets-utils.h"
-
-#include "tools/gimpairbrushtool.h"
-#include "tools/gimpclonetool.h"
-#include "tools/gimpconvolvetool.h"
-#include "tools/gimpdodgeburntool.h"
-#include "tools/gimperasertool.h"
-#include "tools/gimphealtool.h"
-#include "tools/gimpinktool.h"
-#include "tools/gimppaintoptions-gui.h"
-#include "tools/gimppenciltool.h"
-#include "tools/gimpperspectiveclonetool.h"
-#include "tools/gimpsmudgetool.h"
-#include "tools/gimptooloptions-gui.h"
-
-*/
/* local function prototypes */
@@ -88,44 +61,6 @@ static GObject * gimp_dynamics_editor_constructor (GType type,
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);
-static gboolean tool_has_size_dynamics (GType tool_type);
-static gboolean tool_has_color_dynamics (GType tool_type);
-static gboolean tool_has_angle_dynamics (GType tool_type);
-static gboolean tool_has_aspect_ratio_dynamics (GType tool_type);
-
-static void pressure_options_gui (GimpPaintOptions *paint_options,
- GType tool_type,
- GtkTable *table,
- gint row,
- GtkWidget *labels[]);
-static void velocity_options_gui (GimpPaintOptions *paint_options,
- GType tool_type,
- GtkTable *table,
- gint row);
-static void direction_options_gui (GimpPaintOptions *paint_options,
- GType tool_type,
- GtkTable *table,
- gint row);
-static void tilt_options_gui (GimpPaintOptions *paint_options,
- GType tool_type,
- GtkTable *table,
- gint row);
-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,
GIMP_TYPE_DATA_EDITOR,
@@ -160,6 +95,55 @@ gimp_dynamics_editor_docked_iface_init (GimpDockedInterface *iface)
iface->set_context = gimp_dynamics_editor_set_context;
}
+
+
+static GObject *
+gimp_dynamics_editor_constructor (GType type,
+ guint n_params,
+ GObjectConstructParam *params)
+{
+ GObject *object;
+
+ object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+
+ gimp_docked_set_show_button_bar (GIMP_DOCKED (object), FALSE);
+
+ return object;
+}
+
+static void
+gimp_dynamics_editor_set_context (GimpDocked *docked,
+ GimpContext *context)
+{
+ GimpDataEditor *data_editor = GIMP_DATA_EDITOR (docked);
+
+ parent_docked_iface->set_context (docked, context);
+
+ gimp_view_renderer_set_context (GIMP_VIEW (data_editor->view)->renderer,
+ context);
+}
+
+/* public functions */
+
+
+GtkWidget *
+gimp_dynamics_editor_new (GimpContext *context,
+ GimpMenuFactory *menu_factory)
+{
+ 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",
+ "data-factory", context->gimp->dynamics_factory,
+ "context", context,
+ "data", gimp_context_get_dynamics (context),
+ NULL);
+
+}
+
/*
To do:
look at other init for dataeditors
@@ -172,30 +156,12 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
{
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
GtkWidget *vbox;
-
+
GtkWidget *table;
GtkWidget *label;
gint n_dynamics = 0;
-/*
- GtkWidget *dynamics_labels[7];
- GtkWidget *frame;
- GtkWidget *box;
- gint row = 0;
- GtkWidget *menu;
- GtkWidget *button;
- GtkWidget *incremental_toggle = NULL;
- gint table_row = 0;
- GType tool_type;
-*/
-/*
- //add a frame
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
- gtk_widget_show (frame);
-*/
- vbox = gtk_vbox_new (FALSE, 6);
+vbox = gtk_vbox_new (FALSE, 6);
//gtk_box_pack_start (GTK_BOX (editor), vbox, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (data_editor), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
@@ -220,11 +186,6 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
gint i;
gboolean rtl = gtk_widget_get_direction (vbox) == GTK_TEXT_DIR_RTL;
- //frame = gimp_prop_expander_new (config, "dynamics-expanded",
- // _("Brush Dynamics"));
-/* gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
- gtk_widget_show (frame);
-*/
inner_frame = gimp_frame_new (NULL);
gtk_container_add (GTK_CONTAINER (vbox), inner_frame);
gtk_widget_show (inner_frame);
@@ -269,6 +230,18 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (label);
+ }
+
+}
+
+/* SCRAPS! */
+
+
+ //frame = gimp_prop_expander_new (config, "dynamics-expanded",
+ // _("Brush Dynamics"));
+/* gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
+ gtk_widget_show (frame);
+*/
/*
//editor->shape_group = NULL;
@@ -306,56 +279,25 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
_("Opacity:"));
*/
-}
-
-static GObject *
-gimp_dynamics_editor_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GObject *object;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- gimp_docked_set_show_button_bar (GIMP_DOCKED (object), FALSE);
-
- return object;
-}
-
-static void
-gimp_dynamics_editor_set_context (GimpDocked *docked,
- GimpContext *context)
-{
- GimpDataEditor *data_editor = GIMP_DATA_EDITOR (docked);
-
- parent_docked_iface->set_context (docked, context);
-
- gimp_view_renderer_set_context (GIMP_VIEW (data_editor->view)->renderer,
- context);
-}
-
-/* public functions */
-
-
-GtkWidget *
-gimp_dynamics_editor_new (GimpContext *context,
- GimpMenuFactory *menu_factory)
-{
- 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",
- "data-factory", context->gimp->dynamics_factory,
- "context", context,
- "data", gimp_context_get_dynamics (context),
- NULL);
-
-}
-
+/*
+ GtkWidget *dynamics_labels[7];
+ GtkWidget *frame;
+ GtkWidget *box;
+ gint row = 0;
+ GtkWidget *menu;
+ GtkWidget *button;
+ GtkWidget *incremental_toggle = NULL;
+ gint table_row = 0;
+ GType tool_type;
+*/
+/*
+ //add a frame
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
+ gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
+ gtk_widget_show (frame);
+*/
/* private functions */
/*
@@ -872,3 +814,69 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
GType tool_type;
}
*/
+
+
+/*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);
+static gboolean tool_has_size_dynamics (GType tool_type);
+static gboolean tool_has_color_dynamics (GType tool_type);
+static gboolean tool_has_angle_dynamics (GType tool_type);
+static gboolean tool_has_aspect_ratio_dynamics (GType tool_type);
+
+static void pressure_options_gui (GimpPaintOptions *paint_options,
+ GType tool_type,
+ GtkTable *table,
+ gint row,
+ GtkWidget *labels[]);
+static void velocity_options_gui (GimpPaintOptions *paint_options,
+ GType tool_type,
+ GtkTable *table,
+ gint row);
+static void direction_options_gui (GimpPaintOptions *paint_options,
+ GType tool_type,
+ GtkTable *table,
+ gint row);
+static void tilt_options_gui (GimpPaintOptions *paint_options,
+ GType tool_type,
+ GtkTable *table,
+ gint row);
+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);
+*/
+//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"
+#include "widgets/gimpviewablebox.h"
+#include "widgets/gimpwidgets-utils.h"
+
+#include "tools/gimpairbrushtool.h"
+#include "tools/gimpclonetool.h"
+#include "tools/gimpconvolvetool.h"
+#include "tools/gimpdodgeburntool.h"
+#include "tools/gimperasertool.h"
+#include "tools/gimphealtool.h"
+#include "tools/gimpinktool.h"
+#include "tools/gimppaintoptions-gui.h"
+#include "tools/gimppenciltool.h"
+#include "tools/gimpperspectiveclonetool.h"
+#include "tools/gimpsmudgetool.h"
+#include "tools/gimptooloptions-gui.h"
+
+*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]