[glade] Migrated hand coded _get_type() function to G_DEFINE_TYPE() macro plus identation fixes.
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Migrated hand coded _get_type() function to G_DEFINE_TYPE() macro plus identation fixes.
- Date: Sun, 25 Mar 2012 00:17:21 +0000 (UTC)
commit d251a195ff63ace7a99a2339fee2e0f86c376471
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Sat Mar 24 20:47:49 2012 -0300
Migrated hand coded _get_type() function to G_DEFINE_TYPE() macro plus identation fixes.
gladeui/glade-base-editor.c | 297 ++++++++++++------------
gladeui/glade-editable.c | 31 +--
gladeui/glade-editable.h | 15 +-
gladeui/glade-editor-property.c | 352 ++++++++++++++--------------
gladeui/glade-editor.c | 164 ++++++-------
gladeui/glade-widget-adaptor.c | 496 +++++++++++++++++++--------------------
6 files changed, 653 insertions(+), 702 deletions(-)
---
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index 9f13674..01e87f0 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -113,19 +113,19 @@ enum
N_PROPERTIES
};
+G_DEFINE_TYPE (GladeBaseEditor, glade_base_editor, GTK_TYPE_VBOX)
+
static GParamSpec *properties[N_PROPERTIES];
static guint glade_base_editor_signals[LAST_SIGNAL] = { 0 };
-static GtkVBoxClass *parent_class = NULL;
-
-static void glade_base_editor_set_container (GladeBaseEditor * editor,
- GObject * container);
-static void glade_base_editor_block_callbacks (GladeBaseEditor * editor,
+static void glade_base_editor_set_container (GladeBaseEditor *editor,
+ GObject *container);
+static void glade_base_editor_block_callbacks (GladeBaseEditor *editor,
gboolean block);
static void
-reset_child_types (GladeBaseEditor * editor)
+reset_child_types (GladeBaseEditor *editor)
{
GList *l;
ChildTypeTab *tab;
@@ -142,7 +142,7 @@ reset_child_types (GladeBaseEditor * editor)
static gint
-sort_type_by_hierarchy (ChildTypeTab * a, ChildTypeTab * b)
+sort_type_by_hierarchy (ChildTypeTab *a, ChildTypeTab *b)
{
if (g_type_is_a (a->parent_type, b->parent_type))
return -1;
@@ -151,7 +151,7 @@ sort_type_by_hierarchy (ChildTypeTab * a, ChildTypeTab * b)
}
static GtkTreeModel *
-get_children_model_for_type (GladeBaseEditor * editor, GType type)
+get_children_model_for_type (GladeBaseEditor *editor, GType type)
{
GList *l;
for (l = editor->priv->child_types; l; l = l->next)
@@ -164,7 +164,7 @@ get_children_model_for_type (GladeBaseEditor * editor, GType type)
}
static GtkTreeModel *
-get_children_model_for_child_type (GladeBaseEditor * editor, GType type)
+get_children_model_for_child_type (GladeBaseEditor *editor, GType type)
{
GList *l;
GtkTreeModel *model = NULL;
@@ -197,8 +197,9 @@ get_children_model_for_child_type (GladeBaseEditor * editor, GType type)
}
static gboolean
-glade_base_editor_get_type_info (GladeBaseEditor * e,
- GtkTreeIter * retiter, GType child_type, ...)
+glade_base_editor_get_type_info (GladeBaseEditor *e,
+ GtkTreeIter *retiter,
+ GType child_type, ...)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -231,8 +232,8 @@ glade_base_editor_get_type_info (GladeBaseEditor * e,
static gchar *
-glade_base_editor_get_display_name (GladeBaseEditor * editor,
- GladeWidget * gchild)
+glade_base_editor_get_display_name (GladeBaseEditor *editor,
+ GladeWidget *gchild)
{
gchar *retval;
g_signal_emit (editor,
@@ -242,8 +243,9 @@ glade_base_editor_get_display_name (GladeBaseEditor * editor,
}
static void
-glade_base_editor_fill_store_real (GladeBaseEditor * e,
- GladeWidget * gwidget, GtkTreeIter * parent)
+glade_base_editor_fill_store_real (GladeBaseEditor *e,
+ GladeWidget *gwidget,
+ GtkTreeIter *parent)
{
GList *children, *l;
GtkTreeIter iter;
@@ -253,7 +255,7 @@ glade_base_editor_fill_store_real (GladeBaseEditor * e,
for (l = children; l; l = l->next)
{
GladeWidget *gchild;
- GObject *child = (GObject *) l->data;
+ GObject *child = l->data;
gchar *type_name = NULL, *name;
gchild = glade_widget_get_from_gobject (child);
@@ -291,7 +293,7 @@ glade_base_editor_fill_store_real (GladeBaseEditor * e,
}
static void
-glade_base_editor_fill_store (GladeBaseEditor * e)
+glade_base_editor_fill_store (GladeBaseEditor *e)
{
gtk_tree_store_clear (GTK_TREE_STORE (e->priv->model));
gtk_tree_view_set_model (GTK_TREE_VIEW (e->priv->treeview), NULL);
@@ -303,7 +305,7 @@ glade_base_editor_fill_store (GladeBaseEditor * e)
}
static gboolean
-glade_base_editor_get_child_selected (GladeBaseEditor * e, GtkTreeIter * iter)
+glade_base_editor_get_child_selected (GladeBaseEditor *e, GtkTreeIter *iter)
{
GtkTreeSelection *sel =
gtk_tree_view_get_selection (GTK_TREE_VIEW (e->priv->treeview));
@@ -312,14 +314,15 @@ glade_base_editor_get_child_selected (GladeBaseEditor * e, GtkTreeIter * iter)
/* Forward declaration for glade_base_editor_project_widget_name_changed */
static void
-glade_base_editor_project_widget_name_changed (GladeProject * project,
- GladeWidget * widget,
- GladeBaseEditor * editor);
+glade_base_editor_project_widget_name_changed (GladeProject *project,
+ GladeWidget *widget,
+ GladeBaseEditor *editor);
static GladeWidget *
-glade_base_editor_delegate_build_child (GladeBaseEditor * editor,
- GladeWidget * parent, GType type)
+glade_base_editor_delegate_build_child (GladeBaseEditor *editor,
+ GladeWidget *parent,
+ GType type)
{
GladeWidget *child = NULL;
g_signal_emit (editor, glade_base_editor_signals[SIGNAL_BUILD_CHILD],
@@ -328,9 +331,9 @@ glade_base_editor_delegate_build_child (GladeBaseEditor * editor,
}
static gboolean
-glade_base_editor_delegate_delete_child (GladeBaseEditor * editor,
- GladeWidget * parent,
- GladeWidget * child)
+glade_base_editor_delegate_delete_child (GladeBaseEditor *editor,
+ GladeWidget *parent,
+ GladeWidget *child)
{
gboolean retval;
@@ -341,7 +344,7 @@ glade_base_editor_delegate_delete_child (GladeBaseEditor * editor,
}
static void
-glade_base_editor_name_activate (GtkEntry * entry, GladeWidget * gchild)
+glade_base_editor_name_activate (GtkEntry *entry, GladeWidget *gchild)
{
const gchar *text = gtk_entry_get_text (GTK_ENTRY (entry));
GladeBaseEditor *editor = g_object_get_data (G_OBJECT (entry), "editor");
@@ -357,8 +360,9 @@ glade_base_editor_name_activate (GtkEntry * entry, GladeWidget * gchild)
}
static void
-glade_base_editor_table_attach (GladeBaseEditor * e,
- GtkWidget * child1, GtkWidget * child2)
+glade_base_editor_table_attach (GladeBaseEditor *e,
+ GtkWidget *child1,
+ GtkWidget *child2)
{
GtkGrid *table = GTK_GRID (e->priv->table);
gint row = e->priv->row;
@@ -380,7 +384,7 @@ glade_base_editor_table_attach (GladeBaseEditor * e,
}
static void
-glade_base_editor_clear (GladeBaseEditor * editor)
+glade_base_editor_clear (GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
@@ -392,8 +396,8 @@ glade_base_editor_clear (GladeBaseEditor * editor)
}
static void
-glade_base_editor_treeview_cursor_changed (GtkTreeView * treeview,
- GladeBaseEditor * editor)
+glade_base_editor_treeview_cursor_changed (GtkTreeView *treeview,
+ GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
GtkTreeIter iter;
@@ -435,7 +439,7 @@ glade_base_editor_update_properties_idle (gpointer data)
/* XXX Can we make it crisper by removing this idle ?? */
static void
-glade_base_editor_update_properties (GladeBaseEditor * editor)
+glade_base_editor_update_properties (GladeBaseEditor *editor)
{
g_return_if_fail (GLADE_IS_BASE_EDITOR (editor));
@@ -445,7 +449,7 @@ glade_base_editor_update_properties (GladeBaseEditor * editor)
}
static void
-glade_base_editor_set_cursor (GladeBaseEditor * e, GtkTreeIter * iter)
+glade_base_editor_set_cursor (GladeBaseEditor *e, GtkTreeIter *iter)
{
GtkTreePath *path;
GtkTreeIter real_iter;
@@ -462,8 +466,9 @@ glade_base_editor_set_cursor (GladeBaseEditor * e, GtkTreeIter * iter)
}
static gboolean
-glade_base_editor_find_child_real (GladeBaseEditor * e,
- GladeWidget * gchild, GtkTreeIter * iter)
+glade_base_editor_find_child_real (GladeBaseEditor *e,
+ GladeWidget *gchild,
+ GtkTreeIter *iter)
{
GtkTreeModel *model = e->priv->model;
GtkTreeIter child_iter;
@@ -490,8 +495,9 @@ glade_base_editor_find_child_real (GladeBaseEditor * e,
}
static gboolean
-glade_base_editor_find_child (GladeBaseEditor * e,
- GladeWidget * child, GtkTreeIter * iter)
+glade_base_editor_find_child (GladeBaseEditor *e,
+ GladeWidget *child,
+ GtkTreeIter *iter)
{
if (gtk_tree_model_get_iter_first (e->priv->model, iter))
return glade_base_editor_find_child_real (e, child, iter);
@@ -500,7 +506,7 @@ glade_base_editor_find_child (GladeBaseEditor * e,
}
static void
-glade_base_editor_select_child (GladeBaseEditor * e, GladeWidget * child)
+glade_base_editor_select_child (GladeBaseEditor *e, GladeWidget *child)
{
GtkTreeIter iter;
@@ -509,8 +515,9 @@ glade_base_editor_select_child (GladeBaseEditor * e, GladeWidget * child)
}
static void
-glade_base_editor_child_change_type (GladeBaseEditor * editor,
- GtkTreeIter * iter, GType type)
+glade_base_editor_child_change_type (GladeBaseEditor *editor,
+ GtkTreeIter *iter,
+ GType type)
{
GladeWidget *gchild;
GObject *child;
@@ -565,7 +572,7 @@ glade_base_editor_child_change_type (GladeBaseEditor * editor,
}
static void
-glade_base_editor_type_changed (GtkComboBox * widget, GladeBaseEditor * e)
+glade_base_editor_type_changed (GtkComboBox *widget, GladeBaseEditor *e)
{
GtkTreeIter iter, combo_iter;
GType type;
@@ -582,10 +589,10 @@ glade_base_editor_type_changed (GtkComboBox * widget, GladeBaseEditor * e)
}
static void
-glade_base_editor_child_type_edited (GtkCellRendererText * cell,
- const gchar * path_string,
- const gchar * new_text,
- GladeBaseEditor * editor)
+glade_base_editor_child_type_edited (GtkCellRendererText *cell,
+ const gchar *path_string,
+ const gchar *new_text,
+ GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
GtkTreeModel *child_class;
@@ -639,8 +646,8 @@ glade_base_editor_child_type_edited (GtkCellRendererText * cell,
}
static void
-glade_base_editor_reorder_children (GladeBaseEditor * editor,
- GtkTreeIter * child)
+glade_base_editor_reorder_children (GladeBaseEditor *editor,
+ GtkTreeIter *child)
{
GtkTreeModel *model = editor->priv->model;
GladeWidget *gchild;
@@ -756,8 +763,8 @@ glade_base_editor_add_child (GladeBaseEditor *editor,
static void
-glade_base_editor_add_item_activate (GtkMenuItem * menuitem,
- GladeBaseEditor * e)
+glade_base_editor_add_item_activate (GtkMenuItem *menuitem,
+ GladeBaseEditor *e)
{
GObject *item = G_OBJECT (menuitem);
GType type = GPOINTER_TO_INT (g_object_get_data (item, "object_type"));
@@ -768,7 +775,7 @@ glade_base_editor_add_item_activate (GtkMenuItem * menuitem,
}
static GtkWidget *
-glade_base_editor_popup (GladeBaseEditor * editor, GladeWidget * widget)
+glade_base_editor_popup (GladeBaseEditor *editor, GladeWidget *widget)
{
GtkWidget *popup, *item;
GtkTreeModel *model;
@@ -853,8 +860,9 @@ glade_base_editor_popup (GladeBaseEditor * editor, GladeWidget * widget)
}
static gint
-glade_base_editor_popup_handler (GtkWidget * treeview,
- GdkEventButton * event, GladeBaseEditor * e)
+glade_base_editor_popup_handler (GtkWidget *treeview,
+ GdkEventButton *event,
+ GladeBaseEditor *e)
{
GtkTreePath *path;
GtkWidget *popup;
@@ -891,14 +899,14 @@ glade_base_editor_popup_handler (GtkWidget * treeview,
static void
-glade_base_editor_add_activate (GtkButton * button, GladeBaseEditor * e)
+glade_base_editor_add_activate (GtkButton *button, GladeBaseEditor *e)
{
if (e->priv->add_type)
glade_base_editor_add_child (e, e->priv->add_type, ADD_ROOT);
}
static void
-glade_base_editor_delete_child (GladeBaseEditor * e)
+glade_base_editor_delete_child (GladeBaseEditor *e)
{
GladeWidget *child, *gparent;
GtkTreeIter iter, parent;
@@ -927,9 +935,9 @@ glade_base_editor_delete_child (GladeBaseEditor * e)
static gboolean
-glade_base_editor_treeview_key_press_event (GtkWidget * widget,
- GdkEventKey * event,
- GladeBaseEditor * e)
+glade_base_editor_treeview_key_press_event (GtkWidget *widget,
+ GdkEventKey *event,
+ GladeBaseEditor *e)
{
if (event->keyval == GDK_KEY_Delete)
glade_base_editor_delete_child (e);
@@ -938,14 +946,15 @@ glade_base_editor_treeview_key_press_event (GtkWidget * widget,
}
static void
-glade_base_editor_delete_activate (GtkButton * button, GladeBaseEditor * e)
+glade_base_editor_delete_activate (GtkButton *button, GladeBaseEditor *e)
{
glade_base_editor_delete_child (e);
}
static gboolean
-glade_base_editor_is_child (GladeBaseEditor * e,
- GladeWidget * gchild, gboolean valid_type)
+glade_base_editor_is_child (GladeBaseEditor *e,
+ GladeWidget *gchild,
+ gboolean valid_type)
{
GladeWidget *gcontainer = glade_widget_get_parent (gchild);
@@ -983,7 +992,7 @@ glade_base_editor_is_child (GladeBaseEditor * e,
static gboolean
glade_base_editor_update_treeview_idle (gpointer data)
{
- GladeBaseEditor *e = ((GladeBaseEditor *) data);
+ GladeBaseEditor *e = data;
GList *selection = glade_project_selection_get (e->priv->project);
glade_base_editor_block_callbacks (e, TRUE);
@@ -1008,9 +1017,9 @@ glade_base_editor_update_treeview_idle (gpointer data)
}
static void
-glade_base_editor_project_widget_name_changed (GladeProject * project,
- GladeWidget * widget,
- GladeBaseEditor * editor)
+glade_base_editor_project_widget_name_changed (GladeProject *project,
+ GladeWidget *widget,
+ GladeBaseEditor *editor)
{
GladeWidget *selected_child;
GtkTreeIter iter;
@@ -1027,13 +1036,13 @@ glade_base_editor_project_widget_name_changed (GladeProject * project,
}
static void
-glade_base_editor_project_closed (GladeProject * project, GladeBaseEditor * e)
+glade_base_editor_project_closed (GladeProject *project, GladeBaseEditor *e)
{
glade_base_editor_set_container (e, NULL);
}
static void
-glade_base_editor_reorder (GladeBaseEditor * editor, GtkTreeIter * iter)
+glade_base_editor_reorder (GladeBaseEditor *editor, GtkTreeIter *iter)
{
GladeBaseEditorPrivate *e = editor->priv;
GladeWidget *gchild, *gparent;
@@ -1073,7 +1082,7 @@ glade_base_editor_reorder (GladeBaseEditor * editor, GtkTreeIter * iter)
static gboolean
glade_base_editor_drag_and_drop_idle (gpointer data)
{
- GladeBaseEditor *e = (GladeBaseEditor *) data;
+ GladeBaseEditor *e = data;
glade_base_editor_reorder (e, &e->priv->iter);
gtk_tree_view_expand_all (GTK_TREE_VIEW (e->priv->treeview));
@@ -1084,9 +1093,10 @@ glade_base_editor_drag_and_drop_idle (gpointer data)
}
static void
-glade_base_editor_row_inserted (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, GladeBaseEditor * e)
+glade_base_editor_row_inserted (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GladeBaseEditor *e)
{
e->priv->iter = *iter;
glade_base_editor_block_callbacks (e, TRUE);
@@ -1094,9 +1104,9 @@ glade_base_editor_row_inserted (GtkTreeModel * model,
}
static void
-glade_base_editor_project_remove_widget (GladeProject * project,
- GladeWidget * widget,
- GladeBaseEditor * e)
+glade_base_editor_project_remove_widget (GladeProject *project,
+ GladeWidget *widget,
+ GladeBaseEditor *e)
{
if (widget == e->priv->gcontainer)
{
@@ -1120,8 +1130,9 @@ glade_base_editor_project_remove_widget (GladeProject * project,
}
static void
-glade_base_editor_project_add_widget (GladeProject * project,
- GladeWidget * widget, GladeBaseEditor * e)
+glade_base_editor_project_add_widget (GladeProject *project,
+ GladeWidget *widget,
+ GladeBaseEditor *e)
{
if (e->priv->updating_treeview)
return;
@@ -1138,11 +1149,12 @@ glade_base_editor_project_add_widget (GladeProject * project,
}
static gboolean
-glade_base_editor_update_display_name (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, gpointer data)
+glade_base_editor_update_display_name (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
- GladeBaseEditor *editor = (GladeBaseEditor *) data;
+ GladeBaseEditor *editor = data;
GladeWidget *gchild;
gchar *name;
@@ -1159,9 +1171,10 @@ glade_base_editor_update_display_name (GtkTreeModel * model,
}
static void
-glade_base_editor_project_changed (GladeProject * project,
- GladeCommand * command,
- gboolean forward, GladeBaseEditor * editor)
+glade_base_editor_project_changed (GladeProject *project,
+ GladeCommand *command,
+ gboolean forward,
+ GladeBaseEditor *editor)
{
gtk_tree_model_foreach (editor->priv->model,
glade_base_editor_update_display_name, editor);
@@ -1204,7 +1217,7 @@ glade_base_editor_project_disconnect (GladeBaseEditor * editor)
}
static void
-glade_base_editor_set_container (GladeBaseEditor * editor, GObject * container)
+glade_base_editor_set_container (GladeBaseEditor *editor, GObject *container)
{
GladeBaseEditorPrivate *e = editor->priv;
@@ -1261,17 +1274,17 @@ glade_base_editor_set_container (GladeBaseEditor * editor, GObject * container)
/*************************** GladeBaseEditor Class ****************************/
static void
-glade_base_editor_finalize (GObject * object)
+glade_base_editor_finalize (GObject *object)
{
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
g_free (cobj->priv);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (glade_base_editor_parent_class)->finalize (object);
}
static void
-glade_base_editor_dispose (GObject * object)
+glade_base_editor_dispose (GObject *object)
{
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
@@ -1280,13 +1293,14 @@ glade_base_editor_dispose (GObject * object)
glade_base_editor_project_disconnect (cobj);
cobj->priv->project = NULL;
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (glade_base_editor_parent_class)->dispose (object);
}
static void
-glade_base_editor_set_property (GObject * object,
+glade_base_editor_set_property (GObject *object,
guint prop_id,
- const GValue * value, GParamSpec * pspec)
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeBaseEditor *editor = GLADE_BASE_EDITOR (object);
@@ -1302,9 +1316,10 @@ glade_base_editor_set_property (GObject * object,
}
static void
-glade_base_editor_get_property (GObject * object,
+glade_base_editor_get_property (GObject *object,
guint prop_id,
- GValue * value, GParamSpec * pspec)
+ GValue *value,
+ GParamSpec *pspec)
{
GladeBaseEditor *editor = GLADE_BASE_EDITOR (object);
@@ -1322,8 +1337,9 @@ glade_base_editor_get_property (GObject * object,
/* Default handlers */
static gboolean
-glade_base_editor_change_type (GladeBaseEditor * editor,
- GladeWidget * gchild, GType type)
+glade_base_editor_change_type (GladeBaseEditor *editor,
+ GladeWidget *gchild,
+ GType type)
{
GladeWidget *parent, *gchild_new;
GList *children, *l;
@@ -1411,15 +1427,16 @@ glade_base_editor_change_type (GladeBaseEditor * editor,
}
static gchar *
-glade_base_editor_get_display_name_impl (GladeBaseEditor * editor,
- GladeWidget * gchild)
+glade_base_editor_get_display_name_impl (GladeBaseEditor *editor,
+ GladeWidget *gchild)
{
return g_strdup (glade_widget_get_name (gchild));
}
static GladeWidget *
-glade_base_editor_build_child (GladeBaseEditor * editor,
- GladeWidget * gparent, GType type)
+glade_base_editor_build_child (GladeBaseEditor *editor,
+ GladeWidget *gparent,
+ GType type)
{
return glade_command_create (glade_widget_adaptor_get_by_type (type),
gparent, NULL,
@@ -1427,8 +1444,9 @@ glade_base_editor_build_child (GladeBaseEditor * editor,
}
static gboolean
-glade_base_editor_move_child (GladeBaseEditor * editor,
- GladeWidget * gparent, GladeWidget * gchild)
+glade_base_editor_move_child (GladeBaseEditor *editor,
+ GladeWidget *gparent,
+ GladeWidget *gchild)
{
GList list = { 0, };
@@ -1442,9 +1460,9 @@ glade_base_editor_move_child (GladeBaseEditor * editor,
}
static gboolean
-glade_base_editor_delete_child_impl (GladeBaseEditor * editor,
- GladeWidget * gparent,
- GladeWidget * gchild)
+glade_base_editor_delete_child_impl (GladeBaseEditor *editor,
+ GladeWidget *gparent,
+ GladeWidget *gchild)
{
GList list = { 0, };
@@ -1455,11 +1473,11 @@ glade_base_editor_delete_child_impl (GladeBaseEditor * editor,
}
static void
-glade_base_editor_class_init (GladeBaseEditorClass * klass)
+glade_base_editor_class_init (GladeBaseEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
+ glade_base_editor_parent_class = g_type_class_peek_parent (klass);
object_class->finalize = glade_base_editor_finalize;
object_class->dispose = glade_base_editor_dispose;
@@ -1591,7 +1609,7 @@ glade_base_editor_class_init (GladeBaseEditorClass * klass)
}
static void
-glade_base_editor_block_callbacks (GladeBaseEditor * editor, gboolean block)
+glade_base_editor_block_callbacks (GladeBaseEditor *editor, gboolean block)
{
GladeBaseEditorPrivate *e = editor->priv;
if (block)
@@ -1632,7 +1650,7 @@ glade_base_editor_block_callbacks (GladeBaseEditor * editor, gboolean block)
}
static void
-glade_base_editor_realize_callback (GtkWidget * widget, gpointer user_data)
+glade_base_editor_realize_callback (GtkWidget *widget, gpointer user_data)
{
GladeBaseEditor *editor = GLADE_BASE_EDITOR (widget);
@@ -1646,9 +1664,10 @@ glade_base_editor_realize_callback (GtkWidget * widget, gpointer user_data)
static void
-glade_base_editor_switch_page (GtkNotebook * notebook,
- GtkWidget * page,
- guint page_num, GladeBaseEditor * editor)
+glade_base_editor_switch_page (GtkNotebook *notebook,
+ GtkWidget *page,
+ guint page_num,
+ GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
@@ -1675,7 +1694,7 @@ glade_base_editor_switch_page (GtkNotebook * notebook,
static void
-glade_base_editor_init (GladeBaseEditor * editor)
+glade_base_editor_init (GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e;
GtkCellRenderer *renderer;
@@ -1838,32 +1857,6 @@ glade_base_editor_init (GladeBaseEditor * editor)
}
/********************************* Public API *********************************/
-GType
-glade_base_editor_get_type ()
-{
- static GType type = 0;
-
- if (type == 0)
- {
- static const GTypeInfo our_info = {
- sizeof (GladeBaseEditorClass),
- NULL,
- NULL,
- (GClassInitFunc) glade_base_editor_class_init,
- NULL,
- NULL,
- sizeof (GladeBaseEditor),
- 0,
- (GInstanceInitFunc) glade_base_editor_init,
- };
-
- type = g_type_register_static (GTK_TYPE_VBOX, "GladeBaseEditor",
- &our_info, 0);
- }
-
- return type;
-}
-
/**
* glade_base_editor_new:
* @container: a container this new editor will edit.
@@ -1879,7 +1872,7 @@ glade_base_editor_get_type ()
* Returns: a new GladeBaseEditor.
*/
GladeBaseEditor *
-glade_base_editor_new (GObject * container, GladeEditable * main_editable, ...)
+glade_base_editor_new (GObject *container, GladeEditable *main_editable, ...)
{
ChildTypeTab *child_type;
GladeWidget *gcontainer;
@@ -1966,8 +1959,7 @@ glade_base_editor_new (GObject * container, GladeEditable * main_editable, ...)
*
*/
void
-glade_base_editor_append_types (GladeBaseEditor * editor, GType parent_type,
- ...)
+glade_base_editor_append_types (GladeBaseEditor *editor, GType parent_type, ...)
{
ChildTypeTab *child_type;
GtkTreeIter iter;
@@ -2009,8 +2001,8 @@ glade_base_editor_append_types (GladeBaseEditor * editor, GType parent_type,
* NOTE: This function is intended to be used in "child-selected" callbacks
*/
void
-glade_base_editor_add_default_properties (GladeBaseEditor * editor,
- GladeWidget * gchild)
+glade_base_editor_add_default_properties (GladeBaseEditor *editor,
+ GladeWidget *gchild)
{
GtkTreeIter combo_iter;
GtkWidget *label, *entry;
@@ -2076,8 +2068,9 @@ glade_base_editor_add_default_properties (GladeBaseEditor * editor,
* NOTE: This function is intended to be used in "child-selected" callbacks
*/
void
-glade_base_editor_add_properties (GladeBaseEditor * editor,
- GladeWidget * gchild, gboolean packing, ...)
+glade_base_editor_add_properties (GladeBaseEditor *editor,
+ GladeWidget *gchild,
+ gboolean packing, ...)
{
GladeEditorProperty *eprop;
va_list args;
@@ -2114,8 +2107,9 @@ glade_base_editor_add_properties (GladeBaseEditor * editor,
* NOTE: This function is intended to be used in "child-selected" callbacks
*/
void
-glade_base_editor_add_editable (GladeBaseEditor * editor,
- GladeWidget * gchild, GladeEditorPageType page)
+glade_base_editor_add_editable (GladeBaseEditor *editor,
+ GladeWidget *gchild,
+ GladeEditorPageType page)
{
GladeEditable *editable;
gint row;
@@ -2150,7 +2144,7 @@ glade_base_editor_add_editable (GladeBaseEditor * editor,
* NOTE: This function is intended to be used in "child-selected" callbacks
*/
void
-glade_base_editor_add_label (GladeBaseEditor * editor, gchar * str)
+glade_base_editor_add_label (GladeBaseEditor *editor, gchar *str)
{
GtkWidget *label;
gchar *markup;
@@ -2182,7 +2176,7 @@ glade_base_editor_add_label (GladeBaseEditor * editor, gchar * str)
* Shows/hide @editor 's signal editor
*/
void
-glade_base_editor_set_show_signal_editor (GladeBaseEditor * editor,
+glade_base_editor_set_show_signal_editor (GladeBaseEditor *editor,
gboolean val)
{
g_return_if_fail (GLADE_IS_BASE_EDITOR (editor));
@@ -2196,7 +2190,7 @@ glade_base_editor_set_show_signal_editor (GladeBaseEditor * editor,
/* Convenience functions */
static void
-glade_base_editor_help (GtkButton * button, gchar * markup)
+glade_base_editor_help (GtkButton *button, gchar *markup)
{
GtkWidget *dialog;
@@ -2221,8 +2215,9 @@ glade_base_editor_help (GtkButton * button, gchar * markup)
* Returns: the newly created window
*/
GtkWidget *
-glade_base_editor_pack_new_window (GladeBaseEditor * editor,
- gchar * title, gchar * help_markup)
+glade_base_editor_pack_new_window (GladeBaseEditor *editor,
+ gchar *title,
+ gchar *help_markup)
{
GtkWidget *window, *buttonbox, *button;
gchar *real_title;
diff --git a/gladeui/glade-editable.c b/gladeui/glade-editable.c
index 33c37cf..d205c39 100644
--- a/gladeui/glade-editable.c
+++ b/gladeui/glade-editable.c
@@ -34,6 +34,8 @@
#include "glade-widget.h"
#include "glade-editable.h"
+G_DEFINE_INTERFACE (GladeEditable, glade_editable, GTK_TYPE_WIDGET);
+
static GQuark glade_editable_project_quark = 0;
static GQuark glade_editable_widget_quark = 0;
static GQuark glade_editable_loading_quark = 0;
@@ -95,7 +97,7 @@ glade_editable_load_default (GladeEditable *editable,
}
static void
-glade_editable_class_init (GladeEditableIface *iface)
+glade_editable_default_init (GladeEditableIface *iface)
{
glade_editable_project_quark = g_quark_from_static_string ("glade-editable-project-quark");
glade_editable_widget_quark = g_quark_from_static_string ("glade-editable-widget-quark");
@@ -104,25 +106,6 @@ glade_editable_class_init (GladeEditableIface *iface)
iface->load = glade_editable_load_default;
}
-GType
-glade_editable_get_type (void)
-{
- static GType editable_type = 0;
-
- if (!editable_type)
- {
- editable_type =
- g_type_register_static_simple (G_TYPE_INTERFACE, "GladeEditable",
- sizeof (GladeEditableIface),
- (GClassInitFunc)
- glade_editable_class_init, 0, NULL,
- (GTypeFlags) 0);
- g_type_interface_add_prerequisite (editable_type, GTK_TYPE_WIDGET);
- }
-
- return editable_type;
-}
-
/**
* glade_editable_load:
* @editable: A #GladeEditable
@@ -133,7 +116,7 @@ glade_editable_get_type (void)
* until its loaded with another widget or %NULL)
*/
void
-glade_editable_load (GladeEditable * editable, GladeWidget * widget)
+glade_editable_load (GladeEditable *editable, GladeWidget *widget)
{
GladeEditableIface *iface;
g_return_if_fail (GLADE_IS_EDITABLE (editable));
@@ -164,7 +147,7 @@ glade_editable_load (GladeEditable * editable, GladeWidget * widget)
* to its embedded editable.
*/
void
-glade_editable_set_show_name (GladeEditable * editable, gboolean show_name)
+glade_editable_set_show_name (GladeEditable *editable, gboolean show_name)
{
GladeEditableIface *iface;
g_return_if_fail (GLADE_IS_EDITABLE (editable));
@@ -176,13 +159,13 @@ glade_editable_set_show_name (GladeEditable * editable, gboolean show_name)
}
GladeWidget *
-glade_editable_loaded_widget (GladeEditable *editable)
+glade_editable_loaded_widget (GladeEditable *editable)
{
return g_object_get_qdata (G_OBJECT (editable), glade_editable_widget_quark);
}
gboolean
-glade_editable_loading (GladeEditable *editable)
+glade_editable_loading (GladeEditable *editable)
{
return GPOINTER_TO_INT (g_object_get_qdata (G_OBJECT (editable), glade_editable_loading_quark));
}
diff --git a/gladeui/glade-editable.h b/gladeui/glade-editable.h
index 6317e92..703f969 100644
--- a/gladeui/glade-editable.h
+++ b/gladeui/glade-editable.h
@@ -8,13 +8,14 @@ G_BEGIN_DECLS
#define GLADE_TYPE_EDITABLE (glade_editable_get_type ())
#define GLADE_EDITABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EDITABLE, GladeEditable))
-#define GLADE_EDITABLE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GLADE_TYPE_EDITABLE, GladeEditableIface))
+#define GLADE_EDITABLE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GLADE_TYPE_EDITABLE, GladeEditableInterface))
#define GLADE_IS_EDITABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EDITABLE))
-#define GLADE_EDITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GLADE_TYPE_EDITABLE, GladeEditableIface))
+#define GLADE_EDITABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GLADE_TYPE_EDITABLE, GladeEditableInterface))
typedef struct _GladeEditable GladeEditable; /* Dummy typedef */
-typedef struct _GladeEditableIface GladeEditableIface;
+typedef struct _GladeEditableIface GladeEditableInterface; /* used by G_DEFINE_INTERFACE */
+typedef struct _GladeEditableIface GladeEditableIface; /* keep this symbol for binary compatibility */
typedef enum
{
@@ -41,10 +42,10 @@ GType glade_editable_get_type (void) G_GNUC_CONST;
void glade_editable_load (GladeEditable *editable,
GladeWidget *widget);
-void glade_editable_set_show_name (GladeEditable *editable,
- gboolean show_name);
-GladeWidget *glade_editable_loaded_widget (GladeEditable *editable);
-gboolean glade_editable_loading (GladeEditable *editable);
+void glade_editable_set_show_name (GladeEditable *editable,
+ gboolean show_name);
+GladeWidget *glade_editable_loaded_widget (GladeEditable *editable);
+gboolean glade_editable_loading (GladeEditable *editable);
void glade_editable_block (GladeEditable *editable);
void glade_editable_unblock (GladeEditable *editable);
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index d390a25..f75016d 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -102,18 +102,19 @@ struct _GladeEditorPropertyPrivate
*/
};
+G_DEFINE_TYPE (GladeEditorProperty, glade_editor_property, GTK_TYPE_HBOX);
/*******************************************************************************
GladeEditorPropertyClass
*******************************************************************************/
/* declare this forwardly for the finalize routine */
-static void glade_editor_property_load_common (GladeEditorProperty * eprop,
- GladeProperty * property);
+static void glade_editor_property_load_common (GladeEditorProperty *eprop,
+ GladeProperty *property);
static void
-glade_editor_property_commit_common (GladeEditorProperty * eprop,
- GValue * value)
+glade_editor_property_commit_common (GladeEditorProperty *eprop,
+ GValue *value)
{
if (eprop->priv->use_command == FALSE)
glade_property_set_value (eprop->priv->property, value);
@@ -128,8 +129,8 @@ glade_editor_property_commit_common (GladeEditorProperty * eprop,
}
void
-glade_editor_property_commit_no_callback (GladeEditorProperty * eprop,
- GValue * value)
+glade_editor_property_commit_no_callback (GladeEditorProperty *eprop,
+ GValue *value)
{
g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
@@ -176,11 +177,11 @@ glade_editor_property_loading (GladeEditorProperty *eprop)
}
static void
-glade_editor_property_tooltip_cb (GladeProperty * property,
- const gchar * tooltip,
- const gchar * insensitive,
- const gchar * support,
- GladeEditorProperty * eprop)
+glade_editor_property_tooltip_cb (GladeProperty *property,
+ const gchar *tooltip,
+ const gchar *insensitive,
+ const gchar *support,
+ GladeEditorProperty *eprop)
{
const gchar *choice_tooltip;
@@ -195,9 +196,9 @@ glade_editor_property_tooltip_cb (GladeProperty * property,
}
static void
-glade_editor_property_sensitivity_cb (GladeProperty * property,
- GParamSpec * pspec,
- GladeEditorProperty * eprop)
+glade_editor_property_sensitivity_cb (GladeProperty *property,
+ GParamSpec *pspec,
+ GladeEditorProperty *eprop)
{
gboolean sensitive = glade_property_get_sensitive (eprop->priv->property);
gboolean support_sensitive =
@@ -210,17 +211,17 @@ glade_editor_property_sensitivity_cb (GladeProperty * property,
}
static void
-glade_editor_property_value_changed_cb (GladeProperty * property,
- GValue * old_value,
- GValue * value,
- GladeEditorProperty * eprop)
+glade_editor_property_value_changed_cb (GladeProperty *property,
+ GValue *old_value,
+ GValue *value,
+ GladeEditorProperty *eprop)
{
g_assert (eprop->priv->property == property);
glade_editor_property_load (eprop, eprop->priv->property);
}
static void
-glade_editor_property_fix_label (GladeEditorProperty * eprop)
+glade_editor_property_fix_label (GladeEditorProperty *eprop)
{
gchar *text = NULL;
@@ -246,16 +247,17 @@ glade_editor_property_fix_label (GladeEditorProperty * eprop)
}
static void
-glade_editor_property_state_cb (GladeProperty * property,
- GParamSpec * pspec, GladeEditorProperty * eprop)
+glade_editor_property_state_cb (GladeProperty *property,
+ GParamSpec *pspec,
+ GladeEditorProperty *eprop)
{
glade_editor_property_fix_label (eprop);
}
static void
-glade_editor_property_enabled_cb (GladeProperty * property,
- GParamSpec * pspec,
- GladeEditorProperty * eprop)
+glade_editor_property_enabled_cb (GladeProperty *property,
+ GParamSpec *pspec,
+ GladeEditorProperty *eprop)
{
gboolean enabled;
g_assert (eprop->priv->property == property);
@@ -276,8 +278,8 @@ glade_editor_property_enabled_cb (GladeProperty * property,
}
static void
-glade_editor_property_enabled_toggled_cb (GtkWidget * check,
- GladeEditorProperty * eprop)
+glade_editor_property_enabled_toggled_cb (GtkWidget *check,
+ GladeEditorProperty *eprop)
{
glade_property_set_enabled (eprop->priv->property,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
@@ -285,9 +287,9 @@ glade_editor_property_enabled_toggled_cb (GtkWidget * check,
}
static gboolean
-glade_editor_property_button_pressed (GtkWidget * widget,
- GdkEventButton * event,
- GladeEditorProperty * eprop)
+glade_editor_property_button_pressed (GtkWidget *widget,
+ GdkEventButton *event,
+ GladeEditorProperty *eprop)
{
if (glade_popup_is_popup_event (event))
{
@@ -301,7 +303,7 @@ glade_editor_property_button_pressed (GtkWidget * widget,
static GObject *
glade_editor_property_constructor (GType type,
guint n_construct_properties,
- GObjectConstructParam * construct_properties)
+ GObjectConstructParam *construct_properties)
{
GObject *obj;
GladeEditorProperty *eprop;
@@ -368,7 +370,7 @@ glade_editor_property_constructor (GType type,
}
static void
-glade_editor_property_finalize (GObject * object)
+glade_editor_property_finalize (GObject *object)
{
GladeEditorProperty *eprop = GLADE_EDITOR_PROPERTY (object);
@@ -379,7 +381,7 @@ glade_editor_property_finalize (GObject * object)
}
static void
-glade_editor_property_dispose (GObject * object)
+glade_editor_property_dispose (GObject *object)
{
GladeEditorProperty *eprop = GLADE_EDITOR_PROPERTY (object);
@@ -393,9 +395,10 @@ glade_editor_property_dispose (GObject * object)
}
static void
-glade_editor_property_set_property (GObject * object,
+glade_editor_property_set_property (GObject *object,
guint prop_id,
- const GValue * value, GParamSpec * pspec)
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeEditorProperty *eprop = GLADE_EDITOR_PROPERTY (object);
@@ -414,9 +417,10 @@ glade_editor_property_set_property (GObject * object,
}
static void
-glade_editor_property_real_get_property (GObject * object,
+glade_editor_property_real_get_property (GObject *object,
guint prop_id,
- GValue * value, GParamSpec * pspec)
+ GValue *value,
+ GParamSpec *pspec)
{
GladeEditorProperty *eprop = GLADE_EDITOR_PROPERTY (object);
@@ -435,8 +439,8 @@ glade_editor_property_real_get_property (GObject * object,
}
static void
-glade_eprop_property_finalized (GladeEditorProperty * eprop,
- GladeProperty * where_property_was)
+glade_eprop_property_finalized (GladeEditorProperty *eprop,
+ GladeProperty *where_property_was)
{
eprop->priv->tooltip_id = 0;
eprop->priv->sensitive_id = 0;
@@ -449,8 +453,8 @@ glade_eprop_property_finalized (GladeEditorProperty * eprop,
}
static void
-glade_editor_property_load_common (GladeEditorProperty * eprop,
- GladeProperty * property)
+glade_editor_property_load_common (GladeEditorProperty *eprop,
+ GladeProperty *property)
{
/* NOTE THIS CODE IS FINALIZE SAFE */
@@ -551,7 +555,7 @@ glade_editor_property_load_common (GladeEditorProperty * eprop,
}
static void
-glade_editor_property_init (GladeEditorProperty * eprop)
+glade_editor_property_init (GladeEditorProperty *eprop)
{
eprop->priv =
G_TYPE_INSTANCE_GET_PRIVATE ((eprop),
@@ -561,7 +565,7 @@ glade_editor_property_init (GladeEditorProperty * eprop)
}
static void
-glade_editor_property_class_init (GladeEditorPropertyClass * eprop_class)
+glade_editor_property_class_init (GladeEditorPropertyClass *eprop_class)
{
GObjectClass *object_class;
g_return_if_fail (eprop_class != NULL);
@@ -636,32 +640,6 @@ glade_editor_property_class_init (GladeEditorPropertyClass * eprop_class)
g_type_class_add_private (eprop_class, sizeof (GladeEditorPropertyPrivate));
}
-
-GType
-glade_editor_property_get_type (void)
-{
- static GType property_type = 0;
-
- if (!property_type)
- {
- static const GTypeInfo property_info = {
- sizeof (GladeEditorPropertyClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) glade_editor_property_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GladeEditorProperty),
- 0, /* n_preallocs */
- (GInstanceInitFunc) glade_editor_property_init,
- };
- property_type =
- g_type_register_static (GTK_TYPE_HBOX,
- "GladeEditorProperty", &property_info, 0);
- }
- return property_type;
-}
-
/*******************************************************************************
GladeEditorPropertyNumericClass
*******************************************************************************/
@@ -678,14 +656,14 @@ GLADE_MAKE_EPROP (GladeEPropNumeric, glade_eprop_numeric)
#define GLADE_IS_EPROP_NUMERIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_NUMERIC))
#define GLADE_IS_EPROP_NUMERIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_NUMERIC))
#define GLADE_EPROP_NUMERIC_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_NUMERIC, GladeEPropNumericClass))
- static void glade_eprop_numeric_finalize (GObject * object)
+ static void glade_eprop_numeric_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_numeric_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_numeric_load (GladeEditorProperty *eprop, GladeProperty *property)
{
gfloat val = 0.0F;
GladeEPropNumeric *eprop_numeric = GLADE_EPROP_NUMERIC (eprop);
@@ -725,7 +703,7 @@ glade_eprop_numeric_load (GladeEditorProperty * eprop, GladeProperty * property)
static void
-glade_eprop_numeric_changed (GtkWidget * spin, GladeEditorProperty * eprop)
+glade_eprop_numeric_changed (GtkWidget *spin, GladeEditorProperty *eprop)
{
GValue val = { 0, };
GParamSpec *pspec;
@@ -769,7 +747,7 @@ glade_eprop_numeric_changed (GtkWidget * spin, GladeEditorProperty * eprop)
}
static GtkWidget *
-glade_eprop_numeric_create_input (GladeEditorProperty * eprop)
+glade_eprop_numeric_create_input (GladeEditorProperty *eprop)
{
GladeEPropNumeric *eprop_numeric = GLADE_EPROP_NUMERIC (eprop);
GtkAdjustment *adjustment;
@@ -805,14 +783,14 @@ GLADE_MAKE_EPROP (GladeEPropEnum, glade_eprop_enum)
#define GLADE_IS_EPROP_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_ENUM))
#define GLADE_IS_EPROP_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_ENUM))
#define GLADE_EPROP_ENUM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_ENUM, GladeEPropEnumClass))
- static void glade_eprop_enum_finalize (GObject * object)
+ static void glade_eprop_enum_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_enum_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_enum_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropEnum *eprop_enum = GLADE_EPROP_ENUM (eprop);
GParamSpec *pspec;
@@ -840,7 +818,7 @@ glade_eprop_enum_load (GladeEditorProperty * eprop, GladeProperty * property)
}
static void
-glade_eprop_enum_changed (GtkWidget * combo_box, GladeEditorProperty * eprop)
+glade_eprop_enum_changed (GtkWidget *combo_box, GladeEditorProperty *eprop)
{
gint ival;
GValue val = { 0, };
@@ -865,7 +843,7 @@ glade_eprop_enum_changed (GtkWidget * combo_box, GladeEditorProperty * eprop)
}
static GtkWidget *
-glade_eprop_enum_create_input (GladeEditorProperty * eprop)
+glade_eprop_enum_create_input (GladeEditorProperty *eprop)
{
GladeEPropEnum *eprop_enum = GLADE_EPROP_ENUM (eprop);
GladePropertyClass *klass;
@@ -933,7 +911,7 @@ GLADE_MAKE_EPROP (GladeEPropFlags, glade_eprop_flags)
#define GLADE_IS_EPROP_FLAGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_FLAGS))
#define GLADE_IS_EPROP_FLAGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_FLAGS))
#define GLADE_EPROP_FLAGS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_FLAGS, GladeEPropFlagsClass))
- static void glade_eprop_flags_finalize (GObject * object)
+ static void glade_eprop_flags_finalize (GObject *object)
{
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS (object);
@@ -944,7 +922,7 @@ GLADE_MAKE_EPROP (GladeEPropFlags, glade_eprop_flags)
}
static void
-glade_eprop_flags_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_flags_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS (eprop);
GFlagsClass *klass;
@@ -1006,8 +984,9 @@ glade_eprop_flags_load (GladeEditorProperty * eprop, GladeProperty * property)
static void
-flag_toggled_direct (GtkCellRendererToggle * cell,
- gchar * path_string, GladeEditorProperty * eprop)
+flag_toggled_direct (GtkCellRendererToggle *cell,
+ gchar *path_string,
+ GladeEditorProperty *eprop)
{
GtkTreeIter iter;
guint new_value = 0;
@@ -1074,7 +1053,7 @@ flag_toggled_direct (GtkCellRendererToggle * cell,
}
static GtkWidget *
-glade_eprop_flags_create_treeview (GladeEditorProperty * eprop)
+glade_eprop_flags_create_treeview (GladeEditorProperty *eprop)
{
GtkWidget *scrolled_window;
GtkWidget *tree_view;
@@ -1125,7 +1104,7 @@ glade_eprop_flags_create_treeview (GladeEditorProperty * eprop)
}
static void
-glade_eprop_flags_show_dialog (GtkWidget * button, GladeEditorProperty * eprop)
+glade_eprop_flags_show_dialog (GtkWidget *button, GladeEditorProperty *eprop)
{
GtkWidget *dialog;
GtkWidget *view;
@@ -1175,7 +1154,7 @@ glade_eprop_flags_show_dialog (GtkWidget * button, GladeEditorProperty * eprop)
static GtkWidget *
-glade_eprop_flags_create_input (GladeEditorProperty * eprop)
+glade_eprop_flags_create_input (GladeEditorProperty *eprop)
{
GtkWidget *vbox, *hbox, *button, *widget;
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS (eprop);
@@ -1220,14 +1199,14 @@ GLADE_MAKE_EPROP (GladeEPropColor, glade_eprop_color)
#define GLADE_IS_EPROP_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_COLOR))
#define GLADE_IS_EPROP_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_COLOR))
#define GLADE_EPROP_COLOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_COLOR, GladeEPropColorClass))
-static void glade_eprop_color_finalize (GObject * object)
+static void glade_eprop_color_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_color_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_color_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropColor *eprop_color = GLADE_EPROP_COLOR (eprop);
GParamSpec *pspec;
@@ -1282,7 +1261,7 @@ glade_eprop_color_load (GladeEditorProperty * eprop, GladeProperty * property)
}
static void
-glade_eprop_color_changed (GtkWidget * button, GladeEditorProperty * eprop)
+glade_eprop_color_changed (GtkWidget *button, GladeEditorProperty *eprop)
{
GdkColor color = { 0, };
GdkRGBA rgba = { 0, };
@@ -1313,7 +1292,7 @@ glade_eprop_color_changed (GtkWidget * button, GladeEditorProperty * eprop)
}
static GtkWidget *
-glade_eprop_color_create_input (GladeEditorProperty * eprop)
+glade_eprop_color_create_input (GladeEditorProperty *eprop)
{
GladeEPropColor *eprop_color = GLADE_EPROP_COLOR (eprop);
GtkWidget *hbox;
@@ -1358,15 +1337,15 @@ GLADE_MAKE_EPROP (GladeEPropNamedIcon, glade_eprop_named_icon)
#define GLADE_IS_EPROP_NAMED_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_NAMED_ICON))
#define GLADE_IS_EPROP_NAMED_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_NAMED_ICON))
#define GLADE_EPROP_NAMED_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_NAMED_ICON, GladeEPropNamedIconClass))
- static void glade_eprop_named_icon_finalize (GObject * object)
+ static void glade_eprop_named_icon_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_named_icon_load (GladeEditorProperty * eprop,
- GladeProperty * property)
+glade_eprop_named_icon_load (GladeEditorProperty *eprop,
+ GladeProperty *property)
{
GladeEPropNamedIcon *eprop_named_icon = GLADE_EPROP_NAMED_ICON (eprop);
GtkEntry *entry;
@@ -1385,8 +1364,9 @@ glade_eprop_named_icon_load (GladeEditorProperty * eprop,
}
static void
-glade_eprop_named_icon_changed_common (GladeEditorProperty * eprop,
- const gchar * text, gboolean use_command)
+glade_eprop_named_icon_changed_common (GladeEditorProperty *eprop,
+ const gchar *text,
+ gboolean use_command)
{
GValue *val;
gchar *prop_text;
@@ -1413,7 +1393,7 @@ glade_eprop_named_icon_changed_common (GladeEditorProperty * eprop,
}
static void
-glade_eprop_named_icon_changed (GtkWidget * entry, GladeEditorProperty * eprop)
+glade_eprop_named_icon_changed (GtkWidget *entry, GladeEditorProperty *eprop)
{
gchar *text;
@@ -1427,24 +1407,25 @@ glade_eprop_named_icon_changed (GtkWidget * entry, GladeEditorProperty * eprop)
}
static gboolean
-glade_eprop_named_icon_focus_out (GtkWidget * entry,
- GdkEventFocus * event,
- GladeEditorProperty * eprop)
+glade_eprop_named_icon_focus_out (GtkWidget *entry,
+ GdkEventFocus *event,
+ GladeEditorProperty *eprop)
{
glade_eprop_named_icon_changed (entry, eprop);
return FALSE;
}
static void
-glade_eprop_named_icon_activate (GtkEntry * entry, GladeEPropNamedIcon * eprop)
+glade_eprop_named_icon_activate (GtkEntry *entry, GladeEPropNamedIcon *eprop)
{
glade_eprop_named_icon_changed (GTK_WIDGET (entry),
GLADE_EDITOR_PROPERTY (eprop));
}
static void
-chooser_response (GladeNamedIconChooserDialog * dialog,
- gint response_id, GladeEPropNamedIcon * eprop)
+chooser_response (GladeNamedIconChooserDialog *dialog,
+ gint response_id,
+ GladeEPropNamedIcon *eprop)
{
gchar *icon_name;
@@ -1483,8 +1464,8 @@ chooser_response (GladeNamedIconChooserDialog * dialog,
}
static void
-glade_eprop_named_icon_show_chooser_dialog (GtkWidget * button,
- GladeEditorProperty * eprop)
+glade_eprop_named_icon_show_chooser_dialog (GtkWidget *button,
+ GladeEditorProperty *eprop)
{
GtkWidget *dialog;
@@ -1519,7 +1500,7 @@ glade_eprop_named_icon_show_chooser_dialog (GtkWidget * button,
}
static GtkWidget *
-glade_eprop_named_icon_create_input (GladeEditorProperty * eprop)
+glade_eprop_named_icon_create_input (GladeEditorProperty *eprop)
{
GladeEPropNamedIcon *eprop_named_icon = GLADE_EPROP_NAMED_ICON (eprop);
GtkWidget *hbox;
@@ -1569,14 +1550,14 @@ GLADE_MAKE_EPROP (GladeEPropText, glade_eprop_text)
#define GLADE_IS_EPROP_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_TEXT))
#define GLADE_IS_EPROP_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_TEXT))
#define GLADE_EPROP_TEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_TEXT, GladeEPropTextClass))
- static void glade_eprop_text_finalize (GObject * object)
+ static void glade_eprop_text_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_text_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_text_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropText *eprop_text = GLADE_EPROP_TEXT (eprop);
GParamSpec *pspec;
@@ -1656,8 +1637,9 @@ glade_eprop_text_load (GladeEditorProperty * eprop, GladeProperty * property)
}
static void
-glade_eprop_text_changed_common (GladeEditorProperty * eprop,
- const gchar * text, gboolean use_command)
+glade_eprop_text_changed_common (GladeEditorProperty *eprop,
+ const gchar *text,
+ gboolean use_command)
{
GValue *val;
GParamSpec *pspec;
@@ -1700,7 +1682,7 @@ glade_eprop_text_changed_common (GladeEditorProperty * eprop,
}
static void
-glade_eprop_text_changed (GtkWidget * entry, GladeEditorProperty * eprop)
+glade_eprop_text_changed (GtkWidget *entry, GladeEditorProperty *eprop)
{
gchar *text;
@@ -1714,8 +1696,8 @@ glade_eprop_text_changed (GtkWidget * entry, GladeEditorProperty * eprop)
}
static void
-glade_eprop_text_buffer_changed (GtkTextBuffer * buffer,
- GladeEditorProperty * eprop)
+glade_eprop_text_buffer_changed (GtkTextBuffer *buffer,
+ GladeEditorProperty *eprop)
{
gchar *text;
GtkTextIter start, end;
@@ -1744,11 +1726,11 @@ glade_eprop_text_buffer_changed (GtkTextBuffer * buffer,
* Returns: %TRUE if OK was selected.
*/
gboolean
-glade_editor_property_show_i18n_dialog (GtkWidget * parent,
- gchar ** text,
- gchar ** context,
- gchar ** comment,
- gboolean * translatable)
+glade_editor_property_show_i18n_dialog (GtkWidget *parent,
+ gchar **text,
+ gchar **context,
+ gchar **comment,
+ gboolean *translatable)
{
GtkWidget *dialog;
GtkWidget *vbox, *hbox;
@@ -1956,8 +1938,8 @@ glade_editor_property_show_i18n_dialog (GtkWidget * parent,
}
static void
-glade_eprop_text_show_i18n_dialog (GtkWidget * entry,
- GladeEditorProperty * eprop)
+glade_eprop_text_show_i18n_dialog (GtkWidget *entry,
+ GladeEditorProperty *eprop)
{
gchar *text = glade_property_make_string (eprop->priv->property);
gchar *context = g_strdup (glade_property_i18n_get_context (eprop->priv->property));
@@ -1980,9 +1962,9 @@ glade_eprop_text_show_i18n_dialog (GtkWidget * entry,
}
gboolean
-glade_editor_property_show_resource_dialog (GladeProject * project,
- GtkWidget * parent,
- gchar ** filename)
+glade_editor_property_show_resource_dialog (GladeProject *project,
+ GtkWidget *parent,
+ gchar **filename)
{
GtkWidget *dialog;
@@ -2036,8 +2018,8 @@ glade_editor_property_show_resource_dialog (GladeProject * project,
}
static void
-glade_eprop_text_show_resource_dialog (GtkWidget * entry,
- GladeEditorProperty * eprop)
+glade_eprop_text_show_resource_dialog (GtkWidget *entry,
+ GladeEditorProperty *eprop)
{
GladeWidget *widget = glade_property_get_widget (eprop->priv->property);
GladeProject *project = glade_widget_get_project (widget);
@@ -2092,7 +2074,7 @@ glade_eprop_text_create_store (GType enum_type)
}
static void
-eprop_text_stock_changed (GtkComboBox * combo, GladeEditorProperty * eprop)
+eprop_text_stock_changed (GtkComboBox *combo, GladeEditorProperty *eprop)
{
GladeEPropText *eprop_text = GLADE_EPROP_TEXT (eprop);
GtkTreeIter iter;
@@ -2118,7 +2100,7 @@ eprop_text_stock_changed (GtkComboBox * combo, GladeEditorProperty * eprop)
}
static GtkWidget *
-glade_eprop_text_create_input (GladeEditorProperty * eprop)
+glade_eprop_text_create_input (GladeEditorProperty *eprop)
{
GladeEPropText *eprop_text = GLADE_EPROP_TEXT (eprop);
GladePropertyClass *klass;
@@ -2253,14 +2235,14 @@ GLADE_MAKE_EPROP (GladeEPropBool, glade_eprop_bool)
#define GLADE_IS_EPROP_BOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_BOOL))
#define GLADE_IS_EPROP_BOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_BOOL))
#define GLADE_EPROP_BOOL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_BOOL, GladeEPropBoolClass))
- static void glade_eprop_bool_finalize (GObject * object)
+ static void glade_eprop_bool_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_bool_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_bool_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropBool *eprop_bool = GLADE_EPROP_BOOL (eprop);
GtkWidget *label;
@@ -2282,7 +2264,7 @@ glade_eprop_bool_load (GladeEditorProperty * eprop, GladeProperty * property)
}
static void
-glade_eprop_bool_changed (GtkWidget * button, GladeEditorProperty * eprop)
+glade_eprop_bool_changed (GtkWidget *button, GladeEditorProperty *eprop)
{
GtkWidget *label;
gboolean state;
@@ -2304,7 +2286,7 @@ glade_eprop_bool_changed (GtkWidget * button, GladeEditorProperty * eprop)
}
static GtkWidget *
-glade_eprop_bool_create_input (GladeEditorProperty * eprop)
+glade_eprop_bool_create_input (GladeEditorProperty *eprop)
{
GladeEPropBool *eprop_bool = GLADE_EPROP_BOOL (eprop);
@@ -2333,14 +2315,14 @@ GLADE_MAKE_EPROP (GladeEPropUnichar, glade_eprop_unichar)
#define GLADE_IS_EPROP_UNICHAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_UNICHAR))
#define GLADE_IS_EPROP_UNICHAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_UNICHAR))
#define GLADE_EPROP_UNICHAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_UNICHAR, GladeEPropUnicharClass))
- static void glade_eprop_unichar_finalize (GObject * object)
+ static void glade_eprop_unichar_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_unichar_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_unichar_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropUnichar *eprop_unichar = GLADE_EPROP_UNICHAR (eprop);
@@ -2363,7 +2345,7 @@ glade_eprop_unichar_load (GladeEditorProperty * eprop, GladeProperty * property)
static void
-glade_eprop_unichar_changed (GtkWidget * entry, GladeEditorProperty * eprop)
+glade_eprop_unichar_changed (GtkWidget *entry, GladeEditorProperty *eprop)
{
const gchar *text;
@@ -2385,9 +2367,10 @@ glade_eprop_unichar_changed (GtkWidget * entry, GladeEditorProperty * eprop)
}
static void
-glade_eprop_unichar_delete (GtkEditable * editable,
+glade_eprop_unichar_delete (GtkEditable *editable,
gint start_pos,
- gint end_pos, GladeEditorProperty * eprop)
+ gint end_pos,
+ GladeEditorProperty *eprop)
{
if (eprop->priv->loading)
return;
@@ -2396,10 +2379,11 @@ glade_eprop_unichar_delete (GtkEditable * editable,
}
static void
-glade_eprop_unichar_insert (GtkWidget * entry,
- const gchar * text,
+glade_eprop_unichar_insert (GtkWidget *entry,
+ const gchar *text,
gint length,
- gint * position, GladeEditorProperty * eprop)
+ gint *position,
+ GladeEditorProperty *eprop)
{
if (eprop->priv->loading)
return;
@@ -2427,7 +2411,7 @@ glade_eprop_unichar_insert (GtkWidget * entry,
}
static GtkWidget *
-glade_eprop_unichar_create_input (GladeEditorProperty * eprop)
+glade_eprop_unichar_create_input (GladeEditorProperty *eprop)
{
GladeEPropUnichar *eprop_unichar = GLADE_EPROP_UNICHAR (eprop);
@@ -2474,7 +2458,7 @@ GLADE_MAKE_EPROP (GladeEPropObject, glade_eprop_object)
#define GLADE_IS_EPROP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_OBJECT))
#define GLADE_IS_EPROP_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_OBJECT))
#define GLADE_EPROP_OBJECT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_OBJECT, GladeEPropObjectClass))
- static void glade_eprop_object_finalize (GObject * object)
+ static void glade_eprop_object_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
@@ -2482,8 +2466,8 @@ GLADE_MAKE_EPROP (GladeEPropObject, glade_eprop_object)
static gchar *
-glade_eprop_object_name (const gchar * name,
- GtkTreeStore * model, GtkTreeIter * parent_iter)
+glade_eprop_object_name (const gchar *name,
+ GtkTreeStore *model, GtkTreeIter *parent_iter)
{
GtkTreePath *path;
GString *string;
@@ -2513,12 +2497,13 @@ search_list (GList * list, gpointer data)
* in the model are the associated GladeWidgets.
*/
static void
-glade_eprop_object_populate_view_real (GtkTreeStore * model,
- GtkTreeIter * parent_iter,
- GList * widgets,
- GList * selected_widgets,
- GList * exception_widgets,
- GType object_type, gboolean parentless)
+glade_eprop_object_populate_view_real (GtkTreeStore *model,
+ GtkTreeIter *parent_iter,
+ GList *widgets,
+ GList *selected_widgets,
+ GList *exception_widgets,
+ GType object_type,
+ gboolean parentless)
{
GList *children, *list;
GtkTreeIter iter;
@@ -2580,11 +2565,12 @@ glade_eprop_object_populate_view_real (GtkTreeStore * model,
}
static void
-glade_eprop_object_populate_view (GladeProject * project,
- GtkTreeView * view,
- GList * selected,
- GList * exceptions,
- GType object_type, gboolean parentless)
+glade_eprop_object_populate_view (GladeProject *project,
+ GtkTreeView *view,
+ GList *selected,
+ GList *exceptions,
+ GType object_type,
+ gboolean parentless)
{
GtkTreeStore *model = (GtkTreeStore *) gtk_tree_view_get_model (view);
GList *list, *toplevels = NULL;
@@ -2608,9 +2594,10 @@ glade_eprop_object_populate_view (GladeProject * project,
}
static gboolean
-glade_eprop_object_clear_iter (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, gpointer data)
+glade_eprop_object_clear_iter (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
gtk_tree_store_set (GTK_TREE_STORE (model), iter,
OBJ_COLUMN_SELECTED, FALSE, -1);
@@ -2618,9 +2605,10 @@ glade_eprop_object_clear_iter (GtkTreeModel * model,
}
static gboolean
-glade_eprop_object_selected_widget (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, GladeWidget ** ret)
+glade_eprop_object_selected_widget (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GladeWidget **ret)
{
gboolean selected;
GladeWidget *widget;
@@ -2638,8 +2626,9 @@ glade_eprop_object_selected_widget (GtkTreeModel * model,
}
static void
-glade_eprop_object_selected (GtkCellRendererToggle * cell,
- gchar * path_str, GtkTreeModel * model)
+glade_eprop_object_selected (GtkCellRendererToggle *cell,
+ gchar *path_str,
+ GtkTreeModel *model)
{
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
GtkTreeIter iter;
@@ -2732,7 +2721,7 @@ glade_eprop_object_view (gboolean radio)
static gchar *
-glade_eprop_object_dialog_title (GladeEditorProperty * eprop)
+glade_eprop_object_dialog_title (GladeEditorProperty *eprop)
{
GladeWidgetAdaptor *adaptor;
GParamSpec *pspec;
@@ -2765,12 +2754,12 @@ glade_eprop_object_dialog_title (GladeEditorProperty * eprop)
gboolean
-glade_editor_property_show_object_dialog (GladeProject * project,
- const gchar * title,
- GtkWidget * parent,
+glade_editor_property_show_object_dialog (GladeProject *project,
+ const gchar *title,
+ GtkWidget *parent,
GType object_type,
- GladeWidget * exception,
- GladeWidget ** object)
+ GladeWidget *exception,
+ GladeWidget **object)
{
GtkWidget *dialog;
GtkWidget *vbox, *label, *sw;
@@ -2875,8 +2864,8 @@ glade_editor_property_show_object_dialog (GladeProject * project,
static void
-glade_eprop_object_show_dialog (GtkWidget * dialog_button,
- GladeEditorProperty * eprop)
+glade_eprop_object_show_dialog (GtkWidget *dialog_button,
+ GladeEditorProperty *eprop)
{
GtkWidget *dialog, *parent;
GtkWidget *vbox, *label, *sw;
@@ -3104,7 +3093,7 @@ glade_eprop_object_show_dialog (GtkWidget * dialog_button,
static void
-glade_eprop_object_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_object_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropObject *eprop_object = GLADE_EPROP_OBJECT (eprop);
gchar *obj_name;
@@ -3128,7 +3117,7 @@ glade_eprop_object_load (GladeEditorProperty * eprop, GladeProperty * property)
}
static GtkWidget *
-glade_eprop_object_create_input (GladeEditorProperty * eprop)
+glade_eprop_object_create_input (GladeEditorProperty *eprop)
{
GladeEPropObject *eprop_object = GLADE_EPROP_OBJECT (eprop);
GtkWidget *hbox;
@@ -3167,14 +3156,14 @@ GLADE_MAKE_EPROP (GladeEPropObjects, glade_eprop_objects)
#define GLADE_IS_EPROP_OBJECTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_OBJECTS))
#define GLADE_IS_EPROP_OBJECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_OBJECTS))
#define GLADE_EPROP_OBJECTS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_EPROP_OBJECTS, GladeEPropObjectsClass))
- static void glade_eprop_objects_finalize (GObject * object)
+ static void glade_eprop_objects_finalize (GObject *object)
{
/* Chain up */
G_OBJECT_CLASS (editor_property_class)->finalize (object);
}
static void
-glade_eprop_objects_load (GladeEditorProperty * eprop, GladeProperty * property)
+glade_eprop_objects_load (GladeEditorProperty *eprop, GladeProperty *property)
{
GladeEPropObjects *eprop_objects = GLADE_EPROP_OBJECTS (eprop);
gchar *obj_name;
@@ -3198,9 +3187,10 @@ glade_eprop_objects_load (GladeEditorProperty * eprop, GladeProperty * property)
}
static gboolean
-glade_eprop_objects_selected_widget (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, GList ** ret)
+glade_eprop_objects_selected_widget (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GList **ret)
{
gboolean selected;
GladeWidget *widget;
@@ -3220,8 +3210,8 @@ glade_eprop_objects_selected_widget (GtkTreeModel * model,
}
static void
-glade_eprop_objects_show_dialog (GtkWidget * dialog_button,
- GladeEditorProperty * eprop)
+glade_eprop_objects_show_dialog (GtkWidget *dialog_button,
+ GladeEditorProperty *eprop)
{
GtkWidget *dialog, *parent;
GtkWidget *vbox, *label, *sw;
@@ -3331,7 +3321,7 @@ glade_eprop_objects_show_dialog (GtkWidget * dialog_button,
}
static GtkWidget *
-glade_eprop_objects_create_input (GladeEditorProperty * eprop)
+glade_eprop_objects_create_input (GladeEditorProperty *eprop)
{
GladeEPropObjects *eprop_objects = GLADE_EPROP_OBJECTS (eprop);
GtkWidget *hbox;
@@ -3364,7 +3354,7 @@ glade_eprop_objects_create_input (GladeEditorProperty * eprop)
*
*/
void
-glade_editor_property_commit (GladeEditorProperty * eprop, GValue * value)
+glade_editor_property_commit (GladeEditorProperty *eprop, GValue *value)
{
g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
g_return_if_fail (G_IS_VALUE (value));
@@ -3382,8 +3372,8 @@ glade_editor_property_commit (GladeEditorProperty * eprop, GValue * value)
* until its loaded with another property or %NULL)
*/
void
-glade_editor_property_load (GladeEditorProperty * eprop,
- GladeProperty * property)
+glade_editor_property_load (GladeEditorProperty *eprop,
+ GladeProperty *property)
{
g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
g_return_if_fail (property == NULL || GLADE_IS_PROPERTY (property));
@@ -3403,8 +3393,8 @@ glade_editor_property_load (GladeEditorProperty * eprop,
* @eprop from @widget
*/
void
-glade_editor_property_load_by_widget (GladeEditorProperty * eprop,
- GladeWidget * widget)
+glade_editor_property_load_by_widget (GladeEditorProperty *eprop,
+ GladeWidget *widget)
{
GladeProperty *property = NULL;
diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c
index 6eedcf6..78c01e3 100644
--- a/gladeui/glade-editor.c
+++ b/gladeui/glade-editor.c
@@ -60,8 +60,6 @@ enum
N_PROPERTIES
};
-static GtkVBoxClass *parent_class = NULL;
-
struct _GladeEditorPrivate
{
@@ -135,14 +133,17 @@ struct _GladeEditorPrivate
gboolean show_info; /* Whether or not to show an informational button */
};
+G_DEFINE_TYPE (GladeEditor, glade_editor, GTK_TYPE_VBOX);
+
static GParamSpec *properties[N_PROPERTIES];
-static void glade_editor_reset_dialog (GladeEditor * editor);
+static void glade_editor_reset_dialog (GladeEditor *editor);
static void
-glade_editor_set_property (GObject * object,
+glade_editor_set_property (GObject *object,
guint prop_id,
- const GValue * value, GParamSpec * pspec)
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeEditor *editor = GLADE_EDITOR (object);
@@ -156,7 +157,7 @@ glade_editor_set_property (GObject * object,
break;
case PROP_WIDGET:
glade_editor_load_widget (editor,
- (GladeWidget *) g_value_get_object (value));
+ GLADE_WIDGET (g_value_get_object (value)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -165,8 +166,10 @@ glade_editor_set_property (GObject * object,
}
static void
-glade_editor_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec)
+glade_editor_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeEditor *editor = GLADE_EDITOR (object);
@@ -196,15 +199,15 @@ glade_editor_dispose (GObject *object)
editor->priv->editables =
(g_list_free (editor->priv->editables), NULL);
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (glade_editor_parent_class)->dispose (object);
}
static void
-glade_editor_class_init (GladeEditorClass * klass)
+glade_editor_class_init (GladeEditorClass *klass)
{
GObjectClass *object_class;
- parent_class = g_type_class_peek_parent (klass);
+ glade_editor_parent_class = g_type_class_peek_parent (klass);
object_class = G_OBJECT_CLASS (klass);
object_class->dispose = glade_editor_dispose;
@@ -234,7 +237,7 @@ glade_editor_class_init (GladeEditorClass * klass)
}
static GtkWidget *
-glade_editor_notebook_page (GladeEditor * editor, const gchar * name)
+glade_editor_notebook_page (GladeEditor *editor, const gchar *name)
{
GtkWidget *alignment;
GtkWidget *sw;
@@ -300,13 +303,13 @@ glade_editor_notebook_page (GladeEditor * editor, const gchar * name)
}
static void
-glade_editor_on_reset_click (GtkButton * button, GladeEditor * editor)
+glade_editor_on_reset_click (GtkButton * button, GladeEditor *editor)
{
glade_editor_reset_dialog (editor);
}
static void
-glade_editor_on_docs_click (GtkButton * button, GladeEditor * editor)
+glade_editor_on_docs_click (GtkButton *button, GladeEditor *editor)
{
gchar *book;
@@ -321,7 +324,7 @@ glade_editor_on_docs_click (GtkButton * button, GladeEditor * editor)
}
static GtkWidget *
-glade_editor_create_info_button (GladeEditor * editor)
+glade_editor_create_info_button (GladeEditor *editor)
{
GtkWidget *button;
GtkWidget *image;
@@ -342,7 +345,7 @@ glade_editor_create_info_button (GladeEditor * editor)
}
static GtkWidget *
-glade_editor_create_reset_button (GladeEditor * editor)
+glade_editor_create_reset_button (GladeEditor *editor)
{
GtkWidget *image;
GtkWidget *button;
@@ -363,8 +366,9 @@ glade_editor_create_reset_button (GladeEditor * editor)
static void
-glade_editor_update_class_warning_cb (GladeWidget * widget,
- GParamSpec * pspec, GladeEditor * editor)
+glade_editor_update_class_warning_cb (GladeWidget *widget,
+ GParamSpec *pspec,
+ GladeEditor *editor)
{
if (glade_widget_support_warning (widget))
gtk_widget_show (editor->priv->warning);
@@ -376,7 +380,7 @@ glade_editor_update_class_warning_cb (GladeWidget * widget,
static void
-glade_editor_update_class_field (GladeEditor * editor)
+glade_editor_update_class_field (GladeEditor *editor)
{
if (editor->priv->loaded_widget)
{
@@ -407,14 +411,15 @@ glade_editor_update_class_field (GladeEditor * editor)
}
static void
-glade_editor_update_widget_name_cb (GladeWidget * widget,
- GParamSpec * pspec, GladeEditor * editor)
+glade_editor_update_widget_name_cb (GladeWidget *widget,
+ GParamSpec *pspec,
+ GladeEditor *editor)
{
glade_editor_update_class_field (editor);
}
static GtkWidget *
-glade_editor_setup_class_field (GladeEditor * editor)
+glade_editor_setup_class_field (GladeEditor *editor)
{
GtkWidget *hbox;
gint icon_height;
@@ -476,7 +481,7 @@ glade_editor_switch_page (GtkNotebook *notebook,
}
static void
-glade_editor_init (GladeEditor * editor)
+glade_editor_init (GladeEditor *editor)
{
GtkSizeGroup *size_group;
GtkWidget *hbox;
@@ -538,34 +543,9 @@ glade_editor_init (GladeEditor * editor)
gtk_widget_set_no_show_all (GTK_WIDGET (editor), TRUE);
}
-GType
-glade_editor_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo info = {
- sizeof (GladeEditorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) glade_editor_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (GladeEditor),
- 0,
- (GInstanceInitFunc) glade_editor_init
- };
-
- type = g_type_register_static (GTK_TYPE_VBOX, "GladeEditor", &info, 0);
- }
-
- return type;
-}
-
static GtkWidget *
-glade_editor_get_editable_by_adaptor (GladeEditor * editor,
- GladeWidgetAdaptor * adaptor,
+glade_editor_get_editable_by_adaptor (GladeEditor *editor,
+ GladeWidgetAdaptor *adaptor,
GladeEditorPageType type)
{
GtkWidget *editable;
@@ -602,8 +582,7 @@ glade_editor_get_editable_by_adaptor (GladeEditor * editor,
}
static void
-hide_or_remove_visible_child (GtkContainer *container,
- gboolean remove)
+hide_or_remove_visible_child (GtkContainer *container, gboolean remove)
{
GList *l, *children = gtk_container_get_children (container);
GtkWidget *widget;
@@ -626,8 +605,8 @@ hide_or_remove_visible_child (GtkContainer *container,
}
static GtkWidget *
-glade_editor_load_editable_in_page (GladeEditor * editor,
- GladeWidgetAdaptor * adaptor,
+glade_editor_load_editable_in_page (GladeEditor *editor,
+ GladeWidgetAdaptor *adaptor,
GladeEditorPageType type)
{
GtkContainer *container = NULL;
@@ -685,7 +664,7 @@ glade_editor_load_editable_in_page (GladeEditor * editor,
}
static void
-glade_editor_load_signal_page (GladeEditor * editor)
+glade_editor_load_signal_page (GladeEditor *editor)
{
if (editor->priv->signal_editor == NULL)
{
@@ -696,8 +675,8 @@ glade_editor_load_signal_page (GladeEditor * editor)
}
static void
-glade_editor_load_widget_class (GladeEditor * editor,
- GladeWidgetAdaptor * adaptor)
+glade_editor_load_widget_class (GladeEditor *editor,
+ GladeWidgetAdaptor *adaptor)
{
glade_editor_load_editable_in_page (editor, adaptor, GLADE_PAGE_GENERAL);
@@ -719,8 +698,9 @@ glade_editor_close_cb (GladeProject * project, GladeEditor * editor)
}
static void
-glade_editor_removed_cb (GladeProject * project,
- GladeWidget * widget, GladeEditor * editor)
+glade_editor_removed_cb (GladeProject *project,
+ GladeWidget *widget,
+ GladeEditor *editor)
{
/* Widget we were viewing was removed from project,
* detatch from editor.
@@ -732,8 +712,9 @@ glade_editor_removed_cb (GladeProject * project,
static void
-glade_editor_load_editable (GladeEditor * editor,
- GladeWidget * widget, GladeEditorPageType type)
+glade_editor_load_editable (GladeEditor *editor,
+ GladeWidget *widget,
+ GladeEditorPageType type)
{
GtkWidget *editable;
GladeWidget *parent = glade_widget_get_parent (widget);
@@ -766,7 +747,7 @@ glade_editor_load_editable (GladeEditor * editor,
}
static void
-clear_editables (GladeEditor * editor)
+clear_editables (GladeEditor *editor)
{
GladeEditable *editable;
GList *l;
@@ -779,7 +760,7 @@ clear_editables (GladeEditor * editor)
}
static void
-glade_editor_load_widget_real (GladeEditor * editor, GladeWidget * widget)
+glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
{
GladeWidgetAdaptor *adaptor;
GladeProject *project;
@@ -890,7 +871,7 @@ glade_editor_new (void)
* Load @widget into @editor. If @widget is %NULL, clear the editor.
*/
void
-glade_editor_load_widget (GladeEditor * editor, GladeWidget * widget)
+glade_editor_load_widget (GladeEditor *editor, GladeWidget *widget)
{
g_return_if_fail (GLADE_IS_EDITOR (editor));
g_return_if_fail (widget == NULL || GLADE_IS_WIDGET (widget));
@@ -902,8 +883,9 @@ glade_editor_load_widget (GladeEditor * editor, GladeWidget * widget)
}
static void
-query_dialog_style_set_cb (GtkWidget * dialog,
- GtkStyle * previous_style, gpointer user_data)
+query_dialog_style_set_cb (GtkWidget *dialog,
+ GtkStyle *previous_style,
+ gpointer user_data)
{
GtkWidget *content_area, *action_area;
@@ -916,7 +898,7 @@ query_dialog_style_set_cb (GtkWidget * dialog,
}
gboolean
-glade_editor_query_dialog (GladeWidget * widget)
+glade_editor_query_dialog (GladeWidget *widget)
{
GladeWidgetAdaptor *adaptor;
GtkWidget *dialog, *editable, *content_area;
@@ -986,8 +968,9 @@ enum
static void
-glade_editor_reset_toggled (GtkCellRendererToggle * cell,
- gchar * path_str, GtkTreeModel * model)
+glade_editor_reset_toggled (GtkCellRendererToggle *cell,
+ gchar *path_str,
+ GtkTreeModel *model)
{
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
GtkTreeIter iter;
@@ -1002,7 +985,7 @@ glade_editor_reset_toggled (GtkCellRendererToggle * cell,
}
static GtkWidget *
-glade_editor_reset_view (GladeEditor * editor)
+glade_editor_reset_view (GladeEditor *editor)
{
GtkWidget *view_widget;
GtkTreeModel *model;
@@ -1069,9 +1052,9 @@ glade_editor_reset_view (GladeEditor * editor)
}
static void
-glade_editor_populate_reset_view (GladeEditor * editor, GtkTreeView * tree_view)
+glade_editor_populate_reset_view (GladeEditor *editor, GtkTreeView *tree_view)
{
- GtkTreeStore *model = (GtkTreeStore *) gtk_tree_view_get_model (tree_view);
+ GtkTreeStore *model = GTK_TREE_STORE (gtk_tree_view_get_model (tree_view));
GtkTreeIter property_iter, general_iter, common_iter, atk_iter, *iter;
GList *list;
GladeProperty *property;
@@ -1136,8 +1119,8 @@ glade_editor_populate_reset_view (GladeEditor * editor, GtkTreeView * tree_view)
}
static gboolean
-glade_editor_reset_selection_changed_cb (GtkTreeSelection * selection,
- GtkTextView * desc_view)
+glade_editor_reset_selection_changed_cb (GtkTreeSelection *selection,
+ GtkTextView *desc_view)
{
GtkTreeIter iter;
GladeProperty *property = NULL;
@@ -1167,9 +1150,10 @@ glade_editor_reset_selection_changed_cb (GtkTreeSelection * selection,
}
static gboolean
-glade_editor_reset_foreach_selection (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, gboolean select)
+glade_editor_reset_foreach_selection (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gboolean select)
{
gboolean def;
@@ -1183,8 +1167,8 @@ glade_editor_reset_foreach_selection (GtkTreeModel * model,
static void
-glade_editor_reset_select_all_clicked (GtkButton * button,
- GtkTreeView * tree_view)
+glade_editor_reset_select_all_clicked (GtkButton *button,
+ GtkTreeView *tree_view)
{
GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)
@@ -1193,8 +1177,8 @@ glade_editor_reset_select_all_clicked (GtkButton * button,
}
static void
-glade_editor_reset_unselect_all_clicked (GtkButton * button,
- GtkTreeView * tree_view)
+glade_editor_reset_unselect_all_clicked (GtkButton *button,
+ GtkTreeView *tree_view)
{
GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
gtk_tree_model_foreach (model, (GtkTreeModelForeachFunc)
@@ -1203,10 +1187,10 @@ glade_editor_reset_unselect_all_clicked (GtkButton * button,
}
static gboolean
-glade_editor_reset_accumulate_selected_props (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter,
- GList ** accum)
+glade_editor_reset_accumulate_selected_props (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GList **accum)
{
GladeProperty *property;
gboolean enabled, def;
@@ -1226,7 +1210,7 @@ glade_editor_reset_accumulate_selected_props (GtkTreeModel * model,
}
static GList *
-glade_editor_reset_get_selected_props (GtkTreeModel * model)
+glade_editor_reset_get_selected_props (GtkTreeModel *model)
{
GList *ret = NULL;
@@ -1237,7 +1221,7 @@ glade_editor_reset_get_selected_props (GtkTreeModel * model)
}
static void
-glade_editor_reset_properties (GList * props)
+glade_editor_reset_properties (GList *props)
{
GList *list, *sdata_list = NULL;
GCSetPropData *sdata;
@@ -1390,7 +1374,7 @@ glade_editor_reset_dialog (GladeEditor *editor)
}
void
-glade_editor_show_info (GladeEditor * editor)
+glade_editor_show_info (GladeEditor *editor)
{
g_return_if_fail (GLADE_IS_EDITOR (editor));
@@ -1404,7 +1388,7 @@ glade_editor_show_info (GladeEditor * editor)
}
void
-glade_editor_hide_info (GladeEditor * editor)
+glade_editor_hide_info (GladeEditor *editor)
{
g_return_if_fail (GLADE_IS_EDITOR (editor));
@@ -1427,7 +1411,7 @@ glade_editor_hide_info (GladeEditor * editor)
* Returns: the newly created dialog window
*/
GtkWidget *
-glade_editor_dialog_for_widget (GladeWidget * widget)
+glade_editor_dialog_for_widget (GladeWidget *widget)
{
GtkWidget *window, *editor;
gchar *title, *prj_name;
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index 87d31ee..0470a0c 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -142,15 +142,20 @@ typedef struct _GladeChildPacking GladeChildPacking;
typedef struct _GladePackingDefault GladePackingDefault;
typedef struct _GladeInternalChild GladeInternalChild;
-static GObjectClass *parent_class = NULL;
static GHashTable *adaptor_hash = NULL;
+/* This object used to be registered as GladeGObjectAdaptor but there is
+ * no reason for it since the autogenerated class for GtWidget is GladeGtkWidgetAdaptor
+ * TODO: rename GladeWidgetAdaptor to GladeGObjectAdator or GladeObjectAdator
+ */
+G_DEFINE_TYPE (GladeWidgetAdaptor, glade_widget_adaptor, G_TYPE_OBJECT);
+
/*******************************************************************************
Helper functions
*******************************************************************************/
static void
-gwa_create_cursor (GladeWidgetAdaptor * adaptor)
+gwa_create_cursor (GladeWidgetAdaptor *adaptor)
{
GdkPixbuf *tmp_pixbuf, *widget_pixbuf;
const GdkPixbuf *add_pixbuf;
@@ -278,7 +283,7 @@ glade_widget_adaptor_get_parent_adaptor_by_type (GType adaptor_type)
/* XXX DOCME
*/
GladeWidgetAdaptor *
-glade_widget_adaptor_get_parent_adaptor (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_get_parent_adaptor (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -310,7 +315,7 @@ gwa_signal_find_comp (gpointer a, gpointer b)
}
static void
-gwa_add_signals (GladeWidgetAdaptor * adaptor, GList ** signals, GType type)
+gwa_add_signals (GladeWidgetAdaptor *adaptor, GList **signals, GType type)
{
guint count, *sig_ids, num_signals;
GladeWidgetAdaptor *type_adaptor;
@@ -336,7 +341,7 @@ gwa_add_signals (GladeWidgetAdaptor * adaptor, GList ** signals, GType type)
}
static GList *
-gwa_list_signals (GladeWidgetAdaptor * adaptor, GType real_type)
+gwa_list_signals (GladeWidgetAdaptor *adaptor, GType real_type)
{
GList *signals = NULL;
GType type, parent, *i, *p;
@@ -362,7 +367,7 @@ gwa_list_signals (GladeWidgetAdaptor * adaptor, GType real_type)
}
static GList *
-gwa_clone_parent_properties (GladeWidgetAdaptor * adaptor, gboolean is_packing)
+gwa_clone_parent_properties (GladeWidgetAdaptor *adaptor, gboolean is_packing)
{
GladeWidgetAdaptor *parent_adaptor;
GList *properties = NULL, *list, *proplist;
@@ -391,8 +396,8 @@ gwa_clone_parent_properties (GladeWidgetAdaptor * adaptor, gboolean is_packing)
}
static void
-gwa_setup_introspected_props_from_pspecs (GladeWidgetAdaptor * adaptor,
- GParamSpec ** specs,
+gwa_setup_introspected_props_from_pspecs (GladeWidgetAdaptor *adaptor,
+ GParamSpec **specs,
gint n_specs, gboolean is_packing)
{
GladeWidgetAdaptor *parent_adaptor = gwa_get_parent_adaptor (adaptor);
@@ -426,8 +431,8 @@ gwa_setup_introspected_props_from_pspecs (GladeWidgetAdaptor * adaptor,
}
static void
-gwa_setup_properties (GladeWidgetAdaptor * adaptor,
- GObjectClass * object_class, gboolean is_packing)
+gwa_setup_properties (GladeWidgetAdaptor *adaptor,
+ GObjectClass *object_class, gboolean is_packing)
{
GParamSpec **specs = NULL;
guint n_specs = 0;
@@ -474,7 +479,7 @@ gwa_setup_properties (GladeWidgetAdaptor * adaptor,
}
static GList *
-gwa_inherit_child_packing (GladeWidgetAdaptor * adaptor)
+gwa_inherit_child_packing (GladeWidgetAdaptor *adaptor)
{
GladeWidgetAdaptor *parent_adaptor;
GList *child_packings = NULL, *packing_list, *default_list;
@@ -509,7 +514,7 @@ gwa_inherit_child_packing (GladeWidgetAdaptor * adaptor)
}
static void
-gwa_inherit_signals (GladeWidgetAdaptor * adaptor)
+gwa_inherit_signals (GladeWidgetAdaptor *adaptor)
{
GladeWidgetAdaptor *parent_adaptor;
GList *list, *node;
@@ -581,7 +586,7 @@ glade_widget_adaptor_constructor (GType type,
glade_abort_if_derived_adaptors_exist (type);
- ret_obj = G_OBJECT_CLASS (parent_class)->constructor
+ ret_obj = G_OBJECT_CLASS (glade_widget_adaptor_parent_class)->constructor
(type, n_construct_properties, construct_properties);
adaptor = GLADE_WIDGET_ADAPTOR (ret_obj);
@@ -703,7 +708,7 @@ gwa_internal_children_free (GladeWidgetAdaptor *adaptor)
}
static void
-glade_widget_adaptor_finalize (GObject * object)
+glade_widget_adaptor_finalize (GObject *object)
{
GladeWidgetAdaptor *adaptor = GLADE_WIDGET_ADAPTOR (object);
@@ -763,14 +768,14 @@ glade_widget_adaptor_finalize (GObject * object)
gwa_internal_children_free (adaptor);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (glade_widget_adaptor_parent_class)->finalize (object);
}
static void
-glade_widget_adaptor_real_set_property (GObject * object,
+glade_widget_adaptor_real_set_property (GObject *object,
guint prop_id,
- const GValue * value,
- GParamSpec * pspec)
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeWidgetAdaptor *adaptor;
@@ -822,9 +827,10 @@ glade_widget_adaptor_real_set_property (GObject * object,
}
static void
-glade_widget_adaptor_real_get_property (GObject * object,
+glade_widget_adaptor_real_get_property (GObject *object,
guint prop_id,
- GValue * value, GParamSpec * pspec)
+ GValue *value,
+ GParamSpec *pspec)
{
GladeWidgetAdaptor *adaptor;
@@ -870,18 +876,18 @@ glade_widget_adaptor_real_get_property (GObject * object,
GladeWidgetAdaptor base class implementations
*******************************************************************************/
static GladeWidget *
-glade_widget_adaptor_object_create_widget (GladeWidgetAdaptor * adaptor,
- const gchar * first_property_name,
+glade_widget_adaptor_object_create_widget (GladeWidgetAdaptor *adaptor,
+ const gchar *first_property_name,
va_list var_args)
{
- return (GladeWidget *) g_object_new_valist (GLADE_TYPE_WIDGET,
- first_property_name, var_args);
+ return GLADE_WIDGET (g_object_new_valist (GLADE_TYPE_WIDGET,
+ first_property_name, var_args));
}
static GObject *
-glade_widget_adaptor_object_construct_object (GladeWidgetAdaptor * adaptor,
+glade_widget_adaptor_object_construct_object (GladeWidgetAdaptor *adaptor,
guint n_parameters,
- GParameter * parameters)
+ GParameter *parameters)
{
return g_object_newv (adaptor->priv->type, n_parameters, parameters);
}
@@ -918,46 +924,46 @@ glade_widget_adaptor_object_add_verify (GladeWidgetAdaptor *adaptor,
}
static void
-glade_widget_adaptor_object_set_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * property_name,
- const GValue * value)
+glade_widget_adaptor_object_set_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *property_name,
+ const GValue *value)
{
g_object_set_property (object, property_name, value);
}
static void
-glade_widget_adaptor_object_get_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * property_name,
- GValue * value)
+glade_widget_adaptor_object_get_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *property_name,
+ GValue *value)
{
g_object_get_property (object, property_name, value);
}
static void
-glade_widget_adaptor_object_action_activate (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * action_id)
+glade_widget_adaptor_object_action_activate (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *action_id)
{
g_message ("No action_activate() support in adaptor %s for action '%s'",
adaptor->priv->name, action_id);
}
static void
-glade_widget_adaptor_object_child_action_activate (GladeWidgetAdaptor * adaptor,
- GObject * container,
- GObject * object,
- const gchar * action_id)
+glade_widget_adaptor_object_child_action_activate (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *object,
+ const gchar *action_id)
{
g_message ("No child_action_activate() support in adaptor %s for action '%s'",
adaptor->priv->name, action_id);
}
static gboolean
-glade_widget_adaptor_object_depends (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeWidget * another)
+glade_widget_adaptor_object_depends (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeWidget *another)
{
GList *prop_refs, *l;
gboolean depends = FALSE;
@@ -989,9 +995,9 @@ glade_widget_adaptor_object_depends (GladeWidgetAdaptor * adaptor,
}
static void
-glade_widget_adaptor_object_read_widget (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeXmlNode * node)
+glade_widget_adaptor_object_read_widget (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
GladeXmlNode *iter_node;
GladeSignal *signal;
@@ -1063,10 +1069,10 @@ glade_widget_adaptor_object_read_widget (GladeWidgetAdaptor * adaptor,
}
static void
-glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeXmlContext * context,
- GladeXmlNode * node)
+glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GList *props;
@@ -1083,9 +1089,9 @@ glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor * adaptor,
}
static void
-glade_widget_adaptor_object_read_child (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeXmlNode * node)
+glade_widget_adaptor_object_read_child (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
GladeXmlNode *widget_node, *packing_node, *iter_node;
GladeWidget *child_widget;
@@ -1160,10 +1166,10 @@ glade_widget_adaptor_object_read_child (GladeWidgetAdaptor * adaptor,
}
static void
-glade_widget_adaptor_object_write_child (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeXmlContext * context,
- GladeXmlNode * node)
+glade_widget_adaptor_object_write_child (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GladeXmlNode *child_node, *packing_node;
GList *props;
@@ -1211,7 +1217,7 @@ glade_widget_adaptor_object_write_child (GladeWidgetAdaptor * adaptor,
}
static GType
-glade_widget_adaptor_get_eprop_type (GParamSpec * pspec)
+glade_widget_adaptor_get_eprop_type (GParamSpec *pspec)
{
GType type = 0;
@@ -1260,8 +1266,8 @@ glade_widget_adaptor_get_eprop_type (GParamSpec * pspec)
}
static GladeEditorProperty *
-glade_widget_adaptor_object_create_eprop (GladeWidgetAdaptor * adaptor,
- GladePropertyClass * klass,
+glade_widget_adaptor_object_create_eprop (GladeWidgetAdaptor *adaptor,
+ GladePropertyClass *klass,
gboolean use_command)
{
GladeEditorProperty *eprop;
@@ -1289,15 +1295,15 @@ glade_widget_adaptor_object_create_eprop (GladeWidgetAdaptor * adaptor,
}
static gchar *
-glade_widget_adaptor_object_string_from_value (GladeWidgetAdaptor * adaptor,
- GladePropertyClass * klass,
- const GValue * value)
+glade_widget_adaptor_object_string_from_value (GladeWidgetAdaptor *adaptor,
+ GladePropertyClass *klass,
+ const GValue *value)
{
return glade_property_class_make_string_from_gvalue (klass, value);
}
static GladeEditable *
-glade_widget_adaptor_object_create_editable (GladeWidgetAdaptor * adaptor,
+glade_widget_adaptor_object_create_editable (GladeWidgetAdaptor *adaptor,
GladeEditorPageType type)
{
return (GladeEditable *) glade_editor_table_new (adaptor, type);
@@ -1330,19 +1336,19 @@ glade_widget_adaptor_object_get_children (GladeWidgetAdaptor *adaptor,
GladeWidgetAdaptor type registration and class initializer
*******************************************************************************/
static void
-glade_widget_adaptor_init (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_init (GladeWidgetAdaptor *adaptor)
{
adaptor->priv = GLADE_WIDGET_ADAPTOR_GET_PRIVATE (adaptor);
}
static void
-glade_widget_adaptor_class_init (GladeWidgetAdaptorClass * adaptor_class)
+glade_widget_adaptor_class_init (GladeWidgetAdaptorClass *adaptor_class)
{
GObjectClass *object_class;
g_return_if_fail (adaptor_class != NULL);
- parent_class = g_type_class_peek_parent (adaptor_class);
+ glade_widget_adaptor_parent_class = g_type_class_peek_parent (adaptor_class);
object_class = G_OBJECT_CLASS (adaptor_class);
/* GObjectClass */
@@ -1453,31 +1459,6 @@ glade_widget_adaptor_class_init (GladeWidgetAdaptorClass * adaptor_class)
}
GType
-glade_widget_adaptor_get_type (void)
-{
- static GType adaptor_type = 0;
-
- if (!adaptor_type)
- {
- static const GTypeInfo adaptor_info = {
- sizeof (GladeWidgetAdaptorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) glade_widget_adaptor_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GladeWidgetAdaptor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) glade_widget_adaptor_init,
- };
- adaptor_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GladeGObjectAdaptor", &adaptor_info, 0);
- }
- return adaptor_type;
-}
-
-GType
glade_create_reason_get_type (void)
{
static GType etype = 0;
@@ -1509,14 +1490,14 @@ typedef struct
} GWADerivedClassData;
static void
-gwa_derived_init (GladeWidgetAdaptor * adaptor, gpointer g_class)
+gwa_derived_init (GladeWidgetAdaptor *adaptor, gpointer g_class)
{
}
static void
-gwa_extend_with_node_load_sym (GladeWidgetAdaptorClass * klass,
- GladeXmlNode * node, GModule * module)
+gwa_extend_with_node_load_sym (GladeWidgetAdaptorClass *klass,
+ GladeXmlNode *node, GModule *module)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
gpointer symbol;
@@ -1648,8 +1629,8 @@ gwa_extend_with_node_load_sym (GladeWidgetAdaptorClass * klass,
}
static void
-gwa_derived_class_init (GladeWidgetAdaptorClass * adaptor_class,
- GWADerivedClassData * data)
+gwa_derived_class_init (GladeWidgetAdaptorClass *adaptor_class,
+ GWADerivedClassData *data)
{
GladeXmlNode *node = data->node;
GModule *module = data->module;
@@ -1685,7 +1666,7 @@ gwa_derived_class_init (GladeWidgetAdaptorClass * adaptor_class,
}
static GType
-gwa_derive_adaptor_for_type (GType object_type, GWADerivedClassData * data)
+gwa_derive_adaptor_for_type (GType object_type, GWADerivedClassData *data)
{
GladeWidgetAdaptor *adaptor;
GType iter_type, derived_type;
@@ -1729,7 +1710,7 @@ gwa_derive_adaptor_for_type (GType object_type, GWADerivedClassData * data)
API
*******************************************************************************/
GType
-glade_widget_adaptor_get_object_type (GladeWidgetAdaptor *adaptor)
+glade_widget_adaptor_get_object_type (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), G_TYPE_INVALID);
@@ -1737,7 +1718,7 @@ glade_widget_adaptor_get_object_type (GladeWidgetAdaptor *adaptor)
}
G_CONST_RETURN gchar *
-glade_widget_adaptor_get_name (GladeWidgetAdaptor *adaptor)
+glade_widget_adaptor_get_name (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -1753,7 +1734,7 @@ glade_widget_adaptor_get_generic_name (GladeWidgetAdaptor *adaptor)
}
G_CONST_RETURN gchar *
-glade_widget_adaptor_get_title (GladeWidgetAdaptor *adaptor)
+glade_widget_adaptor_get_title (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -1761,7 +1742,7 @@ glade_widget_adaptor_get_title (GladeWidgetAdaptor *adaptor)
}
G_CONST_RETURN gchar *
-glade_widget_adaptor_get_icon_name (GladeWidgetAdaptor *adaptor)
+glade_widget_adaptor_get_icon_name (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -1801,7 +1782,7 @@ glade_widget_adaptor_get_signals (GladeWidgetAdaptor *adaptor)
}
static void
-accum_adaptor (GType * type, GladeWidgetAdaptor * adaptor, GList ** list)
+accum_adaptor (GType *type, GladeWidgetAdaptor *adaptor, GList **list)
{
*list = g_list_prepend (*list, adaptor);
}
@@ -1831,7 +1812,7 @@ glade_widget_adaptor_list_adaptors (void)
* object type must have a registered adaptor).
*/
void
-glade_widget_adaptor_register (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_register (GladeWidgetAdaptor *adaptor)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
@@ -1851,7 +1832,7 @@ glade_widget_adaptor_register (GladeWidgetAdaptor * adaptor)
}
static GladePackingDefault *
-gwa_default_from_child_packing (GladeChildPacking * packing, const gchar * id)
+gwa_default_from_child_packing (GladeChildPacking *packing, const gchar *id)
{
GList *list;
@@ -1867,8 +1848,8 @@ gwa_default_from_child_packing (GladeChildPacking * packing, const gchar * id)
}
static GladeChildPacking *
-glade_widget_adaptor_get_child_packing (GladeWidgetAdaptor * child_adaptor,
- const gchar * parent_name)
+glade_widget_adaptor_get_child_packing (GladeWidgetAdaptor *child_adaptor,
+ const gchar *parent_name)
{
GList *l;
@@ -1886,8 +1867,8 @@ glade_widget_adaptor_get_child_packing (GladeWidgetAdaptor * child_adaptor,
}
static void
-gwa_set_packing_defaults_from_node (GladeWidgetAdaptor * adaptor,
- GladeXmlNode * node)
+gwa_set_packing_defaults_from_node (GladeWidgetAdaptor *adaptor,
+ GladeXmlNode *node)
{
GladeXmlNode *child;
@@ -1964,11 +1945,12 @@ gwa_set_packing_defaults_from_node (GladeWidgetAdaptor * adaptor,
}
static void
-gwa_update_properties_from_node (GladeWidgetAdaptor * adaptor,
- GladeXmlNode * node,
- GModule * module,
- GList ** properties,
- const gchar * domain, gboolean is_packing)
+gwa_update_properties_from_node (GladeWidgetAdaptor *adaptor,
+ GladeXmlNode *node,
+ GModule *module,
+ GList **properties,
+ const gchar *domain,
+ gboolean is_packing)
{
GladeXmlNode *child;
@@ -2038,7 +2020,7 @@ gwa_update_properties_from_node (GladeWidgetAdaptor * adaptor,
}
static GParamSpec *
-pspec_dup (GParamSpec * spec)
+pspec_dup (GParamSpec *spec)
{
const gchar *name, *nick, *blurb;
GType spec_type, value_type;
@@ -2165,9 +2147,10 @@ pspec_dup (GParamSpec * spec)
}
static void
-gwa_update_properties_from_type (GladeWidgetAdaptor * adaptor,
+gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor,
GType type,
- GList ** properties, gboolean is_packing)
+ GList **properties,
+ gboolean is_packing)
{
gpointer object_class = g_type_class_ref (type);
GParamSpec **specs = NULL, *spec;
@@ -2228,10 +2211,11 @@ gwa_update_properties_from_type (GladeWidgetAdaptor * adaptor,
}
static void
-gwa_action_update_from_node (GladeWidgetAdaptor * adaptor,
+gwa_action_update_from_node (GladeWidgetAdaptor *adaptor,
gboolean is_packing,
- GladeXmlNode * node,
- const gchar * domain, gchar * group_path)
+ GladeXmlNode *node,
+ const gchar *domain,
+ gchar *group_path)
{
GladeXmlNode *child;
gchar *id, *label, *stock, *action_path;
@@ -2376,9 +2360,10 @@ gwa_internal_children_update_from_node (GList *internal_children, GladeXmlNode *
}
static gboolean
-gwa_extend_with_node (GladeWidgetAdaptor * adaptor,
- GladeXmlNode * node,
- GModule * module, const gchar * domain)
+gwa_extend_with_node (GladeWidgetAdaptor *adaptor,
+ GladeXmlNode *node,
+ GModule *module,
+ const gchar *domain)
{
GladeXmlNode *child;
gchar *child_type;
@@ -2433,11 +2418,11 @@ gwa_extend_with_node (GladeWidgetAdaptor * adaptor,
* Returns: An icon name, or NULL if the object class does not require one.
*/
static gchar *
-create_icon_name_for_object_class (const gchar * class_name,
+create_icon_name_for_object_class (const gchar *class_name,
GType class_type,
- const gchar * icon_name,
- const gchar * icon_prefix,
- const gchar * generic_name)
+ const gchar *icon_name,
+ const gchar *icon_prefix,
+ const gchar *generic_name)
{
gchar *name;
@@ -2458,7 +2443,7 @@ create_icon_name_for_object_class (const gchar * class_name,
}
static void
-gwa_displayable_values_check (GladeWidgetAdaptor * adaptor, gboolean packing)
+gwa_displayable_values_check (GladeWidgetAdaptor *adaptor, gboolean packing)
{
GList *l, *p = (packing) ? adaptor->priv->packing_props : adaptor->priv->properties;
@@ -2627,8 +2612,9 @@ generate_deprecated_icon (const gchar *icon_name)
* the relevent catalog info.
*/
GladeWidgetAdaptor *
-glade_widget_adaptor_from_catalog (GladeCatalog * catalog,
- GladeXmlNode * class_node, GModule * module)
+glade_widget_adaptor_from_catalog (GladeCatalog *catalog,
+ GladeXmlNode *class_node,
+ GModule *module)
{
GladeWidgetAdaptor *adaptor = NULL;
gchar *name, *generic_name, *icon_name, *adaptor_icon_name, *adaptor_name,
@@ -2891,10 +2877,10 @@ glade_widget_adaptor_from_catalog (GladeCatalog * catalog,
* @internal_object of name @internal_name
*/
GladeWidget *
-glade_widget_adaptor_create_internal (GladeWidget * parent,
- GObject * internal_object,
- const gchar * internal_name,
- const gchar * parent_name,
+glade_widget_adaptor_create_internal (GladeWidget *parent,
+ GObject *internal_object,
+ const gchar *internal_name,
+ const gchar *parent_name,
gboolean anarchist,
GladeCreateReason reason)
{
@@ -2945,7 +2931,7 @@ glade_widget_adaptor_create_internal (GladeWidget * parent,
*/
GladeWidget *
glade_widget_adaptor_create_widget_real (gboolean query,
- const gchar * first_property, ...)
+ const gchar *first_property, ...)
{
GladeWidgetAdaptor *adaptor;
GladeWidget *gwidget;
@@ -2996,9 +2982,9 @@ typedef struct
static void
-search_adaptor_by_name (GType * type,
- GladeWidgetAdaptor * adaptor,
- GladeAdaptorSearchPair * pair)
+search_adaptor_by_name (GType *type,
+ GladeWidgetAdaptor *adaptor,
+ GladeAdaptorSearchPair *pair)
{
if (!strcmp (adaptor->priv->name, pair->name))
pair->adaptor = adaptor;
@@ -3012,7 +2998,7 @@ search_adaptor_by_name (GType * type,
* or %NULL if such a class doesn't exist
**/
GladeWidgetAdaptor *
-glade_widget_adaptor_get_by_name (const gchar * name)
+glade_widget_adaptor_get_by_name (const gchar *name)
{
@@ -3056,8 +3042,8 @@ glade_widget_adaptor_get_by_type (GType type)
* which is responsable for introducing @pspec.
**/
GladeWidgetAdaptor *
-glade_widget_adaptor_from_pspec (GladeWidgetAdaptor * adaptor,
- GParamSpec * spec)
+glade_widget_adaptor_from_pspec (GladeWidgetAdaptor *adaptor,
+ GParamSpec *spec)
{
GladeWidgetAdaptor *spec_adaptor;
GType spec_type = spec->owner_type;
@@ -3091,8 +3077,8 @@ glade_widget_adaptor_from_pspec (GladeWidgetAdaptor * adaptor,
* Returns: A #GladePropertyClass object
*/
GladePropertyClass *
-glade_widget_adaptor_get_property_class (GladeWidgetAdaptor * adaptor,
- const gchar * name)
+glade_widget_adaptor_get_property_class (GladeWidgetAdaptor *adaptor,
+ const gchar *name)
{
GList *list;
GladePropertyClass *pclass;
@@ -3117,8 +3103,8 @@ glade_widget_adaptor_get_property_class (GladeWidgetAdaptor * adaptor,
* Returns: A #GladePropertyClass object
*/
GladePropertyClass *
-glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor * adaptor,
- const gchar * name)
+glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor *adaptor,
+ const gchar *name)
{
GList *list;
GladePropertyClass *pclass;
@@ -3141,8 +3127,9 @@ glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor * adaptor,
* Returns: A list of params for use in g_object_newv ()
*/
GParameter *
-glade_widget_adaptor_default_params (GladeWidgetAdaptor * adaptor,
- gboolean construct, guint * n_params)
+glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor,
+ gboolean construct,
+ guint *n_params)
{
GArray *params;
GObjectClass *oclass;
@@ -3222,9 +3209,9 @@ glade_widget_adaptor_default_params (GladeWidgetAdaptor * adaptor,
* Returns: A newly created #GObject
*/
GObject *
-glade_widget_adaptor_construct_object (GladeWidgetAdaptor * adaptor,
+glade_widget_adaptor_construct_object (GladeWidgetAdaptor *adaptor,
guint n_parameters,
- GParameter * parameters)
+ GParameter *parameters)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -3278,7 +3265,8 @@ gwa_internal_children_create (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor,
- GObject *object, GladeCreateReason reason)
+ GObject *object,
+ GladeCreateReason reason)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (object));
@@ -3313,9 +3301,9 @@ glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor,
* Returns: The internal #GObject
*/
GObject *
-glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * internal_name)
+glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *internal_name)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
@@ -3344,10 +3332,10 @@ glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor * adaptor,
*
*/
void
-glade_widget_adaptor_set_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * property_name,
- const GValue * value)
+glade_widget_adaptor_set_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *property_name,
+ const GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (object));
@@ -3371,9 +3359,10 @@ glade_widget_adaptor_set_property (GladeWidgetAdaptor * adaptor,
*
*/
void
-glade_widget_adaptor_get_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * property_name, GValue * value)
+glade_widget_adaptor_get_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *property_name,
+ GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (object));
@@ -3403,10 +3392,10 @@ glade_widget_adaptor_get_property (GladeWidgetAdaptor * adaptor,
* will silently return TRUE if the class did not provide a verify function.
*/
gboolean
-glade_widget_adaptor_verify_property (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * property_name,
- const GValue * value)
+glade_widget_adaptor_verify_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *property_name,
+ const GValue *value)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
@@ -3460,8 +3449,9 @@ glade_widget_adaptor_add_verify (GladeWidgetAdaptor *adaptor,
* Adds @child to @container.
*/
void
-glade_widget_adaptor_add (GladeWidgetAdaptor * adaptor,
- GObject * container, GObject * child)
+glade_widget_adaptor_add (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *child)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3484,8 +3474,9 @@ glade_widget_adaptor_add (GladeWidgetAdaptor * adaptor,
* Removes @child from @container.
*/
void
-glade_widget_adaptor_remove (GladeWidgetAdaptor * adaptor,
- GObject * container, GObject * child)
+glade_widget_adaptor_remove (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *child)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3509,8 +3500,8 @@ glade_widget_adaptor_remove (GladeWidgetAdaptor * adaptor,
* Returns: A #GList of children
*/
GList *
-glade_widget_adaptor_get_children (GladeWidgetAdaptor * adaptor,
- GObject * container)
+glade_widget_adaptor_get_children (GladeWidgetAdaptor *adaptor,
+ GObject *container)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (G_IS_OBJECT (container), NULL);
@@ -3529,8 +3520,9 @@ glade_widget_adaptor_get_children (GladeWidgetAdaptor * adaptor,
* Returns: whether @child is infact inside @container.
*/
gboolean
-glade_widget_adaptor_has_child (GladeWidgetAdaptor * adaptor,
- GObject * container, GObject * child)
+glade_widget_adaptor_has_child (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *child)
{
GList *list, *children = NULL;
gboolean found = FALSE;
@@ -3561,11 +3553,11 @@ glade_widget_adaptor_has_child (GladeWidgetAdaptor * adaptor,
* Sets @child's packing property identified by @property_name to @value.
*/
void
-glade_widget_adaptor_child_set_property (GladeWidgetAdaptor * adaptor,
- GObject * container,
- GObject * child,
- const gchar * property_name,
- const GValue * value)
+glade_widget_adaptor_child_set_property (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *child,
+ const gchar *property_name,
+ const GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3596,11 +3588,11 @@ glade_widget_adaptor_child_set_property (GladeWidgetAdaptor * adaptor,
* Gets @child's packing property identified by @property_name.
*/
void
-glade_widget_adaptor_child_get_property (GladeWidgetAdaptor * adaptor,
- GObject * container,
- GObject * child,
- const gchar * property_name,
- GValue * value)
+glade_widget_adaptor_child_get_property (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *child,
+ const gchar *property_name,
+ GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3634,11 +3626,11 @@ glade_widget_adaptor_child_get_property (GladeWidgetAdaptor * adaptor,
* will silently return TRUE if the class did not provide a verify function.
*/
gboolean
-glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor * adaptor,
- GObject * container,
- GObject * child,
- const gchar * property_name,
- const GValue * value)
+glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *child,
+ const gchar *property_name,
+ const GValue *value)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (G_IS_OBJECT (container), FALSE);
@@ -3669,9 +3661,10 @@ glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor * adaptor,
* property values.
*/
void
-glade_widget_adaptor_replace_child (GladeWidgetAdaptor * adaptor,
- GObject * container,
- GObject * old_obj, GObject * new_obj)
+glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *old_obj,
+ GObject *new_obj)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3694,7 +3687,7 @@ glade_widget_adaptor_replace_child (GladeWidgetAdaptor * adaptor,
* certain properties upon creation of this class.
*/
gboolean
-glade_widget_adaptor_query (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_query (GladeWidgetAdaptor *adaptor)
{
GladePropertyClass *pclass;
GList *l;
@@ -3724,9 +3717,9 @@ glade_widget_adaptor_query (GladeWidgetAdaptor * adaptor)
* Returns: a string representing the default value for @property_id
*/
G_CONST_RETURN gchar *
-glade_widget_adaptor_get_packing_default (GladeWidgetAdaptor * child_adaptor,
- GladeWidgetAdaptor *
- container_adaptor, const gchar * id)
+glade_widget_adaptor_get_packing_default (GladeWidgetAdaptor *child_adaptor,
+ GladeWidgetAdaptor *container_adaptor,
+ const gchar *id)
{
GladeChildPacking *packing = NULL;
GList *l;
@@ -3760,7 +3753,7 @@ glade_widget_adaptor_get_packing_default (GladeWidgetAdaptor * child_adaptor,
* Returns: whether or not @adaptor is a container
*/
gboolean
-glade_widget_adaptor_is_container (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_is_container (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
@@ -3773,7 +3766,7 @@ glade_widget_adaptor_is_container (GladeWidgetAdaptor * adaptor)
}
static const gchar *
-gwa_action_path_get_id (const gchar * action_path)
+gwa_action_path_get_id (const gchar *action_path)
{
const gchar *id;
@@ -3784,7 +3777,7 @@ gwa_action_path_get_id (const gchar * action_path)
}
static GWActionClass *
-gwa_action_lookup (GList * actions, const gchar * action_id)
+gwa_action_lookup (GList *actions, const gchar *action_id)
{
GList *l;
@@ -3799,7 +3792,7 @@ gwa_action_lookup (GList * actions, const gchar * action_id)
}
static GWActionClass *
-gwa_action_get_last_group (GList * actions, const gchar * action_path)
+gwa_action_get_last_group (GList *actions, const gchar *action_path)
{
gchar **tokens = g_strsplit (action_path, "/", 0);
GWActionClass *group = NULL;
@@ -3868,10 +3861,11 @@ glade_widget_adaptor_action_add_real (GList **list,
* Returns: whether or not the action was added/updated.
*/
gboolean
-glade_widget_adaptor_action_add (GladeWidgetAdaptor * adaptor,
- const gchar * action_path,
- const gchar * label,
- const gchar * stock, gboolean important)
+glade_widget_adaptor_action_add (GladeWidgetAdaptor *adaptor,
+ const gchar *action_path,
+ const gchar *label,
+ const gchar *stock,
+ gboolean important)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (action_path != NULL, FALSE);
@@ -3895,10 +3889,11 @@ glade_widget_adaptor_action_add (GladeWidgetAdaptor * adaptor,
* Returns: whether or not the action was added/updated.
*/
gboolean
-glade_widget_adaptor_pack_action_add (GladeWidgetAdaptor * adaptor,
- const gchar * action_path,
- const gchar * label,
- const gchar * stock, gboolean important)
+glade_widget_adaptor_pack_action_add (GladeWidgetAdaptor *adaptor,
+ const gchar *action_path,
+ const gchar *label,
+ const gchar *stock,
+ gboolean important)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (action_path != NULL, FALSE);
@@ -3909,8 +3904,8 @@ glade_widget_adaptor_pack_action_add (GladeWidgetAdaptor * adaptor,
}
static gboolean
-glade_widget_adaptor_action_remove_real (GList ** list,
- const gchar * action_path)
+glade_widget_adaptor_action_remove_real (GList **list,
+ const gchar *action_path)
{
GWActionClass *action, *group;
const gchar *id;
@@ -3940,8 +3935,8 @@ glade_widget_adaptor_action_remove_real (GList ** list,
* Returns: whether or not the action was removed.
*/
gboolean
-glade_widget_adaptor_action_remove (GladeWidgetAdaptor * adaptor,
- const gchar * action_path)
+glade_widget_adaptor_action_remove (GladeWidgetAdaptor *adaptor,
+ const gchar *action_path)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (action_path != NULL, FALSE);
@@ -3960,8 +3955,8 @@ glade_widget_adaptor_action_remove (GladeWidgetAdaptor * adaptor,
* Returns: whether or not the action was removed.
*/
gboolean
-glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor * adaptor,
- const gchar * action_path)
+glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor *adaptor,
+ const gchar *action_path)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (action_path != NULL, FALSE);
@@ -3979,7 +3974,7 @@ glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor * adaptor,
* Returns: a new list of GladeWidgetAction.
*/
GList *
-glade_widget_adaptor_actions_new (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_actions_new (GladeWidgetAdaptor *adaptor)
{
GList *l, *list = NULL;
@@ -4005,7 +4000,7 @@ glade_widget_adaptor_actions_new (GladeWidgetAdaptor * adaptor)
* Returns: a new list of GladeWidgetAction.
*/
GList *
-glade_widget_adaptor_pack_actions_new (GladeWidgetAdaptor * adaptor)
+glade_widget_adaptor_pack_actions_new (GladeWidgetAdaptor *adaptor)
{
GList *l, *list = NULL;
@@ -4031,9 +4026,9 @@ glade_widget_adaptor_pack_actions_new (GladeWidgetAdaptor * adaptor)
* An adaptor function to be called on widget actions.
*/
void
-glade_widget_adaptor_action_activate (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * action_path)
+glade_widget_adaptor_action_activate (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *action_path)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (object));
@@ -4052,10 +4047,10 @@ glade_widget_adaptor_action_activate (GladeWidgetAdaptor * adaptor,
* An adaptor function to be called on widget actions.
*/
void
-glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor * adaptor,
- GObject * container,
- GObject * object,
- const gchar * action_path)
+glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GObject *object,
+ const gchar *action_path)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -4080,9 +4075,9 @@ glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor * adaptor,
* Returns: A newly created #GtkMenu or %NULL
*/
GtkWidget *
-glade_widget_adaptor_action_submenu (GladeWidgetAdaptor * adaptor,
- GObject * object,
- const gchar * action_path)
+glade_widget_adaptor_action_submenu (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *action_path)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
@@ -4110,8 +4105,9 @@ glade_widget_adaptor_action_submenu (GladeWidgetAdaptor * adaptor,
* the resulting glade file.
*/
gboolean
-glade_widget_adaptor_depends (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget, GladeWidget * another)
+glade_widget_adaptor_depends (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeWidget *another)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
@@ -4131,8 +4127,9 @@ glade_widget_adaptor_depends (GladeWidgetAdaptor * adaptor,
* when loading xml files.
*/
void
-glade_widget_adaptor_read_widget (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget, GladeXmlNode * node)
+glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4153,10 +4150,10 @@ glade_widget_adaptor_read_widget (GladeWidgetAdaptor * adaptor,
* when writing xml files.
*/
void
-glade_widget_adaptor_write_widget (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeXmlContext * context,
- GladeXmlNode * node)
+glade_widget_adaptor_write_widget (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4178,8 +4175,9 @@ glade_widget_adaptor_write_widget (GladeWidgetAdaptor * adaptor,
* glade_widget_read())
*/
void
-glade_widget_adaptor_read_child (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget, GladeXmlNode * node)
+glade_widget_adaptor_read_child (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4201,10 +4199,10 @@ glade_widget_adaptor_read_child (GladeWidgetAdaptor * adaptor,
* into glade_widget_write())
*/
void
-glade_widget_adaptor_write_child (GladeWidgetAdaptor * adaptor,
- GladeWidget * widget,
- GladeXmlContext * context,
- GladeXmlNode * node)
+glade_widget_adaptor_write_child (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4227,8 +4225,8 @@ glade_widget_adaptor_write_child (GladeWidgetAdaptor * adaptor,
* Returns: A newly created #GladeEditorProperty
*/
GladeEditorProperty *
-glade_widget_adaptor_create_eprop (GladeWidgetAdaptor * adaptor,
- GladePropertyClass * klass,
+glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor,
+ GladePropertyClass *klass,
gboolean use_command)
{
GladeEditorProperty *eprop;
@@ -4260,8 +4258,8 @@ glade_widget_adaptor_create_eprop (GladeWidgetAdaptor * adaptor,
* Returns: A newly created #GladeEditorProperty
*/
GladeEditorProperty *
-glade_widget_adaptor_create_eprop_by_name (GladeWidgetAdaptor * adaptor,
- const gchar * property_id,
+glade_widget_adaptor_create_eprop_by_name (GladeWidgetAdaptor *adaptor,
+ const gchar *property_id,
gboolean packing,
gboolean use_command)
{
@@ -4294,9 +4292,9 @@ glade_widget_adaptor_create_eprop_by_name (GladeWidgetAdaptor * adaptor,
* Returns: A newly allocated string representation of @value
*/
gchar *
-glade_widget_adaptor_string_from_value (GladeWidgetAdaptor * adaptor,
- GladePropertyClass * klass,
- const GValue * value)
+glade_widget_adaptor_string_from_value (GladeWidgetAdaptor *adaptor,
+ GladePropertyClass *klass,
+ const GValue *value)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), NULL);
@@ -4318,8 +4316,8 @@ glade_widget_adaptor_string_from_value (GladeWidgetAdaptor * adaptor,
* Returns: a #GladeSignalClass or %NULL
*/
GladeSignalClass *
-glade_widget_adaptor_get_signal_class (GladeWidgetAdaptor * adaptor,
- const gchar * name)
+glade_widget_adaptor_get_signal_class (GladeWidgetAdaptor *adaptor,
+ const gchar *name)
{
GList *list;
GladeSignalClass *signal;
@@ -4350,7 +4348,7 @@ glade_widget_adaptor_get_signal_class (GladeWidgetAdaptor * adaptor,
* Returns: A new #GladeEditable widget
*/
GladeEditable *
-glade_widget_adaptor_create_editable (GladeWidgetAdaptor * adaptor,
+glade_widget_adaptor_create_editable (GladeWidgetAdaptor *adaptor,
GladeEditorPageType type)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]