[glade/glade-3-18] Convert every object to use G_DEFINE_TYPE_WITH_CODE() or G_ADD_PRIVATE() macros Fixed function proto
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/glade-3-18] Convert every object to use G_DEFINE_TYPE_WITH_CODE() or G_ADD_PRIVATE() macros Fixed function proto
- Date: Thu, 17 Apr 2014 03:30:18 +0000 (UTC)
commit 35dcc715acfe3f25b19cb3b6b5af98621f2c2e95
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Wed Apr 16 23:08:30 2014 -0300
Convert every object to use G_DEFINE_TYPE_WITH_CODE() or G_ADD_PRIVATE() macros
Fixed function prototype identation and spacing.
gladeui/glade-app.c | 51 ++--
gladeui/glade-base-editor.c | 148 +++++-----
gladeui/glade-catalog.c | 4 +-
gladeui/glade-cell-renderer-icon.c | 82 +++---
gladeui/glade-clipboard.c | 27 +-
gladeui/glade-command.c | 8 +-
gladeui/glade-design-layout.c | 13 +-
gladeui/glade-design-view.c | 9 +-
gladeui/glade-editor-property.c | 8 +-
gladeui/glade-editor-skeleton.c | 16 +-
gladeui/glade-editor-table.c | 44 ++--
gladeui/glade-editor.c | 48 ++--
gladeui/glade-id-allocator.c | 6 +-
gladeui/glade-inspector.c | 113 ++++----
gladeui/glade-name-context.c | 22 +-
gladeui/glade-named-icon-chooser-dialog.c | 232 ++++++++--------
gladeui/glade-object-stub.c | 18 +-
gladeui/glade-palette.c | 67 ++---
gladeui/glade-placeholder.c | 24 +-
gladeui/glade-popup.c | 32 +-
gladeui/glade-preview-window.c | 10 +-
gladeui/glade-preview.c | 8 +-
gladeui/glade-project.c | 213 +++++++-------
gladeui/glade-property-label.c | 8 +-
gladeui/glade-property-shell.c | 54 ++--
gladeui/glade-property.c | 141 +++++-----
gladeui/glade-signal-class.c | 26 +-
gladeui/glade-signal-editor.c | 13 +-
gladeui/glade-signal-model.c | 5 +-
gladeui/glade-signal.c | 20 +-
gladeui/glade-widget-action.c | 42 ++--
gladeui/glade-widget-adaptor.c | 341 +++++++++++-----------
gladeui/glade-widget.c | 439 +++++++++++++++--------------
gladeui/glade-xml-utils.c | 141 +++++-----
plugins/gtk+/glade-fixed.c | 40 +---
plugins/gtk+/glade-scale-editor.c | 12 +-
src/glade-http.c | 6 +-
37 files changed, 1205 insertions(+), 1286 deletions(-)
---
diff --git a/gladeui/glade-app.c b/gladeui/glade-app.c
index 9ceeb97..0c723cd 100644
--- a/gladeui/glade-app.c
+++ b/gladeui/glade-app.c
@@ -53,9 +53,6 @@
#define GLADE_CONFIG_FILENAME "glade.conf"
-#define GLADE_APP_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- GLADE_TYPE_APP, \
- GladeAppPrivate))
enum
{
DOC_SEARCH,
@@ -91,15 +88,15 @@ static gchar *lib_dir = NULL;
static GladeApp *singleton_app = NULL;
static gboolean check_initialised = FALSE;
-G_DEFINE_TYPE (GladeApp, glade_app, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeApp, glade_app, G_TYPE_OBJECT);
/*****************************************************************
* GObjectClass *
*****************************************************************/
static GObject *
-glade_app_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam * construct_properties)
+glade_app_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
{
GObject *object;
@@ -122,7 +119,7 @@ glade_app_constructor (GType type,
static void
-glade_app_dispose (GObject * app)
+glade_app_dispose (GObject *app)
{
GladeAppPrivate *priv = GLADE_APP (app)->priv;
@@ -143,7 +140,7 @@ glade_app_dispose (GObject * app)
}
static void
-glade_app_finalize (GObject * app)
+glade_app_finalize (GObject *app)
{
g_free (catalogs_dir);
g_free (modules_dir);
@@ -271,10 +268,10 @@ glade_app_get_lib_dir (void)
}
static void
-pointer_mode_register_icon (GtkIconFactory *factory,
- const gchar *icon_name,
+pointer_mode_register_icon (GtkIconFactory *factory,
+ const gchar *icon_name,
GladePointerMode mode,
- GtkIconSize size)
+ GtkIconSize size)
{
GdkPixbuf *pixbuf;
@@ -289,10 +286,10 @@ pointer_mode_register_icon (GtkIconFactory *factory,
static void
register_stock_icon (GtkIconFactory *factory,
- const gchar *stock_id,
- const gchar *icon_name,
- const gchar *file_name,
- GtkIconSize size)
+ const gchar *stock_id,
+ const gchar *icon_name,
+ const gchar *file_name,
+ GtkIconSize size)
{
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
GdkPixbuf *pixbuf;
@@ -370,7 +367,7 @@ static void
glade_app_init (GladeApp *app)
{
static gboolean initialized = FALSE;
- GladeAppPrivate *priv = app->priv = GLADE_APP_GET_PRIVATE (app);
+ GladeAppPrivate *priv = app->priv = glade_app_get_instance_private (app);
singleton_app = app;
@@ -407,7 +404,7 @@ glade_app_event_handler (GdkEvent *event, gpointer data)
}
static void
-glade_app_class_init (GladeAppClass * klass)
+glade_app_class_init (GladeAppClass *klass)
{
GObjectClass *object_class;
@@ -465,9 +462,7 @@ glade_app_class_init (GladeAppClass * klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
_glade_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, G_TYPE_OBJECT);
-
- g_type_class_add_private (klass, sizeof (GladeAppPrivate));
+ G_TYPE_NONE, 1, G_TYPE_OBJECT);
gdk_event_handler_set (glade_app_event_handler, NULL, NULL);
}
@@ -633,7 +628,7 @@ glade_app_get (void)
}
void
-glade_app_set_window (GtkWidget * window)
+glade_app_set_window (GtkWidget *window)
{
GladeApp *app = glade_app_get ();
@@ -641,7 +636,7 @@ glade_app_set_window (GtkWidget * window)
}
GladeCatalog *
-glade_app_get_catalog (const gchar * name)
+glade_app_get_catalog (const gchar *name)
{
GladeApp *app = glade_app_get ();
GList *list;
@@ -659,7 +654,7 @@ glade_app_get_catalog (const gchar * name)
}
gboolean
-glade_app_get_catalog_version (const gchar * name, gint * major, gint * minor)
+glade_app_get_catalog_version (const gchar *name, gint *major, gint *minor)
{
GladeCatalog *catalog = glade_app_get_catalog (name);
@@ -725,7 +720,7 @@ glade_app_get_config (void)
}
gboolean
-glade_app_is_project_loaded (const gchar * project_path)
+glade_app_is_project_loaded (const gchar *project_path)
{
GladeApp *app;
GList *list;
@@ -757,7 +752,7 @@ glade_app_is_project_loaded (const gchar * project_path)
* Returns: A #GladeProject, or NULL if no such open project was found
*/
GladeProject *
-glade_app_get_project_by_path (const gchar * project_path)
+glade_app_get_project_by_path (const gchar *project_path)
{
GladeApp *app;
GList *l;
@@ -788,7 +783,7 @@ glade_app_get_project_by_path (const gchar * project_path)
}
void
-glade_app_add_project (GladeProject * project)
+glade_app_add_project (GladeProject *project)
{
GladeApp *app;
@@ -805,7 +800,7 @@ glade_app_add_project (GladeProject * project)
}
void
-glade_app_remove_project (GladeProject * project)
+glade_app_remove_project (GladeProject *project)
{
GladeApp *app;
g_return_if_fail (GLADE_IS_PROJECT (project));
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index 20179cf..2a28875 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -114,15 +114,15 @@ enum
N_PROPERTIES
};
-G_DEFINE_TYPE (GladeBaseEditor, glade_base_editor, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeBaseEditor, glade_base_editor, GTK_TYPE_BOX)
static GParamSpec *properties[N_PROPERTIES];
static guint glade_base_editor_signals[LAST_SIGNAL] = { 0 };
static void glade_base_editor_set_container (GladeBaseEditor *editor,
- GObject *container);
+ GObject *container);
static void glade_base_editor_block_callbacks (GladeBaseEditor *editor,
- gboolean block);
+ gboolean block);
static void
@@ -199,8 +199,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, ...)
+ GtkTreeIter *retiter,
+ GType child_type,
+ ...)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -234,7 +235,7 @@ glade_base_editor_get_type_info (GladeBaseEditor *e,
static gchar *
glade_base_editor_get_display_name (GladeBaseEditor *editor,
- GladeWidget *gchild)
+ GladeWidget *gchild)
{
gchar *retval;
g_signal_emit (editor,
@@ -245,8 +246,8 @@ glade_base_editor_get_display_name (GladeBaseEditor *editor,
static void
glade_base_editor_fill_store_real (GladeBaseEditor *e,
- GladeWidget *gwidget,
- GtkTreeIter *parent)
+ GladeWidget *gwidget,
+ GtkTreeIter *parent)
{
GList *children, *l;
GtkTreeIter iter;
@@ -322,8 +323,8 @@ glade_base_editor_project_widget_name_changed (GladeProject *project,
static GladeWidget *
glade_base_editor_delegate_build_child (GladeBaseEditor *editor,
- GladeWidget *parent,
- GType type)
+ GladeWidget *parent,
+ GType type)
{
GladeWidget *child = NULL;
g_signal_emit (editor, glade_base_editor_signals[SIGNAL_BUILD_CHILD],
@@ -333,8 +334,8 @@ glade_base_editor_delegate_build_child (GladeBaseEditor *editor,
static gboolean
glade_base_editor_delegate_delete_child (GladeBaseEditor *editor,
- GladeWidget *parent,
- GladeWidget *child)
+ GladeWidget *parent,
+ GladeWidget *child)
{
gboolean retval;
@@ -397,7 +398,7 @@ glade_base_editor_clear (GladeBaseEditor *editor)
}
static void
-glade_base_editor_treeview_cursor_changed (GtkTreeView *treeview,
+glade_base_editor_treeview_cursor_changed (GtkTreeView *treeview,
GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
@@ -468,8 +469,8 @@ glade_base_editor_set_cursor (GladeBaseEditor *e, GtkTreeIter *iter)
static gboolean
glade_base_editor_find_child_real (GladeBaseEditor *e,
- GladeWidget *gchild,
- GtkTreeIter *iter)
+ GladeWidget *gchild,
+ GtkTreeIter *iter)
{
GtkTreeModel *model = e->priv->model;
GtkTreeIter child_iter;
@@ -497,8 +498,8 @@ glade_base_editor_find_child_real (GladeBaseEditor *e,
static gboolean
glade_base_editor_find_child (GladeBaseEditor *e,
- GladeWidget *child,
- GtkTreeIter *iter)
+ 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);
@@ -517,8 +518,8 @@ glade_base_editor_select_child (GladeBaseEditor *e, GladeWidget *child)
static void
glade_base_editor_child_change_type (GladeBaseEditor *editor,
- GtkTreeIter *iter,
- GType type)
+ GtkTreeIter *iter,
+ GType type)
{
GladeWidget *gchild;
GObject *child;
@@ -591,9 +592,9 @@ 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)
+ const gchar *path_string,
+ const gchar *new_text,
+ GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
GtkTreeModel *child_class;
@@ -648,7 +649,7 @@ glade_base_editor_child_type_edited (GtkCellRendererText *cell,
static void
glade_base_editor_reorder_children (GladeBaseEditor *editor,
- GtkTreeIter *child)
+ GtkTreeIter *child)
{
GtkTreeModel *model = editor->priv->model;
GladeWidget *gchild;
@@ -764,7 +765,7 @@ glade_base_editor_add_child (GladeBaseEditor *editor,
static void
-glade_base_editor_add_item_activate (GtkMenuItem *menuitem,
+glade_base_editor_add_item_activate (GtkMenuItem *menuitem,
GladeBaseEditor *e)
{
GObject *item = G_OBJECT (menuitem);
@@ -861,8 +862,8 @@ glade_base_editor_popup (GladeBaseEditor *editor, GladeWidget *widget)
}
static gint
-glade_base_editor_popup_handler (GtkWidget *treeview,
- GdkEventButton *event,
+glade_base_editor_popup_handler (GtkWidget *treeview,
+ GdkEventButton *event,
GladeBaseEditor *e)
{
GtkTreePath *path;
@@ -936,8 +937,8 @@ glade_base_editor_delete_child (GladeBaseEditor *e)
static gboolean
-glade_base_editor_treeview_key_press_event (GtkWidget *widget,
- GdkEventKey *event,
+glade_base_editor_treeview_key_press_event (GtkWidget *widget,
+ GdkEventKey *event,
GladeBaseEditor *e)
{
if (event->keyval == GDK_KEY_Delete)
@@ -1018,8 +1019,8 @@ glade_base_editor_update_treeview_idle (gpointer data)
}
static void
-glade_base_editor_project_widget_name_changed (GladeProject *project,
- GladeWidget *widget,
+glade_base_editor_project_widget_name_changed (GladeProject *project,
+ GladeWidget *widget,
GladeBaseEditor *editor)
{
GladeWidget *selected_child;
@@ -1094,9 +1095,9 @@ glade_base_editor_drag_and_drop_idle (gpointer data)
}
static void
-glade_base_editor_row_inserted (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
+glade_base_editor_row_inserted (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
GladeBaseEditor *e)
{
e->priv->iter = *iter;
@@ -1131,8 +1132,8 @@ glade_base_editor_project_remove_widget (GladeProject *project,
}
static void
-glade_base_editor_project_add_widget (GladeProject *project,
- GladeWidget *widget,
+glade_base_editor_project_add_widget (GladeProject *project,
+ GladeWidget *widget,
GladeBaseEditor *e)
{
if (e->priv->updating_treeview)
@@ -1151,9 +1152,9 @@ glade_base_editor_project_add_widget (GladeProject *project,
static gboolean
glade_base_editor_update_display_name (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer data)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
GladeBaseEditor *editor = data;
GladeWidget *gchild;
@@ -1172,9 +1173,9 @@ glade_base_editor_update_display_name (GtkTreeModel *model,
}
static void
-glade_base_editor_project_changed (GladeProject *project,
- GladeCommand *command,
- gboolean forward,
+glade_base_editor_project_changed (GladeProject *project,
+ GladeCommand *command,
+ gboolean forward,
GladeBaseEditor *editor)
{
gtk_tree_model_foreach (editor->priv->model,
@@ -1184,7 +1185,7 @@ glade_base_editor_project_changed (GladeProject *project,
static void
-glade_base_editor_project_disconnect (GladeBaseEditor * editor)
+glade_base_editor_project_disconnect (GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
@@ -1275,16 +1276,6 @@ glade_base_editor_set_container (GladeBaseEditor *editor, GObject *container)
/*************************** GladeBaseEditor Class ****************************/
static void
-glade_base_editor_finalize (GObject *object)
-{
- GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
-
- g_free (cobj->priv);
-
- G_OBJECT_CLASS (glade_base_editor_parent_class)->finalize (object);
-}
-
-static void
glade_base_editor_dispose (GObject *object)
{
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
@@ -1298,10 +1289,10 @@ glade_base_editor_dispose (GObject *object)
}
static void
-glade_base_editor_set_property (GObject *object,
- guint prop_id,
+glade_base_editor_set_property (GObject *object,
+ guint prop_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
GladeBaseEditor *editor = GLADE_BASE_EDITOR (object);
@@ -1317,9 +1308,9 @@ glade_base_editor_set_property (GObject *object,
}
static void
-glade_base_editor_get_property (GObject *object,
- guint prop_id,
- GValue *value,
+glade_base_editor_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
GParamSpec *pspec)
{
GladeBaseEditor *editor = GLADE_BASE_EDITOR (object);
@@ -1339,8 +1330,8 @@ glade_base_editor_get_property (GObject *object,
/* Default handlers */
static gboolean
glade_base_editor_change_type (GladeBaseEditor *editor,
- GladeWidget *gchild,
- GType type)
+ GladeWidget *gchild,
+ GType type)
{
GladeWidget *parent, *gchild_new;
GList *children, *l;
@@ -1429,7 +1420,7 @@ glade_base_editor_change_type (GladeBaseEditor *editor,
static gchar *
glade_base_editor_get_display_name_impl (GladeBaseEditor *editor,
- GladeWidget *gchild)
+ GladeWidget *gchild)
{
return g_strdup (glade_widget_get_name (gchild));
}
@@ -1446,8 +1437,8 @@ glade_base_editor_build_child (GladeBaseEditor *editor,
static gboolean
glade_base_editor_move_child (GladeBaseEditor *editor,
- GladeWidget *gparent,
- GladeWidget *gchild)
+ GladeWidget *gparent,
+ GladeWidget *gchild)
{
GList list = { 0, };
@@ -1462,8 +1453,8 @@ glade_base_editor_move_child (GladeBaseEditor *editor,
static gboolean
glade_base_editor_delete_child_impl (GladeBaseEditor *editor,
- GladeWidget *gparent,
- GladeWidget *gchild)
+ GladeWidget *gparent,
+ GladeWidget *gchild)
{
GList list = { 0, };
@@ -1480,7 +1471,6 @@ glade_base_editor_class_init (GladeBaseEditorClass *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;
object_class->set_property = glade_base_editor_set_property;
object_class->get_property = glade_base_editor_get_property;
@@ -1665,9 +1655,9 @@ glade_base_editor_realize_callback (GtkWidget *widget, gpointer user_data)
static void
-glade_base_editor_switch_page (GtkNotebook *notebook,
- GtkWidget *page,
- guint page_num,
+glade_base_editor_switch_page (GtkNotebook *notebook,
+ GtkWidget *page,
+ guint page_num,
GladeBaseEditor *editor)
{
GladeBaseEditorPrivate *e = editor->priv;
@@ -1707,7 +1697,7 @@ glade_base_editor_init (GladeBaseEditor *editor)
GTK_ORIENTATION_VERTICAL);
gtk_box_set_spacing (GTK_BOX (editor), 8);
- e = editor->priv = g_new0 (GladeBaseEditorPrivate, 1);
+ e = editor->priv = glade_base_editor_get_instance_private (editor);
/* Paned */
e->paned = paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
@@ -2009,7 +1999,7 @@ glade_base_editor_append_types (GladeBaseEditor *editor, GType parent_type, ...)
*/
void
glade_base_editor_add_default_properties (GladeBaseEditor *editor,
- GladeWidget *gchild)
+ GladeWidget *gchild)
{
GtkTreeIter combo_iter;
GtkWidget *label, *entry;
@@ -2076,8 +2066,9 @@ glade_base_editor_add_default_properties (GladeBaseEditor *editor,
*/
void
glade_base_editor_add_properties (GladeBaseEditor *editor,
- GladeWidget *gchild,
- gboolean packing, ...)
+ GladeWidget *gchild,
+ gboolean packing,
+ ...)
{
GladeEditorProperty *eprop;
va_list args;
@@ -2114,8 +2105,8 @@ 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,
+glade_base_editor_add_editable (GladeBaseEditor *editor,
+ GladeWidget *gchild,
GladeEditorPageType page)
{
GladeEditable *editable;
@@ -2183,8 +2174,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,
- gboolean val)
+glade_base_editor_set_show_signal_editor (GladeBaseEditor *editor, gboolean val)
{
g_return_if_fail (GLADE_IS_BASE_EDITOR (editor));
@@ -2223,8 +2213,8 @@ glade_base_editor_help (GtkButton *button, gchar *markup)
*/
GtkWidget *
glade_base_editor_pack_new_window (GladeBaseEditor *editor,
- gchar *title,
- gchar *help_markup)
+ gchar *title,
+ gchar *help_markup)
{
GtkWidget *window, *buttonbox, *button;
gchar *real_title;
diff --git a/gladeui/glade-catalog.c b/gladeui/glade-catalog.c
index 0dc7d83..a687d21 100644
--- a/gladeui/glade-catalog.c
+++ b/gladeui/glade-catalog.c
@@ -87,8 +87,8 @@ static GList *catalog_paths = NULL;
static gboolean
catalog_get_function (GladeCatalog *catalog,
- const gchar *symbol_name,
- gpointer *symbol_ptr)
+ const gchar *symbol_name,
+ gpointer *symbol_ptr)
{
if (catalog->module == NULL)
catalog->module = glade_util_load_library (catalog->library);
diff --git a/gladeui/glade-cell-renderer-icon.c b/gladeui/glade-cell-renderer-icon.c
index 6ba93bb..9811a9b 100644
--- a/gladeui/glade-cell-renderer-icon.c
+++ b/gladeui/glade-cell-renderer-icon.c
@@ -23,22 +23,20 @@
#include "glade-cell-renderer-icon.h"
#include "glade-marshallers.h"
-static void glade_cell_renderer_icon_get_property (GObject * object,
- guint param_id,
- GValue * value,
- GParamSpec * pspec);
-static void glade_cell_renderer_icon_set_property (GObject * object,
- guint param_id,
- const GValue * value,
- GParamSpec * pspec);
-static gboolean glade_cell_renderer_icon_activate (GtkCellRenderer * cell,
- GdkEvent * event,
- GtkWidget * widget,
- const gchar * path,
- const GdkRectangle *
- background_area,
- const GdkRectangle *
- cell_area,
+static void glade_cell_renderer_icon_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void glade_cell_renderer_icon_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static gboolean glade_cell_renderer_icon_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
struct _GladeCellRendererIconPrivate
@@ -65,15 +63,13 @@ static GParamSpec *properties[N_PROPERTIES];
static guint icon_cell_signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GladeCellRendererIcon, glade_cell_renderer_icon,
- GTK_TYPE_CELL_RENDERER_PIXBUF)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeCellRendererIcon,
+ glade_cell_renderer_icon,
+ GTK_TYPE_CELL_RENDERER_PIXBUF)
static void glade_cell_renderer_icon_init (GladeCellRendererIcon *cellicon)
{
- cellicon->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((cellicon),
- GLADE_TYPE_CELL_RENDERER_ICON,
- GladeCellRendererIconPrivate);
+ cellicon->priv = glade_cell_renderer_icon_get_instance_private (cellicon);
cellicon->priv->activatable = TRUE;
cellicon->priv->active = FALSE;
@@ -83,7 +79,7 @@ static void glade_cell_renderer_icon_init (GladeCellRendererIcon *cellicon)
}
static void
-glade_cell_renderer_icon_class_init (GladeCellRendererIconClass * class)
+glade_cell_renderer_icon_class_init (GladeCellRendererIconClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
@@ -116,14 +112,13 @@ glade_cell_renderer_icon_class_init (GladeCellRendererIconClass * class)
G_STRUCT_OFFSET (GladeCellRendererIconClass, activate),
NULL, NULL,
_glade_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
-
- g_type_class_add_private (class, sizeof (GladeCellRendererIconPrivate));
}
static void
-glade_cell_renderer_icon_get_property (GObject * object,
- guint param_id,
- GValue * value, GParamSpec * pspec)
+glade_cell_renderer_icon_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeCellRendererIcon *cellicon = GLADE_CELL_RENDERER_ICON (object);
@@ -143,9 +138,10 @@ glade_cell_renderer_icon_get_property (GObject * object,
static void
-glade_cell_renderer_icon_set_property (GObject * object,
- guint param_id,
- const GValue * value, GParamSpec * pspec)
+glade_cell_renderer_icon_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeCellRendererIcon *cellicon = GLADE_CELL_RENDERER_ICON (object);
@@ -170,12 +166,12 @@ glade_cell_renderer_icon_new (void)
}
static gint
-glade_cell_renderer_icon_activate (GtkCellRenderer * cell,
- GdkEvent * event,
- GtkWidget * widget,
- const gchar * path,
- const GdkRectangle * background_area,
- const GdkRectangle * cell_area,
+glade_cell_renderer_icon_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
GladeCellRendererIcon *cellicon;
@@ -191,7 +187,7 @@ glade_cell_renderer_icon_activate (GtkCellRenderer * cell,
}
gboolean
-glade_cell_renderer_icon_get_active (GladeCellRendererIcon * icon)
+glade_cell_renderer_icon_get_active (GladeCellRendererIcon *icon)
{
g_return_val_if_fail (GLADE_IS_CELL_RENDERER_ICON (icon), FALSE);
@@ -199,8 +195,8 @@ glade_cell_renderer_icon_get_active (GladeCellRendererIcon * icon)
}
void
-glade_cell_renderer_icon_set_active (GladeCellRendererIcon * icon,
- gboolean setting)
+glade_cell_renderer_icon_set_active (GladeCellRendererIcon *icon,
+ gboolean setting)
{
g_return_if_fail (GLADE_IS_CELL_RENDERER_ICON (icon));
@@ -212,7 +208,7 @@ glade_cell_renderer_icon_set_active (GladeCellRendererIcon * icon,
}
gboolean
-glade_cell_renderer_icon_get_activatable (GladeCellRendererIcon * icon)
+glade_cell_renderer_icon_get_activatable (GladeCellRendererIcon *icon)
{
g_return_val_if_fail (GLADE_IS_CELL_RENDERER_ICON (icon), FALSE);
@@ -220,8 +216,8 @@ glade_cell_renderer_icon_get_activatable (GladeCellRendererIcon * icon)
}
void
-glade_cell_renderer_icon_set_activatable (GladeCellRendererIcon * icon,
- gboolean setting)
+glade_cell_renderer_icon_set_activatable (GladeCellRendererIcon *icon,
+ gboolean setting)
{
g_return_if_fail (GLADE_IS_CELL_RENDERER_ICON (icon));
diff --git a/gladeui/glade-clipboard.c b/gladeui/glade-clipboard.c
index 392f48d..2ed4fc6 100644
--- a/gladeui/glade-clipboard.c
+++ b/gladeui/glade-clipboard.c
@@ -55,11 +55,13 @@ enum
static GParamSpec *properties[N_PROPERTIES];
-G_DEFINE_TYPE (GladeClipboard, glade_clipboard, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeClipboard, glade_clipboard, G_TYPE_OBJECT);
static void
-glade_project_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec)
+glade_project_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeClipboard *clipboard = GLADE_CLIPBOARD (object);
@@ -92,25 +94,20 @@ glade_clipboard_class_init (GladeClipboardClass * klass)
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (klass, sizeof (GladeClipboardPrivate));
}
static void
-glade_clipboard_init (GladeClipboard * clipboard)
+glade_clipboard_init (GladeClipboard *clipboard)
{
- clipboard->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (clipboard,
- GLADE_TYPE_CLIPBOARD,
- GladeClipboardPrivate);
+ clipboard->priv = glade_clipboard_get_instance_private (clipboard);
clipboard->priv->widgets = NULL;
clipboard->priv->has_selection = FALSE;
}
static void
-glade_clipboard_set_has_selection (GladeClipboard * clipboard,
- gboolean has_selection)
+glade_clipboard_set_has_selection (GladeClipboard *clipboard,
+ gboolean has_selection)
{
if (clipboard->priv->has_selection != has_selection)
{
@@ -127,7 +124,7 @@ glade_clipboard_set_has_selection (GladeClipboard * clipboard,
* Returns: TRUE if this clipboard has selected items to paste.
*/
gboolean
-glade_clipboard_get_has_selection (GladeClipboard * clipboard)
+glade_clipboard_get_has_selection (GladeClipboard *clipboard)
{
g_return_val_if_fail (GLADE_IS_CLIPBOARD (clipboard), FALSE);
@@ -163,7 +160,7 @@ glade_clipboard_new (void)
* This increases the reference count of each #GladeWidget in @widgets.
*/
void
-glade_clipboard_add (GladeClipboard * clipboard, GList * widgets)
+glade_clipboard_add (GladeClipboard *clipboard, GList *widgets)
{
GladeWidget *widget;
GList *list;
@@ -192,7 +189,7 @@ glade_clipboard_add (GladeClipboard * clipboard, GList * widgets)
* Removes all widgets from the @clipboard.
*/
void
-glade_clipboard_clear (GladeClipboard * clipboard)
+glade_clipboard_clear (GladeClipboard *clipboard)
{
GladeWidget *widget;
GList *list;
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index 4803497..c7cf4b2 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -94,7 +94,7 @@ static gint gc_group_id = 1;
static gint gc_group_depth = 0;
-G_DEFINE_TYPE (GladeCommand, glade_command, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeCommand, glade_command, G_TYPE_OBJECT)
static void
glade_command_finalize (GObject *obj)
@@ -124,9 +124,7 @@ glade_command_collapse_impl (GladeCommand *this_cmd, GladeCommand *other_cmd)
static void
glade_command_init (GladeCommand *command)
{
- command->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((command), GLADE_TYPE_COMMAND,
- GladeCommandPrivate);
+ command->priv = glade_command_get_instance_private (command);
}
static void
@@ -142,8 +140,6 @@ glade_command_class_init (GladeCommandClass *klass)
klass->execute = NULL;
klass->unifies = glade_command_unifies_impl;
klass->collapse = glade_command_collapse_impl;
-
- g_type_class_add_private (klass, sizeof (GladeCommandPrivate));
}
/* Macros for defining the derived command types */
diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c
index ae9d7ca..9cf2cb3 100644
--- a/gladeui/glade-design-layout.c
+++ b/gladeui/glade-design-layout.c
@@ -35,9 +35,6 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#define GLADE_DESIGN_LAYOUT_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- GLADE_TYPE_DESIGN_LAYOUT, \
- GladeDesignLayoutPrivate))
#define GLADE_DESIGN_LAYOUT_PRIVATE(object) (((GladeDesignLayout*)object)->priv)
#define OUTLINE_WIDTH 4
@@ -124,7 +121,7 @@ enum
PROP_DESIGN_VIEW
};
-G_DEFINE_TYPE (GladeDesignLayout, glade_design_layout, GTK_TYPE_BIN)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeDesignLayout, glade_design_layout, GTK_TYPE_BIN)
#define RECTANGLE_POINT_IN(rect,x,y) (x >= rect.x && x <= (rect.x + rect.width) && y >= rect.y && y <=
(rect.y + rect.height))
@@ -174,7 +171,7 @@ gdl_get_margins_from_pointer (GladeDesignLayout *layout, GtkWidget *widget, gint
static Activity
gdl_get_activity_from_pointer (GladeDesignLayout *layout, gint x, gint y)
{
- GladeDesignLayoutPrivate *priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (layout);
+ GladeDesignLayoutPrivate *priv = GLADE_DESIGN_LAYOUT_PRIVATE (layout);
if (priv->selection)
{
@@ -1787,7 +1784,7 @@ glade_design_layout_unrealize (GtkWidget * widget)
static void
glade_design_layout_style_updated (GtkWidget *widget)
{
- GladeDesignLayoutPrivate *priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (widget);
+ GladeDesignLayoutPrivate *priv = GLADE_DESIGN_LAYOUT_PRIVATE (widget);
_glade_design_layout_get_colors (gtk_widget_get_style_context (widget),
&priv->frame_color[0],
@@ -1805,7 +1802,7 @@ glade_design_layout_init (GladeDesignLayout *layout)
GladeDesignLayoutPrivate *priv;
gint i;
- layout->priv = priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (layout);
+ layout->priv = priv = glade_design_layout_get_instance_private (layout);
priv->activity = ACTIVITY_NONE;
@@ -2059,8 +2056,6 @@ glade_design_layout_class_init (GladeDesignLayoutClass * klass)
GLADE_TYPE_DESIGN_LAYOUT,
g_cclosure_new (G_CALLBACK (glade_design_layout_damage),
NULL, NULL));
-
- g_type_class_add_private (object_class, sizeof (GladeDesignLayoutPrivate));
}
/* Internal API */
diff --git a/gladeui/glade-design-view.c b/gladeui/glade-design-view.c
index 8811127..a6445fa 100644
--- a/gladeui/glade-design-view.c
+++ b/gladeui/glade-design-view.c
@@ -45,8 +45,6 @@
#include <glib.h>
#include <glib/gi18n.h>
-#define GLADE_DESIGN_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLADE_TYPE_DESIGN_VIEW,
GladeDesignViewPrivate))
-
#define GLADE_DESIGN_VIEW_KEY "GLADE_DESIGN_VIEW_KEY"
enum
@@ -71,6 +69,7 @@ static GtkVBoxClass *parent_class = NULL;
static void glade_design_view_drag_init (_GladeDragInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GladeDesignView, glade_design_view, GTK_TYPE_BOX,
+ G_ADD_PRIVATE (GladeDesignView)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_DRAG,
glade_design_view_drag_init))
@@ -328,7 +327,7 @@ logo_draw (GtkWidget *widget, cairo_t *cr)
static gboolean
glade_design_view_draw (GtkWidget *widget, cairo_t *cr)
{
- GladeDesignViewPrivate *priv = GLADE_DESIGN_VIEW_GET_PRIVATE (widget);
+ GladeDesignViewPrivate *priv = GLADE_DESIGN_VIEW (widget)->priv;
GdkWindow *window = gtk_widget_get_window (widget);
gboolean should_draw = gtk_cairo_should_draw_window (cr, window);
gboolean sw_visible = gtk_widget_get_visible (priv->scrolled_window);
@@ -370,7 +369,7 @@ glade_design_view_init (GladeDesignView *view)
{
GtkWidget *viewport;
- view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
+ view->priv = glade_design_view_get_instance_private (view);
gtk_widget_set_no_show_all (GTK_WIDGET (view), TRUE);
gtk_orientable_set_orientation (GTK_ORIENTABLE (view),
@@ -715,8 +714,6 @@ glade_design_view_class_init (GladeDesignViewClass *klass)
GLADE_TYPE_PROJECT,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private (object_class, sizeof (GladeDesignViewPrivate));
}
/* Private API */
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index 326a546..2ee292c 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -115,6 +115,7 @@ static void glade_editor_property_editable_init (GladeEditableIface *iface);
static GladeEditableIface *parent_editable_iface;
G_DEFINE_TYPE_WITH_CODE (GladeEditorProperty, glade_editor_property, GTK_TYPE_BOX,
+ G_ADD_PRIVATE (GladeEditorProperty)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
glade_editor_property_editable_init));
@@ -597,10 +598,7 @@ glade_editor_property_load_common (GladeEditorProperty *eprop,
static void
glade_editor_property_init (GladeEditorProperty *eprop)
{
- eprop->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((eprop),
- GLADE_TYPE_EDITOR_PROPERTY,
- GladeEditorPropertyPrivate);
+ eprop->priv = glade_editor_property_get_instance_private (eprop);
gtk_orientable_set_orientation (GTK_ORIENTABLE (eprop),
GTK_ORIENTATION_HORIZONTAL);
@@ -692,8 +690,6 @@ glade_editor_property_class_init (GladeEditorPropertyClass *eprop_class)
("custom-text", _("Custom Text"),
_("Custom Text to display in the property label"),
NULL, G_PARAM_READWRITE));
-
- g_type_class_add_private (eprop_class, sizeof (GladeEditorPropertyPrivate));
}
/*******************************************************************************
diff --git a/gladeui/glade-editor-skeleton.c b/gladeui/glade-editor-skeleton.c
index be7f1f6..2f05c0f 100644
--- a/gladeui/glade-editor-skeleton.c
+++ b/gladeui/glade-editor-skeleton.c
@@ -49,6 +49,7 @@ static GladeEditableIface *parent_editable_iface;
static GtkBuildableIface *parent_buildable_iface;
G_DEFINE_TYPE_WITH_CODE (GladeEditorSkeleton, glade_editor_skeleton, GTK_TYPE_BOX,
+ G_ADD_PRIVATE (GladeEditorSkeleton)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
glade_editor_skeleton_editable_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
@@ -57,20 +58,15 @@ G_DEFINE_TYPE_WITH_CODE (GladeEditorSkeleton, glade_editor_skeleton, GTK_TYPE_BO
static void
glade_editor_skeleton_init (GladeEditorSkeleton *skeleton)
{
- skeleton->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (skeleton,
- GLADE_TYPE_EDITOR_SKELETON,
- GladeEditorSkeletonPrivate);
+ skeleton->priv = glade_editor_skeleton_get_instance_private (skeleton);
}
static void
-glade_editor_skeleton_class_init (GladeEditorSkeletonClass *class)
+glade_editor_skeleton_class_init (GladeEditorSkeletonClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->dispose = glade_editor_skeleton_dispose;
-
- g_type_class_add_private (gobject_class, sizeof (GladeEditorSkeletonPrivate));
}
/***********************************************************
@@ -114,7 +110,7 @@ glade_editor_skeleton_load (GladeEditable *editable,
}
static void
-glade_editor_skeleton_set_show_name (GladeEditable * editable, gboolean show_name)
+glade_editor_skeleton_set_show_name (GladeEditable *editable, gboolean show_name)
{
GladeEditorSkeleton *skeleton = GLADE_EDITOR_SKELETON (editable);
GladeEditorSkeletonPrivate *priv = skeleton->priv;
@@ -129,7 +125,7 @@ glade_editor_skeleton_set_show_name (GladeEditable * editable, gboolean show_nam
}
static void
-glade_editor_skeleton_editable_init (GladeEditableIface * iface)
+glade_editor_skeleton_editable_init (GladeEditableIface *iface)
{
parent_editable_iface = g_type_default_interface_peek (GLADE_TYPE_EDITABLE);
diff --git a/gladeui/glade-editor-table.c b/gladeui/glade-editor-table.c
index a5af49b..1992530 100644
--- a/gladeui/glade-editor-table.c
+++ b/gladeui/glade-editor-table.c
@@ -100,11 +100,12 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GladeEditorTable, glade_editor_table, GTK_TYPE_GRID,
+ G_ADD_PRIVATE (GladeEditorTable)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
glade_editor_table_editable_init));
static void
-glade_editor_table_class_init (GladeEditorTableClass * klass)
+glade_editor_table_class_init (GladeEditorTableClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
@@ -121,17 +122,12 @@ glade_editor_table_class_init (GladeEditorTableClass * klass)
_("The editor page type to create this GladeEditorTable for"),
GLADE_TYPE_EDITOR_PAGE_TYPE, GLADE_PAGE_GENERAL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private (klass, sizeof (GladeEditorTablePrivate));
}
static void
-glade_editor_table_init (GladeEditorTable * self)
+glade_editor_table_init (GladeEditorTable *self)
{
- self->priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((self),
- GLADE_TYPE_EDITOR_TABLE,
- GladeEditorTablePrivate);
+ self->priv = glade_editor_table_get_instance_private (self);
gtk_orientable_set_orientation (GTK_ORIENTABLE (self),
GTK_ORIENTATION_VERTICAL);
@@ -143,7 +139,7 @@ glade_editor_table_init (GladeEditorTable * self)
}
static void
-glade_editor_table_dispose (GObject * object)
+glade_editor_table_dispose (GObject *object)
{
GladeEditorTable *table = GLADE_EDITOR_TABLE (object);
@@ -179,7 +175,7 @@ glade_editor_table_set_property (GObject *object,
}
static void
-glade_editor_table_realize (GtkWidget * widget)
+glade_editor_table_realize (GtkWidget *widget)
{
GladeEditorTable *table = GLADE_EDITOR_TABLE (widget);
GList *list;
@@ -196,7 +192,7 @@ glade_editor_table_realize (GtkWidget * widget)
}
static void
-glade_editor_table_grab_focus (GtkWidget * widget)
+glade_editor_table_grab_focus (GtkWidget *widget)
{
GladeEditorTable *editor_table = GLADE_EDITOR_TABLE (widget);
@@ -210,7 +206,7 @@ glade_editor_table_grab_focus (GtkWidget * widget)
}
static void
-widget_name_edited (GtkWidget * editable, GladeEditorTable * table)
+widget_name_edited (GtkWidget *editable, GladeEditorTable *table)
{
GladeWidget *widget;
gchar *new_name;
@@ -300,7 +296,7 @@ widget_composite_changed (GladeWidget *widget,
}
static void
-widget_finalized (GladeEditorTable * table, GladeWidget * where_widget_was)
+widget_finalized (GladeEditorTable *table, GladeWidget *where_widget_was)
{
table->priv->loaded_widget = NULL;
@@ -309,7 +305,7 @@ widget_finalized (GladeEditorTable * table, GladeWidget * where_widget_was)
static void
-glade_editor_table_load (GladeEditable * editable, GladeWidget * widget)
+glade_editor_table_load (GladeEditable *editable, GladeWidget *widget)
{
GladeEditorTable *table = GLADE_EDITOR_TABLE (editable);
GladeEditorProperty *property;
@@ -392,7 +388,7 @@ glade_editor_table_load (GladeEditable * editable, GladeWidget * widget)
}
static void
-glade_editor_table_set_show_name (GladeEditable * editable, gboolean show_name)
+glade_editor_table_set_show_name (GladeEditable *editable, gboolean show_name)
{
GladeEditorTable *table = GLADE_EDITOR_TABLE (editable);
@@ -409,7 +405,7 @@ glade_editor_table_set_show_name (GladeEditable * editable, gboolean show_name)
}
static void
-glade_editor_table_editable_init (GladeEditableIface * iface)
+glade_editor_table_editable_init (GladeEditableIface *iface)
{
iface->load = glade_editor_table_load;
iface->set_show_name = glade_editor_table_set_show_name;
@@ -466,7 +462,7 @@ property_class_comp (gconstpointer a, gconstpointer b)
}
static GList *
-get_sorted_properties (GladeWidgetAdaptor * adaptor, GladeEditorPageType type)
+get_sorted_properties (GladeWidgetAdaptor *adaptor, GladeEditorPageType type)
{
const GList *l, *properties;
GList *list = NULL;
@@ -497,8 +493,9 @@ get_sorted_properties (GladeWidgetAdaptor * adaptor, GladeEditorPageType type)
}
static GladeEditorProperty *
-append_item (GladeEditorTable * table,
- GladePropertyClass * klass, gboolean from_query_dialog)
+append_item (GladeEditorTable *table,
+ GladePropertyClass *klass,
+ gboolean from_query_dialog)
{
GladeEditorProperty *property;
GtkWidget *label;
@@ -527,8 +524,9 @@ append_item (GladeEditorTable * table,
}
static void
-append_items (GladeEditorTable * table,
- GladeWidgetAdaptor * adaptor, GladeEditorPageType type)
+append_items (GladeEditorTable *table,
+ GladeWidgetAdaptor *adaptor,
+ GladeEditorPageType type)
{
GladeEditorProperty *property;
GladePropertyClass *property_class;
@@ -548,7 +546,7 @@ append_items (GladeEditorTable * table,
}
static void
-append_name_field (GladeEditorTable * table)
+append_name_field (GladeEditorTable *table)
{
gchar *text = _("The object's unique identifier");
@@ -604,7 +602,7 @@ append_name_field (GladeEditorTable * table)
*
*/
GtkWidget *
-glade_editor_table_new (GladeWidgetAdaptor * adaptor, GladeEditorPageType type)
+glade_editor_table_new (GladeWidgetAdaptor *adaptor, GladeEditorPageType type)
{
GladeEditorTable *table;
diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c
index 1239fb5..b85e5c3 100644
--- a/gladeui/glade-editor.c
+++ b/gladeui/glade-editor.c
@@ -142,10 +142,10 @@ G_DEFINE_TYPE_WITH_PRIVATE (GladeEditor, glade_editor, GTK_TYPE_BOX);
static GParamSpec *properties[N_PROPERTIES];
static void
-glade_editor_set_property (GObject *object,
- guint prop_id,
+glade_editor_set_property (GObject *object,
+ guint prop_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
GladeEditor *editor = GLADE_EDITOR (object);
@@ -170,9 +170,9 @@ glade_editor_set_property (GObject *object,
}
static void
-glade_editor_get_property (GObject *object,
- guint prop_id,
- GValue *value,
+glade_editor_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
GParamSpec *pspec)
{
GladeEditor *editor = GLADE_EDITOR (object);
@@ -274,7 +274,7 @@ glade_editor_class_init (GladeEditorClass *klass)
static void
glade_editor_update_class_warning_cb (GladeWidget *widget,
- GParamSpec *pspec,
+ GParamSpec *pspec,
GladeEditor *editor)
{
GladeEditorPrivate *priv = GLADE_EDITOR_PRIVATE (editor);
@@ -325,7 +325,7 @@ glade_editor_update_class_field (GladeEditor *editor)
static void
glade_editor_update_widget_name_cb (GladeWidget *widget,
- GParamSpec *pspec,
+ GParamSpec *pspec,
GladeEditor *editor)
{
glade_editor_update_class_field (editor);
@@ -380,7 +380,7 @@ glade_editor_init (GladeEditor *editor)
}
static GtkWidget *
-glade_editor_get_editable_by_adaptor (GladeEditor *editor,
+glade_editor_get_editable_by_adaptor (GladeEditor *editor,
GladeWidgetAdaptor *adaptor,
GladeEditorPageType type)
{
@@ -442,7 +442,7 @@ hide_or_remove_visible_child (GtkContainer *container, gboolean remove)
}
static GtkWidget *
-glade_editor_load_editable_in_page (GladeEditor *editor,
+glade_editor_load_editable_in_page (GladeEditor *editor,
GladeWidgetAdaptor *adaptor,
GladeEditorPageType type)
{
@@ -515,7 +515,7 @@ glade_editor_load_widget_class (GladeEditor *editor,
}
static void
-glade_editor_close_cb (GladeProject * project, GladeEditor * editor)
+glade_editor_close_cb (GladeProject *project, GladeEditor *editor)
{
/* project we are viewing was closed,
* detatch from editor.
@@ -538,8 +538,8 @@ glade_editor_removed_cb (GladeProject *project,
static void
-glade_editor_load_editable (GladeEditor *editor,
- GladeWidget *widget,
+glade_editor_load_editable (GladeEditor *editor,
+ GladeWidget *widget,
GladeEditorPageType type)
{
GtkWidget *editable;
@@ -805,8 +805,8 @@ enum
static void
glade_editor_reset_toggled (GtkCellRendererToggle *cell,
- gchar *path_str,
- GtkTreeModel *model)
+ gchar *path_str,
+ GtkTreeModel *model)
{
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
GtkTreeIter iter;
@@ -956,7 +956,7 @@ glade_editor_populate_reset_view (GladeWidget *widget, GtkTreeView *tree_view)
static gboolean
glade_editor_reset_selection_changed_cb (GtkTreeSelection *selection,
- GtkTextView *desc_view)
+ GtkTextView *desc_view)
{
GtkTreeIter iter;
GladeProperty *property = NULL;
@@ -987,9 +987,9 @@ glade_editor_reset_selection_changed_cb (GtkTreeSelection *selection,
static gboolean
glade_editor_reset_foreach_selection (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gboolean select)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gboolean select)
{
gboolean def;
@@ -1003,7 +1003,7 @@ glade_editor_reset_foreach_selection (GtkTreeModel *model,
static void
-glade_editor_reset_select_all_clicked (GtkButton *button,
+glade_editor_reset_select_all_clicked (GtkButton *button,
GtkTreeView *tree_view)
{
GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
@@ -1013,7 +1013,7 @@ glade_editor_reset_select_all_clicked (GtkButton *button,
}
static void
-glade_editor_reset_unselect_all_clicked (GtkButton *button,
+glade_editor_reset_unselect_all_clicked (GtkButton *button,
GtkTreeView *tree_view)
{
GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
@@ -1024,9 +1024,9 @@ glade_editor_reset_unselect_all_clicked (GtkButton *button,
static gboolean
glade_editor_reset_accumulate_selected_props (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- GList **accum)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GList **accum)
{
GladeProperty *property;
gboolean enabled, def;
diff --git a/gladeui/glade-id-allocator.c b/gladeui/glade-id-allocator.c
index 884b22d..b2df4d9 100644
--- a/gladeui/glade-id-allocator.c
+++ b/gladeui/glade-id-allocator.c
@@ -61,7 +61,7 @@ glade_id_allocator_new (void)
* Frees @allocator and its associated memory
*/
void
-glade_id_allocator_destroy (GladeIDAllocator * allocator)
+glade_id_allocator_destroy (GladeIDAllocator *allocator)
{
g_return_if_fail (allocator != NULL);
@@ -110,7 +110,7 @@ first_set_bit (guint32 word)
* Returns:
*/
guint
-glade_id_allocator_allocate (GladeIDAllocator * allocator)
+glade_id_allocator_allocate (GladeIDAllocator *allocator)
{
guint i;
@@ -148,7 +148,7 @@ glade_id_allocator_allocate (GladeIDAllocator * allocator)
* TODO: write me
*/
void
-glade_id_allocator_release (GladeIDAllocator * allocator, guint id)
+glade_id_allocator_release (GladeIDAllocator *allocator, guint id)
{
guint word_idx;
diff --git a/gladeui/glade-inspector.c b/gladeui/glade-inspector.c
index 9475f7f..6e81335 100644
--- a/gladeui/glade-inspector.c
+++ b/gladeui/glade-inspector.c
@@ -58,14 +58,14 @@
GladeInspectorPrivate))
-static void search_entry_text_inserted_cb (GtkEntry *entry,
- const gchar *text,
- gint length,
- gint *position,
+static void search_entry_text_inserted_cb (GtkEntry *entry,
+ const gchar *text,
+ gint length,
+ gint *position,
GladeInspector *inspector);
-static void search_entry_text_deleted_cb (GtkEditable *editable,
- gint start_pos,
- gint end_pos,
+static void search_entry_text_deleted_cb (GtkEditable *editable,
+ gint start_pos,
+ gint end_pos,
GladeInspector *inspector);
enum
@@ -102,22 +102,23 @@ static guint glade_inspector_signals[LAST_SIGNAL] = { 0 };
static void glade_inspector_dispose (GObject *object);
static void glade_inspector_finalize (GObject *object);
static void add_columns (GtkTreeView *inspector);
-static void item_activated_cb (GtkTreeView *view,
- GtkTreePath *path,
+static void item_activated_cb (GtkTreeView *view,
+ GtkTreePath *path,
GtkTreeViewColumn *column,
- GladeInspector *inspector);
+ GladeInspector *inspector);
static void selection_changed_cb (GtkTreeSelection *selection,
- GladeInspector *inspector);
-static gint button_press_cb (GtkWidget *widget,
+ GladeInspector *inspector);
+static gint button_press_cb (GtkWidget *widget,
GdkEventButton *event,
GladeInspector *inspector);
-G_DEFINE_TYPE (GladeInspector, glade_inspector, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeInspector, glade_inspector, GTK_TYPE_BOX)
static void
-glade_inspector_set_property (GObject *object,
- guint property_id,
- const GValue *value, GParamSpec *pspec)
+glade_inspector_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeInspector *inspector = GLADE_INSPECTOR (object);
@@ -133,9 +134,9 @@ glade_inspector_set_property (GObject *object,
}
static void
-glade_inspector_get_property (GObject *object,
- guint property_id,
- GValue *value,
+glade_inspector_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
GParamSpec *pspec)
{
GladeInspector *inspector = GLADE_INSPECTOR (object);
@@ -198,8 +199,6 @@ glade_inspector_class_init (GladeInspectorClass *klass)
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (klass, sizeof (GladeInspectorPrivate));
}
static gboolean
@@ -219,8 +218,8 @@ find_in_string_insensitive (const gchar *_haystack, const gchar *_needle)
static gboolean
glade_inspector_visible_func (GtkTreeModel *model,
- GtkTreeIter *parent,
- gpointer data)
+ GtkTreeIter *parent,
+ gpointer data)
{
GladeInspector *inspector = data;
GladeInspectorPrivate *priv = inspector->priv;
@@ -302,10 +301,10 @@ reduce_string (gchar *str1,
}
static gboolean
-search_common_matches (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- CommonMatchData *data)
+search_common_matches (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ CommonMatchData *data)
{
gchar *row_text = NULL;
gboolean match;
@@ -400,10 +399,10 @@ search_complete_idle (GladeInspector *inspector)
}
static void
-search_entry_text_inserted_cb (GtkEntry *entry,
- const gchar *text,
- gint length,
- gint *position,
+search_entry_text_inserted_cb (GtkEntry *entry,
+ const gchar *text,
+ gint length,
+ gint *position,
GladeInspector *inspector)
{
GladeInspectorPrivate *priv = inspector->priv;
@@ -416,9 +415,9 @@ search_entry_text_inserted_cb (GtkEntry *entry,
}
static void
-search_entry_text_deleted_cb (GtkEditable *editable,
- gint start_pos,
- gint end_pos,
+search_entry_text_deleted_cb (GtkEditable *editable,
+ gint start_pos,
+ gint end_pos,
GladeInspector *inspector)
{
GladeInspectorPrivate *priv = inspector->priv;
@@ -437,8 +436,8 @@ search_entry_text_deleted_cb (GtkEditable *editable,
}
static gboolean
-search_entry_key_press_event_cb (GtkEntry *entry,
- GdkEventKey *event,
+search_entry_key_press_event_cb (GtkEntry *entry,
+ GdkEventKey *event,
GladeInspector *inspector)
{
GladeInspectorPrivate *priv = inspector->priv;
@@ -534,8 +533,8 @@ search_entry_key_press_event_cb (GtkEntry *entry,
}
static gboolean
-search_entry_focus_in_cb (GtkWidget *entry,
- GdkEventFocus *event,
+search_entry_focus_in_cb (GtkWidget *entry,
+ GdkEventFocus *event,
GladeInspector *inspector)
{
GladeInspectorPrivate *priv = inspector->priv;
@@ -547,8 +546,8 @@ search_entry_focus_in_cb (GtkWidget *entry,
}
static gboolean
-search_entry_focus_out_cb (GtkWidget *entry,
- GdkEventFocus *event,
+search_entry_focus_out_cb (GtkWidget *entry,
+ GdkEventFocus *event,
GladeInspector *inspector)
{
GladeInspectorPrivate *priv = inspector->priv;
@@ -572,7 +571,7 @@ glade_inspector_init (GladeInspector *inspector)
GtkWidget *sw;
GtkTreeSelection *selection;
- inspector->priv = priv = GLADE_INSPECTOR_GET_PRIVATE (inspector);
+ inspector->priv = priv = glade_inspector_get_instance_private (inspector);
gtk_orientable_set_orientation (GTK_ORIENTABLE (inspector),
GTK_ORIENTATION_VERTICAL);
@@ -665,7 +664,7 @@ glade_inspector_finalize (GObject *object)
}
static void
-project_selection_changed_cb (GladeProject *project,
+project_selection_changed_cb (GladeProject *project,
GladeInspector *inspector)
{
GladeWidget *widget;
@@ -732,9 +731,9 @@ project_selection_changed_cb (GladeProject *project,
static void
selection_foreach_func (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- GList **selection)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GList **selection)
{
GObject *object;
@@ -787,16 +786,16 @@ selection_changed_cb (GtkTreeSelection *selection, GladeInspector *inspector)
}
static void
-item_activated_cb (GtkTreeView *view,
- GtkTreePath *path,
+item_activated_cb (GtkTreeView *view,
+ GtkTreePath *path,
GtkTreeViewColumn *column,
- GladeInspector *inspector)
+ GladeInspector *inspector)
{
g_signal_emit (inspector, glade_inspector_signals[ITEM_ACTIVATED], 0);
}
static gint
-button_press_cb (GtkWidget *widget,
+button_press_cb (GtkWidget *widget,
GdkEventButton *event,
GladeInspector *inspector)
{
@@ -846,10 +845,10 @@ button_press_cb (GtkWidget *widget,
static void
glade_inspector_warning_cell_data_func (GtkTreeViewColumn *column,
- GtkCellRenderer *renderer,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data)
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
{
gchar *warning = NULL;
@@ -864,10 +863,10 @@ glade_inspector_warning_cell_data_func (GtkTreeViewColumn *column,
static void
glade_inspector_detail_cell_data_func (GtkTreeViewColumn *column,
- GtkCellRenderer *renderer,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data)
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
{
gchar *type_name = NULL, *detail = NULL;
diff --git a/gladeui/glade-name-context.c b/gladeui/glade-name-context.c
index bf0d930..5617d46 100644
--- a/gladeui/glade-name-context.c
+++ b/gladeui/glade-name-context.c
@@ -38,8 +38,6 @@ struct _GladeNameContext
GHashTable *names;
};
-
-
GladeNameContext *
glade_name_context_new (void)
{
@@ -58,7 +56,7 @@ glade_name_context_new (void)
}
void
-glade_name_context_destroy (GladeNameContext * context)
+glade_name_context_destroy (GladeNameContext *context)
{
g_return_if_fail (context != NULL);
@@ -68,8 +66,8 @@ glade_name_context_destroy (GladeNameContext * context)
}
gchar *
-glade_name_context_new_name (GladeNameContext * context,
- const gchar * base_name)
+glade_name_context_new_name (GladeNameContext *context,
+ const gchar *base_name)
{
GladeIDAllocator *id_allocator;
const gchar *number;
@@ -111,9 +109,9 @@ glade_name_context_new_name (GladeNameContext * context,
}
gchar *
-glade_name_context_dual_new_name (GladeNameContext * context,
- GladeNameContext * another_context,
- const gchar * base_name)
+glade_name_context_dual_new_name (GladeNameContext *context,
+ GladeNameContext *another_context,
+ const gchar *base_name)
{
GladeIDAllocator *id_allocator;
GList *free_ids = NULL, *l;
@@ -172,7 +170,7 @@ glade_name_context_dual_new_name (GladeNameContext * context,
}
guint
-glade_name_context_n_names (GladeNameContext * context)
+glade_name_context_n_names (GladeNameContext *context)
{
g_return_val_if_fail (context != NULL, FALSE);
@@ -180,7 +178,7 @@ glade_name_context_n_names (GladeNameContext * context)
}
gboolean
-glade_name_context_has_name (GladeNameContext * context, const gchar * name)
+glade_name_context_has_name (GladeNameContext *context, const gchar *name)
{
g_return_val_if_fail (context != NULL, FALSE);
g_return_val_if_fail (name && name[0], FALSE);
@@ -189,7 +187,7 @@ glade_name_context_has_name (GladeNameContext * context, const gchar * name)
}
gboolean
-glade_name_context_add_name (GladeNameContext * context, const gchar * name)
+glade_name_context_add_name (GladeNameContext *context, const gchar *name)
{
gboolean ret = FALSE;
@@ -207,7 +205,7 @@ glade_name_context_add_name (GladeNameContext * context, const gchar * name)
}
void
-glade_name_context_release_name (GladeNameContext * context, const gchar * name)
+glade_name_context_release_name (GladeNameContext *context, const gchar *name)
{
const gchar *first_number = name;
diff --git a/gladeui/glade-named-icon-chooser-dialog.c b/gladeui/glade-named-icon-chooser-dialog.c
index 2ef6fc5..abf723a 100644
--- a/gladeui/glade-named-icon-chooser-dialog.c
+++ b/gladeui/glade-named-icon-chooser-dialog.c
@@ -33,10 +33,6 @@
#define DEFAULT_SETTING_LIST_STANDARD_ONLY TRUE
-#define GLADE_NAMED_ICON_CHOOSER_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG, \
- GladeNamedIconChooserDialogPrivate))
-
enum
{
CONTEXTS_ID_COLUMN,
@@ -103,45 +99,46 @@ static GHashTable *standard_icon_quarks = NULL;
static guint dialog_signals[LAST_SIGNAL] = { 0, };
+gchar *
+glade_named_icon_chooser_dialog_get_icon_name (GladeNamedIconChooserDialog *dialog);
-gchar
- *glade_named_icon_chooser_dialog_get_icon_name (GladeNamedIconChooserDialog
- * dialog);
-
-void glade_named_icon_chooser_dialog_set_icon_name (GladeNamedIconChooserDialog
- * dialog,
- const gchar * icon_name);
+void
+glade_named_icon_chooser_dialog_set_icon_name (GladeNamedIconChooserDialog *dialog,
+ const gchar *icon_name);
gboolean
-glade_named_icon_chooser_dialog_set_context (GladeNamedIconChooserDialog *
- dialog, const gchar * context);
+glade_named_icon_chooser_dialog_set_context (GladeNamedIconChooserDialog *dialog,
+ const gchar *context);
-gchar *glade_named_icon_chooser_dialog_get_context (GladeNamedIconChooserDialog
- * dialog);
+gchar *
+glade_named_icon_chooser_dialog_get_context (GladeNamedIconChooserDialog *dialog);
-static gboolean should_respond (GladeNamedIconChooserDialog * dialog);
+static gboolean should_respond (GladeNamedIconChooserDialog *dialog);
-static void filter_icons_model (GladeNamedIconChooserDialog * dialog);
+static void filter_icons_model (GladeNamedIconChooserDialog *dialog);
-static gboolean scan_for_name_func (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, gpointer data);
+static gboolean scan_for_name_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data);
-static gboolean scan_for_context_func (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, gpointer data);
+static gboolean scan_for_context_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data);
-static void settings_load (GladeNamedIconChooserDialog * dialog);
+static void settings_load (GladeNamedIconChooserDialog *dialog);
-static void settings_save (GladeNamedIconChooserDialog * dialog);
+static void settings_save (GladeNamedIconChooserDialog *dialog);
-G_DEFINE_TYPE (GladeNamedIconChooserDialog, glade_named_icon_chooser_dialog,
- GTK_TYPE_DIALOG);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeNamedIconChooserDialog,
+ glade_named_icon_chooser_dialog,
+ GTK_TYPE_DIALOG);
static void
-entry_set_name (GladeNamedIconChooserDialog * dialog, const gchar * name)
+entry_set_name (GladeNamedIconChooserDialog *dialog, const gchar *name)
{
/* Must disable completion before setting text, in order to avoid
* spurious warnings (possible GTK+ bug).
@@ -155,7 +152,7 @@ entry_set_name (GladeNamedIconChooserDialog * dialog, const gchar * name)
}
static GtkIconTheme *
-get_icon_theme_for_widget (GtkWidget * widget)
+get_icon_theme_for_widget (GtkWidget *widget)
{
if (gtk_widget_has_screen (widget))
return gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
@@ -184,9 +181,10 @@ is_well_formed (const gchar * name)
}
static void
-check_entry_text (GladeNamedIconChooserDialog * dialog,
- gchar ** name_ret,
- gboolean * is_wellformed_ret, gboolean * is_empty_ret)
+check_entry_text (GladeNamedIconChooserDialog *dialog,
+ gchar **name_ret,
+ gboolean *is_wellformed_ret,
+ gboolean *is_empty_ret)
{
if (strlen (gtk_entry_get_text (GTK_ENTRY (dialog->priv->entry))) == 0)
{
@@ -209,18 +207,19 @@ check_entry_text (GladeNamedIconChooserDialog * dialog,
}
static void
-changed_text_handler (GtkEditable * editable,
- GladeNamedIconChooserDialog * dialog)
+changed_text_handler (GtkEditable *editable,
+ GladeNamedIconChooserDialog *dialog)
{
g_signal_emit_by_name (dialog, "selection-changed", NULL);
}
/* ensure that only valid text can be inserted into entry */
static void
-insert_text_handler (GtkEditable * editable,
- const gchar * text,
- gint length,
- gint * position, GladeNamedIconChooserDialog * dialog)
+insert_text_handler (GtkEditable *editable,
+ const gchar *text,
+ gint length,
+ gint *position,
+ GladeNamedIconChooserDialog *dialog)
{
if (is_well_formed (text))
{
@@ -256,8 +255,8 @@ typedef struct
} ForEachFuncData;
void
-glade_named_icon_chooser_dialog_set_icon_name (GladeNamedIconChooserDialog *
- dialog, const gchar * name)
+glade_named_icon_chooser_dialog_set_icon_name (GladeNamedIconChooserDialog *dialog,
+ const gchar *name)
{
ForEachFuncData *data;
gboolean located_in_theme;
@@ -322,8 +321,8 @@ glade_named_icon_chooser_dialog_set_icon_name (GladeNamedIconChooserDialog *
}
gboolean
-glade_named_icon_chooser_dialog_set_context (GladeNamedIconChooserDialog *
- dialog, const gchar * name)
+glade_named_icon_chooser_dialog_set_context (GladeNamedIconChooserDialog *dialog,
+ const gchar *name)
{
ForEachFuncData *data;
@@ -353,8 +352,7 @@ glade_named_icon_chooser_dialog_set_context (GladeNamedIconChooserDialog *
}
gchar *
-glade_named_icon_chooser_dialog_get_context (GladeNamedIconChooserDialog *
- dialog)
+glade_named_icon_chooser_dialog_get_context (GladeNamedIconChooserDialog *dialog)
{
GtkTreeSelection *sel;
GtkTreeIter iter;
@@ -382,7 +380,7 @@ glade_named_icon_chooser_dialog_get_context (GladeNamedIconChooserDialog *
}
static gchar *
-get_icon_name_from_selection (GladeNamedIconChooserDialog * dialog)
+get_icon_name_from_selection (GladeNamedIconChooserDialog *dialog)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -397,8 +395,7 @@ get_icon_name_from_selection (GladeNamedIconChooserDialog * dialog)
}
gchar *
-glade_named_icon_chooser_dialog_get_icon_name (GladeNamedIconChooserDialog *
- dialog)
+glade_named_icon_chooser_dialog_get_icon_name (GladeNamedIconChooserDialog *dialog)
{
GtkWidget *current_focus;
gchar *name;
@@ -444,7 +441,7 @@ glade_named_icon_chooser_dialog_get_icon_name (GladeNamedIconChooserDialog *
}
static void
-set_busy_cursor (GladeNamedIconChooserDialog * dialog, gboolean busy)
+set_busy_cursor (GladeNamedIconChooserDialog *dialog, gboolean busy)
{
GdkDisplay *display;
GdkCursor *cursor;
@@ -504,10 +501,10 @@ populate_icon_contexts_model (void)
}
static void
-icons_row_activated_cb (GtkTreeView * view,
- GtkTreePath * path,
- GtkTreeViewColumn * column,
- GladeNamedIconChooserDialog * dialog)
+icons_row_activated_cb (GtkTreeView *view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ GladeNamedIconChooserDialog *dialog)
{
g_signal_emit_by_name (dialog, "icon-activated", NULL);
}
@@ -538,10 +535,10 @@ icons_selection_changed_cb (GtkTreeSelection * selection,
}
static void
-contexts_row_activated_cb (GtkTreeView * view,
- GtkTreePath * cpath,
- GtkTreeViewColumn * column,
- GladeNamedIconChooserDialog * dialog)
+contexts_row_activated_cb (GtkTreeView *view,
+ GtkTreePath *cpath,
+ GtkTreeViewColumn *column,
+ GladeNamedIconChooserDialog *dialog)
{
GtkTreeIter iter;
GtkTreePath *path;
@@ -565,8 +562,8 @@ contexts_row_activated_cb (GtkTreeView * view,
}
static void
-contexts_selection_changed_cb (GtkTreeSelection * selection,
- GladeNamedIconChooserDialog * dialog)
+contexts_selection_changed_cb (GtkTreeSelection *selection,
+ GladeNamedIconChooserDialog *dialog)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -593,7 +590,7 @@ contexts_selection_changed_cb (GtkTreeSelection * selection,
}
static gboolean
-row_separator_func (GtkTreeModel * model, GtkTreeIter * iter, gpointer unused)
+row_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer unused)
{
gboolean retval;
gchar *name, *title;
@@ -611,7 +608,7 @@ row_separator_func (GtkTreeModel * model, GtkTreeIter * iter, gpointer unused)
}
static GtkWidget *
-create_contexts_view (GladeNamedIconChooserDialog * dialog)
+create_contexts_view (GladeNamedIconChooserDialog *dialog)
{
GtkTreeView *view;
GtkTreeViewColumn *column;
@@ -656,7 +653,7 @@ create_contexts_view (GladeNamedIconChooserDialog * dialog)
/* filters the icons model based on the current state */
static void
-filter_icons_model (GladeNamedIconChooserDialog * dialog)
+filter_icons_model (GladeNamedIconChooserDialog *dialog)
{
set_busy_cursor (dialog, TRUE);
@@ -680,8 +677,9 @@ filter_icons_model (GladeNamedIconChooserDialog * dialog)
}
static gboolean
-filter_visible_func (GtkTreeModel * model,
- GtkTreeIter * iter, GladeNamedIconChooserDialog * dialog)
+filter_visible_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GladeNamedIconChooserDialog *dialog)
{
gboolean standard;
gint context_id;
@@ -701,10 +699,11 @@ filter_visible_func (GtkTreeModel * model,
static gboolean
-search_equal_func (GtkTreeModel * model,
- gint column,
- const gchar * key,
- GtkTreeIter * iter, GladeNamedIconChooserDialog * dialog)
+search_equal_func (GtkTreeModel *model,
+ gint column,
+ const gchar *key,
+ GtkTreeIter *iter,
+ GladeNamedIconChooserDialog *dialog)
{
gchar *name;
gboolean retval;
@@ -720,9 +719,10 @@ search_equal_func (GtkTreeModel * model,
}
static gboolean
-scan_for_context_func (GtkTreeModel * model,
- GtkTreePath * path,
- GtkTreeIter * iter, gpointer user_data)
+scan_for_context_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
ForEachFuncData *data = (ForEachFuncData *) user_data;
GtkTreeSelection *selection =
@@ -769,8 +769,10 @@ scan_for_context_func (GtkTreeModel * model,
}
gboolean
-scan_for_name_func (GtkTreeModel * model,
- GtkTreePath * path, GtkTreeIter * iter, gpointer user_data)
+scan_for_name_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
ForEachFuncData *data = (ForEachFuncData *) user_data;
gchar *name = NULL;
@@ -814,7 +816,7 @@ scan_for_name_func (GtkTreeModel * model,
}
static void
-centre_selected_row (GladeNamedIconChooserDialog * dialog)
+centre_selected_row (GladeNamedIconChooserDialog *dialog)
{
GList *l;
@@ -845,7 +847,7 @@ centre_selected_row (GladeNamedIconChooserDialog * dialog)
}
static void
-select_first_row (GladeNamedIconChooserDialog * dialog)
+select_first_row (GladeNamedIconChooserDialog *dialog)
{
GtkTreePath *path;
@@ -859,7 +861,7 @@ select_first_row (GladeNamedIconChooserDialog * dialog)
}
static void
-pending_select_name_process (GladeNamedIconChooserDialog * dialog)
+pending_select_name_process (GladeNamedIconChooserDialog *dialog)
{
ForEachFuncData *data;
@@ -897,7 +899,7 @@ pending_select_name_process (GladeNamedIconChooserDialog * dialog)
}
static gboolean
-is_standard_icon_name (const gchar * icon_name)
+is_standard_icon_name (const gchar *icon_name)
{
GQuark quark;
@@ -912,7 +914,7 @@ is_standard_icon_name (const gchar * icon_name)
}
static void
-cleanup_after_load (GladeNamedIconChooserDialog * dialog)
+cleanup_after_load (GladeNamedIconChooserDialog *dialog)
{
dialog->priv->load_id = 0;
@@ -922,7 +924,7 @@ cleanup_after_load (GladeNamedIconChooserDialog * dialog)
}
static void
-chooser_set_model (GladeNamedIconChooserDialog * dialog)
+chooser_set_model (GladeNamedIconChooserDialog *dialog)
{
/* filter model */
@@ -957,13 +959,13 @@ typedef struct
} IconData;
static gint
-icon_data_compare (IconData * a, IconData * b)
+icon_data_compare (IconData *a, IconData *b)
{
return g_ascii_strcasecmp (a->name, b->name);
}
static gboolean
-reload_icons (GladeNamedIconChooserDialog * dialog)
+reload_icons (GladeNamedIconChooserDialog *dialog)
{
GtkListStore *store = dialog->priv->icons_store;
GtkTreeIter iter;
@@ -1020,7 +1022,7 @@ reload_icons (GladeNamedIconChooserDialog * dialog)
}
static void
-change_icon_theme (GladeNamedIconChooserDialog * dialog)
+change_icon_theme (GladeNamedIconChooserDialog *dialog)
{
if (dialog->priv->icon_theme == NULL)
dialog->priv->icon_theme = get_icon_theme_for_widget (GTK_WIDGET (dialog));
@@ -1038,8 +1040,8 @@ change_icon_theme (GladeNamedIconChooserDialog * dialog)
}
static void
-glade_named_icon_chooser_dialog_screen_changed (GtkWidget * widget,
- GdkScreen * previous_screen)
+glade_named_icon_chooser_dialog_screen_changed (GtkWidget *widget,
+ GdkScreen *previous_screen)
{
GladeNamedIconChooserDialog *dialog;
@@ -1056,7 +1058,7 @@ glade_named_icon_chooser_dialog_screen_changed (GtkWidget * widget,
}
static GtkWidget *
-create_icons_view (GladeNamedIconChooserDialog * dialog)
+create_icons_view (GladeNamedIconChooserDialog *dialog)
{
GtkTreeView *view;
GtkTreeViewColumn *column;
@@ -1124,7 +1126,7 @@ create_icons_view (GladeNamedIconChooserDialog * dialog)
/* sets the 'list-standard' state and refilters the icons model */
static void
-button_toggled (GtkToggleButton * button, GladeNamedIconChooserDialog * dialog)
+button_toggled (GtkToggleButton *button, GladeNamedIconChooserDialog *dialog)
{
dialog->priv->settings_list_standard = gtk_toggle_button_get_active (button);
@@ -1154,8 +1156,8 @@ create_standard_icon_quarks (void)
}
static void
-glade_named_icon_chooser_dialog_style_set (GtkWidget * widget,
- GtkStyle * previous_style)
+glade_named_icon_chooser_dialog_style_set (GtkWidget *widget,
+ GtkStyle *previous_style)
{
if (gtk_widget_has_screen (widget) && gtk_widget_get_mapped (widget))
change_icon_theme (GLADE_NAMED_ICON_CHOOSER_DIALOG (widget));
@@ -1165,7 +1167,7 @@ glade_named_icon_chooser_dialog_style_set (GtkWidget * widget,
* hidden unless we decide otherwise, like the list-standard-icons-only checkbox.
*/
static void
-glade_named_icon_chooser_dialog_show_all (GtkWidget * widget)
+glade_named_icon_chooser_dialog_show_all (GtkWidget *widget)
{
gtk_widget_show (widget);
}
@@ -1174,8 +1176,7 @@ glade_named_icon_chooser_dialog_show_all (GtkWidget * widget)
* widget on our toplevel. See glade_named_icon_chooser_dialog_hierarchy_changed()
*/
static void
-glade_named_icon_chooser_dialog_set_focus (GtkWindow * window,
- GtkWidget * focus)
+glade_named_icon_chooser_dialog_set_focus (GtkWindow *window, GtkWidget *focus)
{
GTK_WINDOW_CLASS (glade_named_icon_chooser_dialog_parent_class)->
@@ -1186,7 +1187,7 @@ glade_named_icon_chooser_dialog_set_focus (GtkWindow * window,
}
static void
-glade_named_icon_chooser_dialog_finalize (GObject * object)
+glade_named_icon_chooser_dialog_finalize (GObject *object)
{
GladeNamedIconChooserDialog *dialog =
GLADE_NAMED_ICON_CHOOSER_DIALOG (object);
@@ -1198,11 +1199,11 @@ glade_named_icon_chooser_dialog_finalize (GObject * object)
}
G_OBJECT_CLASS (glade_named_icon_chooser_dialog_parent_class)->
- finalize (object);
+ finalize (object);
}
static void
-glade_named_icon_chooser_dialog_map (GtkWidget * widget)
+glade_named_icon_chooser_dialog_map (GtkWidget *widget)
{
GladeNamedIconChooserDialog *dialog =
GLADE_NAMED_ICON_CHOOSER_DIALOG (widget);
@@ -1218,7 +1219,7 @@ glade_named_icon_chooser_dialog_map (GtkWidget * widget)
}
static void
-glade_named_icon_chooser_dialog_unmap (GtkWidget * widget)
+glade_named_icon_chooser_dialog_unmap (GtkWidget *widget)
{
GladeNamedIconChooserDialog *dialog =
GLADE_NAMED_ICON_CHOOSER_DIALOG (widget);
@@ -1233,7 +1234,7 @@ glade_named_icon_chooser_dialog_unmap (GtkWidget * widget)
* to be fully painted before loading begins
*/
static gboolean
-glade_named_icon_chooser_dialog_draw (GtkWidget * widget, cairo_t * cr)
+glade_named_icon_chooser_dialog_draw (GtkWidget *widget, cairo_t *cr)
{
GladeNamedIconChooserDialog *dialog =
GLADE_NAMED_ICON_CHOOSER_DIALOG (widget);
@@ -1252,7 +1253,7 @@ glade_named_icon_chooser_dialog_draw (GtkWidget * widget, cairo_t * cr)
}
static void
-response_cb (GtkDialog * dialog, gint response_id)
+response_cb (GtkDialog *dialog, gint response_id)
{
/* Act only on response IDs we recognize */
if (!(response_id == GTK_RESPONSE_ACCEPT
@@ -1271,7 +1272,7 @@ response_cb (GtkDialog * dialog, gint response_id)
* make the dialog emit a valid response signal
*/
static void
-icon_activated_cb (GladeNamedIconChooserDialog * dialog)
+icon_activated_cb (GladeNamedIconChooserDialog *dialog)
{
GList *children, *l;
@@ -1307,7 +1308,7 @@ icon_activated_cb (GladeNamedIconChooserDialog * dialog)
* make the affirmative response button insensitive when the selection is empty
*/
static void
-selection_changed_cb (GladeNamedIconChooserDialog * dialog)
+selection_changed_cb (GladeNamedIconChooserDialog *dialog)
{
GList *children, *l;
gchar *icon_name;
@@ -1343,7 +1344,7 @@ selection_changed_cb (GladeNamedIconChooserDialog * dialog)
}
static void
-glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog * dialog)
+glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog *dialog)
{
GtkWidget *contents;
GtkWidget *hbox;
@@ -1355,7 +1356,7 @@ glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog * dialog)
GtkWidget *action_area;
GtkSizeGroup *group;
- dialog->priv = GLADE_NAMED_ICON_CHOOSER_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = glade_named_icon_chooser_dialog_get_instance_private (dialog);
dialog->priv->filter_model = NULL;
dialog->priv->icons_store = NULL;
@@ -1505,13 +1506,10 @@ glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog * dialog)
G_TYPE_UINT,
G_TYPE_BOOLEAN,
G_TYPE_STRING);
-
-
}
static void
-glade_named_icon_chooser_dialog_class_init (GladeNamedIconChooserDialogClass *
- klass)
+glade_named_icon_chooser_dialog_class_init (GladeNamedIconChooserDialogClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -1565,13 +1563,10 @@ glade_named_icon_chooser_dialog_class_init (GladeNamedIconChooserDialogClass *
G_STRUCT_OFFSET (GladeNamedIconChooserDialogClass,
selection_changed), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
-
- g_type_class_add_private (klass, sizeof (GladeNamedIconChooserDialogPrivate));
}
static gboolean
-should_respond (GladeNamedIconChooserDialog * dialog)
+should_respond (GladeNamedIconChooserDialog *dialog)
{
gchar *icon_name;
@@ -1600,7 +1595,7 @@ get_config_dirname (void)
/* loads the configuration settings */
static void
-settings_load (GladeNamedIconChooserDialog * dialog)
+settings_load (GladeNamedIconChooserDialog *dialog)
{
GKeyFile *keyfile;
gboolean success, boolean_value;
@@ -1643,7 +1638,7 @@ settings_load (GladeNamedIconChooserDialog * dialog)
/* creates a GKeyFile based on the current settings */
static GKeyFile *
-settings_to_keyfile (GladeNamedIconChooserDialog * dialog)
+settings_to_keyfile (GladeNamedIconChooserDialog *dialog)
{
GKeyFile *keyfile;
gchar *filename;
@@ -1666,7 +1661,7 @@ settings_to_keyfile (GladeNamedIconChooserDialog * dialog)
/* serializes the the current configuration to the config file */
static void
-settings_save (GladeNamedIconChooserDialog * dialog)
+settings_save (GladeNamedIconChooserDialog *dialog)
{
GKeyFile *keyfile;
gchar *contents;
@@ -1716,10 +1711,10 @@ out:
}
static GtkWidget *
-glade_named_icon_chooser_dialog_new_valist (const gchar * title,
- GtkWindow * parent,
- const gchar * first_button_text,
- va_list varargs)
+glade_named_icon_chooser_dialog_new_valist (const gchar *title,
+ GtkWindow *parent,
+ const gchar *first_button_text,
+ va_list varargs)
{
GtkWidget *result;
const char *button_text = first_button_text;
@@ -1752,9 +1747,10 @@ glade_named_icon_chooser_dialog_new_valist (const gchar * title,
* Return value: a new #GladeNamedIconChooserDialog
*/
GtkWidget *
-glade_named_icon_chooser_dialog_new (const gchar * title,
- GtkWindow * parent,
- const gchar * first_button_text, ...)
+glade_named_icon_chooser_dialog_new (const gchar *title,
+ GtkWindow *parent,
+ const gchar *first_button_text,
+ ...)
{
GtkWidget *result;
va_list varargs;
diff --git a/gladeui/glade-object-stub.c b/gladeui/glade-object-stub.c
index 03365b9..c17177c 100644
--- a/gladeui/glade-object-stub.c
+++ b/gladeui/glade-object-stub.c
@@ -35,8 +35,6 @@ struct _GladeObjectStubPrivate
GladeXmlNode *node;
};
-#define GLADE_OBJECT_STUB_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GLADE_TYPE_OBJECT_STUB,
GladeObjectStubPrivate))
-
enum
{
PROP_0,
@@ -46,7 +44,7 @@ enum
};
-G_DEFINE_TYPE (GladeObjectStub, glade_object_stub, GTK_TYPE_INFO_BAR);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeObjectStub, glade_object_stub, GTK_TYPE_INFO_BAR);
#define RESPONSE_DELETE 1
#define RESPONSE_DELETE_ALL 2
@@ -85,7 +83,7 @@ on_infobar_response (GladeObjectStub *stub, gint response_id)
static void
glade_object_stub_init (GladeObjectStub *object)
{
- GladeObjectStubPrivate *priv = GLADE_OBJECT_STUB_PRIVATE (object);
+ GladeObjectStubPrivate *priv = glade_object_stub_get_instance_private (object);
GtkWidget *label = gtk_label_new (NULL);
object->priv = priv;
@@ -139,7 +137,10 @@ glade_object_stub_refresh_text (GladeObjectStub *stub)
}
static void
-glade_object_stub_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+glade_object_stub_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeObjectStubPrivate *priv;
GladeObjectStub *stub;
@@ -167,7 +168,10 @@ glade_object_stub_set_property (GObject *object, guint prop_id, const GValue *va
}
static void
-glade_object_stub_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+glade_object_stub_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeObjectStubPrivate *priv;
@@ -207,8 +211,6 @@ glade_object_stub_class_init (GladeObjectStubClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GladeObjectStubPrivate));
-
object_class->finalize = glade_object_stub_finalize;
object_class->set_property = glade_object_stub_set_property;
object_class->get_property = glade_object_stub_get_property;
diff --git a/gladeui/glade-palette.c b/gladeui/glade-palette.c
index cb3263f..1dab038 100644
--- a/gladeui/glade-palette.c
+++ b/gladeui/glade-palette.c
@@ -52,10 +52,6 @@
#include <glib/gi18n-lib.h>
#include <gdk/gdk.h>
-#define GLADE_PALETTE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),\
- GLADE_TYPE_PALETTE, \
- GladePalettePrivate))
-
struct _GladePalettePrivate
{
const GList *catalogs; /* List of widget catalogs */
@@ -100,7 +96,7 @@ static void glade_palette_update_appearance (GladePalette *palette);
static void palette_item_toggled_cb (GtkToggleToolButton *button,
GladePalette *palette);
-G_DEFINE_TYPE (GladePalette, glade_palette, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE (GladePalette, glade_palette, GTK_TYPE_BOX)
/*******************************************************
@@ -146,7 +142,7 @@ palette_item_refresh_cb (GladePalette *palette,
}
static void
-glade_palette_refresh (GladePalette * palette)
+glade_palette_refresh (GladePalette *palette)
{
g_return_if_fail (GLADE_IS_PALETTE (palette));
@@ -313,7 +309,7 @@ palette_item_button_press_cb (GtkWidget *button,
* Building Widgets/Populating catalog *
*******************************************************/
static GtkWidget *
-glade_palette_new_item (GladePalette * palette, GladeWidgetAdaptor * adaptor)
+glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor)
{
GtkWidget *item, *button, *label, *box;
@@ -362,7 +358,7 @@ glade_palette_new_item (GladePalette * palette, GladeWidgetAdaptor * adaptor)
}
static GtkWidget *
-glade_palette_new_item_group (GladePalette * palette, GladeWidgetGroup * group)
+glade_palette_new_item_group (GladePalette *palette, GladeWidgetGroup *group)
{
GtkWidget *item_group, *item, *label;
GList *l;
@@ -404,8 +400,7 @@ glade_palette_new_item_group (GladePalette * palette, GladeWidgetGroup * group)
}
static void
-glade_palette_append_item_group (GladePalette * palette,
- GladeWidgetGroup * group)
+glade_palette_append_item_group (GladePalette *palette, GladeWidgetGroup *group)
{
GladePalettePrivate *priv = palette->priv;
GtkWidget *item_group;
@@ -415,7 +410,7 @@ glade_palette_append_item_group (GladePalette * palette,
}
static void
-glade_palette_populate (GladePalette * palette)
+glade_palette_populate (GladePalette *palette)
{
GList *l;
@@ -436,7 +431,7 @@ glade_palette_populate (GladePalette * palette)
}
static GtkWidget *
-glade_palette_create_selector_button (GladePalette * palette)
+glade_palette_create_selector_button (GladePalette *palette)
{
GtkWidget *selector;
GtkWidget *image;
@@ -471,15 +466,16 @@ glade_palette_create_selector_button (GladePalette * palette)
* hidden unless we decide otherwise, like the hidden selector button.
*/
static void
-glade_palette_show_all (GtkWidget * widget)
+glade_palette_show_all (GtkWidget *widget)
{
gtk_widget_show (widget);
}
static void
-glade_palette_set_property (GObject * object,
- guint prop_id,
- const GValue * value, GParamSpec * pspec)
+glade_palette_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladePalette *palette = GLADE_PALETTE (object);
@@ -506,8 +502,10 @@ glade_palette_set_property (GObject * object,
}
static void
-glade_palette_get_property (GObject * object,
- guint prop_id, GValue * value, GParamSpec * pspec)
+glade_palette_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladePalette *palette = GLADE_PALETTE (object);
GladePalettePrivate *priv = palette->priv;
@@ -534,7 +532,7 @@ glade_palette_get_property (GObject * object,
}
static void
-glade_palette_dispose (GObject * object)
+glade_palette_dispose (GObject *object)
{
GladePalettePrivate *priv;
@@ -548,7 +546,7 @@ glade_palette_dispose (GObject * object)
}
static void
-glade_palette_finalize (GObject * object)
+glade_palette_finalize (GObject *object)
{
GladePalettePrivate *priv;
@@ -560,7 +558,7 @@ glade_palette_finalize (GObject * object)
}
static void
-glade_palette_update_appearance (GladePalette * palette)
+glade_palette_update_appearance (GladePalette *palette)
{
GladePalettePrivate *priv;
GtkToolbarStyle style;
@@ -591,7 +589,7 @@ glade_palette_update_appearance (GladePalette * palette)
}
static void
-glade_palette_class_init (GladePaletteClass * klass)
+glade_palette_class_init (GladePaletteClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -644,12 +642,10 @@ glade_palette_class_init (GladePaletteClass * klass)
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (object_class, sizeof (GladePalettePrivate));
}
static void
-glade_palette_init (GladePalette * palette)
+glade_palette_init (GladePalette *palette)
{
GladePalettePrivate *priv;
GtkWidget *sw;
@@ -657,7 +653,7 @@ glade_palette_init (GladePalette * palette)
gtk_orientable_set_orientation (GTK_ORIENTABLE (palette),
GTK_ORIENTATION_VERTICAL);
- priv = palette->priv = GLADE_PALETTE_GET_PRIVATE (palette);
+ priv = palette->priv = glade_palette_get_instance_private (palette);
priv->button_table = g_hash_table_new (g_str_hash, g_str_equal);
@@ -732,8 +728,7 @@ glade_palette_get_project (GladePalette *palette)
}
void
-glade_palette_set_project (GladePalette *palette,
- GladeProject *project)
+glade_palette_set_project (GladePalette *palette, GladeProject *project)
{
g_return_if_fail (GLADE_IS_PALETTE (palette));
@@ -783,7 +778,7 @@ glade_palette_set_project (GladePalette *palette,
* Sets the appearance of the palette items.
*/
void
-glade_palette_set_item_appearance (GladePalette * palette,
+glade_palette_set_item_appearance (GladePalette *palette,
GladeItemAppearance item_appearance)
{
GladePalettePrivate *priv;
@@ -810,8 +805,8 @@ glade_palette_set_item_appearance (GladePalette * palette,
* Sets whether to use small item icons.
*/
void
-glade_palette_set_use_small_item_icons (GladePalette * palette,
- gboolean use_small_item_icons)
+glade_palette_set_use_small_item_icons (GladePalette *palette,
+ gboolean use_small_item_icons)
{
GladePalettePrivate *priv;
g_return_if_fail (GLADE_IS_PALETTE (palette));
@@ -837,8 +832,8 @@ glade_palette_set_use_small_item_icons (GladePalette * palette,
* Sets whether to show the internal widget selector button
*/
void
-glade_palette_set_show_selector_button (GladePalette * palette,
- gboolean show_selector_button)
+glade_palette_set_show_selector_button (GladePalette *palette,
+ gboolean show_selector_button)
{
GladePalettePrivate *priv;
g_return_if_fail (GLADE_IS_PALETTE (palette));
@@ -864,7 +859,7 @@ glade_palette_set_show_selector_button (GladePalette * palette,
* Returns: The appearance of the palette items
*/
GladeItemAppearance
-glade_palette_get_item_appearance (GladePalette * palette)
+glade_palette_get_item_appearance (GladePalette *palette)
{;
g_return_val_if_fail (GLADE_IS_PALETTE (palette), GLADE_ITEM_ICON_ONLY);
@@ -878,7 +873,7 @@ glade_palette_get_item_appearance (GladePalette * palette)
* Returns: Whether small item icons are used
*/
gboolean
-glade_palette_get_use_small_item_icons (GladePalette * palette)
+glade_palette_get_use_small_item_icons (GladePalette *palette)
{
g_return_val_if_fail (GLADE_IS_PALETTE (palette), FALSE);
@@ -892,7 +887,7 @@ glade_palette_get_use_small_item_icons (GladePalette * palette)
* Returns: Whether the selector button is visible
*/
gboolean
-glade_palette_get_show_selector_button (GladePalette * palette)
+glade_palette_get_show_selector_button (GladePalette *palette)
{
g_return_val_if_fail (GLADE_IS_PALETTE (palette), FALSE);
diff --git a/gladeui/glade-placeholder.c b/gladeui/glade-placeholder.c
index 1b6dc82..6db4f1a 100644
--- a/gladeui/glade-placeholder.c
+++ b/gladeui/glade-placeholder.c
@@ -73,22 +73,20 @@ enum
PROP_VSCROLL_POLICY
};
-#define GLADE_PLACEHOLDER_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- GLADE_TYPE_PLACEHOLDER, \
- GladePlaceholderPrivate))
#define GLADE_PLACEHOLDER_PRIVATE(object) (((GladePlaceholder*)object)->priv)
static void glade_placeholder_drag_init (_GladeDragInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GladePlaceholder, glade_placeholder, GTK_TYPE_WIDGET,
+ G_ADD_PRIVATE (GladePlaceholder)
G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_DRAG,
glade_placeholder_drag_init))
static void
-glade_placeholder_notify_parent (GObject *gobject,
+glade_placeholder_notify_parent (GObject *gobject,
GParamSpec *arg1,
- gpointer user_data)
+ gpointer user_data)
{
GladePlaceholder *placeholder = GLADE_PLACEHOLDER (gobject);
GladeWidgetAdaptor *parent_adaptor = NULL;
@@ -113,7 +111,7 @@ glade_placeholder_notify_parent (GObject *gobject,
static void
glade_placeholder_init (GladePlaceholder *placeholder)
{
- placeholder->priv = GLADE_PLACEHOLDER_GET_PRIVATE (placeholder);
+ placeholder->priv = glade_placeholder_get_instance_private (placeholder);
placeholder->priv->packing_actions = NULL;
@@ -151,10 +149,10 @@ glade_placeholder_finalize (GObject *object)
}
static void
-glade_placeholder_set_property (GObject *object,
- guint prop_id,
+glade_placeholder_set_property (GObject *object,
+ guint prop_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
switch (prop_id)
@@ -171,9 +169,9 @@ glade_placeholder_set_property (GObject *object,
}
static void
-glade_placeholder_get_property (GObject *object,
- guint prop_id,
- GValue *value,
+glade_placeholder_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
@@ -565,8 +563,6 @@ glade_placeholder_class_init (GladePlaceholderClass *klass)
cairo_pattern_set_extend (placeholder_pattern, CAIRO_EXTEND_REPEAT);
}
g_free (path);
-
- g_type_class_add_private (klass, sizeof (GladePlaceholderPrivate));
}
/**
diff --git a/gladeui/glade-popup.c b/gladeui/glade-popup.c
index ff178c6..2fcf6b7 100644
--- a/gladeui/glade-popup.c
+++ b/gladeui/glade-popup.c
@@ -147,7 +147,7 @@ glade_popup_delete_cb (GtkMenuItem *item, GladeWidget *widget)
PLACEHOLDER POPUP
*******************************************************/
static void
-glade_popup_placeholder_paste_cb (GtkMenuItem *item,
+glade_popup_placeholder_paste_cb (GtkMenuItem *item,
GladePlaceholder *placeholder)
{
GladeProject *project;
@@ -163,13 +163,13 @@ glade_popup_placeholder_paste_cb (GtkMenuItem *item,
POPUP BUILDING
*******************************************************/
static GtkWidget *
-glade_popup_append_item (GtkWidget *popup_menu,
+glade_popup_append_item (GtkWidget *popup_menu,
const gchar *stock_id,
const gchar *label,
- GtkWidget *image,
- gboolean sensitive,
- gpointer callback,
- gpointer data)
+ GtkWidget *image,
+ gboolean sensitive,
+ gpointer callback,
+ gpointer data)
{
GtkWidget *menu_item;
@@ -244,11 +244,11 @@ glade_popup_menuitem_ph_packing_activated (GtkMenuItem *item,
}
static gint
-glade_popup_action_populate_menu_real (GtkWidget *menu,
+glade_popup_action_populate_menu_real (GtkWidget *menu,
GladeWidget *gwidget,
- GList *actions,
- GCallback callback,
- gpointer data)
+ GList *actions,
+ GCallback callback,
+ gpointer data)
{
GtkWidget *item;
GList *list;
@@ -309,10 +309,10 @@ glade_popup_action_populate_menu_real (GtkWidget *menu,
* Returns the number of action appended to the menu.
*/
gint
-glade_popup_action_populate_menu (GtkWidget *menu,
- GladeWidget *widget,
+glade_popup_action_populate_menu (GtkWidget *menu,
+ GladeWidget *widget,
GladeWidgetAction *action,
- gboolean packing)
+ gboolean packing)
{
gint n;
@@ -483,9 +483,9 @@ glade_popup_create_menu (GladeWidget *widget,
}
void
-glade_popup_widget_pop (GladeWidget *widget,
+glade_popup_widget_pop (GladeWidget *widget,
GdkEventButton *event,
- gboolean packing)
+ gboolean packing)
{
GtkWidget *popup_menu;
gint button;
@@ -511,7 +511,7 @@ glade_popup_widget_pop (GladeWidget *widget,
void
glade_popup_placeholder_pop (GladePlaceholder *placeholder,
- GdkEventButton *event)
+ GdkEventButton *event)
{
GladeWidget *widget;
GtkWidget *popup_menu;
diff --git a/gladeui/glade-preview-window.c b/gladeui/glade-preview-window.c
index c2fe719..4d85297 100644
--- a/gladeui/glade-preview-window.c
+++ b/gladeui/glade-preview-window.c
@@ -41,14 +41,12 @@ struct _GladePreviewWindowPrivate
gchar *extension;
};
-#define GLADE_PREVIEW_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GLADE_TYPE_PREVIEW_WINDOW,
GladePreviewWindowPrivate))
-
-G_DEFINE_TYPE (GladePreviewWindow, glade_preview_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE_WITH_PRIVATE (GladePreviewWindow, glade_preview_window, GTK_TYPE_WINDOW);
static void
glade_preview_window_init (GladePreviewWindow *window)
{
- GladePreviewWindowPrivate *priv = GLADE_PREVIEW_WINDOW_GET_PRIVATE (window);
+ GladePreviewWindowPrivate *priv = glade_preview_window_get_instance_private (window);
GtkWidget *content_area;
window->priv = priv;
@@ -78,7 +76,7 @@ glade_preview_window_init (GladePreviewWindow *window)
static void
glade_preview_window_finalize (GObject *object)
{
- GladePreviewWindowPrivate *priv = GLADE_PREVIEW_WINDOW_GET_PRIVATE (object);
+ GladePreviewWindowPrivate *priv = GLADE_PREVIEW_WINDOW (object)->priv;
g_free (priv->css_file);
g_clear_object (&priv->css_provider);
@@ -157,8 +155,6 @@ glade_preview_window_class_init (GladePreviewWindowClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GladePreviewWindowPrivate));
-
object_class->finalize = glade_preview_window_finalize;
widget_class->realize = glade_preview_window_realize;
diff --git a/gladeui/glade-preview.c b/gladeui/glade-preview.c
index 1340737..cbac6ec 100644
--- a/gladeui/glade-preview.c
+++ b/gladeui/glade-preview.c
@@ -62,9 +62,7 @@ struct _GladePreviewPrivate
GPid pid; /* Pid of the corresponding glade-previewer process */
};
-G_DEFINE_TYPE (GladePreview, glade_preview, G_TYPE_OBJECT);
-
-#define GLADE_PREVIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GLADE_TYPE_PREVIEW,
GladePreviewPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (GladePreview, glade_preview, G_TYPE_OBJECT);
enum
{
@@ -162,8 +160,6 @@ glade_preview_class_init (GladePreviewClass *klass)
G_SIGNAL_RUN_FIRST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
- g_type_class_add_private (klass, sizeof (GladePreviewPrivate));
}
static void
@@ -171,7 +167,7 @@ glade_preview_init (GladePreview *self)
{
GladePreviewPrivate *priv;
- self->priv = priv = GLADE_PREVIEW_GET_PRIVATE (self);
+ self->priv = priv = glade_preview_get_instance_private (self);
priv->channel = NULL;
}
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index 2286308..eecdb86 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -214,6 +214,7 @@ static GladeIDAllocator *unsaved_number_allocator = NULL;
((GladeProject*)(project))->priv->stamp == (iter)->stamp)
G_DEFINE_TYPE_WITH_CODE (GladeProject, glade_project, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GladeProject)
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
glade_project_model_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE,
@@ -363,9 +364,9 @@ glade_project_finalize (GObject *object)
}
static void
-glade_project_get_property (GObject *object,
- guint prop_id,
- GValue *value,
+glade_project_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
GParamSpec *pspec)
{
GladeProject *project = GLADE_PROJECT (object);
@@ -412,10 +413,10 @@ glade_project_get_property (GObject *object,
}
static void
-glade_project_set_property (GObject *object,
- guint prop_id,
+glade_project_set_property (GObject *object,
+ guint prop_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
switch (prop_id)
{
@@ -646,7 +647,8 @@ glade_project_destroy_preview (gpointer data)
static void
glade_project_changed_impl (GladeProject *project,
- GladeCommand *command, gboolean forward)
+ GladeCommand *command,
+ gboolean forward)
{
if (!project->priv->loading)
{
@@ -696,9 +698,7 @@ glade_project_init (GladeProject *project)
GladeProjectPrivate *priv;
GList *list;
- project->priv = priv =
- G_TYPE_INSTANCE_GET_PRIVATE ((project), GLADE_TYPE_PROJECT,
- GladeProjectPrivate);
+ project->priv = priv = glade_project_get_instance_private (project);
priv->path = NULL;
priv->model = GTK_TREE_MODEL (gtk_tree_store_new (1, G_TYPE_OBJECT));
@@ -1033,8 +1033,6 @@ glade_project_class_init (GladeProjectClass *klass)
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, glade_project_props);
-
- g_type_class_add_private (klass, sizeof (GladeProjectPrivate));
}
/******************************************************************
@@ -1077,8 +1075,8 @@ glade_project_model_get_column_type (GtkTreeModel *model, gint column)
static gboolean
glade_project_model_get_iter (GtkTreeModel *model,
- GtkTreeIter *iter,
- GtkTreePath *path)
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
return gtk_tree_model_get_iter (GLADE_PROJECT (model)->priv->model, iter, path);
}
@@ -1091,9 +1089,9 @@ glade_project_model_get_path (GtkTreeModel *model, GtkTreeIter *iter)
static void
glade_project_model_get_value (GtkTreeModel *model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
+ GtkTreeIter *iter,
+ gint column,
+ GValue *value)
{
GladeWidget *widget;
@@ -1178,9 +1176,9 @@ glade_project_model_iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
static gboolean
glade_project_model_iter_nth_child (GtkTreeModel *model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint nth)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ gint nth)
{
return gtk_tree_model_iter_nth_child (GLADE_PROJECT (model)->priv->model,
iter, parent, nth);
@@ -1188,8 +1186,8 @@ glade_project_model_iter_nth_child (GtkTreeModel *model,
static gboolean
glade_project_model_iter_children (GtkTreeModel *model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
{
return gtk_tree_model_iter_children (GLADE_PROJECT (model)->priv->model,
iter, parent);
@@ -1197,8 +1195,8 @@ glade_project_model_iter_children (GtkTreeModel *model,
static gboolean
glade_project_model_iter_parent (GtkTreeModel *model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
+ GtkTreeIter *iter,
+ GtkTreeIter *child)
{
return gtk_tree_model_iter_parent (GLADE_PROJECT (model)->priv->model,
iter, child);
@@ -1402,7 +1400,8 @@ gp_comment_get_content (GladeXmlNode *comment)
static gchar *
glade_project_read_requires_from_comment (GladeXmlNode *comment,
- guint16 *major, guint16 *minor)
+ guint16 *major,
+ guint16 *minor)
{
gchar *value, *requires, *required_lib = NULL;
@@ -1430,7 +1429,8 @@ glade_project_read_requires_from_comment (GladeXmlNode *comment,
static gboolean
glade_project_read_requires (GladeProject *project,
GladeXmlNode *root_node,
- const gchar *path, gboolean *has_gtk_dep)
+ const gchar *path,
+ gboolean *has_gtk_dep)
{
GString *string = g_string_new (NULL);
@@ -1706,7 +1706,7 @@ typedef struct
} VersionData;
static void
-glade_project_introspect_signal_versions (GladeSignal *signal,
+glade_project_introspect_signal_versions (GladeSignal *signal,
VersionData *data)
{
GladeSignalClass *signal_class;
@@ -1817,7 +1817,7 @@ glade_project_introspect_gtk_version (GladeProject *project)
target_minor = data.minor;
}
- glade_project_set_target_version (project, "gtk+", target_major,
+ glade_project_set_target_version (project, "gtk+", target_major,
target_minor);
}
@@ -1825,7 +1825,7 @@ glade_project_introspect_gtk_version (GladeProject *project)
static gint
glade_project_count_xml_objects (GladeProject *project,
GladeXmlNode *root,
- gint count)
+ gint count)
{
GladeXmlNode *node;
@@ -2228,9 +2228,9 @@ glade_project_write_comment_property (GladeProject *project,
}
static void
-glade_project_write_required_libs (GladeProject *project,
+glade_project_write_required_libs (GladeProject *project,
GladeXmlContext *context,
- GladeXmlNode *root)
+ GladeXmlNode *root)
{
gboolean supports_require_tag;
GladeXmlNode *req_node;
@@ -2278,9 +2278,9 @@ glade_project_write_required_libs (GladeProject *project,
}
static void
-glade_project_write_resource_path (GladeProject *project,
+glade_project_write_resource_path (GladeProject *project,
GladeXmlContext *context,
- GladeXmlNode *root)
+ GladeXmlNode *root)
{
glade_project_write_comment_property (project, context, root,
"interface-local-resource-path",
@@ -2288,9 +2288,9 @@ glade_project_write_resource_path (GladeProject *project,
}
static void
-glade_project_write_css_provider_path (GladeProject *project,
+glade_project_write_css_provider_path (GladeProject *project,
GladeXmlContext *context,
- GladeXmlNode *root)
+ GladeXmlNode *root)
{
GladeProjectPrivate *priv = project->priv;
gchar *dirname;
@@ -2319,9 +2319,9 @@ glade_project_write_css_provider_path (GladeProject *project,
}
static void
-glade_project_write_license_data (GladeProject *project,
+glade_project_write_license_data (GladeProject *project,
GladeXmlContext *context,
- GladeXmlNode *root)
+ GladeXmlNode *root)
{
gchar *license, *name, *description, *copyright, *authors;
@@ -2666,9 +2666,7 @@ glade_project_write (GladeProject *project)
* Returns: %TRUE on success, %FALSE on failure
*/
gboolean
-glade_project_backup (GladeProject *project,
- const gchar *path,
- GError **error)
+glade_project_backup (GladeProject *project, const gchar *path, GError **error)
{
gchar *canonical_path;
gchar *destination_path;
@@ -2697,7 +2695,6 @@ glade_project_backup (GladeProject *project,
/**
* glade_project_autosave:
* @project: a #GladeProject
- * @path: location to save glade file
* @error: an error from the G_FILE_ERROR domain.
*
* Saves an autosave snapshot of @project to it's currently set path
@@ -2707,8 +2704,7 @@ glade_project_backup (GladeProject *project,
* Returns: %TRUE on success, %FALSE on failure
*/
gboolean
-glade_project_autosave (GladeProject *project,
- GError **error)
+glade_project_autosave (GladeProject *project, GError **error)
{
GladeXmlContext *context;
@@ -2745,10 +2741,10 @@ glade_project_autosave (GladeProject *project,
* Returns: %TRUE on success, %FALSE on failure
*/
gboolean
-glade_project_save_verify (GladeProject *project,
- const gchar *path,
- GladeVerifyFlags flags,
- GError **error)
+glade_project_save_verify (GladeProject *project,
+ const gchar *path,
+ GladeVerifyFlags flags,
+ GError **error)
{
GladeXmlContext *context;
GladeXmlDoc *doc;
@@ -2948,11 +2944,11 @@ glade_project_preview (GladeProject *project, GladeWidget *gwidget)
static void
-glade_project_verify_property_internal (GladeProject *project,
- GladeProperty *property,
- const gchar *path_name,
- GString *string,
- gboolean forwidget,
+glade_project_verify_property_internal (GladeProject *project,
+ GladeProperty *property,
+ const gchar *path_name,
+ GString *string,
+ gboolean forwidget,
GladeVerifyFlags flags)
{
GladeWidgetAdaptor *adaptor, *prop_adaptor;
@@ -3032,10 +3028,10 @@ glade_project_verify_property_internal (GladeProject *project,
}
static void
-glade_project_verify_properties_internal (GladeWidget *widget,
- const gchar *path_name,
- GString *string,
- gboolean forwidget,
+glade_project_verify_properties_internal (GladeWidget *widget,
+ const gchar *path_name,
+ GString *string,
+ gboolean forwidget,
GladeVerifyFlags flags)
{
GList *list;
@@ -3062,11 +3058,11 @@ glade_project_verify_properties_internal (GladeWidget *widget,
}
static void
-glade_project_verify_signal_internal (GladeWidget *widget,
- GladeSignal *signal,
- const gchar *path_name,
- GString *string,
- gboolean forwidget,
+glade_project_verify_signal_internal (GladeWidget *widget,
+ GladeSignal *signal,
+ const gchar *path_name,
+ GString *string,
+ gboolean forwidget,
GladeVerifyFlags flags)
{
GladeSignalClass *signal_class;
@@ -3172,10 +3168,10 @@ glade_project_verify_signal (GladeWidget *widget, GladeSignal *signal)
}
static void
-glade_project_verify_signals (GladeWidget *widget,
- const gchar *path_name,
- GString *string,
- gboolean forwidget,
+glade_project_verify_signals (GladeWidget *widget,
+ const gchar *path_name,
+ GString *string,
+ gboolean forwidget,
GladeVerifyFlags flags)
{
GladeSignal *signal;
@@ -3227,8 +3223,8 @@ glade_project_verify_properties (GladeWidget *widget)
static gboolean
glade_project_verify_dialog (GladeProject *project,
- GString *string,
- gboolean saving)
+ GString *string,
+ gboolean saving)
{
GtkWidget *swindow;
GtkWidget *textview;
@@ -3265,7 +3261,9 @@ glade_project_verify_dialog (GladeProject *project,
gboolean
-glade_project_verify (GladeProject *project, gboolean saving, GladeVerifyFlags flags)
+glade_project_verify (GladeProject *project,
+ gboolean saving,
+ GladeVerifyFlags flags)
{
GString *string = g_string_new (NULL);
GList *list;
@@ -3316,10 +3314,10 @@ glade_project_verify (GladeProject *project, gboolean saving, GladeVerifyFlags f
}
static void
-glade_project_target_version_for_adaptor (GladeProject *project,
+glade_project_target_version_for_adaptor (GladeProject *project,
GladeWidgetAdaptor *adaptor,
- gint *major,
- gint *minor)
+ gint *major,
+ gint *minor)
{
gchar *catalog = NULL;
@@ -3329,13 +3327,13 @@ glade_project_target_version_for_adaptor (GladeProject *project,
}
static void
-glade_project_verify_adaptor (GladeProject *project,
+glade_project_verify_adaptor (GladeProject *project,
GladeWidgetAdaptor *adaptor,
- const gchar *path_name,
- GString *string,
- GladeVerifyFlags flags,
- gboolean forwidget,
- GladeSupportMask *mask)
+ const gchar *path_name,
+ GString *string,
+ GladeVerifyFlags flags,
+ gboolean forwidget,
+ GladeSupportMask *mask)
{
GladeSupportMask support_mask = GLADE_SUPPORT_OK;
GladeWidgetAdaptor *adaptor_iter;
@@ -3418,9 +3416,9 @@ glade_project_verify_adaptor (GladeProject *project,
* Returns: A newly allocated string
*/
gchar *
-glade_project_verify_widget_adaptor (GladeProject *project,
+glade_project_verify_widget_adaptor (GladeProject *project,
GladeWidgetAdaptor *adaptor,
- GladeSupportMask *mask)
+ GladeSupportMask *mask)
{
GString *string = g_string_new (NULL);
gchar *ret = NULL;
@@ -3474,7 +3472,6 @@ glade_project_verify_project_for_ui (GladeProject *project)
/**
* glade_project_get_widget_by_name:
* @project: a #GladeProject
- * @ancestor: The toplevel project object to search under
* @name: The user visible name of the widget we are looking for
*
* Searches under @ancestor in @project looking for a #GladeWidget named @name.
@@ -3482,8 +3479,7 @@ glade_project_verify_project_for_ui (GladeProject *project)
* Returns: a pointer to the widget, %NULL if the widget does not exist
*/
GladeWidget *
-glade_project_get_widget_by_name (GladeProject *project,
- const gchar *name)
+glade_project_get_widget_by_name (GladeProject *project, const gchar *name)
{
GList *list;
@@ -3505,8 +3501,8 @@ glade_project_get_widget_by_name (GladeProject *project,
static void
glade_project_release_widget_name (GladeProject *project,
- GladeWidget *gwidget,
- const char *widget_name)
+ GladeWidget *gwidget,
+ const char *widget_name)
{
glade_name_context_release_name (project->priv->widget_names, widget_name);
}
@@ -3523,8 +3519,8 @@ glade_project_release_widget_name (GladeProject *project,
*/
gboolean
glade_project_available_widget_name (GladeProject *project,
- GladeWidget *widget,
- const gchar *name)
+ GladeWidget *widget,
+ const gchar *name)
{
g_return_val_if_fail (GLADE_IS_PROJECT (project), FALSE);
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
@@ -3537,8 +3533,8 @@ glade_project_available_widget_name (GladeProject *project,
static void
glade_project_reserve_widget_name (GladeProject *project,
- GladeWidget *gwidget,
- const char *widget_name)
+ GladeWidget *gwidget,
+ const char *widget_name)
{
if (!glade_project_available_widget_name (project, gwidget, widget_name))
{
@@ -3565,8 +3561,8 @@ glade_project_reserve_widget_name (GladeProject *project,
*/
gchar *
glade_project_new_widget_name (GladeProject *project,
- GladeWidget *widget,
- const gchar *base_name)
+ GladeWidget *widget,
+ const gchar *base_name)
{
gchar *name;
@@ -3651,8 +3647,8 @@ glade_project_get_iter_for_object (GladeProject *project,
*/
void
glade_project_set_widget_name (GladeProject *project,
- GladeWidget *widget,
- const gchar *name)
+ GladeWidget *widget,
+ const gchar *name)
{
gchar *new_name;
@@ -4032,8 +4028,7 @@ glade_project_get_pointer_mode (GladeProject *project)
}
void
-glade_project_set_template (GladeProject *project,
- GladeWidget *widget)
+glade_project_set_template (GladeProject *project, GladeWidget *widget)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_return_if_fail (widget == NULL || GLADE_IS_WIDGET (widget));
@@ -4063,7 +4058,7 @@ glade_project_set_template (GladeProject *project,
}
GladeWidget *
-glade_project_get_template (GladeProject *project)
+glade_project_get_template (GladeProject *project)
{
g_return_val_if_fail (GLADE_IS_PROJECT (project), FALSE);
@@ -4097,9 +4092,9 @@ glade_project_get_add_item (GladeProject *project)
void
glade_project_set_target_version (GladeProject *project,
- const gchar *catalog,
- gint major,
- gint minor)
+ const gchar *catalog,
+ gint major,
+ gint minor)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_return_if_fail (catalog && catalog[0]);
@@ -4140,9 +4135,9 @@ glade_project_set_readonly (GladeProject *project, gboolean readonly)
*/
void
glade_project_get_target_version (GladeProject *project,
- const gchar *catalog,
- gint *major,
- gint *minor)
+ const gchar *catalog,
+ gint *major,
+ gint *minor)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_return_if_fail (catalog && catalog[0]);
@@ -4294,8 +4289,8 @@ glade_project_selection_clear (GladeProject *project, gboolean emit_signal)
*/
void
glade_project_selection_remove (GladeProject *project,
- GObject *object,
- gboolean emit_signal)
+ GObject *object,
+ gboolean emit_signal)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_return_if_fail (G_IS_OBJECT (object));
@@ -4324,8 +4319,8 @@ glade_project_selection_remove (GladeProject *project,
*/
void
glade_project_selection_add (GladeProject *project,
- GObject *object,
- gboolean emit_signal)
+ GObject *object,
+ gboolean emit_signal)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_return_if_fail (G_IS_OBJECT (object));
@@ -4362,8 +4357,8 @@ glade_project_selection_add (GladeProject *project,
*/
void
glade_project_selection_set (GladeProject *project,
- GObject *object,
- gboolean emit_signal)
+ GObject *object,
+ gboolean emit_signal)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_return_if_fail (G_IS_OBJECT (object));
@@ -5015,7 +5010,7 @@ glade_project_get_css_provider_path (GladeProject *project)
* Command Central *
*************************************************/
static gboolean
-widget_contains_unknown_type (GladeWidget * widget)
+widget_contains_unknown_type (GladeWidget *widget)
{
GList *list, *l;
GObject *object;
@@ -5110,7 +5105,7 @@ glade_project_command_cut (GladeProject *project)
}
void
-glade_project_command_paste (GladeProject *project,
+glade_project_command_paste (GladeProject *project,
GladePlaceholder *placeholder)
{
GladeClipboard *clipboard;
diff --git a/gladeui/glade-property-label.c b/gladeui/glade-property-label.c
index 4923a33..21fa9d1 100644
--- a/gladeui/glade-property-label.c
+++ b/gladeui/glade-property-label.c
@@ -290,12 +290,12 @@ glade_property_label_load (GladeEditable *editable,
}
static void
-glade_property_label_set_show_name (GladeEditable * editable, gboolean show_name)
+glade_property_label_set_show_name (GladeEditable *editable, gboolean show_name)
{
}
static void
-glade_property_label_editable_init (GladeEditableIface * iface)
+glade_property_label_editable_init (GladeEditableIface *iface)
{
parent_editable_iface = g_type_default_interface_peek (GLADE_TYPE_EDITABLE);
@@ -609,8 +609,8 @@ glade_property_label_get_custom_tooltip (GladePropertyLabel *label)
}
void
-glade_property_label_set_property (GladePropertyLabel *label,
- GladeProperty *property)
+glade_property_label_set_property (GladePropertyLabel *label,
+ GladeProperty *property)
{
GladePropertyLabelPrivate *priv;
diff --git a/gladeui/glade-property-shell.c b/gladeui/glade-property-shell.c
index d27cb6c..3708a25 100644
--- a/gladeui/glade-property-shell.c
+++ b/gladeui/glade-property-shell.c
@@ -33,15 +33,15 @@
#include "glade-marshallers.h"
/* GObjectClass */
-static void glade_property_shell_finalize (GObject *object);
-static void glade_property_shell_set_real_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void glade_property_shell_get_real_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
+static void glade_property_shell_finalize (GObject *object);
+static void glade_property_shell_set_real_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void glade_property_shell_get_real_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
/* GladeEditableIface */
static void glade_property_shell_editable_init (GladeEditableIface *iface);
@@ -83,25 +83,23 @@ static guint glade_property_shell_signals[LAST_SIGNAL] = { 0, };
static GladeEditableIface *parent_editable_iface;
G_DEFINE_TYPE_WITH_CODE (GladePropertyShell, glade_property_shell, GTK_TYPE_BOX,
+ G_ADD_PRIVATE (GladePropertyShell)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
glade_property_shell_editable_init));
static void
glade_property_shell_init (GladePropertyShell *shell)
{
- shell->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (shell,
- GLADE_TYPE_PROPERTY_SHELL,
- GladePropertyShellPrivate);
+ shell->priv = glade_property_shell_get_instance_private (shell);
shell->priv->packing = FALSE;
shell->priv->use_command = TRUE;
}
static void
-glade_property_shell_class_init (GladePropertyShellClass *class)
+glade_property_shell_class_init (GladePropertyShellClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = glade_property_shell_finalize;
gobject_class->set_property = glade_property_shell_set_real_property;
@@ -168,8 +166,6 @@ glade_property_shell_class_init (GladePropertyShellClass *class)
0, NULL, NULL,
_glade_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- g_type_class_add_private (gobject_class, sizeof (GladePropertyShellPrivate));
}
@@ -188,10 +184,10 @@ glade_property_shell_finalize (GObject *object)
}
static void
-glade_property_shell_set_real_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+glade_property_shell_set_real_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladePropertyShell *shell = GLADE_PROPERTY_SHELL (object);
GladePropertyShellPrivate *priv = shell->priv;
@@ -231,10 +227,10 @@ glade_property_shell_set_real_property (GObject *object,
}
static void
-glade_property_shell_get_real_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+glade_property_shell_get_real_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladePropertyShell *shell = GLADE_PROPERTY_SHELL (object);
@@ -312,8 +308,8 @@ glade_property_shell_set_eprop (GladePropertyShell *shell,
}
static void
-glade_property_shell_load (GladeEditable *editable,
- GladeWidget *widget)
+glade_property_shell_load (GladeEditable *editable,
+ GladeWidget *widget)
{
GladePropertyShell *shell = GLADE_PROPERTY_SHELL (editable);
GladePropertyShellPrivate *priv;
@@ -395,12 +391,12 @@ glade_property_shell_load (GladeEditable *editable,
}
static void
-glade_property_shell_set_show_name (GladeEditable * editable, gboolean show_name)
+glade_property_shell_set_show_name (GladeEditable *editable, gboolean show_name)
{
}
static void
-glade_property_shell_editable_init (GladeEditableIface * iface)
+glade_property_shell_editable_init (GladeEditableIface *iface)
{
parent_editable_iface = g_type_default_interface_peek (GLADE_TYPE_EDITABLE);
diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c
index 8603bef..7f1b5f4 100644
--- a/gladeui/glade-property.c
+++ b/gladeui/glade-property.c
@@ -136,13 +136,13 @@ enum
static GParamSpec *properties[N_PROPERTIES];
static guint glade_property_signals[LAST_SIGNAL] = { 0 };
-static GObjectClass *parent_class = NULL;
+static GObjectClass *glade_property_parent_class = NULL;
/*******************************************************************************
GladeProperty class methods
*******************************************************************************/
static GladeProperty *
-glade_property_dup_impl (GladeProperty * template_prop, GladeWidget * widget)
+glade_property_dup_impl (GladeProperty *template_prop, GladeWidget *widget)
{
GladeProperty *property;
@@ -178,8 +178,8 @@ glade_property_dup_impl (GladeProperty * template_prop, GladeWidget * widget)
}
static gboolean
-glade_property_equals_value_impl (GladeProperty * property,
- const GValue * value)
+glade_property_equals_value_impl (GladeProperty *property,
+ const GValue *value)
{
return !glade_property_class_compare (property->priv->klass, property->priv->value,
value);
@@ -187,9 +187,9 @@ glade_property_equals_value_impl (GladeProperty * property,
static void
-glade_property_update_prop_refs (GladeProperty * property,
- const GValue * old_value,
- const GValue * new_value)
+glade_property_update_prop_refs (GladeProperty *property,
+ const GValue *old_value,
+ const GValue *new_value)
{
GladeWidget *gold, *gnew;
GObject *old_object, *new_object;
@@ -247,7 +247,7 @@ glade_property_update_prop_refs (GladeProperty * property,
}
static gboolean
-glade_property_verify (GladeProperty * property, const GValue * value)
+glade_property_verify (GladeProperty *property, const GValue *value)
{
gboolean ret = FALSE;
GladeWidget *parent;
@@ -270,7 +270,7 @@ glade_property_verify (GladeProperty * property, const GValue * value)
}
static void
-glade_property_fix_state (GladeProperty * property)
+glade_property_fix_state (GladeProperty *property)
{
property->priv->state = GLADE_STATE_NORMAL;
@@ -297,7 +297,7 @@ glade_property_fix_state (GladeProperty * property)
static gboolean
-glade_property_set_value_impl (GladeProperty * property, const GValue * value)
+glade_property_set_value_impl (GladeProperty *property, const GValue *value)
{
GladeProject *project = property->priv->widget ?
glade_widget_get_project (property->priv->widget) : NULL;
@@ -406,7 +406,7 @@ glade_property_set_value_impl (GladeProperty * property, const GValue * value)
}
static void
-glade_property_get_value_impl (GladeProperty * property, GValue * value)
+glade_property_get_value_impl (GladeProperty *property, GValue *value)
{
GParamSpec *pspec;
@@ -481,7 +481,7 @@ glade_property_sync_impl (GladeProperty *property)
}
static void
-glade_property_load_impl (GladeProperty * property)
+glade_property_load_impl (GladeProperty *property)
{
GObject *object;
GObjectClass *oclass;
@@ -509,9 +509,10 @@ glade_property_load_impl (GladeProperty * property)
GObjectClass & Object Construction
*******************************************************************************/
static void
-glade_property_set_real_property (GObject * object,
- guint prop_id,
- const GValue * value, GParamSpec * pspec)
+glade_property_set_real_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeProperty *property = GLADE_PROPERTY (object);
@@ -543,9 +544,10 @@ glade_property_set_real_property (GObject * object,
}
static void
-glade_property_get_real_property (GObject * object,
- guint prop_id,
- GValue * value, GParamSpec * pspec)
+glade_property_get_real_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeProperty *property = GLADE_PROPERTY (object);
@@ -580,7 +582,7 @@ glade_property_get_real_property (GObject * object,
}
static void
-glade_property_finalize (GObject * object)
+glade_property_finalize (GObject *object)
{
GladeProperty *property = GLADE_PROPERTY (object);
@@ -598,11 +600,11 @@ glade_property_finalize (GObject * object)
if (property->priv->insensitive_tooltip)
g_free (property->priv->insensitive_tooltip);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (glade_property_parent_class)->finalize (object);
}
static void
-glade_property_init (GladeProperty * property)
+glade_property_init (GladeProperty *property)
{
property->priv = G_TYPE_INSTANCE_GET_PRIVATE (property,
GLADE_TYPE_PROPERTY,
@@ -621,7 +623,7 @@ glade_property_klass_init (GladePropertyKlass * prop_class)
GObjectClass *object_class;
g_return_if_fail (prop_class != NULL);
- parent_class = g_type_class_peek_parent (prop_class);
+ glade_property_parent_class = g_type_class_peek_parent (prop_class);
object_class = G_OBJECT_CLASS (prop_class);
/* GObjectClass */
@@ -758,8 +760,9 @@ glade_property_get_type (void)
* Returns: The newly created #GladeProperty
*/
GladeProperty *
-glade_property_new (GladePropertyClass * klass,
- GladeWidget * widget, GValue * value)
+glade_property_new (GladePropertyClass *klass,
+ GladeWidget *widget,
+ GValue *value)
{
GladeProperty *property;
@@ -794,14 +797,14 @@ glade_property_new (GladePropertyClass * klass,
* Returns: A newly duplicated property based on the new widget
*/
GladeProperty *
-glade_property_dup (GladeProperty * template_prop, GladeWidget * widget)
+glade_property_dup (GladeProperty *template_prop, GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (template_prop), NULL);
return GLADE_PROPERTY_GET_KLASS (template_prop)->dup (template_prop, widget);
}
static void
-glade_property_reset_common (GladeProperty * property, gboolean original)
+glade_property_reset_common (GladeProperty *property, gboolean original)
{
const GValue *value;
@@ -822,7 +825,7 @@ glade_property_reset_common (GladeProperty * property, gboolean original)
* Resets this property to its default value
*/
void
-glade_property_reset (GladeProperty * property)
+glade_property_reset (GladeProperty *property)
{
glade_property_reset_common (property, FALSE);
}
@@ -834,13 +837,13 @@ glade_property_reset (GladeProperty * property)
* Resets this property to its original default value
*/
void
-glade_property_original_reset (GladeProperty * property)
+glade_property_original_reset (GladeProperty *property)
{
glade_property_reset_common (property, TRUE);
}
static gboolean
-glade_property_default_common (GladeProperty * property, gboolean orig)
+glade_property_default_common (GladeProperty *property, gboolean orig)
{
const GValue *value;
@@ -861,7 +864,7 @@ glade_property_default_common (GladeProperty * property, gboolean orig)
* Returns: Whether this property is at its default value
*/
gboolean
-glade_property_default (GladeProperty * property)
+glade_property_default (GladeProperty *property)
{
return glade_property_default_common (property, FALSE);
}
@@ -873,7 +876,7 @@ glade_property_default (GladeProperty * property)
* Returns: Whether this property is at its original default value
*/
gboolean
-glade_property_original_default (GladeProperty * property)
+glade_property_original_default (GladeProperty *property)
{
return glade_property_default_common (property, TRUE);
}
@@ -886,7 +889,7 @@ glade_property_original_default (GladeProperty * property)
* Returns: Whether this property is equal to the value provided
*/
gboolean
-glade_property_equals_value (GladeProperty * property, const GValue * value)
+glade_property_equals_value (GladeProperty *property, const GValue *value)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), FALSE);
return GLADE_PROPERTY_GET_KLASS (property)->equals_value (property, value);
@@ -900,7 +903,7 @@ glade_property_equals_value (GladeProperty * property, const GValue * value)
* Returns: Whether this property is equal to the value provided
*/
static gboolean
-glade_property_equals_va_list (GladeProperty * property, va_list vl)
+glade_property_equals_va_list (GladeProperty *property, va_list vl)
{
GValue *value;
gboolean ret;
@@ -924,7 +927,7 @@ glade_property_equals_va_list (GladeProperty * property, va_list vl)
* Returns: Whether this property is equal to the value provided
*/
gboolean
-glade_property_equals (GladeProperty * property, ...)
+glade_property_equals (GladeProperty *property, ...)
{
va_list vl;
gboolean ret;
@@ -948,7 +951,7 @@ glade_property_equals (GladeProperty * property, ...)
* Returns: Whether the property was successfully set.
*/
gboolean
-glade_property_set_value (GladeProperty * property, const GValue * value)
+glade_property_set_value (GladeProperty *property, const GValue *value)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), FALSE);
g_return_val_if_fail (value != NULL, FALSE);
@@ -963,7 +966,7 @@ glade_property_set_value (GladeProperty * property, const GValue * value)
* Sets the property's value
*/
gboolean
-glade_property_set_va_list (GladeProperty * property, va_list vl)
+glade_property_set_va_list (GladeProperty *property, va_list vl)
{
GValue *value;
gboolean success;
@@ -988,7 +991,7 @@ glade_property_set_va_list (GladeProperty * property, va_list vl)
* Sets the property's value (in a convenient way)
*/
gboolean
-glade_property_set (GladeProperty * property, ...)
+glade_property_set (GladeProperty *property, ...)
{
va_list vl;
gboolean success;
@@ -1010,7 +1013,7 @@ glade_property_set (GladeProperty * property, ...)
* Retrieve the property value
*/
void
-glade_property_get_value (GladeProperty * property, GValue * value)
+glade_property_get_value (GladeProperty *property, GValue *value)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
g_return_if_fail (value != NULL);
@@ -1025,7 +1028,7 @@ glade_property_get_value (GladeProperty * property, GValue * value)
* Retrieve the default property value
*/
void
-glade_property_get_default (GladeProperty * property, GValue * value)
+glade_property_get_default (GladeProperty *property, GValue *value)
{
GParamSpec *pspec;
@@ -1045,7 +1048,7 @@ glade_property_get_default (GladeProperty * property, GValue * value)
* Retrieve the property value
*/
void
-glade_property_get_va_list (GladeProperty * property, va_list vl)
+glade_property_get_va_list (GladeProperty *property, va_list vl)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
glade_property_class_set_vl_from_gvalue (property->priv->klass, property->priv->value,
@@ -1060,7 +1063,7 @@ glade_property_get_va_list (GladeProperty * property, va_list vl)
* Retrieve the property value
*/
void
-glade_property_get (GladeProperty * property, ...)
+glade_property_get (GladeProperty *property, ...)
{
va_list vl;
@@ -1078,7 +1081,7 @@ glade_property_get (GladeProperty * property, ...)
* Synchronize the object with this property
*/
void
-glade_property_sync (GladeProperty * property)
+glade_property_sync (GladeProperty *property)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
GLADE_PROPERTY_GET_KLASS (property)->sync (property);
@@ -1091,7 +1094,7 @@ glade_property_sync (GladeProperty * property)
* Loads the value of @property from the coresponding object instance
*/
void
-glade_property_load (GladeProperty * property)
+glade_property_load (GladeProperty *property)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
GLADE_PROPERTY_GET_KLASS (property)->load (property);
@@ -1111,8 +1114,9 @@ glade_property_load (GladeProperty * property)
* completely loaded
*/
void
-glade_property_read (GladeProperty * property,
- GladeProject * project, GladeXmlNode * prop)
+glade_property_read (GladeProperty *property,
+ GladeProject *project,
+ GladeXmlNode *prop)
{
GValue *gvalue = NULL;
gchar /* *id, *name, */ * value;
@@ -1178,8 +1182,9 @@ glade_property_read (GladeProperty * property,
* Write @property to @node
*/
void
-glade_property_write (GladeProperty * property,
- GladeXmlContext * context, GladeXmlNode * node)
+glade_property_write (GladeProperty *property,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GladeXmlNode *prop_node;
gchar *name, *value;
@@ -1258,7 +1263,7 @@ glade_property_write (GladeProperty * property,
* or #GParamSpecObject type property.
*/
void
-glade_property_add_object (GladeProperty * property, GObject * object)
+glade_property_add_object (GladeProperty *property, GObject *object)
{
GList *list = NULL, *new_list = NULL;
GParamSpec *pspec;
@@ -1301,7 +1306,7 @@ glade_property_add_object (GladeProperty * property, GObject * object)
* or #GParamSpecObject type property.
*/
void
-glade_property_remove_object (GladeProperty * property, GObject * object)
+glade_property_remove_object (GladeProperty *property, GObject *object)
{
GList *list = NULL, *new_list = NULL;
GParamSpec *pspec;
@@ -1347,7 +1352,7 @@ glade_property_get_class (GladeProperty *property)
/* Parameters for translatable properties. */
void
-glade_property_i18n_set_comment (GladeProperty * property, const gchar * str)
+glade_property_i18n_set_comment (GladeProperty *property, const gchar *str)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
if (property->priv->i18n_comment)
@@ -1365,7 +1370,7 @@ glade_property_i18n_get_comment (GladeProperty * property)
}
void
-glade_property_i18n_set_context (GladeProperty * property, const gchar * str)
+glade_property_i18n_set_context (GladeProperty *property, const gchar *str)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
if (property->priv->i18n_context)
@@ -1376,15 +1381,15 @@ glade_property_i18n_set_context (GladeProperty * property, const gchar * str)
}
G_CONST_RETURN gchar *
-glade_property_i18n_get_context (GladeProperty * property)
+glade_property_i18n_get_context (GladeProperty *property)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), NULL);
return property->priv->i18n_context;
}
void
-glade_property_i18n_set_translatable (GladeProperty * property,
- gboolean translatable)
+glade_property_i18n_set_translatable (GladeProperty *property,
+ gboolean translatable)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
property->priv->i18n_translatable = translatable;
@@ -1392,15 +1397,16 @@ glade_property_i18n_set_translatable (GladeProperty * property,
}
gboolean
-glade_property_i18n_get_translatable (GladeProperty * property)
+glade_property_i18n_get_translatable (GladeProperty *property)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), FALSE);
return property->priv->i18n_translatable;
}
void
-glade_property_set_sensitive (GladeProperty * property,
- gboolean sensitive, const gchar * reason)
+glade_property_set_sensitive (GladeProperty *property,
+ gboolean sensitive,
+ const gchar *reason)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
@@ -1440,15 +1446,16 @@ glade_propert_get_insensitive_tooltip (GladeProperty *property)
}
gboolean
-glade_property_get_sensitive (GladeProperty * property)
+glade_property_get_sensitive (GladeProperty *property)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), FALSE);
return property->priv->sensitive;
}
void
-glade_property_set_support_warning (GladeProperty * property,
- gboolean disable, const gchar * reason)
+glade_property_set_support_warning (GladeProperty *property,
+ gboolean disable,
+ const gchar *reason)
{
gboolean warn_before, warn_after;
@@ -1511,7 +1518,7 @@ glade_property_warn_usage (GladeProperty *property)
* or derived widget code).
*/
void
-glade_property_set_save_always (GladeProperty * property, gboolean setting)
+glade_property_set_save_always (GladeProperty *property, gboolean setting)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
@@ -1526,7 +1533,7 @@ glade_property_set_save_always (GladeProperty * property, gboolean setting)
* to always be saved regardless of its default value.
*/
gboolean
-glade_property_get_save_always (GladeProperty * property)
+glade_property_get_save_always (GladeProperty *property)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), FALSE);
@@ -1534,7 +1541,7 @@ glade_property_get_save_always (GladeProperty * property)
}
void
-glade_property_set_enabled (GladeProperty * property, gboolean enabled)
+glade_property_set_enabled (GladeProperty *property, gboolean enabled)
{
gboolean warn_before, warn_after;
@@ -1575,8 +1582,8 @@ glade_property_make_string (GladeProperty *property)
}
void
-glade_property_set_widget (GladeProperty *property,
- GladeWidget *widget)
+glade_property_set_widget (GladeProperty *property,
+ GladeWidget *widget)
{
g_return_if_fail (GLADE_IS_PROPERTY (property));
@@ -1584,7 +1591,7 @@ glade_property_set_widget (GladeProperty *property,
}
GladeWidget *
-glade_property_get_widget (GladeProperty *property)
+glade_property_get_widget (GladeProperty *property)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), NULL);
@@ -1600,7 +1607,7 @@ glade_property_inline_value (GladeProperty *property)
}
GladePropertyState
-glade_property_get_state (GladeProperty *property)
+glade_property_get_state (GladeProperty *property)
{
g_return_val_if_fail (GLADE_IS_PROPERTY (property), 0);
diff --git a/gladeui/glade-signal-class.c b/gladeui/glade-signal-class.c
index ce5c896..b797f06 100644
--- a/gladeui/glade-signal-class.c
+++ b/gladeui/glade-signal-class.c
@@ -83,9 +83,9 @@ glade_signal_class_free (GladeSignalClass *signal_class)
}
void
-glade_signal_class_update_from_node (GladeSignalClass *signal_class,
- GladeXmlNode *node,
- const gchar *domain)
+glade_signal_class_update_from_node (GladeSignalClass *signal_class,
+ GladeXmlNode *node,
+ const gchar *domain)
{
g_return_if_fail (signal_class != NULL);
g_return_if_fail (node != NULL);
@@ -109,7 +109,7 @@ glade_signal_class_get_adaptor (const GladeSignalClass *signal_class)
}
G_CONST_RETURN gchar *
-glade_signal_class_get_name (const GladeSignalClass *signal_class)
+glade_signal_class_get_name (const GladeSignalClass *signal_class)
{
g_return_val_if_fail (signal_class != NULL, NULL);
@@ -117,7 +117,7 @@ glade_signal_class_get_name (const GladeSignalClass *signal_class)
}
G_CONST_RETURN gchar *
-glade_signal_class_get_type (const GladeSignalClass *signal_class)
+glade_signal_class_get_type (const GladeSignalClass *signal_class)
{
g_return_val_if_fail (signal_class != NULL, NULL);
@@ -133,9 +133,9 @@ glade_signal_class_get_flags (const GladeSignalClass *signal_class)
}
void
-glade_signal_class_set_since (GladeSignalClass *signal_class,
- guint16 since_major,
- guint16 since_minor)
+glade_signal_class_set_since (GladeSignalClass *signal_class,
+ guint16 since_major,
+ guint16 since_minor)
{
g_return_if_fail (signal_class != NULL);
@@ -144,7 +144,7 @@ glade_signal_class_set_since (GladeSignalClass *signal_class,
}
guint16
-glade_signal_class_since_major (GladeSignalClass *signal_class)
+glade_signal_class_since_major (GladeSignalClass *signal_class)
{
g_return_val_if_fail (signal_class != NULL, 0);
@@ -152,7 +152,7 @@ glade_signal_class_since_major (GladeSignalClass *signal_class)
}
guint16
-glade_signal_class_since_minor (GladeSignalClass *signal_class)
+glade_signal_class_since_minor (GladeSignalClass *signal_class)
{
g_return_val_if_fail (signal_class != NULL, 0);
@@ -160,8 +160,8 @@ glade_signal_class_since_minor (GladeSignalClass *signal_class)
}
void
-glade_signal_class_set_deprecated (GladeSignalClass *signal_class,
- gboolean deprecated)
+glade_signal_class_set_deprecated (GladeSignalClass *signal_class,
+ gboolean deprecated)
{
g_return_if_fail (signal_class != NULL);
@@ -169,7 +169,7 @@ glade_signal_class_set_deprecated (GladeSignalClass *signal_class,
}
gboolean
-glade_signal_class_deprecated (GladeSignalClass *signal_class)
+glade_signal_class_deprecated (GladeSignalClass *signal_class)
{
g_return_val_if_fail (signal_class != NULL, FALSE);
diff --git a/gladeui/glade-signal-editor.c b/gladeui/glade-signal-editor.c
index e9440a2..9580211 100644
--- a/gladeui/glade-signal-editor.c
+++ b/gladeui/glade-signal-editor.c
@@ -46,11 +46,6 @@
#include "glade-project.h"
#include "glade-cell-renderer-icon.h"
-G_DEFINE_TYPE (GladeSignalEditor, glade_signal_editor, GTK_TYPE_BOX)
-
-#define GLADE_SIGNAL_EDITOR_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), GLADE_TYPE_SIGNAL_EDITOR, GladeSignalEditorPrivate))
-
struct _GladeSignalEditorPrivate
{
GtkTreeModel *model;
@@ -92,6 +87,8 @@ enum
static guint glade_signal_editor_signals[LAST_SIGNAL] = { 0 };
static gboolean tree_path_focus_idle (gpointer data);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeSignalEditor, glade_signal_editor, GTK_TYPE_BOX)
+
/* Utils */
static inline gboolean
glade_signal_is_dummy (GladeSignal *signal)
@@ -823,7 +820,7 @@ glade_signal_editor_enable_dnd (GladeSignalEditor *editor, gboolean enabled)
static void
glade_signal_editor_dispose (GObject *object)
{
- GladeSignalEditorPrivate *priv = GLADE_SIGNAL_EDITOR_GET_PRIVATE (object);
+ GladeSignalEditorPrivate *priv = GLADE_SIGNAL_EDITOR (object)->priv;
g_clear_object (&priv->detail_store);
g_clear_object (&priv->handler_store);
@@ -1242,7 +1239,7 @@ glade_signal_editor_init (GladeSignalEditor *self)
GtkCellArea *cell_area;
GladeSignalEditorPrivate *priv;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GLADE_TYPE_SIGNAL_EDITOR, GladeSignalEditorPrivate);
+ self->priv = glade_signal_editor_get_instance_private (self);
priv = self->priv;
/* Create signal tree */
@@ -1462,8 +1459,6 @@ glade_signal_editor_class_init (GladeSignalEditorClass *klass)
klass->callback_suggestions = glade_signal_editor_callback_suggestions;
klass->detail_suggestions = glade_signal_editor_detail_suggestions;
-
- g_type_class_add_private (klass, sizeof (GladeSignalEditorPrivate));
/**
* GladeSignalEditor::signal-activated:
diff --git a/gladeui/glade-signal-model.c b/gladeui/glade-signal-model.c
index 65db220..2b383e5 100644
--- a/gladeui/glade-signal-model.c
+++ b/gladeui/glade-signal-model.c
@@ -58,6 +58,7 @@ static void on_glade_signal_model_changed (GladeWidget *widget, const GladeSigna
static void on_glade_widget_support_changed (GladeWidget *widget, GladeSignalModel *model);
G_DEFINE_TYPE_WITH_CODE (GladeSignalModel, glade_signal_model, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GladeSignalModel)
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
gtk_tree_model_iface_init);
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE,
@@ -78,7 +79,7 @@ g_ptr_array_find (GPtrArray *array, gpointer data)
static void
glade_signal_model_init (GladeSignalModel *object)
{
- object->priv = G_TYPE_INSTANCE_GET_PRIVATE (object, GLADE_TYPE_SIGNAL_MODEL, GladeSignalModelPrivate);
+ object->priv = glade_signal_model_get_instance_private (object);
object->priv->dummy_signals =
g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref);
@@ -182,8 +183,6 @@ glade_signal_model_class_init (GladeSignalModelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GladeSignalModelPrivate));
-
object_class->finalize = glade_signal_model_finalize;
object_class->set_property = glade_signal_model_set_property;
object_class->get_property = glade_signal_model_get_property;
diff --git a/gladeui/glade-signal.c b/gladeui/glade-signal.c
index 5a247be..cbe1430 100644
--- a/gladeui/glade-signal.c
+++ b/gladeui/glade-signal.c
@@ -61,7 +61,7 @@ enum {
#define GladeSignalClass GladeSignalKlass
#define glade_signal_class_init glade_signal_klass_init
-G_DEFINE_TYPE (GladeSignal, glade_signal, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeSignal, glade_signal, G_TYPE_OBJECT)
#undef GladeSignalClass
#undef glade_signal_class_init
@@ -156,9 +156,7 @@ glade_signal_set_property (GObject *object,
static void
glade_signal_init (GladeSignal *signal)
{
- signal->priv = G_TYPE_INSTANCE_GET_PRIVATE (signal,
- GLADE_TYPE_SIGNAL,
- GladeSignalPrivate);
+ signal->priv = glade_signal_get_instance_private (signal);
}
static void
@@ -218,8 +216,6 @@ glade_signal_klass_init (GladeSignalKlass *klass)
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (klass, sizeof (GladeSignalPrivate));
}
/**
@@ -236,10 +232,10 @@ glade_signal_klass_init (GladeSignalKlass *klass)
*/
GladeSignal *
glade_signal_new (const GladeSignalClass *sig_class,
- const gchar *handler,
- const gchar *userdata,
- gboolean after,
- gboolean swapped)
+ const gchar *handler,
+ const gchar *userdata,
+ gboolean after,
+ gboolean swapped)
{
g_return_val_if_fail (sig_class != NULL, NULL);
@@ -316,9 +312,9 @@ glade_signal_clone (const GladeSignal *signal)
* Writes @signal to @node
*/
void
-glade_signal_write (GladeSignal *signal,
+glade_signal_write (GladeSignal *signal,
GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeXmlNode *node)
{
GladeXmlNode *signal_node;
gchar *name;
diff --git a/gladeui/glade-widget-action.c b/gladeui/glade-widget-action.c
index 9961b53..478652c 100644
--- a/gladeui/glade-widget-action.c
+++ b/gladeui/glade-widget-action.c
@@ -53,14 +53,12 @@ struct _GladeWidgetActionPrivate
static GParamSpec *properties[N_PROPERTIES];
-G_DEFINE_TYPE (GladeWidgetAction, glade_widget_action, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeWidgetAction, glade_widget_action, G_TYPE_OBJECT);
static void
-glade_widget_action_init (GladeWidgetAction * object)
+glade_widget_action_init (GladeWidgetAction *object)
{
- object->priv = G_TYPE_INSTANCE_GET_PRIVATE (object,
- GLADE_TYPE_WIDGET_ACTION,
- GladeWidgetActionPrivate);
+ object->priv = glade_widget_action_get_instance_private (object);
object->priv->sensitive = TRUE;
object->priv->visible = TRUE;
@@ -68,7 +66,7 @@ glade_widget_action_init (GladeWidgetAction * object)
}
static void
-glade_widget_action_finalize (GObject * object)
+glade_widget_action_finalize (GObject *object)
{
GladeWidgetAction *action = GLADE_WIDGET_ACTION (object);
@@ -82,9 +80,9 @@ glade_widget_action_finalize (GObject * object)
}
static GObject *
-glade_widget_action_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam * construct_properties)
+glade_widget_action_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
{
GladeWidgetAction *action;
GObject *object;
@@ -118,8 +116,10 @@ glade_widget_action_constructor (GType type,
}
static void
-glade_widget_action_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec)
+glade_widget_action_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeWidgetAction *action = GLADE_WIDGET_ACTION (object);
@@ -143,8 +143,10 @@ glade_widget_action_set_property (GObject * object, guint prop_id,
}
static void
-glade_widget_action_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec)
+glade_widget_action_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeWidgetAction *action = GLADE_WIDGET_ACTION (object);
@@ -168,11 +170,9 @@ glade_widget_action_get_property (GObject * object, guint prop_id,
}
static void
-glade_widget_action_class_init (GladeWidgetActionClass * klass)
+glade_widget_action_class_init (GladeWidgetActionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- glade_widget_action_parent_class =
- G_OBJECT_CLASS (g_type_class_peek_parent (klass));
object_class->constructor = glade_widget_action_constructor;
object_class->finalize = glade_widget_action_finalize;
@@ -201,8 +201,6 @@ glade_widget_action_class_init (GladeWidgetActionClass * klass)
/* Install all properties */
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (klass, sizeof (GladeWidgetActionPrivate));
}
/**
@@ -214,8 +212,8 @@ glade_widget_action_class_init (GladeWidgetActionClass * klass)
*
*/
void
-glade_widget_action_set_sensitive (GladeWidgetAction * action,
- gboolean sensitive)
+glade_widget_action_set_sensitive (GladeWidgetAction *action,
+ gboolean sensitive)
{
g_return_if_fail (GLADE_IS_WIDGET_ACTION (action));
@@ -269,7 +267,7 @@ glade_widget_action_get_class (GladeWidgetAction *action)
* GWActionClass *
***************************************************************/
static const gchar *
-gwa_action_path_get_id (const gchar * action_path)
+gwa_action_path_get_id (const gchar *action_path)
{
const gchar *id;
@@ -304,7 +302,7 @@ glade_widget_action_class_new (const gchar *path)
* Returns: a newlly allocated copy of @action.
*/
GWActionClass *
-glade_widget_action_class_clone (GWActionClass * action)
+glade_widget_action_class_clone (GWActionClass *action)
{
GWActionClass *copy;
GList *l;
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index 99c37a8..df877e9 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -55,9 +55,6 @@
#define DEFAULT_ICON_NAME "widget-gtk-frame"
-#define GLADE_WIDGET_ADAPTOR_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), GLADE_TYPE_WIDGET_ADAPTOR, GladeWidgetAdaptorPrivate))
-
struct _GladeWidgetAdaptorPrivate
{
GType type; /* GType of the widget */
@@ -149,7 +146,7 @@ static GHashTable *adaptor_hash = NULL;
* 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);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeWidgetAdaptor, glade_widget_adaptor, G_TYPE_OBJECT);
/*******************************************************************************
Helper functions
@@ -230,7 +227,8 @@ gwa_gtype_hash (gconstpointer v)
}
static gboolean
-glade_widget_adaptor_hash_find (gpointer key, gpointer value,
+glade_widget_adaptor_hash_find (gpointer key,
+ gpointer value,
gpointer user_data)
{
GladeWidgetAdaptor *adaptor = value;
@@ -398,8 +396,9 @@ gwa_clone_parent_properties (GladeWidgetAdaptor *adaptor, gboolean is_packing)
static void
gwa_setup_introspected_props_from_pspecs (GladeWidgetAdaptor *adaptor,
- GParamSpec **specs,
- gint n_specs, gboolean is_packing)
+ GParamSpec **specs,
+ gint n_specs,
+ gboolean is_packing)
{
GladeWidgetAdaptor *parent_adaptor = gwa_get_parent_adaptor (adaptor);
GladePropertyClass *property_class;
@@ -433,7 +432,8 @@ gwa_setup_introspected_props_from_pspecs (GladeWidgetAdaptor *adaptor,
static void
gwa_setup_properties (GladeWidgetAdaptor *adaptor,
- GObjectClass *object_class, gboolean is_packing)
+ GObjectClass *object_class,
+ gboolean is_packing)
{
GParamSpec **specs = NULL;
guint n_specs = 0;
@@ -583,9 +583,9 @@ gwa_internal_children_clone (GList *children)
}
static GObject *
-glade_widget_adaptor_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam * construct_properties)
+glade_widget_adaptor_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
{
GladeWidgetAdaptor *adaptor, *parent_adaptor;
GObject *ret_obj;
@@ -672,14 +672,14 @@ glade_widget_adaptor_constructor (GType type,
}
static void
-gwa_packing_default_free (GladePackingDefault * def)
+gwa_packing_default_free (GladePackingDefault *def)
{
g_free (def->id);
g_free (def->value);
}
static void
-gwa_child_packing_free (GladeChildPacking * packing)
+gwa_child_packing_free (GladeChildPacking *packing)
{
g_free (packing->parent_name);
@@ -779,10 +779,10 @@ glade_widget_adaptor_finalize (GObject *object)
}
static void
-glade_widget_adaptor_real_set_property (GObject *object,
- guint prop_id,
+glade_widget_adaptor_real_set_property (GObject *object,
+ guint prop_id,
const GValue *value,
- GParamSpec *pspec)
+ GParamSpec *pspec)
{
GladeWidgetAdaptor *adaptor;
@@ -834,9 +834,9 @@ glade_widget_adaptor_real_set_property (GObject *object,
}
static void
-glade_widget_adaptor_real_get_property (GObject *object,
- guint prop_id,
- GValue *value,
+glade_widget_adaptor_real_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
GParamSpec *pspec)
{
@@ -884,8 +884,8 @@ glade_widget_adaptor_real_get_property (GObject *object,
*******************************************************************************/
static GladeWidget *
glade_widget_adaptor_object_create_widget (GladeWidgetAdaptor *adaptor,
- const gchar *first_property_name,
- va_list var_args)
+ const gchar *first_property_name,
+ va_list var_args)
{
return GLADE_WIDGET (g_object_new_valist (GLADE_TYPE_WIDGET,
first_property_name, var_args));
@@ -893,8 +893,8 @@ glade_widget_adaptor_object_create_widget (GladeWidgetAdaptor *adaptor,
static GObject *
glade_widget_adaptor_object_construct_object (GladeWidgetAdaptor *adaptor,
- guint n_parameters,
- GParameter *parameters)
+ guint n_parameters,
+ GParameter *parameters)
{
return g_object_newv (adaptor->priv->type, n_parameters, parameters);
}
@@ -909,8 +909,8 @@ glade_widget_adaptor_object_destroy_object (GladeWidgetAdaptor *adaptor,
static GObject *
glade_widget_adaptor_object_get_internal_child (GladeWidgetAdaptor *adaptor,
- GObject *object,
- const gchar *name)
+ GObject *object,
+ const gchar *name)
{
static GtkBuilder *builder = NULL;
@@ -939,26 +939,26 @@ 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)
+ 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)
+ 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)
+ GObject *object,
+ const gchar *action_id)
{
g_message ("No action_activate() support in adaptor %s for action '%s'",
adaptor->priv->name, action_id);
@@ -966,9 +966,9 @@ glade_widget_adaptor_object_action_activate (GladeWidgetAdaptor *adaptor,
static void
glade_widget_adaptor_object_child_action_activate (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *object,
- const gchar *action_id)
+ 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);
@@ -976,8 +976,8 @@ glade_widget_adaptor_object_child_action_activate (GladeWidgetAdaptor *adaptor,
static void
glade_widget_adaptor_object_read_widget (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
GladeXmlNode *iter_node;
GladeSignal *signal;
@@ -1050,9 +1050,9 @@ glade_widget_adaptor_object_read_widget (GladeWidgetAdaptor *adaptor,
static void
glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GList *props;
@@ -1070,17 +1070,17 @@ glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor *adaptor,
static void
glade_widget_adaptor_object_write_widget_after (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
}
static void
glade_widget_adaptor_object_read_child (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
GladeXmlNode *widget_node, *packing_node, *iter_node;
GladeWidget *child_widget;
@@ -1156,9 +1156,9 @@ glade_widget_adaptor_object_read_child (GladeWidgetAdaptor *adaptor,
static void
glade_widget_adaptor_object_write_child (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GladeXmlNode *child_node, *packing_node;
GList *props;
@@ -1260,7 +1260,7 @@ glade_widget_adaptor_get_eprop_type (GParamSpec *pspec)
static GladeEditorProperty *
glade_widget_adaptor_object_create_eprop (GladeWidgetAdaptor *adaptor,
GladePropertyClass *klass,
- gboolean use_command)
+ gboolean use_command)
{
GladeEditorProperty *eprop;
GParamSpec *pspec;
@@ -1289,7 +1289,7 @@ glade_widget_adaptor_object_create_eprop (GladeWidgetAdaptor *adaptor,
static gchar *
glade_widget_adaptor_object_string_from_value (GladeWidgetAdaptor *adaptor,
GladePropertyClass *klass,
- const GValue *value)
+ const GValue *value)
{
return glade_property_class_make_string_from_gvalue (klass, value);
}
@@ -1330,7 +1330,7 @@ glade_widget_adaptor_object_get_children (GladeWidgetAdaptor *adaptor,
static void
glade_widget_adaptor_init (GladeWidgetAdaptor *adaptor)
{
- adaptor->priv = GLADE_WIDGET_ADAPTOR_GET_PRIVATE (adaptor);
+ adaptor->priv = glade_widget_adaptor_get_instance_private (adaptor);
}
@@ -1448,8 +1448,6 @@ glade_widget_adaptor_class_init (GladeWidgetAdaptorClass *adaptor_class)
g_param_spec_pointer
("cursor", _("Cursor"),
_("A cursor for inserting widgets in the UI"), G_PARAM_READABLE));
-
- g_type_class_add_private (adaptor_class, sizeof (GladeWidgetAdaptorPrivate));
}
/*******************************************************************************
@@ -1482,7 +1480,8 @@ gwa_warn_deprecated_if_symbol_found (GladeXmlNode *node, gchar *tagname)
static void
gwa_extend_with_node_load_sym (GladeWidgetAdaptorClass *klass,
- GladeXmlNode *node, GModule *module)
+ GladeXmlNode *node,
+ GModule *module)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
gpointer symbol;
@@ -1623,7 +1622,7 @@ gwa_extend_with_node_load_sym (GladeWidgetAdaptorClass *klass,
static void
gwa_derived_class_init (GladeWidgetAdaptorClass *adaptor_class,
- GWADerivedClassData *data)
+ GWADerivedClassData *data)
{
GladeXmlNode *node = data->node;
GModule *module = data->module;
@@ -1852,7 +1851,7 @@ 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)
+ const gchar *parent_name)
{
GList *l;
@@ -1871,7 +1870,7 @@ glade_widget_adaptor_get_child_packing (GladeWidgetAdaptor *child_adaptor,
static void
gwa_set_packing_defaults_from_node (GladeWidgetAdaptor *adaptor,
- GladeXmlNode *node)
+ GladeXmlNode *node)
{
GladeXmlNode *child;
@@ -1949,11 +1948,11 @@ 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)
+ GladeXmlNode *node,
+ GModule *module,
+ GList **properties,
+ const gchar *domain,
+ gboolean is_packing)
{
GladeXmlNode *child;
@@ -2151,9 +2150,9 @@ pspec_dup (GParamSpec *spec)
static void
gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor,
- GType type,
- GList **properties,
- gboolean is_packing)
+ GType type,
+ GList **properties,
+ gboolean is_packing)
{
gpointer object_class = g_type_class_ref (type);
GParamSpec **specs = NULL, *spec;
@@ -2216,10 +2215,10 @@ gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor,
static void
gwa_action_update_from_node (GladeWidgetAdaptor *adaptor,
- gboolean is_packing,
- GladeXmlNode *node,
- const gchar *domain,
- gchar *group_path)
+ gboolean is_packing,
+ GladeXmlNode *node,
+ const gchar *domain,
+ gchar *group_path)
{
GladeXmlNode *child;
gchar *id, *label, *stock, *action_path;
@@ -2331,7 +2330,8 @@ gwa_internal_child_find (GList *list, gchar *name)
}
static GList *
-gwa_internal_children_update_from_node (GList *internal_children, GladeXmlNode *node)
+gwa_internal_children_update_from_node (GList *internal_children,
+ GladeXmlNode *node)
{
GList *retval = internal_children;
GladeXmlNode *child, *children;
@@ -2365,9 +2365,9 @@ 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)
+ GladeXmlNode *node,
+ GModule *module,
+ const gchar *domain)
{
GladeXmlNode *child;
gchar *child_type;
@@ -2423,7 +2423,7 @@ gwa_extend_with_node (GladeWidgetAdaptor *adaptor,
*/
static gchar *
create_icon_name_for_object_class (const gchar *class_name,
- GType class_type,
+ GType class_type,
const gchar *icon_name,
const gchar *icon_prefix,
const gchar *generic_name)
@@ -2619,7 +2619,7 @@ generate_deprecated_icon (const gchar *icon_name)
GladeWidgetAdaptor *
glade_widget_adaptor_from_catalog (GladeCatalog *catalog,
GladeXmlNode *class_node,
- GModule *module)
+ GModule *module)
{
GladeWidgetAdaptor *adaptor = NULL;
gchar *name, *generic_name, *icon_name, *adaptor_icon_name, *adaptor_name,
@@ -2884,11 +2884,11 @@ 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,
- gboolean anarchist,
+glade_widget_adaptor_create_internal (GladeWidget *parent,
+ GObject *internal_object,
+ const gchar *internal_name,
+ const gchar *parent_name,
+ gboolean anarchist,
GladeCreateReason reason)
{
GladeWidgetAdaptor *adaptor;
@@ -2937,8 +2937,9 @@ glade_widget_adaptor_create_internal (GladeWidget *parent,
* this macro returns the newly created #GladeWidget
*/
GladeWidget *
-glade_widget_adaptor_create_widget_real (gboolean query,
- const gchar *first_property, ...)
+glade_widget_adaptor_create_widget_real (gboolean query,
+ const gchar *first_property,
+ ...)
{
GladeWidgetAdaptor *adaptor;
GladeWidget *gwidget;
@@ -2989,8 +2990,8 @@ typedef struct
static void
-search_adaptor_by_name (GType *type,
- GladeWidgetAdaptor *adaptor,
+search_adaptor_by_name (GType *type,
+ GladeWidgetAdaptor *adaptor,
GladeAdaptorSearchPair *pair)
{
if (!strcmp (adaptor->priv->name, pair->name))
@@ -3050,7 +3051,7 @@ glade_widget_adaptor_get_by_type (GType type)
**/
GladeWidgetAdaptor *
glade_widget_adaptor_from_pspec (GladeWidgetAdaptor *adaptor,
- GParamSpec *spec)
+ GParamSpec *spec)
{
GladeWidgetAdaptor *spec_adaptor;
GType spec_type = spec->owner_type;
@@ -3085,7 +3086,7 @@ glade_widget_adaptor_from_pspec (GladeWidgetAdaptor *adaptor,
*/
GladePropertyClass *
glade_widget_adaptor_get_property_class (GladeWidgetAdaptor *adaptor,
- const gchar *name)
+ const gchar *name)
{
GList *list;
GladePropertyClass *pclass;
@@ -3111,7 +3112,7 @@ glade_widget_adaptor_get_property_class (GladeWidgetAdaptor *adaptor,
*/
GladePropertyClass *
glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor *adaptor,
- const gchar *name)
+ const gchar *name)
{
GList *list;
GladePropertyClass *pclass;
@@ -3135,8 +3136,8 @@ glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor *adaptor,
*/
GParameter *
glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor,
- gboolean construct,
- guint *n_params)
+ gboolean construct,
+ guint *n_params)
{
GArray *params;
GObjectClass *oclass;
@@ -3217,8 +3218,8 @@ glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor,
*/
GObject *
glade_widget_adaptor_construct_object (GladeWidgetAdaptor *adaptor,
- guint n_parameters,
- GParameter *parameters)
+ guint n_parameters,
+ GParameter *parameters)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -3245,10 +3246,10 @@ glade_widget_adaptor_destroy_object (GladeWidgetAdaptor *adaptor,
static void
gwa_internal_children_create (GladeWidgetAdaptor *adaptor,
- GObject *parent_object,
- GObject *object,
- GList *children,
- GladeCreateReason reason)
+ GObject *parent_object,
+ GObject *object,
+ GList *children,
+ GladeCreateReason reason)
{
gchar *parent_name = adaptor->priv->generic_name;
GladeWidget *gobject = glade_widget_get_from_gobject (object);
@@ -3288,8 +3289,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));
@@ -3325,8 +3326,8 @@ glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor,
*/
GObject *
glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor *adaptor,
- GObject *object,
- const gchar *internal_name)
+ 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);
@@ -3356,9 +3357,9 @@ 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)
+ 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));
@@ -3383,9 +3384,9 @@ glade_widget_adaptor_set_property (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_get_property (GladeWidgetAdaptor *adaptor,
- GObject *object,
- const gchar *property_name,
- GValue *value)
+ 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));
@@ -3416,9 +3417,9 @@ glade_widget_adaptor_get_property (GladeWidgetAdaptor *adaptor,
*/
gboolean
glade_widget_adaptor_verify_property (GladeWidgetAdaptor *adaptor,
- GObject *object,
- const gchar *property_name,
- const GValue *value)
+ 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);
@@ -3473,8 +3474,8 @@ glade_widget_adaptor_add_verify (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_add (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *child)
+ GObject *container,
+ GObject *child)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3498,8 +3499,8 @@ glade_widget_adaptor_add (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_remove (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *child)
+ GObject *container,
+ GObject *child)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (container));
@@ -3524,7 +3525,7 @@ glade_widget_adaptor_remove (GladeWidgetAdaptor *adaptor,
*/
GList *
glade_widget_adaptor_get_children (GladeWidgetAdaptor *adaptor,
- GObject *container)
+ GObject *container)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (G_IS_OBJECT (container), NULL);
@@ -3544,8 +3545,8 @@ glade_widget_adaptor_get_children (GladeWidgetAdaptor *adaptor,
*/
gboolean
glade_widget_adaptor_has_child (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *child)
+ GObject *container,
+ GObject *child)
{
GList *list, *children = NULL;
gboolean found = FALSE;
@@ -3577,10 +3578,10 @@ glade_widget_adaptor_has_child (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_child_set_property (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *child,
- const gchar *property_name,
- const GValue *value)
+ 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));
@@ -3612,10 +3613,10 @@ glade_widget_adaptor_child_set_property (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_child_get_property (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *child,
- const gchar *property_name,
- GValue *value)
+ 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));
@@ -3650,10 +3651,10 @@ glade_widget_adaptor_child_get_property (GladeWidgetAdaptor *adaptor,
*/
gboolean
glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *child,
- const gchar *property_name,
- const GValue *value)
+ 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);
@@ -3685,9 +3686,9 @@ glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *old_obj,
- GObject *new_obj)
+ 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));
@@ -3742,7 +3743,7 @@ glade_widget_adaptor_query (GladeWidgetAdaptor *adaptor)
G_CONST_RETURN gchar *
glade_widget_adaptor_get_packing_default (GladeWidgetAdaptor *child_adaptor,
GladeWidgetAdaptor *container_adaptor,
- const gchar *id)
+ const gchar *id)
{
GladeChildPacking *packing = NULL;
GList *l;
@@ -3885,10 +3886,10 @@ glade_widget_adaptor_action_add_real (GList **list,
*/
gboolean
glade_widget_adaptor_action_add (GladeWidgetAdaptor *adaptor,
- const gchar *action_path,
- const gchar *label,
- const gchar *stock,
- gboolean important)
+ 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);
@@ -3913,10 +3914,10 @@ glade_widget_adaptor_action_add (GladeWidgetAdaptor *adaptor,
*/
gboolean
glade_widget_adaptor_pack_action_add (GladeWidgetAdaptor *adaptor,
- const gchar *action_path,
- const gchar *label,
- const gchar *stock,
- gboolean important)
+ 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);
@@ -3959,7 +3960,7 @@ glade_widget_adaptor_action_remove_real (GList **list,
*/
gboolean
glade_widget_adaptor_action_remove (GladeWidgetAdaptor *adaptor,
- const gchar *action_path)
+ 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 +3980,7 @@ glade_widget_adaptor_action_remove (GladeWidgetAdaptor *adaptor,
*/
gboolean
glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor *adaptor,
- const gchar *action_path)
+ const gchar *action_path)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (action_path != NULL, FALSE);
@@ -4050,8 +4051,8 @@ glade_widget_adaptor_pack_actions_new (GladeWidgetAdaptor *adaptor)
*/
void
glade_widget_adaptor_action_activate (GladeWidgetAdaptor *adaptor,
- GObject *object,
- const gchar *action_path)
+ GObject *object,
+ const gchar *action_path)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (object));
@@ -4071,9 +4072,9 @@ glade_widget_adaptor_action_activate (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor *adaptor,
- GObject *container,
- GObject *object,
- const gchar *action_path)
+ 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));
@@ -4099,8 +4100,8 @@ glade_widget_adaptor_child_action_activate (GladeWidgetAdaptor *adaptor,
*/
GtkWidget *
glade_widget_adaptor_action_submenu (GladeWidgetAdaptor *adaptor,
- GObject *object,
- const gchar *action_path)
+ 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);
@@ -4131,8 +4132,8 @@ glade_widget_adaptor_action_submenu (GladeWidgetAdaptor *adaptor,
*/
gboolean
glade_widget_adaptor_depends (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeWidget *another)
+ GladeWidget *widget,
+ GladeWidget *another)
{
return FALSE;
}
@@ -4148,8 +4149,8 @@ glade_widget_adaptor_depends (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4171,9 +4172,9 @@ glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_write_widget (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4196,9 +4197,9 @@ glade_widget_adaptor_write_widget (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_write_widget_after (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4221,8 +4222,8 @@ glade_widget_adaptor_write_widget_after (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_read_child (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4245,9 +4246,9 @@ glade_widget_adaptor_read_child (GladeWidgetAdaptor *adaptor,
*/
void
glade_widget_adaptor_write_child (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlContext *context,
- GladeXmlNode *node)
+ GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4272,7 +4273,7 @@ glade_widget_adaptor_write_child (GladeWidgetAdaptor *adaptor,
GladeEditorProperty *
glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor,
GladePropertyClass *klass,
- gboolean use_command)
+ gboolean use_command)
{
GladeEditorProperty *eprop;
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -4304,9 +4305,9 @@ glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor,
*/
GladeEditorProperty *
glade_widget_adaptor_create_eprop_by_name (GladeWidgetAdaptor *adaptor,
- const gchar *property_id,
- gboolean packing,
- gboolean use_command)
+ const gchar *property_id,
+ gboolean packing,
+ gboolean use_command)
{
GladePropertyClass *klass;
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
@@ -4339,7 +4340,7 @@ glade_widget_adaptor_create_eprop_by_name (GladeWidgetAdaptor *adaptor,
gchar *
glade_widget_adaptor_string_from_value (GladeWidgetAdaptor *adaptor,
GladePropertyClass *klass,
- const GValue *value)
+ 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);
@@ -4362,7 +4363,7 @@ glade_widget_adaptor_string_from_value (GladeWidgetAdaptor *adaptor,
*/
GladeSignalClass *
glade_widget_adaptor_get_signal_class (GladeWidgetAdaptor *adaptor,
- const gchar *name)
+ const gchar *name)
{
GList *list;
GladeSignalClass *signal;
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index 1fbe605..5f393c6 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -59,12 +59,12 @@
#include "glade-object-stub.h"
#include "glade-dnd.h"
-static void glade_widget_set_adaptor (GladeWidget * widget,
- GladeWidgetAdaptor * adaptor);
-static void glade_widget_set_properties (GladeWidget * widget,
- GList * properties);
-static void glade_widget_set_object (GladeWidget * gwidget,
- GObject * new_object);
+static void glade_widget_set_adaptor (GladeWidget *widget,
+ GladeWidgetAdaptor *adaptor);
+static void glade_widget_set_properties (GladeWidget *widget,
+ GList *properties);
+static void glade_widget_set_object (GladeWidget *gwidget,
+ GObject *new_object);
struct _GladeWidgetPrivate {
@@ -207,6 +207,7 @@ static GQuark glade_widget_name_quark = 0;
static void glade_widget_drag_init (_GladeDragInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GladeWidget, glade_widget, G_TYPE_INITIALLY_UNOWNED,
+ G_ADD_PRIVATE (GladeWidget)
G_IMPLEMENT_INTERFACE (GLADE_TYPE_DRAG,
glade_widget_drag_init))
@@ -214,8 +215,8 @@ G_DEFINE_TYPE_WITH_CODE (GladeWidget, glade_widget, G_TYPE_INITIALLY_UNOWNED,
GladeWidget class methods
*******************************************************************************/
static void
-glade_widget_set_packing_actions (GladeWidget * widget,
- GladeWidget * parent)
+glade_widget_set_packing_actions (GladeWidget *widget,
+ GladeWidget *parent)
{
if (widget->priv->packing_actions)
{
@@ -229,8 +230,8 @@ glade_widget_set_packing_actions (GladeWidget * widget,
}
static void
-glade_widget_add_child_impl (GladeWidget * widget,
- GladeWidget * child, gboolean at_mouse)
+glade_widget_add_child_impl (GladeWidget *widget,
+ GladeWidget *child, gboolean at_mouse)
{
g_object_ref (child);
@@ -266,7 +267,7 @@ glade_widget_add_child_impl (GladeWidget * widget,
}
static void
-glade_widget_remove_child_impl (GladeWidget * widget, GladeWidget * child)
+glade_widget_remove_child_impl (GladeWidget *widget, GladeWidget *child)
{
glade_widget_adaptor_remove (widget->priv->adaptor, widget->priv->object, child->priv->object);
@@ -276,8 +277,9 @@ glade_widget_remove_child_impl (GladeWidget * widget, GladeWidget * child)
}
static void
-glade_widget_replace_child_impl (GladeWidget * widget,
- GObject * old_object, GObject * new_object)
+glade_widget_replace_child_impl (GladeWidget *widget,
+ GObject *old_object,
+ GObject *new_object)
{
GladeWidget *gnew_widget = glade_widget_get_from_gobject (new_object);
GladeWidget *gold_widget = glade_widget_get_from_gobject (old_object);
@@ -319,7 +321,8 @@ glade_widget_replace_child_impl (GladeWidget * widget,
* Adds a signal handler for @widget
*/
void
-glade_widget_add_signal_handler (GladeWidget *widget, const GladeSignal *signal_handler)
+glade_widget_add_signal_handler (GladeWidget *widget,
+ const GladeSignal *signal_handler)
{
GPtrArray *signals;
GladeSignal *new_signal_handler;
@@ -355,8 +358,8 @@ glade_widget_add_signal_handler (GladeWidget *widget, const GladeSignal *signal_
*/
void
-glade_widget_remove_signal_handler (GladeWidget * widget,
- const GladeSignal * signal_handler)
+glade_widget_remove_signal_handler (GladeWidget *widget,
+ const GladeSignal *signal_handler)
{
GPtrArray *signals;
GladeSignal *tmp_signal_handler;
@@ -396,9 +399,9 @@ glade_widget_remove_signal_handler (GladeWidget * widget,
* Changes a #GladeSignal on @widget
*/
void
-glade_widget_change_signal_handler (GladeWidget * widget,
- const GladeSignal * old_signal_handler,
- const GladeSignal * new_signal_handler)
+glade_widget_change_signal_handler (GladeWidget *widget,
+ const GladeSignal *old_signal_handler,
+ const GladeSignal *new_signal_handler)
{
GPtrArray *signals;
GladeSignal *signal_handler_iter;
@@ -448,8 +451,8 @@ glade_widget_change_signal_handler (GladeWidget * widget,
}
static gboolean
-glade_widget_button_press_event_impl (GladeWidget * gwidget,
- GdkEvent * base_event)
+glade_widget_button_press_event_impl (GladeWidget *gwidget,
+ GdkEvent *base_event)
{
GtkWidget *widget;
GdkEventButton *event = (GdkEventButton *) base_event;
@@ -496,7 +499,7 @@ glade_widget_button_press_event_impl (GladeWidget * gwidget,
}
static gboolean
-glade_widget_event_impl (GladeWidget * gwidget, GdkEvent * event)
+glade_widget_event_impl (GladeWidget *gwidget, GdkEvent *event)
{
gboolean handled = FALSE;
@@ -537,7 +540,7 @@ glade_widget_event_impl (GladeWidget * gwidget, GdkEvent * event)
* Returns: whether the event was handled or not.
*/
gboolean
-glade_widget_event (GladeWidget * gwidget, GdkEvent * event)
+glade_widget_event (GladeWidget *gwidget, GdkEvent *event)
{
gboolean handled = FALSE;
@@ -569,8 +572,9 @@ glade_widget_event (GladeWidget * gwidget, GdkEvent * event)
* values currently in use.
*/
static GParameter *
-glade_widget_template_params (GladeWidget * widget,
- gboolean construct, guint * n_params)
+glade_widget_template_params (GladeWidget *widget,
+ gboolean construct,
+ guint *n_params)
{
GladeWidgetAdaptor *adaptor;
GArray *params;
@@ -653,7 +657,7 @@ glade_widget_template_params (GladeWidget * widget,
}
static void
-free_params (GParameter * params, guint n_params)
+free_params (GParameter *params, guint n_params)
{
gint i;
for (i = 0; i < n_params; i++)
@@ -663,8 +667,9 @@ free_params (GParameter * params, guint n_params)
}
static GObject *
-glade_widget_build_object (GladeWidget * widget,
- GladeWidget * template, GladeCreateReason reason)
+glade_widget_build_object (GladeWidget *widget,
+ GladeWidget *template,
+ GladeCreateReason reason)
{
GParameter *params;
GObject *object;
@@ -721,9 +726,11 @@ glade_widget_build_object (GladeWidget * widget,
* Returns: A newly allocated #GList of new #GladeProperty objects.
*/
GList *
-glade_widget_dup_properties (GladeWidget * dest_widget, GList * template_props,
- gboolean as_load, gboolean copy_parentless,
- gboolean exact)
+glade_widget_dup_properties (GladeWidget *dest_widget,
+ GList *template_props,
+ gboolean as_load,
+ gboolean copy_parentless,
+ gboolean exact)
{
GList *list, *properties = NULL;
@@ -777,7 +784,7 @@ glade_widget_dup_properties (GladeWidget * dest_widget, GList * template_props,
* style properties).
*/
void
-glade_widget_remove_property (GladeWidget * widget, const gchar * id_property)
+glade_widget_remove_property (GladeWidget *widget, const gchar *id_property)
{
GladeProperty *prop;
@@ -800,7 +807,7 @@ glade_widget_remove_property (GladeWidget * widget, const gchar * id_property)
}
static void
-glade_widget_set_catalog_defaults (GList * list)
+glade_widget_set_catalog_defaults (GList *list)
{
GList *l;
for (l = list; l && l->data; l = l->next)
@@ -818,7 +825,7 @@ glade_widget_set_catalog_defaults (GList * list)
}
static void
-glade_widget_sync_custom_props (GladeWidget * widget)
+glade_widget_sync_custom_props (GladeWidget *widget)
{
GList *l;
for (l = widget->priv->properties; l && l->data; l = l->next)
@@ -833,7 +840,7 @@ glade_widget_sync_custom_props (GladeWidget * widget)
}
static void
-glade_widget_sync_packing_props (GladeWidget * widget)
+glade_widget_sync_packing_props (GladeWidget *widget)
{
GList *l;
for (l = widget->priv->packing_properties; l && l->data; l = l->next)
@@ -845,9 +852,9 @@ glade_widget_sync_packing_props (GladeWidget * widget)
static GObject *
-glade_widget_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam * construct_properties)
+glade_widget_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
{
GladeWidget *gwidget;
GObject *ret_obj;
@@ -963,7 +970,7 @@ glade_widget_constructor (GType type,
}
static void
-glade_widget_finalize (GObject * object)
+glade_widget_finalize (GObject *object)
{
GladeWidget *widget = GLADE_WIDGET (object);
@@ -987,7 +994,7 @@ glade_widget_finalize (GObject * object)
}
static void
-reset_object_property (GladeProperty * property, GladeProject * project)
+reset_object_property (GladeProperty *property, GladeProject *project)
{
GladePropertyClass *pclass = glade_property_get_class (property);
@@ -996,7 +1003,7 @@ reset_object_property (GladeProperty * property, GladeProject * project)
}
static void
-glade_widget_dispose (GObject * object)
+glade_widget_dispose (GObject *object)
{
GladeWidget *widget = GLADE_WIDGET (object);
GList *children, *l;
@@ -1069,9 +1076,10 @@ glade_widget_dispose (GObject * object)
}
static void
-glade_widget_set_real_property (GObject * object,
- guint prop_id,
- const GValue * value, GParamSpec * pspec)
+glade_widget_set_real_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GladeWidget *widget;
@@ -1137,9 +1145,10 @@ glade_widget_set_real_property (GObject * object,
}
static void
-glade_widget_get_real_property (GObject * object,
- guint prop_id,
- GValue * value, GParamSpec * pspec)
+glade_widget_get_real_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GladeWidget *widget;
@@ -1203,11 +1212,9 @@ free_signals (GPtrArray *signals)
}
static void
-glade_widget_init (GladeWidget * widget)
+glade_widget_init (GladeWidget *widget)
{
- widget->priv = G_TYPE_INSTANCE_GET_PRIVATE (widget,
- GLADE_TYPE_WIDGET,
- GladeWidgetPrivate);
+ widget->priv = glade_widget_get_instance_private (widget);
widget->priv->adaptor = NULL;
widget->priv->project = NULL;
@@ -1321,7 +1328,7 @@ glade_widget_drag_init (_GladeDragInterface *iface)
}
static void
-glade_widget_class_init (GladeWidgetClass * klass)
+glade_widget_class_init (GladeWidgetClass *klass)
{
GObjectClass *object_class;
@@ -1550,17 +1557,15 @@ glade_widget_class_init (GladeWidgetClass * klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
- g_type_class_add_private (klass, sizeof (GladeWidgetPrivate));
}
/*******************************************************************************
Static stuff....
*******************************************************************************/
static void
-glade_widget_copy_packing_props (GladeWidget * parent,
- GladeWidget * child,
- GladeWidget * template_widget)
+glade_widget_copy_packing_props (GladeWidget *parent,
+ GladeWidget *child,
+ GladeWidget *template_widget)
{
GladeProperty *dup_prop, *orig_prop;
GList *l;
@@ -1582,8 +1587,8 @@ glade_widget_copy_packing_props (GladeWidget * parent,
}
static void
-glade_widget_set_default_packing_properties (GladeWidget * container,
- GladeWidget * child)
+glade_widget_set_default_packing_properties (GladeWidget *container,
+ GladeWidget *child)
{
GladePropertyClass *property_class;
const GList *l;
@@ -1635,9 +1640,10 @@ glade_widget_get_internal_child (GladeWidget *main_target,
}
static GladeWidget *
-glade_widget_dup_internal (GladeWidget * main_target,
- GladeWidget * parent,
- GladeWidget * template_widget, gboolean exact)
+glade_widget_dup_internal (GladeWidget *main_target,
+ GladeWidget *parent,
+ GladeWidget *template_widget,
+ gboolean exact)
{
GladeWidget *gwidget = NULL;
GList *children;
@@ -1780,7 +1786,7 @@ typedef struct
} GladeChildExtract;
static GList *
-glade_widget_extract_children (GladeWidget * gwidget)
+glade_widget_extract_children (GladeWidget *gwidget)
{
GladeChildExtract *extract;
GList *extract_list = NULL;
@@ -1843,7 +1849,7 @@ glade_widget_extract_children (GladeWidget * gwidget)
}
static void
-glade_widget_insert_children (GladeWidget * gwidget, GList * children)
+glade_widget_insert_children (GladeWidget *gwidget, GList *children)
{
GladeChildExtract *extract;
GladeWidget *gchild;
@@ -1946,7 +1952,7 @@ glade_widget_insert_children (GladeWidget * gwidget, GList * children)
}
static void
-glade_widget_set_properties (GladeWidget * widget, GList * properties)
+glade_widget_set_properties (GladeWidget *widget, GList *properties)
{
GladeProperty *property;
GList *list;
@@ -1981,7 +1987,7 @@ glade_widget_set_properties (GladeWidget * widget, GList * properties)
}
static void
-glade_widget_set_adaptor (GladeWidget * widget, GladeWidgetAdaptor * adaptor)
+glade_widget_set_adaptor (GladeWidget *widget, GladeWidgetAdaptor *adaptor)
{
GladePropertyClass *property_class;
GladeProperty *property;
@@ -2023,8 +2029,8 @@ glade_widget_set_adaptor (GladeWidget * widget, GladeWidgetAdaptor * adaptor)
* child type for this widget of this container.
*/
static GList *
-glade_widget_create_packing_properties (GladeWidget * container,
- GladeWidget * widget)
+glade_widget_create_packing_properties (GladeWidget *container,
+ GladeWidget *widget)
{
GladePropertyClass *property_class;
GladeProperty *property;
@@ -2048,7 +2054,7 @@ glade_widget_create_packing_properties (GladeWidget * container,
/* Private API */
GList *
-_glade_widget_peek_prop_refs (GladeWidget *widget)
+_glade_widget_peek_prop_refs (GladeWidget *widget)
{
return widget->priv->prop_refs;
}
@@ -2135,7 +2141,7 @@ glade_widget_hide (GladeWidget *widget)
* reffer to this object.
*/
void
-glade_widget_add_prop_ref (GladeWidget * widget, GladeProperty * property)
+glade_widget_add_prop_ref (GladeWidget *widget, GladeProperty *property)
{
GladePropertyClass *pclass;
@@ -2171,7 +2177,7 @@ glade_widget_add_prop_ref (GladeWidget * widget, GladeProperty * property)
* reffer to this object.
*/
void
-glade_widget_remove_prop_ref (GladeWidget * widget, GladeProperty * property)
+glade_widget_remove_prop_ref (GladeWidget *widget, GladeProperty *property)
{
GladePropertyClass *pclass;
@@ -2191,7 +2197,7 @@ glade_widget_remove_prop_ref (GladeWidget * widget, GladeProperty * property)
}
GList *
-glade_widget_list_prop_refs (GladeWidget *widget)
+glade_widget_list_prop_refs (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
@@ -2200,7 +2206,7 @@ glade_widget_list_prop_refs (GladeWidget *widget)
GladeProperty *
-glade_widget_get_parentless_widget_ref (GladeWidget * widget)
+glade_widget_get_parentless_widget_ref (GladeWidget *widget)
{
GladePropertyClass *pclass;
GladeProperty *property;
@@ -2222,7 +2228,7 @@ glade_widget_get_parentless_widget_ref (GladeWidget * widget)
GList *
-glade_widget_get_parentless_reffed_widgets (GladeWidget * widget)
+glade_widget_get_parentless_reffed_widgets (GladeWidget *widget)
{
GladeProperty *property = NULL;
GladePropertyClass *pclass;
@@ -2250,8 +2256,9 @@ glade_widget_get_parentless_reffed_widgets (GladeWidget * widget)
}
static void
-glade_widget_accum_signal_foreach (const gchar * key,
- GPtrArray * signals, GList ** list)
+glade_widget_accum_signal_foreach (const gchar *key,
+ GPtrArray *signals,
+ GList **list)
{
GladeSignal *signal;
gint i;
@@ -2273,7 +2280,7 @@ glade_widget_accum_signal_foreach (const gchar * key,
* must call g_list_free() to free the list.
*/
GList *
-glade_widget_get_signal_list (GladeWidget * widget)
+glade_widget_get_signal_list (GladeWidget *widget)
{
GList *signals = NULL;
@@ -2286,8 +2293,9 @@ glade_widget_get_signal_list (GladeWidget * widget)
}
static void
-glade_widget_copy_signal_foreach (const gchar * key,
- GPtrArray * signals, GladeWidget * dest)
+glade_widget_copy_signal_foreach (const gchar *key,
+ GPtrArray *signals,
+ GladeWidget *dest)
{
GladeSignal *signal;
gint i;
@@ -2308,7 +2316,7 @@ glade_widget_copy_signal_foreach (const gchar * key,
* matching signals in @template_widget
*/
void
-glade_widget_copy_signals (GladeWidget * widget, GladeWidget * template_widget)
+glade_widget_copy_signals (GladeWidget *widget, GladeWidget *template_widget)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (GLADE_IS_WIDGET (template_widget));
@@ -2328,9 +2336,10 @@ glade_widget_copy_signals (GladeWidget * widget, GladeWidget * template_widget)
* matching properties in @template_widget
*/
void
-glade_widget_copy_properties (GladeWidget * widget,
- GladeWidget * template_widget,
- gboolean copy_parentless, gboolean exact)
+glade_widget_copy_properties (GladeWidget *widget,
+ GladeWidget *template_widget,
+ gboolean copy_parentless,
+ gboolean exact)
{
GList *l;
@@ -2398,9 +2407,9 @@ glade_widget_copy_properties (GladeWidget * widget,
* Returns: whether @child can be added to @widget.
*/
gboolean
-glade_widget_add_verify (GladeWidget *widget,
- GladeWidget *child,
- gboolean user_feedback)
+glade_widget_add_verify (GladeWidget *widget,
+ GladeWidget *child,
+ gboolean user_feedback)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
g_return_val_if_fail (GLADE_IS_WIDGET (child), FALSE);
@@ -2421,8 +2430,9 @@ glade_widget_add_verify (GladeWidget *widget,
* Adds @child to @parent in a generic way for this #GladeWidget parent.
*/
void
-glade_widget_add_child (GladeWidget * parent,
- GladeWidget * child, gboolean at_mouse)
+glade_widget_add_child (GladeWidget *parent,
+ GladeWidget *child,
+ gboolean at_mouse)
{
g_return_if_fail (GLADE_IS_WIDGET (parent));
g_return_if_fail (GLADE_IS_WIDGET (child));
@@ -2438,7 +2448,7 @@ glade_widget_add_child (GladeWidget * parent,
* Removes @child from @parent in a generic way for this #GladeWidget parent.
*/
void
-glade_widget_remove_child (GladeWidget * parent, GladeWidget * child)
+glade_widget_remove_child (GladeWidget *parent, GladeWidget *child)
{
g_return_if_fail (GLADE_IS_WIDGET (parent));
g_return_if_fail (GLADE_IS_WIDGET (child));
@@ -2459,7 +2469,7 @@ glade_widget_remove_child (GladeWidget * parent, GladeWidget * child)
* Returns: The newly created #GladeWidget
*/
GladeWidget *
-glade_widget_dup (GladeWidget * template_widget, gboolean exact)
+glade_widget_dup (GladeWidget *template_widget, gboolean exact)
{
GladeWidget *widget;
@@ -2489,7 +2499,7 @@ typedef struct
*
*/
void
-glade_widget_rebuild (GladeWidget * gwidget)
+glade_widget_rebuild (GladeWidget *gwidget)
{
GObject *new_object, *old_object;
GladeWidgetAdaptor *adaptor;
@@ -2676,7 +2686,7 @@ glade_widget_rebuild (GladeWidget * gwidget)
* Returns: A #GPtrArray of #GladeSignal for @signal_name
*/
GPtrArray *
-glade_widget_list_signal_handlers (GladeWidget * widget, const gchar * signal_name) /* array of
GladeSignal* */
+glade_widget_list_signal_handlers (GladeWidget *widget, const gchar *signal_name) /* array of
GladeSignal* */
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return g_hash_table_lookup (widget->priv->signals, signal_name);
@@ -2690,7 +2700,7 @@ glade_widget_list_signal_handlers (GladeWidget * widget, const gchar * signal_na
* Sets @widget's name to @name.
*/
void
-glade_widget_set_name (GladeWidget * widget, const gchar * name)
+glade_widget_set_name (GladeWidget *widget, const gchar *name)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
if (widget->priv->name != name)
@@ -2710,7 +2720,7 @@ glade_widget_set_name (GladeWidget * widget, const gchar * name)
* Returns: a pointer to @widget's name
*/
const gchar *
-glade_widget_get_name (GladeWidget * widget)
+glade_widget_get_name (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return widget->priv->name;
@@ -2727,8 +2737,7 @@ glade_widget_get_name (GladeWidget * widget)
* Only one widget in a project should be composite.
*/
void
-glade_widget_set_is_composite (GladeWidget *widget,
- gboolean composite)
+glade_widget_set_is_composite (GladeWidget *widget, gboolean composite)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -2775,7 +2784,7 @@ glade_widget_get_is_composite (GladeWidget *widget)
* Sets the internal name of @widget to @internal
*/
void
-glade_widget_set_internal (GladeWidget * widget, const gchar * internal)
+glade_widget_set_internal (GladeWidget *widget, const gchar *internal)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
if (widget->priv->internal != internal)
@@ -2793,7 +2802,7 @@ glade_widget_set_internal (GladeWidget * widget, const gchar * internal)
* Returns: the internal name of @widget
*/
G_CONST_RETURN gchar *
-glade_widget_get_internal (GladeWidget * widget)
+glade_widget_get_internal (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return widget->priv->internal;
@@ -2806,7 +2815,7 @@ glade_widget_get_internal (GladeWidget * widget)
* Returns: the #GladeWidgetAdaptor of @widget
*/
GladeWidgetAdaptor *
-glade_widget_get_adaptor (GladeWidget * widget)
+glade_widget_get_adaptor (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return widget->priv->adaptor;
@@ -2820,7 +2829,7 @@ glade_widget_get_adaptor (GladeWidget * widget)
* Makes @widget belong to @project.
*/
void
-glade_widget_set_project (GladeWidget * widget, GladeProject * project)
+glade_widget_set_project (GladeWidget *widget, GladeProject *project)
{
if (widget->priv->project != project)
{
@@ -2836,15 +2845,14 @@ glade_widget_set_project (GladeWidget * widget, GladeProject * project)
* Returns: the #GladeProject that @widget belongs to
*/
GladeProject *
-glade_widget_get_project (GladeWidget * widget)
+glade_widget_get_project (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return widget->priv->project;
}
void
-glade_widget_set_in_project (GladeWidget *widget,
- gboolean in_project)
+glade_widget_set_in_project (GladeWidget *widget, gboolean in_project)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -2852,7 +2860,7 @@ glade_widget_set_in_project (GladeWidget *widget,
}
gboolean
-glade_widget_in_project (GladeWidget *widget)
+glade_widget_in_project (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
@@ -2867,7 +2875,7 @@ glade_widget_in_project (GladeWidget *widget)
* Returns: the #GladeProperty in @widget named @id_property
*/
GladeProperty *
-glade_widget_get_property (GladeWidget * widget, const gchar * id_property)
+glade_widget_get_property (GladeWidget *widget, const gchar *id_property)
{
GladeProperty *property;
@@ -2889,7 +2897,7 @@ glade_widget_get_property (GladeWidget * widget, const gchar * id_property)
* Returns: the #GladeProperty in @widget named @id_property
*/
GladeProperty *
-glade_widget_get_pack_property (GladeWidget * widget, const gchar * id_property)
+glade_widget_get_pack_property (GladeWidget *widget, const gchar *id_property)
{
GladeProperty *property;
@@ -2916,7 +2924,7 @@ glade_widget_get_pack_property (GladeWidget * widget, const gchar * id_property)
*
*/
gboolean
-glade_widget_property_get (GladeWidget * widget, const gchar * id_property, ...)
+glade_widget_property_get (GladeWidget *widget, const gchar *id_property, ...)
{
GladeProperty *property;
va_list vl;
@@ -2945,7 +2953,7 @@ glade_widget_property_get (GladeWidget * widget, const gchar * id_property, ...)
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_property_set (GladeWidget * widget, const gchar * id_property, ...)
+glade_widget_property_set (GladeWidget *widget, const gchar *id_property, ...)
{
GladeProperty *property;
va_list vl;
@@ -2974,8 +2982,9 @@ glade_widget_property_set (GladeWidget * widget, const gchar * id_property, ...)
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_pack_property_get (GladeWidget * widget,
- const gchar * id_property, ...)
+glade_widget_pack_property_get (GladeWidget *widget,
+ const gchar *id_property,
+ ...)
{
GladeProperty *property;
va_list vl;
@@ -3004,8 +3013,9 @@ glade_widget_pack_property_get (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_pack_property_set (GladeWidget * widget,
- const gchar * id_property, ...)
+glade_widget_pack_property_set (GladeWidget *widget,
+ const gchar *id_property,
+ ...)
{
GladeProperty *property;
va_list vl;
@@ -3036,9 +3046,10 @@ glade_widget_pack_property_set (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_property_set_sensitive (GladeWidget * widget,
- const gchar * id_property,
- gboolean sensitive, const gchar * reason)
+glade_widget_property_set_sensitive (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean sensitive,
+ const gchar *reason)
{
GladeProperty *property;
@@ -3066,10 +3077,10 @@ glade_widget_property_set_sensitive (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_pack_property_set_sensitive (GladeWidget * widget,
- const gchar * id_property,
- gboolean sensitive,
- const gchar * reason)
+glade_widget_pack_property_set_sensitive (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean sensitive,
+ const gchar *reason)
{
GladeProperty *property;
@@ -3096,8 +3107,9 @@ glade_widget_pack_property_set_sensitive (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_property_set_enabled (GladeWidget * widget,
- const gchar * id_property, gboolean enabled)
+glade_widget_property_set_enabled (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean enabled)
{
GladeProperty *property;
@@ -3124,9 +3136,9 @@ glade_widget_property_set_enabled (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_pack_property_set_enabled (GladeWidget * widget,
- const gchar * id_property,
- gboolean enabled)
+glade_widget_pack_property_set_enabled (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean enabled)
{
GladeProperty *property;
@@ -3156,9 +3168,9 @@ glade_widget_pack_property_set_enabled (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_property_set_save_always (GladeWidget * widget,
- const gchar * id_property,
- gboolean setting)
+glade_widget_property_set_save_always (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean setting)
{
GladeProperty *property;
@@ -3188,9 +3200,9 @@ glade_widget_property_set_save_always (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_pack_property_set_save_always (GladeWidget * widget,
- const gchar * id_property,
- gboolean setting)
+glade_widget_pack_property_set_save_always (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean setting)
{
GladeProperty *property;
@@ -3254,9 +3266,9 @@ glade_widget_property_string (GladeWidget *widget,
* Returns: A newly allocated string representing @id_property
*/
gchar *
-glade_widget_pack_property_string (GladeWidget * widget,
- const gchar * id_property,
- const GValue * value)
+glade_widget_pack_property_string (GladeWidget *widget,
+ const gchar *id_property,
+ const GValue *value)
{
GladeProperty *property;
GladePropertyClass *pclass;
@@ -3287,7 +3299,7 @@ glade_widget_pack_property_string (GladeWidget * widget,
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_property_reset (GladeWidget * widget, const gchar * id_property)
+glade_widget_property_reset (GladeWidget *widget, const gchar *id_property)
{
GladeProperty *property;
@@ -3311,8 +3323,8 @@ glade_widget_property_reset (GladeWidget * widget, const gchar * id_property)
* Returns: whether @id_property was found or not.
*/
gboolean
-glade_widget_pack_property_reset (GladeWidget * widget,
- const gchar * id_property)
+glade_widget_pack_property_reset (GladeWidget *widget,
+ const gchar *id_property)
{
GladeProperty *property;
@@ -3327,9 +3339,9 @@ glade_widget_pack_property_reset (GladeWidget * widget,
}
static gboolean
-glade_widget_property_default_common (GladeWidget * widget,
- const gchar * id_property,
- gboolean original)
+glade_widget_property_default_common (GladeWidget *widget,
+ const gchar *id_property,
+ gboolean original)
{
GladeProperty *property;
@@ -3351,7 +3363,7 @@ glade_widget_property_default_common (GladeWidget * widget,
* currently set to it's default value.
*/
gboolean
-glade_widget_property_default (GladeWidget * widget, const gchar * id_property)
+glade_widget_property_default (GladeWidget *widget, const gchar *id_property)
{
return glade_widget_property_default_common (widget, id_property, FALSE);
}
@@ -3365,8 +3377,8 @@ glade_widget_property_default (GladeWidget * widget, const gchar * id_property)
* currently set to it's original default value.
*/
gboolean
-glade_widget_property_original_default (GladeWidget * widget,
- const gchar * id_property)
+glade_widget_property_original_default (GladeWidget *widget,
+ const gchar *id_property)
{
return glade_widget_property_default_common (widget, id_property, TRUE);
}
@@ -3380,8 +3392,8 @@ glade_widget_property_original_default (GladeWidget * widget,
* currently set to it's default value.
*/
gboolean
-glade_widget_pack_property_default (GladeWidget * widget,
- const gchar * id_property)
+glade_widget_pack_property_default (GladeWidget *widget,
+ const gchar *id_property)
{
GladeProperty *property;
@@ -3404,9 +3416,9 @@ glade_widget_pack_property_default (GladeWidget * widget,
* the runtime object of @widget.
*/
void
-glade_widget_object_set_property (GladeWidget * widget,
- const gchar * property_name,
- const GValue * value)
+glade_widget_object_set_property (GladeWidget *widget,
+ const gchar *property_name,
+ const GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (property_name != NULL && value != NULL);
@@ -3426,8 +3438,9 @@ glade_widget_object_set_property (GladeWidget * widget,
* the runtime object of @widget and sets it in @value.
*/
void
-glade_widget_object_get_property (GladeWidget * widget,
- const gchar * property_name, GValue * value)
+glade_widget_object_get_property (GladeWidget *widget,
+ const gchar *property_name,
+ GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (property_name != NULL && value != NULL);
@@ -3491,9 +3504,10 @@ glade_widget_child_set_property (GladeWidget *widget,
* Gets @child's packing property identified by @property_name.
*/
void
-glade_widget_child_get_property (GladeWidget * widget,
- GladeWidget * child,
- const gchar * property_name, GValue * value)
+glade_widget_child_get_property (GladeWidget *widget,
+ GladeWidget *child,
+ const gchar *property_name,
+ GValue *value)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (GLADE_IS_WIDGET (child));
@@ -3506,7 +3520,7 @@ glade_widget_child_get_property (GladeWidget * widget,
}
static void
-glade_widget_add_events (GtkWidget * widget)
+glade_widget_add_events (GtkWidget *widget)
{
GList *children, *list;
@@ -3531,7 +3545,7 @@ glade_widget_add_events (GtkWidget * widget)
}
static void
-glade_widget_set_object (GladeWidget * gwidget, GObject * new_object)
+glade_widget_set_object (GladeWidget *gwidget, GObject *new_object)
{
GObject *old_object;
@@ -3605,7 +3619,7 @@ glade_widget_set_object (GladeWidget * gwidget, GObject * new_object)
* Returns: the #GObject associated with @widget
*/
GObject *
-glade_widget_get_object (GladeWidget * widget)
+glade_widget_get_object (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return widget->priv->object;
@@ -3618,7 +3632,7 @@ glade_widget_get_object (GladeWidget * widget)
* Returns: The parenting #GladeWidget
*/
GladeWidget *
-glade_widget_get_parent (GladeWidget * widget)
+glade_widget_get_parent (GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
return widget->priv->parent;
@@ -3632,7 +3646,7 @@ glade_widget_get_parent (GladeWidget * widget)
* sets the parenting #GladeWidget
*/
void
-glade_widget_set_parent (GladeWidget * widget, GladeWidget * parent)
+glade_widget_set_parent (GladeWidget *widget, GladeWidget *parent)
{
GladeWidget *old_parent;
@@ -3671,8 +3685,7 @@ glade_widget_set_parent (GladeWidget * widget, GladeWidget * parent)
* Returns: The child of widget or NULL if it was not found.
*/
GladeWidget *
-glade_widget_find_child (GladeWidget *widget,
- const gchar *name)
+glade_widget_find_child (GladeWidget *widget, const gchar *name)
{
GList *adapter_children;
GladeWidget *real_child = NULL;
@@ -3715,7 +3728,7 @@ glade_widget_find_child (GladeWidget *widget,
* exposed for Glade configuration</para></note>
*/
GList *
-glade_widget_get_children (GladeWidget * widget)
+glade_widget_get_children (GladeWidget *widget)
{
GList *adapter_children;
GList *real_children = NULL;
@@ -3747,7 +3760,7 @@ glade_widget_get_children (GladeWidget * widget)
* Returns: The toplevel #GladeWidget in the hierarchy (or @widget)
*/
GladeWidget *
-glade_widget_get_toplevel (GladeWidget * widget)
+glade_widget_get_toplevel (GladeWidget *widget)
{
GladeWidget *toplevel = widget;
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
@@ -3769,8 +3782,8 @@ glade_widget_get_toplevel (GladeWidget * widget)
* has changed, the current list is freed and replaced.
*/
void
-glade_widget_set_packing_properties (GladeWidget * widget,
- GladeWidget * container)
+glade_widget_set_packing_properties (GladeWidget *widget,
+ GladeWidget *container)
{
GList *list;
@@ -3848,7 +3861,7 @@ glade_widget_set_packing_properties (GladeWidget * widget,
* or any decendants that implement the @type interface
*/
gboolean
-glade_widget_has_decendant (GladeWidget * widget, GType type)
+glade_widget_has_decendant (GladeWidget *widget, GType type)
{
GladeWidget *child;
GList *children, *l;
@@ -3881,8 +3894,9 @@ glade_widget_has_decendant (GladeWidget * widget, GType type)
* Note that both GObjects must be owned by a GladeWidget.
*/
void
-glade_widget_replace (GladeWidget * parent, GObject * old_object,
- GObject * new_object)
+glade_widget_replace (GladeWidget *parent,
+ GObject *old_object,
+ GObject *new_object)
{
g_return_if_fail (G_IS_OBJECT (old_object));
g_return_if_fail (G_IS_OBJECT (new_object));
@@ -3896,10 +3910,10 @@ glade_widget_replace (GladeWidget * parent, GObject * old_object,
*******************************************************************************/
/* XXX Doc me !*/
void
-glade_widget_write_special_child_prop (GladeWidget * parent,
- GObject * object,
- GladeXmlContext * context,
- GladeXmlNode * node)
+glade_widget_write_special_child_prop (GladeWidget *parent,
+ GObject *object,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
gchar *buff, *special_child_type;
@@ -3916,8 +3930,9 @@ glade_widget_write_special_child_prop (GladeWidget * parent,
/* XXX Doc me ! */
void
-glade_widget_set_child_type_from_node (GladeWidget * parent,
- GObject * child, GladeXmlNode * node)
+glade_widget_set_child_type_from_node (GladeWidget *parent,
+ GObject *child,
+ GladeXmlNode *node)
{
gchar *special_child_type, *value;
@@ -3947,7 +3962,7 @@ glade_widget_set_child_type_from_node (GladeWidget * parent,
* Reads in a child widget from the xml (handles 'child' tag)
*/
void
-glade_widget_read_child (GladeWidget * widget, GladeXmlNode * node)
+glade_widget_read_child (GladeWidget *widget, GladeXmlNode *node)
{
if (glade_project_load_cancelled (widget->priv->project))
return;
@@ -3964,9 +3979,10 @@ glade_widget_read_child (GladeWidget * widget, GladeXmlNode * node)
* Returns: a new #GladeWidget for @project, based on @node
*/
GladeWidget *
-glade_widget_read (GladeProject * project,
- GladeWidget * parent,
- GladeXmlNode * node, const gchar * internal)
+glade_widget_read (GladeProject *project,
+ GladeWidget *parent,
+ GladeXmlNode *node,
+ const gchar *internal)
{
GladeWidgetAdaptor *adaptor;
GladeWidget *widget = NULL;
@@ -4088,9 +4104,10 @@ glade_widget_read (GladeProject * project,
* of packing properties and special child types.
*/
void
-glade_widget_write_child (GladeWidget * widget,
- GladeWidget * child,
- GladeXmlContext * context, GladeXmlNode * node)
+glade_widget_write_child (GladeWidget *widget,
+ GladeWidget *child,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (GLADE_IS_WIDGET (child));
@@ -4110,9 +4127,10 @@ glade_widget_write_child (GladeWidget * widget,
* Writes out a placeholder to the xml
*/
void
-glade_widget_write_placeholder (GladeWidget * parent,
- GObject * object,
- GladeXmlContext * context, GladeXmlNode * node)
+glade_widget_write_placeholder (GladeWidget *parent,
+ GObject *object,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GladeXmlNode *child_node, *packing_node, *placeholder_node;
@@ -4136,8 +4154,7 @@ glade_widget_write_placeholder (GladeWidget * parent,
}
static gint
-signal_compare (GladeSignal *signal_a,
- GladeSignal *signal_b)
+signal_compare (GladeSignal *signal_a, GladeSignal *signal_b)
{
const gchar *handler_a;
const gchar *handler_b;
@@ -4198,8 +4215,9 @@ signal_compare (GladeSignal *signal_a,
}
void
-glade_widget_write_signals (GladeWidget * widget,
- GladeXmlContext * context, GladeXmlNode * node)
+glade_widget_write_signals (GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GHashTableIter iter;
gpointer key, value;
@@ -4246,8 +4264,9 @@ glade_widget_write_signals (GladeWidget * widget,
* and appends the created #GladeXmlNode to @node.
*/
void
-glade_widget_write (GladeWidget * widget,
- GladeXmlContext * context, GladeXmlNode * node)
+glade_widget_write (GladeWidget *widget,
+ GladeXmlContext *context,
+ GladeXmlNode *node)
{
GObject *object = glade_widget_get_object (widget);
GladeXmlNode *widget_node;
@@ -4328,7 +4347,7 @@ glade_widget_write (GladeWidget * widget,
* grandchild, great grandchild, etc.
**/
gboolean
-glade_widget_is_ancestor (GladeWidget * widget, GladeWidget * ancestor)
+glade_widget_is_ancestor (GladeWidget *widget, GladeWidget *ancestor)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
g_return_val_if_fail (GLADE_IS_WIDGET (ancestor), FALSE);
@@ -4359,8 +4378,7 @@ glade_widget_is_ancestor (GladeWidget * widget, GladeWidget * ancestor)
* Deprecated: 3.18
**/
gboolean
-glade_widget_depends (GladeWidget *widget,
- GladeWidget *other)
+glade_widget_depends (GladeWidget *widget, GladeWidget *other)
{
return FALSE;
}
@@ -4448,7 +4466,7 @@ glade_widget_pop_superuser (void)
* Returns: whether to use placeholders for this relationship.
*/
gboolean
-glade_widget_placeholder_relation (GladeWidget * parent, GladeWidget * widget)
+glade_widget_placeholder_relation (GladeWidget *parent, GladeWidget *widget)
{
g_return_val_if_fail (GLADE_IS_WIDGET (parent), FALSE);
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
@@ -4459,7 +4477,7 @@ glade_widget_placeholder_relation (GladeWidget * parent, GladeWidget * widget)
}
static GladeWidgetAction *
-glade_widget_action_lookup (GList *actions, const gchar * path)
+glade_widget_action_lookup (GList *actions, const gchar *path)
{
GList *l;
@@ -4491,7 +4509,7 @@ glade_widget_action_lookup (GList *actions, const gchar * path)
* Returns: the action or NULL if not found.
*/
GladeWidgetAction *
-glade_widget_get_action (GladeWidget * widget, const gchar * action_path)
+glade_widget_get_action (GladeWidget *widget, const gchar *action_path)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
g_return_val_if_fail (action_path != NULL, NULL);
@@ -4509,7 +4527,7 @@ glade_widget_get_action (GladeWidget * widget, const gchar * action_path)
* Returns: the action or NULL if not found.
*/
GladeWidgetAction *
-glade_widget_get_pack_action (GladeWidget * widget, const gchar * action_path)
+glade_widget_get_pack_action (GladeWidget *widget, const gchar *action_path)
{
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
g_return_val_if_fail (action_path != NULL, NULL);
@@ -4546,9 +4564,9 @@ glade_widget_get_pack_actions (GladeWidget *widget)
* Returns: whether @action_path was found or not.
*/
gboolean
-glade_widget_set_action_sensitive (GladeWidget * widget,
- const gchar * action_path,
- gboolean sensitive)
+glade_widget_set_action_sensitive (GladeWidget *widget,
+ const gchar *action_path,
+ gboolean sensitive)
{
GladeWidgetAction *action;
@@ -4573,9 +4591,9 @@ glade_widget_set_action_sensitive (GladeWidget * widget,
* Returns: whether @action_path was found or not.
*/
gboolean
-glade_widget_set_pack_action_sensitive (GladeWidget * widget,
- const gchar * action_path,
- gboolean sensitive)
+glade_widget_set_pack_action_sensitive (GladeWidget *widget,
+ const gchar *action_path,
+ gboolean sensitive)
{
GladeWidgetAction *action;
@@ -4658,9 +4676,10 @@ glade_widget_set_pack_action_visible (GladeWidget *widget,
* Returns: A newly created and connected GladeEditorProperty
*/
GladeEditorProperty *
-glade_widget_create_editor_property (GladeWidget * widget,
- const gchar * property,
- gboolean packing, gboolean use_command)
+glade_widget_create_editor_property (GladeWidget *widget,
+ const gchar *property,
+ gboolean packing,
+ gboolean use_command)
{
GladeEditorProperty *eprop;
GladeProperty *prop;
@@ -4690,7 +4709,7 @@ glade_widget_create_editor_property (GladeWidget * widget,
* Returns: A newly allocated string
*/
gchar *
-glade_widget_generate_path_name (GladeWidget * widget)
+glade_widget_generate_path_name (GladeWidget *widget)
{
GString *string;
GladeWidget *iter;
@@ -4718,7 +4737,7 @@ glade_widget_generate_path_name (GladeWidget * widget)
* This function will update the widget's support warning.
*/
void
-glade_widget_verify (GladeWidget *widget)
+glade_widget_verify (GladeWidget *widget)
{
gchar *warning = NULL;
GList *warn_properties = NULL;
@@ -4839,7 +4858,7 @@ glade_widget_verify (GladeWidget *widget)
}
void
-glade_widget_set_support_warning (GladeWidget * widget, const gchar * warning)
+glade_widget_set_support_warning (GladeWidget *widget, const gchar *warning)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
@@ -4873,7 +4892,7 @@ glade_widget_support_warning (GladeWidget *widget)
*
*/
void
-glade_widget_lock (GladeWidget * widget, GladeWidget * locked)
+glade_widget_lock (GladeWidget *widget, GladeWidget *locked)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
g_return_if_fail (GLADE_IS_WIDGET (locked));
@@ -4892,7 +4911,7 @@ glade_widget_lock (GladeWidget * widget, GladeWidget * locked)
*
*/
void
-glade_widget_unlock (GladeWidget * widget)
+glade_widget_unlock (GladeWidget *widget)
{
GladeWidget *lock;
@@ -4933,7 +4952,7 @@ glade_widget_list_locked_widgets (GladeWidget *widget)
*
*/
void
-glade_widget_support_changed (GladeWidget * widget)
+glade_widget_support_changed (GladeWidget *widget)
{
g_return_if_fail (GLADE_IS_WIDGET (widget));
diff --git a/gladeui/glade-xml-utils.c b/gladeui/glade-xml-utils.c
index 576ab21..45489cb 100644
--- a/gladeui/glade-xml-utils.c
+++ b/gladeui/glade-xml-utils.c
@@ -63,7 +63,7 @@ struct _GladeXmlContext
static gchar *
-claim_string (xmlChar * string)
+claim_string (xmlChar *string)
{
gchar *ret;
ret = g_strdup (CAST_BAD (string));
@@ -80,8 +80,7 @@ claim_string (xmlChar * string)
* Sets the property @name in @node_in to @val
*/
void
-glade_xml_set_value (GladeXmlNode * node_in, const gchar * name,
- const gchar * val)
+glade_xml_set_value (GladeXmlNode *node_in, const gchar *name, const gchar *val)
{
xmlNodePtr node = (xmlNodePtr) node_in;
xmlChar *ret;
@@ -104,7 +103,7 @@ glade_xml_set_value (GladeXmlNode * node_in, const gchar * name,
* Returns: A newly allocated string
*/
gchar *
-glade_xml_get_content (GladeXmlNode * node_in)
+glade_xml_get_content (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
xmlChar *val = xmlNodeGetContent (node);
@@ -120,7 +119,7 @@ glade_xml_get_content (GladeXmlNode * node_in)
* Sets the content of @node to @content.
*/
void
-glade_xml_set_content (GladeXmlNode * node_in, const gchar * content)
+glade_xml_set_content (GladeXmlNode *node_in, const gchar *content)
{
xmlNodePtr node = (xmlNodePtr) node_in;
xmlChar *content_encoded;
@@ -142,7 +141,7 @@ glade_xml_set_content (GladeXmlNode * node_in, const gchar * content)
*
*/
static gchar *
-glade_xml_get_value (xmlNodePtr node, const gchar * name)
+glade_xml_get_value (xmlNodePtr node, const gchar *name)
{
xmlNodePtr child;
gchar *ret = NULL;
@@ -162,7 +161,7 @@ glade_xml_get_value (xmlNodePtr node, const gchar * name)
* Returns: %TRUE if @node_in's name is equal to @name, %FALSE otherwise
*/
gboolean
-glade_xml_node_verify_silent (GladeXmlNode * node_in, const gchar * name)
+glade_xml_node_verify_silent (GladeXmlNode *node_in, const gchar *name)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -184,7 +183,7 @@ glade_xml_node_verify_silent (GladeXmlNode * node_in, const gchar * name)
* Returns: %TRUE if @node_in's name is equal to @name, %FALSE otherwise
*/
gboolean
-glade_xml_node_verify (GladeXmlNode * node_in, const gchar * name)
+glade_xml_node_verify (GladeXmlNode *node_in, const gchar *name)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -210,7 +209,7 @@ glade_xml_node_verify (GladeXmlNode * node_in, const gchar * name)
* Returns: %TRUE if the node is found, %FALSE otherwise
*/
gboolean
-glade_xml_get_value_int (GladeXmlNode * node_in, const gchar * name, gint * val)
+glade_xml_get_value_int (GladeXmlNode *node_in, const gchar *name, gint *val)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gchar *value, *endptr = NULL;
@@ -245,8 +244,9 @@ glade_xml_get_value_int (GladeXmlNode * node_in, const gchar * name, gint * val)
* Returns:
**/
gboolean
-glade_xml_get_value_int_required (GladeXmlNode * node, const gchar * name,
- gint * val)
+glade_xml_get_value_int_required (GladeXmlNode *node,
+ const gchar *name,
+ gint *val)
{
gboolean ret;
@@ -264,14 +264,14 @@ glade_xml_get_value_int_required (GladeXmlNode * node, const gchar * name,
* the content of a child.
*/
gchar *
-glade_xml_get_value_string (GladeXmlNode * node_in, const gchar * name)
+glade_xml_get_value_string (GladeXmlNode *node_in, const gchar *name)
{
xmlNodePtr node = (xmlNodePtr) node_in;
return glade_xml_get_value (node, name);
}
static gchar *
-glade_xml_get_property (xmlNodePtr node, const gchar * name)
+glade_xml_get_property (xmlNodePtr node, const gchar *name)
{
xmlChar *val;
@@ -284,8 +284,9 @@ glade_xml_get_property (xmlNodePtr node, const gchar * name)
}
static void
-glade_xml_set_property (xmlNodePtr node, const gchar * name,
- const gchar * value)
+glade_xml_set_property (xmlNodePtr node,
+ const gchar *name,
+ const gchar *value)
{
if (value)
xmlSetProp (node, BAD_CAST (name), BAD_CAST (value));
@@ -302,8 +303,9 @@ glade_xml_set_property (xmlNodePtr node, const gchar * name,
* the content of a child.
*/
gboolean
-glade_xml_get_boolean (GladeXmlNode * node_in, const gchar * name,
- gboolean _default)
+glade_xml_get_boolean (GladeXmlNode *node_in,
+ const gchar *name,
+ gboolean _default)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gchar *value;
@@ -338,8 +340,9 @@ glade_xml_get_boolean (GladeXmlNode * node_in, const gchar * name,
* the content of a child.
*/
gboolean
-glade_xml_get_property_boolean (GladeXmlNode * node_in,
- const gchar * name, gboolean _default)
+glade_xml_get_property_boolean (GladeXmlNode *node_in,
+ const gchar *name,
+ gboolean _default)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gchar *value;
@@ -370,8 +373,9 @@ glade_xml_get_property_boolean (GladeXmlNode * node_in,
}
gdouble
-glade_xml_get_property_double (GladeXmlNode * node_in,
- const gchar * name, gdouble _default)
+glade_xml_get_property_double (GladeXmlNode *node_in,
+ const gchar *name,
+ gdouble _default)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gdouble retval;
@@ -397,8 +401,9 @@ glade_xml_get_property_double (GladeXmlNode * node_in,
}
gint
-glade_xml_get_property_int (GladeXmlNode * node_in,
- const gchar * name, gint _default)
+glade_xml_get_property_int (GladeXmlNode *node_in,
+ const gchar *name,
+ gint _default)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gint retval;
@@ -415,8 +420,9 @@ glade_xml_get_property_int (GladeXmlNode * node_in,
}
void
-glade_xml_node_set_property_boolean (GladeXmlNode * node_in,
- const gchar * name, gboolean value)
+glade_xml_node_set_property_boolean (GladeXmlNode *node_in,
+ const gchar *name,
+ gboolean value)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -434,8 +440,9 @@ glade_xml_node_set_property_boolean (GladeXmlNode * node_in,
#undef GLADE_TAG_FALSE3
gchar *
-glade_xml_get_value_string_required (GladeXmlNode * node_in,
- const gchar * name, const gchar * xtra)
+glade_xml_get_value_string_required (GladeXmlNode *node_in,
+ const gchar *name,
+ const gchar *xtra)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gchar *value = glade_xml_get_value (node, name);
@@ -454,7 +461,7 @@ glade_xml_get_value_string_required (GladeXmlNode * node_in,
}
gchar *
-glade_xml_get_property_string (GladeXmlNode * node_in, const gchar * name)
+glade_xml_get_property_string (GladeXmlNode *node_in, const gchar *name)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -462,8 +469,9 @@ glade_xml_get_property_string (GladeXmlNode * node_in, const gchar * name)
}
void
-glade_xml_node_set_property_string (GladeXmlNode * node_in,
- const gchar * name, const gchar * string)
+glade_xml_node_set_property_string (GladeXmlNode *node_in,
+ const gchar *name,
+ const gchar *string)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -471,8 +479,9 @@ glade_xml_node_set_property_string (GladeXmlNode * node_in,
}
gchar *
-glade_xml_get_property_string_required (GladeXmlNode * node_in,
- const gchar * name, const gchar * xtra)
+glade_xml_get_property_string_required (GladeXmlNode *node_in,
+ const gchar *name,
+ const gchar *xtra)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gchar *value = glade_xml_get_property_string (node_in, name);
@@ -490,9 +499,10 @@ glade_xml_get_property_string_required (GladeXmlNode * node_in,
}
gboolean
-glade_xml_get_property_version (GladeXmlNode * node_in,
- const gchar * name,
- guint16 * major, guint16 * minor)
+glade_xml_get_property_version (GladeXmlNode *node_in,
+ const gchar *name,
+ guint16 *major,
+ guint16 * minor)
{
xmlNodePtr node = (xmlNodePtr) node_in;
gchar *value = glade_xml_get_property_string (node_in, name);
@@ -522,8 +532,8 @@ glade_xml_get_property_version (GladeXmlNode * node_in,
}
GList *
-glade_xml_get_property_targetable_versions (GladeXmlNode * node_in,
- const gchar * name)
+glade_xml_get_property_targetable_versions (GladeXmlNode *node_in,
+ const gchar *name)
{
GladeTargetableVersion *version;
GList *targetable = NULL;
@@ -571,7 +581,7 @@ glade_xml_get_property_targetable_versions (GladeXmlNode * node_in,
* Search a child by name,
*/
GladeXmlNode *
-glade_xml_search_child (GladeXmlNode * node_in, const gchar * name)
+glade_xml_search_child (GladeXmlNode *node_in, const gchar *name)
{
xmlNodePtr node;
xmlNodePtr child;
@@ -601,7 +611,7 @@ glade_xml_search_child (GladeXmlNode * node_in, const gchar * name)
* Return Value:
**/
GladeXmlNode *
-glade_xml_search_child_required (GladeXmlNode * node, const gchar * name)
+glade_xml_search_child_required (GladeXmlNode *node, const gchar *name)
{
GladeXmlNode *child;
@@ -617,7 +627,7 @@ glade_xml_search_child_required (GladeXmlNode * node, const gchar * name)
/* --------------------------- Parse Context ----------------------------*/
static GladeXmlContext *
-glade_xml_context_new_real (GladeXmlDoc * doc, gboolean freedoc, xmlNsPtr ns)
+glade_xml_context_new_real (GladeXmlDoc *doc, gboolean freedoc, xmlNsPtr ns)
{
GladeXmlContext *context = g_new0 (GladeXmlContext, 1);
@@ -629,7 +639,7 @@ glade_xml_context_new_real (GladeXmlDoc * doc, gboolean freedoc, xmlNsPtr ns)
}
GladeXmlContext *
-glade_xml_context_new (GladeXmlDoc * doc, const gchar * name_space)
+glade_xml_context_new (GladeXmlDoc *doc, const gchar *name_space)
{
/* We are not using the namespace now */
return glade_xml_context_new_real (doc, TRUE, NULL);
@@ -645,8 +655,9 @@ glade_xml_context_destroy (GladeXmlContext * context)
}
GladeXmlContext *
-glade_xml_context_new_from_path (const gchar * full_path,
- const gchar * nspace, const gchar * root_name)
+glade_xml_context_new_from_path (const gchar *full_path,
+ const gchar *nspace,
+ const gchar *root_name)
{
GladeXmlContext *context;
xmlDocPtr doc;
@@ -703,7 +714,7 @@ glade_xml_context_new_from_path (const gchar * full_path,
* Similar to glade_xml_context_destroy but it also frees the document set in the context
**/
void
-glade_xml_context_free (GladeXmlContext * context)
+glade_xml_context_free (GladeXmlContext *context)
{
g_return_if_fail (context != NULL);
if (context->doc)
@@ -714,7 +725,8 @@ glade_xml_context_free (GladeXmlContext * context)
}
void
-glade_xml_node_append_child (GladeXmlNode * node_in, GladeXmlNode * child_in)
+glade_xml_node_append_child (GladeXmlNode *node_in,
+ GladeXmlNode *child_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
xmlNodePtr child = (xmlNodePtr) child_in;
@@ -737,7 +749,7 @@ glade_xml_node_remove (GladeXmlNode * node_in)
GladeXmlNode *
-glade_xml_node_new (GladeXmlContext * context, const gchar * name)
+glade_xml_node_new (GladeXmlContext *context, const gchar *name)
{
g_return_val_if_fail (context != NULL, NULL);
g_return_val_if_fail (name != NULL, NULL);
@@ -747,7 +759,7 @@ glade_xml_node_new (GladeXmlContext * context, const gchar * name)
}
GladeXmlNode *
-glade_xml_node_new_comment (GladeXmlContext * context, const gchar * comment)
+glade_xml_node_new_comment (GladeXmlContext *context, const gchar *comment)
{
g_return_val_if_fail (context != NULL, NULL);
g_return_val_if_fail (comment != NULL, NULL);
@@ -769,19 +781,19 @@ glade_xml_node_copy (GladeXmlNode *node)
}
void
-glade_xml_node_delete (GladeXmlNode * node)
+glade_xml_node_delete (GladeXmlNode *node)
{
xmlFreeNode ((xmlNodePtr) node);
}
GladeXmlDoc *
-glade_xml_context_get_doc (GladeXmlContext * context)
+glade_xml_context_get_doc (GladeXmlContext *context)
{
return context->doc;
}
gchar *
-glade_xml_dump_from_context (GladeXmlContext * context)
+glade_xml_dump_from_context (GladeXmlContext *context)
{
GladeXmlDoc *doc;
xmlChar *string = NULL;
@@ -797,7 +809,7 @@ glade_xml_dump_from_context (GladeXmlContext * context)
}
gboolean
-glade_xml_node_is_comment (GladeXmlNode * node_in)
+glade_xml_node_is_comment (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
return (node) ? node->type == XML_COMMENT_NODE : FALSE;
@@ -824,7 +836,7 @@ glade_xml_node_get_children (GladeXmlNode * node_in)
}
GladeXmlNode *
-glade_xml_node_get_parent (GladeXmlNode * node_in)
+glade_xml_node_get_parent (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -833,7 +845,7 @@ glade_xml_node_get_parent (GladeXmlNode * node_in)
GladeXmlNode *
-glade_xml_node_get_children_with_comments (GladeXmlNode * node_in)
+glade_xml_node_get_children_with_comments (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -841,7 +853,7 @@ glade_xml_node_get_children_with_comments (GladeXmlNode * node_in)
}
GladeXmlNode *
-glade_xml_node_next (GladeXmlNode * node_in)
+glade_xml_node_next (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -853,7 +865,7 @@ glade_xml_node_next (GladeXmlNode * node_in)
}
GladeXmlNode *
-glade_xml_node_next_with_comments (GladeXmlNode * node_in)
+glade_xml_node_next_with_comments (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -861,7 +873,7 @@ glade_xml_node_next_with_comments (GladeXmlNode * node_in)
}
GladeXmlNode *
-glade_xml_node_prev_with_comments (GladeXmlNode * node_in)
+glade_xml_node_prev_with_comments (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -869,7 +881,7 @@ glade_xml_node_prev_with_comments (GladeXmlNode * node_in)
}
const gchar *
-glade_xml_node_get_name (GladeXmlNode * node_in)
+glade_xml_node_get_name (GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
@@ -885,7 +897,7 @@ glade_xml_doc_new (void)
}
void
-glade_xml_doc_set_root (GladeXmlDoc * doc_in, GladeXmlNode * node_in)
+glade_xml_doc_set_root (GladeXmlDoc *doc_in, GladeXmlNode *node_in)
{
xmlNodePtr node = (xmlNodePtr) node_in;
xmlDocPtr doc = (xmlDocPtr) doc_in;
@@ -894,7 +906,7 @@ glade_xml_doc_set_root (GladeXmlDoc * doc_in, GladeXmlNode * node_in)
}
gint
-glade_xml_doc_save (GladeXmlDoc * doc_in, const gchar * full_path)
+glade_xml_doc_save (GladeXmlDoc *doc_in, const gchar *full_path)
{
xmlDocPtr doc = (xmlDocPtr) doc_in;
@@ -903,7 +915,7 @@ glade_xml_doc_save (GladeXmlDoc * doc_in, const gchar * full_path)
}
void
-glade_xml_doc_free (GladeXmlDoc * doc_in)
+glade_xml_doc_free (GladeXmlDoc *doc_in)
{
xmlDocPtr doc = (xmlDocPtr) doc_in;
@@ -917,7 +929,7 @@ glade_xml_doc_free (GladeXmlDoc * doc_in)
* Returns: the #GladeXmlNode that is the document root of @doc
*/
GladeXmlNode *
-glade_xml_doc_get_root (GladeXmlDoc * doc)
+glade_xml_doc_get_root (GladeXmlDoc *doc)
{
xmlNodePtr node;
@@ -927,9 +939,10 @@ glade_xml_doc_get_root (GladeXmlDoc * doc)
}
gboolean
-glade_xml_load_sym_from_node (GladeXmlNode * node_in,
- GModule * module,
- gchar * tagname, gpointer * sym_location)
+glade_xml_load_sym_from_node (GladeXmlNode *node_in,
+ GModule *module,
+ gchar *tagname,
+ gpointer *sym_location)
{
static GModule *self = NULL;
gboolean retval = FALSE;
diff --git a/plugins/gtk+/glade-fixed.c b/plugins/gtk+/glade-fixed.c
index 20ed25b..8d3616a 100644
--- a/plugins/gtk+/glade-fixed.c
+++ b/plugins/gtk+/glade-fixed.c
@@ -92,9 +92,10 @@ typedef struct
#define GRAB_BORDER_WIDTH 7
#define GRAB_CORNER_WIDTH 7
-static GObjectClass *parent_class;
static guint glade_fixed_signals[FIXED_SIGNALS];
+G_DEFINE_TYPE (GladeFixed, glade_fixed, GLADE_TYPE_WIDGET);
+
/* From gtkmain.c */
static gboolean
glade_fixed_boolean_handled_accumulator (GSignalInvocationHint * ihint,
@@ -857,7 +858,7 @@ glade_fixed_add_child_impl (GladeWidget *gwidget_fixed,
&fixed->mouse_x, &fixed->mouse_y);
/* Chain up for the basic parenting */
- GLADE_WIDGET_CLASS (parent_class)->add_child
+ GLADE_WIDGET_CLASS (glade_fixed_parent_class)->add_child
(GLADE_WIDGET (fixed), child, at_mouse);
/* We only operate on widgets here */
@@ -912,7 +913,7 @@ glade_fixed_remove_child_impl (GladeWidget *fixed, GladeWidget *child)
glade_fixed_disconnect_child (GLADE_FIXED (fixed), child);
/* Chain up for the basic unparenting */
- GLADE_WIDGET_CLASS (parent_class)->remove_child (GLADE_WIDGET (fixed), child);
+ GLADE_WIDGET_CLASS (glade_fixed_parent_class)->remove_child (GLADE_WIDGET (fixed), child);
}
static void
@@ -927,7 +928,7 @@ glade_fixed_replace_child_impl (GladeWidget *fixed,
glade_fixed_disconnect_child (GLADE_FIXED (fixed), gold_widget);
/* Chain up for the basic reparenting */
- GLADE_WIDGET_CLASS (parent_class)->replace_child
+ GLADE_WIDGET_CLASS (glade_fixed_parent_class)->replace_child
(GLADE_WIDGET (fixed), old_object, new_object);
if (gnew_widget)
@@ -952,7 +953,7 @@ glade_fixed_event (GladeWidget *gwidget_fixed, GdkEvent *event)
/* If the GladeWidget used this event... let it slide.
*/
- if (GLADE_WIDGET_CLASS (parent_class)->event (gwidget_fixed, event))
+ if (GLADE_WIDGET_CLASS (glade_fixed_parent_class)->event (gwidget_fixed, event))
return TRUE;
if ((device = gdk_event_get_device (event)))
@@ -1025,7 +1026,7 @@ glade_fixed_finalize (GObject *object)
g_free (fixed->width_prop);
g_free (fixed->height_prop);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (glade_fixed_parent_class)->finalize (object);
}
static void
@@ -1111,8 +1112,6 @@ glade_fixed_class_init (GladeFixedClass *fixed_class)
GObjectClass *gobject_class = G_OBJECT_CLASS (fixed_class);
GladeWidgetClass *gwidget_class = GLADE_WIDGET_CLASS (fixed_class);
- parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (gobject_class));
-
gobject_class->finalize = glade_fixed_finalize;
gobject_class->set_property = glade_fixed_set_property;
gobject_class->get_property = glade_fixed_get_property;
@@ -1230,31 +1229,6 @@ glade_fixed_class_init (GladeFixedClass *fixed_class)
API
*******************************************************************************/
-GType
-glade_fixed_get_type (void)
-{
- static GType fixed_type = 0;
-
- if (!fixed_type)
- {
- static const GTypeInfo fixed_info = {
- sizeof (GladeFixedClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) glade_fixed_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GladeFixed),
- 0, /* n_preallocs */
- (GInstanceInitFunc) glade_fixed_init,
- };
- fixed_type =
- g_type_register_static (GLADE_TYPE_WIDGET,
- "GladeFixed", &fixed_info, 0);
- }
- return fixed_type;
-}
-
/* This is called from the catalog for a few widgets */
GladeWidget *
glade_gtk_create_fixed_widget (GladeWidgetAdaptor * adaptor,
diff --git a/plugins/gtk+/glade-scale-editor.c b/plugins/gtk+/glade-scale-editor.c
index fee57b0..6dae9f9 100644
--- a/plugins/gtk+/glade-scale-editor.c
+++ b/plugins/gtk+/glade-scale-editor.c
@@ -33,29 +33,23 @@ struct _GladeScaleEditorPrivate
GtkWidget *embed;
};
-G_DEFINE_TYPE (GladeScaleEditor, glade_scale_editor, GLADE_TYPE_EDITOR_SKELETON)
+G_DEFINE_TYPE_WITH_PRIVATE (GladeScaleEditor, glade_scale_editor, GLADE_TYPE_EDITOR_SKELETON)
static void
glade_scale_editor_class_init (GladeScaleEditorClass * klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->grab_focus = glade_scale_editor_grab_focus;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladegtk/glade-scale-editor.ui");
- gtk_widget_class_bind_template_child_private (widget_class, GladeScaleEditor, embed);
-
- g_type_class_add_private (object_class, sizeof (GladeScaleEditorPrivate));
+ gtk_widget_class_bind_template_child_private (widget_class, GladeScaleEditor, embed);
}
static void
glade_scale_editor_init (GladeScaleEditor * self)
{
- self->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (self,
- GLADE_TYPE_SCALE_EDITOR,
- GladeScaleEditorPrivate);
+ self->priv = glade_scale_editor_get_instance_private (self);
gtk_widget_init_template (GTK_WIDGET (self));
}
diff --git a/src/glade-http.c b/src/glade-http.c
index e645327..ab3ae85 100644
--- a/src/glade-http.c
+++ b/src/glade-http.c
@@ -62,7 +62,7 @@ enum
static GParamSpec *properties[N_PROPERTIES];
static guint http_signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GladeHTTP, glade_http, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (GladeHTTP, glade_http, G_TYPE_OBJECT);
static void
glade_http_emit_request_done (GladeHTTP *http, gchar *response)
@@ -224,7 +224,7 @@ glade_http_init (GladeHTTP *http)
{
GladeHTTPPrivate *priv;
- priv = http->priv = G_TYPE_INSTANCE_GET_PRIVATE (http, GLADE_TYPE_HTTP, GladeHTTPPrivate);
+ priv = http->priv = glade_http_get_instance_private (http);
priv->data = g_string_new ("");
priv->response = g_string_new ("");
@@ -316,8 +316,6 @@ glade_http_class_init (GladeHTTPClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GladeHTTPPrivate));
-
object_class->finalize = glade_http_finalize;
object_class->set_property = glade_http_set_property;
object_class->get_property = glade_http_get_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]