Commit eacde773 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Removed


	* src/glade-types.h, src/glade-plugin.h: Removed

	* src/Makefile.am src/glade-app.h src/glade-builtins.h
	  src/glade-catalog.h src/glade-clipboard.h src/glade-command.c
	  src/glade-command.h src/glade-cursor.h src/glade-editor.c
	  src/glade-editor.h src/glade-gtk.c src/glade-palette.h
	  src/glade-parameter.h src/glade-parser.h
          src/glade-placeholder.c src/glade-placeholder.h
          src/glade-project-view.h src/glade-project-window.h
          src/glade-project.c src/glade-project.h
          src/glade-property-class.c src/glade-property-class.h
          src/glade-property.c src/glade-property.h
          src/glade-signal-editor.c src/glade-signal-editor.h
          src/glade-signal.h src/glade-utils.h src/glade-widget-class.c
          src/glade-widget-class.h src/glade-widget.c src/glade-widget.h
          src/glade-xml-utils.h src/glade.h:
	  Now "glade.h" is the libgladeui API include for both the plugin and
	  the application side (Fixed sources in consequence to a few broken types).
parent 81ed8652
2005-07-31 Tristan Van Berkom <tvb@gnome.org>
* src/glade-types.h, src/glade-plugin.h: Removed
* src/Makefile.am src/glade-app.h src/glade-builtins.h
src/glade-catalog.h src/glade-clipboard.h src/glade-command.c
src/glade-command.h src/glade-cursor.h src/glade-editor.c
src/glade-editor.h src/glade-gtk.c src/glade-palette.h
src/glade-parameter.h src/glade-parser.h
src/glade-placeholder.c src/glade-placeholder.h
src/glade-project-view.h src/glade-project-window.h
src/glade-project.c src/glade-project.h
src/glade-property-class.c src/glade-property-class.h
src/glade-property.c src/glade-property.h
src/glade-signal-editor.c src/glade-signal-editor.h
src/glade-signal.h src/glade-utils.h src/glade-widget-class.c
src/glade-widget-class.h src/glade-widget.c src/glade-widget.h
src/glade-xml-utils.h src/glade.h:
Now "glade.h" is the libgladeui API include for both the plugin and
the application side (Fixed sources in consequence to a few broken types).
2005-07-31 Tristan Van Berkom <tvb@gnome.org>
* src/glade-editor.c: Cleared up property->class references, Added comments,
......
......@@ -77,7 +77,6 @@ libgladeuiinclude_HEADERS = \
glade-signal-editor.h \
glade-palette.h \
glade-cursor.h \
glade-types.h \
glade-widget.h \
glade-widget-class.h \
glade-property.h \
......@@ -96,7 +95,6 @@ libgladeuiinclude_HEADERS = \
glade-marshallers.h \
glade-parser.h \
glade-app.h \
glade-plugin.h \
glade-builtins.c \
fixed_bg.xpm
......
......@@ -22,6 +22,11 @@
#ifndef __GLADE_APP_H__
#define __GLADE_APP_H__
#include "glade-editor.h"
#include "glade-palette.h"
#include "glade-clipboard.h"
#include "glade-project-view.h"
G_BEGIN_DECLS
#define GLADE_CONFIG_FILENAME "glade-3.conf"
......
......@@ -5,6 +5,8 @@
#include <glib-object.h>
#include "glade.h"
G_BEGIN_DECLS
#define GLADE_TYPE_STOCK (glade_standard_stock_get_type())
LIBGLADEUI_API GType glade_standard_stock_get_type (void);
......@@ -15,4 +17,6 @@ LIBGLADEUI_API GParamSpec *glade_standard_int_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_string_spec (void);
LIBGLADEUI_API GParamSpec *glade_standard_float_spec (void);
G_END_DECLS
#endif /* __GLADE_BUILTINS_H__ */
......@@ -28,6 +28,10 @@ G_BEGIN_DECLS
#define GLADE_WIDGET_GROUP(x) ((GladeWidgetGroup *) x)
typedef struct _GladeCatalog GladeCatalog;
typedef struct _GladeWidgetGroup GladeWidgetGroup;
GList * glade_catalog_load_all (void);
const gchar * glade_catalog_get_name (GladeCatalog *catalog);
......
......@@ -8,6 +8,7 @@ G_BEGIN_DECLS
#define GLADE_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_CLIPBOARD, GladeClipboard))
#define GLADE_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_CLIPBOARD))
typedef struct _GladeClipboard GladeClipboard;
typedef struct _GladeClipboardClass GladeClipboardClass;
struct _GladeClipboard {
......
......@@ -390,7 +390,7 @@ glade_command_set_property (GladeProperty *property, const GValue* pvalue)
me = (GladeCommandSetProperty*) g_object_new (GLADE_COMMAND_SET_PROPERTY_TYPE, NULL);
cmd = (GladeCommand*) me;
gwidget = property->widget;
gwidget = GLADE_WIDGET (property->widget);
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
me->property = property;
......@@ -416,7 +416,7 @@ glade_command_set_property (GladeProperty *property, const GValue* pvalue)
/* Push onto undo stack only if it executes successfully. */
if (glade_command_set_property_execute (GLADE_COMMAND (me)))
glade_command_push_undo (gwidget->project, GLADE_COMMAND (me));
glade_command_push_undo (GLADE_PROJECT (gwidget->project), GLADE_COMMAND (me));
else
/* No leaks on my shift! */
g_object_unref (G_OBJECT (me));
......@@ -546,7 +546,7 @@ glade_command_set_name (GladeWidget *widget, const gchar* name)
return;
if (glade_command_set_name_execute (GLADE_COMMAND (me)))
glade_command_push_undo (widget->project, GLADE_COMMAND (me));
glade_command_push_undo (GLADE_PROJECT (widget->project), GLADE_COMMAND (me));
else
g_object_unref (G_OBJECT (me));
}
......@@ -615,7 +615,7 @@ glade_command_create_execute (GladeCommandCreateDelete *me)
else
{
glade_project_add_object
(cdata->widget->project,
(GLADE_PROJECT (cdata->widget->project),
cdata->widget->object);
glade_default_app_selection_add
(cdata->widget->object, TRUE);
......@@ -665,8 +665,8 @@ glade_command_delete_execute (GladeCommandCreateDelete *me)
}
else
{
glade_project_remove_object (cdata->widget->project,
cdata->widget->object);
glade_project_remove_object
(GLADE_PROJECT (cdata->widget->project), cdata->widget->object);
}
if (GTK_IS_WIDGET (cdata->widget->object))
......@@ -805,7 +805,8 @@ glade_command_delete (GList *widgets)
g_strdup_printf (_("Delete multiple"));
if (glade_command_create_delete_execute (GLADE_COMMAND (me)))
glade_command_push_undo (widget->project, GLADE_COMMAND (me));
glade_command_push_undo (GLADE_PROJECT (widget->project),
GLADE_COMMAND (me));
else
g_object_unref (G_OBJECT (me));
}
......@@ -847,7 +848,7 @@ glade_command_create (GladeWidgetClass *class,
me->widgets = g_list_append (me->widgets, cdata);
/* widget may be null, e.g. the user clicked cancel on a query */
if ((widget = glade_widget_new (parent, class, project)) == NULL)
if ((widget = glade_widget_new (parent, class, (gpointer)project)) == NULL)
{
g_object_unref (G_OBJECT (me));
return NULL;
......@@ -939,7 +940,7 @@ glade_command_paste_execute (GladeCommandCutCopyPaste *me)
(project, cdata->widget->object);
else
glade_project_add_object
(me->project,
(GLADE_PROJECT (me->project),
cdata->widget->object);
glade_default_app_selection_add
......@@ -988,7 +989,8 @@ glade_command_cut_execute (GladeCommandCutCopyPaste *me)
if (GTK_IS_WIDGET (cdata->widget->object))
gtk_widget_hide (GTK_WIDGET (cdata->widget->object));
glade_project_remove_object (cdata->widget->project, cdata->widget->object);
glade_project_remove_object (GLADE_PROJECT (cdata->widget->project),
cdata->widget->object);
}
......@@ -1428,7 +1430,7 @@ glade_command_add_remove_change_signal (GladeWidget *glade_widget,
signal->handler);
if (glade_command_add_signal_execute (cmd))
glade_command_push_undo (glade_widget->project, cmd);
glade_command_push_undo (GLADE_PROJECT (glade_widget->project), cmd);
else
g_object_unref (G_OBJECT (me));
}
......
......@@ -3,7 +3,6 @@
#define __GLADE_COMMAND_H__
#include <glib-object.h>
#include "glade-types.h"
G_BEGIN_DECLS
......
......@@ -10,13 +10,14 @@ G_BEGIN_DECLS
* with it's enumed value to set the window cursor.
*/
/* Has a pointer to the loaded GdkCursors. It is loaded when _init
* is called
*/
struct _GladeCursor {
typedef struct _GladeCursor {
GdkCursor *selector;
GdkCursor *add_widget;
};
} GladeCursor;
/* Enumed values for each of the cursors for GladeCursor. For every
* GdkCursor above there should be a enum here
......
......@@ -217,7 +217,7 @@ glade_editor_property_changed_text (GtkWidget *entry,
g_free (text);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
}
static gboolean
......@@ -256,7 +256,7 @@ glade_editor_text_view_focus_out (GtkTextView *view,
g_free (text);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
return FALSE;
}
......@@ -288,7 +288,7 @@ glade_editor_property_changed_enum (GtkWidget *menu_item,
g_value_unset (&val);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
}
static void
......@@ -378,7 +378,7 @@ glade_editor_property_changed_numeric (GtkWidget *spin,
g_value_unset (&val);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
}
static void
......@@ -409,7 +409,7 @@ glade_editor_property_changed_boolean (GtkWidget *button,
g_value_unset (&val);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
}
static void
......@@ -442,7 +442,7 @@ glade_editor_property_changed_unichar (GtkWidget *entry,
glade_command_set_property (property->property, &val);
g_value_unset (&val);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
}
static void
......@@ -798,7 +798,8 @@ glade_editor_property_show_i18n_dialog (GtkWidget *entry,
g_free (str);
glade_editor_property_load (property, property->property->widget);
glade_editor_property_load (property,
GLADE_WIDGET (property->property->widget));
/* Comment */
gtk_text_buffer_get_bounds (comment_buffer, &start, &end);
......@@ -1266,7 +1267,7 @@ glade_editor_table_append_items (GladeEditorTable *table,
{
property_class = (GladePropertyClass *) list->data;
if (!glade_property_class_is_visible (property_class, class))
if (!glade_property_class_is_visible (property_class))
continue;
if (type == TABLE_TYPE_QUERY && !property_class->query)
continue;
......@@ -1298,7 +1299,7 @@ glade_editor_on_edit_menu_click (GtkButton *button, GladeEditor *editor)
menubar = GTK_WIDGET(editor->loaded_widget->object);
g_return_if_fail (GTK_IS_MENU_BAR (menubar));
project = editor->loaded_widget->project;
project = GLADE_PROJECT (editor->loaded_widget->project);
g_return_if_fail (project != NULL);
menu_editor = glade_menu_editor_new (project, GTK_MENU_SHELL (menubar));
......@@ -1470,7 +1471,7 @@ static void
glade_editor_load_signal_page (GladeEditor *editor, GladeWidgetClass *class)
{
if (editor->signal_editor == NULL) {
editor->signal_editor = glade_signal_editor_new (editor);
editor->signal_editor = glade_signal_editor_new ((gpointer) editor);
gtk_box_pack_start (GTK_BOX (editor->vbox_signals),
glade_signal_editor_get_widget (editor->signal_editor),
TRUE, TRUE, 0);
......
......@@ -2,6 +2,8 @@
#ifndef __GLADE_EDITOR_H__
#define __GLADE_EDITOR_H__
#include "glade-signal-editor.h"
G_BEGIN_DECLS
......@@ -17,6 +19,7 @@ G_BEGIN_DECLS
#define GLADE_EDITOR_PROPERTY(p) ((GladeEditorProperty *)p)
#define GLADE_IS_EDITOR_PROPERTY(p) (p != NULL)
typedef struct _GladeEditor GladeEditor;
typedef struct _GladeEditorClass GladeEditorClass;
typedef struct _GladeEditorTable GladeEditorTable;
typedef struct _GladeEditorProperty GladeEditorProperty;
......
......@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <gtk/gtk.h>
#include "glade-plugin.h"
#include "glade.h"
#include "fixed_bg.xpm"
......@@ -117,8 +117,8 @@ glade_gtk_option_menu_set_items (GObject *object, GValue *value)
void GLADEGTK_API
glade_gtk_widget_set_tooltip (GObject *object, GValue *value)
{
GladeWidget *glade_widget = glade_widget_get_from_gobject (GTK_WIDGET (object));
GladeProject *project = glade_widget_get_project (glade_widget);
GladeWidget *glade_widget = glade_widget_get_from_gobject (GTK_WIDGET (object));
GladeProject *project = (GladeProject *)glade_widget_get_project (glade_widget);
GtkTooltips *tooltips = glade_project_get_tooltips (project);
const char *tooltip;
......@@ -674,7 +674,7 @@ glade_gtk_button_ensure_glabel (GtkWidget *button)
if (child) gtk_container_remove (GTK_CONTAINER (button), child);
gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (glabel->object));
glade_project_add_object (gbutton->project, glabel->object);
glade_project_add_object (GLADE_PROJECT (gbutton->project), glabel->object);
gtk_widget_show (GTK_WIDGET (glabel->object));
}
......@@ -694,7 +694,8 @@ glade_gtk_button_ensure_glabel_idle (gpointer data)
button = GTK_WIDGET (gbutton->object);
glade_gtk_button_ensure_glabel (button);
glade_project_selection_set (gbutton->project, G_OBJECT (button), TRUE);
glade_project_selection_set (GLADE_PROJECT (gbutton->project),
G_OBJECT (button), TRUE);
return FALSE;
}
......@@ -1014,9 +1015,10 @@ glade_gtk_fixed_button_press (GtkWidget *widget,
glade_default_app_get_alt_class() != NULL)) &&
((gwidget = glade_command_create
(glade_default_app_get_add_class() ?
glade_default_app_get_add_class() :
glade_default_app_get_alt_class(),
fixed_gwidget, NULL, fixed_gwidget->project)) != NULL))
glade_default_app_get_add_class() :
glade_default_app_get_alt_class(),
fixed_gwidget, NULL,
GLADE_PROJECT (fixed_gwidget->project))) != NULL))
{
/* reset the palette */
glade_palette_unselect_widget (glade_default_app_get_palette());
......@@ -1246,11 +1248,11 @@ glade_gtk_frame_create_idle (gpointer data)
g_object_set_data (glabel->object, "special-child-type", "label_item");
gtk_frame_set_label_widget (GTK_FRAME (frame), GTK_WIDGET (glabel->object));
glade_project_add_object (gframe->project, glabel->object);
glade_project_add_object (GLADE_PROJECT (gframe->project), glabel->object);
gtk_widget_show (GTK_WIDGET (glabel->object));
}
glade_project_selection_set (gframe->project, G_OBJECT (label), TRUE);
glade_project_selection_set (GLADE_PROJECT (gframe->project), G_OBJECT (label), TRUE);
return FALSE;
}
......
......@@ -2,8 +2,6 @@
#ifndef __GLADE_PALETTE_H__
#define __GLADE_PALETTE_H__
#include "glade-types.h"
G_BEGIN_DECLS
......@@ -14,7 +12,8 @@ G_BEGIN_DECLS
#define GLADE_IS_PALETTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PALETTE))
#define GLADE_PALETTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PALETTE, GladePaletteClass))
typedef struct _GladePaletteClass GladePaletteClass;
typedef struct _GladePalette GladePalette;
typedef struct _GladePaletteClass GladePaletteClass;
/* The GladePalette is used so that the user can choose a widget to be
......
......@@ -24,6 +24,8 @@ G_BEGIN_DECLS
</Property>
*/
typedef struct _GladeParameter GladeParameter;
struct _GladeParameter {
gchar *key; /* The name of the parameter */
......
......@@ -28,13 +28,21 @@
G_BEGIN_DECLS
typedef struct _GladePropInfo GladePropInfo;
typedef struct _GladePropInfo GladePropInfo;
typedef struct _GladeSignalInfo GladeSignalInfo;
typedef struct _GladeAtkActionInfo GladeAtkActionInfo;
typedef struct _GladeAccelInfo GladeAccelInfo;
typedef struct _GladeWidgetInfo GladeWidgetInfo;
typedef struct _GladeChildInfo GladeChildInfo;
typedef struct _GladeInterface GladeInterface;
typedef struct _GladeAtkRelationInfo GladeAtkRelationInfo;
typedef struct _GladePackingDefault GladePackingDefault;
struct _GladePropInfo {
gchar *name;
gchar *value;
};
typedef struct _GladeSignalInfo GladeSignalInfo;
struct _GladeSignalInfo {
gchar *name;
gchar *handler;
......@@ -44,28 +52,27 @@ struct _GladeSignalInfo {
guint lookup : 1;
};
typedef struct _GladeAtkActionInfo GladeAtkActionInfo;
struct _GladePackingDefault {
gchar *id;
gchar *value;
};
struct _GladeAtkActionInfo {
gchar *action_name;
gchar *description;
};
typedef struct _GladeAtkRelationInfo GladeAtkRelationInfo;
struct _GladeAtkRelationInfo {
gchar *target;
gchar *type;
};
typedef struct _GladeAccelInfo GladeAccelInfo;
struct _GladeAccelInfo {
guint key;
GdkModifierType modifiers;
gchar *signal;
};
typedef struct _GladeWidgetInfo GladeWidgetInfo;
typedef struct _GladeChildInfo GladeChildInfo;
struct _GladeWidgetInfo {
GladeWidgetInfo *parent;
......@@ -102,7 +109,6 @@ struct _GladeChildInfo {
gchar *internal_child;
};
typedef struct _GladeInterface GladeInterface;
struct _GladeInterface {
gchar **requires;
guint n_requires;
......
......@@ -253,7 +253,7 @@ glade_placeholder_get_project (GladePlaceholder *placeholder)
{
GladeWidget *parent;
parent = glade_placeholder_get_parent (placeholder);
return parent ? parent->project : NULL;
return parent ? GLADE_PROJECT (parent->project) : NULL;
}
static gboolean
......
......@@ -2,14 +2,11 @@
#ifndef __GLADE_PLACEHOLDER_H__
#define __GLADE_PLACEHOLDER_H__
#include <gdk/gdk.h>
#include <gdk/gdkpixmap.h>
#include <gtk/gtkwidget.h>
#include "glade-types.h"
#include <gtk/gtk.h>
#include "glade-widget.h"
G_BEGIN_DECLS
#define GLADE_TYPE_PLACEHOLDER (glade_placeholder_get_type ())
#define GLADE_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PLACEHOLDER, GladePlaceholder))
#define GLADE_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_PLACEHOLDER, GladePlaceholderClass))
......@@ -20,6 +17,10 @@ G_BEGIN_DECLS
#define GLADE_PLACEHOLDER_WIDTH_REQ 20
#define GLADE_PLACEHOLDER_HEIGHT_REQ 20
typedef struct _GladePlaceholder GladePlaceholder;
typedef struct _GladePlaceholderClass GladePlaceholderClass;
struct _GladePlaceholder
{
GtkWidget widget;
......
#ifndef GLADE_PLUGIN_H
#define GLADE_PLUGIN_H
#include "glade.h"
#include "glade-placeholder.h"
#include "glade-widget-class.h"
#include "glade-widget.h"
#include "glade-project.h"
#include "glade-app.h"
#include "glade-command.h"
#include "glade-editor.h"
#include "glade-property.h"
#include "glade-property-class.h"
#include "glade-types.h"
#include "glade-palette.h"
#include "glade-builtins.h"
#endif
......@@ -14,7 +14,7 @@ G_BEGIN_DECLS
/* A view of a GladeProject. */
typedef struct _GladeProjectView GladeProjectView;
typedef struct _GladeProjectViewClass GladeProjectViewClass;
struct _GladeProjectView
......
......@@ -13,9 +13,9 @@ G_BEGIN_DECLS
#define GLADE_IS_PROJECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROJECT_WINDOW))
#define GLADE_PROJECT_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_PROJECT_WINDOW, GladeProjectWindowClass))
/* typedef struct _GladeProjectWindow GladeProjectWindow; */
typedef struct _GladeProjectWindow GladeProjectWindow;
typedef struct _GladeProjectWindowClass GladeProjectWindowClass;
typedef struct _GladeProjectWindowPriv GladeProjectWindowPriv;
typedef struct _GladeProjectWindowPriv GladeProjectWindowPriv;
/* A GladeProjectWindow specifies a loaded glade application.
* it contains pointers to all the components that make up
......
......@@ -306,7 +306,7 @@ glade_project_add_object (GladeProject *project, GObject *object)
g_list_free (children);
}
glade_widget_set_project (gwidget, project);
glade_widget_set_project (gwidget, (gpointer)project);
g_hash_table_insert (project->widget_old_names,
gwidget, g_strdup (glade_widget_get_name (gwidget)));
......@@ -744,7 +744,7 @@ glade_project_new_from_interface (GladeInterface *interface, const gchar *path)
for (i = 0; i < interface->n_toplevels; ++i)
{
widget = glade_widget_read (project, interface->toplevels[i]);
widget = glade_widget_read ((gpointer)project, interface->toplevels[i]);
if (!widget)
{
g_warning ("Failed to read a <widget> tag");
......
......@@ -2,8 +2,9 @@
#ifndef __GLADE_PROJECT_H__
#define __GLADE_PROJECT_H__
G_BEGIN_DECLS
#include "glade-widget.h"
G_BEGIN_DECLS
#define GLADE_TYPE_PROJECT (glade_project_get_type ())
#define GLADE_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PROJECT, GladeProject))
......@@ -12,6 +13,7 @@ G_BEGIN_DECLS
#define GLADE_IS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROJECT))
#define GLADE_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PROJECT, GladeProjectClass))
typedef struct _GladeProject GladeProject;
typedef struct _GladeProjectClass GladeProjectClass;
/* A GladeProject is well... a project nothing more nothing less. It is the
......
......@@ -585,14 +585,13 @@ glade_property_class_new_from_spec (GParamSpec *spec)
/**
* glade_property_class_is_visible:
* @property_class:
* @widget_class:
*
* TODO: write me
*
* Returns:
*/
gboolean
glade_property_class_is_visible (GladePropertyClass *property_class, GladeWidgetClass *widget_class)
glade_property_class_is_visible (GladePropertyClass *property_class)
{
return property_class->visible;
}
......@@ -761,8 +760,9 @@ glade_property_class_make_adjustment (GladePropertyClass *property_class)
* has Disabled="TRUE".
*/
gboolean
glade_property_class_update_from_node (GladeXmlNode *node,
GladeWidgetClass *widget_class,
glade_property_class_update_from_node (GladeXmlNode *node,
GModule *module,
GType widget_type,
GladePropertyClass **property_class)
{
GladePropertyClass *class;
......@@ -914,19 +914,19 @@ glade_property_class_update_from_node (GladeXmlNode *node,
{
gchar *symbol_name = glade_xml_get_content (child);
if (!widget_class->module)
if (!module)
g_warning (_("The property [%s] of the widget's class [%s] "
"needs a special \"set\" function, but there is "
"no library associated to this widget's class."),
class->name, widget_class->name);
class->name, g_type_name (widget_type));
if (!g_module_symbol (widget_class->module, symbol_name, (gpointer *)
if (!g_module_symbol (module, symbol_name, (gpointer *)
&class->set_function))
g_warning (_("Unable to get the \"set\" function [%s] of the "
"property [%s] of the widget's class [%s] from "
"the module [%s]: %s"),
symbol_name, class->name, widget_class->name,
g_module_name (widget_class->module), g_module_error ());
symbol_name, class->name, g_type_name (widget_type),
g_module_name (module), g_module_error ());
g_free (symbol_name);
}
......@@ -938,19 +938,19 @@ glade_property_class_update_from_node (GladeXmlNode *node,
{
gchar *symbol_name = glade_xml_get_content (child);
if (!widget_class->module)
if (!module)
g_warning (_("The property [%s] of the widget's class [%s] needs a "
"special \"get\" function, but there is no library "
"associated to this widget's class."),
class->name, widget_class->name);
class->name, g_type_name (widget_type));
if (!g_module_symbol(widget_class->module, symbol_name,
if (!g_module_symbol(module, symbol_name,
(gpointer *) &class->get_function))
g_warning (_("Unable to get the \"get\" function [%s] of the "
"property [%s] of the widget's class [%s] from the "
"module [%s]: %s"),
symbol_name, class->name, widget_class->name,
g_module_name (widget_class->module), g_module_error ());
symbol_name, class->name, g_type_name (widget_type),
g_module_name (module), g_module_error ());
g_free (symbol_name);
}
......@@ -959,19 +959,19 @@ glade_property_class_update_from_node (GladeXmlNode *node,
{
gchar *symbol_name = glade_xml_get_content (child);
if (!widget_class->module)
if (!module)
g_warning (_("The property [%s] of the widget's class [%s] needs a "
"special \"get\" function, but there is no library "
"associated to this widget's class."),
class->name, widget_class->name);
class->name, g_type_name (widget_type));
if (!g_module_symbol(widget_class->module, symbol_name,
if (!g_module_symbol(module, symbol_name,
(gpointer *) &class->verify_function))
g_warning (_("Unable to get the \"verify\" function [%s] of the "
"property [%s] of the widget's class [%s] from the "
"module [%s]: %s"),
symbol_name, class->name, widget_class->name,
g_module_name (widget_class->module), g_module_error ());
symbol_name, class->name, g_type_name (widget_type),
g_module_name (module), g_module_error ());
g_free (symbol_name);
}
......
......@@ -87,6 +87,8 @@ G_BEGIN_DECLS
#define GLADE_PROPERTY_CLASS(gpc) ((GladePropertyClass *) gpc)
#define GLADE_IS_PROPERTY_CLASS(gpc) (gpc != NULL)
typedef struct _GladePropertyClass GladePropertyClass;
struct _GladePropertyClass
{
GParamSpec *pspec; /* The Parameter Specification for this property.
......@@ -188,14 +190,14 @@ LIBGLADEUI_API GladePropertyClass *glade_property_class_new
LIBGLADEUI_API GladePropertyClass *glade_property_class_new_from_spec (GParamSpec *spec);
LIBGLADEUI_API GladePropertyClass *glade_property_class_clone (GladePropertyClass *property_class);
LIBGLADEUI_API void glade_property_class_free (GladePropertyClass *property_class);
LIBGLADEUI_API gboolean glade_property_class_is_visible (GladePropertyClass *property_class,
GladeWidgetClass *widget_class);
LIBGLADEUI_API gboolean glade_property_class_is_visible (GladePropertyClass *property_class);
LIBGLADEUI_API GValue *glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class,
const gchar *string);
LIBGLADEUI_API gchar *glade_property_class_make_string_from_gvalue (GladePropertyClass *property_class,
const GValue *value);
LIBGLADEUI_API gboolean glade_property_class_update_from_node (GladeXmlNode *node,
GladeWidgetClass *widget_class,
GModule *module,
GType widget_type,
GladePropertyClass **property_class);
LIBGLADEUI_API gchar *glade_property_class_make_string_from_flags (GladePropertyClass *class,
guint fvals,
......
......@@ -66,7 +66,7 @@ static GObjectClass* parent_class = NULL;
GladeProperty class methods
*******************************************************************************/
static GladeProperty *
glade_property_dup_impl (GladeProperty *template, GladeWidget *widget)
glade_property_dup_impl (GladeProperty *template, gpointer *widget)
{
GladeProperty *property;
......@@ -118,15 +118,15 @@ glade_property_set_property (GladeProperty *property, const GValue *value)
{
if (property->class->packing)
{
GladeWidget *parent = glade_widget_get_parent (property->widget);
GladeWidget *child = property->widget;
GladeWidget *parent = glade_widget_get_parent (GLADE_WIDGET (property->widget));
GladeWidget *child = GLADE_WIDGET (property->widget);
glade_widget_class_container_set_property
(parent->widget_class, parent->object, child->object,
property->class->id, value);
}
else
{
GObject *gobject = G_OBJECT (glade_widget_get_object (property->widget));
GObject *