[glade3] * gladeui/glade-project.[ch], gladeui/glade-widget.c, gladeui/glade-command.c: Removing legacy '
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-project.[ch], gladeui/glade-widget.c, gladeui/glade-command.c: Removing legacy '
- Date: Sat, 1 Jan 2011 15:42:48 +0000 (UTC)
commit 3a779ba755a56cbc0053bdd8f50b194616a6d1c2
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Jan 2 00:49:21 2011 +0900
* gladeui/glade-project.[ch], gladeui/glade-widget.c, gladeui/glade-command.c:
Removing legacy 'old_project' argument from glade_project_add_object().
ChangeLog | 3 ++
gladeui/glade-command.c | 4 +-
gladeui/glade-project.c | 11 +++-----
gladeui/glade-project.h | 65 ++++++++++++++++++++++-----------------------
gladeui/glade-property.c | 4 +-
gladeui/glade-widget.c | 2 +-
6 files changed, 44 insertions(+), 45 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 812dc72..035c6e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@
* Made GladeWidget internalize *everything* into a private data structure,
33 files changed, 1318 insertions(+), 1230 deletions(-)
+ * gladeui/glade-project.[ch], gladeui/glade-widget.c, gladeui/glade-command.c:
+ Removing legacy 'old_project' argument from glade_project_add_object().
+
2010-12-31 Tristan Van Berkom <tristanvb openismus com>
* gladeui/glade-project.c: Further fixing project dispose cycle, still leaking a little
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index 090ddae..17752b9 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -1368,13 +1368,13 @@ glade_command_add_execute (GladeCommandAddRemove * me)
}
}
- glade_project_add_object (GLADE_COMMAND (me)->project, NULL,
+ glade_project_add_object (GLADE_COMMAND (me)->project,
glade_widget_get_object (cdata->widget));
for (l = cdata->reffed; l; l = l->next)
{
GladeWidget *reffed = l->data;
- glade_project_add_object (GLADE_COMMAND (me)->project, NULL,
+ glade_project_add_object (GLADE_COMMAND (me)->project,
glade_widget_get_object (reffed));
}
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index d19ffd3..9fb66f9 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -1496,7 +1496,7 @@ glade_project_load_internal (GladeProject * project)
continue;
if ((widget = glade_widget_read (project, NULL, node, NULL)) != NULL)
- glade_project_add_object (project, NULL, glade_widget_get_object (widget));
+ glade_project_add_object (project, glade_widget_get_object (widget));
if (project->priv->load_cancel)
break;
@@ -2827,15 +2827,12 @@ glade_project_notify_row_deleted (GladeProject * project, GladeWidget * gwidget)
/**
* glade_project_add_object:
* @project: the #GladeProject the widget is added to
- * @old_project: the #GladeProject the widget was previously in
- * (or %NULL for the clipboard)
* @object: the #GObject to add
*
* Adds an object to the project.
*/
void
-glade_project_add_object (GladeProject * project,
- GladeProject * old_project, GObject * object)
+glade_project_add_object (GladeProject * project, GObject * object)
{
GladeWidget *gwidget;
GList *list, *children;
@@ -2906,7 +2903,7 @@ glade_project_add_object (GladeProject * project,
if ((children = glade_widget_get_children (gwidget)) != NULL)
{
for (list = children; list && list->data; list = list->next)
- glade_project_add_object (project, old_project, G_OBJECT (list->data));
+ glade_project_add_object (project, G_OBJECT (list->data));
g_list_free (children);
}
@@ -3022,7 +3019,7 @@ adjust_naming_policy (GladeProject * project, GladeNamingPolicy policy)
/* Put the toplevels back with the new policy (recursive operation) */
for (list = objects; list; list = list->next)
- glade_project_add_object (project, project, G_OBJECT (list->data));
+ glade_project_add_object (project, G_OBJECT (list->data));
g_list_free (objects);
/* Unref them now */
diff --git a/gladeui/glade-project.h b/gladeui/glade-project.h
index 59e5f09..d72a925 100644
--- a/gladeui/glade-project.h
+++ b/gladeui/glade-project.h
@@ -39,47 +39,47 @@ typedef enum
**/
typedef enum
{
- GLADE_PROJECT_MODEL_COLUMN_ICON_NAME,
- GLADE_PROJECT_MODEL_COLUMN_NAME,
- GLADE_PROJECT_MODEL_COLUMN_TYPE_NAME,
- GLADE_PROJECT_MODEL_COLUMN_OBJECT,
- GLADE_PROJECT_MODEL_COLUMN_MISC,
- GLADE_PROJECT_MODEL_N_COLUMNS
+ GLADE_PROJECT_MODEL_COLUMN_ICON_NAME,
+ GLADE_PROJECT_MODEL_COLUMN_NAME,
+ GLADE_PROJECT_MODEL_COLUMN_TYPE_NAME,
+ GLADE_PROJECT_MODEL_COLUMN_OBJECT,
+ GLADE_PROJECT_MODEL_COLUMN_MISC,
+ GLADE_PROJECT_MODEL_N_COLUMNS
} GladeProjectModelColumns;
struct _GladeProject
{
- GObject parent_instance;
+ GObject parent_instance;
- GladeProjectPrivate *priv;
+ GladeProjectPrivate *priv;
};
struct _GladeProjectClass
{
- GObjectClass parent_class;
-
- void (*add_object) (GladeProject *project,
- GladeWidget *widget);
- void (*remove_object) (GladeProject *project,
- GladeWidget *widget);
-
- void (*undo) (GladeProject *project);
- void (*redo) (GladeProject *project);
- GladeCommand *(*next_undo_item) (GladeProject *project);
- GladeCommand *(*next_redo_item) (GladeProject *project);
- void (*push_undo) (GladeProject *project,
- GladeCommand *command);
-
- void (*changed) (GladeProject *project,
- GladeCommand *command,
- gboolean forward);
-
- void (*widget_name_changed) (GladeProject *project,
- GladeWidget *widget);
- void (*selection_changed) (GladeProject *project);
- void (*close) (GladeProject *project);
-
- void (*parse_finished) (GladeProject *project);
+ GObjectClass parent_class;
+
+ void (*add_object) (GladeProject *project,
+ GladeWidget *widget);
+ void (*remove_object) (GladeProject *project,
+ GladeWidget *widget);
+
+ void (*undo) (GladeProject *project);
+ void (*redo) (GladeProject *project);
+ GladeCommand *(*next_undo_item) (GladeProject *project);
+ GladeCommand *(*next_redo_item) (GladeProject *project);
+ void (*push_undo) (GladeProject *project,
+ GladeCommand *command);
+
+ void (*changed) (GladeProject *project,
+ GladeCommand *command,
+ gboolean forward);
+
+ void (*widget_name_changed) (GladeProject *project,
+ GladeWidget *widget);
+ void (*selection_changed) (GladeProject *project);
+ void (*close) (GladeProject *project);
+
+ void (*parse_finished) (GladeProject *project);
};
@@ -124,7 +124,6 @@ gboolean glade_project_get_readonly (GladeProject *project);
const GList *glade_project_get_objects (GladeProject *project);
void glade_project_add_object (GladeProject *project,
- GladeProject *old_project,
GObject *object);
void glade_project_remove_object (GladeProject *project,
diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c
index 1b0b558..ecfa456 100644
--- a/gladeui/glade-property.c
+++ b/gladeui/glade-property.c
@@ -328,8 +328,8 @@ glade_property_sync_impl (GladeProperty * property)
/* Heh, here are the many reasons not to
* sync a property ;-)
*/
- if ( /* the class can be NULL during object,
- * construction this is just a temporary state */
+ if (/* the class can be NULL during object,
+ * construction this is just a temporary state */
property->klass == NULL ||
/* optional properties that are disabled */
property->enabled == FALSE ||
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index a2efec5..6642d99 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -2525,7 +2525,7 @@ glade_widget_rebuild (GladeWidget * gwidget)
*/
if (project)
{
- glade_project_add_object (project, NULL, gwidget->priv->object);
+ glade_project_add_object (project, gwidget->priv->object);
if (reselect)
glade_project_selection_add (project, gwidget->priv->object, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]