Flush
svn path=/trunk/diacanvas-sharp/; revision=18520
This commit is contained in:
Родитель
a35cc38975
Коммит
00344e48b1
|
@ -1,20 +0,0 @@
|
|||
--- dia-canvas-group.c 2003-01-14 19:41:42.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/src/dia-canvas-group.c 2003-07-19 11:15:19.000000000 +0200
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/* unref all children */
|
||||
while (group->children)
|
||||
- dia_canvas_groupable_remove (DIA_CANVAS_ITEM (group),
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (group),
|
||||
group->children->data);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
@@ -344,7 +344,7 @@
|
||||
DIA_CANVAS_ITEM (group)->canvas->allow_undo = old_allow_undo;
|
||||
|
||||
if (!item->parent)
|
||||
- dia_canvas_groupable_add (DIA_CANVAS_ITEM (group), item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (group), item);
|
||||
|
||||
/* We unref the item since the 'add' method did ref it. If it was
|
||||
* not ref'ed we destroy it this way... */
|
|
@ -1,223 +0,0 @@
|
|||
--- dia-canvas-item.c 2003-03-13 20:17:00.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/src/dia-canvas-item.c 2003-07-19 11:13:28.000000000 +0200
|
||||
@@ -286,11 +286,11 @@
|
||||
break;
|
||||
g_object_ref (item);
|
||||
if (item->parent != NULL)
|
||||
- dia_canvas_groupable_remove (item->parent, item);
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (item->parent), item);
|
||||
if (parent && item->parent == NULL) {
|
||||
g_assert (DIA_IS_CANVAS_GROUPABLE (parent));
|
||||
//g_message (__FUNCTION__": setting new parent.");
|
||||
- dia_canvas_groupable_add (parent, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (parent), item);
|
||||
}
|
||||
g_object_unref (item);
|
||||
break;
|
||||
@@ -384,7 +384,7 @@
|
||||
#endif
|
||||
|
||||
if (item->parent)
|
||||
- dia_canvas_groupable_remove_destruction (item->parent, item);
|
||||
+ dia_canvas_groupable_remove_destruction (DIA_CANVAS_GROUPABLE (item->parent), item);
|
||||
|
||||
#ifdef ENABLE_DEBUG
|
||||
g_assert (item->parent == NULL);
|
||||
@@ -596,11 +596,11 @@
|
||||
DiaCanvasIter iter;
|
||||
DiaCanvasItem *child;
|
||||
|
||||
- if (dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
- child = dia_canvas_groupable_value (item, &iter);
|
||||
+ if (dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
+ child = dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter);
|
||||
if (child)
|
||||
dia_canvas_item_set_parent (child, item);
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
}
|
||||
g_object_thaw_notify (G_OBJECT (item));
|
||||
}
|
||||
@@ -651,9 +651,9 @@
|
||||
|
||||
if (DIA_IS_CANVAS_GROUPABLE (item)) {
|
||||
DiaCanvasIter iter;
|
||||
- if (dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
- request_update_for_children (dia_canvas_groupable_value (item, &iter));
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ if (dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
+ request_update_for_children (dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1586,8 +1586,8 @@
|
||||
DiaCanvasIter iter;
|
||||
DiaCanvasItem *child;
|
||||
|
||||
- if (dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
- child = dia_canvas_groupable_value (item, &iter);
|
||||
+ if (dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
+ child = dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter);
|
||||
if (child) {
|
||||
if (child->canvas)
|
||||
g_object_remove_weak_pointer
|
||||
@@ -1601,7 +1601,7 @@
|
||||
//dia_canvas_item_request_update (child);
|
||||
set_canvas_for_children (child);
|
||||
}
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1615,17 +1615,17 @@
|
||||
*
|
||||
**/
|
||||
void
|
||||
-dia_canvas_groupable_add_construction (DiaCanvasItem *group,
|
||||
+dia_canvas_groupable_add_construction (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item)
|
||||
{
|
||||
g_return_if_fail (DIA_IS_CANVAS_GROUPABLE (group));
|
||||
g_return_if_fail (DIA_IS_CANVAS_ITEM (item));
|
||||
g_return_if_fail (item->parent == NULL);
|
||||
- g_return_if_fail (item->parent != group);
|
||||
+ g_return_if_fail (item->parent != DIA_CANVAS_ITEM (group));
|
||||
if (DIA_CANVAS_ITEM_COMPOSITE (group))
|
||||
g_return_if_fail (DIA_CANVAS_ITEM_COMPOSITE (item));
|
||||
|
||||
- dia_canvas_item_set_parent (item, group);
|
||||
+ dia_canvas_item_set_parent (item, DIA_CANVAS_ITEM (group));
|
||||
|
||||
/* First set the canvas, so undo info can be saved... */
|
||||
//item->canvas = group->canvas;
|
||||
@@ -1671,13 +1671,13 @@
|
||||
* Return value: %TRUE if the addition was successful, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
-dia_canvas_groupable_add (DiaCanvasItem *group, DiaCanvasItem *item)
|
||||
+dia_canvas_groupable_add (DiaCanvasGroupable *group, DiaCanvasItem *item)
|
||||
{
|
||||
gboolean retval = FALSE;
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_GROUPABLE (group), FALSE);
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_ITEM (item), FALSE);
|
||||
g_return_val_if_fail (item->parent == NULL, FALSE);
|
||||
- g_return_val_if_fail (item->parent != group, FALSE);
|
||||
+ g_return_val_if_fail (item->parent != DIA_CANVAS_ITEM (group), FALSE);
|
||||
|
||||
g_signal_emit_by_name (group, "add", item, &retval);
|
||||
|
||||
@@ -1700,12 +1700,12 @@
|
||||
* This function should only be used in #DiaCanvasItem deriviates.
|
||||
**/
|
||||
void
|
||||
-dia_canvas_groupable_remove_destruction (DiaCanvasItem *group,
|
||||
+dia_canvas_groupable_remove_destruction (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item)
|
||||
{
|
||||
g_return_if_fail (DIA_IS_CANVAS_GROUPABLE (group));
|
||||
g_return_if_fail (DIA_IS_CANVAS_ITEM (item));
|
||||
- g_return_if_fail (item->parent == group);
|
||||
+ g_return_if_fail (item->parent == DIA_CANVAS_ITEM (group));
|
||||
|
||||
dia_canvas_item_set_parent (item, NULL);
|
||||
|
||||
@@ -1726,12 +1726,12 @@
|
||||
* Return value: %TRUE if the removal was successful, %FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
-dia_canvas_groupable_remove (DiaCanvasItem *group, DiaCanvasItem *item)
|
||||
+dia_canvas_groupable_remove (DiaCanvasGroupable *group, DiaCanvasItem *item)
|
||||
{
|
||||
gboolean retval = FALSE;
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_ITEM (group), FALSE);
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_ITEM (item), FALSE);
|
||||
- g_return_val_if_fail (item->parent == group, FALSE);
|
||||
+ g_return_val_if_fail (item->parent == DIA_CANVAS_ITEM (group), FALSE);
|
||||
|
||||
g_object_ref (item);
|
||||
g_signal_emit_by_name (group, "remove", item, &retval);
|
||||
@@ -1757,7 +1757,7 @@
|
||||
* Return value: FALSE if no iterator is set, TRUE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
-dia_canvas_groupable_get_iter (DiaCanvasItem *group, DiaCanvasIter *iter)
|
||||
+dia_canvas_groupable_get_iter (DiaCanvasGroupable *group, DiaCanvasIter *iter)
|
||||
{
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_GROUPABLE (group), FALSE);
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
@@ -1768,7 +1768,7 @@
|
||||
iter->data[2] = NULL;
|
||||
iter->stamp = 0;
|
||||
|
||||
- return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->get_iter) (group, iter);
|
||||
+ return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->get_iter) (DIA_CANVAS_ITEM (group), iter);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1781,13 +1781,13 @@
|
||||
* Return value: TRUE if the iterator points to a valif object, FALSE otherwise.
|
||||
**/
|
||||
gboolean
|
||||
-dia_canvas_groupable_next (DiaCanvasItem *group, DiaCanvasIter *iter)
|
||||
+dia_canvas_groupable_next (DiaCanvasGroupable *group, DiaCanvasIter *iter)
|
||||
{
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_GROUPABLE (group), FALSE);
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
g_return_val_if_fail (DIA_CANVAS_GROUPABLE_GET_IFACE (group)->next != NULL, FALSE);
|
||||
|
||||
- return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->next) (group, iter);
|
||||
+ return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->next) (DIA_CANVAS_ITEM (group), iter);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1800,7 +1800,7 @@
|
||||
* Return value: The #DiaCanvasItem pointed to by the iterator.
|
||||
**/
|
||||
DiaCanvasItem*
|
||||
-dia_canvas_groupable_value (DiaCanvasItem *group, DiaCanvasIter *iter)
|
||||
+dia_canvas_groupable_value (DiaCanvasGroupable *group, DiaCanvasIter *iter)
|
||||
{
|
||||
DiaCanvasItem *value = NULL;
|
||||
|
||||
@@ -1808,7 +1808,7 @@
|
||||
g_return_val_if_fail (iter != NULL, NULL);
|
||||
g_return_val_if_fail (DIA_CANVAS_GROUPABLE_GET_IFACE (group)->value != NULL, NULL);
|
||||
|
||||
- value = (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->value) (group, iter);
|
||||
+ value = (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->value) (DIA_CANVAS_ITEM (group), iter);
|
||||
|
||||
g_assert (value == NULL || DIA_IS_CANVAS_ITEM (value));
|
||||
|
||||
@@ -1825,12 +1825,12 @@
|
||||
* Return value: -1 on error.
|
||||
**/
|
||||
gint
|
||||
-dia_canvas_groupable_length (DiaCanvasItem *group)
|
||||
+dia_canvas_groupable_length (DiaCanvasGroupable *group)
|
||||
{
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_GROUPABLE (group), -1);
|
||||
g_return_val_if_fail (DIA_CANVAS_GROUPABLE_GET_IFACE (group)->length != NULL, -1);
|
||||
|
||||
- return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->length) (group);
|
||||
+ return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->length) (DIA_CANVAS_ITEM (group));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1843,13 +1843,13 @@
|
||||
* Return value: Position of @item, -1 on error.
|
||||
**/
|
||||
gint
|
||||
-dia_canvas_groupable_pos (DiaCanvasItem *group, DiaCanvasItem *item)
|
||||
+dia_canvas_groupable_pos (DiaCanvasGroupable *group, DiaCanvasItem *item)
|
||||
{
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_GROUPABLE (group), -1);
|
||||
g_return_val_if_fail (DIA_IS_CANVAS_ITEM (item), -1);
|
||||
g_return_val_if_fail (DIA_CANVAS_GROUPABLE_GET_IFACE (group)->pos != NULL, -1);
|
||||
|
||||
- return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->pos) (group, item);
|
||||
+ return (* DIA_CANVAS_GROUPABLE_GET_IFACE (group)->pos) (DIA_CANVAS_ITEM (group), item);
|
||||
}
|
||||
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
--- dia-canvas-view-item.c 2003-03-18 19:21:22.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/src/dia-canvas-view-item.c 2003-07-19 11:18:50.000000000 +0200
|
||||
@@ -368,7 +368,7 @@
|
||||
gnome_canvas_item_raise (GNOME_CANVAS_ITEM (vitem), positions);
|
||||
|
||||
/* Both items should be on the same position now. */
|
||||
- g_assert (dia_canvas_groupable_pos (item->parent, item) == g_list_index (GNOME_CANVAS_GROUP (GNOME_CANVAS_ITEM (vitem)->parent)->item_list, vitem));
|
||||
+ g_assert (dia_canvas_groupable_pos (DIA_CANVAS_GROUPABLE (item->parent), item) == g_list_index (GNOME_CANVAS_GROUP (GNOME_CANVAS_ITEM (vitem)->parent)->item_list, vitem));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1002,7 +1002,7 @@
|
||||
/* Move the newly created DiaCanvasViewItem to the right place in
|
||||
* the item list (but not for the root item ;-). */
|
||||
if (item->parent) {
|
||||
- item_index = dia_canvas_groupable_pos (item->parent, item);
|
||||
+ item_index = dia_canvas_groupable_pos (DIA_CANVAS_GROUPABLE (item->parent), item);
|
||||
vitem_index = g_list_index (vitem->item_list, new_vitem);
|
||||
|
||||
/* New items are always added on the top, so if the
|
||||
@@ -1018,13 +1018,13 @@
|
||||
|
||||
/* If item itself has children, add them also */
|
||||
if (DIA_IS_CANVAS_GROUPABLE (item)
|
||||
- && dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
- DiaCanvasItem *val = dia_canvas_groupable_value (item, &iter);
|
||||
+ && dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
+ DiaCanvasItem *val = dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter);
|
||||
|
||||
if (val)
|
||||
dia_canvas_view_item_add_items (GNOME_CANVAS_GROUP (new_vitem),
|
||||
val);
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
}
|
||||
|
||||
static gint
|
|
@ -1,23 +0,0 @@
|
|||
--- dia-canvas.c 2003-03-18 19:31:50.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/src/dia-canvas.c 2003-07-19 11:02:30.000000000 +0200
|
||||
@@ -651,9 +651,9 @@
|
||||
|
||||
/* ... And now for the children... */
|
||||
if (DIA_IS_CANVAS_GROUPABLE (item)
|
||||
- && dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
+ && dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
ArtDRect rdest;
|
||||
- DiaCanvasItem *child = dia_canvas_groupable_value (item, &iter);
|
||||
+ DiaCanvasItem *child = dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter);
|
||||
GList *new_objs;
|
||||
gdouble inv[6];
|
||||
|
||||
@@ -663,7 +663,7 @@
|
||||
&rdest);
|
||||
if (new_objs)
|
||||
objs = g_list_concat (objs, new_objs);
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
|
||||
return objs;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
--- dia-canvas.h 2003-01-18 16:27:00.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/src/dia-canvas.h 2003-07-19 10:40:09.000000000 +0200
|
||||
@@ -50,7 +50,7 @@
|
||||
#define DIA_CANVAS_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIA_TYPE_CANVAS_ITEM, DiaCanvasItemClass))
|
||||
|
||||
#define DIA_TYPE_CANVAS_GROUPABLE (dia_canvas_groupable_get_type ())
|
||||
-#define DIA_CANVAS_GROUPABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIA_TYPE_CANVAS_GROUPABLE, DiaCanvasItem))
|
||||
+#define DIA_CANVAS_GROUPABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIA_TYPE_CANVAS_GROUPABLE, DiaCanvasGroupable))
|
||||
#define DIA_IS_CANVAS_GROUPABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIA_TYPE_CANVAS_GROUPABLE))
|
||||
#define DIA_CANVAS_GROUPABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DIA_TYPE_CANVAS_GROUPABLE, DiaCanvasGroupable))
|
||||
|
||||
@@ -583,28 +583,28 @@
|
||||
|
||||
GType dia_canvas_groupable_get_type (void);
|
||||
|
||||
-gboolean dia_canvas_groupable_add (DiaCanvasItem *group,
|
||||
+gboolean dia_canvas_groupable_add (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item);
|
||||
-gboolean dia_canvas_groupable_remove (DiaCanvasItem *group,
|
||||
+gboolean dia_canvas_groupable_remove (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item);
|
||||
|
||||
/* Those methods can be used for compound objects. */
|
||||
-void dia_canvas_groupable_add_construction (DiaCanvasItem *group,
|
||||
+void dia_canvas_groupable_add_construction (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item);
|
||||
-void dia_canvas_groupable_remove_destruction (DiaCanvasItem *group,
|
||||
+void dia_canvas_groupable_remove_destruction (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item);
|
||||
|
||||
/* Z-order is adjusted by dia_canvas_item_raise/lower(). */
|
||||
|
||||
-gboolean dia_canvas_groupable_get_iter (DiaCanvasItem *group,
|
||||
+gboolean dia_canvas_groupable_get_iter (DiaCanvasGroupable *group,
|
||||
DiaCanvasIter *iter);
|
||||
-gboolean dia_canvas_groupable_next (DiaCanvasItem *group,
|
||||
+gboolean dia_canvas_groupable_next (DiaCanvasGroupable *group,
|
||||
DiaCanvasIter *iter);
|
||||
-DiaCanvasItem* dia_canvas_groupable_value (DiaCanvasItem *group,
|
||||
+DiaCanvasItem* dia_canvas_groupable_value (DiaCanvasGroupable *group,
|
||||
DiaCanvasIter *iter);
|
||||
|
||||
-gint dia_canvas_groupable_length (DiaCanvasItem *group);
|
||||
-gint dia_canvas_groupable_pos (DiaCanvasItem *group,
|
||||
+gint dia_canvas_groupable_length (DiaCanvasGroupable *group);
|
||||
+gint dia_canvas_groupable_pos (DiaCanvasGroupable *group,
|
||||
DiaCanvasItem *item);
|
||||
|
||||
/**
|
|
@ -1,15 +0,0 @@
|
|||
--- dia-export-svg.c 2003-02-22 16:15:57.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/src/dia-export-svg.c 2003-07-19 11:16:24.000000000 +0200
|
||||
@@ -437,9 +437,9 @@
|
||||
} while (dia_canvas_item_shape_next (item, &iter));
|
||||
|
||||
if (DIA_IS_CANVAS_GROUPABLE (item)
|
||||
- && dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
- dia_export_svg_real_render (dia_canvas_groupable_value (item, &iter), writer, data);
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ && dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
+ dia_export_svg_real_render (dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter), writer, data);
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
|
||||
while (clip_depth > 0) {
|
||||
writer (data, "</svg>");
|
|
@ -1,11 +0,0 @@
|
|||
--- dia-textbox.c 2003-03-02 15:32:43.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/demos/dia-textbox.c 2003-07-19 11:25:45.000000000 +0200
|
||||
@@ -137,7 +137,7 @@
|
||||
dia_textbox_init (DiaTextbox *textbox)
|
||||
{
|
||||
textbox->text = dia_canvas_item_create (DIA_TYPE_CANVAS_TEXT, NULL);
|
||||
- dia_canvas_groupable_add_construction (DIA_CANVAS_ITEM (textbox),
|
||||
+ dia_canvas_groupable_add_construction (DIA_CANVAS_GROUPABLE (textbox),
|
||||
textbox->text);
|
||||
//dia_canvas_item_request_update (textbox->text);
|
||||
g_message (__FUNCTION__": %p %p %p %p %p", textbox, textbox->text, textbox->text->parent, DIA_CANVAS_ITEM (textbox)->canvas, textbox->text->canvas);
|
|
@ -1,30 +0,0 @@
|
|||
--- test-canvas-item.c 2003-01-05 14:07:03.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/unit_tests/test-canvas-item.c 2003-07-19 11:28:59.000000000 +0200
|
||||
@@ -156,21 +156,21 @@
|
||||
TEST (G_OBJECT (ti2)->ref_count == 2);
|
||||
TEST (G_OBJECT (ti3)->ref_count == 2);
|
||||
|
||||
- dia_canvas_groupable_remove (canvas->root, ti1);
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (canvas->root), ti1);
|
||||
/* One for ti1, one for the undo stack */
|
||||
TEST (G_OBJECT (ti1)->ref_count == 2);
|
||||
|
||||
- dia_canvas_groupable_remove (canvas->root, ti2);
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (canvas->root), ti2);
|
||||
TEST (G_OBJECT (ti2)->ref_count == 2);
|
||||
- dia_canvas_groupable_remove (canvas->root, ti3);
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (canvas->root), ti3);
|
||||
TEST (G_OBJECT (ti3)->ref_count == 2);
|
||||
|
||||
TEST (g_list_length (DIA_CANVAS_GROUP(canvas->root)->children) == 0);
|
||||
|
||||
/* Now add them in reverse order: */
|
||||
- dia_canvas_groupable_add (canvas->root, ti3);
|
||||
- dia_canvas_groupable_add (canvas->root, ti2);
|
||||
- dia_canvas_groupable_add (canvas->root, ti1);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), ti3);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), ti2);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), ti1);
|
||||
|
||||
TEST (DIA_CANVAS_GROUP(canvas->root)->children->data == ti3);
|
||||
TEST (DIA_CANVAS_GROUP(canvas->root)->children->next->data == ti2);
|
|
@ -1,134 +0,0 @@
|
|||
--- test-canvas.c 2003-03-07 21:54:45.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/demos/test-canvas.c 2003-07-19 11:24:34.000000000 +0200
|
||||
@@ -236,7 +236,7 @@
|
||||
if (view->focus_item) {
|
||||
DiaCanvasItem *item = view->focus_item->item;
|
||||
if (item->parent)
|
||||
- dia_canvas_groupable_remove (item->parent, item);
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (item->parent), item);
|
||||
}
|
||||
break;
|
||||
case EDIT_DEL_SELECTED:
|
||||
@@ -245,7 +245,7 @@
|
||||
gint len = g_list_length (view->selected_items);
|
||||
item = DIA_CANVAS_VIEW_ITEM (view->selected_items->data)->item;
|
||||
if (item->parent) {
|
||||
- dia_canvas_groupable_remove (item->parent, item);
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (item->parent), item);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -436,7 +436,7 @@
|
||||
g_random_int_range (0, 200),
|
||||
g_random_int_range (180, 255)),
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
for (i = 0; i < g_random_int_range (2, 6); i++) {
|
||||
@@ -482,7 +482,7 @@
|
||||
g_random_int_range (50, 200)),
|
||||
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
dia_canvas_item_move (item, g_random_int_range (0, 255),
|
||||
@@ -630,11 +630,11 @@
|
||||
|
||||
if (DIA_IS_CANVAS_GROUPABLE (item)) {
|
||||
DiaCanvasIter iter;
|
||||
- if (dia_canvas_groupable_get_iter (item, &iter)) do {
|
||||
+ if (dia_canvas_groupable_get_iter (DIA_CANVAS_GROUPABLE (item), &iter)) do {
|
||||
DiaCanvasItem *child;
|
||||
- child = dia_canvas_groupable_value (item, &iter);
|
||||
+ child = dia_canvas_groupable_value (DIA_CANVAS_GROUPABLE (item), &iter);
|
||||
print_canvas_hierarchy (child, level + 1);
|
||||
- } while (dia_canvas_groupable_next (item, &iter));
|
||||
+ } while (dia_canvas_groupable_next (DIA_CANVAS_GROUPABLE (item), &iter));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,7 +782,7 @@
|
||||
"height", 75.0,
|
||||
"color", DIA_COLOR_A (100, 50, 180, 250),
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
dia_canvas_item_rotate (item, 15.0);
|
||||
@@ -799,7 +799,7 @@
|
||||
//"height", 100.0,
|
||||
//"color", DIA_COLOR_A (160, 50, 120, 190),
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
dia_canvas_item_move (item, 50.0, 50.0);
|
||||
@@ -818,7 +818,7 @@
|
||||
"orthogonal", TRUE,
|
||||
"horizontal", TRUE,
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
dia_canvas_item_move (item, 30.0, 0.0);
|
||||
@@ -844,7 +844,7 @@
|
||||
"head_color", DIA_COLOR_A (0, 0, 70, 255),
|
||||
"head_fill_color", DIA_COLOR_A (0, 0, 70, 150),
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
g_signal_connect (item, "event", G_CALLBACK (canvas_item_event), NULL);
|
||||
@@ -865,7 +865,7 @@
|
||||
"width", (gdouble) gdk_pixbuf_get_width (pixbuf),
|
||||
"height", (gdouble) gdk_pixbuf_get_height (pixbuf),
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
//dia_canvas_item_rotate (item, 154.0);
|
||||
@@ -880,7 +880,7 @@
|
||||
"width", 100.0,
|
||||
"height", 100.0,
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
|
||||
dia_canvas_item_move (item, 100.0, 100.0);
|
||||
@@ -920,7 +920,7 @@
|
||||
"width", 200.0,
|
||||
"height", 30.0,
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
/* TODO: This is a hack! */
|
||||
g_object_set (DIA_TEXTBOX (item)->text,
|
||||
@@ -938,7 +938,7 @@
|
||||
"width", 200.0,
|
||||
"height", 40.0,
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
/* TODO: This is a hack! */
|
||||
g_object_set (DIA_TEXTBOX (item)->text,
|
||||
@@ -958,7 +958,7 @@
|
||||
"width", 200.0,
|
||||
"height", 40.0,
|
||||
NULL);
|
||||
- dia_canvas_groupable_add (canvas->root, item);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), item);
|
||||
g_object_weak_ref (G_OBJECT (item), item_destroyed, NULL);
|
||||
/* TODO: This is a hack! */
|
||||
g_object_set (DIA_TEXTBOX (item)->text,
|
|
@ -1,11 +0,0 @@
|
|||
--- test-item.c 2002-12-29 09:34:14.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/unit_tests/test-item.c 2003-07-19 11:27:56.000000000 +0200
|
||||
@@ -217,7 +217,7 @@
|
||||
{
|
||||
TestItem *test_item = TEST_ITEM (object);
|
||||
while (test_item->children)
|
||||
- dia_canvas_groupable_remove (DIA_CANVAS_ITEM (object),
|
||||
+ dia_canvas_groupable_remove (DIA_CANVAS_GROUPABLE (object),
|
||||
test_item->children->data);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
|
@ -1,11 +0,0 @@
|
|||
--- test-shape-art.c 2002-12-29 09:34:15.000000000 +0100
|
||||
+++ ../../diacanvas2-0.9.2.old/unit_tests/test-shape-art.c 2003-07-19 11:30:17.000000000 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
NULL);
|
||||
int i;
|
||||
|
||||
- dia_canvas_groupable_add (canvas->root, box);
|
||||
+ dia_canvas_groupable_add (DIA_CANVAS_GROUPABLE (canvas->root), box);
|
||||
for (i = 0; i < 10; i++) {
|
||||
dia_canvas_item_request_update (box);
|
||||
|
Загрузка…
Ссылка в новой задаче