[dia] Remove USE_NEWGROUP (unfinished and collision with transforms)
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Remove USE_NEWGROUP (unfinished and collision with transforms)
- Date: Wed, 20 Oct 2010 19:28:23 +0000 (UTC)
commit d8e61473cdf7180974f305bb90231042014077b6
Author: Hans Breuer <hans breuer org>
Date: Sun Oct 17 19:36:38 2010 +0200
Remove USE_NEWGROUP (unfinished and collision with transforms)
The old Group object just learned new tricks which makes keeping it worthwhile.
The NEWGROUP was not compiled for years.
app/app_procs.c | 4 -
app/diagram.c | 20 ---
app/load_save.c | 40 ------
lib/Makefile.am | 2 -
lib/makefile.msc | 1 -
lib/newgroup.c | 413 ------------------------------------------------------
lib/newgroup.h | 28 ----
7 files changed, 0 insertions(+), 508 deletions(-)
---
diff --git a/app/app_procs.c b/app/app_procs.c
index 129e072..d3b9ede 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -75,7 +75,6 @@
#include "persistence.h"
#include "sheets.h"
#include "exit_dialog.h"
-#include "newgroup.h"
#include "dialib.h"
#include "diaerror.h"
@@ -1217,9 +1216,6 @@ internal_plugin_init(PluginInfo *info)
/* register the group object type */
object_register_type(&group_type);
-#ifdef USE_NEWGROUP
- object_register_type(&newgroup_type);
-#endif
/* register import filters */
filter_register_import(&dia_import_filter);
diff --git a/app/diagram.c b/app/diagram.c
index c8143e6..56f4abe 100644
--- a/app/diagram.c
+++ b/app/diagram.c
@@ -1220,25 +1220,6 @@ void diagram_group_selected(Diagram *dia)
return;
}
-#ifdef USE_NEWGROUP
- list = dia->data->selected;
- current_parent = ((DiaObject *) list->data)->parent;
- while (list != NULL) {
- obj = (DiaObject *)list->data;
- if (obj->parent != current_parent) {
- message_warning(_("You cannot group objects that belong to different groups or have different parents"));
- return;
- }
- }
-
- group = ...
-
- list = dia->data->selected;
- while (list != NULL) {
- obj = (DiaObject *)list->data;
-
- }
-#else
#if 0
/* the following is wrong as it screws up the selected list, see bug #153525
* I just don't get what was originally intented so please speak up if you know --hb
@@ -1271,7 +1252,6 @@ void diagram_group_selected(Diagram *dia)
group = group_create(group_list);
change = undo_group_objects(dia, group_list, group, orig_list);
(change->apply)(change, dia);
-#endif
/* Select the created group */
diagram_select(dia, group);
diff --git a/app/load_save.c b/app/load_save.c
index 9c37d8e..4de4954 100644
--- a/app/load_save.c
+++ b/app/load_save.c
@@ -53,7 +53,6 @@
#include "preferences.h"
#include "diapagelayout.h"
#include "autosave.h"
-#include "newgroup.h"
#include "display.h"
#ifdef G_OS_WIN32
@@ -194,46 +193,7 @@ read_objects(xmlNodePtr objects,
if (inner_objects) {
obj = group_create(inner_objects);
object_load_props(obj,obj_node);
-
-#ifdef USE_NEWGROUP
- /* Old group objects had objects recursively inside them. Since
- * objects are now done with parenting, we need to extract those objects,
- * make a newgroup object, set parent-child relationships, and add
- * all of them to the diagram.
- */
- {
- DiaObject *newgroup;
- GList *objects;
- Point lower_right;
- type = object_get_type("Misc - NewGroup");
- lower_right = obj->position;
- newgroup = type->ops->create(&lower_right,
- NULL,
- NULL,
- NULL);
- list = g_list_append(list, newgroup);
-
- for (objects = group_objects(obj); objects != NULL; objects = g_list_next(objects)) {
- DiaObject *subobj = (DiaObject *) objects->data;
- list = g_list_append(list, subobj);
- subobj->parent = newgroup;
- newgroup->children = g_list_append(newgroup->children, subobj);
- if (subobj->bounding_box.right > lower_right.x) {
- lower_right.x = subobj->bounding_box.right;
- }
- if (subobj->bounding_box.bottom > lower_right.y) {
- lower_right.y = subobj->bounding_box.bottom;
- }
- }
- newgroup->ops->move_handle(newgroup, newgroup->handles[7],
- &lower_right, NULL,
- HANDLE_MOVE_CREATE_FINAL, 0);
- /* We've used the info from the old group, destroy it */
- group_destroy_shallow(obj);
- }
-#else
list = g_list_append(list, obj);
-#endif
}
} else {
/* silently ignore other nodes */
diff --git a/lib/Makefile.am b/lib/Makefile.am
index cf0fd02..2569ae6 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -171,8 +171,6 @@ libdia_la_SOURCES = \
debug.h \
prefs.c \
prefs.h \
- newgroup.c \
- newgroup.h \
dialib.c \
dialib.h \
\
diff --git a/lib/makefile.msc b/lib/makefile.msc
index 28bb340..72c6f5c 100644
--- a/lib/makefile.msc
+++ b/lib/makefile.msc
@@ -77,7 +77,6 @@ OBJECTS = \
dialib.obj \
layer.obj \
message.obj \
- newgroup.obj \
neworth_conn.obj \
objchange.obj \
object.obj \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]