dia r4214 - in trunk: . lib objects/UML
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r4214 - in trunk: . lib objects/UML
- Date: Sat, 24 Jan 2009 13:32:37 +0000 (UTC)
Author: hans
Date: Sat Jan 24 13:32:36 2009
New Revision: 4214
URL: http://svn.gnome.org/viewvc/dia?rev=4214&view=rev
Log:
2009-01-23 Hans Breuer <hans breuer org>
* objects/UML/fork.c : fix property get/set by using the right
methods, not object_return_void/object_return_null, bug #568524
* lib/object.[ch] lib/libdia.def : remove object_return_* helpers.
They are not used anymore now and were causing more harm than good.
* lib/diarenderer.h : moved draw_rounded_polyline to the high-level
methods of DiaRenderer, which are seldom implemented by "normal"
renderers
* lib/diarenderer.c : just coding style
* lib/plug-ins.h : bump DIA_PLUGIN_API_VERSION for all of the above
Modified:
trunk/ChangeLog
trunk/lib/diagramdata.c
trunk/lib/diarenderer.h
trunk/lib/libdia.def
trunk/lib/object.c
trunk/lib/object.h
trunk/lib/plug-ins.h
trunk/objects/UML/fork.c
Modified: trunk/lib/diagramdata.c
==============================================================================
--- trunk/lib/diagramdata.c (original)
+++ trunk/lib/diagramdata.c Sat Jan 24 13:32:36 2009
@@ -616,7 +616,8 @@
int i;
int active_layer;
- if (!renderer->is_interactive) (DIA_RENDERER_GET_CLASS(renderer)->begin_render)(renderer);
+ if (!renderer->is_interactive)
+ (DIA_RENDERER_GET_CLASS(renderer)->begin_render)(renderer);
for (i=0; i<data->layers->len; i++) {
layer = (Layer *) g_ptr_array_index(data->layers, i);
@@ -625,7 +626,8 @@
layer_render(layer, renderer, update, obj_renderer, gdata, active_layer);
}
- if (!renderer->is_interactive) (DIA_RENDERER_GET_CLASS(renderer)->end_render)(renderer);
+ if (!renderer->is_interactive)
+ (DIA_RENDERER_GET_CLASS(renderer)->end_render)(renderer);
}
void
Modified: trunk/lib/diarenderer.h
==============================================================================
--- trunk/lib/diarenderer.h (original)
+++ trunk/lib/diarenderer.h Sat Jan 24 13:32:36 2009
@@ -178,11 +178,6 @@
void (*draw_polyline) (DiaRenderer *renderer,
Point *points, int num_points,
Color *color);
- /*! Draw a line joining multiple points, using color and the current
- line style with rounded corners between segments */
- void (*draw_rounded_polyline) (DiaRenderer *renderer,
- Point *points, int num_points,
- Color *color, real radius );
/*! Draw a polygone, using the current line style
The polygon is closed even if the first point is not the same as the
last point */
@@ -213,6 +208,11 @@
void (*fill_rounded_rect) (DiaRenderer *renderer,
Point *ul_corner, Point *lr_corner,
Color *color, real radius);
+ /*! Draw a line joining multiple points, using color and the current
+ line style with rounded corners between segments */
+ void (*draw_rounded_polyline) (DiaRenderer *renderer,
+ Point *points, int num_points,
+ Color *color, real radius );
/*! Highest level function doing specific arrow positioning */
void (*draw_line_with_arrows) (DiaRenderer *renderer,
Modified: trunk/lib/libdia.def
==============================================================================
--- trunk/lib/libdia.def (original)
+++ trunk/lib/libdia.def Sat Jan 24 13:32:36 2009
@@ -500,8 +500,6 @@
object_remove_connectionpoint
object_remove_connections_to
object_remove_handle
- object_return_null
- object_return_void
object_save
object_save_props
object_save_using_properties
Modified: trunk/lib/object.c
==============================================================================
--- trunk/lib/object.c (original)
+++ trunk/lib/object.c Sat Jan 24 13:32:36 2009
@@ -786,35 +786,6 @@
return (obj->flags & flags) == flags;
}
-/** Utility function that always returns FALSE given any object.
- * @param obj Not used.
- * @return FALSE
- */
-int
-object_return_false(DiaObject *obj)
-{
- return FALSE;
-}
-
-/** Utility function that always returns NULL given any object.
- * @param obj Not used.
- * @return NULL
- */
-void *
-object_return_null(DiaObject *obj)
-{
- return NULL;
-}
-
-/** Utility function that always returns nothing given any object.
- * @param obj Not used.
- */
-void
-object_return_void(DiaObject *obj)
-{
- return;
-}
-
/** Load an object from XML based on its properties.
* This function is suitable for implementing the object load function
* for an object with normal attributes. Any version-dependent handling
Modified: trunk/lib/object.h
==============================================================================
--- trunk/lib/object.h (original)
+++ trunk/lib/object.h Sat Jan 24 13:32:36 2009
@@ -384,10 +384,6 @@
gchar *object_get_displayname (DiaObject* obj);
gboolean object_flags_set(DiaObject* obj, gint flags);
-int object_return_false(DiaObject *obj); /* Just returns FALSE */
-void *object_return_null(DiaObject *obj); /* Just returns NULL */
-void object_return_void(DiaObject *obj); /* Just an empty function */
-
/* These functions can be used as a default implementation for an object which
can be completely described, loaded and saved through standard properties.
*/
Modified: trunk/lib/plug-ins.h
==============================================================================
--- trunk/lib/plug-ins.h (original)
+++ trunk/lib/plug-ins.h Sat Jan 24 13:32:36 2009
@@ -48,7 +48,7 @@
* The list is by no means complete. If in doubt about your change
* please ask on dia-list or alternative increment ;-) --hb
*/
-#define DIA_PLUGIN_API_VERSION 10
+#define DIA_PLUGIN_API_VERSION 11
typedef enum {
DIA_PLUGIN_INIT_OK,
Modified: trunk/objects/UML/fork.c
==============================================================================
--- trunk/objects/UML/fork.c (original)
+++ trunk/objects/UML/fork.c Sat Jan 24 13:32:36 2009
@@ -101,8 +101,8 @@
(CopyFunc) object_copy_using_properties,
(MoveFunc) fork_move,
(MoveHandleFunc) fork_move_handle,
- (GetPropertiesFunc) object_return_null,
- (ApplyPropertiesDialogFunc) object_return_void,
+ (GetPropertiesFunc) object_create_props_dialog,
+ (ApplyPropertiesDialogFunc) object_apply_props_from_dialog,
(ObjectMenuFunc) NULL,
(DescribePropsFunc) fork_describe_props,
(GetPropsFunc) fork_get_props,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]