[gimp/soc-2009-dynamics] Solve errors in gimpcontext for dynamics.
- From: zhenfeng zhao <zhenfengz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Solve errors in gimpcontext for dynamics.
- Date: Wed, 19 Aug 2009 01:39:50 +0000 (UTC)
commit 6aa4d553150de754a77b517e5aa4c9d741a4d787
Author: zhenfeng zhao <zhzzf_0808 hotmail com>
Date: Tue Aug 18 22:38:45 2009 -0300
Solve errors in gimpcontext for dynamics.
app/core/core-enums.h | 1 +
app/core/gimpcontext.c | 19 ++++++++++---------
app/core/gimpcontext.h | 7 -------
app/widgets/gimpdynamicseditor.c | 12 +++++++-----
4 files changed, 18 insertions(+), 21 deletions(-)
---
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index fac35c8..e79a2f9 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -608,6 +608,7 @@ typedef enum /*< pdb-skip, skip >*/
GIMP_CONTEXT_PROP_BUFFER = 15,
GIMP_CONTEXT_PROP_IMAGEFILE = 16,
GIMP_CONTEXT_PROP_TEMPLATE = 17,
+ GIMP_CONTEXT_PROP_DYNAMICS = 18,
GIMP_CONTEXT_LAST_PROP = GIMP_CONTEXT_PROP_TEMPLATE
} GimpContextPropType;
diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c
index 8cb7c00..b0a2fc6 100644
--- a/app/core/gimpcontext.c
+++ b/app/core/gimpcontext.c
@@ -165,7 +165,7 @@ static void gimp_context_real_set_brush (GimpContext *context,
static void gimp_context_dynamics_dirty (GimpDynamicsOptions *dynamics,
GimpContext *context);
-static void gimp_context_dynamics_removed (GimpContainer *dynamics_list,
+static void gimp_context_dynamics_removed (GimpContainer *container,
GimpDynamicsOptions *dynamics,
GimpContext *context);
static void gimp_context_dynamics_list_thaw (GimpContainer *container,
@@ -348,6 +348,7 @@ static guint gimp_context_signals[LAST_SIGNAL] = { 0 };
static GimpToolInfo *standard_tool_info = NULL;
static GimpPaintInfo *standard_paint_info = NULL;
static GimpBrush *standard_brush = NULL;
+static GimpDynamicsOptions *standard_dynamics = NULL;
static GimpPattern *standard_pattern = NULL;
static GimpGradient *standard_gradient = NULL;
static GimpPalette *standard_palette = NULL;
@@ -2469,7 +2470,7 @@ gimp_context_real_set_brush (GimpContext *context,
/* dynamics *****************************************************************/
-GimpBrush *
+GimpDynamicsOptions *
gimp_context_get_dynamics (GimpContext *context)
{
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -2482,7 +2483,7 @@ gimp_context_set_dynamics (GimpContext *context,
GimpDynamicsOptions *dynamics)
{
g_return_if_fail (GIMP_IS_CONTEXT (context));
- g_return_if_fail (! dynamics || GIMP_IS_DYNAMICS (dynamics));
+ g_return_if_fail (! dynamics || GIMP_IS_DYNAMICS_OPTIONS (dynamics));
context_find_defined (context, GIMP_CONTEXT_PROP_DYNAMICS);
gimp_context_real_set_dynamics (context, dynamics);
@@ -2506,9 +2507,9 @@ gimp_context_dynamics_dirty (GimpDynamicsOptions *dynamics,
context->dynamics_name = g_strdup (GIMP_OBJECT (dynamics)->name);
}
-static void gimp_context_dynamics_removed (GimpContainer *dynamics_list,
+static void gimp_context_dynamics_removed (GimpContainer *container,
GimpDynamicsOptions *dynamics,
- GimpContext *context);
+ GimpContext *context)
{
if (dynamics == context->dynamics)
{
@@ -2526,7 +2527,7 @@ static void gimp_context_dynamics_removed (GimpContainer *dynamics_list,
static void gimp_context_dynamics_list_thaw (GimpContainer *container,
- GimpContext *context);
+ GimpContext *context)
{
GimpDynamicsOptions *dynamics;
/*
@@ -2545,9 +2546,9 @@ static void
gimp_context_real_set_dynamics (GimpContext *context,
GimpDynamicsOptions *dynamics)
{
-/* if (! standard_dynamics)
- standard_dynamics = GIMP_BRUSH (gimp_dynamics_get_standard ());
-*/
+ if (! standard_dynamics)
+ standard_dynamics = GIMP_DYNAMICS_OPTIONS (gimp_dynamics_get_standard ());
+
if (context->dynamics == dynamics)
return;
diff --git a/app/core/gimpcontext.h b/app/core/gimpcontext.h
index 613ec98..60ef256 100644
--- a/app/core/gimpcontext.h
+++ b/app/core/gimpcontext.h
@@ -262,13 +262,6 @@ void gimp_context_set_brush (GimpContext *context,
GimpBrush *brush);
void gimp_context_brush_changed (GimpContext *context);
-/* brush */
-GimpBrush * gimp_context_get_brush (GimpContext *context);
-void gimp_context_set_brush (GimpContext *context,
- GimpBrush *brush);
-void gimp_context_brush_changed (GimpContext *context);
-
-
/* dynamics */
GimpDynamicsOptions * gimp_context_get_dynamics (GimpContext *context);
void gimp_context_set_dynamics (GimpContext *context,
diff --git a/app/widgets/gimpdynamicseditor.c b/app/widgets/gimpdynamicseditor.c
index 1296505..87ebd91 100644
--- a/app/widgets/gimpdynamicseditor.c
+++ b/app/widgets/gimpdynamicseditor.c
@@ -17,6 +17,7 @@
*/
+
#define DYNAMICS_VIEW_SIZE 96
#include "config.h"
@@ -170,9 +171,9 @@ static void
gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
{
GimpDataEditor *data_editor = GIMP_DATA_EDITOR (editor);
-
GtkWidget *frame;
- GtkWidget *box;
+
+/*GtkWidget *box;
gint row = 0;
GtkWidget *table;
GtkWidget *menu;
@@ -183,6 +184,7 @@ gimp_dynamics_editor_init (GimpDynamicsEditor *editor)
gint n_dynamics = 0;
GtkWidget *dynamics_labels[7];
GType tool_type;
+*/
//add a frame
frame = gtk_frame_new (NULL);
@@ -281,9 +283,9 @@ gimp_dynamics_editor_new (GimpContext *context,
"ui-path", "/dynamics-editor-popup",
"data-factory", context->gimp->dynamics_factory,
"context", context,
- "data", gimp_context_get_dynamics (context),*/
+ "data", gimp_context_get_dynamics (context),
NULL);
-
+ /*
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *menu;
@@ -296,7 +298,7 @@ gimp_dynamics_editor_new (GimpContext *context,
GType tool_type;
//tool_type = tool_options->tool_info->tool_type;
-
+*/
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]