diff options
Diffstat (limited to 'gladeui')
76 files changed, 3576 insertions, 3570 deletions
diff --git a/gladeui/glade-accumulators.c b/gladeui/glade-accumulators.c index fd557bdf..29f41e74 100644 --- a/gladeui/glade-accumulators.c +++ b/gladeui/glade-accumulators.c @@ -31,8 +31,9 @@ gboolean _glade_single_object_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, gpointer dummy) + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { GObject *object = g_value_get_object (handler_return); g_value_set_object (return_accu, object); @@ -42,9 +43,9 @@ _glade_single_object_accumulator (GSignalInvocationHint *ihint, gboolean _glade_integer_handled_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy) + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { gboolean continue_emission; gint retval; @@ -59,9 +60,9 @@ _glade_integer_handled_accumulator (GSignalInvocationHint *ihint, /* From gtkmain.c */ gboolean _glade_boolean_handled_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy) + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { gboolean continue_emission; gboolean signal_handled; @@ -75,8 +76,9 @@ _glade_boolean_handled_accumulator (GSignalInvocationHint *ihint, gboolean _glade_string_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, gpointer dummy) + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { const gchar *handler_str; @@ -103,8 +105,9 @@ _glade_strv_handled_accumulator (GSignalInvocationHint *ihint, gboolean _glade_stop_emission_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, gpointer dummy) + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { g_value_copy (handler_return, return_accu); diff --git a/gladeui/glade-accumulators.h b/gladeui/glade-accumulators.h index 17156c59..58dc55b8 100644 --- a/gladeui/glade-accumulators.h +++ b/gladeui/glade-accumulators.h @@ -6,34 +6,34 @@ G_BEGIN_DECLS gboolean _glade_single_object_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy); + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); gboolean _glade_integer_handled_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy); - + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); + gboolean _glade_boolean_handled_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy); + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); gboolean _glade_string_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy); + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); gboolean _glade_strv_handled_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy); + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); gboolean _glade_stop_emission_accumulator (GSignalInvocationHint *ihint, - GValue *return_accu, - const GValue *handler_return, - gpointer dummy); + GValue *return_accu, + const GValue *handler_return, + gpointer dummy); G_END_DECLS #endif /* __GLADE_ACCUMULATORS_H__ */ diff --git a/gladeui/glade-app.c b/gladeui/glade-app.c index 5dfb37e2..24404832 100644 --- a/gladeui/glade-app.c +++ b/gladeui/glade-app.c @@ -417,7 +417,7 @@ static void glade_app_class_init (GladeAppClass *klass) { GObjectClass *object_class; - + object_class = G_OBJECT_CLASS (klass); object_class->constructor = glade_app_constructor; @@ -858,13 +858,13 @@ glade_app_new (void) void glade_app_search_docs (const gchar *book, - const gchar *page, - const gchar *search) + const gchar *page, + const gchar *search) { GladeApp *app; app = glade_app_get (); g_signal_emit (G_OBJECT (app), glade_app_signals[DOC_SEARCH], 0, - book, page, search); + book, page, search); } diff --git a/gladeui/glade-app.h b/gladeui/glade-app.h index 5c10bff1..a690ff1b 100644 --- a/gladeui/glade-app.h +++ b/gladeui/glade-app.h @@ -77,8 +77,8 @@ gint glade_app_config_save (void); gboolean glade_app_do_event (GdkEvent *event); gboolean glade_app_get_catalog_version (const gchar *name, - gint *major, - gint *minor); + gint *major, + gint *minor); GList *glade_app_get_catalogs (void); GladeCatalog *glade_app_get_catalog (const gchar *name); GladeClipboard* glade_app_get_clipboard (void); @@ -96,8 +96,8 @@ void glade_app_set_accel_group (GtkAccelGroup *accel_group); GtkAccelGroup *glade_app_get_accel_group (void); void glade_app_search_docs (const gchar *book, - const gchar *page, - const gchar *search); + const gchar *page, + const gchar *search); /* package paths */ const gchar *glade_app_get_catalogs_dir (void) G_GNUC_CONST; diff --git a/gladeui/glade-base-editor.h b/gladeui/glade-base-editor.h index f631c8df..5bb42b16 100644 --- a/gladeui/glade-base-editor.h +++ b/gladeui/glade-base-editor.h @@ -68,35 +68,35 @@ struct _GladeBaseEditorClass GType glade_base_editor_get_type (void); GladeBaseEditor *glade_base_editor_new (GObject *container, - GladeEditable *main_editable, - ...); + GladeEditable *main_editable, + ...); void glade_base_editor_append_types (GladeBaseEditor *editor, - GType parent_type, - ...); + GType parent_type, + ...); void glade_base_editor_add_editable (GladeBaseEditor *editor, - GladeWidget *gchild, - GladeEditorPageType page); + GladeWidget *gchild, + GladeEditorPageType page); void glade_base_editor_add_default_properties (GladeBaseEditor *editor, - GladeWidget *gchild); + GladeWidget *gchild); void glade_base_editor_add_properties (GladeBaseEditor *editor, - GladeWidget *gchild, - gboolean packing, - ...); + GladeWidget *gchild, + gboolean packing, + ...); void glade_base_editor_add_label (GladeBaseEditor *editor, - gchar *str); + gchar *str); void glade_base_editor_set_show_signal_editor (GladeBaseEditor *editor, - gboolean val); + gboolean val); /* Convenience functions */ GtkWidget *glade_base_editor_pack_new_window (GladeBaseEditor *editor, - gchar *title, - gchar *help_markup); + gchar *title, + gchar *help_markup); G_END_DECLS diff --git a/gladeui/glade-builtins.c b/gladeui/glade-builtins.c index 7eb6f2a2..d6144827 100644 --- a/gladeui/glade-builtins.c +++ b/gladeui/glade-builtins.c @@ -303,8 +303,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS { gchar *clean_name = clean_stock_name (item.label); - if (!glade_get_displayable_value (etype, enum_values[i].value_nick)) - glade_register_translated_value (etype, enum_values[i].value_nick, clean_name); + if (!glade_get_displayable_value (etype, enum_values[i].value_nick)) + glade_register_translated_value (etype, enum_values[i].value_nick, clean_name); g_free (clean_name); } } @@ -340,8 +340,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS gchar *clean_name = clean_stock_name (item.label); /* These are translated, we just cut out the mnemonic underscores */ - if (!glade_get_displayable_value (etype, enum_values[i].value_nick)) - glade_register_translated_value (etype, enum_values[i].value_nick, clean_name); + if (!glade_get_displayable_value (etype, enum_values[i].value_nick)) + glade_register_translated_value (etype, enum_values[i].value_nick, clean_name); g_free (clean_name); } } @@ -349,11 +349,11 @@ G_GNUC_END_IGNORE_DEPRECATIONS for (i = 0; i < G_N_ELEMENTS (builtin_stock_images); i++) { /* these ones are translated from glade */ - if (!glade_get_displayable_value (etype, builtin_stock_images[i])) - glade_register_displayable_value (etype, - builtin_stock_images[i], - GETTEXT_PACKAGE, - builtin_stock_displayables[i]); + if (!glade_get_displayable_value (etype, builtin_stock_images[i])) + glade_register_displayable_value (etype, + builtin_stock_images[i], + GETTEXT_PACKAGE, + builtin_stock_displayables[i]); } } return etype; @@ -427,7 +427,7 @@ param_objects_validate (GParamSpec * pspec, GValue * value) object = list->data; if (!(G_OBJECT_TYPE (object) == ospec->type || - g_type_is_a (G_OBJECT_TYPE (object), ospec->type))) + g_type_is_a (G_OBJECT_TYPE (object), ospec->type))) toremove = g_list_prepend (toremove, object); } @@ -526,7 +526,7 @@ glade_standard_pixbuf_spec (void) { return g_param_spec_object ("pixbuf", _("Image File Name"), _("Enter a filename, relative path or full path to " - "load the image"), GDK_TYPE_PIXBUF, + "load the image"), GDK_TYPE_PIXBUF, G_PARAM_READWRITE); } diff --git a/gladeui/glade-builtins.h b/gladeui/glade-builtins.h index 7edabd38..5837900d 100644 --- a/gladeui/glade-builtins.h +++ b/gladeui/glade-builtins.h @@ -11,8 +11,8 @@ typedef struct _GladeParamSpecObjects GladeParamSpecObjects; #define GLADE_TYPE_STOCK (glade_standard_stock_get_type()) #define GLADE_TYPE_STOCK_IMAGE (glade_standard_stock_image_get_type()) -#define GLADE_TYPE_GLIST (glade_glist_get_type()) -#define GLADE_TYPE_PARAM_OBJECTS (glade_param_objects_get_type()) +#define GLADE_TYPE_GLIST (glade_glist_get_type()) +#define GLADE_TYPE_PARAM_OBJECTS (glade_param_objects_get_type()) #define GLADE_IS_STOCK(pspec) \ (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GLADE_TYPE_STOCK)) @@ -33,13 +33,13 @@ GType glade_glist_get_type (void) G_GNUC_CONST; GType glade_param_objects_get_type (void) G_GNUC_CONST; GParamSpec *glade_param_spec_objects (const gchar *name, - const gchar *nick, - const gchar *blurb, - GType accepted_type, - GParamFlags flags); + const gchar *nick, + const gchar *blurb, + GType accepted_type, + GParamFlags flags); void glade_param_spec_objects_set_type (GladeParamSpecObjects *pspec, - GType type); + GType type); GType glade_param_spec_objects_get_type (GladeParamSpecObjects *pspec); GParamSpec *glade_standard_pixbuf_spec (void); diff --git a/gladeui/glade-catalog.c b/gladeui/glade-catalog.c index ea05220a..37366ef5 100644 --- a/gladeui/glade-catalog.c +++ b/gladeui/glade-catalog.c @@ -522,18 +522,18 @@ catalogs_from_path (GList *catalogs, const gchar *path) if (!g_str_has_suffix (filename, ".xml")) continue; - /* Special case, ignore gresource files (which are present - * while running tests) - */ - if (g_str_has_suffix (filename, ".gresource.xml")) - continue; - - /* If we're running in the bundle, don't ever try to load - * anything except the GTK+ catalog - */ - if (g_getenv (GLADE_ENV_BUNDLED) != NULL && - strcmp (filename, "gtk+.xml") != 0) - continue; + /* Special case, ignore gresource files (which are present + * while running tests) + */ + if (g_str_has_suffix (filename, ".gresource.xml")) + continue; + + /* If we're running in the bundle, don't ever try to load + * anything except the GTK+ catalog + */ + if (g_getenv (GLADE_ENV_BUNDLED) != NULL && + strcmp (filename, "gtk+.xml") != 0) + continue; catalog_filename = g_build_filename (path, filename, NULL); catalog = catalog_open (catalog_filename); @@ -574,7 +574,7 @@ glade_catalog_add_path (const gchar *path) g_return_if_fail (path != NULL); if (g_list_find_custom (catalog_paths, path, (GCompareFunc) g_strcmp0) == NULL) - catalog_paths = g_list_append (catalog_paths, g_strdup (path)); + catalog_paths = g_list_append (catalog_paths, g_strdup (path)); } /** @@ -590,14 +590,14 @@ glade_catalog_remove_path (const gchar *path) GList *l; if (path == NULL) - { - g_list_free_full (catalog_paths, g_free); - catalog_paths = NULL; - } + { + g_list_free_full (catalog_paths, g_free); + catalog_paths = NULL; + } else if ((l = g_list_find_custom (catalog_paths, path, (GCompareFunc) g_strcmp0))) - { - catalog_paths = g_list_remove_link (catalog_paths, l); - } + { + catalog_paths = g_list_remove_link (catalog_paths, l); + } } /** @@ -685,17 +685,17 @@ glade_catalog_load_all (void) /* Dont print missing icons in unit tests */ if (glade_widget_adaptor_get_missing_icon (adaptor) && - g_getenv (GLADE_ENV_TESTING) == NULL) + g_getenv (GLADE_ENV_TESTING) == NULL) { if (!icon_warning) icon_warning = g_string_new ("Glade needs artwork; " "a default icon will be used for " "the following classes:"); - g_string_append_printf (icon_warning, - "\n\t%s\tneeds an icon named '%s'", - glade_widget_adaptor_get_name (adaptor), - glade_widget_adaptor_get_missing_icon (adaptor)); + g_string_append_printf (icon_warning, + "\n\t%s\tneeds an icon named '%s'", + glade_widget_adaptor_get_name (adaptor), + glade_widget_adaptor_get_missing_icon (adaptor)); } } diff --git a/gladeui/glade-cell-renderer-icon.h b/gladeui/glade-cell-renderer-icon.h index 1e61bb18..3bb3fb44 100644 --- a/gladeui/glade-cell-renderer-icon.h +++ b/gladeui/glade-cell-renderer-icon.h @@ -28,11 +28,11 @@ G_BEGIN_DECLS -#define GLADE_TYPE_CELL_RENDERER_ICON (glade_cell_renderer_icon_get_type ()) -#define GLADE_CELL_RENDERER_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_CELL_RENDERER_ICON, GladeCellRendererIcon)) -#define GLADE_CELL_RENDERER_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_CELL_RENDERER_ICON, GladeCellRendererIconClass)) -#define GLADE_IS_CELL_RENDERER_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_CELL_RENDERER_ICON)) -#define GLADE_IS_CELL_RENDERER_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_CELL_RENDERER_ICON)) +#define GLADE_TYPE_CELL_RENDERER_ICON (glade_cell_renderer_icon_get_type ()) +#define GLADE_CELL_RENDERER_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_CELL_RENDERER_ICON, GladeCellRendererIcon)) +#define GLADE_CELL_RENDERER_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_CELL_RENDERER_ICON, GladeCellRendererIconClass)) +#define GLADE_IS_CELL_RENDERER_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_CELL_RENDERER_ICON)) +#define GLADE_IS_CELL_RENDERER_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_CELL_RENDERER_ICON)) #define GLADE_CELL_RENDERER_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_CELL_RENDERER_ICON, GladeCellRendererIconClass)) typedef struct _GladeCellRendererIcon GladeCellRendererIcon; @@ -51,7 +51,7 @@ struct _GladeCellRendererIconClass GtkCellRendererPixbufClass parent_class; void (* activate) (GladeCellRendererIcon *cell_renderer_icon, - const gchar *path); + const gchar *path); }; GType glade_cell_renderer_icon_get_type (void) G_GNUC_CONST; @@ -59,11 +59,11 @@ GtkCellRenderer *glade_cell_renderer_icon_new (void); gboolean glade_cell_renderer_icon_get_active (GladeCellRendererIcon *icon); void glade_cell_renderer_icon_set_active (GladeCellRendererIcon *icon, - gboolean setting); + gboolean setting); gboolean glade_cell_renderer_icon_get_activatable (GladeCellRendererIcon *icon); void glade_cell_renderer_icon_set_activatable (GladeCellRendererIcon *icon, - gboolean setting); + gboolean setting); G_END_DECLS diff --git a/gladeui/glade-clipboard.h b/gladeui/glade-clipboard.h index 6f266c79..b0d23299 100644 --- a/gladeui/glade-clipboard.h +++ b/gladeui/glade-clipboard.h @@ -35,7 +35,7 @@ GType glade_clipboard_get_type (void); GladeClipboard *glade_clipboard_new (void); void glade_clipboard_add (GladeClipboard *clipboard, - GList *widgets); + GList *widgets); void glade_clipboard_clear (GladeClipboard *clipboard); gboolean glade_clipboard_get_has_selection(GladeClipboard *clipboard); @@ -43,4 +43,4 @@ GList *glade_clipboard_widgets (GladeClipboard *clipboard); G_END_DECLS -#endif /* __GLADE_CLIPBOARD_H__ */ +#endif /* __GLADE_CLIPBOARD_H__ */ diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c index 15ec3c89..9899d30d 100644 --- a/gladeui/glade-command.c +++ b/gladeui/glade-command.c @@ -54,13 +54,13 @@ struct _GladeCommandPrivate GladeProject *project; /* The project this command is created for */ gchar *description; /* a string describing the command. - * It's used in the undo/redo menu entry. - */ + * It's used in the undo/redo menu entry. + */ gint group_id; /* If this is part of a command group, this is - * the group id (id is needed only to ensure that - * consecutive groups dont get merged). - */ + * the group id (id is needed only to ensure that + * consecutive groups dont get merged). + */ }; /* Concerning placeholders: we do not hold any reference to placeholders, @@ -143,59 +143,58 @@ glade_command_class_init (GladeCommandClass *klass) } /* Macros for defining the derived command types */ -#define MAKE_TYPE(func, type, parent) \ -GType \ -func ## _get_type (void) \ -{ \ - static GType cmd_type = 0; \ - \ - if (!cmd_type) \ - { \ - static const GTypeInfo info = \ - { \ - sizeof (type ## Class), \ - (GBaseInitFunc) NULL, \ - (GBaseFinalizeFunc) NULL, \ - (GClassInitFunc) func ## _class_init, \ - (GClassFinalizeFunc) NULL, \ - NULL, \ - sizeof (type), \ - 0, \ - (GInstanceInitFunc) NULL \ - }; \ - \ - cmd_type = g_type_register_static (parent, #type, &info, 0); \ - } \ - \ - return cmd_type; \ -} \ - -#define GLADE_MAKE_COMMAND(type, func) \ -static gboolean \ -func ## _undo (GladeCommand *me); \ -static gboolean \ -func ## _execute (GladeCommand *me); \ -static void \ -func ## _finalize (GObject *object); \ -static gboolean \ -func ## _unifies (GladeCommand *this_cmd, GladeCommand *other_cmd); \ -static void \ -func ## _collapse (GladeCommand *this_cmd, GladeCommand *other_cmd); \ -static void \ -func ## _class_init (gpointer parent_tmp, gpointer notused) \ -{ \ - GladeCommandClass *parent = parent_tmp; \ - GObjectClass* object_class; \ - object_class = G_OBJECT_CLASS (parent); \ - parent->undo = func ## _undo; \ - parent->execute = func ## _execute; \ - parent->unifies = func ## _unifies; \ - parent->collapse = func ## _collapse; \ - object_class->finalize = func ## _finalize; \ -} \ -typedef struct { \ - GladeCommandClass cmd; \ -} type ## Class; \ +#define MAKE_TYPE(func, type, parent) \ +GType \ +func ## _get_type (void) \ +{ \ + static GType cmd_type = 0; \ + \ + if (!cmd_type) \ + { \ + static const GTypeInfo info = { \ + sizeof (type ## Class), \ + (GBaseInitFunc) NULL, \ + (GBaseFinalizeFunc) NULL, \ + (GClassInitFunc) func ## _class_init, \ + (GClassFinalizeFunc) NULL, \ + NULL, \ + sizeof (type), \ + 0, \ + (GInstanceInitFunc) NULL \ + }; \ + \ + cmd_type = g_type_register_static (parent, #type, &info, 0); \ + } \ + \ + return cmd_type; \ +} + +#define GLADE_MAKE_COMMAND(type, func) \ +static gboolean \ +func ## _undo (GladeCommand *me); \ +static gboolean \ +func ## _execute (GladeCommand *me); \ +static void \ +func ## _finalize (GObject *object); \ +static gboolean \ +func ## _unifies (GladeCommand *this_cmd, GladeCommand *other_cmd); \ +static void \ +func ## _collapse (GladeCommand *this_cmd, GladeCommand *other_cmd); \ +static void \ +func ## _class_init (gpointer parent_tmp, gpointer notused) \ +{ \ + GladeCommandClass *parent = parent_tmp; \ + GObjectClass* object_class; \ + object_class = G_OBJECT_CLASS (parent); \ + parent->undo = func ## _undo; \ + parent->execute = func ## _execute; \ + parent->unifies = func ## _unifies; \ + parent->collapse = func ## _collapse; \ + object_class->finalize = func ## _finalize; \ +} \ +typedef struct { \ + GladeCommandClass cmd; \ +} type ## Class; \ static MAKE_TYPE(func, type, GLADE_TYPE_COMMAND) @@ -363,13 +362,13 @@ typedef struct /* standard macros */ GLADE_MAKE_COMMAND (GladeCommandPropertyEnabled, glade_command_property_enabled); #define GLADE_COMMAND_PROPERTY_ENABLED_TYPE (glade_command_property_enabled_get_type ()) -#define GLADE_COMMAND_PROPERTY_ENABLED(o) (G_TYPE_CHECK_INSTANCE_CAST \ - ((o), GLADE_COMMAND_PROPERTY_ENABLED_TYPE, \ - GladeCommandPropertyEnabled)) -#define GLADE_COMMAND_PROPERTY_ENABLED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST \ - ((k), GLADE_COMMAND_PROPERTY_ENABLED_TYPE, \ - GladeCommandPropertyEnabledClass)) -#define GLADE_IS_COMMAND_PROPERTY_ENABLED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_PROPERTY_ENABLED_TYPE)) +#define GLADE_COMMAND_PROPERTY_ENABLED(o) (G_TYPE_CHECK_INSTANCE_CAST \ + ((o), GLADE_COMMAND_PROPERTY_ENABLED_TYPE, \ + GladeCommandPropertyEnabled)) +#define GLADE_COMMAND_PROPERTY_ENABLED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST \ + ((k), GLADE_COMMAND_PROPERTY_ENABLED_TYPE, \ + GladeCommandPropertyEnabledClass)) +#define GLADE_IS_COMMAND_PROPERTY_ENABLED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_PROPERTY_ENABLED_TYPE)) #define GLADE_IS_COMMAND_PROPERTY_ENABLED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_PROPERTY_ENABLED_TYPE)) @@ -418,7 +417,7 @@ glade_command_property_enabled_unifies (GladeCommand *this_cmd, GladeCommand *ot { cmd1 = (GladeCommandPropertyEnabled *) this_cmd; - return (cmd1->old_enabled == cmd1->new_enabled); + return (cmd1->old_enabled == cmd1->new_enabled); } return FALSE; } @@ -437,7 +436,7 @@ glade_command_property_enabled_unifies (GladeCommand *this_cmd, GladeCommand *ot static void glade_command_property_enabled_collapse (GladeCommand *this_cmd, - GladeCommand *other_cmd) + GladeCommand *other_cmd) { GladeCommandPropertyEnabled *this = GLADE_COMMAND_PROPERTY_ENABLED (this_cmd); GladeCommandPropertyEnabled *other = GLADE_COMMAND_PROPERTY_ENABLED (other_cmd); @@ -453,13 +452,13 @@ glade_command_property_enabled_collapse (GladeCommand *this_cmd, if (this->new_enabled) this_cmd->priv->description = g_strdup_printf (_("Enabling property %s on widget %s"), - glade_property_class_get_name (pclass), - glade_widget_get_name (widget)); + glade_property_class_get_name (pclass), + glade_widget_get_name (widget)); else this_cmd->priv->description = g_strdup_printf (_("Disabling property %s on widget %s"), - glade_property_class_get_name (pclass), - glade_widget_get_name (widget)); + glade_property_class_get_name (pclass), + glade_widget_get_name (widget)); } /** @@ -473,7 +472,7 @@ glade_command_property_enabled_collapse (GladeCommand *this_cmd, */ void glade_command_set_property_enabled (GladeProperty *property, - gboolean enabled) + gboolean enabled) { GladeCommandPropertyEnabled *me; GladeCommand *cmd; @@ -509,13 +508,13 @@ glade_command_set_property_enabled (GladeProperty *property, if (enabled) cmd->priv->description = g_strdup_printf (_("Enabling property %s on widget %s"), - glade_property_class_get_name (pclass), - glade_widget_get_name (widget)); + glade_property_class_get_name (pclass), + glade_widget_get_name (widget)); else cmd->priv->description = g_strdup_printf (_("Disabling property %s on widget %s"), - glade_property_class_get_name (pclass), - glade_widget_get_name (widget)); + glade_property_class_get_name (pclass), + glade_widget_get_name (widget)); glade_command_check_group (GLADE_COMMAND (me)); @@ -542,11 +541,11 @@ typedef struct /* standard macros */ GLADE_MAKE_COMMAND (GladeCommandSetProperty, glade_command_set_property); -#define GLADE_COMMAND_SET_PROPERTY_TYPE (glade_command_set_property_get_type ()) -#define GLADE_COMMAND_SET_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_SET_PROPERTY_TYPE, GladeCommandSetProperty)) -#define GLADE_COMMAND_SET_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_SET_PROPERTY_TYPE, GladeCommandSetPropertyClass)) -#define GLADE_IS_COMMAND_SET_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_SET_PROPERTY_TYPE)) -#define GLADE_IS_COMMAND_SET_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_SET_PROPERTY_TYPE)) +#define GLADE_COMMAND_SET_PROPERTY_TYPE (glade_command_set_property_get_type ()) +#define GLADE_COMMAND_SET_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_SET_PROPERTY_TYPE, GladeCommandSetProperty)) +#define GLADE_COMMAND_SET_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_SET_PROPERTY_TYPE, GladeCommandSetPropertyClass)) +#define GLADE_IS_COMMAND_SET_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_SET_PROPERTY_TYPE)) +#define GLADE_IS_COMMAND_SET_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_SET_PROPERTY_TYPE)) /* Undo the last "set property command" */ static gboolean @@ -588,18 +587,18 @@ glade_command_set_property_execute (GladeCommand *cmd) #ifdef GLADE_ENABLE_DEBUG if (glade_get_debug_flags () & GLADE_DEBUG_COMMANDS) - { - gchar *str = + { + gchar *str = glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (pclass), pclass, &new_value); - g_print ("Setting %s property of %s to %s (sumode: %d)\n", - glade_property_class_id (pclass), - glade_widget_get_name (widget), - str, glade_property_superuser ()); + g_print ("Setting %s property of %s to %s (sumode: %d)\n", + glade_property_class_id (pclass), + glade_widget_get_name (widget), + str, glade_property_superuser ()); - g_free (str); - } + g_free (str); + } #endif /* Packing properties need to be refreshed here since @@ -700,7 +699,7 @@ glade_command_set_property_unifies (GladeCommand *this_cmd, for (list = cmd1->sdata; list; list = list->next) { pdata1 = list->data; - pclass1 = glade_property_get_class (pdata1->property); + pclass1 = glade_property_get_class (pdata1->property); if (glade_property_class_compare (pclass1, pdata1->old_value, @@ -725,14 +724,14 @@ glade_command_set_property_unifies (GladeCommand *this_cmd, for (list = cmd1->sdata; list; list = list->next) { pdata1 = list->data; - pclass1 = glade_property_get_class (pdata1->property); - widget1 = glade_property_get_widget (pdata1->property); + pclass1 = glade_property_get_class (pdata1->property); + widget1 = glade_property_get_widget (pdata1->property); for (l = cmd2->sdata; l; l = l->next) { pdata2 = l->data; - pclass2 = glade_property_get_class (pdata2->property); - widget2 = glade_property_get_widget (pdata2->property); + pclass2 = glade_property_get_class (pdata2->property); + widget2 = glade_property_get_widget (pdata2->property); if (widget1 == widget2 && glade_property_class_match (pclass1, pclass2)) @@ -775,7 +774,7 @@ glade_command_set_property_collapse (GladeCommand *this_cmd, for (l = cmd2->sdata; l; l = l->next) { pdata2 = l->data; - pclass2 = glade_property_get_class (pdata2->property); + pclass2 = glade_property_get_class (pdata2->property); if (glade_property_class_match (pclass1, pclass2)) { @@ -795,7 +794,7 @@ glade_command_set_property_collapse (GladeCommand *this_cmd, } -#define MAX_UNDO_MENU_ITEM_VALUE_LEN 10 +#define MAX_UNDO_MENU_ITEM_VALUE_LEN 10 static gchar * glade_command_set_property_description (GladeCommandSetProperty *me) { @@ -815,7 +814,7 @@ glade_command_set_property_description (GladeCommandSetProperty *me) pclass = glade_property_get_class (sdata->property); widget = glade_property_get_widget (sdata->property); value_name = glade_widget_adaptor_string_from_value - (glade_property_class_get_adaptor (pclass), pclass, sdata->new_value); + (glade_property_class_get_adaptor (pclass), pclass, sdata->new_value); if (!value_name || strlen (value_name) > MAX_UNDO_MENU_ITEM_VALUE_LEN || strchr (value_name, '_')) @@ -987,11 +986,11 @@ typedef struct /* standard macros */ GLADE_MAKE_COMMAND (GladeCommandSetName, glade_command_set_name); -#define GLADE_COMMAND_SET_NAME_TYPE (glade_command_set_name_get_type ()) -#define GLADE_COMMAND_SET_NAME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_SET_NAME_TYPE, GladeCommandSetName)) -#define GLADE_COMMAND_SET_NAME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_SET_NAME_TYPE, GladeCommandSetNameClass)) -#define GLADE_IS_COMMAND_SET_NAME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_SET_NAME_TYPE)) -#define GLADE_IS_COMMAND_SET_NAME_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_SET_NAME_TYPE)) +#define GLADE_COMMAND_SET_NAME_TYPE (glade_command_set_name_get_type ()) +#define GLADE_COMMAND_SET_NAME(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_SET_NAME_TYPE, GladeCommandSetName)) +#define GLADE_COMMAND_SET_NAME_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_SET_NAME_TYPE, GladeCommandSetNameClass)) +#define GLADE_IS_COMMAND_SET_NAME(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_SET_NAME_TYPE)) +#define GLADE_IS_COMMAND_SET_NAME_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_SET_NAME_TYPE)) /* Undo the last "set name command" */ static gboolean @@ -1050,7 +1049,7 @@ glade_command_set_name_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd) { cmd1 = (GladeCommandSetName *) this_cmd; - return (g_strcmp0 (cmd1->old_name, cmd1->name) == 0); + return (g_strcmp0 (cmd1->old_name, cmd1->name) == 0); } return FALSE; } @@ -1138,11 +1137,11 @@ typedef struct GLADE_MAKE_COMMAND (GladeCommandAddRemove, glade_command_add_remove); -#define GLADE_COMMAND_ADD_REMOVE_TYPE (glade_command_add_remove_get_type ()) -#define GLADE_COMMAND_ADD_REMOVE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_ADD_REMOVE_TYPE, GladeCommandAddRemove)) -#define GLADE_COMMAND_ADD_REMOVE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_ADD_REMOVE_TYPE, GladeCommandAddRemoveClass)) -#define GLADE_IS_COMMAND_ADD_REMOVE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_ADD_REMOVE_TYPE)) -#define GLADE_IS_COMMAND_ADD_REMOVE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_ADD_REMOVE_TYPE)) +#define GLADE_COMMAND_ADD_REMOVE_TYPE (glade_command_add_remove_get_type ()) +#define GLADE_COMMAND_ADD_REMOVE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_ADD_REMOVE_TYPE, GladeCommandAddRemove)) +#define GLADE_COMMAND_ADD_REMOVE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_ADD_REMOVE_TYPE, GladeCommandAddRemoveClass)) +#define GLADE_IS_COMMAND_ADD_REMOVE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_ADD_REMOVE_TYPE)) +#define GLADE_IS_COMMAND_ADD_REMOVE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_ADD_REMOVE_TYPE)) static void glade_command_placeholder_destroyed (GtkWidget *object, CommandData *cdata) @@ -1215,8 +1214,8 @@ void glade_command_add (GList *widgets, GladeWidget *parent, GladePlaceholder *placeholder, - GladeProject *project, - gboolean pasting) + GladeProject *project, + gboolean pasting) { GladeCommandAddRemove *me; GladeCommand *cmd; @@ -1269,11 +1268,11 @@ glade_command_add (GList *widgets, /* Parent */ if (parent == NULL) - cdata->parent = glade_widget_get_parent (widget); + cdata->parent = glade_widget_get_parent (widget); else if (placeholder && GWA_IS_TOPLEVEL (adaptor) == FALSE) - cdata->parent = glade_placeholder_get_parent (placeholder); + cdata->parent = glade_placeholder_get_parent (placeholder); else - cdata->parent = parent; + cdata->parent = parent; /* Placeholder */ if (placeholder != NULL && g_list_length (widgets) == 1) @@ -1402,7 +1401,7 @@ glade_command_remove (GList *widgets) GLADE_UI_WARN, NULL, _("%s is locked by %s, edit %s first."), glade_widget_get_name (widget), - glade_widget_get_name (lock), + glade_widget_get_name (lock), glade_widget_get_name (lock)); return; } @@ -1435,7 +1434,7 @@ glade_command_remove (GList *widgets) /* If we're removing the template widget, then we need to unset it as template */ if (glade_project_get_template (GLADE_COMMAND (me)->priv->project) == widget) - glade_command_set_project_template (GLADE_COMMAND (me)->priv->project, NULL); + glade_command_set_project_template (GLADE_COMMAND (me)->priv->project, NULL); /* Undoably unset any object properties that may point to the removed object */ glade_command_delete_prop_refs (widget); @@ -1454,13 +1453,13 @@ glade_command_remove (GList *widgets) /* Record packing props if not deleted from the clipboard */ if (me->from_clipboard == FALSE) - { - for (l = glade_widget_get_packing_properties (widget); l; l = l->next) - cdata->pack_props = - g_list_prepend (cdata->pack_props, - glade_property_dup (GLADE_PROPERTY (l->data), - cdata->widget)); - } + { + for (l = glade_widget_get_packing_properties (widget); l; l = l->next) + cdata->pack_props = + g_list_prepend (cdata->pack_props, + glade_property_dup (GLADE_PROPERTY (l->data), + cdata->widget)); + } } g_assert (widget); @@ -1510,15 +1509,15 @@ glade_command_add_execute (GladeCommandAddRemove *me) cdata = list->data; saved_props = NULL; - GLADE_NOTE (COMMANDS, - g_print ("Adding widget '%s' to parent '%s' " - "(from clipboard: %s, props recorded: %s, have placeholder: %s, child_type: %s)\n", - glade_widget_get_name (cdata->widget), - cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", - me->from_clipboard ? "yes" : "no", - cdata->props_recorded ? "yes" : "no", - cdata->placeholder ? "yes" : "no", - cdata->special_type)); + GLADE_NOTE (COMMANDS, + g_print ("Adding widget '%s' to parent '%s' " + "(from clipboard: %s, props recorded: %s, have placeholder: %s, child_type: %s)\n", + glade_widget_get_name (cdata->widget), + cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", + me->from_clipboard ? "yes" : "no", + cdata->props_recorded ? "yes" : "no", + cdata->placeholder ? "yes" : "no", + cdata->special_type)); if (cdata->parent != NULL) { @@ -1531,33 +1530,33 @@ glade_command_add_execute (GladeCommandAddRemove *me) saved_props = glade_widget_dup_properties (cdata->widget, glade_widget_get_packing_properties (cdata->widget), - FALSE, FALSE, FALSE); + FALSE, FALSE, FALSE); glade_widget_set_packing_properties (cdata->widget, cdata->parent); } - /* Clear it the first time around, ensure we record it after adding */ - if (cdata->props_recorded == FALSE) - g_object_set_data (glade_widget_get_object (cdata->widget), - "special-child-type", NULL); - else - g_object_set_data_full (glade_widget_get_object (cdata->widget), - "special-child-type", - g_strdup (cdata->special_type), - g_free); + /* Clear it the first time around, ensure we record it after adding */ + if (cdata->props_recorded == FALSE) + g_object_set_data (glade_widget_get_object (cdata->widget), + "special-child-type", NULL); + else + g_object_set_data_full (glade_widget_get_object (cdata->widget), + "special-child-type", + g_strdup (cdata->special_type), + g_free); /* glade_command_paste ganauntees that if * there we are pasting to a placeholder, * there is only one widget. */ if (cdata->placeholder) - glade_widget_replace (cdata->parent, - G_OBJECT (cdata->placeholder), - glade_widget_get_object (cdata->widget)); + glade_widget_replace (cdata->parent, + G_OBJECT (cdata->placeholder), + glade_widget_get_object (cdata->widget)); else - glade_widget_add_child (cdata->parent, - cdata->widget, - cdata->props_recorded == FALSE); + glade_widget_add_child (cdata->parent, + cdata->widget, + cdata->props_recorded == FALSE); glade_command_transfer_props (cdata->widget, saved_props); @@ -1572,13 +1571,13 @@ glade_command_add_execute (GladeCommandAddRemove *me) { GValue value = { 0, }; GladeProperty *saved_prop = l->data; - GladePropertyClass *pclass = glade_property_get_class (saved_prop); + GladePropertyClass *pclass = glade_property_get_class (saved_prop); GladeProperty *widget_prop = - glade_widget_get_pack_property (cdata->widget, glade_property_class_id (pclass)); + glade_widget_get_pack_property (cdata->widget, glade_property_class_id (pclass)); glade_property_get_value (saved_prop, &value); glade_property_set_value (widget_prop, &value); - glade_property_sync (widget_prop); + glade_property_sync (widget_prop); g_value_unset (&value); } @@ -1594,9 +1593,9 @@ glade_command_add_execute (GladeCommandAddRemove *me) g_assert (cdata->pack_props == NULL); for (l = glade_widget_get_packing_properties (cdata->widget); l; l = l->next) cdata->pack_props = - g_list_prepend (cdata->pack_props, - glade_property_dup (GLADE_PROPERTY (l->data), - cdata->widget)); + g_list_prepend (cdata->pack_props, + glade_property_dup (GLADE_PROPERTY (l->data), + cdata->widget)); /* Record the special-type here after replacing */ if ((special_child_type = @@ -1607,11 +1606,11 @@ glade_command_add_execute (GladeCommandAddRemove *me) cdata->special_type = g_strdup (special_child_type); } - GLADE_NOTE (COMMANDS, - g_print ("Recorded properties for adding widget '%s' to parent '%s' (special child: %s)\n", - glade_widget_get_name (cdata->widget), - cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", - cdata->special_type)); + GLADE_NOTE (COMMANDS, + g_print ("Recorded properties for adding widget '%s' to parent '%s' (special child: %s)\n", + glade_widget_get_name (cdata->widget), + cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", + cdata->special_type)); /* Mark the properties as recorded */ cdata->props_recorded = TRUE; @@ -1619,7 +1618,7 @@ glade_command_add_execute (GladeCommandAddRemove *me) } glade_project_add_object (GLADE_COMMAND (me)->priv->project, - glade_widget_get_object (cdata->widget)); + glade_widget_get_object (cdata->widget)); for (l = cdata->reffed; l; l = l->next) { @@ -1628,8 +1627,8 @@ glade_command_add_execute (GladeCommandAddRemove *me) glade_widget_get_object (reffed)); } - glade_project_selection_add (GLADE_COMMAND (me)->priv->project, - glade_widget_get_object (cdata->widget), FALSE); + glade_project_selection_add (GLADE_COMMAND (me)->priv->project, + glade_widget_get_object (cdata->widget), FALSE); glade_widget_show (cdata->widget); } @@ -1652,37 +1651,37 @@ glade_command_remove_execute (GladeCommandAddRemove *me) cdata = list->data; GLADE_NOTE (COMMANDS, - g_print ("Removing widget '%s' from parent '%s' " - "(from clipboard: %s, props recorded: %s, have placeholder: %s, child_type: %s)\n", - glade_widget_get_name (cdata->widget), - cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", - me->from_clipboard ? "yes" : "no", - cdata->props_recorded ? "yes" : "no", - cdata->placeholder ? "yes" : "no", - cdata->special_type)); + g_print ("Removing widget '%s' from parent '%s' " + "(from clipboard: %s, props recorded: %s, have placeholder: %s, child_type: %s)\n", + glade_widget_get_name (cdata->widget), + cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", + me->from_clipboard ? "yes" : "no", + cdata->props_recorded ? "yes" : "no", + cdata->placeholder ? "yes" : "no", + cdata->special_type)); glade_widget_hide (cdata->widget); if (cdata->props_recorded == FALSE) - { - /* Record the special-type here after replacing */ - if ((special_child_type = - g_object_get_data (glade_widget_get_object (cdata->widget), - "special-child-type")) != NULL) - { - g_free (cdata->special_type); - cdata->special_type = g_strdup (special_child_type); - } - - GLADE_NOTE (COMMANDS, - g_print ("Recorded properties for removing widget '%s' from parent '%s' (special child: %s)\n", - glade_widget_get_name (cdata->widget), - cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", - cdata->special_type)); - - /* Mark the properties as recorded */ - cdata->props_recorded = TRUE; - } + { + /* Record the special-type here after replacing */ + if ((special_child_type = + g_object_get_data (glade_widget_get_object (cdata->widget), + "special-child-type")) != NULL) + { + g_free (cdata->special_type); + cdata->special_type = g_strdup (special_child_type); + } + + GLADE_NOTE (COMMANDS, + g_print ("Recorded properties for removing widget '%s' from parent '%s' (special child: %s)\n", + glade_widget_get_name (cdata->widget), + cdata->parent ? glade_widget_get_name (cdata->parent) : "(none)", + cdata->special_type)); + + /* Mark the properties as recorded */ + cdata->props_recorded = TRUE; + } glade_project_remove_object (GLADE_COMMAND (me)->priv->project, glade_widget_get_object (cdata->widget)); @@ -1790,9 +1789,9 @@ glade_command_add_remove_collapse (GladeCommand *this_cmd, /** * glade_command_create: - * @adaptor: A #GladeWidgetAdaptor - * @parent (allow-none): the parent #GladeWidget to add the new widget to. - * @placeholder (allow-none): the placeholder which will be substituted by the widget + * @adaptor: A #GladeWidgetAdaptor + * @parent (allow-none): the parent #GladeWidget to add the new widget to. + * @placeholder (allow-none): the placeholder which will be substituted by the widget * @project: the project his widget belongs to. * * Creates a new widget using @adaptor and put in place of the @placeholder @@ -1857,7 +1856,7 @@ glade_command_delete (GList *widgets) widget = widgets->data; glade_command_push_group (_("Delete %s"), g_list_length (widgets) == 1 ? - glade_widget_get_name (widget) : _("multiple")); + glade_widget_get_name (widget) : _("multiple")); glade_command_remove (widgets); glade_command_pop_group (); } @@ -1883,7 +1882,7 @@ glade_command_cut (GList *widgets) widget = widgets->data; glade_command_push_group (_("Cut %s"), g_list_length (widgets) == 1 ? - glade_widget_get_name (widget) : _("multiple")); + glade_widget_get_name (widget) : _("multiple")); glade_command_remove (widgets); glade_command_pop_group (); @@ -1965,7 +1964,7 @@ void glade_command_paste (GList *widgets, GladeWidget *parent, GladePlaceholder *placeholder, - GladeProject *project) + GladeProject *project) { GList *list, *copied_widgets = NULL; GladeWidget *copied_widget = NULL; @@ -1985,7 +1984,7 @@ glade_command_paste (GList *widgets, glade_command_push_group (_("Paste %s"), g_list_length (widgets) == 1 ? - glade_widget_get_name (copied_widget) : _("multiple")); + glade_widget_get_name (copied_widget) : _("multiple")); glade_command_add (copied_widgets, parent, placeholder, project, TRUE); glade_command_pop_group (); @@ -2027,7 +2026,7 @@ glade_command_dnd (GList *widgets, glade_command_push_group (_("Drag %s and Drop to %s"), g_list_length (widgets) == 1 ? - glade_widget_get_name (widget) : _("multiple"), + glade_widget_get_name (widget) : _("multiple"), parent ? glade_widget_get_name (parent) : _("root")); glade_command_remove (widgets); glade_command_add (widgets, parent, placeholder, project, TRUE); @@ -2061,11 +2060,11 @@ typedef struct /* standard macros */ GLADE_MAKE_COMMAND (GladeCommandAddSignal, glade_command_add_signal); -#define GLADE_COMMAND_ADD_SIGNAL_TYPE (glade_command_add_signal_get_type ()) -#define GLADE_COMMAND_ADD_SIGNAL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_ADD_SIGNAL_TYPE, GladeCommandAddSignal)) -#define GLADE_COMMAND_ADD_SIGNAL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_ADD_SIGNAL_TYPE, GladeCommandAddSignalClass)) -#define GLADE_IS_COMMAND_ADD_SIGNAL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_ADD_SIGNAL_TYPE)) -#define GLADE_IS_COMMAND_ADD_SIGNAL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_ADD_SIGNAL_TYPE)) +#define GLADE_COMMAND_ADD_SIGNAL_TYPE (glade_command_add_signal_get_type ()) +#define GLADE_COMMAND_ADD_SIGNAL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_ADD_SIGNAL_TYPE, GladeCommandAddSignal)) +#define GLADE_COMMAND_ADD_SIGNAL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_ADD_SIGNAL_TYPE, GladeCommandAddSignalClass)) +#define GLADE_IS_COMMAND_ADD_SIGNAL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_ADD_SIGNAL_TYPE)) +#define GLADE_IS_COMMAND_ADD_SIGNAL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_ADD_SIGNAL_TYPE)) static void glade_command_add_signal_finalize (GObject *obj) @@ -2155,7 +2154,7 @@ glade_command_add_remove_change_signal (GladeWidget *glade_widget, g_strdup_printf (type == GLADE_ADD ? _("Add signal handler %s") : type == GLADE_REMOVE ? _("Remove signal handler %s") : _("Change signal handler %s"), - glade_signal_get_handler ((GladeSignal *)signal)); + glade_signal_get_handler ((GladeSignal *)signal)); glade_command_check_group (GLADE_COMMAND (me)); @@ -2233,11 +2232,11 @@ typedef struct GLADE_MAKE_COMMAND (GladeCommandSetI18n, glade_command_set_i18n); -#define GLADE_COMMAND_SET_I18N_TYPE (glade_command_set_i18n_get_type ()) -#define GLADE_COMMAND_SET_I18N(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_SET_I18N_TYPE, GladeCommandSetI18n)) -#define GLADE_COMMAND_SET_I18N_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_SET_I18N_TYPE, GladeCommandSetI18nClass)) -#define GLADE_IS_COMMAND_SET_I18N(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_SET_I18N_TYPE)) -#define GLADE_IS_COMMAND_SET_I18N_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_SET_I18N_TYPE)) +#define GLADE_COMMAND_SET_I18N_TYPE (glade_command_set_i18n_get_type ()) +#define GLADE_COMMAND_SET_I18N(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_SET_I18N_TYPE, GladeCommandSetI18n)) +#define GLADE_COMMAND_SET_I18N_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_SET_I18N_TYPE, GladeCommandSetI18nClass)) +#define GLADE_IS_COMMAND_SET_I18N(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_SET_I18N_TYPE)) +#define GLADE_IS_COMMAND_SET_I18N_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_SET_I18N_TYPE)) static gboolean glade_command_set_i18n_execute (GladeCommand *cmd) @@ -2398,11 +2397,11 @@ typedef struct GLADE_MAKE_COMMAND (GladeCommandLock, glade_command_lock); -#define GLADE_COMMAND_LOCK_TYPE (glade_command_lock_get_type ()) -#define GLADE_COMMAND_LOCK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_LOCK_TYPE, GladeCommandLock)) -#define GLADE_COMMAND_LOCK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_LOCK_TYPE, GladeCommandLockClass)) -#define GLADE_IS_COMMAND_LOCK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_LOCK_TYPE)) -#define GLADE_IS_COMMAND_LOCK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_LOCK_TYPE)) +#define GLADE_COMMAND_LOCK_TYPE (glade_command_lock_get_type ()) +#define GLADE_COMMAND_LOCK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_LOCK_TYPE, GladeCommandLock)) +#define GLADE_COMMAND_LOCK_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_LOCK_TYPE, GladeCommandLockClass)) +#define GLADE_IS_COMMAND_LOCK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_LOCK_TYPE)) +#define GLADE_IS_COMMAND_LOCK_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_LOCK_TYPE)) static gboolean glade_command_lock_execute (GladeCommand *cmd) @@ -2441,8 +2440,8 @@ glade_command_lock_finalize (GObject *obj) static gboolean glade_command_lock_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd) { -/* GladeCommandLock *cmd1; */ -/* GladeCommandLock *cmd2; */ +/* GladeCommandLock *cmd1; */ +/* GladeCommandLock *cmd2; */ /* No point here, this command undoubtedly always runs in groups */ return FALSE; } @@ -2489,8 +2488,8 @@ glade_command_lock_widget (GladeWidget *widget, GladeWidget *locked) GLADE_COMMAND (me)->priv->project = glade_widget_get_project (widget); GLADE_COMMAND (me)->priv->description = g_strdup_printf (_("Locking %s by widget %s"), - glade_widget_get_name (locked), - glade_widget_get_name (widget)); + glade_widget_get_name (locked), + glade_widget_get_name (widget)); glade_command_check_group (GLADE_COMMAND (me)); @@ -2560,10 +2559,10 @@ typedef struct } GladeCommandTarget; GLADE_MAKE_COMMAND (GladeCommandTarget, glade_command_target); -#define GLADE_COMMAND_TARGET_TYPE (glade_command_target_get_type ()) -#define GLADE_COMMAND_TARGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_TARGET_TYPE, GladeCommandTarget)) -#define GLADE_COMMAND_TARGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_TARGET_TYPE, GladeCommandTargetClass)) -#define GLADE_IS_COMMAND_TARGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_TARGET_TYPE)) +#define GLADE_COMMAND_TARGET_TYPE (glade_command_target_get_type ()) +#define GLADE_COMMAND_TARGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_TARGET_TYPE, GladeCommandTarget)) +#define GLADE_COMMAND_TARGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_TARGET_TYPE, GladeCommandTargetClass)) +#define GLADE_IS_COMMAND_TARGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_TARGET_TYPE)) #define GLADE_IS_COMMAND_TARGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_TARGET_TYPE)) static gboolean @@ -2572,9 +2571,9 @@ glade_command_target_execute (GladeCommand *cmd) GladeCommandTarget *me = (GladeCommandTarget *) cmd; glade_project_set_target_version (cmd->priv->project, - me->catalog, - me->new_major, - me->new_minor); + me->catalog, + me->new_major, + me->new_minor); return TRUE; } @@ -2585,9 +2584,9 @@ glade_command_target_undo (GladeCommand *cmd) GladeCommandTarget *me = (GladeCommandTarget *) cmd; glade_project_set_target_version (cmd->priv->project, - me->catalog, - me->old_major, - me->old_minor); + me->catalog, + me->old_major, + me->old_minor); return TRUE; } @@ -2614,8 +2613,8 @@ glade_command_target_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd) { me = (GladeCommandTarget *) this_cmd; - return (me->old_major == me->new_major && - me->old_minor == me->new_minor); + return (me->old_major == me->new_major && + me->old_minor == me->new_minor); } return FALSE; } @@ -2652,7 +2651,7 @@ glade_command_target_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd) g_free (this_cmd->priv->description); this_cmd->priv->description = g_strdup_printf (_("Setting target version of '%s' to %d.%d"), - this->catalog, this->new_major, this->new_minor); + this->catalog, this->new_major, this->new_minor); } @@ -2667,9 +2666,9 @@ glade_command_target_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd) */ void glade_command_set_project_target (GladeProject *project, - const gchar *catalog, - gint major, - gint minor) + const gchar *catalog, + gint major, + gint minor) { GladeCommandTarget *me; gint old_major = 0; @@ -2695,7 +2694,7 @@ glade_command_set_project_target (GladeProject *project, GLADE_COMMAND (me)->priv->description = g_strdup_printf (_("Setting target version of '%s' to %d.%d"), - me->catalog, me->new_major, me->new_minor); + me->catalog, me->new_major, me->new_minor); glade_command_check_group (GLADE_COMMAND (me)); @@ -2726,10 +2725,10 @@ typedef struct } GladeCommandProperty; GLADE_MAKE_COMMAND (GladeCommandProperty, glade_command_property); -#define GLADE_COMMAND_PROPERTY_TYPE (glade_command_property_get_type ()) -#define GLADE_COMMAND_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_PROPERTY_TYPE, GladeCommandProperty)) -#define GLADE_COMMAND_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_PROPERTY_TYPE, GladeCommandPropertyClass)) -#define GLADE_IS_COMMAND_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_PROPERTY_TYPE)) +#define GLADE_COMMAND_PROPERTY_TYPE (glade_command_property_get_type ()) +#define GLADE_COMMAND_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GLADE_COMMAND_PROPERTY_TYPE, GladeCommandProperty)) +#define GLADE_COMMAND_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GLADE_COMMAND_PROPERTY_TYPE, GladeCommandPropertyClass)) +#define GLADE_IS_COMMAND_PROPERTY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GLADE_COMMAND_PROPERTY_TYPE)) #define GLADE_IS_COMMAND_PROPERTY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GLADE_COMMAND_PROPERTY_TYPE)) /* Return true if a == b, this could be exported in glade_utils */ @@ -2882,7 +2881,7 @@ glade_command_property_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd static void glade_command_set_project_property (GladeProject *project, DescriptionNewFunc description_new, - const gchar *property_id, + const gchar *property_id, GValue *new_value) { GladeCommandProperty *me; @@ -2994,7 +2993,7 @@ gcp_domain_description_new (GladeCommand *cmd) */ void glade_command_set_project_domain (GladeProject *project, - const gchar *domain) + const gchar *domain) { GValue new_value = G_VALUE_INIT; @@ -3034,7 +3033,7 @@ gcp_template_description_new (GladeCommand *cmd) */ void glade_command_set_project_template (GladeProject *project, - GladeWidget *widget) + GladeWidget *widget) { GValue new_value = G_VALUE_INIT; diff --git a/gladeui/glade-command.h b/gladeui/glade-command.h index 44a5f09a..9242d301 100644 --- a/gladeui/glade-command.h +++ b/gladeui/glade-command.h @@ -66,7 +66,7 @@ struct _GladeCommandClass GType glade_command_get_type (void); void glade_command_push_group (const gchar *fmt, - ...) G_GNUC_PRINTF (1, 2); + ...) G_GNUC_PRINTF (1, 2); void glade_command_pop_group (void); gint glade_command_get_group_depth (void); @@ -75,21 +75,21 @@ gint glade_command_group_id (GladeCommand *com gboolean glade_command_execute (GladeCommand *command); gboolean glade_command_undo (GladeCommand *command); gboolean glade_command_unifies (GladeCommand *command, - GladeCommand *other); + GladeCommand *other); void glade_command_collapse (GladeCommand *command, - GladeCommand *other); + GladeCommand *other); /************************ project ******************************/ void glade_command_set_project_target (GladeProject *project, - const gchar *catalog, - gint major, - gint minor); + const gchar *catalog, + gint major, + gint minor); void glade_command_set_project_domain (GladeProject *project, - const gchar *domain); + const gchar *domain); void glade_command_set_project_template(GladeProject *project, - GladeWidget *widget); + GladeWidget *widget); void glade_command_set_project_license (GladeProject *project, const gchar *license); @@ -100,21 +100,21 @@ void glade_command_set_project_resource_path (GladeProject *project, /************************** properties *********************************/ void glade_command_set_property_enabled(GladeProperty *property, - gboolean enabled); + gboolean enabled); void glade_command_set_property (GladeProperty *property, - ...); + ...); void glade_command_set_property_value (GladeProperty *property, - const GValue *value); + const GValue *value); void glade_command_set_properties (GladeProperty *property, - const GValue *old_value, - const GValue *new_value, - ...); + const GValue *old_value, + const GValue *new_value, + ...); void glade_command_set_properties_list (GladeProject *project, - GList *props); /* list of GCSetPropData */ + GList *props); /* list of GCSetPropData */ /************************** name ******************************/ @@ -124,7 +124,7 @@ void glade_command_set_name (GladeWidget *glade_widget, con /************************ protection ******************************/ void glade_command_lock_widget (GladeWidget *widget, - GladeWidget *lock); + GladeWidget *lock); void glade_command_unlock_widget (GladeWidget *widget); @@ -132,49 +132,49 @@ void glade_command_unlock_widget (GladeWidget *widget); /************************ create/add/delete ******************************/ void glade_command_add (GList *widgets, - GladeWidget *parent, - GladePlaceholder *placeholder, - GladeProject *project, - gboolean pasting); + GladeWidget *parent, + GladePlaceholder *placeholder, + GladeProject *project, + gboolean pasting); void glade_command_delete (GList *widgets); GladeWidget *glade_command_create (GladeWidgetAdaptor *adaptor, - GladeWidget *parent, - GladePlaceholder *placeholder, - GladeProject *project); + GladeWidget *parent, + GladePlaceholder *placeholder, + GladeProject *project); /************************ cut/paste/dnd ******************************/ void glade_command_cut (GList *widgets); void glade_command_paste (GList *widgets, - GladeWidget *parent, - GladePlaceholder *placeholder, - GladeProject *project); + GladeWidget *parent, + GladePlaceholder *placeholder, + GladeProject *project); void glade_command_dnd (GList *widgets, - GladeWidget *parent, - GladePlaceholder *placeholder); + GladeWidget *parent, + GladePlaceholder *placeholder); /************************ signals ******************************/ void glade_command_add_signal (GladeWidget *glade_widget, - const GladeSignal *signal); + const GladeSignal *signal); void glade_command_remove_signal (GladeWidget *glade_widget, - const GladeSignal *signal); + const GladeSignal *signal); void glade_command_change_signal (GladeWidget *glade_widget, - const GladeSignal *old_signal, - const GladeSignal *new_signal); + const GladeSignal *old_signal, + const GladeSignal *new_signal); /************************ set i18n ******************************/ void glade_command_set_i18n (GladeProperty *property, - gboolean translatable, - const gchar *context, - const gchar *comment); + gboolean translatable, + const gchar *context, + const gchar *comment); G_END_DECLS diff --git a/gladeui/glade-cursor.c b/gladeui/glade-cursor.c index 812b56f5..8b73d0dc 100644 --- a/gladeui/glade-cursor.c +++ b/gladeui/glade-cursor.c @@ -57,7 +57,7 @@ set_cursor_recurse (GtkWidget * widget, GdkCursor * gdk_cursor) static void set_cursor (GladeProject *project, - GdkCursor *gdk_cursor) + GdkCursor *gdk_cursor) { GList *list; @@ -67,10 +67,10 @@ set_cursor (GladeProject *project, GObject *object = list->data; if (GTK_IS_WIDGET (object) && - gtk_widget_get_has_window (GTK_WIDGET (object))) - { - set_cursor_recurse (GTK_WIDGET (object), gdk_cursor); - } + gtk_widget_get_has_window (GTK_WIDGET (object))) + { + set_cursor_recurse (GTK_WIDGET (object), gdk_cursor); + } } } @@ -84,8 +84,8 @@ set_cursor (GladeProject *project, */ void glade_cursor_set (GladeProject *project, - GdkWindow *window, - GladeCursorType type) + GdkWindow *window, + GladeCursorType type) { GladeWidgetAdaptor *adaptor; GdkCursor *the_cursor = NULL; diff --git a/gladeui/glade-cursor.h b/gladeui/glade-cursor.h index c7a085ca..e38b5e09 100644 --- a/gladeui/glade-cursor.h +++ b/gladeui/glade-cursor.h @@ -13,42 +13,42 @@ G_BEGIN_DECLS * is called */ typedef struct _GladeCursor { - GdkCursor *selector; - GdkCursor *add_widget; /* fallback cursor if we cannot use widget_class->cursor */ - GdkCursor *resize_top_left; - GdkCursor *resize_top_right; - GdkCursor *resize_bottom_left; - GdkCursor *resize_bottom_right; - GdkCursor *resize_left; - GdkCursor *resize_right; - GdkCursor *resize_top; - GdkCursor *resize_bottom; - GdkCursor *drag; - - GdkPixbuf *add_widget_pixbuf; /* a pixbuf of the generic 'add' cursor */ + GdkCursor *selector; + GdkCursor *add_widget; /* fallback cursor if we cannot use widget_class->cursor */ + GdkCursor *resize_top_left; + GdkCursor *resize_top_right; + GdkCursor *resize_bottom_left; + GdkCursor *resize_bottom_right; + GdkCursor *resize_left; + GdkCursor *resize_right; + GdkCursor *resize_top; + GdkCursor *resize_bottom; + GdkCursor *drag; + + GdkPixbuf *add_widget_pixbuf; /* a pixbuf of the generic 'add' cursor */ } GladeCursor; /* Enumed values for each of the cursors for GladeCursor. For every * GdkCursor above there should be a enum here */ typedef enum { - GLADE_CURSOR_SELECTOR, - GLADE_CURSOR_ADD_WIDGET, - GLADE_CURSOR_RESIZE_TOP_LEFT, - GLADE_CURSOR_RESIZE_TOP_RIGHT, - GLADE_CURSOR_RESIZE_BOTTOM_LEFT, - GLADE_CURSOR_RESIZE_BOTTOM_RIGHT, - GLADE_CURSOR_RESIZE_LEFT, - GLADE_CURSOR_RESIZE_RIGHT, - GLADE_CURSOR_RESIZE_TOP, - GLADE_CURSOR_RESIZE_BOTTOM, - GLADE_CURSOR_DRAG + GLADE_CURSOR_SELECTOR, + GLADE_CURSOR_ADD_WIDGET, + GLADE_CURSOR_RESIZE_TOP_LEFT, + GLADE_CURSOR_RESIZE_TOP_RIGHT, + GLADE_CURSOR_RESIZE_BOTTOM_LEFT, + GLADE_CURSOR_RESIZE_BOTTOM_RIGHT, + GLADE_CURSOR_RESIZE_LEFT, + GLADE_CURSOR_RESIZE_RIGHT, + GLADE_CURSOR_RESIZE_TOP, + GLADE_CURSOR_RESIZE_BOTTOM, + GLADE_CURSOR_DRAG } GladeCursorType; void glade_cursor_init (void); void glade_cursor_set (GladeProject *project, - GdkWindow *window, - GladeCursorType type); + GdkWindow *window, + GladeCursorType type); const GdkPixbuf* glade_cursor_get_add_widget_pixbuf (void); G_END_DECLS diff --git a/gladeui/glade-debug.c b/gladeui/glade-debug.c index e0216de4..aae2f41c 100644 --- a/gladeui/glade-debug.c +++ b/gladeui/glade-debug.c @@ -99,9 +99,9 @@ glade_init_debug_flags (void) env_string = g_getenv ("GLADE_DEBUG"); if (env_string != NULL) - glade_debug_flags = - g_parse_debug_string (env_string, - glade_debug_keys, - G_N_ELEMENTS (glade_debug_keys)); + glade_debug_flags = + g_parse_debug_string (env_string, + glade_debug_keys, + G_N_ELEMENTS (glade_debug_keys)); } } diff --git a/gladeui/glade-debug.h b/gladeui/glade-debug.h index 5b692e2b..c591e2ad 100644 --- a/gladeui/glade-debug.h +++ b/gladeui/glade-debug.h @@ -13,10 +13,10 @@ typedef enum { #ifdef GLADE_ENABLE_DEBUG -#define GLADE_NOTE(type,action) \ - G_STMT_START { \ - if (glade_get_debug_flags () & GLADE_DEBUG_##type) \ - { action; }; \ +#define GLADE_NOTE(type,action) \ + G_STMT_START { \ + if (glade_get_debug_flags () & GLADE_DEBUG_##type) \ + { action; }; \ } G_STMT_END #else /* !GLADE_ENABLE_DEBUG */ diff --git a/gladeui/glade-design-layout.c b/gladeui/glade-design-layout.c index dd885d4f..3b90b483 100644 --- a/gladeui/glade-design-layout.c +++ b/gladeui/glade-design-layout.c @@ -536,7 +536,7 @@ glade_project_is_toplevel_active (GladeProject *project, GtkWidget *toplevel) for (l = glade_project_selection_get (project); l; l = g_list_next (l)) { if (GTK_IS_WIDGET (l->data) && - gtk_widget_is_ancestor (l->data, toplevel)) return TRUE; + gtk_widget_is_ancestor (l->data, toplevel)) return TRUE; } return FALSE; diff --git a/gladeui/glade-design-layout.h b/gladeui/glade-design-layout.h index 6fe37b72..b5e3480e 100644 --- a/gladeui/glade-design-layout.h +++ b/gladeui/glade-design-layout.h @@ -44,7 +44,7 @@ typedef struct _GladeDesignLayoutClass GladeDesignLayoutClass; struct _GladeDesignLayout { GtkBin parent_instance; - + GladeDesignLayoutPrivate *priv; }; diff --git a/gladeui/glade-design-view.c b/gladeui/glade-design-view.c index 524e95d2..a9995387 100644 --- a/gladeui/glade-design-view.c +++ b/gladeui/glade-design-view.c @@ -422,7 +422,7 @@ glade_design_view_init (GladeDesignView *view) gtk_widget_set_no_show_all (GTK_WIDGET (view), TRUE); gtk_orientable_set_orientation (GTK_ORIENTABLE (view), - GTK_ORIENTATION_VERTICAL); + GTK_ORIENTATION_VERTICAL); view->priv->project = NULL; view->priv->layout_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); diff --git a/gladeui/glade-displayable-values.h b/gladeui/glade-displayable-values.h index 726c6558..9f4e39f1 100644 --- a/gladeui/glade-displayable-values.h +++ b/gladeui/glade-displayable-values.h @@ -7,22 +7,22 @@ G_BEGIN_DECLS void glade_register_displayable_value (GType type, - const gchar *value, - const gchar *domain, - const gchar *string); + const gchar *value, + const gchar *domain, + const gchar *string); void glade_register_translated_value (GType type, - const gchar *value, - const gchar *string); + const gchar *value, + const gchar *string); gboolean glade_type_has_displayable_values (GType type); G_CONST_RETURN gchar *glade_get_displayable_value (GType type, - const gchar *value); + const gchar *value); gboolean glade_displayable_value_is_disabled (GType type, - const gchar *value); + const gchar *value); void glade_displayable_value_set_disabled (GType type, const gchar *value, @@ -30,7 +30,7 @@ void glade_displayable_value_set_disabled (GType type, G_CONST_RETURN gchar *glade_get_value_from_displayable (GType type, - const gchar *displayabe); + const gchar *displayabe); G_END_DECLS diff --git a/gladeui/glade-editable.c b/gladeui/glade-editable.c index 605b1415..ecb603e5 100644 --- a/gladeui/glade-editable.c +++ b/gladeui/glade-editable.c @@ -45,7 +45,7 @@ static void project_changed (GladeProject *project, GladeCommand *command, gboolean execute, - GladeEditable *editable) + GladeEditable *editable) { GladeWidget *widget; @@ -56,7 +56,7 @@ project_changed (GladeProject *project, static void project_closed (GladeProject *project, - GladeEditable *editable) + GladeEditable *editable) { glade_editable_load (editable, NULL); } @@ -69,7 +69,7 @@ editable_destroyed (GladeEditable *editable) static void glade_editable_load_default (GladeEditable *editable, - GladeWidget *widget) + GladeWidget *widget) { GladeWidget *old_widget; GladeProject *old_project; @@ -80,26 +80,26 @@ glade_editable_load_default (GladeEditable *editable, if (old_widget != widget) { if (old_widget) - { - g_signal_handlers_disconnect_by_func (old_project, G_CALLBACK (project_changed), editable); - g_signal_handlers_disconnect_by_func (old_project, G_CALLBACK (project_closed), editable); + { + g_signal_handlers_disconnect_by_func (old_project, G_CALLBACK (project_changed), editable); + g_signal_handlers_disconnect_by_func (old_project, G_CALLBACK (project_closed), editable); - g_object_set_qdata (G_OBJECT (editable), glade_editable_widget_quark, NULL); - g_object_set_qdata (G_OBJECT (editable), glade_editable_project_quark, NULL); - } + g_object_set_qdata (G_OBJECT (editable), glade_editable_widget_quark, NULL); + g_object_set_qdata (G_OBJECT (editable), glade_editable_project_quark, NULL); + } if (widget) - { - GladeProject *project = glade_widget_get_project (widget); + { + GladeProject *project = glade_widget_get_project (widget); - g_object_set_qdata (G_OBJECT (editable), glade_editable_widget_quark, widget); - g_object_set_qdata (G_OBJECT (editable), glade_editable_project_quark, project); + g_object_set_qdata (G_OBJECT (editable), glade_editable_widget_quark, widget); + g_object_set_qdata (G_OBJECT (editable), glade_editable_project_quark, project); - g_signal_connect (project, "changed", - G_CALLBACK (project_changed), editable); - g_signal_connect (project, "close", - G_CALLBACK (project_closed), editable); - } + g_signal_connect (project, "changed", + G_CALLBACK (project_changed), editable); + g_signal_connect (project, "close", + G_CALLBACK (project_closed), editable); + } } } diff --git a/gladeui/glade-editable.h b/gladeui/glade-editable.h index 11758109..f578ebe3 100644 --- a/gladeui/glade-editable.h +++ b/gladeui/glade-editable.h @@ -34,17 +34,17 @@ struct _GladeEditableIface /* virtual table */ void (* load) (GladeEditable *editable, - GladeWidget *widget); + GladeWidget *widget); void (* set_show_name) (GladeEditable *editable, - gboolean show_name); + gboolean show_name); }; GType glade_editable_get_type (void) G_GNUC_CONST; void glade_editable_load (GladeEditable *editable, - GladeWidget *widget); + GladeWidget *widget); void glade_editable_set_show_name (GladeEditable *editable, - gboolean show_name); + gboolean show_name); GladeWidget *glade_editable_loaded_widget (GladeEditable *editable); gboolean glade_editable_loading (GladeEditable *editable); diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c index a400078b..2739e514 100644 --- a/gladeui/glade-editor-property.c +++ b/gladeui/glade-editor-property.c @@ -97,15 +97,15 @@ struct _GladeEditorPropertyPrivate gchar *custom_text; /* Custom text to display in the property label */ guint loading : 1; /* True during glade_editor_property_load calls, this - * is used to avoid feedback from input widgets. - */ + * is used to avoid feedback from input widgets. + */ guint committing : 1; /* True while the editor property itself is applying - * the property with glade_editor_property_commit_no_callback (). - */ + * the property with glade_editor_property_commit_no_callback (). + */ guint use_command : 1; /* Whether we should use the glade command interface - * or skip directly to GladeProperty interface. - * (used for query dialogs). - */ + * or skip directly to GladeProperty interface. + * (used for query dialogs). + */ guint changed_blocked : 1; /* Whether the GladeProperty changed signal is currently blocked */ guint disable_check : 1; /* Whether to explicitly disable the optional check button */ @@ -126,7 +126,7 @@ G_DEFINE_TYPE_WITH_CODE (GladeEditorProperty, glade_editor_property, GTK_TYPE_BO *******************************************************************************/ static void glade_editor_property_editable_load (GladeEditable *editable, - GladeWidget *widget) + GladeWidget *widget) { /* Chain up to default implementation */ parent_editable_iface->load (editable, widget); @@ -235,7 +235,7 @@ glade_editor_property_commit_no_callback (GladeEditorProperty *eprop, void glade_editor_property_set_custom_text (GladeEditorProperty *eprop, - const gchar *custom_text) + const gchar *custom_text) { GladeEditorPropertyPrivate *priv; @@ -249,8 +249,8 @@ glade_editor_property_set_custom_text (GladeEditorProperty *eprop, priv->custom_text = g_strdup (custom_text); if (priv->item_label) - glade_property_label_set_custom_text (GLADE_PROPERTY_LABEL (priv->item_label), - custom_text); + glade_property_label_set_custom_text (GLADE_PROPERTY_LABEL (priv->item_label), + custom_text); g_object_notify (G_OBJECT (eprop), "custom-text"); } @@ -302,8 +302,8 @@ glade_editor_property_get_item_label (GladeEditorProperty *eprop) g_object_ref_sink (eprop->priv->item_label); if (eprop->priv->property) - glade_property_label_set_property (GLADE_PROPERTY_LABEL (eprop->priv->item_label), - eprop->priv->property); + glade_property_label_set_property (GLADE_PROPERTY_LABEL (eprop->priv->item_label), + eprop->priv->property); } return eprop->priv->item_label; @@ -383,7 +383,7 @@ glade_editor_property_enabled_toggled_cb (GtkWidget *check, GladeEditorProperty *eprop) { glade_command_set_property_enabled (eprop->priv->property, - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check))); + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check))); } static void @@ -442,7 +442,7 @@ glade_editor_property_constructed (GObject *object) gtk_button_set_focus_on_click (GTK_BUTTON (eprop->priv->check), FALSE); if (!eprop->priv->disable_check) - gtk_widget_show (eprop->priv->check); + gtk_widget_show (eprop->priv->check); gtk_box_pack_start (GTK_BOX (eprop), eprop->priv->check, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (eprop->priv->check), "toggled", @@ -510,8 +510,8 @@ glade_editor_property_set_property (GObject *object, glade_editor_property_set_disable_check (eprop, g_value_get_boolean (value)); break; case PROP_CUSTOM_TEXT: - glade_editor_property_set_custom_text (eprop, g_value_get_string (value)); - break; + glade_editor_property_set_custom_text (eprop, g_value_get_string (value)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -520,8 +520,8 @@ glade_editor_property_set_property (GObject *object, static void glade_editor_property_real_get_property (GObject *object, - guint prop_id, - GValue *value, + guint prop_id, + GValue *value, GParamSpec *pspec) { GladeEditorProperty *eprop = GLADE_EDITOR_PROPERTY (object); @@ -535,11 +535,11 @@ glade_editor_property_real_get_property (GObject *object, g_value_set_boolean (value, eprop->priv->use_command); break; case PROP_DISABLE_CHECK: - g_value_set_boolean (value, eprop->priv->disable_check); - break; + g_value_set_boolean (value, eprop->priv->disable_check); + break; case PROP_CUSTOM_TEXT: - g_value_set_string (value, eprop->priv->custom_text); - break; + g_value_set_string (value, eprop->priv->custom_text); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -636,9 +636,9 @@ glade_editor_property_load_common (GladeEditorProperty *eprop, /* Load initial tooltips */ glade_editor_property_tooltip_cb - (property, glade_property_class_get_tooltip (pclass), - glade_propert_get_insensitive_tooltip (property), - glade_property_get_support_warning (property), eprop); + (property, glade_property_class_get_tooltip (pclass), + glade_propert_get_insensitive_tooltip (property), + glade_property_get_support_warning (property), eprop); /* Load initial enabled state */ @@ -657,7 +657,7 @@ glade_editor_property_init (GladeEditorProperty *eprop) gtk_box_set_spacing (GTK_BOX (eprop), 4); gtk_orientable_set_orientation (GTK_ORIENTABLE (eprop), - GTK_ORIENTATION_HORIZONTAL); + GTK_ORIENTATION_HORIZONTAL); } static void @@ -870,7 +870,7 @@ glade_eprop_numeric_changed (GtkWidget *spin, GladeEditorProperty *eprop) static void glade_eprop_numeric_force_update (GtkSpinButton *spin, - GladeEditorProperty *eprop) + GladeEditorProperty *eprop) { GladeProperty *prop = glade_editor_property_get_property (eprop); GladePropertyClass *klass = glade_property_get_class (prop); @@ -1104,10 +1104,10 @@ glade_eprop_enum_create_input (GladeEditorProperty *eprop) cell_renderer = gtk_cell_renderer_text_new (); g_object_set (cell_renderer, - "wrap-mode", PANGO_WRAP_WORD, - "wrap-width", 1, - "width-chars", 8, - NULL); + "wrap-mode", PANGO_WRAP_WORD, + "wrap-width", 1, + "width-chars", 8, + NULL); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (eprop_enum->combo_box), cell_renderer, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (eprop_enum->combo_box), @@ -1447,42 +1447,42 @@ glade_eprop_color_load (GladeEditorProperty *eprop, GladeProperty *property) gtk_entry_set_text (GTK_ENTRY (eprop_color->entry), ""); if (pspec->value_type == GDK_TYPE_COLOR) - { - if ((color = g_value_get_boxed (glade_property_inline_value (property))) != NULL) - { - GdkRGBA copy; - - copy.red = color->red / 65535.0; - copy.green = color->green / 65535.0; - copy.blue = color->blue / 65535.0; - copy.alpha = 1.0; - - gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), ©); - } - else - { - GdkRGBA black = { 0, }; - - /* Manually fill it with black for an NULL value. - */ - if (gdk_rgba_parse (&black, "Black")) - gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), &black); - } - } + { + if ((color = g_value_get_boxed (glade_property_inline_value (property))) != NULL) + { + GdkRGBA copy; + + copy.red = color->red / 65535.0; + copy.green = color->green / 65535.0; + copy.blue = color->blue / 65535.0; + copy.alpha = 1.0; + + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), ©); + } + else + { + GdkRGBA black = { 0, }; + + /* Manually fill it with black for an NULL value. + */ + if (gdk_rgba_parse (&black, "Black")) + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), &black); + } + } else if (pspec->value_type == GDK_TYPE_RGBA) - { - if ((rgba = g_value_get_boxed (glade_property_inline_value (property))) != NULL) - gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), rgba); - else - { - GdkRGBA black = { 0, }; + { + if ((rgba = g_value_get_boxed (glade_property_inline_value (property))) != NULL) + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), rgba); + else + { + GdkRGBA black = { 0, }; - /* Manually fill it with black for an NULL value. - */ - if (gdk_rgba_parse (&black, "Black")) - gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), &black); - } - } + /* Manually fill it with black for an NULL value. + */ + if (gdk_rgba_parse (&black, "Black")) + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (eprop_color->cbutton), &black); + } + } } } @@ -1863,12 +1863,12 @@ glade_eprop_text_load (GladeEditorProperty *eprop, GladeProperty *property) gtk_text_view_get_buffer (GTK_TEXT_VIEW (eprop_text->text_entry)); if (pspec->value_type == G_TYPE_STRV || - pspec->value_type == value_array_type) + pspec->value_type == value_array_type) { - GladePropertyClass *pclass = glade_property_get_class (property); + GladePropertyClass *pclass = glade_property_get_class (property); gchar *text = glade_widget_adaptor_string_from_value - (glade_property_class_get_adaptor (pclass), - pclass, glade_property_inline_value (property)); + (glade_property_class_get_adaptor (pclass), + pclass, glade_property_inline_value (property)); gchar *old_text = text_buffer_get_text (buffer); /* Only update it if necessary, see notes bellow */ @@ -2092,8 +2092,8 @@ glade_editor_property_show_i18n_dialog (GtkWidget *parent, gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0); gtk_widget_set_tooltip_text (alignment, _("For short and ambiguous strings: type a word here to differentiate " - "the meaning of this string from the meaning of other occurrences of " - "the same string")); + "the meaning of this string from the meaning of other occurrences of " + "the same string")); sw = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (sw); @@ -2346,11 +2346,11 @@ get_text_view_height (void) { GtkWidget *label = gtk_label_new (NULL); PangoLayout *layout = - gtk_widget_create_pango_layout (label, - "The quick\n" - "brown fox\n" - "jumped over\n" - "the lazy dog"); + gtk_widget_create_pango_layout (label, + "The quick\n" + "brown fox\n" + "jumped over\n" + "the lazy dog"); pango_layout_get_pixel_size (layout, NULL, &height); @@ -2395,7 +2395,7 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop) eprop_text->store = (GtkTreeModel *) glade_eprop_text_create_store (glade_property_class_stock (klass) ? - GLADE_TYPE_STOCK : GLADE_TYPE_STOCK_IMAGE); + GLADE_TYPE_STOCK : GLADE_TYPE_STOCK_IMAGE); gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (eprop_text->store)); @@ -2621,8 +2621,8 @@ glade_eprop_check_load (GladeEditorProperty *eprop, GladeProperty *property) static void glade_eprop_check_active_notify (GObject *gobject, - GParamSpec *pspec, - GladeEditorProperty *eprop) + GParamSpec *pspec, + GladeEditorProperty *eprop) { GValue val = { 0, }; @@ -2650,12 +2650,12 @@ glade_eprop_check_create_input (GladeEditorProperty *eprop) label = glade_editor_property_get_item_label (eprop); glade_property_label_set_property_name (GLADE_PROPERTY_LABEL (label), - glade_property_class_id (pclass)); + glade_property_class_id (pclass)); glade_property_label_set_packing (GLADE_PROPERTY_LABEL (label), - glade_property_class_get_is_packing (pclass)); + glade_property_class_get_is_packing (pclass)); glade_property_label_set_append_colon (GLADE_PROPERTY_LABEL (label), FALSE); glade_property_label_set_custom_text (GLADE_PROPERTY_LABEL (label), - eprop->priv->custom_text); + eprop->priv->custom_text); gtk_widget_show (label); eprop_check->button = gtk_check_button_new (); @@ -2895,15 +2895,15 @@ glade_eprop_object_populate_view_real (GtkTreeStore *model, const gchar *widget_name; if ((widget = glade_widget_get_from_gobject (list->data)) != NULL) { - adaptor = glade_widget_get_adaptor (widget); + adaptor = glade_widget_get_adaptor (widget); has_decendant = - !parentless && glade_widget_has_decendant (widget, object_type); + !parentless && glade_widget_has_decendant (widget, object_type); good_type = (glade_widget_adaptor_get_object_type (adaptor) == object_type || g_type_is_a (glade_widget_adaptor_get_object_type (adaptor), object_type)); - widget_name = glade_widget_get_display_name (widget); + widget_name = glade_widget_get_display_name (widget); if (parentless) good_type = good_type && !GWA_IS_TOPLEVEL (adaptor); @@ -3370,25 +3370,25 @@ glade_eprop_object_show_dialog (GladeEditorProperty *eprop) if (selected) { GValue *value; - GObject *new_object, *old_object = NULL; - GladeWidget *new_widget; - const gchar *current_name; + GObject *new_object, *old_object = NULL; + GladeWidget *new_widget; + const gchar *current_name; glade_project_selection_set (project, - glade_widget_get_object (widget), + glade_widget_get_object (widget), TRUE); value = glade_property_class_make_gvalue_from_string - (eprop->priv->klass, glade_widget_get_name (selected), project); + (eprop->priv->klass, glade_widget_get_name (selected), project); - glade_property_get (eprop->priv->property, &old_object); - new_object = g_value_get_object (value); - new_widget = glade_widget_get_from_gobject (new_object); + glade_property_get (eprop->priv->property, &old_object); + new_object = g_value_get_object (value); + new_widget = glade_widget_get_from_gobject (new_object); - glade_command_push_group (_("Setting %s of %s to %s"), - glade_property_class_get_name (eprop->priv->klass), - glade_widget_get_name (widget), - glade_widget_get_name (new_widget)); + glade_command_push_group (_("Setting %s of %s to %s"), + glade_property_class_get_name (eprop->priv->klass), + glade_widget_get_name (widget), + glade_widget_get_name (new_widget)); /* Unparent the widget so we can reuse it for this property */ if (glade_property_class_parentless_widget (eprop->priv->klass)) @@ -3398,27 +3398,27 @@ glade_eprop_object_show_dialog (GladeEditorProperty *eprop) if (!G_IS_PARAM_SPEC_OBJECT (pspec)) g_warning ("Parentless widget property should be of object type"); else if (new_object && old_object != new_object) - { - /* Steal parentless reference widget references, basically some references - * can only be referenced by one property, here we clear it if such a reference - * exists for the target object - */ - if ((old_ref = glade_widget_get_parentless_widget_ref (new_widget))) - glade_command_set_property (old_ref, NULL); - } - } - - /* Ensure that the object we will now refer to has an ID, the NULL - * check is just paranoia, it *always* has a name. - * - * To refer to a widget, it needs to have a name. - */ - glade_widget_ensure_name (new_widget, project, TRUE); - - glade_editor_property_commit (eprop, value); - glade_command_pop_group (); - - g_value_unset (value); + { + /* Steal parentless reference widget references, basically some references + * can only be referenced by one property, here we clear it if such a reference + * exists for the target object + */ + if ((old_ref = glade_widget_get_parentless_widget_ref (new_widget))) + glade_command_set_property (old_ref, NULL); + } + } + + /* Ensure that the object we will now refer to has an ID, the NULL + * check is just paranoia, it *always* has a name. + * + * To refer to a widget, it needs to have a name. + */ + glade_widget_ensure_name (new_widget, project, TRUE); + + glade_editor_property_commit (eprop, value); + glade_command_pop_group (); + + g_value_unset (value); g_free (value); } } @@ -3437,16 +3437,16 @@ glade_eprop_object_show_dialog (GladeEditorProperty *eprop) if ((new_widget = glade_command_create (create_adaptor, NULL, NULL, project)) != NULL) { - GValue *value; + GValue *value; glade_project_selection_set (project, glade_widget_get_object (widget), TRUE); - /* Give the newly created object a name */ - glade_widget_ensure_name (new_widget, project, TRUE); + /* Give the newly created object a name */ + glade_widget_ensure_name (new_widget, project, TRUE); - value = g_new0 (GValue, 1); - g_value_init (value, pspec->value_type); - g_value_set_object (value, glade_widget_get_object (new_widget)); + value = g_new0 (GValue, 1); + g_value_init (value, pspec->value_type); + g_value_set_object (value, glade_widget_get_object (new_widget)); glade_editor_property_commit (eprop, value); @@ -3459,7 +3459,7 @@ glade_eprop_object_show_dialog (GladeEditorProperty *eprop) else if (res == GLADE_RESPONSE_CLEAR) { GValue *value = - glade_property_class_make_gvalue_from_string (eprop->priv->klass, NULL, project); + glade_property_class_make_gvalue_from_string (eprop->priv->klass, NULL, project); glade_editor_property_commit (eprop, value); @@ -3679,27 +3679,27 @@ glade_eprop_objects_show_dialog (GladeEditorProperty *eprop) glade_eprop_objects_selected_widget, &selected); if (selected) - { - glade_command_push_group (_("Setting %s of %s"), - glade_property_class_get_name (eprop->priv->klass), - glade_widget_get_name (widget)); - - /* Make sure the selected widgets have names now - */ - for (l = selected; l; l = l->next) - { - GObject *object = l->data; - GladeWidget *selected_widget = glade_widget_get_from_gobject (object); - - glade_widget_ensure_name (selected_widget, project, TRUE); - } - } + { + glade_command_push_group (_("Setting %s of %s"), + glade_property_class_get_name (eprop->priv->klass), + glade_widget_get_name (widget)); + + /* Make sure the selected widgets have names now + */ + for (l = selected; l; l = l->next) + { + GObject *object = l->data; + GladeWidget *selected_widget = glade_widget_get_from_gobject (object); + + glade_widget_ensure_name (selected_widget, project, TRUE); + } + } value = glade_property_class_make_gvalue (eprop->priv->klass, selected); glade_editor_property_commit (eprop, value); if (selected) - glade_command_pop_group (); + glade_command_pop_group (); g_value_unset (value); g_free (value); @@ -3804,7 +3804,7 @@ glade_editor_property_load_by_widget (GladeEditorProperty *eprop, glade_editor_property_load (eprop, property); if (eprop->priv->item_label) - glade_property_label_set_property (GLADE_PROPERTY_LABEL (eprop->priv->item_label), property); + glade_property_label_set_property (GLADE_PROPERTY_LABEL (eprop->priv->item_label), property); if (property) { @@ -3812,15 +3812,15 @@ glade_editor_property_load_by_widget (GladeEditorProperty *eprop, gtk_widget_show (GTK_WIDGET (eprop)); - if (eprop->priv->item_label) - gtk_widget_show (eprop->priv->item_label); + if (eprop->priv->item_label) + gtk_widget_show (eprop->priv->item_label); } else { gtk_widget_hide (GTK_WIDGET (eprop)); - if (eprop->priv->item_label) - gtk_widget_hide (eprop->priv->item_label); + if (eprop->priv->item_label) + gtk_widget_hide (eprop->priv->item_label); } } else diff --git a/gladeui/glade-editor-property.h b/gladeui/glade-editor-property.h index 8f7c8e4f..1f8f2b3b 100644 --- a/gladeui/glade-editor-property.h +++ b/gladeui/glade-editor-property.h @@ -10,54 +10,53 @@ G_BEGIN_DECLS *******************************************************************************/ /* XXX document me ! */ -#define GLADE_MAKE_EPROP_TYPE(func, type, parent) \ -GType \ -func ## _get_type (void) \ -{ \ - static GType cmd_type = 0; \ - \ - if (!cmd_type) \ - { \ - static const GTypeInfo info = \ - { \ - sizeof (type ## Class), \ - (GBaseInitFunc) NULL, \ - (GBaseFinalizeFunc) NULL, \ - (GClassInitFunc) func ## _class_init, \ - (GClassFinalizeFunc) NULL, \ - NULL, \ - sizeof (type), \ - 0, \ - (GInstanceInitFunc) NULL \ - }; \ - \ - cmd_type = g_type_register_static (parent, #type, &info, 0); \ - } \ - \ - return cmd_type; \ -} \ - - -#define GLADE_MAKE_EPROP(type, func) \ -static void \ -func ## _finalize (GObject *object); \ -static void \ -func ## _load (GladeEditorProperty *me, GladeProperty *property); \ -static GtkWidget * \ -func ## _create_input (GladeEditorProperty *me); \ -static void \ -func ## _class_init (gpointer parent_tmp, gpointer notused) \ -{ \ - GladeEditorPropertyClass *parent = parent_tmp; \ - GObjectClass* object_class; \ - object_class = G_OBJECT_CLASS (parent); \ - parent->load = func ## _load; \ - parent->create_input = func ## _create_input; \ - object_class->finalize = func ## _finalize; \ -} \ -typedef struct { \ - GladeEditorPropertyClass cmd; \ -} type ## Class; \ +#define GLADE_MAKE_EPROP_TYPE(func, type, parent) \ +GType \ +func ## _get_type (void) \ +{ \ + static GType cmd_type = 0; \ + \ + if (!cmd_type) \ + { \ + static const GTypeInfo info = { \ + sizeof (type ## Class), \ + (GBaseInitFunc) NULL, \ + (GBaseFinalizeFunc) NULL, \ + (GClassInitFunc) func ## _class_init, \ + (GClassFinalizeFunc) NULL, \ + NULL, \ + sizeof (type), \ + 0, \ + (GInstanceInitFunc) NULL \ + }; \ + \ + cmd_type = g_type_register_static (parent, #type, &info, 0); \ + } \ + \ + return cmd_type; \ +} + + +#define GLADE_MAKE_EPROP(type, func) \ +static void \ +func ## _finalize (GObject *object); \ +static void \ +func ## _load (GladeEditorProperty *me, GladeProperty *property); \ +static GtkWidget * \ +func ## _create_input (GladeEditorProperty *me); \ +static void \ +func ## _class_init (gpointer parent_tmp, gpointer notused) \ +{ \ + GladeEditorPropertyClass *parent = parent_tmp; \ + GObjectClass* object_class; \ + object_class = G_OBJECT_CLASS (parent); \ + parent->load = func ## _load; \ + parent->create_input = func ## _create_input; \ + object_class->finalize = func ## _finalize; \ +} \ +typedef struct { \ + GladeEditorPropertyClass cmd; \ +} type ## Class; \ GLADE_MAKE_EPROP_TYPE(func, type, GLADE_TYPE_EDITOR_PROPERTY) @@ -100,15 +99,15 @@ struct _GladeEditorPropertyClass { GType glade_editor_property_get_type (void) G_GNUC_CONST; void glade_editor_property_load (GladeEditorProperty *eprop, - GladeProperty *property); + GladeProperty *property); void glade_editor_property_load_by_widget (GladeEditorProperty *eprop, - GladeWidget *widget); + GladeWidget *widget); void glade_editor_property_commit (GladeEditorProperty *eprop, - GValue *value); + GValue *value); void glade_editor_property_commit_no_callback (GladeEditorProperty *eprop, - GValue *value); + GValue *value); void glade_editor_property_set_custom_text (GladeEditorProperty *eprop, const gchar *custom_text); const gchar *glade_editor_property_get_custom_text (GladeEditorProperty *eprop); @@ -127,8 +126,8 @@ gboolean glade_editor_property_show_i18n_dialog (GtkWidget gchar **comment, gboolean *translatable); gboolean glade_editor_property_show_resource_dialog (GladeProject *project, - GtkWidget *parent, - gchar **filename); + GtkWidget *parent, + gchar **filename); gboolean glade_editor_property_show_object_dialog (GladeProject *project, const gchar *title, diff --git a/gladeui/glade-editor-skeleton.c b/gladeui/glade-editor-skeleton.c index 2f05c0f8..6d4e68de 100644 --- a/gladeui/glade-editor-skeleton.c +++ b/gladeui/glade-editor-skeleton.c @@ -50,10 +50,10 @@ 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, + G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_editor_skeleton_editable_init) - G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, - glade_editor_skeleton_buildable_init)); + G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, + glade_editor_skeleton_buildable_init)); static void glade_editor_skeleton_init (GladeEditorSkeleton *skeleton) @@ -91,8 +91,8 @@ glade_editor_skeleton_dispose (GObject *object) * GladeEditableIface * *******************************************************************************/ static void -glade_editor_skeleton_load (GladeEditable *editable, - GladeWidget *widget) +glade_editor_skeleton_load (GladeEditable *editable, + GladeWidget *widget) { GladeEditorSkeleton *skeleton = GLADE_EDITOR_SKELETON (editable); GladeEditorSkeletonPrivate *priv = skeleton->priv; @@ -143,11 +143,11 @@ typedef struct static void editor_start_element (GMarkupParseContext *context, - const gchar *element_name, - const gchar **names, - const gchar **values, - gpointer user_data, - GError **error) + const gchar *element_name, + const gchar **names, + const gchar **values, + gpointer user_data, + GError **error) { EditorParserData *editor_data = (EditorParserData *)user_data; gchar *id; @@ -177,11 +177,11 @@ static const GMarkupParser editor_parser = static gboolean glade_editor_skeleton_custom_tag_start (GtkBuildable *buildable, - GtkBuilder *builder, - GObject *child, - const gchar *tagname, - GMarkupParser *parser, - gpointer *data) + GtkBuilder *builder, + GObject *child, + const gchar *tagname, + GMarkupParser *parser, + gpointer *data) { if (strcmp (tagname, "child-editors") == 0) { @@ -194,15 +194,15 @@ glade_editor_skeleton_custom_tag_start (GtkBuildable *buildable, } return parent_buildable_iface->custom_tag_start (buildable, builder, child, - tagname, parser, data); + tagname, parser, data); } static void glade_editor_skeleton_custom_finished (GtkBuildable *buildable, - GtkBuilder *builder, - GObject *child, - const gchar *tagname, - gpointer user_data) + GtkBuilder *builder, + GObject *child, + const gchar *tagname, + gpointer user_data) { EditorParserData *editor_data = (EditorParserData *)user_data; GSList *l; @@ -210,7 +210,7 @@ glade_editor_skeleton_custom_finished (GtkBuildable *buildable, if (strcmp (tagname, "child-editors") != 0) { parent_buildable_iface->custom_finished (buildable, builder, child, - tagname, user_data); + tagname, user_data); return; } @@ -222,11 +222,11 @@ glade_editor_skeleton_custom_finished (GtkBuildable *buildable, object = gtk_builder_get_object (builder, id); if (!GLADE_EDITABLE (object)) - g_warning ("Object '%s' is not a GladeEditable\n", - object ? G_OBJECT_TYPE_NAME (object) : "(null)"); + g_warning ("Object '%s' is not a GladeEditable\n", + object ? G_OBJECT_TYPE_NAME (object) : "(null)"); else - glade_editor_skeleton_add_editor (GLADE_EDITOR_SKELETON (buildable), - GLADE_EDITABLE (object)); + glade_editor_skeleton_add_editor (GLADE_EDITOR_SKELETON (buildable), + GLADE_EDITABLE (object)); } g_slist_free_full (editor_data->editors, g_free); @@ -252,7 +252,7 @@ glade_editor_skeleton_new (void) void glade_editor_skeleton_add_editor (GladeEditorSkeleton *skeleton, - GladeEditable *editor) + GladeEditable *editor) { GladeEditorSkeletonPrivate *priv; diff --git a/gladeui/glade-editor-skeleton.h b/gladeui/glade-editor-skeleton.h index 7ab1ef7d..dd4dbc8f 100644 --- a/gladeui/glade-editor-skeleton.h +++ b/gladeui/glade-editor-skeleton.h @@ -55,7 +55,7 @@ GType glade_editor_skeleton_get_type (void) G_GNUC_CONST; GtkWidget *glade_editor_skeleton_new (void); void glade_editor_skeleton_add_editor (GladeEditorSkeleton *skeleton, - GladeEditable *editor); + GladeEditable *editor); G_END_DECLS diff --git a/gladeui/glade-editor-table.c b/gladeui/glade-editor-table.c index 0256d884..034a2231 100644 --- a/gladeui/glade-editor-table.c +++ b/gladeui/glade-editor-table.c @@ -28,67 +28,67 @@ #include "glade-editor-table.h" -#define BLOCK_NAME_ENTRY_CB(table) \ - do { if (table->priv->name_entry) \ - g_signal_handlers_block_by_func (G_OBJECT (table->priv->name_entry), \ - G_CALLBACK (widget_name_edited), table); \ - } while (0); +#define BLOCK_NAME_ENTRY_CB(table) \ + do { if (table->priv->name_entry) \ + g_signal_handlers_block_by_func (G_OBJECT (table->priv->name_entry), \ + G_CALLBACK (widget_name_edited), table); \ + } while (0); -#define UNBLOCK_NAME_ENTRY_CB(table) \ - do { if (table->priv->name_entry) \ - g_signal_handlers_unblock_by_func (G_OBJECT (table->priv->name_entry), \ - G_CALLBACK (widget_name_edited), table); \ - } while (0); +#define UNBLOCK_NAME_ENTRY_CB(table) \ + do { if (table->priv->name_entry) \ + g_signal_handlers_unblock_by_func (G_OBJECT (table->priv->name_entry), \ + G_CALLBACK (widget_name_edited), table); \ + } while (0); -static void glade_editor_table_init (GladeEditorTable * self); -static void glade_editor_table_class_init (GladeEditorTableClass * klass); +static void glade_editor_table_init (GladeEditorTable *self); +static void glade_editor_table_class_init (GladeEditorTableClass *klass); -static void glade_editor_table_dispose (GObject *object); -static void glade_editor_table_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); +static void glade_editor_table_dispose (GObject *object); +static void glade_editor_table_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); -static void glade_editor_table_editable_init (GladeEditableIface * iface); -static void glade_editor_table_realize (GtkWidget * widget); -static void glade_editor_table_grab_focus (GtkWidget * widget); +static void glade_editor_table_editable_init (GladeEditableIface *iface); +static void glade_editor_table_realize (GtkWidget *widget); +static void glade_editor_table_grab_focus (GtkWidget *widget); static void append_name_field (GladeEditorTable *table); static void append_items (GladeEditorTable *table, - GladeWidgetAdaptor *adaptor, - GladeEditorPageType type); + GladeWidgetAdaptor *adaptor, + GladeEditorPageType type); struct _GladeEditorTablePrivate { GladeWidgetAdaptor *adaptor; /* The GladeWidgetAdaptor this - * table was created for. - */ + * table was created for. + */ GladeWidget *loaded_widget; /* A pointer to the currently loaded GladeWidget - */ - + */ + GtkWidget *name_label; /* A pointer to the "Name:" label (for show/hide) */ GtkWidget *name_entry; /* A pointer to the gtk_entry that holds - * the name of the widget. This is the - * first item _pack'ed to the table_widget. - * We have a pointer here because it is an - * entry which will not be created from a - * GladeProperty but rather from code. - */ + * the name of the widget. This is the + * first item _pack'ed to the table_widget. + * We have a pointer here because it is an + * entry which will not be created from a + * GladeProperty but rather from code. + */ GtkWidget *composite_check; /* A pointer to the composite check button */ GtkWidget *name_field; /* A box containing the name entry and composite check */ GList *properties; /* A list of GladeEditorPropery items. - * For each row in the gtk_table, there is a - * corrsponding GladeEditorProperty struct. - */ + * For each row in the gtk_table, there is a + * corrsponding GladeEditorProperty struct. + */ GladeEditorPageType type; /* Is this table to be used in the common tab, ? - * the general tab, a packing tab or the query popup ? - */ + * the general tab, a packing tab or the query popup ? + */ gint rows; @@ -120,9 +120,9 @@ glade_editor_table_class_init (GladeEditorTableClass *klass) g_object_class_install_property (object_class, PROP_PAGE_TYPE, g_param_spec_enum ("page-type", _("Page Type"), - _("The editor page type to create this GladeEditorTable for"), - GLADE_TYPE_EDITOR_PAGE_TYPE, GLADE_PAGE_GENERAL, - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _("The editor page type to create this GladeEditorTable for"), + GLADE_TYPE_EDITOR_PAGE_TYPE, GLADE_PAGE_GENERAL, + G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); } static void @@ -157,10 +157,10 @@ glade_editor_table_dispose (GObject *object) } static void -glade_editor_table_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +glade_editor_table_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { GladeEditorTable *table = GLADE_EDITOR_TABLE (object); @@ -234,14 +234,14 @@ widget_name_edited (GtkWidget *editable, GladeEditorTable *table) * Otherwise, we need to allocate a new unnamed prefix name for the widget */ if (!glade_widget_has_prop_refs (widget)) - { - gchar *unnamed_name = glade_project_new_widget_name (glade_widget_get_project (widget), NULL, GLADE_UNNAMED_PREFIX); - glade_command_set_name (widget, unnamed_name); - g_free (unnamed_name); - } + { + gchar *unnamed_name = glade_project_new_widget_name (glade_widget_get_project (widget), NULL, GLADE_UNNAMED_PREFIX); + glade_command_set_name (widget, unnamed_name); + g_free (unnamed_name); + } } else if (glade_project_available_widget_name (glade_widget_get_project (widget), - widget, new_name)) + widget, new_name)) glade_command_set_name (widget, new_name); g_free (new_name); @@ -249,7 +249,7 @@ widget_name_edited (GtkWidget *editable, GladeEditorTable *table) static void widget_composite_toggled (GtkToggleButton *composite_check, - GladeEditorTable *table) + GladeEditorTable *table) { GladeProject *project; @@ -265,16 +265,16 @@ widget_composite_toggled (GtkToggleButton *composite_check, if (project) { if (gtk_toggle_button_get_active (composite_check)) - glade_command_set_project_template (project, table->priv->loaded_widget); + glade_command_set_project_template (project, table->priv->loaded_widget); else - glade_command_set_project_template (project, NULL); + glade_command_set_project_template (project, NULL); } } static void widget_name_changed (GladeWidget *widget, GParamSpec *pspec, - GladeEditorTable *table) + GladeEditorTable *table) { if (!gtk_widget_get_mapped (GTK_WIDGET (table))) return; @@ -284,9 +284,9 @@ widget_name_changed (GladeWidget *widget, BLOCK_NAME_ENTRY_CB (table); if (glade_widget_has_name (table->priv->loaded_widget)) - gtk_entry_set_text (GTK_ENTRY (table->priv->name_entry), glade_widget_get_name (table->priv->loaded_widget)); + gtk_entry_set_text (GTK_ENTRY (table->priv->name_entry), glade_widget_get_name (table->priv->loaded_widget)); else - gtk_entry_set_text (GTK_ENTRY (table->priv->name_entry), ""); + gtk_entry_set_text (GTK_ENTRY (table->priv->name_entry), ""); UNBLOCK_NAME_ENTRY_CB (table); } @@ -294,25 +294,25 @@ widget_name_changed (GladeWidget *widget, static void widget_composite_changed (GladeWidget *widget, - GParamSpec *pspec, - GladeEditorTable *table) + GParamSpec *pspec, + GladeEditorTable *table) { if (!gtk_widget_get_mapped (GTK_WIDGET (table))) return; if (table->priv->name_label) gtk_label_set_text (GTK_LABEL (table->priv->name_label), - glade_widget_get_is_composite (table->priv->loaded_widget) ? - _("Class Name:") : _("ID:")); + glade_widget_get_is_composite (table->priv->loaded_widget) ? + _("Class Name:") : _("ID:")); if (table->priv->composite_check) { g_signal_handlers_block_by_func (G_OBJECT (table->priv->composite_check), - G_CALLBACK (widget_composite_toggled), table); + G_CALLBACK (widget_composite_toggled), table); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (table->priv->composite_check), - glade_widget_get_is_composite (table->priv->loaded_widget)); + glade_widget_get_is_composite (table->priv->loaded_widget)); g_signal_handlers_unblock_by_func (G_OBJECT (table->priv->composite_check), - G_CALLBACK (widget_composite_toggled), table); + G_CALLBACK (widget_composite_toggled), table); } } @@ -427,10 +427,10 @@ glade_editor_table_set_show_name (GladeEditable *editable, gboolean show_name) table->priv->show_name = show_name; if (table->priv->name_label) - { - gtk_widget_set_visible (table->priv->name_label, show_name); - gtk_widget_set_visible (table->priv->name_field, show_name); - } + { + gtk_widget_set_visible (table->priv->name_label, show_name); + gtk_widget_set_visible (table->priv->name_field, show_name); + } } } @@ -511,9 +511,9 @@ get_sorted_properties (GladeWidgetAdaptor *adaptor, GladeEditorPageType type) * out properties from the GladeEditorTable using the "custom-layout" attribute. */ if (GLADE_PROPERTY_CLASS_IS_TYPE (klass, type) && - (type == GLADE_PAGE_QUERY || - (!glade_property_class_custom_layout (klass) && - glade_property_class_is_visible (klass)))) + (type == GLADE_PAGE_QUERY || + (!glade_property_class_custom_layout (klass) && + glade_property_class_is_visible (klass)))) { list = g_list_prepend (list, klass); } @@ -535,7 +535,7 @@ append_item (GladeEditorTable *table, { g_critical ("Unable to create editor for property '%s' of class '%s'", glade_property_class_id (klass), - glade_widget_adaptor_get_name (glade_property_class_get_adaptor (klass))); + glade_widget_adaptor_get_name (glade_property_class_get_adaptor (klass))); return NULL; } diff --git a/gladeui/glade-editor-table.h b/gladeui/glade-editor-table.h index 6fdcbdf8..45703c93 100644 --- a/gladeui/glade-editor-table.h +++ b/gladeui/glade-editor-table.h @@ -27,10 +27,10 @@ G_BEGIN_DECLS -#define GLADE_TYPE_EDITOR_TABLE (glade_editor_table_get_type ()) -#define GLADE_EDITOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EDITOR_TABLE, GladeEditorTable)) -#define GLADE_EDITOR_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_EDITOR_TABLE, GladeEditorTableClass)) -#define GLADE_IS_EDITOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EDITOR_TABLE)) +#define GLADE_TYPE_EDITOR_TABLE (glade_editor_table_get_type ()) +#define GLADE_EDITOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EDITOR_TABLE, GladeEditorTable)) +#define GLADE_EDITOR_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_EDITOR_TABLE, GladeEditorTableClass)) +#define GLADE_IS_EDITOR_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EDITOR_TABLE)) #define GLADE_IS_EDITOR_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EDITOR_TABLE)) #define GLADE_EDITOR_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_EDITOR_TABLE, GladeEditorEditorClass)) @@ -57,7 +57,7 @@ struct _GladeEditorTableClass GType glade_editor_table_get_type (void); GtkWidget *glade_editor_table_new (GladeWidgetAdaptor *adaptor, - GladeEditorPageType type); + GladeEditorPageType type); G_END_DECLS diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c index e081cb8c..8906af5e 100644 --- a/gladeui/glade-editor.c +++ b/gladeui/glade-editor.c @@ -53,9 +53,9 @@ #include "glade-editor-property.h" static void glade_editor_switch_page (GtkNotebook *notebook, - GtkWidget *page, - guint page_num, - GladeEditor *editor); + GtkWidget *page, + guint page_num, + GladeEditor *editor); enum { @@ -76,24 +76,24 @@ struct _GladeEditorPrivate GtkWidget *notebook; /* The notebook widget */ GladeWidget *loaded_widget; /* A handy pointer to the GladeWidget - * that is loaded in the editor. NULL - * if no widgets are selected - */ + * that is loaded in the editor. NULL + * if no widgets are selected + */ GladeWidgetAdaptor *loaded_adaptor; /* A pointer to the loaded - * GladeWidgetAdaptor. Note that we can - * have a class loaded without a - * loaded_widget. For this reason we - * can't use loaded_widget->adaptor. - * When a widget is selected we load - * this class in the editor first and - * then fill the values of the inputs - * with the GladeProperty items. - * This is usefull for not having - * to redraw/container_add the widgets - * when we switch from widgets of the - * same class - */ + * GladeWidgetAdaptor. Note that we can + * have a class loaded without a + * loaded_widget. For this reason we + * can't use loaded_widget->adaptor. + * When a widget is selected we load + * this class in the editor first and + * then fill the values of the inputs + * with the GladeProperty items. + * This is usefull for not having + * to redraw/container_add the widgets + * when we switch from widgets of the + * same class + */ GtkWidget *page_widget; GtkWidget *page_packing; @@ -101,24 +101,24 @@ struct _GladeEditorPrivate GtkWidget *page_atk; GladeSignalEditor *signal_editor; /* The signal editor packed into vbox_signals - */ + */ GList *editables; /* A list of GladeEditables. We have a widget - * for each GladeWidgetAdaptor and we only load - * them on demand - */ - + * for each GladeWidgetAdaptor and we only load + * them on demand + */ + GtkWidget *packing_page; /* Packing pages are dynamicly created each - * selection, this pointer is only to free - * the last packing page. - */ + * selection, this pointer is only to free + * the last packing page. + */ gboolean loading; /* Use when loading a GladeWidget into the editor - * we set this flag so that we can ignore the - * "changed" signal of the name entry text since - * the name has not really changed, just a new name - * was loaded. - */ + * we set this flag so that we can ignore the + * "changed" signal of the name entry text since + * the name has not really changed, just a new name + * was loaded. + */ gulong project_closed_signal_id; /* Unload widget when widget's project closes */ gulong project_removed_signal_id; /* Unload widget when its removed from the project. */ @@ -128,9 +128,9 @@ struct _GladeEditorPrivate GtkWidget *class_field; /* The class header */ GtkWidget *warning; /* A pointer to an icon we can show in the class - * field to publish tooltips for class related - * versioning errors. - */ + * field to publish tooltips for class related + * versioning errors. + */ GtkWidget *class_icon; /* An image with the current widget's class icon. */ GtkWidget *class_label; /* A label with the current class label. */ @@ -325,7 +325,7 @@ glade_editor_update_class_field (GladeEditor *editor) text = g_strdup_printf (_("%s Properties - %s [%s]"), glade_widget_adaptor_get_title (priv->loaded_adaptor), glade_widget_adaptor_get_display_name (priv->loaded_adaptor), - glade_widget_get_display_name (widget)); + glade_widget_get_display_name (widget)); } else { @@ -335,8 +335,8 @@ glade_editor_update_class_field (GladeEditor *editor) text = g_strdup_printf (_("%s Properties - %s"), glade_widget_adaptor_get_title (priv->loaded_adaptor), glade_widget_adaptor_get_display_name (priv->loaded_adaptor)); - } - + } + gtk_label_set_text (GTK_LABEL (priv->class_label), text); g_free (text); @@ -361,10 +361,10 @@ glade_editor_update_widget_name_cb (GladeWidget *widget, } static void -glade_editor_switch_page (GtkNotebook *notebook, - GtkWidget *page, - guint page_num, - GladeEditor *editor) +glade_editor_switch_page (GtkNotebook *notebook, + GtkWidget *page, + guint page_num, + GladeEditor *editor) { GladeEditorPrivate *priv = GLADE_EDITOR_PRIVATE (editor); @@ -458,14 +458,14 @@ hide_or_remove_visible_child (GtkContainer *container, gboolean remove) widget = l->data; if (gtk_widget_get_visible (widget)) - { - gtk_widget_hide (widget); + { + gtk_widget_hide (widget); - if (remove) - gtk_container_remove (container, widget); + if (remove) + gtk_container_remove (container, widget); - break; - } + break; + } } g_list_free (children); } @@ -518,7 +518,7 @@ glade_editor_load_editable_in_page (GladeEditor *editor, if ((scrolled_window = gtk_widget_get_ancestor (GTK_WIDGET (container), - GTK_TYPE_SCROLLED_WINDOW)) != NULL) + GTK_TYPE_SCROLLED_WINDOW)) != NULL) { adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window)); gtk_container_set_focus_vadjustment (GTK_CONTAINER (editable), adj); @@ -582,18 +582,18 @@ glade_editor_load_editable (GladeEditor *editor, GladeWidgetAdaptor *adaptor; if (!parent) - return; + return; adaptor = glade_widget_get_adaptor (parent); editable = - glade_editor_load_editable_in_page (editor, adaptor, - GLADE_PAGE_PACKING); + glade_editor_load_editable_in_page (editor, adaptor, + GLADE_PAGE_PACKING); } else editable = glade_editor_get_editable_by_adaptor (editor, - glade_widget_get_adaptor (widget), - type); + glade_widget_get_adaptor (widget), + type); g_assert (editable); @@ -751,8 +751,8 @@ query_dialog_style_set_cb (GtkWidget *dialog, static gboolean query_dialog_delete_event_cb (GtkDialog *dialog, - GdkEvent *event, - gpointer user_data) + GdkEvent *event, + gpointer user_data) { gtk_dialog_response (dialog, GTK_RESPONSE_CANCEL); return TRUE; @@ -1003,7 +1003,7 @@ glade_editor_reset_selection_changed_cb (GtkTreeSelection *selection, gtk_tree_model_get (model, &iter, COLUMN_PROPERTY, &property, -1); if (property) - pclass = glade_property_get_class (property); + pclass = glade_property_get_class (property); gtk_text_buffer_set_text (text_buffer, pclass ? glade_property_class_get_tooltip (pclass) : message, @@ -1287,8 +1287,8 @@ glade_editor_hide_class_field (GladeEditor *editor) static void editor_widget_name_changed (GladeWidget *widget, - GParamSpec *pspec, - GtkWindow *window) + GParamSpec *pspec, + GtkWindow *window) { gchar *title, *prj_name; @@ -1324,7 +1324,7 @@ glade_editor_dialog_for_widget (GladeWidget *widget) /* Keep the title up to date */ editor_widget_name_changed (widget, NULL, GTK_WINDOW (window)); g_signal_connect_object (G_OBJECT (widget), "notify::name", - G_CALLBACK (editor_widget_name_changed), window, 0); + G_CALLBACK (editor_widget_name_changed), window, 0); if (glade_app_get_accel_group ()) { diff --git a/gladeui/glade-editor.h b/gladeui/glade-editor.h index 1a39b3d2..eb1a6b74 100644 --- a/gladeui/glade-editor.h +++ b/gladeui/glade-editor.h @@ -25,7 +25,7 @@ typedef struct _GladeEditorPrivate GladeEditorPrivate; struct _GladeEditor { GtkBox vbox; /* The editor is a vbox */ - + GladeEditorPrivate *priv; }; @@ -44,7 +44,7 @@ GType glade_editor_get_type (void); GladeEditor *glade_editor_new (void); void glade_editor_load_widget (GladeEditor *editor, - GladeWidget *widget); + GladeWidget *widget); G_DEPRECATED void glade_editor_show_info (GladeEditor *editor); G_DEPRECATED diff --git a/gladeui/glade-id-allocator.c b/gladeui/glade-id-allocator.c index b2df4d96..44e363b1 100644 --- a/gladeui/glade-id-allocator.c +++ b/gladeui/glade-id-allocator.c @@ -165,7 +165,7 @@ glade_id_allocator_release (GladeIDAllocator *allocator, guint id) * that loaded unallocated ids are out of range */ if (word_idx < allocator->n_words) - allocator->data[word_idx] |= 1 << (id & 31); + allocator->data[word_idx] |= 1 << (id & 31); } } diff --git a/gladeui/glade-id-allocator.h b/gladeui/glade-id-allocator.h index 3326f5db..cab39132 100644 --- a/gladeui/glade-id-allocator.h +++ b/gladeui/glade-id-allocator.h @@ -35,10 +35,10 @@ GladeIDAllocator *glade_id_allocator_new (void); void glade_id_allocator_destroy (GladeIDAllocator *allocator); -guint glade_id_allocator_allocate (GladeIDAllocator *allocator); +guint glade_id_allocator_allocate (GladeIDAllocator *allocator); void glade_id_allocator_release (GladeIDAllocator *allocator, - guint id); + guint id); G_END_DECLS diff --git a/gladeui/glade-inspector.c b/gladeui/glade-inspector.c index 134f8958..f640c19e 100644 --- a/gladeui/glade-inspector.c +++ b/gladeui/glade-inspector.c @@ -54,19 +54,19 @@ #endif #define GLADE_INSPECTOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),\ - GLADE_TYPE_INSPECTOR, \ - GladeInspectorPrivate)) + GLADE_TYPE_INSPECTOR, \ + GladeInspectorPrivate)) static void search_entry_text_inserted_cb (GtkEntry *entry, - const gchar *text, - gint length, - gint *position, - GladeInspector *inspector); + const gchar *text, + gint length, + gint *position, + GladeInspector *inspector); static void search_entry_text_deleted_cb (GtkEditable *editable, - gint start_pos, - gint end_pos, - GladeInspector *inspector); + gint start_pos, + gint end_pos, + GladeInspector *inspector); enum { @@ -117,8 +117,8 @@ 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, + guint property_id, + const GValue *value, GParamSpec *pspec) { GladeInspector *inspector = GLADE_INSPECTOR (object); @@ -270,7 +270,7 @@ typedef struct { static void reduce_string (gchar *str1, - const gchar *str2) + const gchar *str2) { gint str1len = strlen (str1); gint i; @@ -279,10 +279,10 @@ reduce_string (gchar *str1, { if (str1[i] != str2[i] || i >= str1len) - { - str1[i] = '\0'; - break; - } + { + str1[i] = '\0'; + break; + } } if (str2[i] == '\0') @@ -291,9 +291,9 @@ reduce_string (gchar *str1, static gboolean search_common_matches (GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, - CommonMatchData *data) + GtkTreePath *path, + GtkTreeIter *iter, + CommonMatchData *data) { GladeWidget *gwidget; const gchar *name; @@ -315,12 +315,12 @@ search_common_matches (GtkTreeModel *model, if (match) { if (!data->first_match) - data->first_match = g_strdup (name); + data->first_match = g_strdup (name); if (data->common_text) reduce_string (data->common_text, name); else - data->common_text = g_strdup (name); + data->common_text = g_strdup (name); } g_object_unref (obj); @@ -335,8 +335,8 @@ search_common_matches (GtkTreeModel *model, */ static gchar * get_partial_match (GladeInspector *inspector, - const gchar *search, - gchar **first_match) + const gchar *search, + gchar **first_match) { GtkTreeModel *model = GTK_TREE_MODEL (inspector->priv->project); CommonMatchData data; @@ -420,9 +420,9 @@ search_entry_text_inserted_cb (GtkEntry *entry, static void search_entry_text_deleted_cb (GtkEditable *editable, - gint start_pos, - gint end_pos, - GladeInspector *inspector) + gint start_pos, + gint end_pos, + GladeInspector *inspector) { GladeInspectorPrivate *priv = inspector->priv; @@ -457,7 +457,7 @@ search_entry_key_press_event_cb (GtkEntry *entry, gtk_editable_set_position (GTK_EDITABLE (entry), -1); gtk_editable_select_region (GTK_EDITABLE (entry), -1, -1); - glade_inspector_refilter (inspector); + glade_inspector_refilter (inspector); } return TRUE; } @@ -469,27 +469,27 @@ search_entry_key_press_event_cb (GtkEntry *entry, if (str && (name = get_partial_match (inspector, str, &full_match))) { - GladeWidget *widget; + GladeWidget *widget; inspector_set_completion_text (inspector, full_match); - g_free (name); + g_free (name); - g_signal_handlers_block_by_func (priv->entry, search_entry_text_inserted_cb, inspector); - g_signal_handlers_block_by_func (priv->entry, search_entry_text_deleted_cb, inspector); + g_signal_handlers_block_by_func (priv->entry, search_entry_text_inserted_cb, inspector); + g_signal_handlers_block_by_func (priv->entry, search_entry_text_deleted_cb, inspector); gtk_entry_set_text (GTK_ENTRY (entry), priv->completion_text); - g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_inserted_cb, inspector); - g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_deleted_cb, inspector); + g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_inserted_cb, inspector); + g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_deleted_cb, inspector); gtk_editable_set_position (GTK_EDITABLE (entry), -1); gtk_editable_select_region (GTK_EDITABLE (entry), -1, -1); - glade_inspector_refilter (inspector); + glade_inspector_refilter (inspector); - widget = glade_project_get_widget_by_name (priv->project, priv->completion_text); - if (widget) - glade_project_selection_set (priv->project, glade_widget_get_object (widget), TRUE); + widget = glade_project_get_widget_by_name (priv->project, priv->completion_text); + if (widget) + glade_project_selection_set (priv->project, glade_widget_get_object (widget), TRUE); } return TRUE; } @@ -498,31 +498,31 @@ search_entry_key_press_event_cb (GtkEntry *entry, if (event->keyval == GDK_KEY_BackSpace) { if (!priv->search_disabled && !priv->idle_complete && str && str[0]) - { - /* Now, set the text to the current completion text -1 char, and recomplete */ - if (priv->completion_text && priv->completion_text[0]) - { - /* If we're not at the position of the length of the completion text, just carry on */ - if (!gtk_editable_get_selection_bounds (GTK_EDITABLE (priv->entry), NULL, NULL)) - return FALSE; + { + /* Now, set the text to the current completion text -1 char, and recomplete */ + if (priv->completion_text && priv->completion_text[0]) + { + /* If we're not at the position of the length of the completion text, just carry on */ + if (!gtk_editable_get_selection_bounds (GTK_EDITABLE (priv->entry), NULL, NULL)) + return FALSE; - priv->completion_text[strlen (priv->completion_text) -1] = '\0'; + priv->completion_text[strlen (priv->completion_text) -1] = '\0'; - g_signal_handlers_block_by_func (priv->entry, search_entry_text_inserted_cb, inspector); - g_signal_handlers_block_by_func (priv->entry, search_entry_text_deleted_cb, inspector); + g_signal_handlers_block_by_func (priv->entry, search_entry_text_inserted_cb, inspector); + g_signal_handlers_block_by_func (priv->entry, search_entry_text_deleted_cb, inspector); - gtk_entry_set_text (GTK_ENTRY (priv->entry), priv->completion_text); - gtk_editable_set_position (GTK_EDITABLE (priv->entry), -1); + gtk_entry_set_text (GTK_ENTRY (priv->entry), priv->completion_text); + gtk_editable_set_position (GTK_EDITABLE (priv->entry), -1); - g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_inserted_cb, inspector); - g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_deleted_cb, inspector); + g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_inserted_cb, inspector); + g_signal_handlers_unblock_by_func (priv->entry, search_entry_text_deleted_cb, inspector); - priv->idle_complete = - g_idle_add ((GSourceFunc) search_complete_idle, inspector); + priv->idle_complete = + g_idle_add ((GSourceFunc) search_complete_idle, inspector); - return TRUE; - } - } + return TRUE; + } + } } return FALSE; @@ -569,7 +569,7 @@ glade_inspector_init (GladeInspector *inspector) inspector->priv = priv = glade_inspector_get_instance_private (inspector); gtk_orientable_set_orientation (GTK_ORIENTABLE (inspector), - GTK_ORIENTATION_VERTICAL); + GTK_ORIENTATION_VERTICAL); priv->project = NULL; @@ -842,16 +842,16 @@ 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; gtk_tree_model_get (model, iter, - GLADE_PROJECT_MODEL_COLUMN_WARNING, &warning, - -1); + GLADE_PROJECT_MODEL_COLUMN_WARNING, &warning, + -1); g_object_set (renderer, "visible", warning != NULL, NULL); @@ -860,24 +860,24 @@ glade_inspector_warning_cell_data_func (GtkTreeViewColumn *column, static void glade_inspector_name_cell_data_func (GtkTreeViewColumn *column, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer data) + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer data) { GladeWidget *gwidget; GObject *obj; gtk_tree_model_get (model, iter, - GLADE_PROJECT_MODEL_COLUMN_OBJECT, &obj, - -1); + GLADE_PROJECT_MODEL_COLUMN_OBJECT, &obj, + -1); gwidget = glade_widget_get_from_gobject (obj); g_object_set (renderer, "text", - (glade_widget_has_name (gwidget)) ? - glade_widget_get_display_name (gwidget) : NULL, - NULL); + (glade_widget_has_name (gwidget)) ? + glade_widget_get_display_name (gwidget) : NULL, + NULL); g_object_unref (obj); } @@ -885,17 +885,17 @@ glade_inspector_name_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; gtk_tree_model_get (model, iter, - GLADE_PROJECT_MODEL_COLUMN_TYPE_NAME, &type_name, - GLADE_PROJECT_MODEL_COLUMN_MISC, &detail, - -1); + GLADE_PROJECT_MODEL_COLUMN_TYPE_NAME, &type_name, + GLADE_PROJECT_MODEL_COLUMN_MISC, &detail, + -1); if (detail) { @@ -939,19 +939,19 @@ add_columns (GtkTreeView *view) /* Warning cell */ renderer = gtk_cell_renderer_pixbuf_new (); g_object_set (renderer, - "stock-id", "gtk-dialog-warning", - "xpad", 2, - NULL); + "stock-id", "gtk-dialog-warning", + "xpad", 2, + NULL); gtk_cell_area_box_pack_start (box, renderer, FALSE, FALSE, FALSE); gtk_tree_view_column_set_cell_data_func (column, renderer, - glade_inspector_warning_cell_data_func, - NULL, NULL); + glade_inspector_warning_cell_data_func, + NULL, NULL); /* Class Icon */ renderer = gtk_cell_renderer_pixbuf_new (); g_object_set (renderer, - "xpad", 2, - NULL); + "xpad", 2, + NULL); gtk_cell_area_box_pack_start (box, renderer, FALSE, FALSE, FALSE); gtk_tree_view_column_set_attributes (column, renderer, @@ -967,8 +967,8 @@ add_columns (GtkTreeView *view) "text", GLADE_PROJECT_MODEL_COLUMN_NAME, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, - glade_inspector_name_cell_data_func, - NULL, NULL); + glade_inspector_name_cell_data_func, + NULL, NULL); /* Padding */ renderer = gtk_cell_renderer_text_new (); @@ -979,14 +979,14 @@ add_columns (GtkTreeView *view) renderer = gtk_cell_renderer_text_new (); g_object_set (G_OBJECT (renderer), "style", PANGO_STYLE_ITALIC, - "foreground", "Gray", - "ellipsize", PANGO_ELLIPSIZE_END, - NULL); + "foreground", "Gray", + "ellipsize", PANGO_ELLIPSIZE_END, + NULL); gtk_cell_area_box_pack_start (box, renderer, FALSE, FALSE, FALSE); gtk_tree_view_column_set_cell_data_func (column, renderer, - glade_inspector_detail_cell_data_func, - NULL, NULL); + glade_inspector_detail_cell_data_func, + NULL, NULL); gtk_tree_view_append_column (view, column); gtk_tree_view_set_headers_visible (view, FALSE); diff --git a/gladeui/glade-inspector.h b/gladeui/glade-inspector.h index a438c23c..b665aa1a 100644 --- a/gladeui/glade-inspector.h +++ b/gladeui/glade-inspector.h @@ -76,7 +76,7 @@ GType glade_inspector_get_type (void) G_GNUC_CONST; GtkWidget *glade_inspector_new (void); GtkWidget *glade_inspector_new_with_project (GladeProject *project); void glade_inspector_set_project (GladeInspector *inspector, - GladeProject *project); + GladeProject *project); GladeProject *glade_inspector_get_project (GladeInspector *inspector); GList *glade_inspector_get_selected_items (GladeInspector *inspector); diff --git a/gladeui/glade-name-context.c b/gladeui/glade-name-context.c index c9361b68..06cb5e79 100644 --- a/gladeui/glade-name-context.c +++ b/gladeui/glade-name-context.c @@ -182,7 +182,7 @@ glade_name_context_release_name (GladeNameContext *context, const gchar *name) { id = (int) strtol (first_number, &end_number, 10); if (*end_number == 0) - glade_id_allocator_release (id_allocator, id); + glade_id_allocator_release (id_allocator, id); } g_free (base_name); diff --git a/gladeui/glade-name-context.h b/gladeui/glade-name-context.h index 29480459..ddc360f6 100644 --- a/gladeui/glade-name-context.h +++ b/gladeui/glade-name-context.h @@ -11,18 +11,18 @@ GladeNameContext *glade_name_context_new (void); void glade_name_context_destroy (GladeNameContext *context); gchar *glade_name_context_new_name (GladeNameContext *context, - const gchar *base_name); + const gchar *base_name); guint glade_name_context_n_names (GladeNameContext *context); gboolean glade_name_context_has_name (GladeNameContext *context, - const gchar *name); + const gchar *name); gboolean glade_name_context_add_name (GladeNameContext *context, - const gchar *name); + const gchar *name); void glade_name_context_release_name (GladeNameContext *context, - const gchar *name); + const gchar *name); G_END_DECLS diff --git a/gladeui/glade-named-icon-chooser-dialog.c b/gladeui/glade-named-icon-chooser-dialog.c index 5cfc279c..f95e9326 100644 --- a/gladeui/glade-named-icon-chooser-dialog.c +++ b/gladeui/glade-named-icon-chooser-dialog.c @@ -835,12 +835,12 @@ centre_selected_row (GladeNamedIconChooserDialog *dialog) (GtkTreePath *) l->data, NULL, TRUE, 0.5, 0.0); -/* gtk_tree_view_set_cursor (GTK_TREE_VIEW (dialog->priv->icons_view), - (GtkTreePath *) l->data, - 0, - FALSE); - - gtk_widget_grab_focus (dialog->priv->icons_view); +/* gtk_tree_view_set_cursor (GTK_TREE_VIEW (dialog->priv->icons_view), + (GtkTreePath *) l->data, + 0, + FALSE); + + gtk_widget_grab_focus (dialog->priv->icons_view); */ g_list_foreach (l, (GFunc) gtk_tree_path_free, NULL); g_list_free (l); @@ -1524,15 +1524,15 @@ glade_named_icon_chooser_dialog_class_init (GladeNamedIconChooserDialogClass *kl window_class->set_focus = glade_named_icon_chooser_dialog_set_focus; - /** - * GladeNamedIconChooserDialog::icon-activated - * @chooser: the object which received the signal - * - * This signal is emitted when the user "activates" an icon - * in the named icon chooser. This can happen by double-clicking on an item - * in the recently used resources list, or by pressing - * <keycap>Enter</keycap>. - */ + /** + * GladeNamedIconChooserDialog::icon-activated + * @chooser: the object which received the signal + * + * This signal is emitted when the user "activates" an icon + * in the named icon chooser. This can happen by double-clicking on an item + * in the recently used resources list, or by pressing + * <keycap>Enter</keycap>. + */ dialog_signals[ICON_ACTIVATED] = g_signal_new ("icon-activated", G_TYPE_FROM_CLASS (object_class), @@ -1541,15 +1541,15 @@ glade_named_icon_chooser_dialog_class_init (GladeNamedIconChooserDialogClass *kl icon_activated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - /** - * GladeNamedIconChooserDialog::selection-changed - * @chooser: the object which received the signal - * - * This signal is emitted when there is a change in the set of - * selected icon names. This can happen when a user - * modifies the selection with the mouse or the keyboard, or when - * explicitely calling functions to change the selection. - */ + /** + * GladeNamedIconChooserDialog::selection-changed + * @chooser: the object which received the signal + * + * This signal is emitted when there is a change in the set of + * selected icon names. This can happen when a user + * modifies the selection with the mouse or the keyboard, or when + * explicitely calling functions to change the selection. + */ dialog_signals[SELECTION_CHANGED] = g_signal_new ("selection-changed", G_TYPE_FROM_CLASS (object_class), diff --git a/gladeui/glade-named-icon-chooser-dialog.h b/gladeui/glade-named-icon-chooser-dialog.h index 97c97369..295e5d07 100644 --- a/gladeui/glade-named-icon-chooser-dialog.h +++ b/gladeui/glade-named-icon-chooser-dialog.h @@ -27,10 +27,10 @@ G_BEGIN_DECLS -#define GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG (glade_named_icon_chooser_dialog_get_type ()) -#define GLADE_NAMED_ICON_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG, GladeNamedIconChooserDialog)) -#define GLADE_IS_NAMED_ICON_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG)) -#define GLADE_NAMED_ICON_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG, GladeNamedIconChooserDialogClass)) +#define GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG (glade_named_icon_chooser_dialog_get_type ()) +#define GLADE_NAMED_ICON_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG, GladeNamedIconChooserDialog)) +#define GLADE_IS_NAMED_ICON_CHOOSER_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG)) +#define GLADE_NAMED_ICON_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG, GladeNamedIconChooserDialogClass)) #define GLADE_IS_NAMED_ICON_CHOOSER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG)) #define GLADE_NAMED_ICON_CHOOSER_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_NAMED_ICON_CHOOSER_DIALOG, GladeNamedIconChooserDialogClass)) @@ -48,9 +48,9 @@ struct _GladeNamedIconChooserDialog struct _GladeNamedIconChooserDialogClass { GtkDialogClass parent_class; - + void (* icon_activated) (GladeNamedIconChooserDialog *dialog); - + void (* selection_changed) (GladeNamedIconChooserDialog *dialog); void (* glade_reserved1) (void); @@ -62,17 +62,17 @@ struct _GladeNamedIconChooserDialogClass GType glade_named_icon_chooser_dialog_get_type (void) G_GNUC_CONST; GtkWidget *glade_named_icon_chooser_dialog_new (const gchar *title, - GtkWindow *parent, - const gchar *first_button_text, - ...) G_GNUC_NULL_TERMINATED; + GtkWindow *parent, + const gchar *first_button_text, + ...) G_GNUC_NULL_TERMINATED; gchar *glade_named_icon_chooser_dialog_get_icon_name (GladeNamedIconChooserDialog *chooser); void glade_named_icon_chooser_dialog_set_icon_name (GladeNamedIconChooserDialog *chooser, - const gchar *icon_name); + const gchar *icon_name); gboolean glade_named_icon_chooser_dialog_set_context (GladeNamedIconChooserDialog *chooser, - const gchar *context); + const gchar *context); gchar *glade_named_icon_chooser_dialog_get_context (GladeNamedIconChooserDialog *chooser); diff --git a/gladeui/glade-palette.c b/gladeui/glade-palette.c index 1530d4d9..db41b2f3 100644 --- a/gladeui/glade-palette.c +++ b/gladeui/glade-palette.c @@ -92,7 +92,7 @@ static guint glade_palette_signals[LAST_SIGNAL] = { 0 }; static void glade_palette_append_item_group (GladePalette *palette, GladeWidgetGroup *group); static void palette_item_toggled_cb (GtkToggleToolButton *button, - GladePalette *palette); + GladePalette *palette); G_DEFINE_TYPE_WITH_PRIVATE (GladePalette, glade_palette, GTK_TYPE_BOX) @@ -102,7 +102,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GladePalette, glade_palette, GTK_TYPE_BOX) *******************************************************/ static void palette_item_refresh_cb (GladePalette *palette, - GtkWidget *item) + GtkWidget *item) { GladeProject *project; GladeSupportMask support; @@ -114,14 +114,14 @@ palette_item_refresh_cb (GladePalette *palette, if ((project = palette->priv->project) && (warning = glade_project_verify_widget_adaptor (project, adaptor, - &support)) != NULL) + &support)) != NULL) { /* set sensitivity */ gtk_widget_set_sensitive (GTK_WIDGET (item), !(support & GLADE_SUPPORT_MISMATCH)); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), - glade_widget_adaptor_get_icon_name (adaptor)); + glade_widget_adaptor_get_icon_name (adaptor)); /* prepend widget title */ text = g_strdup_printf ("%s: %s", glade_widget_adaptor_get_title (adaptor), warning); @@ -132,7 +132,7 @@ palette_item_refresh_cb (GladePalette *palette, else { gtk_widget_set_tooltip_text (GTK_WIDGET (item), - glade_widget_adaptor_get_title (adaptor)); + glade_widget_adaptor_get_title (adaptor)); gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE); gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), glade_widget_adaptor_get_icon_name (adaptor)); @@ -149,8 +149,8 @@ glade_palette_refresh (GladePalette *palette) static void project_add_item_changed_cb (GladeProject *project, - GParamSpec *pspec, - GladePalette *palette) + GParamSpec *pspec, + GladePalette *palette) { GtkToggleToolButton *selection = NULL; GladePalettePrivate *priv = palette->priv; @@ -158,7 +158,7 @@ project_add_item_changed_cb (GladeProject *project, if (priv->local_selection) { selection = g_hash_table_lookup (priv->button_table, - glade_widget_adaptor_get_name (priv->local_selection)); + glade_widget_adaptor_get_name (priv->local_selection)); g_signal_handlers_block_by_func (selection, palette_item_toggled_cb, palette); gtk_toggle_tool_button_set_active (selection, FALSE); @@ -172,7 +172,7 @@ project_add_item_changed_cb (GladeProject *project, if (priv->local_selection) { selection = g_hash_table_lookup (priv->button_table, - glade_widget_adaptor_get_name (priv->local_selection)); + glade_widget_adaptor_get_name (priv->local_selection)); g_signal_handlers_block_by_func (selection, palette_item_toggled_cb, palette); gtk_toggle_tool_button_set_active (selection, TRUE); @@ -187,7 +187,7 @@ project_add_item_changed_cb (GladeProject *project, *******************************************************/ static void selector_button_toggled_cb (GtkToggleButton *button, - GladePalette *palette) + GladePalette *palette) { GladePalettePrivate *priv = palette->priv; @@ -222,7 +222,7 @@ palette_item_toggled_cb (GtkToggleToolButton *button, GladePalette *palette) if (priv->local_selection) { selection = g_hash_table_lookup (priv->button_table, - glade_widget_adaptor_get_name (priv->local_selection)); + glade_widget_adaptor_get_name (priv->local_selection)); g_signal_handlers_block_by_func (selection, palette_item_toggled_cb, palette); gtk_toggle_tool_button_set_active (selection, FALSE); @@ -288,8 +288,8 @@ glade_palette_drag_data_get (GtkWidget *widget, static gint palette_item_button_press_cb (GtkWidget *button, - GdkEventButton *event, - GtkToolItem *item) + GdkEventButton *event, + GtkToolItem *item) { GladePalette *palette = g_object_get_data (G_OBJECT (item), "glade-palette"); GladeWidgetAdaptor *adaptor = g_object_get_data (G_OBJECT (item), "glade-widget-adaptor"); @@ -334,7 +334,7 @@ glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor) /* Update palette item when active project state changes */ g_signal_connect (G_OBJECT (palette), "refresh", - G_CALLBACK (palette_item_refresh_cb), item); + G_CALLBACK (palette_item_refresh_cb), item); /* Fire Glade palette popup menus */ g_signal_connect (G_OBJECT (button), "button-press-event", @@ -349,8 +349,8 @@ glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor) gtk_widget_show (item); g_hash_table_insert (palette->priv->button_table, - (gchar *)glade_widget_adaptor_get_name (adaptor), - item); + (gchar *)glade_widget_adaptor_get_name (adaptor), + item); return item; } @@ -484,14 +484,14 @@ glade_palette_set_property (GObject *object, break; case PROP_USE_SMALL_ITEM_ICONS: glade_palette_set_use_small_item_icons (palette, - g_value_get_boolean (value)); + g_value_get_boolean (value)); break; case PROP_ITEM_APPEARANCE: glade_palette_set_item_appearance (palette, g_value_get_enum (value)); break; case PROP_SHOW_SELECTOR_BUTTON: glade_palette_set_show_selector_button (palette, - g_value_get_boolean (value)); + g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -518,7 +518,7 @@ glade_palette_get_property (GObject *object, break; case PROP_SHOW_SELECTOR_BUTTON: g_value_set_boolean (value, - gtk_widget_get_visible (priv->selector_button)); + gtk_widget_get_visible (priv->selector_button)); break; case PROP_ITEM_APPEARANCE: g_value_set_enum (value, priv->item_appearance); @@ -618,7 +618,7 @@ glade_palette_init (GladePalette *palette) GtkWidget *sw; gtk_orientable_set_orientation (GTK_ORIENTABLE (palette), - GTK_ORIENTATION_VERTICAL); + GTK_ORIENTATION_VERTICAL); priv = palette->priv = glade_palette_get_instance_private (palette); @@ -703,34 +703,34 @@ glade_palette_set_project (GladePalette *palette, GladeProject *project) if (palette->priv->project != project) { if (palette->priv->project) - { - g_signal_handlers_disconnect_by_func (G_OBJECT (palette->priv->project), - G_CALLBACK (glade_palette_refresh), - palette); + { + g_signal_handlers_disconnect_by_func (G_OBJECT (palette->priv->project), + G_CALLBACK (glade_palette_refresh), + palette); - g_signal_handlers_disconnect_by_func (G_OBJECT (palette->priv->project), - G_CALLBACK (project_add_item_changed_cb), - palette); + g_signal_handlers_disconnect_by_func (G_OBJECT (palette->priv->project), + G_CALLBACK (project_add_item_changed_cb), + palette); - g_object_unref (palette->priv->project); - } + g_object_unref (palette->priv->project); + } palette->priv->project = project; if (palette->priv->project) - { - g_signal_connect_swapped (G_OBJECT (palette->priv->project), "targets-changed", - G_CALLBACK (glade_palette_refresh), palette); - g_signal_connect_swapped (G_OBJECT (palette->priv->project), "parse-finished", - G_CALLBACK (glade_palette_refresh), palette); + { + g_signal_connect_swapped (G_OBJECT (palette->priv->project), "targets-changed", + G_CALLBACK (glade_palette_refresh), palette); + g_signal_connect_swapped (G_OBJECT (palette->priv->project), "parse-finished", + G_CALLBACK (glade_palette_refresh), palette); - g_signal_connect (G_OBJECT (palette->priv->project), "notify::add-item", - G_CALLBACK (project_add_item_changed_cb), palette); + g_signal_connect (G_OBJECT (palette->priv->project), "notify::add-item", + G_CALLBACK (project_add_item_changed_cb), palette); - g_object_ref (palette->priv->project); + g_object_ref (palette->priv->project); - project_add_item_changed_cb (project, NULL, palette); - } + project_add_item_changed_cb (project, NULL, palette); + } glade_palette_refresh (palette); diff --git a/gladeui/glade-palette.h b/gladeui/glade-palette.h index 586b714e..37d38c63 100644 --- a/gladeui/glade-palette.h +++ b/gladeui/glade-palette.h @@ -78,21 +78,21 @@ GtkWidget *glade_palette_new (void); GladeProject *glade_palette_get_project (GladePalette *palette); void glade_palette_set_project (GladePalette *palette, - GladeProject *project); + GladeProject *project); GladeItemAppearance glade_palette_get_item_appearance (GladePalette *palette); void glade_palette_set_item_appearance (GladePalette *palette, - GladeItemAppearance item_appearance); - + GladeItemAppearance item_appearance); + gboolean glade_palette_get_use_small_item_icons (GladePalette *palette); -void glade_palette_set_use_small_item_icons (GladePalette *palette, - gboolean use_small_item_icons); - -void glade_palette_set_show_selector_button (GladePalette *palette, - gboolean show_selector_button); - +void glade_palette_set_use_small_item_icons (GladePalette *palette, + gboolean use_small_item_icons); + +void glade_palette_set_show_selector_button (GladePalette *palette, + gboolean show_selector_button); + gboolean glade_palette_get_show_selector_button (GladePalette *palette); GtkToolPalette *glade_palette_get_tool_palette (GladePalette *palette); diff --git a/gladeui/glade-path.h b/gladeui/glade-path.h index b4270a5d..64185873 100644 --- a/gladeui/glade-path.h +++ b/gladeui/glade-path.h @@ -5,403 +5,403 @@ #define glade_path_HEIGHT 398.937500 cairo_path_data_t glade_path_data[] = { - {.header.type = 0, .header.length = 2}, - {.point.x = 90.343750, .point.y = 0.000000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 89.687500, .point.y = 2.250000}, - {.point.x = 89.421875, .point.y = 10.992188}, - {.point.x = 89.812500, .point.y = 19.406250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 90.441406, .point.y = 32.828125}, - {.point.x = 91.304688, .point.y = 35.968750}, - {.point.x = 96.500000, .point.y = 45.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 100.148438, .point.y = 51.394531}, - {.point.x = 105.625000, .point.y = 57.781250}, - {.point.x = 110.750000, .point.y = 61.656250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 120.437500, .point.y = 68.976562}, - {.point.x = 144.214844, .point.y = 79.347656}, - {.point.x = 171.375000, .point.y = 88.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 196.046875, .point.y = 95.921875}, - {.point.x = 204.484375, .point.y = 99.640625}, - {.point.x = 211.781250, .point.y = 106.000000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 215.050781, .point.y = 108.847656}, - {.point.x = 217.988281, .point.y = 110.636719}, - {.point.x = 218.312500, .point.y = 109.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 218.640625, .point.y = 109.242188}, - {.point.x = 218.062500, .point.y = 102.550781}, - {.point.x = 217.000000, .point.y = 95.093750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 214.566406, .point.y = 78.011719}, - {.point.x = 207.527344, .point.y = 64.671875}, - {.point.x = 194.875000, .point.y = 53.187500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 182.554688, .point.y = 42.000000}, - {.point.x = 172.675781, .point.y = 36.773438}, - {.point.x = 149.531250, .point.y = 29.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 113.113281, .point.y = 16.847656}, - {.point.x = 106.210938, .point.y = 13.308594}, - {.point.x = 96.906250, .point.y = 2.281250}, - {.header.type = 3, .header.length = 1}, - {.header.type = 0, .header.length = 2}, - {.point.x = 238.031250, .point.y = 58.656250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 237.492188, .point.y = 58.968750}, - {.point.x = 239.261719, .point.y = 61.609375}, - {.point.x = 242.156250, .point.y = 64.750000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 245.250000, .point.y = 68.101562}, - {.point.x = 250.398438, .point.y = 75.605469}, - {.point.x = 253.593750, .point.y = 81.468750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 258.394531, .point.y = 90.273438}, - {.point.x = 259.523438, .point.y = 94.562500}, - {.point.x = 260.156250, .point.y = 105.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 261.109375, .point.y = 123.046875}, - {.point.x = 258.335938, .point.y = 134.652344}, - {.point.x = 249.781250, .point.y = 149.468750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 244.441406, .point.y = 158.726562}, - {.point.x = 242.363281, .point.y = 160.906250}, - {.point.x = 238.968750, .point.y = 160.906250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 235.425781, .point.y = 160.906250}, - {.point.x = 234.160156, .point.y = 159.308594}, - {.point.x = 230.718750, .point.y = 150.531250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 221.054688, .point.y = 125.871094}, - {.point.x = 203.195312, .point.y = 113.500000}, - {.point.x = 167.750000, .point.y = 107.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 145.222656, .point.y = 102.921875}, - {.point.x = 134.351562, .point.y = 99.855469}, - {.point.x = 123.000000, .point.y = 94.375000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 113.082031, .point.y = 89.589844}, - {.point.x = 98.183594, .point.y = 76.960938}, - {.point.x = 94.687500, .point.y = 70.375000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 91.265625, .point.y = 63.921875}, - {.point.x = 89.593750, .point.y = 68.769531}, - {.point.x = 89.562500, .point.y = 85.343750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 89.519531, .point.y = 110.410156}, - {.point.x = 99.582031, .point.y = 135.527344}, - {.point.x = 116.437500, .point.y = 152.437500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 123.062500, .point.y = 159.062500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 114.343750, .point.y = 158.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 109.535156, .point.y = 157.464844}, - {.point.x = 102.035156, .point.y = 155.664062}, - {.point.x = 97.656250, .point.y = 154.000000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 87.226562, .point.y = 150.039062}, - {.point.x = 72.132812, .point.y = 137.804688}, - {.point.x = 66.750000, .point.y = 128.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 64.394531, .point.y = 125.054688}, - {.point.x = 61.109375, .point.y = 113.023438}, - {.point.x = 61.062500, .point.y = 114.500000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 60.906250, .point.y = 119.500000}, - {.point.x = 67.855469, .point.y = 159.640625}, - {.point.x = 71.281250, .point.y = 172.000000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 73.156250, .point.y = 178.757812}, - {.point.x = 74.492188, .point.y = 184.515625}, - {.point.x = 74.218750, .point.y = 184.750000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 73.949219, .point.y = 184.984375}, - {.point.x = 68.496094, .point.y = 183.968750}, - {.point.x = 62.093750, .point.y = 182.500000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 47.703125, .point.y = 179.199219}, - {.point.x = 20.855469, .point.y = 178.828125}, - {.point.x = 8.875000, .point.y = 181.812500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 0.000000, .point.y = 184.031250}, - {.header.type = 1, .header.length = 2}, - {.point.x = 6.218750, .point.y = 186.750000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 15.660156, .point.y = 190.910156}, - {.point.x = 29.242188, .point.y = 204.425781}, - {.point.x = 34.906250, .point.y = 215.218750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 42.023438, .point.y = 228.773438}, - {.point.x = 47.375000, .point.y = 247.988281}, - {.point.x = 50.562500, .point.y = 271.718750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 54.019531, .point.y = 297.421875}, - {.point.x = 54.898438, .point.y = 301.527344}, - {.point.x = 58.312500, .point.y = 309.187500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 62.550781, .point.y = 318.691406}, - {.point.x = 74.937500, .point.y = 334.589844}, - {.point.x = 86.937500, .point.y = 345.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 96.863281, .point.y = 355.152344}, - {.point.x = 97.121094, .point.y = 355.523438}, - {.point.x = 90.031250, .point.y = 350.781250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 85.796875, .point.y = 347.949219}, - {.point.x = 81.859375, .point.y = 345.039062}, - {.point.x = 81.312500, .point.y = 344.281250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 80.769531, .point.y = 343.527344}, - {.point.x = 77.796875, .point.y = 341.339844}, - {.point.x = 74.687500, .point.y = 339.437500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 69.062500, .point.y = 336.000000}, - {.header.type = 1, .header.length = 2}, - {.point.x = 70.343750, .point.y = 343.656250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 71.976562, .point.y = 353.304688}, - {.point.x = 81.210938, .point.y = 377.386719}, - {.point.x = 85.375000, .point.y = 382.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 89.117188, .point.y = 387.804688}, - {.point.x = 92.617188, .point.y = 393.371094}, - {.point.x = 96.406250, .point.y = 398.937500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 140.062500, .point.y = 398.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 125.261719, .point.y = 391.414062}, - {.point.x = 111.375000, .point.y = 383.683594}, - {.point.x = 111.375000, .point.y = 382.625000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 111.375000, .point.y = 382.187500}, - {.point.x = 116.660156, .point.y = 384.617188}, - {.point.x = 123.156250, .point.y = 388.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 130.234375, .point.y = 391.750000}, - {.point.x = 137.937500, .point.y = 395.398438}, - {.point.x = 146.062500, .point.y = 398.937500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 247.531250, .point.y = 398.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 212.316406, .point.y = 389.019531}, - {.point.x = 176.621094, .point.y = 375.136719}, - {.point.x = 146.812500, .point.y = 359.125000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 124.667969, .point.y = 347.230469}, - {.point.x = 121.132812, .point.y = 343.796875}, - {.point.x = 141.375000, .point.y = 353.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 181.539062, .point.y = 373.777344}, - {.point.x = 230.722656, .point.y = 390.035156}, - {.point.x = 277.125000, .point.y = 398.937500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 387.281250, .point.y = 398.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 389.449219, .point.y = 398.289062}, - {.point.x = 391.582031, .point.y = 397.632812}, - {.point.x = 393.406250, .point.y = 397.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 402.406250, .point.y = 394.074219}, - {.point.x = 403.734375, .point.y = 393.250000}, - {.point.x = 408.781250, .point.y = 384.656250}, - {.header.type = 1, .header.length = 2}, - {.point.x = 408.781250, .point.y = 369.218750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 354.609375, .point.y = 380.550781}, - {.point.x = 261.796875, .point.y = 362.976562}, - {.point.x = 186.843750, .point.y = 326.812500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 170.699219, .point.y = 319.023438}, - {.point.x = 149.531250, .point.y = 307.312500}, - {.point.x = 149.531250, .point.y = 306.156250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 149.531250, .point.y = 305.832031}, - {.point.x = 156.691406, .point.y = 309.121094}, - {.point.x = 165.437500, .point.y = 313.468750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 208.855469, .point.y = 335.046875}, - {.point.x = 265.519531, .point.y = 352.527344}, - {.point.x = 313.187500, .point.y = 359.093750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 333.339844, .point.y = 361.871094}, - {.point.x = 369.632812, .point.y = 362.246094}, - {.point.x = 385.093750, .point.y = 359.812500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 391.878906, .point.y = 358.746094}, - {.point.x = 401.050781, .point.y = 356.160156}, - {.point.x = 408.781250, .point.y = 353.437500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 408.781250, .point.y = 327.812500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 357.781250, .point.y = 339.546875}, - {.point.x = 260.570312, .point.y = 318.058594}, - {.point.x = 187.781250, .point.y = 278.000000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 172.882812, .point.y = 269.800781}, - {.point.x = 170.656250, .point.y = 267.132812}, - {.point.x = 184.531250, .point.y = 274.093750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 225.066406, .point.y = 294.429688}, - {.point.x = 273.574219, .point.y = 309.937500}, - {.point.x = 316.531250, .point.y = 316.281250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 339.093750, .point.y = 319.613281}, - {.point.x = 375.757812, .point.y = 320.351562}, - {.point.x = 389.531250, .point.y = 317.718750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 395.226562, .point.y = 316.632812}, - {.point.x = 402.355469, .point.y = 314.566406}, - {.point.x = 408.781250, .point.y = 312.343750}, - {.header.type = 1, .header.length = 2}, - {.point.x = 408.781250, .point.y = 286.781250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 392.652344, .point.y = 290.996094}, - {.point.x = 359.242188, .point.y = 291.675781}, - {.point.x = 331.593750, .point.y = 286.687500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 293.644531, .point.y = 279.839844}, - {.point.x = 248.632812, .point.y = 264.089844}, - {.point.x = 217.218750, .point.y = 246.687500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 202.500000, .point.y = 238.531250}, - {.point.x = 200.261719, .point.y = 235.210938}, - {.point.x = 214.593750, .point.y = 242.781250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 228.839844, .point.y = 250.308594}, - {.point.x = 256.128906, .point.y = 260.804688}, - {.point.x = 277.156250, .point.y = 266.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 323.738281, .point.y = 280.226562}, - {.point.x = 366.109375, .point.y = 283.082031}, - {.point.x = 394.843750, .point.y = 274.781250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 399.859375, .point.y = 273.332031}, - {.point.x = 404.953125, .point.y = 271.539062}, - {.point.x = 408.781250, .point.y = 269.937500}, - {.header.type = 1, .header.length = 2}, - {.point.x = 408.781250, .point.y = 246.375000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 405.968750, .point.y = 241.371094}, - {.point.x = 403.597656, .point.y = 237.246094}, - {.point.x = 403.343750, .point.y = 237.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 403.019531, .point.y = 236.753906}, - {.point.x = 398.386719, .point.y = 238.460938}, - {.point.x = 393.031250, .point.y = 240.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 383.820312, .point.y = 244.945312}, - {.point.x = 382.070312, .point.y = 245.160156}, - {.point.x = 359.625000, .point.y = 245.093750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 340.851562, .point.y = 245.039062}, - {.point.x = 332.679688, .point.y = 244.292969}, - {.point.x = 320.437500, .point.y = 241.468750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 293.203125, .point.y = 235.187500}, - {.point.x = 255.355469, .point.y = 220.000000}, - {.point.x = 242.218750, .point.y = 210.062500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 238.386719, .point.y = 207.164062}, - {.point.x = 238.996094, .point.y = 207.246094}, - {.point.x = 246.812500, .point.y = 210.812500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 279.453125, .point.y = 225.703125}, - {.point.x = 308.761719, .point.y = 233.277344}, - {.point.x = 338.656250, .point.y = 234.531250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 357.054688, .point.y = 235.304688}, - {.point.x = 360.980469, .point.y = 234.976562}, - {.point.x = 371.375000, .point.y = 231.968750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 389.828125, .point.y = 226.628906}, - {.point.x = 390.781250, .point.y = 225.835938}, - {.point.x = 391.156250, .point.y = 215.093750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 391.449219, .point.y = 206.785156}, - {.point.x = 390.515625, .point.y = 204.261719}, - {.point.x = 382.312500, .point.y = 190.468750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 377.289062, .point.y = 182.019531}, - {.point.x = 373.121094, .point.y = 173.703125}, - {.point.x = 373.031250, .point.y = 171.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 372.945312, .point.y = 170.171875}, - {.point.x = 371.769531, .point.y = 171.984375}, - {.point.x = 370.468750, .point.y = 176.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 363.761719, .point.y = 196.949219}, - {.point.x = 349.835938, .point.y = 203.890625}, - {.point.x = 323.812500, .point.y = 199.250000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 309.765625, .point.y = 196.746094}, - {.point.x = 278.191406, .point.y = 183.371094}, - {.point.x = 280.875000, .point.y = 181.062500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 281.234375, .point.y = 180.757812}, - {.point.x = 286.589844, .point.y = 182.289062}, - {.point.x = 292.781250, .point.y = 184.437500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 313.656250, .point.y = 191.675781}, - {.point.x = 335.207031, .point.y = 191.050781}, - {.point.x = 345.625000, .point.y = 182.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 353.035156, .point.y = 177.167969}, - {.point.x = 355.558594, .point.y = 171.070312}, - {.point.x = 355.437500, .point.y = 159.343750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 355.097656, .point.y = 126.226562}, - {.point.x = 321.609375, .point.y = 89.011719}, - {.point.x = 275.187500, .point.y = 70.156250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 265.082031, .point.y = 66.050781}, - {.point.x = 241.316406, .point.y = 58.656250}, - {.point.x = 238.187500, .point.y = 58.656250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 238.132812, .point.y = 58.656250}, - {.point.x = 238.070312, .point.y = 58.636719}, - {.point.x = 238.031250, .point.y = 58.656250}, - {.header.type = 3, .header.length = 1}, - {.header.type = 0, .header.length = 2}, - {.point.x = 388.437500, .point.y = 132.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 387.890625, .point.y = 132.968750}, - {.point.x = 386.785156, .point.y = 133.718750}, - {.point.x = 385.156250, .point.y = 135.031250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 374.984375, .point.y = 143.238281}, - {.point.x = 375.207031, .point.y = 153.203125}, - {.point.x = 385.968750, .point.y = 167.937500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 388.792969, .point.y = 171.800781}, - {.point.x = 392.011719, .point.y = 177.000000}, - {.point.x = 393.125000, .point.y = 179.531250}, - {.header.type = 1, .header.length = 2}, - {.point.x = 395.156250, .point.y = 184.156250}, - {.header.type = 1, .header.length = 2}, - {.point.x = 398.718750, .point.y = 179.531250}, - {.header.type = 2, .header.length = 4}, - {.point.x = 403.707031, .point.y = 173.039062}, - {.point.x = 403.257812, .point.y = 162.636719}, - {.point.x = 397.656250, .point.y = 153.875000}, - {.header.type = 2, .header.length = 4}, - {.point.x = 389.765625, .point.y = 141.527344}, - {.point.x = 387.507812, .point.y = 136.390625}, - {.point.x = 388.656250, .point.y = 133.812500}, - {.header.type = 2, .header.length = 4}, - {.point.x = 388.929688, .point.y = 133.203125}, - {.point.x = 388.921875, .point.y = 132.882812}, - {.point.x = 388.656250, .point.y = 132.843750}, - {.header.type = 2, .header.length = 4}, - {.point.x = 388.601562, .point.y = 132.835938}, - {.point.x = 388.519531, .point.y = 132.828125}, - {.point.x = 388.437500, .point.y = 132.843750}, - {.header.type = 3, .header.length = 1}, - {.header.type = 0, .header.length = 2}, - {.point.x = 388.437500, .point.y = 132.843750} + {.header.type = 0, .header.length = 2}, + {.point.x = 90.343750, .point.y = 0.000000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 89.687500, .point.y = 2.250000}, + {.point.x = 89.421875, .point.y = 10.992188}, + {.point.x = 89.812500, .point.y = 19.406250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 90.441406, .point.y = 32.828125}, + {.point.x = 91.304688, .point.y = 35.968750}, + {.point.x = 96.500000, .point.y = 45.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 100.148438, .point.y = 51.394531}, + {.point.x = 105.625000, .point.y = 57.781250}, + {.point.x = 110.750000, .point.y = 61.656250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 120.437500, .point.y = 68.976562}, + {.point.x = 144.214844, .point.y = 79.347656}, + {.point.x = 171.375000, .point.y = 88.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 196.046875, .point.y = 95.921875}, + {.point.x = 204.484375, .point.y = 99.640625}, + {.point.x = 211.781250, .point.y = 106.000000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 215.050781, .point.y = 108.847656}, + {.point.x = 217.988281, .point.y = 110.636719}, + {.point.x = 218.312500, .point.y = 109.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 218.640625, .point.y = 109.242188}, + {.point.x = 218.062500, .point.y = 102.550781}, + {.point.x = 217.000000, .point.y = 95.093750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 214.566406, .point.y = 78.011719}, + {.point.x = 207.527344, .point.y = 64.671875}, + {.point.x = 194.875000, .point.y = 53.187500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 182.554688, .point.y = 42.000000}, + {.point.x = 172.675781, .point.y = 36.773438}, + {.point.x = 149.531250, .point.y = 29.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 113.113281, .point.y = 16.847656}, + {.point.x = 106.210938, .point.y = 13.308594}, + {.point.x = 96.906250, .point.y = 2.281250}, + {.header.type = 3, .header.length = 1}, + {.header.type = 0, .header.length = 2}, + {.point.x = 238.031250, .point.y = 58.656250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 237.492188, .point.y = 58.968750}, + {.point.x = 239.261719, .point.y = 61.609375}, + {.point.x = 242.156250, .point.y = 64.750000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 245.250000, .point.y = 68.101562}, + {.point.x = 250.398438, .point.y = 75.605469}, + {.point.x = 253.593750, .point.y = 81.468750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 258.394531, .point.y = 90.273438}, + {.point.x = 259.523438, .point.y = 94.562500}, + {.point.x = 260.156250, .point.y = 105.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 261.109375, .point.y = 123.046875}, + {.point.x = 258.335938, .point.y = 134.652344}, + {.point.x = 249.781250, .point.y = 149.468750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 244.441406, .point.y = 158.726562}, + {.point.x = 242.363281, .point.y = 160.906250}, + {.point.x = 238.968750, .point.y = 160.906250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 235.425781, .point.y = 160.906250}, + {.point.x = 234.160156, .point.y = 159.308594}, + {.point.x = 230.718750, .point.y = 150.531250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 221.054688, .point.y = 125.871094}, + {.point.x = 203.195312, .point.y = 113.500000}, + {.point.x = 167.750000, .point.y = 107.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 145.222656, .point.y = 102.921875}, + {.point.x = 134.351562, .point.y = 99.855469}, + {.point.x = 123.000000, .point.y = 94.375000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 113.082031, .point.y = 89.589844}, + {.point.x = 98.183594, .point.y = 76.960938}, + {.point.x = 94.687500, .point.y = 70.375000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 91.265625, .point.y = 63.921875}, + {.point.x = 89.593750, .point.y = 68.769531}, + {.point.x = 89.562500, .point.y = 85.343750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 89.519531, .point.y = 110.410156}, + {.point.x = 99.582031, .point.y = 135.527344}, + {.point.x = 116.437500, .point.y = 152.437500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 123.062500, .point.y = 159.062500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 114.343750, .point.y = 158.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 109.535156, .point.y = 157.464844}, + {.point.x = 102.035156, .point.y = 155.664062}, + {.point.x = 97.656250, .point.y = 154.000000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 87.226562, .point.y = 150.039062}, + {.point.x = 72.132812, .point.y = 137.804688}, + {.point.x = 66.750000, .point.y = 128.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 64.394531, .point.y = 125.054688}, + {.point.x = 61.109375, .point.y = 113.023438}, + {.point.x = 61.062500, .point.y = 114.500000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 60.906250, .point.y = 119.500000}, + {.point.x = 67.855469, .point.y = 159.640625}, + {.point.x = 71.281250, .point.y = 172.000000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 73.156250, .point.y = 178.757812}, + {.point.x = 74.492188, .point.y = 184.515625}, + {.point.x = 74.218750, .point.y = 184.750000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 73.949219, .point.y = 184.984375}, + {.point.x = 68.496094, .point.y = 183.968750}, + {.point.x = 62.093750, .point.y = 182.500000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 47.703125, .point.y = 179.199219}, + {.point.x = 20.855469, .point.y = 178.828125}, + {.point.x = 8.875000, .point.y = 181.812500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 0.000000, .point.y = 184.031250}, + {.header.type = 1, .header.length = 2}, + {.point.x = 6.218750, .point.y = 186.750000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 15.660156, .point.y = 190.910156}, + {.point.x = 29.242188, .point.y = 204.425781}, + {.point.x = 34.906250, .point.y = 215.218750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 42.023438, .point.y = 228.773438}, + {.point.x = 47.375000, .point.y = 247.988281}, + {.point.x = 50.562500, .point.y = 271.718750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 54.019531, .point.y = 297.421875}, + {.point.x = 54.898438, .point.y = 301.527344}, + {.point.x = 58.312500, .point.y = 309.187500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 62.550781, .point.y = 318.691406}, + {.point.x = 74.937500, .point.y = 334.589844}, + {.point.x = 86.937500, .point.y = 345.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 96.863281, .point.y = 355.152344}, + {.point.x = 97.121094, .point.y = 355.523438}, + {.point.x = 90.031250, .point.y = 350.781250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 85.796875, .point.y = 347.949219}, + {.point.x = 81.859375, .point.y = 345.039062}, + {.point.x = 81.312500, .point.y = 344.281250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 80.769531, .point.y = 343.527344}, + {.point.x = 77.796875, .point.y = 341.339844}, + {.point.x = 74.687500, .point.y = 339.437500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 69.062500, .point.y = 336.000000}, + {.header.type = 1, .header.length = 2}, + {.point.x = 70.343750, .point.y = 343.656250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 71.976562, .point.y = 353.304688}, + {.point.x = 81.210938, .point.y = 377.386719}, + {.point.x = 85.375000, .point.y = 382.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 89.117188, .point.y = 387.804688}, + {.point.x = 92.617188, .point.y = 393.371094}, + {.point.x = 96.406250, .point.y = 398.937500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 140.062500, .point.y = 398.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 125.261719, .point.y = 391.414062}, + {.point.x = 111.375000, .point.y = 383.683594}, + {.point.x = 111.375000, .point.y = 382.625000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 111.375000, .point.y = 382.187500}, + {.point.x = 116.660156, .point.y = 384.617188}, + {.point.x = 123.156250, .point.y = 388.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 130.234375, .point.y = 391.750000}, + {.point.x = 137.937500, .point.y = 395.398438}, + {.point.x = 146.062500, .point.y = 398.937500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 247.531250, .point.y = 398.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 212.316406, .point.y = 389.019531}, + {.point.x = 176.621094, .point.y = 375.136719}, + {.point.x = 146.812500, .point.y = 359.125000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 124.667969, .point.y = 347.230469}, + {.point.x = 121.132812, .point.y = 343.796875}, + {.point.x = 141.375000, .point.y = 353.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 181.539062, .point.y = 373.777344}, + {.point.x = 230.722656, .point.y = 390.035156}, + {.point.x = 277.125000, .point.y = 398.937500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 387.281250, .point.y = 398.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 389.449219, .point.y = 398.289062}, + {.point.x = 391.582031, .point.y = 397.632812}, + {.point.x = 393.406250, .point.y = 397.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 402.406250, .point.y = 394.074219}, + {.point.x = 403.734375, .point.y = 393.250000}, + {.point.x = 408.781250, .point.y = 384.656250}, + {.header.type = 1, .header.length = 2}, + {.point.x = 408.781250, .point.y = 369.218750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 354.609375, .point.y = 380.550781}, + {.point.x = 261.796875, .point.y = 362.976562}, + {.point.x = 186.843750, .point.y = 326.812500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 170.699219, .point.y = 319.023438}, + {.point.x = 149.531250, .point.y = 307.312500}, + {.point.x = 149.531250, .point.y = 306.156250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 149.531250, .point.y = 305.832031}, + {.point.x = 156.691406, .point.y = 309.121094}, + {.point.x = 165.437500, .point.y = 313.468750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 208.855469, .point.y = 335.046875}, + {.point.x = 265.519531, .point.y = 352.527344}, + {.point.x = 313.187500, .point.y = 359.093750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 333.339844, .point.y = 361.871094}, + {.point.x = 369.632812, .point.y = 362.246094}, + {.point.x = 385.093750, .point.y = 359.812500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 391.878906, .point.y = 358.746094}, + {.point.x = 401.050781, .point.y = 356.160156}, + {.point.x = 408.781250, .point.y = 353.437500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 408.781250, .point.y = 327.812500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 357.781250, .point.y = 339.546875}, + {.point.x = 260.570312, .point.y = 318.058594}, + {.point.x = 187.781250, .point.y = 278.000000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 172.882812, .point.y = 269.800781}, + {.point.x = 170.656250, .point.y = 267.132812}, + {.point.x = 184.531250, .point.y = 274.093750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 225.066406, .point.y = 294.429688}, + {.point.x = 273.574219, .point.y = 309.937500}, + {.point.x = 316.531250, .point.y = 316.281250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 339.093750, .point.y = 319.613281}, + {.point.x = 375.757812, .point.y = 320.351562}, + {.point.x = 389.531250, .point.y = 317.718750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 395.226562, .point.y = 316.632812}, + {.point.x = 402.355469, .point.y = 314.566406}, + {.point.x = 408.781250, .point.y = 312.343750}, + {.header.type = 1, .header.length = 2}, + {.point.x = 408.781250, .point.y = 286.781250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 392.652344, .point.y = 290.996094}, + {.point.x = 359.242188, .point.y = 291.675781}, + {.point.x = 331.593750, .point.y = 286.687500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 293.644531, .point.y = 279.839844}, + {.point.x = 248.632812, .point.y = 264.089844}, + {.point.x = 217.218750, .point.y = 246.687500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 202.500000, .point.y = 238.531250}, + {.point.x = 200.261719, .point.y = 235.210938}, + {.point.x = 214.593750, .point.y = 242.781250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 228.839844, .point.y = 250.308594}, + {.point.x = 256.128906, .point.y = 260.804688}, + {.point.x = 277.156250, .point.y = 266.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 323.738281, .point.y = 280.226562}, + {.point.x = 366.109375, .point.y = 283.082031}, + {.point.x = 394.843750, .point.y = 274.781250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 399.859375, .point.y = 273.332031}, + {.point.x = 404.953125, .point.y = 271.539062}, + {.point.x = 408.781250, .point.y = 269.937500}, + {.header.type = 1, .header.length = 2}, + {.point.x = 408.781250, .point.y = 246.375000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 405.968750, .point.y = 241.371094}, + {.point.x = 403.597656, .point.y = 237.246094}, + {.point.x = 403.343750, .point.y = 237.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 403.019531, .point.y = 236.753906}, + {.point.x = 398.386719, .point.y = 238.460938}, + {.point.x = 393.031250, .point.y = 240.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 383.820312, .point.y = 244.945312}, + {.point.x = 382.070312, .point.y = 245.160156}, + {.point.x = 359.625000, .point.y = 245.093750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 340.851562, .point.y = 245.039062}, + {.point.x = 332.679688, .point.y = 244.292969}, + {.point.x = 320.437500, .point.y = 241.468750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 293.203125, .point.y = 235.187500}, + {.point.x = 255.355469, .point.y = 220.000000}, + {.point.x = 242.218750, .point.y = 210.062500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 238.386719, .point.y = 207.164062}, + {.point.x = 238.996094, .point.y = 207.246094}, + {.point.x = 246.812500, .point.y = 210.812500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 279.453125, .point.y = 225.703125}, + {.point.x = 308.761719, .point.y = 233.277344}, + {.point.x = 338.656250, .point.y = 234.531250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 357.054688, .point.y = 235.304688}, + {.point.x = 360.980469, .point.y = 234.976562}, + {.point.x = 371.375000, .point.y = 231.968750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 389.828125, .point.y = 226.628906}, + {.point.x = 390.781250, .point.y = 225.835938}, + {.point.x = 391.156250, .point.y = 215.093750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 391.449219, .point.y = 206.785156}, + {.point.x = 390.515625, .point.y = 204.261719}, + {.point.x = 382.312500, .point.y = 190.468750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 377.289062, .point.y = 182.019531}, + {.point.x = 373.121094, .point.y = 173.703125}, + {.point.x = 373.031250, .point.y = 171.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 372.945312, .point.y = 170.171875}, + {.point.x = 371.769531, .point.y = 171.984375}, + {.point.x = 370.468750, .point.y = 176.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 363.761719, .point.y = 196.949219}, + {.point.x = 349.835938, .point.y = 203.890625}, + {.point.x = 323.812500, .point.y = 199.250000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 309.765625, .point.y = 196.746094}, + {.point.x = 278.191406, .point.y = 183.371094}, + {.point.x = 280.875000, .point.y = 181.062500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 281.234375, .point.y = 180.757812}, + {.point.x = 286.589844, .point.y = 182.289062}, + {.point.x = 292.781250, .point.y = 184.437500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 313.656250, .point.y = 191.675781}, + {.point.x = 335.207031, .point.y = 191.050781}, + {.point.x = 345.625000, .point.y = 182.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 353.035156, .point.y = 177.167969}, + {.point.x = 355.558594, .point.y = 171.070312}, + {.point.x = 355.437500, .point.y = 159.343750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 355.097656, .point.y = 126.226562}, + {.point.x = 321.609375, .point.y = 89.011719}, + {.point.x = 275.187500, .point.y = 70.156250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 265.082031, .point.y = 66.050781}, + {.point.x = 241.316406, .point.y = 58.656250}, + {.point.x = 238.187500, .point.y = 58.656250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 238.132812, .point.y = 58.656250}, + {.point.x = 238.070312, .point.y = 58.636719}, + {.point.x = 238.031250, .point.y = 58.656250}, + {.header.type = 3, .header.length = 1}, + {.header.type = 0, .header.length = 2}, + {.point.x = 388.437500, .point.y = 132.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 387.890625, .point.y = 132.968750}, + {.point.x = 386.785156, .point.y = 133.718750}, + {.point.x = 385.156250, .point.y = 135.031250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 374.984375, .point.y = 143.238281}, + {.point.x = 375.207031, .point.y = 153.203125}, + {.point.x = 385.968750, .point.y = 167.937500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 388.792969, .point.y = 171.800781}, + {.point.x = 392.011719, .point.y = 177.000000}, + {.point.x = 393.125000, .point.y = 179.531250}, + {.header.type = 1, .header.length = 2}, + {.point.x = 395.156250, .point.y = 184.156250}, + {.header.type = 1, .header.length = 2}, + {.point.x = 398.718750, .point.y = 179.531250}, + {.header.type = 2, .header.length = 4}, + {.point.x = 403.707031, .point.y = 173.039062}, + {.point.x = 403.257812, .point.y = 162.636719}, + {.point.x = 397.656250, .point.y = 153.875000}, + {.header.type = 2, .header.length = 4}, + {.point.x = 389.765625, .point.y = 141.527344}, + {.point.x = 387.507812, .point.y = 136.390625}, + {.point.x = 388.656250, .point.y = 133.812500}, + {.header.type = 2, .header.length = 4}, + {.point.x = 388.929688, .point.y = 133.203125}, + {.point.x = 388.921875, .point.y = 132.882812}, + {.point.x = 388.656250, .point.y = 132.843750}, + {.header.type = 2, .header.length = 4}, + {.point.x = 388.601562, .point.y = 132.835938}, + {.point.x = 388.519531, .point.y = 132.828125}, + {.point.x = 388.437500, .point.y = 132.843750}, + {.header.type = 3, .header.length = 1}, + {.header.type = 0, .header.length = 2}, + {.point.x = 388.437500, .point.y = 132.843750} }; cairo_path_t glade_path = {0, glade_path_data, 397}; diff --git a/gladeui/glade-placeholder.h b/gladeui/glade-placeholder.h index 37bb4052..9cb29bd1 100644 --- a/gladeui/glade-placeholder.h +++ b/gladeui/glade-placeholder.h @@ -43,7 +43,7 @@ typedef struct _GladePlaceholderPrivate GladePlaceholderPrivate; struct _GladePlaceholder { GtkWidget widget; - + GladePlaceholderPrivate *priv; }; diff --git a/gladeui/glade-popup.c b/gladeui/glade-popup.c index 56b46f4e..ecab7125 100644 --- a/gladeui/glade-popup.c +++ b/gladeui/glade-popup.c @@ -53,7 +53,7 @@ static void glade_popup_select_cb (GtkMenuItem *item, GladeWidget *widget) { glade_project_selection_set (glade_widget_get_project (widget), - glade_widget_get_object (widget), TRUE); + glade_widget_get_object (widget), TRUE); } typedef struct { @@ -203,8 +203,8 @@ glade_popup_menuitem_packing_activated (GtkMenuItem *item, { parent = glade_widget_get_parent (widget); glade_widget_adaptor_child_action_activate (glade_widget_get_adaptor (parent), - glade_widget_get_object (parent), - glade_widget_get_object (widget), action_path); + glade_widget_get_object (parent), + glade_widget_get_object (widget), action_path); } } @@ -243,7 +243,7 @@ glade_popup_action_populate_menu_real (GtkWidget *menu, GtkWidget *submenu = NULL; if (!glade_widget_action_get_visible (action)) - continue; + continue; if (children) { @@ -306,7 +306,7 @@ glade_popup_action_populate_menu (GtkWidget *menu, GList *children = glade_widget_action_get_children (action); if (glade_widget_get_action (widget, aclass->path) && - glade_widget_action_get_visible (action)) + glade_widget_action_get_visible (action)) return glade_popup_action_populate_menu_real (menu, widget, children, @@ -315,7 +315,7 @@ glade_popup_action_populate_menu (GtkWidget *menu, widget); if (glade_widget_get_pack_action (widget, aclass->path) && - glade_widget_action_get_visible (action)) + glade_widget_action_get_visible (action)) return glade_popup_action_populate_menu_real (menu, glade_widget_get_parent (widget), children, @@ -343,9 +343,9 @@ glade_popup_action_populate_menu (GtkWidget *menu, } n += glade_popup_action_populate_menu_real - (menu, glade_widget_get_parent (widget), - glade_widget_get_pack_actions (widget), - G_CALLBACK (glade_popup_menuitem_packing_activated), widget); + (menu, glade_widget_get_parent (widget), + glade_widget_get_pack_actions (widget), + G_CALLBACK (glade_popup_menuitem_packing_activated), widget); } return n; @@ -354,8 +354,8 @@ glade_popup_action_populate_menu (GtkWidget *menu, static GtkWidget * glade_popup_create_menu (GladeWidget *widget, GladePlaceholder *placeholder, - GladeProject *project, - gboolean packing) + GladeProject *project, + gboolean packing) { GtkWidget *popup_menu; GtkWidget *separator; @@ -376,12 +376,12 @@ glade_popup_create_menu (GladeWidget *widget, data->placeholder = placeholder; g_object_set_data_full (G_OBJECT (popup_menu), "root-data-destroy-me", - data, (GDestroyNotify)g_free); + data, (GDestroyNotify)g_free); glade_popup_append_item (popup_menu, _("_Add widget here"), data->parent != NULL, - glade_popup_widget_add_cb, - data); + glade_popup_widget_add_cb, + data); glade_popup_append_item (popup_menu, _("Add widget as _toplevel"), TRUE, glade_popup_root_add_cb, data); @@ -449,7 +449,7 @@ glade_popup_create_menu (GladeWidget *widget, } } else if (widget && (glade_widget_get_actions (widget) || - (packing && glade_widget_get_pack_actions (widget)))) + (packing && glade_widget_get_pack_actions (widget)))) { GtkWidget *separator = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), separator); @@ -502,7 +502,7 @@ glade_popup_placeholder_pop (GladePlaceholder *placeholder, widget = glade_placeholder_get_parent (placeholder); popup_menu = glade_popup_create_menu (widget, placeholder, - glade_widget_get_project (widget), TRUE); + glade_widget_get_project (widget), TRUE); if (event) { @@ -521,8 +521,8 @@ glade_popup_placeholder_pop (GladePlaceholder *placeholder, void glade_popup_palette_pop (GladePalette *palette, - GladeWidgetAdaptor *adaptor, - GdkEventButton *event) + GladeWidgetAdaptor *adaptor, + GdkEventButton *event) { GladeProject *project; GtkWidget *popup_menu; @@ -540,7 +540,7 @@ glade_popup_palette_pop (GladePalette *palette, data->adaptor = adaptor; data->project = project; g_object_set_data_full (G_OBJECT (popup_menu), "root-data-destroy-me", - data, (GDestroyNotify)g_free); + data, (GDestroyNotify)g_free); glade_popup_append_item (popup_menu, _("Add widget as _toplevel"), TRUE, glade_popup_root_add_cb, data); diff --git a/gladeui/glade-popup.h b/gladeui/glade-popup.h index 78b1c674..8306af43 100644 --- a/gladeui/glade-popup.h +++ b/gladeui/glade-popup.h @@ -4,29 +4,29 @@ G_BEGIN_DECLS void glade_popup_widget_pop (GladeWidget *widget, - GdkEventButton *event, - gboolean packing); + GdkEventButton *event, + gboolean packing); void glade_popup_placeholder_pop (GladePlaceholder *placeholder, - GdkEventButton *event); + GdkEventButton *event); void glade_popup_clipboard_pop (GladeWidget *widget, - GdkEventButton *event); + GdkEventButton *event); void glade_popup_palette_pop (GladePalette *palette, - GladeWidgetAdaptor *adaptor, - GdkEventButton *event); + GladeWidgetAdaptor *adaptor, + GdkEventButton *event); gint glade_popup_action_populate_menu (GtkWidget *menu, - GladeWidget *widget, - GladeWidgetAction *action, - gboolean packing); + GladeWidget *widget, + GladeWidgetAction *action, + gboolean packing); void glade_popup_simple_pop (GladeProject *project, - GdkEventButton *event); + GdkEventButton *event); void glade_popup_property_pop (GladeProperty *property, - GdkEventButton *event); + GdkEventButton *event); gboolean glade_popup_is_popup_event (GdkEventButton *event); diff --git a/gladeui/glade-preview.c b/gladeui/glade-preview.c index cbac6ec7..05897ff0 100644 --- a/gladeui/glade-preview.c +++ b/gladeui/glade-preview.c @@ -283,8 +283,8 @@ glade_preview_launch (GladeWidget *widget, const gchar *buffer) preview->priv->watch = g_child_watch_add (preview->priv->pid, - glade_preview_internal_watch, - preview); + glade_preview_internal_watch, + preview); g_free (executable); g_free (name); diff --git a/gladeui/glade-preview.h b/gladeui/glade-preview.h index fae01958..86563350 100644 --- a/gladeui/glade-preview.h +++ b/gladeui/glade-preview.h @@ -51,9 +51,9 @@ struct _GladePreviewClass GType glade_preview_get_type (void) G_GNUC_CONST; GladePreview *glade_preview_launch (GladeWidget *widget, - const gchar *buffer); + const gchar *buffer); void glade_preview_update (GladePreview *preview, - const gchar *buffer); + const gchar *buffer); GladeWidget *glade_preview_get_widget (GladePreview *preview); GPid glade_preview_get_pid (GladePreview *preview); diff --git a/gladeui/glade-project-properties.c b/gladeui/glade-project-properties.c index f517591f..cf6e33e5 100644 --- a/gladeui/glade-project-properties.c +++ b/gladeui/glade-project-properties.c @@ -32,36 +32,36 @@ /* GObjectClass */ static void glade_project_properties_finalize (GObject *object); static void glade_project_properties_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); + guint prop_id, + const GValue *value, + GParamSpec *pspec); /* UI Callbacks */ static void on_template_combo_box_changed (GtkComboBox *combo, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void on_template_checkbutton_toggled (GtkToggleButton *togglebutton, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void resource_default_toggled (GtkWidget *widget, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void resource_relative_toggled (GtkWidget *widget, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void resource_fullpath_toggled (GtkWidget *widget, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void on_relative_path_entry_insert_text (GtkEditable *editable, gchar *new_text, gint new_text_length, gint *position, GladeProjectProperties *properties); static void on_relative_path_entry_changed (GtkEntry *entry, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void resource_full_path_set (GtkFileChooserButton *button, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void verify_clicked (GtkWidget *button, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void on_domain_entry_changed (GtkWidget *entry, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void target_button_clicked (GtkWidget *widget, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void on_glade_project_properties_hide (GtkWidget *widget, GladeProjectProperties *properties); static void on_css_filechooser_file_set (GtkFileChooserButton *widget, @@ -75,19 +75,19 @@ static void on_license_data_changed (GladeProjectProperties *p /* Project callbacks */ static void project_resource_path_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties); + GParamSpec *pspec, + GladeProjectProperties *properties); static void project_template_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties); + GParamSpec *pspec, + GladeProjectProperties *properties); static void project_domain_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties); + GParamSpec *pspec, + GladeProjectProperties *properties); static void project_targets_changed (GladeProject *project, - GladeProjectProperties *properties); + GladeProjectProperties *properties); static void project_license_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties); + GParamSpec *pspec, + GladeProjectProperties *properties); static void project_css_provider_path_changed (GladeProject *project, GParamSpec *pspec, GladeProjectProperties *properties); @@ -166,9 +166,9 @@ glade_project_properties_class_init (GladeProjectPropertiesClass *klass) g_object_class_install_property (gobject_class, PROP_PROJECT, g_param_spec_object ("project", _("Project"), - _("The project this properties dialog was created for"), - GLADE_TYPE_PROJECT, - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _("The project this properties dialog was created for"), + GLADE_TYPE_PROJECT, + G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); /* Setup the template GtkBuilder xml for this class */ @@ -357,7 +357,7 @@ update_prefs_for_resource_path (GladeProjectProperties *properties) static void glade_project_properties_set_project (GladeProjectProperties *properties, - GladeProject *project) + GladeProject *project) { GladeProjectPropertiesPrivate *priv = properties->priv; @@ -366,17 +366,17 @@ glade_project_properties_set_project (GladeProjectProperties *properties, priv->project = project; g_signal_connect (priv->project, "notify::resource-path", - G_CALLBACK (project_resource_path_changed), properties); + G_CALLBACK (project_resource_path_changed), properties); g_signal_connect (priv->project, "notify::template", - G_CALLBACK (project_template_changed), properties); + G_CALLBACK (project_template_changed), properties); g_signal_connect (priv->project, "notify::translation-domain", - G_CALLBACK (project_domain_changed), properties); + G_CALLBACK (project_domain_changed), properties); g_signal_connect (priv->project, "notify::css-provider-path", - G_CALLBACK (project_css_provider_path_changed), properties); + G_CALLBACK (project_css_provider_path_changed), properties); g_signal_connect (priv->project, "targets-changed", - G_CALLBACK (project_targets_changed), properties); + G_CALLBACK (project_targets_changed), properties); g_signal_connect (priv->project, "notify::license", - G_CALLBACK (project_license_changed), properties); + G_CALLBACK (project_license_changed), properties); target_version_box_fill (properties); update_prefs_for_resource_path (properties); @@ -388,15 +388,15 @@ glade_project_properties_set_project (GladeProjectProperties *properties, static void glade_project_properties_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) + guint prop_id, + const GValue *value, + GParamSpec *pspec) { switch (prop_id) { case PROP_PROJECT: glade_project_properties_set_project (GLADE_PROJECT_PROPERTIES (object), - g_value_get_object (value)); + g_value_get_object (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -409,7 +409,7 @@ glade_project_properties_set_property (GObject *object, ********************************************************/ static void target_button_clicked (GtkWidget *widget, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GladeTargetableVersion *version; @@ -425,7 +425,7 @@ target_button_clicked (GtkWidget *widget, static void resource_default_toggled (GtkWidget *widget, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; @@ -438,7 +438,7 @@ resource_default_toggled (GtkWidget *widget, static void resource_relative_toggled (GtkWidget *widget, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (widget); @@ -454,7 +454,7 @@ resource_relative_toggled (GtkWidget *widget, static void resource_fullpath_toggled (GtkWidget *widget, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (widget); @@ -512,7 +512,7 @@ resource_full_path_set (GtkFileChooserButton *button, GladeProjectProperties *pr static void on_template_combo_box_changed (GtkComboBox *combo, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GtkTreeIter iter; @@ -549,22 +549,22 @@ on_template_checkbutton_toggled (GtkToggleButton *togglebutton, GList *l; for (l = glade_project_toplevels (priv->project); l; l = l->next) - { - GObject *object = l->data; - GladeWidget *gwidget; + { + GObject *object = l->data; + GladeWidget *gwidget; - gwidget = glade_widget_get_from_gobject (object); + gwidget = glade_widget_get_from_gobject (object); - if (GTK_IS_WIDGET (object)) - { - glade_command_set_project_template (priv->project, gwidget); - composite = TRUE; - break; - } - } + if (GTK_IS_WIDGET (object)) + { + glade_command_set_project_template (priv->project, gwidget); + composite = TRUE; + break; + } + } if (!composite) - gtk_toggle_button_set_active (togglebutton, FALSE); + gtk_toggle_button_set_active (togglebutton, FALSE); } else glade_command_set_project_template (priv->project, NULL); @@ -582,8 +582,8 @@ template_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) if (visible) { gtk_tree_model_get (model, iter, - GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, - -1); + GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, + -1); visible = GTK_IS_WIDGET (object); g_object_unref (object); @@ -610,9 +610,9 @@ verify_clicked (GtkWidget *button, GladeProjectProperties *properties) GladeProjectPropertiesPrivate *priv = properties->priv; if (glade_project_verify (priv->project, FALSE, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_DEPRECATIONS | - GLADE_VERIFY_UNRECOGNIZED)) + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_DEPRECATIONS | + GLADE_VERIFY_UNRECOGNIZED)) { gchar *name = glade_project_get_name (priv->project); glade_util_ui_message (glade_app_get_window (), @@ -969,7 +969,7 @@ on_css_filechooser_file_set (GtkFileChooserButton *widget, ******************************************************/ static void project_targets_changed (GladeProject *project, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GList *list; @@ -995,29 +995,29 @@ project_targets_changed (GladeProject *project, /* Fetch the radios for this catalog */ if (priv->target_radios && - (radios = g_hash_table_lookup (priv->target_radios, glade_catalog_get_name (catalog))) != NULL) - { - for (l = radios; l; l = l->next) - { - GtkWidget *radio = l->data; - - /* Activate the appropriate button for the project/catalog */ - version = g_object_get_data (G_OBJECT (radio), "version"); - if (version->major == major && version->minor == minor) - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); - break; - } - } - } + (radios = g_hash_table_lookup (priv->target_radios, glade_catalog_get_name (catalog))) != NULL) + { + for (l = radios; l; l = l->next) + { + GtkWidget *radio = l->data; + + /* Activate the appropriate button for the project/catalog */ + version = g_object_get_data (G_OBJECT (radio), "version"); + if (version->major == major && version->minor == minor) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); + break; + } + } + } } priv->ignore_ui_cb = FALSE; } static void project_domain_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties) + GParamSpec *pspec, + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; const gchar *domain; @@ -1032,8 +1032,8 @@ project_domain_changed (GladeProject *project, static void project_resource_path_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties) + GParamSpec *pspec, + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; priv->ignore_ui_cb = TRUE; @@ -1043,8 +1043,8 @@ project_resource_path_changed (GladeProject *project, static void project_template_changed (GladeProject *project, - GParamSpec *pspec, - GladeProjectProperties *properties) + GParamSpec *pspec, + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; GtkTreeModel *model; @@ -1077,11 +1077,11 @@ project_template_changed (GladeProject *project, g_object_unref (obj); if (gwidget == glade_project_get_template (priv->project)) - { + { gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->template_combobox), &iter); - template_found = TRUE; - break; + template_found = TRUE; + break; } valid = gtk_tree_model_iter_next (model, &iter); @@ -1099,7 +1099,7 @@ project_template_changed (GladeProject *project, static void project_license_changed (GladeProject *project, GParamSpec *pspec, - GladeProjectProperties *properties) + GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = properties->priv; diff --git a/gladeui/glade-project-properties.h b/gladeui/glade-project-properties.h index e9684f80..e63f5c77 100644 --- a/gladeui/glade-project-properties.h +++ b/gladeui/glade-project-properties.h @@ -29,13 +29,13 @@ G_BEGIN_DECLS #define GLADE_TYPE_PROJECT_PROPERTIES (glade_project_properties_get_type ()) #define GLADE_PROJECT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST \ - ((obj), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectProperties)) + ((obj), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectProperties)) #define GLADE_PROJECT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \ - ((klass), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectPropertiesClass)) + ((klass), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectPropertiesClass)) #define GLADE_IS_PROJECT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_PROJECT_PROPERTIES)) #define GLADE_IS_PROJECT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROJECT_PROPERTIES)) #define GLADE_PROJECT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \ - ((obj), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectPropertiesClass)) + ((obj), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectPropertiesClass)) typedef struct _GladeProjectProperties GladeProjectProperties; typedef struct _GladeProjectPropertiesClass GladeProjectPropertiesClass; diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c index b86be762..1c40c865 100644 --- a/gladeui/glade-project.c +++ b/gladeui/glade-project.c @@ -59,22 +59,22 @@ static void glade_project_target_version_for_adaptor (GladeProject *project, - GladeWidgetAdaptor *adaptor, - gint *major, - gint *minor); + GladeWidgetAdaptor *adaptor, + gint *major, + gint *minor); static void glade_project_verify_properties (GladeWidget *widget); static void glade_project_verify_project_for_ui (GladeProject *project); static void glade_project_verify_adaptor (GladeProject *project, - GladeWidgetAdaptor *adaptor, - const gchar *path_name, - GString *string, - GladeVerifyFlags flags, - gboolean forwidget, - GladeSupportMask *mask); + GladeWidgetAdaptor *adaptor, + const gchar *path_name, + GString *string, + GladeVerifyFlags flags, + gboolean forwidget, + GladeSupportMask *mask); static void glade_project_set_readonly (GladeProject *project, - gboolean readonly); + gboolean readonly); static void glade_project_set_modified (GladeProject *project, - gboolean modified); + gboolean modified); static void glade_project_model_iface_init (GtkTreeModelIface *iface); @@ -425,11 +425,11 @@ glade_project_set_property (GObject *object, break; case PROP_TEMPLATE: glade_project_set_template (GLADE_PROJECT (object), - g_value_get_object (value)); + g_value_get_object (value)); break; case PROP_RESOURCE_PATH: glade_project_set_resource_path (GLADE_PROJECT (object), - g_value_get_string (value)); + g_value_get_string (value)); break; case PROP_LICENSE: glade_project_set_license (GLADE_PROJECT (object), @@ -1148,7 +1148,7 @@ glade_project_model_get_value (GtkTreeModel *model, break; case GLADE_PROJECT_MODEL_COLUMN_WARNING: g_value_set_string (value, glade_widget_support_warning (widget)); - break; + break; default: g_assert_not_reached (); @@ -1354,8 +1354,8 @@ glade_project_fix_template (GladeProject *project) if (composite) { - glade_project_set_template (project, gwidget); - break; + glade_project_set_template (project, gwidget); + break; } } } @@ -1834,7 +1834,7 @@ glade_project_count_xml_objects (GladeProject *project, node; node = glade_xml_node_next (node)) { if (glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) || - glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)) + glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)) count = glade_project_count_xml_objects (project, node, ++count); else if (glade_xml_node_verify_silent (node, GLADE_XML_TAG_CHILD)) count = glade_project_count_xml_objects (project, node, count); @@ -2000,14 +2000,14 @@ glade_project_load_internal (GladeProject *project) display_name = glade_project_get_name (project); if (glade_util_ui_message (glade_app_get_window (), - GLADE_UI_YES_OR_NO, NULL, - _("An automatically saved version of `%s' is more recent.\n\n" - "Would you like to load the autosave version instead?"), - display_name)) - { - mtime = autosave_mtime; - load_path = g_strdup (autosave_path); - } + GLADE_UI_YES_OR_NO, NULL, + _("An automatically saved version of `%s' is more recent.\n\n" + "Would you like to load the autosave version instead?"), + display_name)) + { + mtime = autosave_mtime; + load_path = g_strdup (autosave_path); + } g_free (display_name); } @@ -2082,7 +2082,7 @@ glade_project_load_internal (GladeProject *project) { /* Skip "requires" tags */ if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) || - glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE))) + glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE))) continue; if ((widget = glade_widget_read (project, NULL, node, NULL)) != NULL) @@ -2829,9 +2829,9 @@ sync_project_resource_path (GladeProject *project) */ gboolean glade_project_save_verify (GladeProject *project, - const gchar *path, - GladeVerifyFlags flags, - GError **error) + const gchar *path, + GladeVerifyFlags flags, + GError **error) { GladeXmlContext *context; GladeXmlDoc *doc; @@ -2921,9 +2921,9 @@ gboolean glade_project_save (GladeProject *project, const gchar *path, GError **error) { return glade_project_save_verify (project, path, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_UNRECOGNIZED, - error); + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_UNRECOGNIZED, + error); } /** @@ -3059,7 +3059,7 @@ glade_project_verify_property_internal (GladeProject *project, const gchar *path_name, GString *string, gboolean forwidget, - GladeVerifyFlags flags) + GladeVerifyFlags flags) { GladeWidgetAdaptor *adaptor, *prop_adaptor; GladePropertyClass *pclass; @@ -3088,9 +3088,9 @@ glade_project_verify_property_internal (GladeProject *project, !GPC_VERSION_CHECK (pclass, target_major, target_minor)) { GLADE_NOTE (VERIFY, g_print ("VERIFY: Property '%s' of adaptor %s not available in version %d.%d\n", - glade_property_class_id (pclass), - glade_widget_adaptor_get_name (adaptor), - target_major, target_minor)); + glade_property_class_id (pclass), + glade_widget_adaptor_get_name (adaptor), + target_major, target_minor)); if (forwidget) { @@ -3116,19 +3116,19 @@ glade_project_verify_property_internal (GladeProject *project, glade_property_class_since_minor (pclass)); } else if ((flags & GLADE_VERIFY_DEPRECATIONS) != 0 && - glade_property_class_deprecated (pclass)) + glade_property_class_deprecated (pclass)) { GLADE_NOTE (VERIFY, g_print ("VERIFY: Property '%s' of adaptor %s is deprecated\n", - glade_property_class_id (pclass), - glade_widget_adaptor_get_name (adaptor))); + glade_property_class_id (pclass), + glade_widget_adaptor_get_name (adaptor))); if (forwidget) - glade_property_set_support_warning (property, FALSE, PROP_DEPRECATED_MSG); + glade_property_set_support_warning (property, FALSE, PROP_DEPRECATED_MSG); else g_string_append_printf (string, PROP_DEPRECATED_FMT, path_name, - glade_property_class_get_name (pclass), + glade_property_class_get_name (pclass), glade_widget_adaptor_get_title (adaptor)); } else if (forwidget) @@ -3142,7 +3142,7 @@ glade_project_verify_properties_internal (GladeWidget *widget, const gchar *path_name, GString *string, gboolean forwidget, - GladeVerifyFlags flags) + GladeVerifyFlags flags) { GList *list; GladeProperty *property; @@ -3173,7 +3173,7 @@ glade_project_verify_signal_internal (GladeWidget *widget, const gchar *path_name, GString *string, gboolean forwidget, - GladeVerifyFlags flags) + GladeVerifyFlags flags) { GladeSignalClass *signal_class; GladeWidgetAdaptor *adaptor; @@ -3202,9 +3202,9 @@ glade_project_verify_signal_internal (GladeWidget *widget, !GSC_VERSION_CHECK (signal_class, target_major, target_minor)) { GLADE_NOTE (VERIFY, g_print ("VERIFY: Signal '%s' of adaptor %s not avalable in version %d.%d\n", - glade_signal_get_name (signal), - glade_widget_adaptor_get_name (adaptor), - target_major, target_minor)); + glade_signal_get_name (signal), + glade_widget_adaptor_get_name (adaptor), + target_major, target_minor)); if (forwidget) { @@ -3229,14 +3229,14 @@ glade_project_verify_signal_internal (GladeWidget *widget, glade_signal_class_since_minor (signal_class)); } else if ((flags & GLADE_VERIFY_DEPRECATIONS) != 0 && - glade_signal_class_deprecated (signal_class)) + glade_signal_class_deprecated (signal_class)) { GLADE_NOTE (VERIFY, g_print ("VERIFY: Signal '%s' of adaptor %s is deprecated\n", - glade_signal_get_name (signal), - glade_widget_adaptor_get_name (adaptor))); + glade_signal_get_name (signal), + glade_widget_adaptor_get_name (adaptor))); if (forwidget) - glade_signal_set_support_warning (signal, SIGNAL_DEPRECATED_MSG); + glade_signal_set_support_warning (signal, SIGNAL_DEPRECATED_MSG); else g_string_append_printf (string, SIGNAL_DEPRECATED_FMT, @@ -3263,18 +3263,18 @@ glade_project_verify_property (GladeProperty *property) if (project) glade_project_verify_property_internal (project, property, NULL, NULL, TRUE, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_DEPRECATIONS | - GLADE_VERIFY_UNRECOGNIZED); + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_DEPRECATIONS | + GLADE_VERIFY_UNRECOGNIZED); } void glade_project_verify_signal (GladeWidget *widget, GladeSignal *signal) { glade_project_verify_signal_internal (widget, signal, NULL, NULL, TRUE, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_DEPRECATIONS | - GLADE_VERIFY_UNRECOGNIZED); + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_DEPRECATIONS | + GLADE_VERIFY_UNRECOGNIZED); } static void @@ -3282,7 +3282,7 @@ glade_project_verify_signals (GladeWidget *widget, const gchar *path_name, GString *string, gboolean forwidget, - GladeVerifyFlags flags) + GladeVerifyFlags flags) { GladeSignal *signal; GList *signals, *list; @@ -3320,13 +3320,13 @@ glade_project_verify_properties (GladeWidget *widget) return; glade_project_verify_properties_internal (widget, NULL, NULL, TRUE, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_DEPRECATIONS | - GLADE_VERIFY_UNRECOGNIZED); + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_DEPRECATIONS | + GLADE_VERIFY_UNRECOGNIZED); glade_project_verify_signals (widget, NULL, NULL, TRUE, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_DEPRECATIONS | - GLADE_VERIFY_UNRECOGNIZED); + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_DEPRECATIONS | + GLADE_VERIFY_UNRECOGNIZED); glade_widget_support_changed (widget); } @@ -3334,7 +3334,7 @@ glade_project_verify_properties (GladeWidget *widget) static gboolean glade_project_verify_dialog (GladeProject *project, GString *string, - gboolean saving) + gboolean saving) { GtkWidget *swindow; GtkWidget *textview; @@ -3400,7 +3400,7 @@ glade_project_verify (GladeProject *project, GladeWidget *widget = glade_widget_get_from_gobject (list->data); if ((flags & GLADE_VERIFY_UNRECOGNIZED) != 0 && - GLADE_IS_OBJECT_STUB (list->data)) + GLADE_IS_OBJECT_STUB (list->data)) { gchar *type; g_object_get (list->data, "object-type", &type, NULL); @@ -3475,11 +3475,11 @@ glade_project_verify_adaptor (GladeProject *project, /* Only one versioning message (builder or otherwise)... */ if ((flags & GLADE_VERIFY_VERSIONS) != 0 && - !GWA_VERSION_CHECK (adaptor_iter, target_major, target_minor)) + !GWA_VERSION_CHECK (adaptor_iter, target_major, target_minor)) { - GLADE_NOTE (VERIFY, g_print ("VERIFY: Adaptor '%s' not available in version %d.%d\n", - glade_widget_adaptor_get_name (adaptor_iter), - target_major, target_minor)); + GLADE_NOTE (VERIFY, g_print ("VERIFY: Adaptor '%s' not available in version %d.%d\n", + glade_widget_adaptor_get_name (adaptor_iter), + target_major, target_minor)); if (forwidget) g_string_append_printf (string, @@ -3550,10 +3550,10 @@ glade_project_verify_widget_adaptor (GladeProject *project, glade_project_verify_adaptor (project, adaptor, NULL, string, - GLADE_VERIFY_VERSIONS | - GLADE_VERIFY_DEPRECATIONS | - GLADE_VERIFY_UNRECOGNIZED, - TRUE, mask); + GLADE_VERIFY_VERSIONS | + GLADE_VERIFY_DEPRECATIONS | + GLADE_VERIFY_UNRECOGNIZED, + TRUE, mask); /* there was a '\0' byte... */ if (string->len > 0) @@ -4172,12 +4172,12 @@ glade_project_set_template (GladeProject *project, GladeWidget *widget) if (project->priv->template != widget) { if (project->priv->template) - glade_widget_set_is_composite (project->priv->template, FALSE); + glade_widget_set_is_composite (project->priv->template, FALSE); project->priv->template = widget; if (project->priv->template) - glade_widget_set_is_composite (project->priv->template, TRUE); + glade_widget_set_is_composite (project->priv->template, TRUE); glade_project_verify_project_for_ui (project); @@ -5181,7 +5181,7 @@ glade_project_copy_selection (GladeProject *project) if (widget_contains_unknown_type (widget)) has_unknown = TRUE; else - widgets = g_list_prepend (widgets, glade_widget_dup (widget, FALSE)); + widgets = g_list_prepend (widgets, glade_widget_dup (widget, FALSE)); } if (has_unknown) @@ -5211,7 +5211,7 @@ glade_project_command_cut (GladeProject *project) if (widget_contains_unknown_type (widget)) has_unknown = TRUE; else - widgets = g_list_prepend (widgets, widget); + widgets = g_list_prepend (widgets, widget); } if (failed == FALSE && widgets != NULL) diff --git a/gladeui/glade-project.h b/gladeui/glade-project.h index 5e6e6923..9ec350a4 100644 --- a/gladeui/glade-project.h +++ b/gladeui/glade-project.h @@ -138,7 +138,7 @@ gboolean glade_project_save (GladeProject *proj GError **error); gboolean glade_project_save_verify (GladeProject *project, const gchar *path, - GladeVerifyFlags flags, + GladeVerifyFlags flags, GError **error); gboolean glade_project_autosave (GladeProject *project, GError **error); @@ -166,7 +166,7 @@ void glade_project_check_reordered (GladeProject *proj GList *old_order); void glade_project_set_template (GladeProject *project, - GladeWidget *widget); + GladeWidget *widget); GladeWidget *glade_project_get_template (GladeProject *project); void glade_project_set_license (GladeProject *project, @@ -200,7 +200,7 @@ GladeWidget *glade_project_get_widget_by_name (GladeProject *proj const gchar *name); void glade_project_set_widget_name (GladeProject *project, GladeWidget *widget, - const gchar *name); + const gchar *name); gchar *glade_project_new_widget_name (GladeProject *project, GladeWidget *widget, const gchar *base_name); @@ -242,9 +242,9 @@ void glade_project_set_add_item (GladeProject *proj GladeWidgetAdaptor *adaptor); GladeWidgetAdaptor *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); void glade_project_get_target_version (GladeProject *project, const gchar *catalog, gint *major, @@ -265,8 +265,8 @@ const gchar *glade_project_get_css_provider_path (GladeProject *project) /* Verifications */ gboolean glade_project_verify (GladeProject *project, - gboolean saving, - GladeVerifyFlags flags); + gboolean saving, + GladeVerifyFlags flags); gchar *glade_project_verify_widget_adaptor(GladeProject *project, GladeWidgetAdaptor *adaptor, GladeSupportMask *mask); diff --git a/gladeui/glade-property-class.c b/gladeui/glade-property-class.c index aed3960f..2de6b980 100644 --- a/gladeui/glade-property-class.c +++ b/gladeui/glade-property-class.c @@ -59,133 +59,133 @@ struct _GladePropertyClass { GladeWidgetAdaptor *adaptor; /* The GladeWidgetAdaptor that this property class - * was created for. - */ + * was created for. + */ guint16 version_since_major; /* Version in which this property was */ guint16 version_since_minor; /* introduced. */ GParamSpec *pspec; /* The Parameter Specification for this property. - */ + */ gchar *id; /* The id of the property. Like "label" or "xpad" - * this is a non-translatable string - */ + * this is a non-translatable string + */ gchar *name; /* The name of the property. Like "Label" or "X Pad" - * this is a translatable string - */ + * this is a translatable string + */ gchar *tooltip; /* The default tooltip for the property editor rows. - */ + */ GValue *def; /* The default value for this property (this will exist - * as a copy of orig_def if not specified by the catalog) - */ + * as a copy of orig_def if not specified by the catalog) + */ GValue *orig_def; /* The real default value obtained through introspection. - * (used to decide whether we should write to the - * glade file or not, or to restore the loaded property - * correctly); all property classes have and orig_def. - */ + * (used to decide whether we should write to the + * glade file or not, or to restore the loaded property + * correctly); all property classes have and orig_def. + */ guint multiline : 1; /* Whether to use multiple lines to edit this text property. - */ + */ guint virt : 1; /* Whether this is a virtual property with its pspec supplied - * via the catalog (or hard code-paths); or FALSE if its a real - * GObject introspected property - */ + * via the catalog (or hard code-paths); or FALSE if its a real + * GObject introspected property + */ guint optional : 1; /* Some properties are optional by nature like - * default width. It can be set or not set. A - * default property has a check box in the - * left that enables/disables the input - */ + * default width. It can be set or not set. A + * default property has a check box in the + * left that enables/disables the input + */ guint optional_default : 1; /* For optional values, what the default is */ guint construct_only : 1; /* Whether this property is G_PARAM_CONSTRUCT_ONLY or not */ - + guint common : 1; /* Common properties go in the common tab */ guint atk : 1; /* Atk properties go in the atk tab */ guint packing : 1; /* Packing properties go in the packing tab */ guint query : 1; /* Whether we should explicitly ask the user about this property - * when instantiating a widget with this property (through a popup - * dialog). - */ - + * when instantiating a widget with this property (through a popup + * dialog). + */ + guint translatable : 1; /* The property should be translatable, which - * means that it needs extra parameters in the - * UI. - */ + * means that it needs extra parameters in the + * UI. + */ /* These three are the master switches for the glade-file output, * property editor availability & live object updates in the glade environment. */ guint save : 1; /* Whether we should save to the glade file or not - * (mostly just for virtual internal glade properties, - * also used for properties with generic pspecs that - * are saved in custom ways by the plugin) - */ + * (mostly just for virtual internal glade properties, + * also used for properties with generic pspecs that + * are saved in custom ways by the plugin) + */ guint save_always : 1; /* Used to make a special case exception and always - * save this property regardless of what the default - * value is (used for some special cases like properties - * that are assigned initial values in composite widgets - * or derived widget code). - */ + * save this property regardless of what the default + * value is (used for some special cases like properties + * that are assigned initial values in composite widgets + * or derived widget code). + */ guint visible : 1; /* Whether or not to show this property in the editor & - * reset dialog. - */ + * reset dialog. + */ guint custom_layout : 1; /* Properties marked as custom_layout will not be included - * in a base #GladeEditorTable implementation (use this - * for properties you want to layout in custom ways in - * a #GladeEditable widget - */ - + * in a base #GladeEditorTable implementation (use this + * for properties you want to layout in custom ways in + * a #GladeEditable widget + */ + guint ignore : 1; /* When true, we will not sync the object when the property - * changes, or load values from the object. - */ + * changes, or load values from the object. + */ guint needs_sync : 1; /* Virtual properties need to be synchronized after object - * creation, some properties that are not virtual also need - * handling from the backend, if "needs-sync" is true then - * this property will by synced with virtual properties. - */ + * creation, some properties that are not virtual also need + * handling from the backend, if "needs-sync" is true then + * this property will by synced with virtual properties. + */ guint is_modified : 1; /* If true, this property_class has been "modified" from the - * the standard property by a xml file. */ + * the standard property by a xml file. */ guint themed_icon : 1; /* Some GParamSpecString properties reffer to icon names - * in the icon theme... these need to be specified in the - * property class definition if proper editing tools are to - * be used. - */ + * in the icon theme... these need to be specified in the + * property class definition if proper editing tools are to + * be used. + */ guint stock_icon : 1; /* String properties can also denote stock icons, including - * icons from icon factories... - */ + * icons from icon factories... + */ guint stock : 1; /* ... or a narrower list of "items" from gtk builtin stock items. - */ - + */ + guint transfer_on_paste : 1; /* If this is a packing prop, - * wether we should transfer it on paste. - */ - + * wether we should transfer it on paste. + */ + guint parentless_widget : 1; /* True if this property should point to a parentless widget - * in the project - */ + * in the project + */ guint deprecated : 1; /* True if this property is deprecated */ - gdouble weight; /* This will determine the position of this property in - * the editor. - */ - + gdouble weight; /* This will determine the position of this property in + * the editor. + */ + gchar *create_type; /* If this is an object property and you want the option to create - * one from the object selection dialog, then set the name of the - * concrete type here. - */ + * one from the object selection dialog, then set the name of the + * concrete type here. + */ }; /** @@ -197,7 +197,7 @@ struct _GladePropertyClass */ GladePropertyClass * glade_property_class_new (GladeWidgetAdaptor *adaptor, - const gchar *id) + const gchar *id) { GladePropertyClass *property_class; @@ -248,7 +248,7 @@ glade_property_class_new (GladeWidgetAdaptor *adaptor, */ GladePropertyClass * glade_property_class_clone (GladePropertyClass *property_class, - gboolean reset_version) + gboolean reset_version) { GladePropertyClass *clone; @@ -536,7 +536,7 @@ glade_property_class_make_string_from_gvalue (GladePropertyClass * { rgba = g_value_get_boxed (value); if (rgba) - string = gdk_rgba_to_string (rgba); + string = gdk_rgba_to_string (rgba); } else if (property_class->pspec->value_type == G_TYPE_STRV) { @@ -795,9 +795,9 @@ glade_property_class_make_objects_from_string (GladePropertyClass * for (i = 0; split[i]; i++) { if ((object = - glade_property_class_make_object_from_string (property_class, - split[i], - project)) != NULL) + glade_property_class_make_object_from_string (property_class, + split[i], + project)) != NULL) objects = g_list_prepend (objects, object); } g_strfreev (split); @@ -856,9 +856,9 @@ glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class { g_value_set_static_string (&str_value, strv[i]); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; value_array = g_value_array_append (value_array, &str_value); - G_GNUC_END_IGNORE_DEPRECATIONS; + G_GNUC_END_IGNORE_DEPRECATIONS; } g_value_take_boxed (value, value_array); g_strfreev (strv); @@ -923,13 +923,13 @@ glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class else if (G_IS_PARAM_SPEC_OBJECT (property_class->pspec)) { GObject *object = - glade_property_class_make_object_from_string (property_class, string, project); + glade_property_class_make_object_from_string (property_class, string, project); g_value_set_object (value, object); } else if (GLADE_IS_PARAM_SPEC_OBJECTS (property_class->pspec)) { GList *objects = - glade_property_class_make_objects_from_string (property_class, string, project); + glade_property_class_make_objects_from_string (property_class, string, project); g_value_take_boxed (value, objects); } else @@ -1093,8 +1093,9 @@ glade_property_class_set_vl_from_gvalue (GladePropertyClass * klass, * Assignes the provided return location to @value */ void -glade_property_class_get_from_gvalue (GladePropertyClass * klass, - GValue * value, ...) +glade_property_class_get_from_gvalue (GladePropertyClass *klass, + GValue *value, + ...) { va_list vl; @@ -1184,7 +1185,7 @@ failed: * or %NULL if its unsupported. */ GladePropertyClass * -glade_property_class_new_from_spec (GladeWidgetAdaptor *adaptor, GParamSpec * spec) +glade_property_class_new_from_spec (GladeWidgetAdaptor *adaptor, GParamSpec *spec) { return glade_property_class_new_from_spec_full (adaptor, spec, TRUE); } @@ -1197,7 +1198,7 @@ glade_property_class_new_from_spec (GladeWidgetAdaptor *adaptor, GParamSpec * sp * Returns: whether or not to show this property in the editor */ gboolean -glade_property_class_is_visible (GladePropertyClass * klass) +glade_property_class_is_visible (GladePropertyClass *klass) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE); @@ -1205,8 +1206,8 @@ glade_property_class_is_visible (GladePropertyClass * klass) } void -glade_property_class_set_adaptor (GladePropertyClass *property_class, - GladeWidgetAdaptor *adaptor) +glade_property_class_set_adaptor (GladePropertyClass *property_class, + GladeWidgetAdaptor *adaptor) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1214,7 +1215,7 @@ glade_property_class_set_adaptor (GladePropertyClass *property_class, } GladeWidgetAdaptor * -glade_property_class_get_adaptor (GladePropertyClass *property_class) +glade_property_class_get_adaptor (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1222,7 +1223,7 @@ glade_property_class_get_adaptor (GladePropertyClass *property_class) } GParamSpec * -glade_property_class_get_pspec (GladePropertyClass *property_class) +glade_property_class_get_pspec (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1230,8 +1231,8 @@ glade_property_class_get_pspec (GladePropertyClass *property_class) } void -glade_property_class_set_pspec (GladePropertyClass *property_class, - GParamSpec *pspec) +glade_property_class_set_pspec (GladePropertyClass *property_class, + GParamSpec *pspec) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1239,8 +1240,8 @@ glade_property_class_set_pspec (GladePropertyClass *property_class, } void -glade_property_class_set_is_packing (GladePropertyClass *property_class, - gboolean is_packing) +glade_property_class_set_is_packing (GladePropertyClass *property_class, + gboolean is_packing) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1248,7 +1249,7 @@ glade_property_class_set_is_packing (GladePropertyClass *property_class, } gboolean -glade_property_class_get_is_packing (GladePropertyClass *property_class) +glade_property_class_get_is_packing (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1256,7 +1257,7 @@ glade_property_class_get_is_packing (GladePropertyClass *property_class) } gboolean -glade_property_class_save (GladePropertyClass *property_class) +glade_property_class_save (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1264,7 +1265,7 @@ glade_property_class_save (GladePropertyClass *property_class) } gboolean -glade_property_class_save_always (GladePropertyClass *property_class) +glade_property_class_save_always (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1272,8 +1273,8 @@ glade_property_class_save_always (GladePropertyClass *property_class) } void -glade_property_class_set_virtual (GladePropertyClass *property_class, - gboolean value) +glade_property_class_set_virtual (GladePropertyClass *property_class, + gboolean value) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1281,7 +1282,7 @@ glade_property_class_set_virtual (GladePropertyClass *property_class, } gboolean -glade_property_class_get_virtual (GladePropertyClass *property_class) +glade_property_class_get_virtual (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1289,8 +1290,8 @@ glade_property_class_get_virtual (GladePropertyClass *property_class) } void -glade_property_class_set_ignore (GladePropertyClass *property_class, - gboolean ignore) +glade_property_class_set_ignore (GladePropertyClass *property_class, + gboolean ignore) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1298,7 +1299,7 @@ glade_property_class_set_ignore (GladePropertyClass *property_class, } gboolean -glade_property_class_get_ignore (GladePropertyClass *property_class) +glade_property_class_get_ignore (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1313,7 +1314,7 @@ glade_property_class_get_ignore (GladePropertyClass *property_class) * that refers to another object in this project. */ gboolean -glade_property_class_is_object (GladePropertyClass * klass) +glade_property_class_is_object (GladePropertyClass *klass) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE); @@ -1325,7 +1326,7 @@ glade_property_class_is_object (GladePropertyClass * klass) void glade_property_class_set_name (GladePropertyClass *property_class, - const gchar *name) + const gchar *name) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1334,7 +1335,7 @@ glade_property_class_set_name (GladePropertyClass *property_class, } G_CONST_RETURN gchar * -glade_property_class_get_name (GladePropertyClass *property_class) +glade_property_class_get_name (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1342,8 +1343,8 @@ glade_property_class_get_name (GladePropertyClass *property_class) } void -glade_property_class_set_tooltip (GladePropertyClass *property_class, - const gchar *tooltip) +glade_property_class_set_tooltip (GladePropertyClass *property_class, + const gchar *tooltip) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1352,7 +1353,7 @@ glade_property_class_set_tooltip (GladePropertyClass *property_class, } G_CONST_RETURN gchar * -glade_property_class_get_tooltip (GladePropertyClass *property_class) +glade_property_class_get_tooltip (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1360,8 +1361,8 @@ glade_property_class_get_tooltip (GladePropertyClass *property_class) } void -glade_property_class_set_construct_only (GladePropertyClass *property_class, - gboolean construct_only) +glade_property_class_set_construct_only (GladePropertyClass *property_class, + gboolean construct_only) { g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class)); @@ -1369,7 +1370,7 @@ glade_property_class_set_construct_only (GladePropertyClass *property_class, } gboolean -glade_property_class_get_construct_only (GladePropertyClass *property_class) +glade_property_class_get_construct_only (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1377,7 +1378,7 @@ glade_property_class_get_construct_only (GladePropertyClass *property_class) } G_CONST_RETURN GValue * -glade_property_class_get_default (GladePropertyClass *property_class) +glade_property_class_get_default (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1385,7 +1386,7 @@ glade_property_class_get_default (GladePropertyClass *property_class) } G_CONST_RETURN GValue * -glade_property_class_get_original_default (GladePropertyClass *property_class) +glade_property_class_get_original_default (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1393,7 +1394,7 @@ glade_property_class_get_original_default (GladePropertyClass *property_class) } gboolean -glade_property_class_translatable (GladePropertyClass *property_class) +glade_property_class_translatable (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1401,7 +1402,7 @@ glade_property_class_translatable (GladePropertyClass *property_class) } gboolean -glade_property_class_needs_sync (GladePropertyClass *property_class) +glade_property_class_needs_sync (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1409,7 +1410,7 @@ glade_property_class_needs_sync (GladePropertyClass *property_class) } gboolean -glade_property_class_query (GladePropertyClass *property_class) +glade_property_class_query (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1417,7 +1418,7 @@ glade_property_class_query (GladePropertyClass *property_class) } gboolean -glade_property_class_atk (GladePropertyClass *property_class) +glade_property_class_atk (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1425,7 +1426,7 @@ glade_property_class_atk (GladePropertyClass *property_class) } gboolean -glade_property_class_common (GladePropertyClass *property_class) +glade_property_class_common (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1433,7 +1434,7 @@ glade_property_class_common (GladePropertyClass *property_class) } gboolean -glade_property_class_parentless_widget (GladePropertyClass *property_class) +glade_property_class_parentless_widget (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1441,7 +1442,7 @@ glade_property_class_parentless_widget (GladePropertyClass *property_class) } gboolean -glade_property_class_optional (GladePropertyClass *property_class) +glade_property_class_optional (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1449,7 +1450,7 @@ glade_property_class_optional (GladePropertyClass *property_class) } gboolean -glade_property_class_optional_default (GladePropertyClass *property_class) +glade_property_class_optional_default (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1457,7 +1458,7 @@ glade_property_class_optional_default (GladePropertyClass *property_class) } gboolean -glade_property_class_multiline (GladePropertyClass *property_class) +glade_property_class_multiline (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1465,7 +1466,7 @@ glade_property_class_multiline (GladePropertyClass *property_class) } gboolean -glade_property_class_stock (GladePropertyClass *property_class) +glade_property_class_stock (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1473,7 +1474,7 @@ glade_property_class_stock (GladePropertyClass *property_class) } gboolean -glade_property_class_stock_icon (GladePropertyClass *property_class) +glade_property_class_stock_icon (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1481,7 +1482,7 @@ glade_property_class_stock_icon (GladePropertyClass *property_class) } gboolean -glade_property_class_transfer_on_paste (GladePropertyClass *property_class) +glade_property_class_transfer_on_paste (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1489,7 +1490,7 @@ glade_property_class_transfer_on_paste (GladePropertyClass *property_class) } gboolean -glade_property_class_custom_layout (GladePropertyClass *property_class) +glade_property_class_custom_layout (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1497,7 +1498,7 @@ glade_property_class_custom_layout (GladePropertyClass *property_class) } gdouble -glade_property_class_weight (GladePropertyClass *property_class) +glade_property_class_weight (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), -1.0); @@ -1505,7 +1506,7 @@ glade_property_class_weight (GladePropertyClass *property_class) } G_CONST_RETURN gchar * -glade_property_class_create_type (GladePropertyClass *property_class) +glade_property_class_create_type (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1513,7 +1514,7 @@ glade_property_class_create_type (GladePropertyClass *property_class) } guint16 -glade_property_class_since_major (GladePropertyClass *property_class) +glade_property_class_since_major (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), 0); @@ -1521,7 +1522,7 @@ glade_property_class_since_major (GladePropertyClass *property_class) } guint16 -glade_property_class_since_minor (GladePropertyClass *property_class) +glade_property_class_since_minor (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), 0); @@ -1529,7 +1530,7 @@ glade_property_class_since_minor (GladePropertyClass *property_class) } gboolean -glade_property_class_deprecated (GladePropertyClass *property_class) +glade_property_class_deprecated (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1537,7 +1538,7 @@ glade_property_class_deprecated (GladePropertyClass *property_class) } G_CONST_RETURN gchar * -glade_property_class_id (GladePropertyClass *property_class) +glade_property_class_id (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), NULL); @@ -1545,7 +1546,7 @@ glade_property_class_id (GladePropertyClass *property_class) } gboolean -glade_property_class_themed_icon (GladePropertyClass *property_class) +glade_property_class_themed_icon (GladePropertyClass *property_class) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (property_class), FALSE); @@ -1561,9 +1562,9 @@ glade_property_class_themed_icon (GladePropertyClass *property_class) * Reads and caches displayable values from the catalog */ static void -gpc_read_displayable_values_from_node (GladeXmlNode * node, - GladePropertyClass * klass, - const gchar * domain) +gpc_read_displayable_values_from_node (GladeXmlNode *node, + GladePropertyClass *klass, + const gchar *domain) { gpointer the_class = g_type_class_ref (klass->pspec->value_type); GladeXmlNode *child; @@ -1668,7 +1669,7 @@ gpc_read_displayable_values_from_node (GladeXmlNode * node, * Returns: An appropriate #GtkAdjustment for use in the Property editor */ GtkAdjustment * -glade_property_class_make_adjustment (GladePropertyClass * property_class) +glade_property_class_make_adjustment (GladePropertyClass *property_class) { GtkAdjustment *adjustment; gdouble min = 0, max = 0, def = 0; @@ -1752,8 +1753,8 @@ glade_property_class_make_adjustment (GladePropertyClass * property_class) static GParamSpec * -glade_property_class_parse_specifications (GladePropertyClass * klass, - GladeXmlNode * spec_node) +glade_property_class_parse_specifications (GladePropertyClass *klass, + GladeXmlNode *spec_node) { gchar *string; GType spec_type = 0, value_type = 0; @@ -1939,10 +1940,10 @@ glade_property_class_parse_specifications (GladePropertyClass * klass, * has Disabled="TRUE". */ gboolean -glade_property_class_update_from_node (GladeXmlNode * node, - GType object_type, - GladePropertyClass ** property_class, - const gchar * domain) +glade_property_class_update_from_node (GladeXmlNode *node, + GType object_type, + GladePropertyClass **property_class, + const gchar *domain) { GladePropertyClass *klass; GParamSpec *pspec = NULL; @@ -2055,7 +2056,7 @@ glade_property_class_update_from_node (GladeXmlNode * node, g_value_unset (klass->orig_def); g_free (klass->orig_def); klass->orig_def = - glade_property_class_make_gvalue_from_string (klass, buf, NULL); + glade_property_class_make_gvalue_from_string (klass, buf, NULL); } g_free (buf); @@ -2147,13 +2148,13 @@ glade_property_class_update_from_node (GladeXmlNode * node, glade_xml_get_property_version (node, GLADE_TAG_VERSION_SINCE, - &klass->version_since_major, - &klass->version_since_minor); + &klass->version_since_major, + &klass->version_since_minor); klass->deprecated = glade_xml_get_property_boolean (node, - GLADE_TAG_DEPRECATED, - klass->deprecated); + GLADE_TAG_DEPRECATED, + klass->deprecated); if ((buf = glade_xml_get_property_string @@ -2199,8 +2200,8 @@ glade_property_class_update_from_node (GladeXmlNode * node, * have the same name are not matches). */ gboolean -glade_property_class_match (GladePropertyClass * klass, - GladePropertyClass * comp) +glade_property_class_match (GladePropertyClass *klass, + GladePropertyClass *comp) { g_return_val_if_fail (klass != NULL, FALSE); g_return_val_if_fail (comp != NULL, FALSE); @@ -2219,7 +2220,7 @@ glade_property_class_match (GladePropertyClass * klass, * can be a %NULL value for boxed or object type param specs. */ gboolean -glade_property_class_void_value (GladePropertyClass * klass, GValue * value) +glade_property_class_void_value (GladePropertyClass *klass, GValue *value) { g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE); @@ -2245,8 +2246,9 @@ glade_property_class_void_value (GladePropertyClass * klass, GValue * value) * equal to or greater than value2, respectively. */ gint -glade_property_class_compare (GladePropertyClass * klass, - const GValue * value1, const GValue * value2) +glade_property_class_compare (GladePropertyClass *klass, + const GValue *value1, + const GValue *value2) { gint retval; @@ -2304,7 +2306,7 @@ glade_property_class_compare (GladePropertyClass * klass, This function will not override weight if it is already set (weight >= 0.0) */ void -glade_property_class_set_weights (GList ** properties, GType parent) +glade_property_class_set_weights (GList **properties, GType parent) { gint normal = 0, common = 0, packing = 0; GList *l; @@ -2348,3 +2350,4 @@ glade_property_class_load_defaults_from_spec (GladePropertyClass *property_class property_class->def = glade_property_class_get_default_from_spec (property_class->pspec); } + diff --git a/gladeui/glade-property-class.h b/gladeui/glade-property-class.h index a14a8622..b87edcf7 100644 --- a/gladeui/glade-property-class.h +++ b/gladeui/glade-property-class.h @@ -24,14 +24,14 @@ G_BEGIN_DECLS * * Checks if @gpc is good to be loaded as @type */ -#define GLADE_PROPERTY_CLASS_IS_TYPE(gpc, type) \ - (((type) == GLADE_PAGE_GENERAL && \ - !glade_property_class_common (gpc) && \ - !glade_property_class_get_is_packing (gpc) && \ - !glade_property_class_atk (gpc)) || \ - ((type) == GLADE_PAGE_COMMON && glade_property_class_common (gpc)) || \ +#define GLADE_PROPERTY_CLASS_IS_TYPE(gpc, type) \ + (((type) == GLADE_PAGE_GENERAL && \ + !glade_property_class_common (gpc) && \ + !glade_property_class_get_is_packing (gpc) && \ + !glade_property_class_atk (gpc)) || \ + ((type) == GLADE_PAGE_COMMON && glade_property_class_common (gpc)) || \ ((type) == GLADE_PAGE_PACKING && glade_property_class_get_is_packing (gpc)) || \ - ((type) == GLADE_PAGE_ATK && glade_property_class_atk (gpc)) || \ + ((type) == GLADE_PAGE_ATK && glade_property_class_atk (gpc)) || \ ((type) == GLADE_PAGE_QUERY && glade_property_class_query (gpc))) /** @@ -43,7 +43,7 @@ G_BEGIN_DECLS * Evaluates to %TRUE if @klass is available in its owning library version-@major_verion.@minor_version. * */ -#define GPC_VERSION_CHECK(klass, major_version, minor_version) \ +#define GPC_VERSION_CHECK(klass, major_version, minor_version) \ ((glade_property_class_since_major (GLADE_PROPERTY_CLASS (klass)) == major_version) ? \ (glade_property_class_since_minor (GLADE_PROPERTY_CLASS (klass)) <= minor_version) : \ (glade_property_class_since_major (GLADE_PROPERTY_CLASS (klass)) <= major_version)) @@ -56,45 +56,45 @@ typedef struct _GladePropertyClass GladePropertyClass; GladePropertyClass *glade_property_class_new (GladeWidgetAdaptor *adaptor, - const gchar *id); + const gchar *id); GladePropertyClass *glade_property_class_new_from_spec (GladeWidgetAdaptor *adaptor, - GParamSpec *spec); + GParamSpec *spec); GladePropertyClass *glade_property_class_new_from_spec_full (GladeWidgetAdaptor *adaptor, - GParamSpec *spec, - gboolean need_handle); + GParamSpec *spec, + gboolean need_handle); GladePropertyClass *glade_property_class_clone (GladePropertyClass *property_class, - gboolean reset_version); + gboolean reset_version); void glade_property_class_free (GladePropertyClass *property_class); void glade_property_class_set_adaptor (GladePropertyClass *property_class, - GladeWidgetAdaptor *adaptor); + GladeWidgetAdaptor *adaptor); GladeWidgetAdaptor *glade_property_class_get_adaptor (GladePropertyClass *property_class); void glade_property_class_set_pspec (GladePropertyClass *property_class, - GParamSpec *pspec); + GParamSpec *pspec); GParamSpec *glade_property_class_get_pspec (GladePropertyClass *property_class); void glade_property_class_set_is_packing (GladePropertyClass *property_class, - gboolean is_packing); + gboolean is_packing); gboolean glade_property_class_get_is_packing (GladePropertyClass *property_class); gboolean glade_property_class_save (GladePropertyClass *property_class); gboolean glade_property_class_save_always (GladePropertyClass *property_class); gboolean glade_property_class_is_visible (GladePropertyClass *property_class); gboolean glade_property_class_is_object (GladePropertyClass *property_class); void glade_property_class_set_virtual (GladePropertyClass *property_class, - gboolean value); + gboolean value); gboolean glade_property_class_get_virtual (GladePropertyClass *property_class); void glade_property_class_set_ignore (GladePropertyClass *property_class, - gboolean ignore); + gboolean ignore); gboolean glade_property_class_get_ignore (GladePropertyClass *property_class); void glade_property_class_set_name (GladePropertyClass *property_class, - const gchar *name); + const gchar *name); G_CONST_RETURN gchar *glade_property_class_get_name (GladePropertyClass *property_class); void glade_property_class_set_tooltip (GladePropertyClass *property_class, - const gchar *tooltip); + const gchar *tooltip); G_CONST_RETURN gchar *glade_property_class_get_tooltip (GladePropertyClass *property_class); G_CONST_RETURN gchar *glade_property_class_id (GladePropertyClass *property_class); gboolean glade_property_class_themed_icon (GladePropertyClass *property_class); void glade_property_class_set_construct_only (GladePropertyClass *property_class, - gboolean construct_only); + gboolean construct_only); gboolean glade_property_class_get_construct_only (GladePropertyClass *property_class); G_CONST_RETURN GValue *glade_property_class_get_default (GladePropertyClass *property_class); G_CONST_RETURN GValue *glade_property_class_get_original_default (GladePropertyClass *property_class); @@ -121,42 +121,42 @@ guint16 glade_property_class_since_minor (GladePropert gboolean glade_property_class_deprecated (GladePropertyClass *property_class); GValue *glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class, - const gchar *string, - GladeProject *project); + const gchar *string, + GladeProject *project); gchar *glade_property_class_make_string_from_gvalue (GladePropertyClass *property_class, - const GValue *value); + const GValue *value); GValue *glade_property_class_make_gvalue_from_vl (GladePropertyClass *property_class, - va_list vl); + va_list vl); void glade_property_class_set_vl_from_gvalue (GladePropertyClass *klass, - GValue *value, - va_list vl); + GValue *value, + va_list vl); GValue *glade_property_class_make_gvalue (GladePropertyClass *klass, - ...); + ...); void glade_property_class_get_from_gvalue (GladePropertyClass *klass, - GValue *value, - ...); + GValue *value, + ...); gboolean glade_property_class_update_from_node (GladeXmlNode *node, - GType object_type, - GladePropertyClass **property_class, - const gchar *domain); + GType object_type, + GladePropertyClass **property_class, + const gchar *domain); GtkAdjustment *glade_property_class_make_adjustment (GladePropertyClass *property_class); gboolean glade_property_class_match (GladePropertyClass *klass, - GladePropertyClass *comp); + GladePropertyClass *comp); gboolean glade_property_class_void_value (GladePropertyClass *klass, - GValue *value); + GValue *value); gint glade_property_class_compare (GladePropertyClass *klass, - const GValue *value1, - const GValue *value2); + const GValue *value1, + const GValue *value2); GValue *glade_property_class_get_default_from_spec (GParamSpec *spec); diff --git a/gladeui/glade-property-label.c b/gladeui/glade-property-label.c index 21fa9d14..cb4d24f4 100644 --- a/gladeui/glade-property-label.c +++ b/gladeui/glade-property-label.c @@ -35,17 +35,17 @@ static void glade_property_label_finalize (GObject *object); static void glade_property_label_dispose (GObject *object); static void glade_property_label_set_real_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); + guint prop_id, + const GValue *value, + GParamSpec *pspec); static void glade_property_label_get_real_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); + guint prop_id, + GValue *value, + GParamSpec *pspec); /* GtkWidgetClass */ static gint glade_property_label_button_press (GtkWidget *widget, - GdkEventButton *event); + GdkEventButton *event); /* GladeEditableIface */ static void glade_property_label_editable_init (GladeEditableIface *iface); @@ -85,7 +85,7 @@ static GladeEditableIface *parent_editable_iface; G_DEFINE_TYPE_WITH_CODE (GladePropertyLabel, glade_property_label, GTK_TYPE_EVENT_BOX, G_ADD_PRIVATE (GladePropertyLabel) - G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, + G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_property_label_editable_init)); static void @@ -117,8 +117,8 @@ glade_property_label_class_init (GladePropertyLabelClass *class) g_object_class_install_property (gobject_class, PROP_PROPERTY, g_param_spec_object ("property", _("Property"), - _("The GladeProperty to display a label for"), - GLADE_TYPE_PROPERTY, G_PARAM_READWRITE)); + _("The GladeProperty to display a label for"), + GLADE_TYPE_PROPERTY, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_PROPERTY_NAME, @@ -127,14 +127,14 @@ glade_property_label_class_init (GladePropertyLabelClass *class) * the GladeProperty object from the GladeWidget the * property belongs to. */ - _("The property name to use when loading by widget"), - NULL, G_PARAM_READWRITE)); + _("The property name to use when loading by widget"), + NULL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_APPEND_COLON, g_param_spec_boolean ("append-colon", _("Append Colon"), - _("Whether to append a colon ':' to the property name"), - TRUE, G_PARAM_READWRITE)); + _("Whether to append a colon ':' to the property name"), + TRUE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_PACKING, @@ -144,20 +144,20 @@ glade_property_label_class_init (GladePropertyLabelClass *class) * to the container or child widget but to the relation. * For more information see GtkContainer docs. */ - _("Whether the property to load is a packing property or not"), - FALSE, G_PARAM_READWRITE)); + _("Whether the property to load is a packing property or not"), + FALSE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_CUSTOM_TEXT, g_param_spec_string ("custom-text", _("Custom Text"), - _("Custom text to override the property name"), - NULL, G_PARAM_READWRITE)); + _("Custom text to override the property name"), + NULL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_CUSTOM_TOOLTIP, g_param_spec_string ("custom-tooltip", _("Custom Tooltip"), - _("Custom tooltip to override the property description"), - NULL, G_PARAM_READWRITE)); + _("Custom tooltip to override the property description"), + NULL, G_PARAM_READWRITE)); /* Bind to template */ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/gladeui/glade-property-label.ui"); @@ -191,10 +191,10 @@ glade_property_label_dispose (GObject *object) } static void -glade_property_label_set_real_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +glade_property_label_set_real_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { GladePropertyLabel *label = GLADE_PROPERTY_LABEL (object); @@ -225,10 +225,10 @@ glade_property_label_set_real_property (GObject *object, } static void -glade_property_label_get_real_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) +glade_property_label_get_real_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { GladePropertyLabel *label = GLADE_PROPERTY_LABEL (object); @@ -262,8 +262,8 @@ glade_property_label_get_real_property (GObject *object, * GladeEditableIface * *******************************************************************************/ static void -glade_property_label_load (GladeEditable *editable, - GladeWidget *widget) +glade_property_label_load (GladeEditable *editable, + GladeWidget *widget) { GladePropertyLabel *label = GLADE_PROPERTY_LABEL (editable); GladePropertyLabelPrivate *priv; @@ -279,9 +279,9 @@ glade_property_label_load (GladeEditable *editable, if (widget) { if (priv->packing) - property = glade_widget_get_pack_property (widget, priv->property_name); + property = glade_widget_get_pack_property (widget, priv->property_name); else - property = glade_widget_get_property (widget, priv->property_name); + property = glade_widget_get_property (widget, priv->property_name); glade_property_label_set_property (label, property); } @@ -307,8 +307,8 @@ glade_property_label_editable_init (GladeEditableIface *iface) * GtkWidgetClass * ***********************************************************/ static gint -glade_property_label_button_press (GtkWidget *widget, - GdkEventButton *event) +glade_property_label_button_press (GtkWidget *widget, + GdkEventButton *event) { GladePropertyLabel *label = GLADE_PROPERTY_LABEL (widget); GladePropertyLabelPrivate *priv = label->priv; @@ -327,10 +327,10 @@ glade_property_label_button_press (GtkWidget *widget, ***********************************************************/ static void glade_property_label_tooltip_cb (GladeProperty *property, - const gchar *tooltip, - const gchar *insensitive, - const gchar *support, - GladePropertyLabel *label) + const gchar *tooltip, + const gchar *insensitive, + const gchar *support, + GladePropertyLabel *label) { GladePropertyLabelPrivate *priv = label->priv; const gchar *choice_tooltip; @@ -348,8 +348,8 @@ glade_property_label_tooltip_cb (GladeProperty *property, static void glade_property_label_sensitivity_cb (GladeProperty *property, - GParamSpec *pspec, - GladePropertyLabel *label) + GParamSpec *pspec, + GladePropertyLabel *label) { GladePropertyLabelPrivate *priv = label->priv; gboolean sensitive; @@ -380,8 +380,8 @@ get_modified_attribute (void) static void glade_property_label_state_cb (GladeProperty *property, - GParamSpec *pspec, - GladePropertyLabel *label) + GParamSpec *pspec, + GladePropertyLabel *label) { GladePropertyLabelPrivate *priv = label->priv; @@ -403,7 +403,7 @@ glade_property_label_state_cb (GladeProperty *property, static void glade_property_label_property_finalized (GladePropertyLabel *label, - GladeProperty *where_property_was) + GladeProperty *where_property_was) { /* Silent disconnect */ label->priv->property = NULL; @@ -424,7 +424,7 @@ glade_property_label_new (void) void glade_property_label_set_property_name (GladePropertyLabel *label, - const gchar *property_name) + const gchar *property_name) { GladePropertyLabelPrivate *priv; @@ -451,7 +451,7 @@ glade_property_label_get_property_name (GladePropertyLabel *label) void glade_property_label_set_append_colon (GladePropertyLabel *label, - gboolean append_colon) + gboolean append_colon) { GladePropertyLabelPrivate *priv; @@ -477,7 +477,7 @@ glade_property_label_get_append_colon (GladePropertyLabel *label) void glade_property_label_set_packing (GladePropertyLabel *label, - gboolean packing) + gboolean packing) { GladePropertyLabelPrivate *priv; @@ -503,7 +503,7 @@ glade_property_label_get_packing (GladePropertyLabel *label) void glade_property_label_set_custom_text (GladePropertyLabel *label, - const gchar *custom_text) + const gchar *custom_text) { GladePropertyLabelPrivate *priv; gboolean changed = FALSE; @@ -515,7 +515,7 @@ glade_property_label_set_custom_text (GladePropertyLabel *label, if (custom_text) { if (!priv->custom_text) - changed = TRUE; + changed = TRUE; priv->custom_text = TRUE; @@ -524,12 +524,12 @@ glade_property_label_set_custom_text (GladePropertyLabel *label, else { if (priv->custom_text) - changed = TRUE; + changed = TRUE; priv->custom_text = FALSE; if (priv->property) - glade_property_label_state_cb (priv->property, NULL, label); + glade_property_label_state_cb (priv->property, NULL, label); } if (changed) @@ -553,7 +553,7 @@ glade_property_label_get_custom_text (GladePropertyLabel *label) void glade_property_label_set_custom_tooltip (GladePropertyLabel *label, - const gchar *custom_tooltip) + const gchar *custom_tooltip) { GladePropertyLabelPrivate *priv; gboolean changed = FALSE; @@ -565,7 +565,7 @@ glade_property_label_set_custom_tooltip (GladePropertyLabel *label, if (custom_tooltip) { if (!priv->custom_tooltip) - changed = TRUE; + changed = TRUE; priv->custom_tooltip = TRUE; @@ -574,19 +574,19 @@ glade_property_label_set_custom_tooltip (GladePropertyLabel *label, else { if (priv->custom_tooltip) - changed = TRUE; + changed = TRUE; priv->custom_tooltip = FALSE; if (priv->property) - { - GladePropertyClass *pclass = glade_property_get_class (priv->property); - - glade_property_label_tooltip_cb - (priv->property, glade_property_class_get_tooltip (pclass), - glade_propert_get_insensitive_tooltip (priv->property), - glade_property_get_support_warning (priv->property), label); - } + { + GladePropertyClass *pclass = glade_property_get_class (priv->property); + + glade_property_label_tooltip_cb + (priv->property, glade_property_class_get_tooltip (pclass), + glade_propert_get_insensitive_tooltip (priv->property), + glade_property_get_support_warning (priv->property), label); + } } if (changed) @@ -610,7 +610,7 @@ glade_property_label_get_custom_tooltip (GladePropertyLabel *label) void glade_property_label_set_property (GladePropertyLabel *label, - GladeProperty *property) + GladeProperty *property) { GladePropertyLabelPrivate *priv; @@ -624,85 +624,85 @@ glade_property_label_set_property (GladePropertyLabel *label, /* Disconnect last */ if (priv->property) - { - if (priv->tooltip_id > 0) - g_signal_handler_disconnect (priv->property, priv->tooltip_id); - if (priv->state_id > 0) - g_signal_handler_disconnect (priv->property, priv->state_id); - if (priv->sensitive_id > 0) - g_signal_handler_disconnect (priv->property, priv->sensitive_id); - if (priv->enabled_id > 0) - g_signal_handler_disconnect (priv->property, priv->enabled_id); - - priv->tooltip_id = 0; - priv->state_id = 0; - priv->sensitive_id = 0; - priv->enabled_id = 0; - - g_object_weak_unref (G_OBJECT (priv->property), - (GWeakNotify) glade_property_label_property_finalized, label); - } + { + if (priv->tooltip_id > 0) + g_signal_handler_disconnect (priv->property, priv->tooltip_id); + if (priv->state_id > 0) + g_signal_handler_disconnect (priv->property, priv->state_id); + if (priv->sensitive_id > 0) + g_signal_handler_disconnect (priv->property, priv->sensitive_id); + if (priv->enabled_id > 0) + g_signal_handler_disconnect (priv->property, priv->enabled_id); + + priv->tooltip_id = 0; + priv->state_id = 0; + priv->sensitive_id = 0; + priv->enabled_id = 0; + + g_object_weak_unref (G_OBJECT (priv->property), + (GWeakNotify) glade_property_label_property_finalized, label); + } priv->property = property; /* Connect new */ if (priv->property) - { - GladePropertyClass *pclass = glade_property_get_class (priv->property); - - priv->tooltip_id = - g_signal_connect (G_OBJECT (priv->property), - "tooltip-changed", - G_CALLBACK (glade_property_label_tooltip_cb), - label); - priv->sensitive_id = - g_signal_connect (G_OBJECT (priv->property), - "notify::sensitive", - G_CALLBACK (glade_property_label_sensitivity_cb), - label); - priv->state_id = - g_signal_connect (G_OBJECT (priv->property), - "notify::state", - G_CALLBACK (glade_property_label_state_cb), label); - priv->enabled_id = - g_signal_connect (G_OBJECT (priv->property), - "notify::enabled", - G_CALLBACK (glade_property_label_sensitivity_cb), - label); - - g_object_weak_ref (G_OBJECT (priv->property), - (GWeakNotify) glade_property_label_property_finalized, label); - - /* Load initial tooltips - */ - glade_property_label_tooltip_cb - (property, glade_property_class_get_tooltip (pclass), - glade_propert_get_insensitive_tooltip (property), - glade_property_get_support_warning (property), label); - - /* Load initial sensitive state. - */ - glade_property_label_sensitivity_cb (property, NULL, label); - - /* Load intial label state - */ - glade_property_label_state_cb (property, NULL, label); - - if (!priv->custom_text) - { - if (priv->append_colon) - { - gchar *text = g_strdup_printf ("%s:", glade_property_class_get_name (pclass)); - gtk_label_set_text (GTK_LABEL (priv->label), text); - g_free (text); - } - else - { - gtk_label_set_text (GTK_LABEL (priv->label), - glade_property_class_get_name (pclass)); - } - } - } + { + GladePropertyClass *pclass = glade_property_get_class (priv->property); + + priv->tooltip_id = + g_signal_connect (G_OBJECT (priv->property), + "tooltip-changed", + G_CALLBACK (glade_property_label_tooltip_cb), + label); + priv->sensitive_id = + g_signal_connect (G_OBJECT (priv->property), + "notify::sensitive", + G_CALLBACK (glade_property_label_sensitivity_cb), + label); + priv->state_id = + g_signal_connect (G_OBJECT (priv->property), + "notify::state", + G_CALLBACK (glade_property_label_state_cb), label); + priv->enabled_id = + g_signal_connect (G_OBJECT (priv->property), + "notify::enabled", + G_CALLBACK (glade_property_label_sensitivity_cb), + label); + + g_object_weak_ref (G_OBJECT (priv->property), + (GWeakNotify) glade_property_label_property_finalized, label); + + /* Load initial tooltips + */ + glade_property_label_tooltip_cb + (property, glade_property_class_get_tooltip (pclass), + glade_propert_get_insensitive_tooltip (property), + glade_property_get_support_warning (property), label); + + /* Load initial sensitive state. + */ + glade_property_label_sensitivity_cb (property, NULL, label); + + /* Load intial label state + */ + glade_property_label_state_cb (property, NULL, label); + + if (!priv->custom_text) + { + if (priv->append_colon) + { + gchar *text = g_strdup_printf ("%s:", glade_property_class_get_name (pclass)); + gtk_label_set_text (GTK_LABEL (priv->label), text); + g_free (text); + } + else + { + gtk_label_set_text (GTK_LABEL (priv->label), + glade_property_class_get_name (pclass)); + } + } + } g_object_notify (G_OBJECT (label), "property"); } diff --git a/gladeui/glade-property-label.h b/gladeui/glade-property-label.h index 09b786ce..745336e2 100644 --- a/gladeui/glade-property-label.h +++ b/gladeui/glade-property-label.h @@ -57,24 +57,24 @@ GType glade_property_label_get_type (void) G_GNUC_CONST; GtkWidget *glade_property_label_new (void); void glade_property_label_set_property_name (GladePropertyLabel *label, - const gchar *property_name); + const gchar *property_name); const gchar *glade_property_label_get_property_name (GladePropertyLabel *label); void glade_property_label_set_append_colon (GladePropertyLabel *label, - gboolean append_colon); + gboolean append_colon); gboolean glade_property_label_get_append_colon (GladePropertyLabel *label); void glade_property_label_set_packing (GladePropertyLabel *label, - gboolean packing); + gboolean packing); gboolean glade_property_label_get_packing (GladePropertyLabel *label); void glade_property_label_set_custom_text (GladePropertyLabel *label, - const gchar *custom_text); + const gchar *custom_text); const gchar *glade_property_label_get_custom_text (GladePropertyLabel *label); void glade_property_label_set_custom_tooltip(GladePropertyLabel *label, - const gchar *custom_tooltip); + const gchar *custom_tooltip); const gchar *glade_property_label_get_custom_tooltip(GladePropertyLabel *label); void glade_property_label_set_property (GladePropertyLabel *label, - GladeProperty *property); + GladeProperty *property); GladeProperty *glade_property_label_get_property (GladePropertyLabel *label); G_END_DECLS diff --git a/gladeui/glade-property-shell.c b/gladeui/glade-property-shell.c index 6b034cd1..66242527 100644 --- a/gladeui/glade-property-shell.c +++ b/gladeui/glade-property-shell.c @@ -35,13 +35,13 @@ /* 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); + 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); + guint prop_id, + GValue *value, + GParamSpec *pspec); /* GladeEditableIface */ static void glade_property_shell_editable_init (GladeEditableIface *iface); @@ -86,7 +86,7 @@ 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, + G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_property_shell_editable_init)); static void @@ -111,38 +111,38 @@ glade_property_shell_class_init (GladePropertyShellClass *klass) g_object_class_install_property (gobject_class, PROP_PROPERTY_NAME, g_param_spec_string ("property-name", _("Property Name"), - _("The property name to use when loading by widget"), - NULL, G_PARAM_READWRITE)); + _("The property name to use when loading by widget"), + NULL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_PACKING, g_param_spec_boolean ("packing", _("Packing"), - _("Whether the property to load is a packing property or not"), - FALSE, G_PARAM_READWRITE)); + _("Whether the property to load is a packing property or not"), + FALSE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_USE_COMMAND, g_param_spec_boolean ("use-command", _("Use Command"), - _("Whether to use the GladeCommand API when modifying properties"), - TRUE, G_PARAM_READWRITE)); + _("Whether to use the GladeCommand API when modifying properties"), + TRUE, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_EDITOR_TYPE, g_param_spec_string ("editor-type", _("Editor Property Type Name"), - _("Specify the actual editor property type name to use for this shell"), - NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + _("Specify the actual editor property type name to use for this shell"), + NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (gobject_class, PROP_CUSTOM_TEXT, g_param_spec_string ("custom-text", _("Custom Text"), - _("Custom Text to display in the property label"), - NULL, G_PARAM_READWRITE)); + _("Custom Text to display in the property label"), + NULL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_DISABLE_CHECK, g_param_spec_boolean ("disable-check", _("Disable Check"), - _("Whether to explicitly disable the check button"), - FALSE, G_PARAM_READWRITE)); + _("Whether to explicitly disable the check button"), + FALSE, G_PARAM_READWRITE)); /** * GladePropertyShell::pre-commit: @@ -194,9 +194,9 @@ glade_property_shell_finalize (GObject *object) static void glade_property_shell_set_real_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) + guint prop_id, + const GValue *value, + GParamSpec *pspec) { GladePropertyShell *shell = GLADE_PROPERTY_SHELL (object); GladePropertyShellPrivate *priv = shell->priv; @@ -218,12 +218,12 @@ glade_property_shell_set_real_property (GObject *object, type_name = g_value_get_string (value); if (type_name) - type = glade_util_get_type_from_name (type_name, FALSE); + type = glade_util_get_type_from_name (type_name, FALSE); if (type > 0 && !g_type_is_a (type, GLADE_TYPE_EDITOR_PROPERTY)) - g_warning ("Editor type '%s' is not a GladeEditorProperty", type_name); + g_warning ("Editor type '%s' is not a GladeEditorProperty", type_name); else - priv->editor_type = type; + priv->editor_type = type; break; case PROP_CUSTOM_TEXT: @@ -240,9 +240,9 @@ 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) + guint prop_id, + GValue *value, + GParamSpec *pspec) { GladePropertyShell *shell = GLADE_PROPERTY_SHELL (object); @@ -274,58 +274,58 @@ glade_property_shell_get_real_property (GObject *object, *******************************************************************************/ static void propagate_pre_commit (GladeEditorProperty *property, - GValue *value, - GladePropertyShell *shell) + GValue *value, + GladePropertyShell *shell) { g_signal_emit (G_OBJECT (shell), glade_property_shell_signals[PRE_COMMIT], 0, value); } static void propagate_post_commit (GladeEditorProperty *property, - GValue *value, - GladePropertyShell *shell) + GValue *value, + GladePropertyShell *shell) { g_signal_emit (G_OBJECT (shell), glade_property_shell_signals[POST_COMMIT], 0, value); } static void glade_property_shell_set_eprop (GladePropertyShell *shell, - GladeEditorProperty *eprop) + GladeEditorProperty *eprop) { GladePropertyShellPrivate *priv = shell->priv; if (priv->property_editor != eprop) { if (priv->property_editor) - { - g_signal_handler_disconnect (priv->property_editor, priv->pre_commit_id); - g_signal_handler_disconnect (priv->property_editor, priv->post_commit_id); - priv->pre_commit_id = 0; - priv->post_commit_id = 0; + { + g_signal_handler_disconnect (priv->property_editor, priv->pre_commit_id); + g_signal_handler_disconnect (priv->property_editor, priv->post_commit_id); + priv->pre_commit_id = 0; + priv->post_commit_id = 0; - gtk_widget_destroy (GTK_WIDGET (priv->property_editor)); - } + gtk_widget_destroy (GTK_WIDGET (priv->property_editor)); + } priv->property_editor = eprop; if (priv->property_editor) - { - glade_editor_property_set_custom_text (priv->property_editor, priv->custom_text); + { + glade_editor_property_set_custom_text (priv->property_editor, priv->custom_text); glade_editor_property_set_disable_check (priv->property_editor, priv->disable_check); - priv->pre_commit_id = g_signal_connect (priv->property_editor, "commit", - G_CALLBACK (propagate_pre_commit), shell); - priv->post_commit_id = g_signal_connect_after (priv->property_editor, "commit", - G_CALLBACK (propagate_post_commit), shell); + priv->pre_commit_id = g_signal_connect (priv->property_editor, "commit", + G_CALLBACK (propagate_pre_commit), shell); + priv->post_commit_id = g_signal_connect_after (priv->property_editor, "commit", + G_CALLBACK (propagate_post_commit), shell); - gtk_container_add (GTK_CONTAINER (shell), GTK_WIDGET (priv->property_editor)); - } + gtk_container_add (GTK_CONTAINER (shell), GTK_WIDGET (priv->property_editor)); + } } } static void glade_property_shell_load (GladeEditable *editable, - GladeWidget *widget) + GladeWidget *widget) { GladePropertyShell *shell = GLADE_PROPERTY_SHELL (editable); GladePropertyShellPrivate *priv; @@ -343,64 +343,64 @@ glade_property_shell_load (GladeEditable *editable, /* Use the parent adaptor if we're a packing property */ if (priv->packing) - { - GladeWidget *parent = glade_widget_get_parent (widget); + { + GladeWidget *parent = glade_widget_get_parent (widget); - if (parent) - adaptor = glade_widget_get_adaptor (parent); - } + if (parent) + adaptor = glade_widget_get_adaptor (parent); + } else - adaptor = glade_widget_get_adaptor (widget); + adaptor = glade_widget_get_adaptor (widget); /* Need to rebuild the internal editor */ if (priv->adaptor != adaptor) - { - GladePropertyClass *pclass = NULL; - GladeEditorProperty *eprop = NULL; - - priv->adaptor = adaptor; - - if (adaptor) - { - if (priv->packing) - pclass = glade_widget_adaptor_get_pack_property_class (priv->adaptor, - priv->property_name); - else - pclass = glade_widget_adaptor_get_property_class (priv->adaptor, - priv->property_name); - } - - /* Be forgiving, allow usage of properties that wont work, so that - * some editors can include properties for subclasses, and hide - * those properties if they're not applicable - */ - if (pclass == NULL) - { - priv->property_editor = NULL; - } - /* Construct custom editor property if specified */ - else if (g_type_is_a (priv->editor_type, GLADE_TYPE_EDITOR_PROPERTY)) - { - eprop = g_object_new (priv->editor_type, - "property-class", pclass, - "use-command", priv->use_command, - NULL); - } - else - { - /* Let the adaptor create one */ - eprop = glade_widget_adaptor_create_eprop_by_name (priv->adaptor, - priv->property_name, - priv->packing, - priv->use_command); - } - - glade_property_shell_set_eprop (shell, eprop); - } + { + GladePropertyClass *pclass = NULL; + GladeEditorProperty *eprop = NULL; + + priv->adaptor = adaptor; + + if (adaptor) + { + if (priv->packing) + pclass = glade_widget_adaptor_get_pack_property_class (priv->adaptor, + priv->property_name); + else + pclass = glade_widget_adaptor_get_property_class (priv->adaptor, + priv->property_name); + } + + /* Be forgiving, allow usage of properties that wont work, so that + * some editors can include properties for subclasses, and hide + * those properties if they're not applicable + */ + if (pclass == NULL) + { + priv->property_editor = NULL; + } + /* Construct custom editor property if specified */ + else if (g_type_is_a (priv->editor_type, GLADE_TYPE_EDITOR_PROPERTY)) + { + eprop = g_object_new (priv->editor_type, + "property-class", pclass, + "use-command", priv->use_command, + NULL); + } + else + { + /* Let the adaptor create one */ + eprop = glade_widget_adaptor_create_eprop_by_name (priv->adaptor, + priv->property_name, + priv->packing, + priv->use_command); + } + + glade_property_shell_set_eprop (shell, eprop); + } /* If we have an editor for the right adaptor, load it */ if (priv->property_editor) - glade_editable_load (GLADE_EDITABLE (priv->property_editor), widget); + glade_editable_load (GLADE_EDITABLE (priv->property_editor), widget); } else if (priv->property_editor) glade_editable_load (GLADE_EDITABLE (priv->property_editor), NULL); @@ -431,7 +431,7 @@ glade_property_shell_new (void) void glade_property_shell_set_property_name (GladePropertyShell *shell, - const gchar *property_name) + const gchar *property_name) { GladePropertyShellPrivate *priv; @@ -458,7 +458,7 @@ glade_property_shell_get_property_name (GladePropertyShell *shell) void glade_property_shell_set_custom_text (GladePropertyShell *shell, - const gchar *custom_text) + const gchar *custom_text) { GladePropertyShellPrivate *priv; @@ -472,7 +472,7 @@ glade_property_shell_set_custom_text (GladePropertyShell *shell, priv->custom_text = g_strdup (custom_text); if (priv->property_editor) - glade_editor_property_set_custom_text (priv->property_editor, custom_text); + glade_editor_property_set_custom_text (priv->property_editor, custom_text); g_object_notify (G_OBJECT (shell), "custom-text"); } @@ -488,7 +488,7 @@ glade_property_shell_get_custom_text (GladePropertyShell *shell) void glade_property_shell_set_packing (GladePropertyShell *shell, - gboolean packing) + gboolean packing) { GladePropertyShellPrivate *priv; @@ -514,7 +514,7 @@ glade_property_shell_get_packing (GladePropertyShell *shell) void glade_property_shell_set_use_command (GladePropertyShell *shell, - gboolean use_command) + gboolean use_command) { GladePropertyShellPrivate *priv; @@ -553,7 +553,7 @@ glade_property_shell_set_disable_check (GladePropertyShell *shell, priv->disable_check = disable_check; if (priv->property_editor) - g_object_set (priv->property_editor, "disable-check", disable_check, NULL); + g_object_set (priv->property_editor, "disable-check", disable_check, NULL); g_object_notify (G_OBJECT (shell), "disable-check"); } diff --git a/gladeui/glade-property-shell.h b/gladeui/glade-property-shell.h index d7bfa35b..6c083e51 100644 --- a/gladeui/glade-property-shell.h +++ b/gladeui/glade-property-shell.h @@ -57,16 +57,16 @@ GType glade_property_shell_get_type (void) G_GNUC_CONST; GtkWidget *glade_property_shell_new (void); void glade_property_shell_set_property_name (GladePropertyShell *shell, - const gchar *property_name); + const gchar *property_name); const gchar *glade_property_shell_get_property_name (GladePropertyShell *shell); void glade_property_shell_set_custom_text (GladePropertyShell *shell, - const gchar *custom_text); + const gchar *custom_text); const gchar *glade_property_shell_get_custom_text (GladePropertyShell *shell); void glade_property_shell_set_packing (GladePropertyShell *shell, - gboolean packing); + gboolean packing); gboolean glade_property_shell_get_packing (GladePropertyShell *shell); void glade_property_shell_set_use_command (GladePropertyShell *shell, - gboolean use_command); + gboolean use_command); gboolean glade_property_shell_get_use_command (GladePropertyShell *shell); void glade_property_shell_set_disable_check (GladePropertyShell *shell, gboolean disable_check); diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c index 8c6588d6..ed061577 100644 --- a/gladeui/glade-property.c +++ b/gladeui/glade-property.c @@ -58,51 +58,51 @@ struct _GladePropertyPrivate { GladePropertyClass *klass; /* A pointer to the GladeProperty that this - * setting specifies - */ + * setting specifies + */ GladeWidget *widget; /* A pointer to the GladeWidget that this - * GladeProperty is modifying - */ + * GladeProperty is modifying + */ GladePropertyState state; /* Current property state, used by editing widgets. - */ - + */ + GValue *value; /* The value of the property - */ + */ gchar *insensitive_tooltip; /* Tooltip to display when in insensitive state - * (used to explain why the property is - * insensitive) - */ + * (used to explain why the property is + * insensitive) + */ gchar *support_warning; /* Tooltip to display when the property - * has format problems - * (used to explain why the property is - * insensitive) - */ + * has format problems + * (used to explain why the property is + * insensitive) + */ guint support_disabled : 1; /* Whether this property is disabled due - * to format conflicts - */ + * to format conflicts + */ guint sensitive : 1; /* Whether this property is sensitive (if the - * property is "optional" this takes precedence). - */ + * property is "optional" this takes precedence). + */ guint enabled : 1; /* Enabled is a flag that is used for GladeProperties - * that have the optional flag set to let us know - * if this widget has this setting enabled or - * not. (Like default size, it can be specified or - * unspecified). This flag also sets the state - * of the property->input state for the loaded - * widget. - */ + * that have the optional flag set to let us know + * if this widget has this setting enabled or + * not. (Like default size, it can be specified or + * unspecified). This flag also sets the state + * of the property->input state for the loaded + * widget. + */ guint save_always : 1; /* Used to make a special case exception and always - * save this property regardless of what the default - * value is (used for some special cases like properties - * that are assigned initial values in composite widgets - * or derived widget code). - */ + * save this property regardless of what the default + * value is (used for some special cases like properties + * that are assigned initial values in composite widgets + * or derived widget code). + */ gint precision; @@ -152,9 +152,9 @@ glade_property_dup_impl (GladeProperty *template_prop, GladeWidget *widget) property = g_object_new (GLADE_TYPE_PROPERTY, "class", template_prop->priv->klass, "i18n-translatable", template_prop->priv->i18n_translatable, - "i18n-context", template_prop->priv->i18n_context, - "i18n-comment", template_prop->priv->i18n_comment, - NULL); + "i18n-context", template_prop->priv->i18n_context, + "i18n-comment", template_prop->priv->i18n_comment, + NULL); property->priv->widget = widget; property->priv->value = g_new0 (GValue, 1); @@ -260,10 +260,10 @@ glade_property_verify (GladeProperty *property, const GValue *value) if (glade_property_class_get_is_packing (property->priv->klass) && parent) ret = glade_widget_adaptor_child_verify_property (glade_widget_get_adaptor (parent), - glade_widget_get_object (parent), - glade_widget_get_object (property->priv->widget), - glade_property_class_id (property->priv->klass), - value); + glade_widget_get_object (parent), + glade_widget_get_object (property->priv->widget), + glade_property_class_id (property->priv->klass), + value); else if (!glade_property_class_get_is_packing (property->priv->klass)) ret = glade_widget_adaptor_verify_property (glade_widget_get_adaptor (property->priv->widget), glade_widget_get_object (property->priv->widget), @@ -284,7 +284,7 @@ glade_property_fix_state (GladeProperty *property) if (glade_property_class_optional (property->priv->klass)) { if (glade_property_get_enabled (property)) - property->priv->state |= GLADE_STATE_CHANGED; + property->priv->state |= GLADE_STATE_CHANGED; } else if (!glade_property_original_default (property)) property->priv->state |= GLADE_STATE_CHANGED; @@ -319,16 +319,16 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value) if (glade_get_debug_flags () & GLADE_DEBUG_PROPERTIES) { g_print ("PROPERTY: Setting %s property %s on %s ", - glade_property_class_get_is_packing (property->priv->klass) ? "packing" : "normal", - glade_property_class_id (property->priv->klass), - property->priv->widget ? glade_widget_get_name (property->priv->widget) : "unknown"); + glade_property_class_get_is_packing (property->priv->klass) ? "packing" : "normal", + glade_property_class_id (property->priv->klass), + property->priv->widget ? glade_widget_get_name (property->priv->widget) : "unknown"); gchar *str1 = - glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (property->priv->klass), - property->priv->klass, property->priv->value); + glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (property->priv->klass), + property->priv->klass, property->priv->value); gchar *str2 = - glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (property->priv->klass), - property->priv->klass, value); + glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (property->priv->klass), + property->priv->klass, value); g_print ("from %s to %s\n", str1, str2); g_free (str1); g_free (str2); @@ -393,7 +393,7 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value) /* Update owning widget's warning state if need be */ if (property->priv->widget != NULL && warn_before != warn_after) - glade_widget_verify (property->priv->widget); + glade_widget_verify (property->priv->widget); } /* Special case parentless widget properties */ @@ -511,7 +511,7 @@ glade_property_load_impl (GladeProperty *property) if (g_object_class_find_property (oclass, glade_property_class_id (property->priv->klass))) glade_widget_object_get_property (property->priv->widget, - glade_property_class_id (property->priv->klass), + glade_property_class_id (property->priv->klass), property->priv->value); } @@ -623,8 +623,8 @@ static void glade_property_init (GladeProperty *property) { property->priv = G_TYPE_INSTANCE_GET_PRIVATE (property, - GLADE_TYPE_PROPERTY, - GladePropertyPrivate); + GLADE_TYPE_PROPERTY, + GladePropertyPrivate); property->priv->precision = 2; property->priv->enabled = TRUE; @@ -805,7 +805,7 @@ glade_property_new (GladePropertyClass *klass, if (property->priv->value == NULL) { const GValue *orig_def = - glade_property_class_get_original_default (klass); + glade_property_class_get_original_default (klass); property->priv->value = g_new0 (GValue, 1); g_value_init (property->priv->value, orig_def->g_type); @@ -1176,7 +1176,7 @@ glade_property_read (GladeProperty *property, else { gvalue = - glade_property_class_make_gvalue_from_string (property->priv->klass, value, project); + glade_property_class_make_gvalue_from_string (property->priv->klass, value, project); GLADE_PROPERTY_GET_KLASS (property)->set_value (property, gvalue); @@ -1222,7 +1222,7 @@ glade_property_write (GladeProperty *property, /* This code should work the same for <packing>, <widget> and <template> */ if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_PACKING) || glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) || - glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE))) + glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE))) return; /* There can be a couple of reasons to forcefully save a property */ @@ -1458,7 +1458,7 @@ glade_property_set_sensitive (GladeProperty *property, 0, glade_property_class_get_tooltip (property->priv->klass), property->priv->insensitive_tooltip, - property->priv->support_warning); + property->priv->support_warning); } g_object_notify_by_pspec (G_OBJECT (property), properties[PROP_SENSITIVE]); } @@ -1501,7 +1501,7 @@ glade_property_set_support_warning (GladeProperty *property, 0, glade_property_class_get_tooltip (property->priv->klass), property->priv->insensitive_tooltip, - property->priv->support_warning); + property->priv->support_warning); glade_property_fix_state (property); @@ -1604,12 +1604,12 @@ glade_property_make_string (GladeProperty *property) g_return_val_if_fail (GLADE_IS_PROPERTY (property), NULL); return glade_property_class_make_string_from_gvalue (property->priv->klass, - property->priv->value); + property->priv->value); } void glade_property_set_widget (GladeProperty *property, - GladeWidget *widget) + GladeWidget *widget) { g_return_if_fail (GLADE_IS_PROPERTY (property)); diff --git a/gladeui/glade-property.h b/gladeui/glade-property.h index 84eab22a..667f84a6 100644 --- a/gladeui/glade-property.h +++ b/gladeui/glade-property.h @@ -49,7 +49,7 @@ struct _GladePropertyKlass /* Signals */ void (* value_changed) (GladeProperty *, GValue *, GValue *); void (* tooltip_changed) (GladeProperty *, const gchar *, - const gchar *, const gchar *); + const gchar *, const gchar *); void (* glade_reserved1) (void); void (* glade_reserved2) (void); void (* glade_reserved3) (void); @@ -62,11 +62,11 @@ struct _GladePropertyKlass GType glade_property_get_type (void) G_GNUC_CONST; GladeProperty *glade_property_new (GladePropertyClass *klass, - GladeWidget *widget, - GValue *value); + GladeWidget *widget, + GValue *value); GladeProperty *glade_property_dup (GladeProperty *template_prop, - GladeWidget *widget); + GladeWidget *widget); void glade_property_reset (GladeProperty *property); @@ -77,60 +77,60 @@ gboolean glade_property_default (GladeProperty gboolean glade_property_original_default (GladeProperty *property); gboolean glade_property_equals_value (GladeProperty *property, - const GValue *value); + const GValue *value); gboolean glade_property_equals (GladeProperty *property, - ...); + ...); gboolean glade_property_set_value (GladeProperty *property, - const GValue *value); + const GValue *value); gboolean glade_property_set_va_list (GladeProperty *property, - va_list vl); + va_list vl); gboolean glade_property_set (GladeProperty *property, - ...); + ...); void glade_property_get_value (GladeProperty *property, - GValue *value); + GValue *value); void glade_property_get_default (GladeProperty *property, - GValue *value); + GValue *value); void glade_property_get_va_list (GladeProperty *property, - va_list vl); + va_list vl); void glade_property_get (GladeProperty *property, - ...); + ...); void glade_property_add_object (GladeProperty *property, - GObject *object); + GObject *object); void glade_property_remove_object (GladeProperty *property, - GObject *object); + GObject *object); void glade_property_sync (GladeProperty *property); void glade_property_load (GladeProperty *property); void glade_property_read (GladeProperty *property, - GladeProject *project, - GladeXmlNode *node); + GladeProject *project, + GladeXmlNode *node); -void glade_property_write (GladeProperty *property, - GladeXmlContext *context, - GladeXmlNode *node); +void glade_property_write (GladeProperty *property, + GladeXmlContext *context, + GladeXmlNode *node); GladePropertyClass *glade_property_get_class (GladeProperty *property); void glade_property_set_sensitive (GladeProperty *property, - gboolean sensitive, - const gchar *reason); + gboolean sensitive, + const gchar *reason); G_CONST_RETURN gchar *glade_propert_get_insensitive_tooltip(GladeProperty *property); void glade_property_set_support_warning (GladeProperty *property, - gboolean disable, - const gchar *reason); + gboolean disable, + const gchar *reason); G_CONST_RETURN gchar *glade_property_get_support_warning (GladeProperty *property); gboolean glade_property_warn_usage (GladeProperty *property); @@ -139,13 +139,13 @@ gboolean glade_property_get_sensitive (GladeProperty void glade_property_set_save_always (GladeProperty *property, - gboolean setting); + gboolean setting); gboolean glade_property_get_save_always (GladeProperty *property); void glade_property_set_enabled (GladeProperty *property, - gboolean enabled); + gboolean enabled); gboolean glade_property_get_enabled (GladeProperty *property); @@ -154,24 +154,24 @@ gchar *glade_property_make_string (GladeProperty GladeWidget *glade_property_get_widget (GladeProperty *property); void glade_property_set_widget (GladeProperty *property, - GladeWidget *widget); + GladeWidget *widget); GValue *glade_property_inline_value (GladeProperty *property); GladePropertyState glade_property_get_state (GladeProperty *property); void glade_property_i18n_set_comment (GladeProperty *property, - const gchar *str); + const gchar *str); G_CONST_RETURN gchar *glade_property_i18n_get_comment (GladeProperty *property); void glade_property_i18n_set_context (GladeProperty *property, - const gchar *str); + const gchar *str); G_CONST_RETURN gchar *glade_property_i18n_get_context (GladeProperty *property); void glade_property_i18n_set_translatable (GladeProperty *property, - gboolean translatable); + gboolean translatable); gboolean glade_property_i18n_get_translatable (GladeProperty *property); diff --git a/gladeui/glade-signal-class.c b/gladeui/glade-signal-class.c index b797f061..af02908d 100644 --- a/gladeui/glade-signal-class.c +++ b/gladeui/glade-signal-class.c @@ -28,24 +28,24 @@ struct _GladeSignalClass { GladeWidgetAdaptor *adaptor; /* The adaptor that originated this signal. - */ + */ GSignalQuery query; guint16 version_since_major; /* Version in which this signal was */ guint16 version_since_minor; /* introduced - */ + */ const gchar *name; /* Name of the signal, eg clicked */ const gchar *type; /* Name of the object class that this signal - * belongs to eg GtkButton */ + * belongs to eg GtkButton */ guint deprecated : 1; /* True if this signal is deprecated */ }; GladeSignalClass * glade_signal_class_new (GladeWidgetAdaptor *adaptor, - GType for_type, - guint signal_id) + GType for_type, + guint signal_id) { GladeSignalClass *class; @@ -84,20 +84,20 @@ glade_signal_class_free (GladeSignalClass *signal_class) void glade_signal_class_update_from_node (GladeSignalClass *signal_class, - GladeXmlNode *node, - const gchar *domain) + GladeXmlNode *node, + const gchar *domain) { g_return_if_fail (signal_class != NULL); g_return_if_fail (node != NULL); glade_xml_get_property_version (node, GLADE_TAG_VERSION_SINCE, - &signal_class->version_since_major, - &signal_class->version_since_minor); + &signal_class->version_since_major, + &signal_class->version_since_minor); signal_class->deprecated = glade_xml_get_property_boolean (node, - GLADE_TAG_DEPRECATED, - signal_class->deprecated); + GLADE_TAG_DEPRECATED, + signal_class->deprecated); } GladeWidgetAdaptor * @@ -134,8 +134,8 @@ glade_signal_class_get_flags (const GladeSignalClass *signal_class) void glade_signal_class_set_since (GladeSignalClass *signal_class, - guint16 since_major, - guint16 since_minor) + guint16 since_major, + guint16 since_minor) { g_return_if_fail (signal_class != NULL); @@ -161,7 +161,7 @@ glade_signal_class_since_minor (GladeSignalClass *signal_class) void glade_signal_class_set_deprecated (GladeSignalClass *signal_class, - gboolean deprecated) + gboolean deprecated) { g_return_if_fail (signal_class != NULL); diff --git a/gladeui/glade-signal-class.h b/gladeui/glade-signal-class.h index 46e2a537..0330f530 100644 --- a/gladeui/glade-signal-class.h +++ b/gladeui/glade-signal-class.h @@ -37,7 +37,7 @@ G_BEGIN_DECLS * Evaluates to %TRUE if @klass is available in its owning library version-@major_verion.@minor_version. * */ -#define GSC_VERSION_CHECK(klass, major_version, minor_version) \ +#define GSC_VERSION_CHECK(klass, major_version, minor_version) \ ((glade_signal_class_since_major (GLADE_SIGNAL_CLASS (klass)) == major_version) ? \ (glade_signal_class_since_minor (GLADE_SIGNAL_CLASS (klass)) <= minor_version) : \ (glade_signal_class_since_major (GLADE_SIGNAL_CLASS (klass)) <= major_version)) @@ -48,12 +48,12 @@ G_BEGIN_DECLS typedef struct _GladeSignalClass GladeSignalClass; GladeSignalClass *glade_signal_class_new (GladeWidgetAdaptor *adaptor, - GType for_type, - guint signal_id); + GType for_type, + guint signal_id); void glade_signal_class_free (GladeSignalClass *signal_class); void glade_signal_class_update_from_node (GladeSignalClass *signal_class, - GladeXmlNode *node, - const gchar *domain); + GladeXmlNode *node, + const gchar *domain); GladeWidgetAdaptor *glade_signal_class_get_adaptor (const GladeSignalClass *signal_class); G_CONST_RETURN gchar *glade_signal_class_get_name (const GladeSignalClass *signal_class); @@ -61,13 +61,13 @@ G_CONST_RETURN gchar *glade_signal_class_get_type (const GladeSi GSignalFlags glade_signal_class_get_flags (const GladeSignalClass *signal_class); void glade_signal_class_set_since (GladeSignalClass *signal_class, - guint16 since_major, - guint16 since_minor); + guint16 since_major, + guint16 since_minor); guint16 glade_signal_class_since_major (GladeSignalClass *signal_class); guint16 glade_signal_class_since_minor (GladeSignalClass *signal_class); void glade_signal_class_set_deprecated (GladeSignalClass *signal_class, - gboolean deprecated); + gboolean deprecated); gboolean glade_signal_class_deprecated (GladeSignalClass *signal_class); diff --git a/gladeui/glade-signal-editor.c b/gladeui/glade-signal-editor.c index 67d3443f..97b19a56 100644 --- a/gladeui/glade-signal-editor.c +++ b/gladeui/glade-signal-editor.c @@ -49,7 +49,7 @@ struct _GladeSignalEditorPrivate { GtkTreeModel *model; - + GladeWidget *widget; GladeWidgetAdaptor *adaptor; @@ -139,7 +139,7 @@ tree_path_focus_idle (gpointer data) return FALSE; gtk_tree_model_get (self->priv->model, &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); if (glade_signal_is_dummy (signal)) gtk_tree_view_set_cursor (GTK_TREE_VIEW (self->priv->signal_tree), @@ -166,79 +166,79 @@ on_handler_edited (GtkCellRendererText *renderer, gboolean dummy; g_return_if_fail (self->priv->widget != NULL); - + gtk_tree_model_get_iter (self->priv->model, - &iter, - tree_path); + &iter, + tree_path); gtk_tree_model_get (self->priv->model, &iter, - GLADE_SIGNAL_COLUMN_HANDLER, &old_handler, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); + GLADE_SIGNAL_COLUMN_HANDLER, &old_handler, + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); dummy = glade_signal_is_dummy (signal); - + /* False alarm ? */ if (handler && !g_str_equal (old_handler, handler)) { if (!dummy) - { - if (strlen (handler)) - { - /* change an existing signal handler */ - GladeSignal *old_signal; - GladeSignal *new_signal; - - gtk_tree_model_get (self->priv->model, - &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, - &old_signal, -1); + { + if (strlen (handler)) + { + /* change an existing signal handler */ + GladeSignal *old_signal; + GladeSignal *new_signal; + + gtk_tree_model_get (self->priv->model, + &iter, + GLADE_SIGNAL_COLUMN_SIGNAL, + &old_signal, -1); - new_signal = glade_signal_clone (old_signal); + new_signal = glade_signal_clone (old_signal); - /* Change the new signal handler */ - glade_signal_set_handler (new_signal, handler); + /* Change the new signal handler */ + glade_signal_set_handler (new_signal, handler); - glade_command_change_signal (self->priv->widget, old_signal, new_signal); + glade_command_change_signal (self->priv->widget, old_signal, new_signal); g_object_unref (old_signal); - g_object_unref (new_signal); - } - else - { - GladeSignal *deleted_signal; - gtk_tree_model_get (self->priv->model, - &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, - &deleted_signal, -1); - - - /* Delete signal */ - glade_command_remove_signal (self->priv->widget, deleted_signal); - } - } + g_object_unref (new_signal); + } + else + { + GladeSignal *deleted_signal; + gtk_tree_model_get (self->priv->model, + &iter, + GLADE_SIGNAL_COLUMN_SIGNAL, + &deleted_signal, -1); + + + /* Delete signal */ + glade_command_remove_signal (self->priv->widget, deleted_signal); + } + } else if (strlen (handler)) - { - GladeSignal *new_signal; - - /* Get the signal name */ - gtk_tree_model_get (self->priv->model, &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); - - /* Add a new signal handler */ - new_signal = glade_signal_new (glade_signal_get_class (signal), + { + GladeSignal *new_signal; + + /* Get the signal name */ + gtk_tree_model_get (self->priv->model, &iter, + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); + + /* Add a new signal handler */ + new_signal = glade_signal_new (glade_signal_get_class (signal), handler, NULL, FALSE, FALSE); glade_signal_set_detail (new_signal, glade_signal_get_detail (signal)); - glade_command_add_signal (self->priv->widget, new_signal); + glade_command_add_signal (self->priv->widget, new_signal); glade_signal_set_detail (signal, NULL); - g_object_unref (new_signal); + g_object_unref (new_signal); glade_signal_editor_take_target_focus_path (self, tree_path); /* make sure we do not free the path here as * glade_signal_editor_take_target_focus_path() takes ownership **/ tree_path = NULL; - } + } } g_object_unref (signal); @@ -248,7 +248,7 @@ on_handler_edited (GtkCellRendererText *renderer, static gchar ** glade_signal_editor_callback_suggestions (GladeSignalEditor *editor, - GladeSignal *signal) + GladeSignal *signal) { GladeWidget *widget = glade_signal_editor_get_widget (editor); gchar *signal_name, **suggestions = g_new (gchar *, 10); @@ -345,11 +345,11 @@ on_detail_editing_started (GtkCellRenderer *renderer, gtk_tree_path_free (tree_path); gtk_tree_model_get (priv->model, &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); if (glade_signal_get_detail (signal) == NULL) - gtk_entry_set_text (entry, ""); + gtk_entry_set_text (entry, ""); g_object_unref (signal); @@ -388,11 +388,11 @@ on_detail_edited (GtkCellRendererText *renderer, gchar *old_detail; g_return_if_fail (self->priv->widget != NULL); - + gtk_tree_model_get_iter (self->priv->model, &iter, tree_path); gtk_tree_model_get (self->priv->model, &iter, - GLADE_SIGNAL_COLUMN_DETAIL, &old_detail, -1); + GLADE_SIGNAL_COLUMN_DETAIL, &old_detail, -1); if (detail && strlen (detail) && g_strcmp0 (old_detail, detail)) { @@ -445,11 +445,11 @@ on_handler_editing_started (GtkCellRenderer *renderer, gtk_tree_path_free (tree_path); gtk_tree_model_get (priv->model, &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); if (glade_signal_is_dummy (signal)) - gtk_entry_set_text (entry, ""); + gtk_entry_set_text (entry, ""); g_signal_emit (self, glade_signal_editor_signals [CALLBACK_SUGGESTIONS], 0, signal, &suggestions); @@ -486,15 +486,15 @@ glade_signal_editor_user_data_activate (GtkCellRenderer *icon_renderer, GladeProject *project; GladeSignal *signal; - + GList *selected = NULL; GList *exception = NULL; gboolean dummy; - + gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); dummy = glade_signal_is_dummy (signal); if (!dummy) @@ -502,29 +502,29 @@ glade_signal_editor_user_data_activate (GtkCellRenderer *icon_renderer, project = glade_widget_get_project (priv->widget); if (glade_signal_get_userdata (signal)) - { - project_object = - glade_project_get_widget_by_name (project, glade_signal_get_userdata (signal)); - selected = g_list_prepend (selected, project_object); - } + { + project_object = + glade_project_get_widget_by_name (project, glade_signal_get_userdata (signal)); + selected = g_list_prepend (selected, project_object); + } exception = g_list_prepend (exception, priv->widget); if (glade_editor_property_show_object_dialog (project, - _("Select an object to pass to the handler"), - gtk_widget_get_toplevel (GTK_WIDGET (editor)), - G_TYPE_OBJECT, priv->widget, - &project_object)) - { - GladeSignal *old_signal = signal; - GladeSignal *new_signal = glade_signal_clone (signal); - - glade_signal_set_userdata (new_signal, - project_object ? glade_widget_get_name (project_object) : NULL); - - glade_command_change_signal (priv->widget, old_signal, new_signal); - g_object_unref (new_signal); - } + _("Select an object to pass to the handler"), + gtk_widget_get_toplevel (GTK_WIDGET (editor)), + G_TYPE_OBJECT, priv->widget, + &project_object)) + { + GladeSignal *old_signal = signal; + GladeSignal *new_signal = glade_signal_clone (signal); + + glade_signal_set_userdata (new_signal, + project_object ? glade_widget_get_name (project_object) : NULL); + + glade_command_change_signal (priv->widget, old_signal, new_signal); + g_object_unref (new_signal); + } } g_object_unref (signal); gtk_tree_path_free (path); @@ -542,28 +542,28 @@ on_swap_toggled (GtkCellRendererToggle *renderer, GladeSignal *new_signal; g_return_if_fail (self->priv->widget != NULL); - + gtk_tree_model_get_iter (self->priv->model, - &iter, - tree_path); + &iter, + tree_path); gtk_tree_model_get (self->priv->model, - &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, - &old_signal, -1); + &iter, + GLADE_SIGNAL_COLUMN_SIGNAL, + &old_signal, -1); new_signal = glade_signal_clone (old_signal); /* Change the new signal handler */ glade_signal_set_swapped (new_signal, - !gtk_cell_renderer_toggle_get_active (renderer)); + !gtk_cell_renderer_toggle_get_active (renderer)); glade_command_change_signal (self->priv->widget, old_signal, new_signal); g_object_unref (new_signal); g_object_unref (old_signal); - gtk_tree_path_free (tree_path); + gtk_tree_path_free (tree_path); } static void @@ -578,28 +578,28 @@ on_after_toggled (GtkCellRendererToggle *renderer, GladeSignal *new_signal; g_return_if_fail (self->priv->widget != NULL); - + gtk_tree_model_get_iter (self->priv->model, - &iter, - tree_path); + &iter, + tree_path); gtk_tree_model_get (self->priv->model, - &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, - &old_signal, -1); + &iter, + GLADE_SIGNAL_COLUMN_SIGNAL, + &old_signal, -1); new_signal = glade_signal_clone (old_signal); /* Change the new signal handler */ glade_signal_set_after (new_signal, - !gtk_cell_renderer_toggle_get_active (renderer)); + !gtk_cell_renderer_toggle_get_active (renderer)); glade_command_change_signal (self->priv->widget, old_signal, new_signal); g_object_unref (new_signal); g_object_unref (old_signal); - - gtk_tree_path_free (tree_path); + + gtk_tree_path_free (tree_path); } static void @@ -615,14 +615,14 @@ glade_signal_editor_devhelp (GtkCellRenderer *cell, const GladeSignalClass *signal_class; GladeSignal *signal; gchar *book; - gchar *search; + gchar *search; g_return_if_fail (gtk_tree_model_get_iter (model, &iter, path)); gtk_tree_path_free (path); gtk_tree_model_get (model, &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); signal_class = glade_signal_get_class (signal); adaptor = glade_signal_class_get_adaptor (signal_class); g_object_get (adaptor, "book", &book, NULL); @@ -638,9 +638,9 @@ glade_signal_editor_devhelp (GtkCellRenderer *cell, static void glade_signal_editor_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) + guint prop_id, + GValue *value, + GParamSpec *pspec) { GladeSignalEditor *self = GLADE_SIGNAL_EDITOR (object); GladeSignalEditorPrivate *priv = self->priv; @@ -658,9 +658,9 @@ glade_signal_editor_get_property (GObject *object, static void glade_signal_editor_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) + guint prop_id, + const GValue *value, + GParamSpec *pspec) { GladeSignalEditor *self = GLADE_SIGNAL_EDITOR (object); @@ -686,14 +686,14 @@ glade_signal_editor_new () GladeSignalEditor *signal_editor; signal_editor = GLADE_SIGNAL_EDITOR (g_object_new (GLADE_TYPE_SIGNAL_EDITOR, - NULL, NULL)); + NULL, NULL)); return signal_editor; } static gint find_adaptor_by_name (GladeWidgetAdaptor *adaptor, - const gchar *name) + const gchar *name) { return g_strcmp0 (glade_widget_adaptor_get_name (adaptor), name); } @@ -708,29 +708,28 @@ find_adaptor_by_name (GladeWidgetAdaptor *adaptor, */ void glade_signal_editor_load_widget (GladeSignalEditor *editor, - GladeWidget *widget) + GladeWidget *widget) { GladeSignalEditorPrivate *priv = editor->priv; GList *signals, *l, *adaptors = NULL; GtkTreePath *path; GtkTreeIter iter; gboolean valid; - + if (priv->widget != widget) - { + { priv->widget = widget; priv->adaptor = widget ? glade_widget_get_adaptor (widget) : NULL; - + if (priv->widget) - { - g_object_ref (priv->widget); - } + { + g_object_ref (priv->widget); + } } gtk_tree_view_set_model (GTK_TREE_VIEW (priv->signal_tree), NULL); priv->model = NULL; - if (!widget) return; @@ -756,7 +755,7 @@ glade_signal_editor_load_widget (GladeSignalEditor *editor, adaptor = glade_signal_class_get_adaptor (signal_class); if (!g_list_find (adaptors, adaptor)) - adaptors = g_list_prepend (adaptors, adaptor); + adaptors = g_list_prepend (adaptors, adaptor); } g_list_free (signals); @@ -767,15 +766,15 @@ glade_signal_editor_load_widget (GladeSignalEditor *editor, gchar *name = NULL; gtk_tree_model_get (priv->model, &iter, - GLADE_SIGNAL_COLUMN_NAME, &name, - -1); + GLADE_SIGNAL_COLUMN_NAME, &name, + -1); if (g_list_find_custom (adaptors, name, (GCompareFunc)find_adaptor_by_name)) - { - path = gtk_tree_model_get_path (priv->model, &iter); - gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->signal_tree), path, FALSE); - gtk_tree_path_free (path); - } + { + path = gtk_tree_model_get_path (priv->model, &iter); + gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->signal_tree), path, FALSE); + gtk_tree_path_free (path); + } g_free (name); valid = gtk_tree_model_iter_next (priv->model, &iter); @@ -801,16 +800,16 @@ glade_signal_editor_enable_dnd (GladeSignalEditor *editor, gboolean enabled) if (enabled) { const GtkTargetEntry entry = { - "application/x-glade-signal", - GTK_TARGET_OTHER_WIDGET, - 1 + "application/x-glade-signal", + GTK_TARGET_OTHER_WIDGET, + 1 }; /* DND */ gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW(priv->signal_tree), - GDK_BUTTON1_MASK, - &entry, - 1, - GDK_ACTION_COPY); + GDK_BUTTON1_MASK, + &entry, + 1, + GDK_ACTION_COPY); } else { @@ -840,7 +839,7 @@ create_rich_drag_surface (GtkWidget *widget, const gchar *text) cairo_surface_t *s; gint width, height; GdkRGBA rgba; - + pango_layout_set_text (layout, text, -1); pango_layout_get_size (layout, &width, &height); width = PANGO_PIXELS(width) + BORDER; @@ -866,7 +865,7 @@ create_rich_drag_surface (GtkWidget *widget, const gchar *text) cairo_destroy (cr); g_object_unref (layout); - + return s; } @@ -887,7 +886,7 @@ glade_signal_editor_drag_begin (GtkWidget *widget, gchar* handler; gchar* text; gtk_tree_model_get (model, &iter, - GLADE_SIGNAL_COLUMN_HANDLER, &handler, -1); + GLADE_SIGNAL_COLUMN_HANDLER, &handler, -1); text = g_strdup_printf ("%s ()", handler); g_free (handler); @@ -895,7 +894,7 @@ glade_signal_editor_drag_begin (GtkWidget *widget, s = create_rich_drag_surface (widget, text); g_free (text); } - + if (s) { gtk_drag_set_icon_surface (context, s); @@ -919,36 +918,36 @@ glade_signal_editor_name_cell_data_func (GtkTreeViewColumn *column, gboolean show_name; gtk_tree_model_get (model, iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - GLADE_SIGNAL_COLUMN_SHOW_NAME, &show_name, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + GLADE_SIGNAL_COLUMN_SHOW_NAME, &show_name, + -1); if (signal) { gboolean dummy; - + dummy = glade_signal_is_dummy (signal); if (!dummy && show_name) - { - g_object_set (renderer, - "weight", PANGO_WEIGHT_BOLD, - NULL); - } + { + g_object_set (renderer, + "weight", PANGO_WEIGHT_BOLD, + NULL); + } else - { - g_object_set (renderer, - "weight", PANGO_WEIGHT_NORMAL, - NULL); - } + { + g_object_set (renderer, + "weight", PANGO_WEIGHT_NORMAL, + NULL); + } g_object_unref (signal); } else g_object_set (renderer, - "weight", PANGO_WEIGHT_NORMAL, - NULL); - + "weight", PANGO_WEIGHT_NORMAL, + NULL); + g_object_set (renderer, - "visible", show_name, - NULL); + "visible", show_name, + NULL); } static void @@ -963,51 +962,51 @@ glade_signal_editor_handler_cell_data_func (GtkTreeViewColumn *column, GdkRGBA color; gtk_tree_model_get (model, iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); if (signal) { gboolean dummy; GtkStyleContext* context = gtk_widget_get_style_context (editor->priv->signal_tree); - + dummy = glade_signal_is_dummy (signal); if (dummy) - { + { gtk_style_context_save (context); gtk_style_context_set_state (context, gtk_style_context_get_state (context) | GTK_STATE_FLAG_INSENSITIVE); - gtk_style_context_get_color (context, + gtk_style_context_get_color (context, gtk_style_context_get_state (context), &color); - g_object_set (renderer, - "style", PANGO_STYLE_ITALIC, - "foreground-rgba", &color, - NULL); + g_object_set (renderer, + "style", PANGO_STYLE_ITALIC, + "foreground-rgba", &color, + NULL); gtk_style_context_restore (context); - } + } else - { - gtk_style_context_get_color (context, - gtk_style_context_get_state (context), - &color); - g_object_set (renderer, - "style", PANGO_STYLE_NORMAL, - "foreground-rgba", &color, - NULL); - } + { + gtk_style_context_get_color (context, + gtk_style_context_get_state (context), + &color); + g_object_set (renderer, + "style", PANGO_STYLE_NORMAL, + "foreground-rgba", &color, + NULL); + } g_object_set (renderer, - "visible", TRUE, - "sensitive", TRUE, - "editable", TRUE, - NULL); + "visible", TRUE, + "sensitive", TRUE, + "editable", TRUE, + NULL); g_object_unref (signal); } else { g_object_set (renderer, - "visible", FALSE, - "editable", FALSE, - NULL); + "visible", FALSE, + "editable", FALSE, + NULL); } } @@ -1022,8 +1021,8 @@ glade_signal_editor_detail_cell_data_func (GtkTreeViewColumn *column, GladeSignal *signal; gtk_tree_model_get (model, iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); if (signal && (glade_signal_class_get_flags (glade_signal_get_class (signal)) & G_SIGNAL_DETAILED)) { @@ -1033,28 +1032,28 @@ glade_signal_editor_detail_cell_data_func (GtkTreeViewColumn *column, dummy = glade_signal_is_dummy (signal); if (dummy || !glade_signal_get_detail (signal)) - { + { gtk_style_context_save (context); gtk_style_context_set_state (context, gtk_style_context_get_state (context) | GTK_STATE_FLAG_INSENSITIVE); - gtk_style_context_get_color (context, - gtk_style_context_get_state (context), + gtk_style_context_get_color (context, + gtk_style_context_get_state (context), &color); - g_object_set (renderer, - "style", PANGO_STYLE_ITALIC, - "foreground-rgba", &color, - NULL); + g_object_set (renderer, + "style", PANGO_STYLE_ITALIC, + "foreground-rgba", &color, + NULL); gtk_style_context_restore (context); - } + } else - { - gtk_style_context_get_color (context, - gtk_style_context_get_state (context), - &color); - g_object_set (renderer, - "style", PANGO_STYLE_NORMAL, - "foreground-rgba", &color, - NULL); - } + { + gtk_style_context_get_color (context, + gtk_style_context_get_state (context), + &color); + g_object_set (renderer, + "style", PANGO_STYLE_NORMAL, + "foreground-rgba", &color, + NULL); + } g_object_set (renderer, "sensitive", TRUE, @@ -1069,8 +1068,8 @@ glade_signal_editor_detail_cell_data_func (GtkTreeViewColumn *column, g_object_set (renderer, "editable", FALSE, "sensitive", FALSE, - "visible", FALSE, - NULL); + "visible", FALSE, + NULL); } } @@ -1086,55 +1085,55 @@ glade_signal_editor_data_cell_data_func (GtkTreeViewColumn *column, GdkRGBA color; gtk_tree_model_get (model, iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); if (signal) { gboolean dummy; - + dummy = glade_signal_is_dummy (signal); g_object_set (renderer, - "sensitive", !dummy, - "visible", TRUE, - NULL); + "sensitive", !dummy, + "visible", TRUE, + NULL); if (GTK_IS_CELL_RENDERER_TEXT (renderer)) - { - GtkStyleContext* context = gtk_widget_get_style_context (editor->priv->signal_tree); + { + GtkStyleContext* context = gtk_widget_get_style_context (editor->priv->signal_tree); - if (dummy || !glade_signal_get_userdata (signal)) - { + if (dummy || !glade_signal_get_userdata (signal)) + { gtk_style_context_save (context); gtk_style_context_set_state (context, gtk_style_context_get_state (context) | GTK_STATE_FLAG_INSENSITIVE); - gtk_style_context_get_color (context, + gtk_style_context_get_color (context, gtk_style_context_get_state (context), &color); - g_object_set (renderer, - "style", PANGO_STYLE_ITALIC, - "foreground-rgba", &color, - NULL); + g_object_set (renderer, + "style", PANGO_STYLE_ITALIC, + "foreground-rgba", &color, + NULL); gtk_style_context_restore (context); - } - else - { - gtk_style_context_get_color (context, + } + else + { + gtk_style_context_get_color (context, gtk_style_context_get_state (context), &color); - g_object_set (renderer, - "style", PANGO_STYLE_NORMAL, - "foreground-rgba", &color, - NULL); - } - } + g_object_set (renderer, + "style", PANGO_STYLE_NORMAL, + "foreground-rgba", &color, + NULL); + } + } g_object_unref (signal); } else { g_object_set (renderer, - "sensitive", FALSE, - "visible", FALSE, - NULL); + "sensitive", FALSE, + "visible", FALSE, + NULL); } } @@ -1150,9 +1149,9 @@ glade_signal_editor_warning_cell_data_func (GtkTreeViewColumn *column, gboolean show_name; gtk_tree_model_get (model, iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - GLADE_SIGNAL_COLUMN_SHOW_NAME, &show_name, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + GLADE_SIGNAL_COLUMN_SHOW_NAME, &show_name, + -1); if (signal) { @@ -1160,10 +1159,10 @@ glade_signal_editor_warning_cell_data_func (GtkTreeViewColumn *column, visible = warning && strlen (warning); g_object_unref (signal); } - + g_object_set (renderer, - "visible", (visible && show_name), - NULL); + "visible", (visible && show_name), + NULL); } static void @@ -1176,8 +1175,8 @@ glade_signal_editor_devhelp_cell_data_func (GtkTreeViewColumn *column, GladeSignal *signal; gtk_tree_model_get (model, iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); if (signal) { const GladeSignalClass *class = glade_signal_get_class (signal); @@ -1186,16 +1185,16 @@ glade_signal_editor_devhelp_cell_data_func (GtkTreeViewColumn *column, g_object_get (adaptor, "book", &book, NULL); g_object_set (renderer, - "visible", book != NULL, - NULL); + "visible", book != NULL, + NULL); g_free (book); g_object_unref (signal); } else { g_object_set (renderer, - "visible", FALSE, - NULL); + "visible", FALSE, + NULL); } } @@ -1251,47 +1250,47 @@ glade_signal_editor_init (GladeSignalEditor *self) GtkCellRenderer *renderer; GtkCellArea *cell_area; GladeSignalEditorPrivate *priv; - + self->priv = glade_signal_editor_get_instance_private (self); priv = self->priv; - + /* Create signal tree */ priv->signal_tree = gtk_tree_view_new (); g_signal_connect (G_OBJECT (priv->signal_tree), "row-activated", - G_CALLBACK (glade_signal_editor_signal_activate), - self); + G_CALLBACK (glade_signal_editor_signal_activate), + self); /* Create columns */ /* Signal name */ priv->column_name = gtk_tree_view_column_new (); - + /* version warning */ renderer = gtk_cell_renderer_pixbuf_new (); g_object_set (G_OBJECT (renderer), - "icon-name", "dialog-warning", - "xalign", 0.0, + "icon-name", "dialog-warning", + "xalign", 0.0, NULL); gtk_tree_view_column_set_cell_data_func (priv->column_name, renderer, - glade_signal_editor_warning_cell_data_func, - self, - NULL); + glade_signal_editor_warning_cell_data_func, + self, + NULL); gtk_tree_view_column_pack_start (priv->column_name, renderer, FALSE); /* signal name */ renderer = gtk_cell_renderer_text_new (); g_object_set (G_OBJECT (renderer), - "ellipsize", PANGO_ELLIPSIZE_END, - "width-chars", 20, - NULL); + "ellipsize", PANGO_ELLIPSIZE_END, + "width-chars", 20, + NULL); gtk_tree_view_column_pack_end (priv->column_name, renderer, TRUE); gtk_tree_view_column_set_attributes (priv->column_name, renderer, - "text", GLADE_SIGNAL_COLUMN_NAME, - NULL); + "text", GLADE_SIGNAL_COLUMN_NAME, + NULL); gtk_tree_view_column_set_cell_data_func (priv->column_name, renderer, - glade_signal_editor_name_cell_data_func, - self, - NULL); + glade_signal_editor_name_cell_data_func, + self, + NULL); gtk_tree_view_column_set_resizable (priv->column_name, TRUE); gtk_tree_view_column_set_expand (priv->column_name, TRUE); @@ -1308,9 +1307,9 @@ glade_signal_editor_init (GladeSignalEditor *self) "text", GLADE_SIGNAL_COLUMN_DETAIL, NULL); gtk_tree_view_column_set_cell_data_func (priv->column_detail, renderer, - glade_signal_editor_detail_cell_data_func, - self, - NULL); + glade_signal_editor_detail_cell_data_func, + self, + NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (self->priv->signal_tree), priv->column_detail); /* Signal handler */ @@ -1319,50 +1318,50 @@ glade_signal_editor_init (GladeSignalEditor *self) g_signal_connect (renderer, "edited", G_CALLBACK(on_handler_edited), self); g_signal_connect (renderer, "editing-started", G_CALLBACK (on_handler_editing_started), self); priv->column_handler = gtk_tree_view_column_new_with_attributes (_("Handler"), - renderer, - "text", GLADE_SIGNAL_COLUMN_HANDLER, - NULL); + renderer, + "text", GLADE_SIGNAL_COLUMN_HANDLER, + NULL); gtk_tree_view_column_set_cell_data_func (priv->column_handler, renderer, - glade_signal_editor_handler_cell_data_func, - self, - NULL); + glade_signal_editor_handler_cell_data_func, + self, + NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (self->priv->signal_tree), priv->column_handler); /* Signal user_data */ priv->renderer_userdata = gtk_cell_renderer_text_new (); g_object_set (G_OBJECT (priv->renderer_userdata), - "editable", FALSE, - "ellipsize", PANGO_ELLIPSIZE_END, - "width-chars", 10, NULL); + "editable", FALSE, + "ellipsize", PANGO_ELLIPSIZE_END, + "width-chars", 10, NULL); cell_area = gtk_cell_area_box_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (cell_area), - priv->renderer_userdata, - TRUE); + priv->renderer_userdata, + TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (cell_area), - priv->renderer_userdata, - "text", GLADE_SIGNAL_COLUMN_OBJECT, - NULL); - + priv->renderer_userdata, + "text", GLADE_SIGNAL_COLUMN_OBJECT, + NULL); + renderer = glade_cell_renderer_icon_new (); g_object_set (G_OBJECT (renderer), "icon-name", "gtk-edit", NULL); g_signal_connect (G_OBJECT (renderer), "activate", - G_CALLBACK (glade_signal_editor_user_data_activate), - self); + G_CALLBACK (glade_signal_editor_user_data_activate), + self); gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (cell_area), renderer, FALSE); gtk_cell_area_add_focus_sibling (cell_area, - renderer, - priv->renderer_userdata); - + renderer, + priv->renderer_userdata); + priv->column_userdata = gtk_tree_view_column_new_with_area (cell_area); gtk_tree_view_column_set_title (priv->column_userdata, _("User data")); gtk_tree_view_column_set_cell_data_func (priv->column_userdata, priv->renderer_userdata, - glade_signal_editor_data_cell_data_func, - self, NULL); + glade_signal_editor_data_cell_data_func, + self, NULL); gtk_tree_view_column_set_cell_data_func (priv->column_userdata, renderer, - glade_signal_editor_data_cell_data_func, - self, NULL); + glade_signal_editor_data_cell_data_func, + self, NULL); gtk_tree_view_column_set_resizable (priv->column_userdata, TRUE); gtk_tree_view_column_set_expand (priv->column_userdata, TRUE); @@ -1372,15 +1371,15 @@ glade_signal_editor_init (GladeSignalEditor *self) renderer = gtk_cell_renderer_toggle_new (); g_signal_connect (renderer, "toggled", G_CALLBACK (on_swap_toggled), self); priv->column_swap = gtk_tree_view_column_new_with_attributes (_("Swap"), - renderer, - "active", GLADE_SIGNAL_COLUMN_SWAP, - NULL); + renderer, + "active", GLADE_SIGNAL_COLUMN_SWAP, + NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (self->priv->signal_tree), priv->column_swap); gtk_tree_view_column_set_cell_data_func (priv->column_swap, renderer, - glade_signal_editor_data_cell_data_func, - self, - NULL); - + glade_signal_editor_data_cell_data_func, + self, + NULL); + /* After */ cell_area = gtk_cell_area_box_new (); renderer = gtk_cell_renderer_toggle_new (); @@ -1392,12 +1391,12 @@ glade_signal_editor_init (GladeSignalEditor *self) gtk_tree_view_append_column (GTK_TREE_VIEW (self->priv->signal_tree), priv->column_after); gtk_cell_area_box_pack_start (GTK_CELL_AREA_BOX (cell_area), - renderer, FALSE, TRUE, FALSE); + renderer, FALSE, TRUE, FALSE); gtk_cell_area_attribute_connect (cell_area, renderer, "active", GLADE_SIGNAL_COLUMN_AFTER); gtk_tree_view_column_set_cell_data_func (priv->column_after, renderer, - glade_signal_editor_data_cell_data_func, - self, NULL); - + glade_signal_editor_data_cell_data_func, + self, NULL); + /* Devhelp */ if (glade_util_have_devhelp ()) { @@ -1406,44 +1405,44 @@ glade_signal_editor_init (GladeSignalEditor *self) g_object_set (G_OBJECT (renderer), "activatable", TRUE, NULL); if (gtk_icon_theme_has_icon - (gtk_icon_theme_get_default (), GLADE_DEVHELP_ICON_NAME)) - g_object_set (G_OBJECT (renderer), "icon-name", GLADE_DEVHELP_ICON_NAME, - NULL); + (gtk_icon_theme_get_default (), GLADE_DEVHELP_ICON_NAME)) + g_object_set (G_OBJECT (renderer), "icon-name", GLADE_DEVHELP_ICON_NAME, + NULL); else - g_object_set (G_OBJECT (renderer), "icon-name", "dialog-information", NULL); + g_object_set (G_OBJECT (renderer), "icon-name", "dialog-information", NULL); g_signal_connect (G_OBJECT (renderer), "activate", - G_CALLBACK (glade_signal_editor_devhelp), self); + G_CALLBACK (glade_signal_editor_devhelp), self); gtk_cell_area_box_pack_start (GTK_CELL_AREA_BOX (cell_area), - renderer, FALSE, TRUE, FALSE); + renderer, FALSE, TRUE, FALSE); gtk_tree_view_column_set_cell_data_func (priv->column_after, renderer, - glade_signal_editor_devhelp_cell_data_func, - self, - NULL); + glade_signal_editor_devhelp_cell_data_func, + self, + NULL); } - + /* Tooltips */ gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (self->priv->signal_tree), - GLADE_SIGNAL_COLUMN_TOOLTIP); + GLADE_SIGNAL_COLUMN_TOOLTIP); /* Create scrolled window */ scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (scroll), self->priv->signal_tree); - + gtk_box_pack_start (GTK_BOX (self), scroll, TRUE, TRUE, 0); /* Dnd */ g_signal_connect_after (self->priv->signal_tree, - "drag-begin", - G_CALLBACK(glade_signal_editor_drag_begin), - self); + "drag-begin", + G_CALLBACK(glade_signal_editor_drag_begin), + self); /* Detail completion */ priv->detail_store = gtk_list_store_new (1, G_TYPE_STRING); @@ -1453,7 +1452,7 @@ glade_signal_editor_init (GladeSignalEditor *self) /* Emit created signal */ g_signal_emit_by_name (glade_app_get(), "signal-editor-created", self); - + gtk_widget_show_all (GTK_WIDGET(self)); } @@ -1533,8 +1532,8 @@ glade_signal_editor_class_init (GladeSignalEditorClass *klass) g_object_class_install_property (object_class, PROP_GLADE_WIDGET, g_param_spec_object ("glade-widget", - _("Glade Widget"), - _("The glade widget to edit signals"), - GTK_TYPE_TREE_MODEL, - G_PARAM_READWRITE)); + _("Glade Widget"), + _("The glade widget to edit signals"), + GTK_TYPE_TREE_MODEL, + G_PARAM_READWRITE)); } diff --git a/gladeui/glade-signal-editor.h b/gladeui/glade-signal-editor.h index e8fef6b4..1fb75d54 100644 --- a/gladeui/glade-signal-editor.h +++ b/gladeui/glade-signal-editor.h @@ -43,7 +43,7 @@ GType glade_signal_editor_get_type (void) G_GNUC_CONST; GladeSignalEditor *glade_signal_editor_new (void); void glade_signal_editor_load_widget (GladeSignalEditor *editor, - GladeWidget *widget); + GladeWidget *widget); GladeWidget *glade_signal_editor_get_widget (GladeSignalEditor *editor); void glade_signal_editor_enable_dnd (GladeSignalEditor *editor, gboolean enabled); diff --git a/gladeui/glade-signal-model.c b/gladeui/glade-signal-model.c index 4d1a8a40..0fc13177 100644 --- a/gladeui/glade-signal-model.c +++ b/gladeui/glade-signal-model.c @@ -50,11 +50,11 @@ enum static void gtk_tree_model_iface_init (GtkTreeModelIface *iface); static void gtk_tree_drag_source_iface_init (GtkTreeDragSourceIface *iface); static void on_glade_signal_model_added (GladeWidget *widget, const GladeSignal *signal, - GladeSignalModel *model); + GladeSignalModel *model); static void on_glade_signal_model_removed (GladeWidget *widget, const GladeSignal *signal, - GladeSignalModel *model); + GladeSignalModel *model); static void on_glade_signal_model_changed (GladeWidget *widget, const GladeSignal *signal, - GladeSignalModel *model); + GladeSignalModel *model); static void on_glade_widget_support_changed (GladeWidget *widget, GladeSignalModel *model); G_DEFINE_TYPE_WITH_CODE (GladeSignalModel, glade_signal_model, G_TYPE_OBJECT, @@ -86,11 +86,11 @@ glade_signal_model_create_widget_list (GladeSignalModel *sig_model) GladeSignalClass *signal = (GladeSignalClass *) list->data; if (!g_list_find_custom (sig_model->priv->widgets, - (gpointer) glade_signal_class_get_type (signal), (GCompareFunc) strcmp)) - { - sig_model->priv->widgets = - g_list_prepend (sig_model->priv->widgets, (gpointer) glade_signal_class_get_type (signal)); - } + (gpointer) glade_signal_class_get_type (signal), (GCompareFunc) strcmp)) + { + sig_model->priv->widgets = + g_list_prepend (sig_model->priv->widgets, (gpointer) glade_signal_class_get_type (signal)); + } } sig_model->priv->widgets = g_list_reverse (sig_model->priv->widgets); } @@ -176,18 +176,18 @@ glade_signal_model_class_init (GladeSignalModelClass *klass) object_class->get_property = glade_signal_model_get_property; g_object_class_install_property (object_class, - PROP_WIDGET, - g_param_spec_object ("widget", - "A GladeWidget", - "The GladeWidget used to query the signals", - GLADE_TYPE_WIDGET, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)); + PROP_WIDGET, + g_param_spec_object ("widget", + "A GladeWidget", + "The GladeWidget used to query the signals", + GLADE_TYPE_WIDGET, + G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, - PROP_SIGNALS, - g_param_spec_pointer ("signals", - "A GHashTable containing the widget signals", - "Use to query signals", - G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)); + PROP_SIGNALS, + g_param_spec_pointer ("signals", + "A GHashTable containing the widget signals", + "Use to query signals", + G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)); } /* @@ -203,8 +203,8 @@ GtkTreeModel * glade_signal_model_new (GladeWidget *widget, GHashTable *signals) { GObject *object = g_object_new (GLADE_TYPE_SIGNAL_MODEL, - "widget", widget, - "signals", signals, NULL); + "widget", widget, + "signals", signals, NULL); return GTK_TREE_MODEL (object); } @@ -257,30 +257,30 @@ enum static inline gboolean glade_signal_model_is_dummy_handler (GladeSignalModel *model, - GladeSignal *signal) + GladeSignal *signal) { return glade_signal_get_handler (signal) == NULL; } static GladeSignal * -glade_signal_model_get_dummy_handler (GladeSignalModel *model, +glade_signal_model_get_dummy_handler (GladeSignalModel *model, const GladeSignalClass *sig_class) { GladeSignal *signal; signal = g_hash_table_lookup (model->priv->dummy_signals, - glade_signal_class_get_name (sig_class)); + glade_signal_class_get_name (sig_class)); if (!signal) { signal = glade_signal_new (sig_class, - NULL, - NULL, - FALSE, - FALSE); + NULL, + NULL, + FALSE, + FALSE); g_hash_table_insert (model->priv->dummy_signals, - (gpointer) glade_signal_class_get_name (sig_class), - signal); + (gpointer) glade_signal_class_get_name (sig_class), + signal); glade_project_verify_signal (model->priv->widget, signal); } @@ -289,8 +289,8 @@ glade_signal_model_get_dummy_handler (GladeSignalModel *model, static void glade_signal_model_create_widget_iter (GladeSignalModel *sig_model, - const gchar *widget, - GtkTreeIter *iter) + const gchar *widget, + GtkTreeIter *iter) { iter->stamp = sig_model->priv->stamp; iter->user_data = (gpointer) widget; @@ -299,18 +299,18 @@ glade_signal_model_create_widget_iter (GladeSignalModel *sig_model, } static void -glade_signal_model_create_signal_iter (GladeSignalModel *sig_model, - const gchar *widget, +glade_signal_model_create_signal_iter (GladeSignalModel *sig_model, + const gchar *widget, const GladeSignal *signal, - GtkTreeIter *iter) + GtkTreeIter *iter) { - glade_signal_model_create_widget_iter (sig_model, widget, iter); - iter->user_data2 = GLADE_SIGNAL (signal); + glade_signal_model_create_widget_iter (sig_model, widget, iter); + iter->user_data2 = GLADE_SIGNAL (signal); } static GList * glade_signal_model_create_signal_list (GladeSignalModel *sig_model, - const gchar *widget_type) + const gchar *widget_type) { GList *widget_signals = NULL; const GList *signals; @@ -323,26 +323,26 @@ glade_signal_model_create_signal_list (GladeSignalModel *sig_model, { GladeSignalClass *sig_class = signals->data; if (g_str_equal (glade_signal_class_get_type (sig_class), widget_type)) - { - widget_signals = g_list_append (widget_signals, sig_class); - } + { + widget_signals = g_list_append (widget_signals, sig_class); + } } return widget_signals; } static void -on_glade_signal_model_added (GladeWidget *widget, +on_glade_signal_model_added (GladeWidget *widget, const GladeSignal *signal, - GladeSignalModel* model) + GladeSignalModel *model) { - GtkTreeIter iter; + GtkTreeIter iter; GtkTreePath *path; const GladeSignalClass *sig_class = glade_signal_get_class (signal); glade_signal_model_create_signal_iter (model, - glade_signal_class_get_type (sig_class), - signal, - &iter); + glade_signal_class_get_type (sig_class), + signal, + &iter); path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter); gtk_tree_model_row_inserted (GTK_TREE_MODEL (model), path, &iter); @@ -351,18 +351,18 @@ on_glade_signal_model_added (GladeWidget *widget, } static void -on_glade_signal_model_removed (GladeWidget *widget, +on_glade_signal_model_removed (GladeWidget *widget, const GladeSignal *signal, - GladeSignalModel *model) + GladeSignalModel *model) { GtkTreeIter iter; GtkTreePath *path; const GladeSignalClass *sig_class = glade_signal_get_class (signal); glade_signal_model_create_signal_iter (model, - glade_signal_class_get_type (sig_class), - signal, - &iter); + glade_signal_class_get_type (sig_class), + signal, + &iter); path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter); gtk_tree_model_row_deleted (GTK_TREE_MODEL (model), path); gtk_tree_path_free (path); @@ -379,9 +379,9 @@ on_glade_signal_model_changed (GladeWidget *widget, const GladeSignalClass *sig_class = glade_signal_get_class (signal); glade_signal_model_create_signal_iter (model, - glade_signal_class_get_type (sig_class), - signal, - &iter); + glade_signal_class_get_type (sig_class), + signal, + &iter); path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter); gtk_tree_model_row_changed (GTK_TREE_MODEL (model), path, &iter); gtk_tree_path_free (path); @@ -389,8 +389,8 @@ on_glade_signal_model_changed (GladeWidget *widget, } static void -verify_dummies (const gchar *signal_name, - GladeSignal *signal, +verify_dummies (const gchar *signal_name, + GladeSignal *signal, GladeSignalModel *model) { glade_project_verify_signal (model->priv->widget, signal); @@ -399,9 +399,9 @@ verify_dummies (const gchar *signal_name, } static void -emit_changed (const gchar *signal_name, - GPtrArray *signals, - GladeSignalModel *model) +emit_changed (const gchar *signal_name, + GPtrArray *signals, + GladeSignalModel *model) { gint i; GladeSignal *signal; @@ -425,8 +425,8 @@ on_glade_widget_support_changed (GladeWidget *widget, GladeSignalModel *model) static gboolean glade_signal_model_get_iter (GtkTreeModel *model, - GtkTreeIter *iter, - GtkTreePath *path) + GtkTreeIter *iter, + GtkTreePath *path) { gint *indices; gint depth; @@ -492,52 +492,52 @@ glade_signal_model_get_path (GtkTreeModel *model, GtkTreeIter *iter) gint index0, index1 = 0; GList *signal; GList *signals = glade_signal_model_create_signal_list (sig_model, - widget); + widget); index0 = g_list_index (sig_model->priv->widgets, - widget); + widget); for (signal = signals; signal != NULL; signal = g_list_next (signal)) - { - GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals, - glade_signal_class_get_name (signal->data)); + { + GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals, + glade_signal_class_get_name (signal->data)); - if (signal->data != sig_class) - { - if (handlers) + if (signal->data != sig_class) + { + if (handlers) index1 += handlers->len; - index1++; /* dummy_handler */ - } - else - { - if (handlers) - { - guint handler_index; - if (g_ptr_array_find (handlers, handler, &handler_index)) - index1 += handler_index; - else - index1 += handlers->len; - } - break; - } - } + index1++; /* dummy_handler */ + } + else + { + if (handlers) + { + guint handler_index; + if (g_ptr_array_find (handlers, handler, &handler_index)) + index1 += handler_index; + else + index1 += handlers->len; + } + break; + } + } return gtk_tree_path_new_from_indices (index0, index1, -1); } else if (widget) { /* Widget */ return gtk_tree_path_new_from_indices (g_list_index (sig_model->priv->widgets, - widget), -1); + widget), -1); } g_assert_not_reached(); } static void glade_signal_model_get_value (GtkTreeModel *model, - GtkTreeIter *iter, - gint column, - GValue *value) -{ + GtkTreeIter *iter, + gint column, + GValue *value) +{ const gchar *widget; GladeSignal *signal; GladeSignalModel *sig_model; @@ -550,7 +550,7 @@ glade_signal_model_get_value (GtkTreeModel *model, sig_model = GLADE_SIGNAL_MODEL (model); value = g_value_init (value, - glade_signal_model_get_column_type (model, column)); + glade_signal_model_get_column_type (model, column)); switch (column) { @@ -577,7 +577,7 @@ glade_signal_model_get_value (GtkTreeModel *model, } else if (widget) g_value_set_boolean (value, TRUE); - break; + break; case GLADE_SIGNAL_COLUMN_HANDLER: if (signal) { @@ -637,30 +637,30 @@ glade_signal_model_get_value (GtkTreeModel *model, static gboolean glade_signal_model_iter_next_signal (GladeSignalModel *sig_model, - const gchar *widget, - GtkTreeIter *iter, - GList *signal) + const gchar *widget, + GtkTreeIter *iter, + GList *signal) { if (signal->next) { signal = signal->next; GladeSignal *next_handler; GPtrArray *next_handlers = - g_hash_table_lookup (sig_model->priv->signals, - glade_signal_class_get_name (signal->data)); + g_hash_table_lookup (sig_model->priv->signals, + glade_signal_class_get_name (signal->data)); if (next_handlers && next_handlers->len) - { - next_handler = g_ptr_array_index (next_handlers, 0); - } + { + next_handler = g_ptr_array_index (next_handlers, 0); + } else - { - next_handler = - glade_signal_model_get_dummy_handler (sig_model, - signal->data); - } + { + next_handler = + glade_signal_model_get_dummy_handler (sig_model, + signal->data); + } glade_signal_model_create_signal_iter (sig_model, widget, - next_handler, - iter); + next_handler, + iter); g_list_free (signal); return TRUE; } @@ -688,54 +688,54 @@ glade_signal_model_iter_next (GtkTreeModel *model, GtkTreeIter *iter) sig_model = GLADE_SIGNAL_MODEL (model); - gtk_tree_model_iter_parent (model, &parent, iter); + gtk_tree_model_iter_parent (model, &parent, iter); if (handler) { const GladeSignalClass *sig_class = glade_signal_get_class (handler); GList *signals = - glade_signal_model_create_signal_list (sig_model, - widget); + glade_signal_model_create_signal_list (sig_model, + widget); GList* signal = g_list_find (signals, sig_class); GPtrArray* handlers = g_hash_table_lookup (sig_model->priv->signals, - glade_signal_class_get_name (sig_class)); + glade_signal_class_get_name (sig_class)); if (glade_signal_model_is_dummy_handler (sig_model, handler)) - { - return glade_signal_model_iter_next_signal (sig_model, widget, iter, signal); - } + { + return glade_signal_model_iter_next_signal (sig_model, widget, iter, signal); + } else if (handlers) - { - guint new_index = 0; - if (g_ptr_array_find (handlers, handler, &new_index)) - new_index++; - - if (new_index < handlers->len) - { - glade_signal_model_create_signal_iter (sig_model, widget, - g_ptr_array_index (handlers, new_index), - iter); - g_list_free (signals); - return TRUE; - } - else if (new_index == handlers->len) - { - glade_signal_model_create_signal_iter (sig_model, widget, - glade_signal_model_get_dummy_handler (sig_model, - sig_class), - iter); - g_list_free (signals); - return TRUE; - } - else - { - return glade_signal_model_iter_next_signal (sig_model, widget, iter, signal); - } - } + { + guint new_index = 0; + if (g_ptr_array_find (handlers, handler, &new_index)) + new_index++; + + if (new_index < handlers->len) + { + glade_signal_model_create_signal_iter (sig_model, widget, + g_ptr_array_index (handlers, new_index), + iter); + g_list_free (signals); + return TRUE; + } + else if (new_index == handlers->len) + { + glade_signal_model_create_signal_iter (sig_model, widget, + glade_signal_model_get_dummy_handler (sig_model, + sig_class), + iter); + g_list_free (signals); + return TRUE; + } + else + { + return glade_signal_model_iter_next_signal (sig_model, widget, iter, signal); + } + } else - { - g_list_free (signals); - return FALSE; - } + { + g_list_free (signals); + return FALSE; + } } else if (widget) { @@ -773,23 +773,23 @@ glade_signal_model_iter_n_children (GtkTreeModel *model, GtkTreeIter *iter) else if (widget) { GList *signals = glade_signal_model_create_signal_list (sig_model, - widget); + widget); GList *signal; gint retval = 0; for (signal = signals; signal != NULL; signal = g_list_next (signal)) - { - GPtrArray* handlers = g_hash_table_lookup (sig_model->priv->signals, - glade_signal_class_get_name (signal->data)); - if (handlers) - retval += handlers->len; - retval++; - } + { + GPtrArray* handlers = g_hash_table_lookup (sig_model->priv->signals, + glade_signal_class_get_name (signal->data)); + if (handlers) + retval += handlers->len; + retval++; + } g_list_free (signals); return retval; } - g_assert_not_reached (); + g_assert_not_reached (); } static gboolean @@ -803,9 +803,9 @@ glade_signal_model_iter_has_child (GtkTreeModel *model, GtkTreeIter *iter) static gboolean glade_signal_model_iter_nth_child (GtkTreeModel *model, - GtkTreeIter *iter, - GtkTreeIter *parent, - gint n) + GtkTreeIter *iter, + GtkTreeIter *parent, + gint n) { GladeSignal *handler; GladeSignalModel *sig_model; @@ -825,59 +825,59 @@ glade_signal_model_iter_nth_child (GtkTreeModel *model, else if (widget) { GList *signals = glade_signal_model_create_signal_list (sig_model, - widget); + widget); GList *signal; for (signal = signals; signal != NULL; signal = g_list_next (signal)) - { - GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals, - glade_signal_class_get_name (signal->data)); - if (handlers) - { - if (n >= handlers->len) - n -= handlers->len; - else - { - glade_signal_model_create_signal_iter (sig_model, - widget, - g_ptr_array_index (handlers, n), - iter); - g_list_free (signals); - return TRUE; - } - } - if (n == 0) - { - GladeSignal *handler = - glade_signal_model_get_dummy_handler (sig_model, - signal->data); - glade_signal_model_create_signal_iter (sig_model, - widget, - handler, - iter); - g_list_free (signals); - return TRUE; - } - n--; - } + { + GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals, + glade_signal_class_get_name (signal->data)); + if (handlers) + { + if (n >= handlers->len) + n -= handlers->len; + else + { + glade_signal_model_create_signal_iter (sig_model, + widget, + g_ptr_array_index (handlers, n), + iter); + g_list_free (signals); + return TRUE; + } + } + if (n == 0) + { + GladeSignal *handler = + glade_signal_model_get_dummy_handler (sig_model, + signal->data); + glade_signal_model_create_signal_iter (sig_model, + widget, + handler, + iter); + g_list_free (signals); + return TRUE; + } + n--; + } return FALSE; } else { if (g_list_length (sig_model->priv->widgets) > n) - { - glade_signal_model_create_widget_iter (sig_model, - g_list_nth_data (sig_model->priv->widgets, n), - iter); - return TRUE; - } + { + glade_signal_model_create_widget_iter (sig_model, + g_list_nth_data (sig_model->priv->widgets, n), + iter); + return TRUE; + } } return FALSE; } static gboolean glade_signal_model_iter_children (GtkTreeModel *model, - GtkTreeIter *iter, - GtkTreeIter *parent) + GtkTreeIter *iter, + GtkTreeIter *parent) { return glade_signal_model_iter_nth_child (model, iter, parent, 0); } @@ -915,7 +915,7 @@ gtk_tree_model_iface_init (GtkTreeModelIface *iface) iface->get_n_columns = glade_signal_model_get_n_columns; iface->get_iter = glade_signal_model_get_iter; iface->get_path = glade_signal_model_get_path; - iface->get_value = glade_signal_model_get_value; + iface->get_value = glade_signal_model_get_value; iface->iter_next = glade_signal_model_iter_next; iface->iter_children = glade_signal_model_iter_children; iface->iter_has_child = glade_signal_model_iter_has_child; @@ -933,11 +933,11 @@ glade_signal_model_row_draggable (GtkTreeDragSource *model, GtkTreePath *path) gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, - -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, + -1); retval = signal && !glade_signal_model_is_dummy_handler (GLADE_SIGNAL_MODEL (model), - signal); + signal); g_object_unref (signal); return retval; @@ -945,8 +945,8 @@ glade_signal_model_row_draggable (GtkTreeDragSource *model, GtkTreePath *path) static gboolean glade_signal_model_drag_data_get (GtkTreeDragSource *model, - GtkTreePath *path, - GtkSelectionData *data) + GtkTreePath *path, + GtkSelectionData *data) { GtkTreeIter iter; @@ -958,7 +958,7 @@ glade_signal_model_drag_data_get (GtkTreeDragSource *model, const gchar *user_data; gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, - GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); + GLADE_SIGNAL_COLUMN_SIGNAL, &signal, -1); user_data = glade_signal_get_userdata (signal); @@ -969,10 +969,10 @@ glade_signal_model_drag_data_get (GtkTreeDragSource *model, glade_signal_get_swapped (signal), glade_signal_get_after (signal)); gtk_selection_data_set (data, - gdk_atom_intern_static_string ("application/x-glade-signal"), - 8, - (guchar*) dnd_text, - strlen (dnd_text)); + gdk_atom_intern_static_string ("application/x-glade-signal"), + 8, + (guchar*) dnd_text, + strlen (dnd_text)); g_free (dnd_text); return TRUE; @@ -985,7 +985,7 @@ glade_signal_model_drag_data_get (GtkTreeDragSource *model, static gboolean glade_signal_model_drag_data_delete (GtkTreeDragSource *model, - GtkTreePath *path) + GtkTreePath *path) { /* We don't move rows... */ return FALSE; @@ -998,3 +998,4 @@ gtk_tree_drag_source_iface_init (GtkTreeDragSourceIface *iface) iface->drag_data_get = glade_signal_model_drag_data_get; iface->drag_data_delete = glade_signal_model_drag_data_delete; } + diff --git a/gladeui/glade-signal-model.h b/gladeui/glade-signal-model.h index 24c1e73a..10236696 100644 --- a/gladeui/glade-signal-model.h +++ b/gladeui/glade-signal-model.h @@ -64,7 +64,7 @@ struct _GladeSignalModel GType glade_signal_model_get_type (void) G_GNUC_CONST; GtkTreeModel *glade_signal_model_new (GladeWidget *widget, - GHashTable *signals); + GHashTable *signals); G_END_DECLS diff --git a/gladeui/glade-signal.c b/gladeui/glade-signal.c index cbe14305..cfb2221d 100644 --- a/gladeui/glade-signal.c +++ b/gladeui/glade-signal.c @@ -82,9 +82,10 @@ glade_signal_finalize (GObject *object) } static void -glade_signal_get_property (GObject *object, - guint prop_id, - GValue *value, GParamSpec *pspec) +glade_signal_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { GladeSignal *signal = GLADE_SIGNAL (object); @@ -118,34 +119,35 @@ glade_signal_get_property (GObject *object, } static void -glade_signal_set_property (GObject *object, - guint prop_id, - const GValue *value, GParamSpec *pspec) +glade_signal_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { GladeSignal *signal = GLADE_SIGNAL (object); switch (prop_id) { case PROP_CLASS: - signal->priv->class = g_value_get_pointer (value); + signal->priv->class = g_value_get_pointer (value); break; case PROP_DETAIL: - glade_signal_set_detail (signal, g_value_get_string (value)); + glade_signal_set_detail (signal, g_value_get_string (value)); break; case PROP_HANDLER: - glade_signal_set_handler (signal, g_value_get_string (value)); + glade_signal_set_handler (signal, g_value_get_string (value)); break; case PROP_USERDATA: - glade_signal_set_userdata (signal, g_value_get_string (value)); + glade_signal_set_userdata (signal, g_value_get_string (value)); break; case PROP_SUPPORT_WARNING: - glade_signal_set_support_warning (signal, g_value_get_string (value)); + glade_signal_set_support_warning (signal, g_value_get_string (value)); break; case PROP_AFTER: - glade_signal_set_after (signal, g_value_get_boolean (value)); + glade_signal_set_after (signal, g_value_get_boolean (value)); break; case PROP_SWAPPED: - glade_signal_set_swapped (signal, g_value_get_boolean (value)); + glade_signal_set_swapped (signal, g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -234,8 +236,8 @@ GladeSignal * glade_signal_new (const GladeSignalClass *sig_class, const gchar *handler, const gchar *userdata, - gboolean after, - gboolean swapped) + gboolean after, + gboolean swapped) { g_return_val_if_fail (sig_class != NULL, NULL); @@ -294,8 +296,8 @@ glade_signal_clone (const GladeSignal *signal) dup = glade_signal_new (signal->priv->class, signal->priv->handler, signal->priv->userdata, - signal->priv->after, - signal->priv->swapped); + signal->priv->after, + signal->priv->swapped); glade_signal_set_detail (dup, signal->priv->detail); glade_signal_set_support_warning (dup, signal->priv->support_warning); @@ -413,9 +415,9 @@ glade_signal_read (GladeXmlNode *node, GladeWidgetAdaptor *adaptor) { /* XXX These errors should be collected and reported to the user */ g_warning ("No signal %s was found for class %s, skipping\n", - name, glade_widget_adaptor_get_name (adaptor)); + name, glade_widget_adaptor_get_name (adaptor)); } - + g_free (name); g_free (handler); g_free (userdata); @@ -434,7 +436,7 @@ glade_signal_get_name (const GladeSignal *signal) G_CONST_RETURN GladeSignalClass * glade_signal_get_class (const GladeSignal *signal) { - return signal->priv->class; + return signal->priv->class; } void diff --git a/gladeui/glade-signal.h b/gladeui/glade-signal.h index 763095d3..2698d2a9 100644 --- a/gladeui/glade-signal.h +++ b/gladeui/glade-signal.h @@ -37,38 +37,38 @@ struct _GladeSignalKlass { GType glade_signal_get_type (void) G_GNUC_CONST; 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); GladeSignal *glade_signal_clone (const GladeSignal *signal); gboolean glade_signal_equal (const GladeSignal *sig1, - const GladeSignal *sig2); + const GladeSignal *sig2); GladeSignal *glade_signal_read (GladeXmlNode *node, GladeWidgetAdaptor *adaptor); void glade_signal_write (GladeSignal *signal, - GladeXmlContext *context, - GladeXmlNode *node); + GladeXmlContext *context, + GladeXmlNode *node); G_CONST_RETURN gchar *glade_signal_get_name (const GladeSignal *signal); G_CONST_RETURN GladeSignalClass *glade_signal_get_class (const GladeSignal * signal); void glade_signal_set_detail (GladeSignal *signal, - const gchar *detail); + const gchar *detail); G_CONST_RETURN gchar *glade_signal_get_detail (const GladeSignal *signal); void glade_signal_set_handler (GladeSignal *signal, - const gchar *handler); + const gchar *handler); G_CONST_RETURN gchar *glade_signal_get_handler (const GladeSignal *signal); void glade_signal_set_userdata (GladeSignal *signal, - const gchar *userdata); + const gchar *userdata); G_CONST_RETURN gchar *glade_signal_get_userdata (const GladeSignal *signal); void glade_signal_set_after (GladeSignal *signal, - gboolean after); + gboolean after); gboolean glade_signal_get_after (const GladeSignal *signal); void glade_signal_set_swapped (GladeSignal *signal, - gboolean swapped); + gboolean swapped); gboolean glade_signal_get_swapped (const GladeSignal *signal); void glade_signal_set_support_warning (GladeSignal *signal, - const gchar *support_warning); + const gchar *support_warning); G_CONST_RETURN gchar *glade_signal_get_support_warning (const GladeSignal *signal); G_END_DECLS diff --git a/gladeui/glade-utils.c b/gladeui/glade-utils.c index c6c99b19..6d9fa226 100644 --- a/gladeui/glade-utils.c +++ b/gladeui/glade-utils.c @@ -137,7 +137,7 @@ glade_util_get_type_from_name (const gchar *name, gboolean have_func) } if (!have_func) - g_free (func_name); + g_free (func_name); } if (type == 0) @@ -308,10 +308,10 @@ glade_util_check_and_warn_scrollable (GladeWidget *parent, glade_util_ui_message (parent_widget, GLADE_UI_INFO, NULL, _("Cannot add non scrollable %s widget to a %s directly.\n" - "Add a %s first."), - glade_widget_adaptor_get_title (child_adaptor), + "Add a %s first."), + glade_widget_adaptor_get_title (child_adaptor), glade_widget_adaptor_get_title (parent_adaptor), - glade_widget_adaptor_get_title (vadaptor)); + glade_widget_adaptor_get_title (vadaptor)); return TRUE; } return FALSE; @@ -564,7 +564,7 @@ _glade_util_strreplace (gchar *str, if (free_str) g_free (str); - + return retval; } @@ -679,7 +679,7 @@ glade_util_count_placeholders (GladeWidget *parent) /* count placeholders */ if ((children = glade_widget_adaptor_get_children (glade_widget_get_adaptor (parent), - glade_widget_get_object (parent))) != NULL) + glade_widget_get_object (parent))) != NULL) { for (list = children; list && list->data; list = list->next) { @@ -873,10 +873,10 @@ glade_util_canonical_path (const gchar *path) if (g_chdir (dirname) == 0) { if ((direct_dir = g_get_current_dir ()) != NULL) - { - direct_name = g_build_filename (direct_dir, basename, NULL); - g_free (direct_dir); - } + { + direct_name = g_build_filename (direct_dir, basename, NULL); + g_free (direct_dir); + } else g_warning ("g_path"); @@ -2025,10 +2025,10 @@ glade_utils_pointer_mode_render_icon (GladePointerMode mode, GtkIconSize size) */ void glade_utils_get_pointer (GtkWidget *widget, - GdkWindow *window, - GdkDevice *device, - gint *x, - gint *y) + GdkWindow *window, + GdkDevice *device, + gint *x, + gint *y) { gint device_x = 0, device_y = 0; gint final_x = 0, final_y = 0; @@ -2059,7 +2059,7 @@ glade_utils_get_pointer (GtkWidget *widget, gtk_widget_translate_coordinates (event_widget, widget, device_x, device_y, - &final_x, &final_y); + &final_x, &final_y); } else { @@ -2080,8 +2080,8 @@ glade_utils_get_pointer (GtkWidget *widget, */ static gint abort_scroll_events (GtkWidget *widget, - GdkEvent *event, - gpointer user_data) + GdkEvent *event, + gpointer user_data) { GtkWidget *parent = gtk_widget_get_parent (widget); @@ -2104,7 +2104,7 @@ glade_util_remove_scroll_events (GtkWidget *widget) gtk_widget_set_events (widget, events); g_signal_connect (G_OBJECT (widget), "scroll-event", - G_CALLBACK (abort_scroll_events), NULL); + G_CALLBACK (abort_scroll_events), NULL); } /** diff --git a/gladeui/glade-utils.h b/gladeui/glade-utils.h index e5d928d6..54204b04 100644 --- a/gladeui/glade-utils.h +++ b/gladeui/glade-utils.h @@ -26,20 +26,20 @@ typedef enum /* UI interaction */ gboolean glade_util_ui_message (GtkWidget *parent, - GladeUIMessageType type, - GtkWidget *widget, - const gchar *format, + GladeUIMessageType type, + GtkWidget *widget, + const gchar *format, ...) G_GNUC_PRINTF (4, 5); -void glade_util_flash_message (GtkWidget *statusbar, - guint context_id, - gchar *format, +void glade_util_flash_message (GtkWidget *statusbar, + guint context_id, + gchar *format, ...) G_GNUC_PRINTF (3, 4); gboolean glade_util_url_show (const gchar *url); GtkWidget *glade_util_file_dialog_new (const gchar *title, - GladeProject *project, - GtkWindow *parent, - GladeUtilFileDialogType action); + GladeProject *project, + GtkWindow *parent, + GladeUtilFileDialogType action); /* Strings */ gint glade_util_compare_stock_labels (gconstpointer a, gconstpointer b); @@ -51,7 +51,7 @@ gchar *glade_util_duplicate_underscores (const gchar *name); /* GModule stuff */ -GType glade_util_get_type_from_name (const gchar *name, gboolean have_func); +GType glade_util_get_type_from_name (const gchar *name, gboolean have_func); GParamSpec *glade_utils_get_pspec_from_funcname (const gchar *funcname); GModule *glade_util_load_library (const gchar *library_name); @@ -64,18 +64,18 @@ gchar *glade_utils_flags_string_from_value (GType enum_type, gint val gchar *glade_utils_flags_string_from_value_displayable (GType flags_type, gint value); gchar *glade_utils_enum_string_from_value_displayable (GType flags_type, gint value); GValue *glade_utils_value_from_string (GType type, - const gchar *string, - GladeProject *project); + const gchar *string, + GladeProject *project); gchar *glade_utils_string_from_value (const GValue *value); gboolean glade_utils_boolean_from_string (const gchar *string, - gboolean *value); + gboolean *value); /* Devhelp */ gboolean glade_util_have_devhelp (void); GtkWidget *glade_util_get_devhelp_icon (GtkIconSize size); void glade_util_search_devhelp (const gchar *book, - const gchar *page, - const gchar *search); + const gchar *page, + const gchar *search); /* Files/Filenames*/ gchar *glade_utils_replace_home_dir_with_tilde (const gchar *path); @@ -87,51 +87,51 @@ gchar *glade_util_icon_name_to_filename (const gchar *value); /* Cairo utilities */ void glade_utils_cairo_draw_line (cairo_t *cr, - GdkColor *color, - gint x1, - gint y1, - gint x2, - gint y2); + GdkColor *color, + gint x1, + gint y1, + gint x2, + gint y2); void glade_utils_cairo_draw_rectangle (cairo_t *cr, - GdkColor *color, - gboolean filled, - gint x, - gint y, - gint width, - gint height); + GdkColor *color, + gboolean filled, + gint x, + gint y, + gint width, + gint height); /* Lists */ GList *glade_util_purify_list (GList *list); GList *glade_util_added_in_list (GList *old_list, - GList *new_list); + GList *new_list); GList *glade_util_removed_from_list (GList *old_list, - GList *new_list); + GList *new_list); /* Other utilities */ GtkListStore *glade_utils_liststore_from_enum_type (GType enum_type, gboolean include_empty); gint glade_utils_hijack_key_press (GtkWindow *win, - GdkEventKey *event, - gpointer user_data); + GdkEventKey *event, + gpointer user_data); gboolean glade_util_check_and_warn_scrollable (GladeWidget *parent, - GladeWidgetAdaptor *child_adaptor, - GtkWidget *parent_widget); + GladeWidgetAdaptor *child_adaptor, + GtkWidget *parent_widget); GList *glade_util_container_get_all_children (GtkContainer *container); gint glade_util_count_placeholders (GladeWidget *parent); GtkTreeIter *glade_util_find_iter_by_widget (GtkTreeModel *model, - GladeWidget *findme, - gint column); + GladeWidget *findme, + gint column); GtkWidget *glade_util_get_placeholder_from_pointer (GtkContainer *container); gboolean glade_util_object_is_loading (GObject *object); GdkPixbuf *glade_utils_pointer_mode_render_icon (GladePointerMode mode, GtkIconSize size); void glade_utils_get_pointer (GtkWidget *widget, - GdkWindow *window, - GdkDevice *device, - gint *x, - gint *y); + GdkWindow *window, + GdkDevice *device, + gint *x, + gint *y); void glade_util_remove_scroll_events (GtkWidget *widget); diff --git a/gladeui/glade-widget-action.c b/gladeui/glade-widget-action.c index 478652c0..cf9f58bb 100644 --- a/gladeui/glade-widget-action.c +++ b/gladeui/glade-widget-action.c @@ -107,7 +107,7 @@ glade_widget_action_constructor (GType type, NULL); action->priv->actions = g_list_prepend (action->priv->actions, - GLADE_WIDGET_ACTION (obj)); + GLADE_WIDGET_ACTION (obj)); } action->priv->actions = g_list_reverse (action->priv->actions); @@ -231,7 +231,7 @@ glade_widget_action_get_sensitive (GladeWidgetAction *action) void glade_widget_action_set_visible (GladeWidgetAction *action, - gboolean visible) + gboolean visible) { g_return_if_fail (GLADE_IS_WIDGET_ACTION (action)); @@ -348,7 +348,7 @@ glade_widget_action_class_free (GWActionClass *action) void glade_widget_action_class_set_label (GWActionClass *action, - const gchar *label) + const gchar *label) { g_free (action->label); action->label = g_strdup (label); @@ -356,7 +356,7 @@ glade_widget_action_class_set_label (GWActionClass *action, void glade_widget_action_class_set_stock (GWActionClass *action, - const gchar *stock) + const gchar *stock) { g_free (action->stock); action->stock = g_strdup (stock); @@ -364,7 +364,7 @@ glade_widget_action_class_set_stock (GWActionClass *action, void glade_widget_action_class_set_important (GWActionClass *action, - gboolean important) + gboolean important) { action->important = important; } diff --git a/gladeui/glade-widget-action.h b/gladeui/glade-widget-action.h index ef9ef213..b320d5b3 100644 --- a/gladeui/glade-widget-action.h +++ b/gladeui/glade-widget-action.h @@ -41,10 +41,10 @@ typedef struct _GWActionClass GWActionClass; struct _GWActionClass { const gchar *id; /* The identifier of this action in the action tree */ - gchar *path; /* Full action path */ + gchar *path; /* Full action path */ gchar *label; /* A translated label to show in the UI for this action */ gchar *stock; /* If set, this stock item will be shown in the UI along side - * the label */ + * the label */ gboolean important; /* If this action is important */ GList *actions;/* Recursive list of child actions */ @@ -71,10 +71,10 @@ struct _GladeWidgetActionClass GType glade_widget_action_get_type (void) G_GNUC_CONST; void glade_widget_action_set_sensitive (GladeWidgetAction *action, - gboolean sensitive); + gboolean sensitive); gboolean glade_widget_action_get_sensitive (GladeWidgetAction *action); void glade_widget_action_set_visible (GladeWidgetAction *action, - gboolean visible); + gboolean visible); gboolean glade_widget_action_get_visible (GladeWidgetAction *action); GList *glade_widget_action_get_children (GladeWidgetAction *action); GWActionClass *glade_widget_action_get_class (GladeWidgetAction *action); @@ -84,11 +84,11 @@ GWActionClass *glade_widget_action_class_new (const gchar *path); GWActionClass *glade_widget_action_class_clone (GWActionClass *action); void glade_widget_action_class_free (GWActionClass *action); void glade_widget_action_class_set_label (GWActionClass *action, - const gchar *label); + const gchar *label); void glade_widget_action_class_set_stock (GWActionClass *action, - const gchar *stock); + const gchar *stock); void glade_widget_action_class_set_important (GWActionClass *action, - gboolean important); + gboolean important); G_END_DECLS diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c index e33f6ffa..17333b4d 100644 --- a/gladeui/glade-widget-adaptor.c +++ b/gladeui/glade-widget-adaptor.c @@ -62,44 +62,44 @@ struct _GladeWidgetAdaptorPrivate gchar *name; /* Name of the widget, for example GtkButton */ gchar *generic_name; /* Used to generate names of new widgets, for - * example "button" so that we generate button1, - * button2, buttonX .. - */ + * example "button" so that we generate button1, + * button2, buttonX .. + */ gchar *icon_name; /* icon name to use for widget class */ gchar *missing_icon; /* the name of the missing icon if it was not found */ gchar *title; /* Translated class name used in the UI */ GList *properties; /* List of GladePropertyClass objects. - * [see glade-property.h] this list contains - * properties about the widget that we are going - * to modify. Like "title", "label", "rows" . - * Each property creates an input in the propety - * editor. - */ + * [see glade-property.h] this list contains + * properties about the widget that we are going + * to modify. Like "title", "label", "rows" . + * Each property creates an input in the propety + * editor. + */ GList *packing_props; /* List of GladePropertyClass objects that describe - * properties for child objects packing definition - - * note there may be more than one type of child supported - * by a widget and thus they may have different sets - * of properties for each type - this association is - * managed on the GladePropertyClass proper. - */ + * properties for child objects packing definition - + * note there may be more than one type of child supported + * by a widget and thus they may have different sets + * of properties for each type - this association is + * managed on the GladePropertyClass proper. + */ GList *signals; /* List of GladeSignalClass objects */ GList *child_packings; /* Default packing property values */ GList *actions; /* A list of GWActionClass */ GList *packing_actions; /* A list of GWActionClass for child objects */ GList *internal_children; /* A list of GladeInternalChild */ gchar *catalog; /* The name of the widget catalog this class - * was declared by. - */ + * was declared by. + */ gchar *book; /* DevHelp search namespace for this widget class - */ + */ GdkCursor *cursor; /* a cursor for inserting widgets */ gchar *special_child_type; /* Special case code for children that - * are special children (like notebook tab - * widgets for example). - */ + * are special children (like notebook tab + * widgets for example). + */ gboolean query; /* Do we have to query the user, see glade_widget_adaptor_query() */ }; @@ -313,7 +313,7 @@ gwa_signal_comp (gpointer a, gpointer b) GladeSignalClass *signal_a = a, *signal_b = b; return strcmp (glade_signal_class_get_name (signal_b), - glade_signal_class_get_name (signal_a)); + glade_signal_class_get_name (signal_a)); } static gint @@ -339,8 +339,8 @@ gwa_add_signals (GladeWidgetAdaptor *adaptor, GList **signals, GType type) for (count = 0; count < num_signals; count++) { signal = glade_signal_class_new (type_adaptor ? - type_adaptor : adaptor, - type, sig_ids[count]); + type_adaptor : adaptor, + type, sig_ids[count]); list = g_list_prepend (list, signal); } @@ -396,7 +396,7 @@ gwa_clone_parent_properties (GladeWidgetAdaptor *adaptor, gboolean is_packing) { GladePropertyClass *pclass = glade_property_class_clone (list->data, reset_version); - glade_property_class_set_adaptor (pclass, adaptor); + glade_property_class_set_adaptor (pclass, adaptor); properties = g_list_prepend (properties, pclass); } @@ -485,7 +485,7 @@ gwa_setup_properties (GladeWidgetAdaptor *adaptor, { GladePropertyClass *property_class = l->data; - glade_property_class_set_is_packing (property_class, TRUE); + glade_property_class_set_is_packing (property_class, TRUE); } } } @@ -539,25 +539,25 @@ gwa_inherit_signals (GladeWidgetAdaptor *adaptor) signal = list->data; if ((node = g_list_find_custom (parent_adaptor->priv->signals, - glade_signal_class_get_name (signal), - (GCompareFunc) gwa_signal_find_comp)) != NULL) + glade_signal_class_get_name (signal), + (GCompareFunc) gwa_signal_find_comp)) != NULL) { parent_signal = node->data; /* XXX FIXME: This is questionable, why should derived catalogs - * reset the derived signal versions ??? - * - * Reset versioning in derived catalogs just once - */ + * reset the derived signal versions ??? + * + * Reset versioning in derived catalogs just once + */ if (strcmp (adaptor->priv->catalog, parent_adaptor->priv->catalog)) - glade_signal_class_set_since (signal, 0, 0); + glade_signal_class_set_since (signal, 0, 0); else - glade_signal_class_set_since (signal, - glade_signal_class_since_major (parent_signal), - glade_signal_class_since_minor (parent_signal)); + glade_signal_class_set_since (signal, + glade_signal_class_since_major (parent_signal), + glade_signal_class_since_minor (parent_signal)); - glade_signal_class_set_deprecated (signal, glade_signal_class_deprecated (parent_signal)); + glade_signal_class_set_deprecated (signal, glade_signal_class_deprecated (parent_signal)); } } } @@ -825,18 +825,18 @@ glade_widget_adaptor_real_set_property (GObject *object, break; case PROP_CATALOG: /* assume once (construct-only) */ - g_free (adaptor->priv->catalog); + g_free (adaptor->priv->catalog); adaptor->priv->catalog = g_value_dup_string (value); break; case PROP_BOOK: /* assume once (construct-only) */ - g_free (adaptor->priv->book); + g_free (adaptor->priv->book); adaptor->priv->book = g_value_dup_string (value); break; case PROP_SPECIAL_TYPE: /* assume once (construct-only) */ - g_free (adaptor->priv->special_child_type); - adaptor->priv->special_child_type = g_value_dup_string (value); + g_free (adaptor->priv->special_child_type); + adaptor->priv->special_child_type = g_value_dup_string (value); break; case PROP_QUERY: adaptor->priv->query = g_value_get_boolean (value); @@ -918,7 +918,7 @@ glade_widget_adaptor_object_construct_object (GladeWidgetAdaptor *adaptor, static void glade_widget_adaptor_object_destroy_object (GladeWidgetAdaptor *adaptor, - GObject *object) + GObject *object) { /* Do nothing, just have a method here incase classes chain up */ } @@ -941,15 +941,15 @@ glade_widget_adaptor_object_get_internal_child (GladeWidgetAdaptor *adaptor, static gboolean glade_widget_adaptor_object_add_verify (GladeWidgetAdaptor *adaptor, - GObject *parent, - GObject *child, - gboolean user_feedback) + GObject *parent, + GObject *child, + gboolean user_feedback) { if (user_feedback) glade_util_ui_message (glade_app_get_window (), - GLADE_UI_INFO, NULL, - _("%s does not support adding any children."), - adaptor->priv->title); + GLADE_UI_INFO, NULL, + _("%s does not support adding any children."), + adaptor->priv->title); return FALSE; } @@ -1080,16 +1080,16 @@ glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor *adaptor, GladePropertyClass *klass = glade_property_get_class (property); if (glade_property_class_save (klass) && - glade_property_get_enabled (property)) + glade_property_get_enabled (property)) glade_property_write (GLADE_PROPERTY (props->data), context, node); } } static void glade_widget_adaptor_object_write_widget_after (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node) + GladeWidget *widget, + GladeXmlContext *context, + GladeXmlNode *node) { } @@ -1115,15 +1115,15 @@ glade_widget_adaptor_object_read_child (GladeWidgetAdaptor *adaptor, glade_xml_search_child (node, GLADE_XML_TAG_WIDGET)) != NULL) { child_widget = - glade_widget_read (glade_widget_get_project (widget), - widget, widget_node, internal_name); + glade_widget_read (glade_widget_get_project (widget), + widget, widget_node, internal_name); if (child_widget) { if (!internal_name) { glade_widget_set_child_type_from_node - (widget, glade_widget_get_object (child_widget), node); + (widget, glade_widget_get_object (child_widget), node); glade_widget_add_child (widget, child_widget, FALSE); } @@ -1152,7 +1152,7 @@ glade_widget_adaptor_object_read_child (GladeWidgetAdaptor *adaptor, glade_widget_get_pack_property (child_widget, prop_name)) != NULL) glade_property_read (property, - glade_widget_get_project (child_widget), + glade_widget_get_project (child_widget), iter_node); g_free (prop_name); @@ -1202,14 +1202,14 @@ glade_widget_adaptor_object_write_child (GladeWidgetAdaptor *adaptor, GladePropertyClass *klass = glade_property_get_class (property); if (glade_property_class_save (klass) && - glade_property_get_enabled (property)) + glade_property_get_enabled (property)) glade_property_write (GLADE_PROPERTY (props->data), context, packing_node); } glade_widget_write_special_child_prop (glade_widget_get_parent (widget), glade_widget_get_object (widget), - context, child_node); + context, child_node); /* Default packing properties and such are not saved, * so lets check afterwords if there was anything saved @@ -1242,7 +1242,7 @@ glade_widget_adaptor_get_eprop_type (GParamSpec *pspec) else if (G_IS_PARAM_SPEC_BOXED (pspec)) { if (pspec->value_type == GDK_TYPE_COLOR || - pspec->value_type == GDK_TYPE_RGBA) + pspec->value_type == GDK_TYPE_RGBA) type = GLADE_TYPE_EPROP_COLOR; else if (pspec->value_type == G_TYPE_STRV) type = GLADE_TYPE_EPROP_TEXT; @@ -2097,9 +2097,9 @@ gwa_update_properties_from_node (GladeWidgetAdaptor *adaptor, } if ((updated = glade_property_class_update_from_node (child, - adaptor->priv->type, - &property_class, - domain)) == FALSE) + adaptor->priv->type, + &property_class, + domain)) == FALSE) { g_warning ("failed to update %s property of %s from xml", id, adaptor->priv->name); @@ -2280,7 +2280,7 @@ gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor, { property_class = glade_property_class_new (adaptor, spec->name); - glade_property_class_set_pspec (property_class, spec); + glade_property_class_set_pspec (property_class, spec); /* Make sure we can tell properties apart by there * owning class. @@ -2288,17 +2288,17 @@ gwa_update_properties_from_type (GladeWidgetAdaptor *adaptor, spec->owner_type = adaptor->priv->type; /* Disable properties by default since the does not really implement them */ - glade_property_class_set_virtual (property_class, TRUE); - glade_property_class_set_ignore (property_class, TRUE); + glade_property_class_set_virtual (property_class, TRUE); + glade_property_class_set_ignore (property_class, TRUE); - glade_property_class_set_tooltip (property_class, g_param_spec_get_blurb (spec)); - glade_property_class_set_name (property_class, g_param_spec_get_nick (spec)); + glade_property_class_set_tooltip (property_class, g_param_spec_get_blurb (spec)); + glade_property_class_set_name (property_class, g_param_spec_get_nick (spec)); if (spec->flags & G_PARAM_CONSTRUCT_ONLY) - glade_property_class_set_construct_only (property_class, TRUE); + glade_property_class_set_construct_only (property_class, TRUE); - glade_property_class_load_defaults_from_spec (property_class); - glade_property_class_set_is_packing (property_class, is_packing); + glade_property_class_load_defaults_from_spec (property_class); + glade_property_class_set_is_packing (property_class, is_packing); *properties = g_list_append (*properties, property_class); } @@ -2371,8 +2371,8 @@ gwa_action_update_from_node (GladeWidgetAdaptor *adaptor, static void gwa_set_signals_from_node (GladeWidgetAdaptor *adaptor, - GladeXmlNode *node, - const gchar *domain) + GladeXmlNode *node, + const gchar *domain) { GladeXmlNode *child; GladeSignalClass *signal; @@ -2394,7 +2394,7 @@ gwa_set_signals_from_node (GladeWidgetAdaptor *adaptor, { signal = list->data; - glade_signal_class_update_from_node (signal, child, domain); + glade_signal_class_update_from_node (signal, child, domain); } g_free (id); } @@ -2528,7 +2528,7 @@ gwa_displayable_values_check (GladeWidgetAdaptor *adaptor, gboolean packing) GParamSpec *pspec = glade_property_class_get_pspec (klass); if (adaptor->priv->type == pspec->owner_type && - glade_property_class_is_visible (klass) && + glade_property_class_is_visible (klass) && (G_IS_PARAM_SPEC_ENUM (pspec) || G_IS_PARAM_SPEC_FLAGS (pspec)) && !glade_type_has_displayable_values (pspec->value_type) && @@ -2536,10 +2536,10 @@ gwa_displayable_values_check (GladeWidgetAdaptor *adaptor, gboolean packing) pspec->value_type != GLADE_TYPE_STOCK_IMAGE) { /* We do not need displayable values if the property is not visible */ - if (g_getenv (GLADE_ENV_TESTING) == NULL) - g_message ("No displayable values for %sproperty %s::%s", - (packing) ? "child " : "", adaptor->priv->name, - glade_property_class_id (klass)); + if (g_getenv (GLADE_ENV_TESTING) == NULL) + g_message ("No displayable values for %sproperty %s::%s", + (packing) ? "child " : "", adaptor->priv->name, + glade_property_class_id (klass)); } } } @@ -2603,19 +2603,19 @@ generate_deprecated_icon (const gchar *icon_name) filename = g_build_filename (glade_app_get_pixmaps_dir (), "deprecated-16x16.png", NULL); if ((deprecated_pixbuf[0] = gdk_pixbuf_new_from_file (filename, &error)) == NULL) - { - g_warning ("Unable to render deprecated icon: %s", error->message); - error = (g_error_free (error), NULL); - } + { + g_warning ("Unable to render deprecated icon: %s", error->message); + error = (g_error_free (error), NULL); + } g_free (filename); filename = g_build_filename (glade_app_get_pixmaps_dir (), "deprecated-22x22.png", NULL); if ((deprecated_pixbuf[1] = gdk_pixbuf_new_from_file (filename, &error)) == NULL) - { - g_warning ("Unable to render deprecated icon: %s", error->message); - error = (g_error_free (error), NULL); - } + { + g_warning ("Unable to render deprecated icon: %s", error->message); + error = (g_error_free (error), NULL); + } g_free (filename); } @@ -2625,7 +2625,7 @@ generate_deprecated_icon (const gchar *icon_name) /* Load pixbuf's for the current icons */ if ((orig_pixbuf[0] = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), - icon_name, 16, 0, &error)) == NULL) + icon_name, 16, 0, &error)) == NULL) { g_warning ("Unable to render icon %s at size 16: %s", icon_name, error->message); error = (g_error_free (error), NULL); @@ -2639,7 +2639,7 @@ generate_deprecated_icon (const gchar *icon_name) if ((orig_pixbuf[1] = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), - icon_name, 22, 0, &error)) == NULL) + icon_name, 22, 0, &error)) == NULL) { g_warning ("Unable to render icon %s at size 22: %s", icon_name, error->message); error = (g_error_free (error), NULL); @@ -2656,12 +2656,12 @@ generate_deprecated_icon (const gchar *icon_name) if (!gtk_icon_theme_has_icon (gtk_icon_theme_get_default (), deprecated)) { if (orig_pixbuf[0]) - gdk_pixbuf_composite (deprecated_pixbuf[0], orig_pixbuf[0], - 0, 0, 16, 16, 0, 0, 1, 1, GDK_INTERP_NEAREST, 255); + gdk_pixbuf_composite (deprecated_pixbuf[0], orig_pixbuf[0], + 0, 0, 16, 16, 0, 0, 1, 1, GDK_INTERP_NEAREST, 255); if (orig_pixbuf[1]) - gdk_pixbuf_composite (deprecated_pixbuf[1], orig_pixbuf[1], - 0, 0, 22, 22, 0, 0, 1, 1, GDK_INTERP_NEAREST, 255); + gdk_pixbuf_composite (deprecated_pixbuf[1], orig_pixbuf[1], + 0, 0, 22, 22, 0, 0, 1, 1, GDK_INTERP_NEAREST, 255); gtk_icon_theme_add_builtin_icon (deprecated, 16, orig_pixbuf[0]); gtk_icon_theme_add_builtin_icon (deprecated, 22, orig_pixbuf[1]); @@ -3216,7 +3216,7 @@ glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor, */ if (pclass == NULL || /* Unaccounted for in the builder */ glade_property_class_get_virtual (pclass) || /* should not be set before - GladeWidget wrapper exists */ + GladeWidget wrapper exists */ glade_property_class_get_ignore (pclass)) /* Catalog explicitly ignores the object */ continue; @@ -3238,8 +3238,8 @@ glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor, } if (g_param_values_cmp (pspec[i], - glade_property_class_get_default (pclass), - glade_property_class_get_original_default (pclass)) == 0) + glade_property_class_get_default (pclass), + glade_property_class_get_original_default (pclass)) == 0) continue; parameter.name = pspec[i]->name; /* These are not copied/freed */ @@ -3288,7 +3288,7 @@ glade_widget_adaptor_construct_object (GladeWidgetAdaptor *adaptor, */ void glade_widget_adaptor_destroy_object (GladeWidgetAdaptor *adaptor, - GObject *object) + GObject *object) { g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor)); @@ -3503,9 +3503,9 @@ glade_widget_adaptor_verify_property (GladeWidgetAdaptor *adaptor, */ gboolean glade_widget_adaptor_add_verify (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child, - gboolean user_feedback) + GObject *container, + GObject *child, + gboolean user_feedback) { g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE); g_return_val_if_fail (G_IS_OBJECT (container), FALSE); @@ -3895,7 +3895,7 @@ glade_widget_adaptor_action_add_real (GList **list, const gchar *action_path, const gchar *label, const gchar *stock, - gboolean important) + gboolean important) { GWActionClass *action, *group; const gchar *id; @@ -4062,7 +4062,7 @@ glade_widget_adaptor_actions_new (GladeWidgetAdaptor *adaptor) { GWActionClass *action = l->data; GObject *obj = g_object_new (GLADE_TYPE_WIDGET_ACTION, - "class", action, NULL); + "class", action, NULL); list = g_list_prepend (list, GLADE_WIDGET_ACTION (obj)); } @@ -4251,16 +4251,16 @@ 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)); g_return_if_fail (node != NULL); GLADE_WIDGET_ADAPTOR_GET_CLASS (adaptor)->write_widget_after (adaptor, widget, - context, node); + context, node); } diff --git a/gladeui/glade-widget-adaptor.h b/gladeui/glade-widget-adaptor.h index 69d89af2..04797f19 100644 --- a/gladeui/glade-widget-adaptor.h +++ b/gladeui/glade-widget-adaptor.h @@ -59,9 +59,9 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass; * Evaluates to %TRUE if @adaptor is available in its owning library version-@major_verion.@minor_version. * */ -#define GWA_VERSION_CHECK(adaptor, major_version, minor_version) \ - ((GWA_VERSION_SINCE_MAJOR (adaptor) == major_version) ? \ - (GWA_VERSION_SINCE_MINOR (adaptor) <= minor_version) : \ +#define GWA_VERSION_CHECK(adaptor, major_version, minor_version) \ + ((GWA_VERSION_SINCE_MAJOR (adaptor) == major_version) ? \ + (GWA_VERSION_SINCE_MINOR (adaptor) <= minor_version) : \ (GWA_VERSION_SINCE_MAJOR (adaptor) <= major_version)) /** @@ -91,11 +91,11 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass; * Evaluates to %TRUE if @adaptor is deprecated in its owning library version-@major_verion.@minor_version. * */ -#define GWA_DEPRECATED_SINCE_CHECK(adaptor, major_version, minor_version) \ +#define GWA_DEPRECATED_SINCE_CHECK(adaptor, major_version, minor_version) \ ((GWA_DEPRECATED_SINCE_MAJOR (adaptor) || GWA_DEPRECATED_SINCE_MINOR (adaptor)) ? \ - ((GWA_DEPRECATED_SINCE_MAJOR (adaptor) == major_version) ? \ - (GWA_DEPRECATED_SINCE_MINOR (adaptor) <= minor_version) : \ - (GWA_DEPRECATED_SINCE_MAJOR (adaptor) <= major_version)) : \ + ((GWA_DEPRECATED_SINCE_MAJOR (adaptor) == major_version) ? \ + (GWA_DEPRECATED_SINCE_MINOR (adaptor) <= minor_version) : \ + (GWA_DEPRECATED_SINCE_MAJOR (adaptor) <= major_version)) : \ FALSE) /** @@ -147,11 +147,11 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass; * * Checks whether this is a GtkWidgetClass with scrolling capabilities. */ -#define GWA_SCROLLABLE_WIDGET(obj) \ - ((obj) ? \ - g_type_is_a (glade_widget_adaptor_get_object_type \ - (GLADE_WIDGET_ADAPTOR (obj)), \ - GTK_TYPE_SCROLLABLE) : FALSE) +#define GWA_SCROLLABLE_WIDGET(obj) \ + ((obj) ? \ + g_type_is_a (glade_widget_adaptor_get_object_type \ + (GLADE_WIDGET_ADAPTOR (obj)), \ + GTK_TYPE_SCROLLABLE) : FALSE) /** * GWA_GET_CLASS: @@ -160,8 +160,8 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass; * Shorthand for referencing glade adaptor classes from * the plugin eg. GWA_GET_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor... */ -#define GWA_GET_CLASS(type) \ - (((type) == G_TYPE_OBJECT) ? \ +#define GWA_GET_CLASS(type) \ + (((type) == G_TYPE_OBJECT) ? \ (GladeWidgetAdaptorClass *)g_type_class_peek (GLADE_TYPE_WIDGET_ADAPTOR) : \ GLADE_WIDGET_ADAPTOR_GET_CLASS (glade_widget_adaptor_get_by_type(type))) @@ -204,11 +204,11 @@ typedef struct _GladeWidgetAdaptorClass GladeWidgetAdaptorClass; */ typedef enum { - GLADE_CREATE_USER = 0, - GLADE_CREATE_COPY, - GLADE_CREATE_LOAD, - GLADE_CREATE_REBUILD, - GLADE_CREATE_REASONS + GLADE_CREATE_USER = 0, + GLADE_CREATE_COPY, + GLADE_CREATE_LOAD, + GLADE_CREATE_REBUILD, + GLADE_CREATE_REASONS } GladeCreateReason; /** @@ -224,8 +224,8 @@ typedef enum * Returns: A newly created #GladeWidget for the said adaptor. */ typedef GladeWidget * (* GladeCreateWidgetFunc) (GladeWidgetAdaptor *adaptor, - const gchar *first_property_name, - va_list var_args); + const gchar *first_property_name, + va_list var_args); /** * GladeSetPropertyFunc: @@ -240,9 +240,9 @@ typedef GladeWidget * (* GladeCreateWidgetFunc) (GladeWidgetAdaptor *adaptor, * Sets @value on @object for a given #GladePropertyClass */ typedef void (* GladeSetPropertyFunc) (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *property_name, - const GValue *value); + GObject *object, + const gchar *property_name, + const GValue *value); /** * GladeGetPropertyFunc: @@ -254,9 +254,9 @@ typedef void (* GladeSetPropertyFunc) (GladeWidgetAdaptor *adaptor, * Gets @value on @object for a given #GladePropertyClass */ typedef void (* GladeGetPropertyFunc) (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *property_name, - GValue *value); + GObject *object, + const gchar *property_name, + GValue *value); /** * GladeVerifyPropertyFunc: @@ -274,9 +274,9 @@ typedef void (* GladeGetPropertyFunc) (GladeWidgetAdaptor *adaptor, * Returns: whether or not its OK to set @value on @object */ typedef gboolean (* GladeVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *property_name, - const GValue *value); + GObject *object, + const gchar *property_name, + const GValue *value); /** * GladeChildSetPropertyFunc: @@ -290,10 +290,10 @@ typedef gboolean (* GladeVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor, * on the @child object of @container. */ typedef void (* GladeChildSetPropertyFunc) (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child, - const gchar *property_name, - const GValue *value); + GObject *container, + GObject *child, + const gchar *property_name, + const GValue *value); /** * GladeChildGetPropertyFunc: @@ -307,10 +307,10 @@ typedef void (* GladeChildSetPropertyFunc) (GladeWidgetAdaptor *adaptor, * on the @child object of @container into @value. */ typedef void (* GladeChildGetPropertyFunc) (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child, - const gchar *property_name, - GValue *value); + GObject *container, + GObject *child, + const gchar *property_name, + GValue *value); /** * GladeChildVerifyPropertyFunc: @@ -329,10 +329,10 @@ typedef void (* GladeChildGetPropertyFunc) (GladeWidgetAdaptor *adaptor, * Returns: whether or not its OK to set @value on @object */ typedef gboolean (* GladeChildVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child, - const gchar *property_name, - const GValue *value); + GObject *container, + GObject *child, + const gchar *property_name, + const GValue *value); /** * GladeAddChildVerifyFunc: @@ -351,9 +351,9 @@ typedef gboolean (* GladeChildVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor, * Returns: whether @child can be added to @parent. */ typedef gboolean (* GladeAddChildVerifyFunc) (GladeWidgetAdaptor *adaptor, - GObject *parent, - GObject *child, - gboolean user_feedback); + GObject *parent, + GObject *child, + gboolean user_feedback); /** * GladeGetChildrenFunc: @@ -365,7 +365,7 @@ typedef gboolean (* GladeAddChildVerifyFunc) (GladeWidgetAdaptor *adaptor, * Returns: A #GList of #GObject children. */ typedef GList *(* GladeGetChildrenFunc) (GladeWidgetAdaptor *adaptor, - GObject *container); + GObject *container); /** * GladeAddChildFunc: @@ -376,8 +376,8 @@ typedef GList *(* GladeGetChildrenFunc) (GladeWidgetAdaptor *adaptor, * Called to add @child to @parent. */ typedef void (* GladeAddChildFunc) (GladeWidgetAdaptor *adaptor, - GObject *parent, - GObject *child); + GObject *parent, + GObject *child); /** * GladeRemoveChildFunc: @@ -388,8 +388,8 @@ typedef void (* GladeAddChildFunc) (GladeWidgetAdaptor *adaptor, * Called to remove @child from @parent. */ typedef void (* GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor, - GObject *parent, - GObject *child); + GObject *parent, + GObject *child); /** * GladeReplaceChildFunc: @@ -402,9 +402,9 @@ typedef void (* GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor, * in containers. */ typedef void (* GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *old_obj, - GObject *new_obj); + GObject *container, + GObject *old_obj, + GObject *new_obj); /** @@ -421,8 +421,8 @@ typedef void (* GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor, * Returns: A newly created #GObject */ typedef GObject *(* GladeConstructObjectFunc) (GladeWidgetAdaptor *adaptor, - guint n_parameters, - GParameter *parameters); + guint n_parameters, + GParameter *parameters); /** * GladeDestroyObjectFunc: @@ -444,7 +444,7 @@ typedef GObject *(* GladeConstructObjectFunc) (GladeWidgetAdaptor *adaptor, * */ typedef void (* GladeDestroyObjectFunc) (GladeWidgetAdaptor *adaptor, - GObject *object); + GObject *object); /** @@ -457,8 +457,8 @@ typedef void (* GladeDestroyObjectFunc) (GladeWidgetAdaptor *adaptor, * instance and can be for any #GladeCreateReason. */ typedef void (* GladePostCreateFunc) (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason); + GObject *object, + GladeCreateReason reason); /** * GladeGetInternalFunc: @@ -471,8 +471,8 @@ typedef void (* GladePostCreateFunc) (GladeWidgetAdaptor *adaptor, * Returns: The specified internal widget. */ typedef GObject *(* GladeGetInternalFunc) (GladeWidgetAdaptor *adaptor, - GObject *parent, - const gchar *name); + GObject *parent, + const gchar *name); /** * GladeActionActivateFunc: @@ -484,8 +484,8 @@ typedef GObject *(* GladeGetInternalFunc) (GladeWidgetAdaptor *adaptor, * */ typedef void (* GladeActionActivateFunc) (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *action_path); + GObject *object, + const gchar *action_path); /** * GladeChildActionActivateFunc: @@ -498,9 +498,9 @@ typedef void (* GladeActionActivateFunc) (GladeWidgetAdaptor *adaptor, * */ typedef void (* GladeChildActionActivateFunc) (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *object, - const gchar *action_path); + GObject *container, + GObject *object, + const gchar *action_path); /** @@ -514,8 +514,8 @@ typedef void (* GladeChildActionActivateFunc) (GladeWidgetAdaptor *adaptor, * */ typedef GtkWidget *(* GladeActionSubmenuFunc) (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *action_path); + GObject *object, + const gchar *action_path); /** @@ -531,8 +531,8 @@ typedef GtkWidget *(* GladeActionSubmenuFunc) (GladeWidgetAdaptor *adaptor, * the resulting glade file. */ typedef gboolean (* GladeDependsFunc) (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeWidget *another); + GladeWidget *widget, + GladeWidget *another); @@ -546,8 +546,8 @@ typedef gboolean (* GladeDependsFunc) (GladeWidgetAdaptor *adaptor, * */ typedef void (* GladeReadWidgetFunc) (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlNode *node); /** * GladeWriteWidgetFunc: @@ -559,9 +559,9 @@ typedef void (* GladeReadWidgetFunc) (GladeWidgetAdaptor *adaptor, * */ typedef void (* GladeWriteWidgetFunc) (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlContext *context, + GladeXmlNode *node); /** @@ -576,8 +576,8 @@ typedef void (* GladeWriteWidgetFunc) (GladeWidgetAdaptor *adaptor, * Returns: A newly created #GladeEditorProperty */ typedef GladeEditorProperty *(* GladeCreateEPropFunc) (GladeWidgetAdaptor *adaptor, - GladePropertyClass *klass, - gboolean use_command); + GladePropertyClass *klass, + gboolean use_command); /** * GladeStringFromValueFunc: @@ -593,8 +593,8 @@ typedef GladeEditorProperty *(* GladeCreateEPropFunc) (GladeWidgetAdaptor *adapt * Returns: A newly allocated string representation of @value */ typedef gchar *(* GladeStringFromValueFunc) (GladeWidgetAdaptor *adaptor, - GladePropertyClass *klass, - const GValue *value); + GladePropertyClass *klass, + const GValue *value); @@ -610,7 +610,7 @@ typedef gchar *(* GladeStringFromValueFunc) (GladeWidgetAdaptor *adaptor, * Returns: A new #GladeEditable widget */ typedef GladeEditable *(* GladeCreateEditableFunc) (GladeWidgetAdaptor *adaptor, - GladeEditorPageType type); + GladeEditorPageType type); /* Note that everything that must be processed at the creation of @@ -637,42 +637,42 @@ struct _GladeWidgetAdaptorClass gint16 default_height; /* Default height in GladeDesignLayout */ guint deprecated : 1; /* If this widget is currently - * deprecated - */ + * deprecated + */ guint toplevel : 1; /* If this class is toplevel */ guint use_placeholders : 1; /* Whether or not to use placeholders - * to interface with child widgets. - */ + * to interface with child widgets. + */ GladeCreateWidgetFunc create_widget; /* Creates a GladeWidget for this adaptor */ GladeConstructObjectFunc construct_object; /* Object constructor - */ + */ GladePostCreateFunc deep_post_create; /* Executed after widget creation: - * plugins use this to setup various - * support codes (adaptors must always - * chain up in this stage of instantiation). - */ + * plugins use this to setup various + * support codes (adaptors must always + * chain up in this stage of instantiation). + */ GladePostCreateFunc post_create; /* Executed after widget creation: - * plugins use this to setup various - * support codes (adaptors are free here - * to chain up or not in this stage of - * instantiation). - */ + * plugins use this to setup various + * support codes (adaptors are free here + * to chain up or not in this stage of + * instantiation). + */ GladeGetInternalFunc get_internal_child; /* Retrieves the the internal child - * of the given name. - */ + * of the given name. + */ /* Delagate to verify if this is a valid value for this property, * if this function exists and returns FALSE, then glade_property_set * will abort before making any changes */ GladeVerifyPropertyFunc verify_property; - + /* An optional backend function used instead of g_object_set() * virtual properties must be handled with this function. */ @@ -692,25 +692,25 @@ struct _GladeWidgetAdaptorClass GladeAddChildFunc add; /* Adds a new child of this type */ GladeRemoveChildFunc remove; /* Removes a child from the container */ GladeGetChildrenFunc get_children; /* Returns a list of direct children for - * this support type. - */ + * this support type. + */ GladeChildVerifyPropertyFunc child_verify_property; /* A boundry checker for - * packing properties - */ + * packing properties + */ GladeChildSetPropertyFunc child_set_property; /* Sets/Gets a packing property */ GladeChildGetPropertyFunc child_get_property; /* for this child */ GladeReplaceChildFunc replace_child; /* This method replaces a - * child widget with - * another one: it's used to - * replace a placeholder with - * a widget and viceversa. - */ - + * child widget with + * another one: it's used to + * replace a placeholder with + * a widget and viceversa. + */ + GladeActionActivateFunc action_activate; /* This method is used to catch actions */ GladeChildActionActivateFunc child_action_activate; /* This method is used to catch packing actions */ GladeActionSubmenuFunc action_submenu; /* Delagate function to create dynamic submenus - * in action menus. */ + * in action menus. */ GladeDependsFunc depends; /* Periodically sort widgets in the project */ GladeReadWidgetFunc read_widget; /* Reads widget attributes from xml */ GladeWriteWidgetFunc write_widget; /* Writes widget attributes to the xml */ @@ -755,165 +755,165 @@ G_CONST_RETURN GList *glade_widget_adaptor_get_signals (GladeWidgetAdaptor GList *glade_widget_adaptor_list_adaptors (void); GladeWidgetAdaptor *glade_widget_adaptor_from_catalog (GladeCatalog *catalog, - GladeXmlNode *class_node, - GModule *module); + GladeXmlNode *class_node, + GModule *module); void glade_widget_adaptor_register (GladeWidgetAdaptor *adaptor); GladeWidget *glade_widget_adaptor_create_internal (GladeWidget *parent, - GObject *internal_object, - const gchar *internal_name, - const gchar *parent_name, - gboolean anarchist, - GladeCreateReason reason); + GObject *internal_object, + const gchar *internal_name, + const gchar *parent_name, + gboolean anarchist, + GladeCreateReason reason); GladeWidget *glade_widget_adaptor_create_widget_real (gboolean query, - const gchar *first_property, - ...); + const gchar *first_property, + ...); GladeWidgetAdaptor *glade_widget_adaptor_get_by_name (const gchar *name); GladeWidgetAdaptor *glade_widget_adaptor_get_by_type (GType type); GladeWidgetAdaptor *glade_widget_adaptor_from_pspec (GladeWidgetAdaptor *adaptor, - GParamSpec *spec); + GParamSpec *spec); GladePropertyClass *glade_widget_adaptor_get_property_class (GladeWidgetAdaptor *adaptor, - const gchar *name); + const gchar *name); GladePropertyClass *glade_widget_adaptor_get_pack_property_class (GladeWidgetAdaptor *adaptor, - const gchar *name); + const gchar *name); GParameter *glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor, - gboolean construct, - guint *n_params); + gboolean construct, + guint *n_params); GObject *glade_widget_adaptor_construct_object (GladeWidgetAdaptor *adaptor, - guint n_parameters, - GParameter *parameters); + guint n_parameters, + GParameter *parameters); void glade_widget_adaptor_destroy_object (GladeWidgetAdaptor *adaptor, - GObject *object); + GObject *object); void glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor, - GObject *object, - GladeCreateReason reason); + GObject *object, + GladeCreateReason reason); GObject *glade_widget_adaptor_get_internal_child (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *internal_name); + GObject *object, + const gchar *internal_name); 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); void glade_widget_adaptor_get_property (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *property_name, - GValue *value); + GObject *object, + const gchar *property_name, + GValue *value); 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); gboolean glade_widget_adaptor_add_verify (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child, - gboolean user_feedback); + GObject *container, + GObject *child, + gboolean user_feedback); void glade_widget_adaptor_add (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child); + GObject *container, + GObject *child); void glade_widget_adaptor_remove (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child); + GObject *container, + GObject *child); GList *glade_widget_adaptor_get_children (GladeWidgetAdaptor *adaptor, - GObject *container); + GObject *container); gboolean glade_widget_adaptor_has_child (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *child); + GObject *container, + GObject *child); 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); 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); 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); void glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor, - GObject *container, - GObject *old_obj, - GObject *new_obj); + GObject *container, + GObject *old_obj, + GObject *new_obj); gboolean 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); + GladeWidgetAdaptor *container_adaptor, + const gchar *id); gboolean glade_widget_adaptor_is_container (GladeWidgetAdaptor *adaptor); 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); 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); gboolean glade_widget_adaptor_action_remove (GladeWidgetAdaptor *adaptor, - const gchar *action_path); + const gchar *action_path); gboolean glade_widget_adaptor_pack_action_remove (GladeWidgetAdaptor *adaptor, - const gchar *action_path); + const gchar *action_path); GList *glade_widget_adaptor_actions_new (GladeWidgetAdaptor *adaptor); GList *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); 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); GtkWidget *glade_widget_adaptor_action_submenu (GladeWidgetAdaptor *adaptor, - GObject *object, - const gchar *action_path); + GObject *object, + const gchar *action_path); G_DEPRECATED gboolean glade_widget_adaptor_depends (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeWidget *another); + GladeWidget *widget, + GladeWidget *another); void glade_widget_adaptor_read_widget (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlNode *node); void glade_widget_adaptor_write_widget (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlContext *context, + GladeXmlNode *node); void glade_widget_adaptor_write_widget_after (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlContext *context, + GladeXmlNode *node); void glade_widget_adaptor_read_child (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlNode *node); void glade_widget_adaptor_write_child (GladeWidgetAdaptor *adaptor, - GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node); + GladeWidget *widget, + GladeXmlContext *context, + GladeXmlNode *node); GladeEditorProperty *glade_widget_adaptor_create_eprop (GladeWidgetAdaptor *adaptor, - GladePropertyClass *klass, - gboolean use_command); + GladePropertyClass *klass, + gboolean use_command); 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); gchar *glade_widget_adaptor_string_from_value (GladeWidgetAdaptor *adaptor, - GladePropertyClass *klass, - const GValue *value); + GladePropertyClass *klass, + const GValue *value); GladeEditable *glade_widget_adaptor_create_editable (GladeWidgetAdaptor *adaptor, - GladeEditorPageType type); + GladeEditorPageType type); GladeSignalClass *glade_widget_adaptor_get_signal_class (GladeWidgetAdaptor *adaptor, - const gchar *name); + const gchar *name); GladeWidgetAdaptor *glade_widget_adaptor_get_parent_adaptor (GladeWidgetAdaptor *adaptor); gboolean glade_widget_adaptor_has_internal_children (GladeWidgetAdaptor *adaptor); diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c index 563f86e7..ccfaa500 100644 --- a/gladeui/glade-widget.c +++ b/gladeui/glade-widget.c @@ -72,80 +72,80 @@ struct _GladeWidgetPrivate { GladeWidgetAdaptor *adaptor; /* An adaptor class for the object type */ GladeProject *project; /* A pointer to the project that this - widget currently belongs to. */ + widget currently belongs to. */ GladeWidget *parent; /* A pointer to the parent widget in the hierarchy */ - + gchar *name; /* The name of the widget. For example window1 or - * button2. This is a unique name and is the one - * used when loading widget with libglade - */ + * button2. This is a unique name and is the one + * used when loading widget with libglade + */ gchar *support_warning; /* A warning message for version incompatabilities - * in this widget - */ + * in this widget + */ gchar *internal; /* If the widget is an internal child of - * another widget this is the name of the - * internal child, otherwise is NULL. - * Internal children cannot be deleted. - */ + * another widget this is the name of the + * internal child, otherwise is NULL. + * Internal children cannot be deleted. + */ gboolean anarchist; /* Some composite widgets have internal children - * that are not part of the same hierarchy; hence 'anarchists', - * typicly a popup window or its child (we need to mark - * them so we can avoid bookkeeping packing props on them etc.). - */ + * that are not part of the same hierarchy; hence 'anarchists', + * typicly a popup window or its child (we need to mark + * them so we can avoid bookkeeping packing props on them etc.). + */ GObject *object; /* A pointer to the object that was created. - * if it is a GtkWidget; it is shown as a "view" - * of the GladeWidget. This object is updated as - * the properties are modified for the GladeWidget. - */ + * if it is a GtkWidget; it is shown as a "view" + * of the GladeWidget. This object is updated as + * the properties are modified for the GladeWidget. + */ GList *properties; /* A list of GladeProperty. A GladeProperty is an - * instance of a GladePropertyClass. If a - * GladePropertyClass for a gtkbutton is label, its - * property is "Ok". - */ + * instance of a GladePropertyClass. If a + * GladePropertyClass for a gtkbutton is label, its + * property is "Ok". + */ GList *packing_properties; /* A list of GladeProperty. Note that these - * properties are related to the container - * of the widget, thus they change after - * pasting the widget to a different - * container. Toplevels widget do not have - * packing properties. - * See also child_properties of - * GladeWidgetClass. - */ + * properties are related to the container + * of the widget, thus they change after + * pasting the widget to a different + * container. Toplevels widget do not have + * packing properties. + * See also child_properties of + * GladeWidgetClass. + */ GHashTable *props_hash; /* A Quick reference table to speed up calls to glade_widget_get_property() - */ + */ GHashTable *pack_props_hash; /* A Quick reference table to speed up calls to glade_widget_get_pack_property() - */ + */ GHashTable *signals; /* A table with a GPtrArray of GladeSignals (signal handlers), - * indexed by its name */ + * indexed by its name */ GList *prop_refs; /* List of properties in the project who's value are `this object' - * (this is used to set/unset those properties when the object is - * added/removed from the project). - */ + * (this is used to set/unset those properties when the object is + * added/removed from the project). + */ gint width; /* Current size used in the UI, this is only */ gint height; /* usefull for parentless widgets in the - * GladeDesignLayout */ + * GladeDesignLayout */ - GList *actions; /* A GladeWidgetAction list */ + GList *actions; /* A GladeWidgetAction list */ - GList *packing_actions; /* A GladeWidgetAction list, this actions are - * related to the container and they are not always present. - */ + GList *packing_actions; /* A GladeWidgetAction list, this actions are + * related to the container and they are not always present. + */ GladeWidget *lock; /* The glade widget that has locked this widget down. - */ + */ GList *locked_widgets; /* A list of widgets this widget has locked down. - */ + */ GtkTreeModel *signal_model; /* Signal model (or NULL if not yet requested) */ @@ -158,8 +158,8 @@ struct _GladeWidgetPrivate { guint in_project : 1; guint visible : 1; /* Local copy of widget visibility, we need to keep track of this - * since the objects copy may be invalid due to a rebuild. - */ + * since the objects copy may be invalid due to a rebuild. + */ guint rebuilding : 1; guint composite : 1; }; @@ -216,7 +216,7 @@ G_DEFINE_TYPE_WITH_CODE (GladeWidget, glade_widget, G_TYPE_INITIALLY_UNOWNED, *******************************************************************************/ static void glade_widget_set_packing_actions (GladeWidget *widget, - GladeWidget *parent) + GladeWidget *parent) { if (widget->priv->packing_actions) { @@ -246,8 +246,8 @@ glade_widget_add_child_impl (GladeWidget *widget, glade_widget_set_packing_actions (child, widget); glade_widget_adaptor_add (widget->priv->adaptor, - widget->priv->object, - child->priv->object); + widget->priv->object, + child->priv->object); /* XXX FIXME: * We have a fundamental flaw here, we set packing props @@ -335,7 +335,7 @@ glade_widget_add_signal_handler (GladeWidget *widget, { signals = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); g_hash_table_insert (widget->priv->signals, - g_strdup (glade_signal_get_name (signal_handler)), + g_strdup (glade_signal_get_name (signal_handler)), signals); } @@ -378,11 +378,11 @@ glade_widget_remove_signal_handler (GladeWidget *widget, tmp_signal_handler = g_ptr_array_index (signals, i); if (glade_signal_equal (tmp_signal_handler, signal_handler)) { - g_signal_emit (widget, glade_widget_signals[REMOVE_SIGNAL_HANDLER], 0, tmp_signal_handler); + g_signal_emit (widget, glade_widget_signals[REMOVE_SIGNAL_HANDLER], 0, tmp_signal_handler); g_ptr_array_remove_index (signals, i); - if (glade_signal_get_support_warning (tmp_signal_handler)) - glade_widget_verify (widget); + if (glade_signal_get_support_warning (tmp_signal_handler)) + glade_widget_verify (widget); g_object_unref (tmp_signal_handler); break; @@ -411,7 +411,7 @@ glade_widget_change_signal_handler (GladeWidget *widget, g_return_if_fail (GLADE_IS_SIGNAL (old_signal_handler)); g_return_if_fail (GLADE_IS_SIGNAL (new_signal_handler)); g_return_if_fail (strcmp (glade_signal_get_name (old_signal_handler), - glade_signal_get_name (new_signal_handler)) == 0); + glade_signal_get_name (new_signal_handler)) == 0); signals = glade_widget_list_signal_handlers (widget, glade_signal_get_name (old_signal_handler)); @@ -425,27 +425,27 @@ glade_widget_change_signal_handler (GladeWidget *widget, if (glade_signal_equal (signal_handler_iter, old_signal_handler)) { /* Detail */ - glade_signal_set_detail (signal_handler_iter, - glade_signal_get_detail (new_signal_handler)); + glade_signal_set_detail (signal_handler_iter, + glade_signal_get_detail (new_signal_handler)); /* Handler */ - glade_signal_set_handler (signal_handler_iter, - glade_signal_get_handler (new_signal_handler)); + glade_signal_set_handler (signal_handler_iter, + glade_signal_get_handler (new_signal_handler)); /* Object */ - glade_signal_set_userdata (signal_handler_iter, - glade_signal_get_userdata (new_signal_handler)); + glade_signal_set_userdata (signal_handler_iter, + glade_signal_get_userdata (new_signal_handler)); - /* Flags */ - glade_signal_set_after (signal_handler_iter, - glade_signal_get_after (new_signal_handler)); - glade_signal_set_swapped (signal_handler_iter, - glade_signal_get_swapped (new_signal_handler)); + /* Flags */ + glade_signal_set_after (signal_handler_iter, + glade_signal_get_after (new_signal_handler)); + glade_signal_set_swapped (signal_handler_iter, + glade_signal_get_swapped (new_signal_handler)); - g_signal_emit (widget, glade_widget_signals[CHANGE_SIGNAL_HANDLER], 0, - signal_handler_iter); + g_signal_emit (widget, glade_widget_signals[CHANGE_SIGNAL_HANDLER], 0, + signal_handler_iter); - break; + break; } } } @@ -478,7 +478,7 @@ glade_widget_button_press_event_impl (GladeWidget *gwidget, gwidget->priv->object) == FALSE) { glade_project_selection_set (gwidget->priv->project, - gwidget->priv->object, TRUE); + gwidget->priv->object, TRUE); /* Add selection without interrupting event flow * when shift is down, this allows better behaviour @@ -553,8 +553,8 @@ glade_widget_event (GladeWidget *gwidget, GdkEvent *event) #ifdef GLADE_ENABLE_DEBUG if (event->type != GDK_EXPOSE) GLADE_NOTE (WIDGET_EVENTS, - g_print ("event widget '%s' handled '%d' event '%d'\n", - gwidget->priv->name, handled, event->type)); + g_print ("event widget '%s' handled '%d' event '%d'\n", + gwidget->priv->name, handled, event->type)); #endif return handled; @@ -608,9 +608,9 @@ glade_widget_template_params (GladeWidget *widget, /* Ignore properties based on some criteria */ if (!glade_property_get_enabled (glade_property) || - pclass == NULL || /* Unaccounted for in the builder */ + pclass == NULL || /* Unaccounted for in the builder */ glade_property_class_get_virtual (pclass) || /* should not be set before - GladeWidget wrapper exists */ + GladeWidget wrapper exists */ glade_property_class_get_ignore (pclass)) /* Catalog explicitly ignores the object */ continue; @@ -627,7 +627,7 @@ glade_widget_template_params (GladeWidget *widget, { g_critical ("Type mismatch on %s property of %s", parameter.name, - glade_widget_adaptor_get_name (adaptor)); + glade_widget_adaptor_get_name (adaptor)); continue; } @@ -818,8 +818,8 @@ glade_widget_set_catalog_defaults (GList *list) if (glade_property_equals_value (prop, glade_property_class_get_original_default (klass)) && g_param_values_cmp (pspec, - glade_property_class_get_original_default (klass), - glade_property_class_get_default (klass))) + glade_property_class_get_original_default (klass), + glade_property_class_get_default (klass))) glade_property_reset (prop); } } @@ -834,7 +834,7 @@ glade_widget_sync_custom_props (GladeWidget *widget) GladePropertyClass *pclass = glade_property_get_class (prop); if (glade_property_class_get_virtual (pclass) || - glade_property_class_needs_sync (pclass)) + glade_property_class_needs_sync (pclass)) glade_property_sync (prop); } } @@ -894,7 +894,7 @@ glade_widget_constructor (GType type, for (list = gwidget->priv->properties; list; list = list->next) { GladeProperty *property = list->data; - GladePropertyClass *pclass = glade_property_get_class (property); + GladePropertyClass *pclass = glade_property_get_class (property); if (glade_property_class_parentless_widget (pclass)) glade_property_sync (property); @@ -961,7 +961,7 @@ glade_widget_finalize (GObject *object) g_return_if_fail (GLADE_IS_WIDGET (object)); GLADE_NOTE (REF_COUNTS, - g_print ("Finalizing widget %s\n", widget->priv->name)); + g_print ("Finalizing widget %s\n", widget->priv->name)); g_free (widget->priv->name); g_free (widget->priv->internal); @@ -1001,7 +1001,7 @@ glade_widget_dispose (GObject *object) GladeWidget *child = glade_widget_get_from_gobject (l->data); if (glade_widget_get_internal (child) == NULL) - glade_widget_remove_child (widget, child); + glade_widget_remove_child (widget, child); } g_list_free (children); @@ -1126,7 +1126,7 @@ glade_widget_set_real_property (GObject *object, break; case PROP_COMPOSITE: glade_widget_set_is_composite (widget, g_value_get_boolean (value)); - break; + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1186,7 +1186,7 @@ glade_widget_get_real_property (GObject *object, break; case PROP_COMPOSITE: g_value_set_boolean (value, glade_widget_get_is_composite (widget)); - break; + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1461,7 +1461,7 @@ glade_widget_class_init (GladeWidgetClass *klass) * GladeWidget::remove-signal-handler: * @gladewidget: the #GladeWidget which received the signal. * @arg1: the #GladeSignal that was removed from @gladewidget. - */ + */ glade_widget_signals[REMOVE_SIGNAL_HANDLER] = g_signal_new ("remove-signal-handler", G_TYPE_FROM_CLASS (object_class), @@ -1592,7 +1592,7 @@ glade_widget_set_default_packing_properties (GladeWidget *container, if ((def = glade_widget_adaptor_get_packing_default (child->priv->adaptor, container->priv->adaptor, - glade_property_class_id (property_class))) == NULL) + glade_property_class_id (property_class))) == NULL) continue; value = glade_property_class_make_gvalue_from_string (property_class, @@ -1610,8 +1610,8 @@ glade_widget_set_default_packing_properties (GladeWidget *container, */ static GObject * glade_widget_get_internal_child (GladeWidget *main_target, - GladeWidget *parent, - const gchar *internal) + GladeWidget *parent, + const gchar *internal) { while (parent) { @@ -1649,12 +1649,12 @@ glade_widget_dup_internal (GladeWidget *main_target, GObject *internal_object = NULL; if ((internal_object = - glade_widget_get_internal_child (main_target, - parent, - template_widget->priv->internal)) != NULL) - { - gwidget = glade_widget_get_from_gobject (internal_object); - g_assert (gwidget); + glade_widget_get_internal_child (main_target, + parent, + template_widget->priv->internal)) != NULL) + { + gwidget = glade_widget_get_from_gobject (internal_object); + g_assert (gwidget); } } @@ -1856,25 +1856,25 @@ glade_widget_insert_children (GladeWidget *gwidget, GList *children) * widgets. */ internal_object = glade_widget_get_internal_child (NULL, - gwidget, - extract->internal_name); - - /* Some internal children can disappear after a construct only - * property has changed, eg. the "has-entry" property of - * GtkComboBox decides whether there is an internal entry. - * - * Just ignore the saved information we have about missing internal - * children. - */ - if (!internal_object) - { - if (extract->properties) - g_list_free_full (extract->properties, (GDestroyNotify)g_object_unref); - - g_free (extract->internal_name); - g_free (extract); - continue; - } + gwidget, + extract->internal_name); + + /* Some internal children can disappear after a construct only + * property has changed, eg. the "has-entry" property of + * GtkComboBox decides whether there is an internal entry. + * + * Just ignore the saved information we have about missing internal + * children. + */ + if (!internal_object) + { + if (extract->properties) + g_list_free_full (extract->properties, (GDestroyNotify)g_object_unref); + + g_free (extract->internal_name); + g_free (extract); + continue; + } gchild = glade_widget_get_from_gobject (internal_object); @@ -1886,9 +1886,9 @@ glade_widget_insert_children (GladeWidget *gwidget, GList *children) { GValue value = { 0, }; GladeProperty *saved_prop = l->data; - GladePropertyClass *pclass = glade_property_get_class (saved_prop); + GladePropertyClass *pclass = glade_property_get_class (saved_prop); GladeProperty *widget_prop = - glade_widget_get_property (gchild, glade_property_class_id (pclass)); + glade_widget_get_property (gchild, glade_property_class_id (pclass)); glade_property_get_value (saved_prop, &value); glade_property_set_value (widget_prop, &value); @@ -1912,9 +1912,9 @@ glade_widget_insert_children (GladeWidget *gwidget, GList *children) { GValue value = { 0, }; GladeProperty *saved_prop = l->data; - GladePropertyClass *pclass = glade_property_get_class (saved_prop); + GladePropertyClass *pclass = glade_property_get_class (saved_prop); GladeProperty *widget_prop = - glade_widget_get_pack_property (extract->widget, glade_property_class_id (pclass)); + glade_widget_get_pack_property (extract->widget, glade_property_class_id (pclass)); glade_property_get_value (saved_prop, &value); glade_property_set_value (widget_prop, &value); @@ -1961,16 +1961,16 @@ glade_widget_set_properties (GladeWidget *widget, GList *properties) for (list = properties; list; list = list->next) { - GladePropertyClass *pclass; + GladePropertyClass *pclass; property = list->data; - pclass = glade_property_get_class (property); - glade_property_set_widget (property, widget); + pclass = glade_property_get_class (property); + glade_property_set_widget (property, widget); g_hash_table_insert (widget->priv->props_hash, - (gchar *)glade_property_class_id (pclass), - property); + (gchar *)glade_property_class_id (pclass), + property); } } } @@ -2001,7 +2001,7 @@ glade_widget_set_adaptor (GladeWidget *widget, GladeWidgetAdaptor *adaptor) widget, NULL)) == NULL) { g_warning ("Failed to create [%s] property", - glade_property_class_id (property_class)); + glade_property_class_id (property_class)); continue; } properties = g_list_prepend (properties, property); @@ -2149,7 +2149,7 @@ glade_widget_add_prop_ref (GladeWidget *widget, GladeProperty *property) GladeProject *project = glade_widget_get_project (widget); if (project) - glade_project_widget_changed (project, widget); + glade_project_widget_changed (project, widget); glade_widget_hide (widget); } @@ -2181,7 +2181,7 @@ glade_widget_remove_prop_ref (GladeWidget *widget, GladeProperty *property) GladeProject *project = glade_widget_get_project (widget); if (project) - glade_project_widget_changed (project, widget); + glade_project_widget_changed (project, widget); } } @@ -2350,9 +2350,9 @@ glade_widget_copy_properties (GladeWidget *widget, widget_pclass = glade_property_get_class (widget_prop); template_prop = glade_widget_get_property (template_widget, - glade_property_class_id (widget_pclass)); + glade_property_class_id (widget_pclass)); if (template_prop) - template_pclass = glade_property_get_class (template_prop); + template_pclass = glade_property_get_class (template_prop); /* Check if they share the same class definition, different * properties may have the same name (support for @@ -2404,16 +2404,16 @@ glade_widget_copy_properties (GladeWidget *widget, */ gboolean glade_widget_add_verify (GladeWidget *widget, - GladeWidget *child, - gboolean user_feedback) + 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); return glade_widget_adaptor_add_verify (widget->priv->adaptor, - widget->priv->object, - child->priv->object, - user_feedback); + widget->priv->object, + child->priv->object, + user_feedback); } /** @@ -2520,8 +2520,8 @@ glade_widget_rebuild (GladeWidget *gwidget) if (gwidget->priv->parent && glade_widget_adaptor_has_child (gwidget->priv->parent->priv->adaptor, - gwidget->priv->parent->priv->object, - gwidget->priv->object)) + gwidget->priv->parent->priv->object, + gwidget->priv->object)) parent = gwidget->priv->parent; g_object_ref (gwidget); @@ -2555,7 +2555,7 @@ glade_widget_rebuild (GladeWidget *gwidget) GladePropertyClass *pclass = glade_property_get_class (property); if (glade_property_get_widget (property) != gwidget || - glade_property_class_parentless_widget (pclass)) + glade_property_class_parentless_widget (pclass)) { PropertyData *prop_data; @@ -2566,7 +2566,7 @@ glade_widget_rebuild (GladeWidget *gwidget) prop_data->property = property; if (glade_property_get_widget (property) == gwidget) - glade_property_get_value (property, &prop_data->value); + glade_property_get_value (property, &prop_data->value); restore_properties = g_list_prepend (restore_properties, prop_data); glade_property_set (property, NULL); @@ -2789,9 +2789,9 @@ glade_widget_set_is_composite (GladeWidget *widget, gboolean composite) /* Update the project model when this changes */ if (widget->priv->parent == NULL && - widget->priv->project != NULL && - glade_project_has_object (widget->priv->project, widget->priv->object)) - glade_project_widget_changed (project, widget); + widget->priv->project != NULL && + glade_project_has_object (widget->priv->project, widget->priv->object)) + glade_project_widget_changed (project, widget); } } @@ -3270,7 +3270,7 @@ glade_widget_pack_property_set_save_always (GladeWidget *widget, gchar * glade_widget_property_string (GladeWidget *widget, const gchar *id_property, - const GValue *value) + const GValue *value) { GladeProperty *property; GladePropertyClass *pclass; @@ -3284,7 +3284,7 @@ glade_widget_property_string (GladeWidget *widget, pclass = glade_property_get_class (property); ret_string = glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (pclass), pclass, - value ? value : glade_property_inline_value (property)); + value ? value : glade_property_inline_value (property)); } return ret_string; @@ -3318,7 +3318,7 @@ glade_widget_pack_property_string (GladeWidget *widget, pclass = glade_property_get_class (property); ret_string = glade_widget_adaptor_string_from_value (glade_property_class_get_adaptor (pclass), pclass, - value ? value : glade_property_inline_value (property)); + value ? value : glade_property_inline_value (property)); } return ret_string; @@ -3624,14 +3624,14 @@ glade_widget_set_object (GladeWidget *gwidget, GObject *new_object) { if (gwidget->priv->internal == NULL) { - GLADE_NOTE (REF_COUNTS, - g_print ("Killing '%s::%s' widget's object with reference count %d\n", - glade_widget_adaptor_get_name (gwidget->priv->adaptor), - gwidget->priv->name ? gwidget->priv->name : "(unknown)", - old_object->ref_count)); - - /* Have the adaptor for this widget break any additional references */ - glade_widget_adaptor_destroy_object (gwidget->priv->adaptor, old_object); + GLADE_NOTE (REF_COUNTS, + g_print ("Killing '%s::%s' widget's object with reference count %d\n", + glade_widget_adaptor_get_name (gwidget->priv->adaptor), + gwidget->priv->name ? gwidget->priv->name : "(unknown)", + old_object->ref_count)); + + /* Have the adaptor for this widget break any additional references */ + glade_widget_adaptor_destroy_object (gwidget->priv->adaptor, old_object); } /* From this point on, the GladeWidget is no longer retrievable with @@ -3858,15 +3858,15 @@ glade_widget_set_packing_properties (GladeWidget *widget, GladePropertyClass *pclass = glade_property_get_class (property); g_hash_table_insert (widget->priv->pack_props_hash, - (gchar *)glade_property_class_id (pclass), - property); + (gchar *)glade_property_class_id (pclass), + property); } /* Dont introspect on properties that are not parented yet. */ if (glade_widget_adaptor_has_child (container->priv->adaptor, container->priv->object, - widget->priv->object)) + widget->priv->object)) { glade_widget_set_default_packing_properties (container, widget); @@ -3874,16 +3874,16 @@ glade_widget_set_packing_properties (GladeWidget *widget, for (list = widget->priv->packing_properties; list && list->data; list = list->next) { - /* XXX Ugly dangerous code, plays with the property value inline */ + /* XXX Ugly dangerous code, plays with the property value inline */ GladeProperty *property = list->data; - GladePropertyClass *pclass = glade_property_get_class (property); - GValue *value = glade_property_inline_value (property); + GladePropertyClass *pclass = glade_property_get_class (property); + GValue *value = glade_property_inline_value (property); g_value_reset (value); glade_widget_child_get_property (container, - widget, - glade_property_class_id (pclass), - value); + widget, + glade_property_class_id (pclass), + value); } } } @@ -3976,8 +3976,8 @@ glade_widget_set_child_type_from_node (GladeWidget *parent, return; g_object_get (parent->priv->adaptor, - "special-child-type", &special_child_type, - NULL); + "special-child-type", &special_child_type, + NULL); if (!special_child_type) return; @@ -4038,7 +4038,7 @@ glade_widget_read (GladeProject *project, return NULL; if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) || - glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE))) + glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE))) return NULL; if (glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)) @@ -4051,25 +4051,25 @@ glade_widget_read (GladeProject *project, (node, GLADE_XML_TAG_CLASS, NULL)) != NULL) { if (template) - { - template_parent = glade_xml_get_property_string_required (node, GLADE_TAG_PARENT, NULL); + { + template_parent = glade_xml_get_property_string_required (node, GLADE_TAG_PARENT, NULL); - if (template_parent) - id = g_strdup (klass); - } + if (template_parent) + id = g_strdup (klass); + } else - { - id = glade_xml_get_property_string (node, GLADE_XML_TAG_ID); - - /* Here we use an internal unnamed prefix to identify unnamed widgets, then - * we just issue a warning if anyone was dense enough to actually use - * this prefix in a project as a widget name. - */ - if (!id) - id = glade_project_new_widget_name (project, NULL, GLADE_UNNAMED_PREFIX); - else if (strncmp (id, GLADE_UNNAMED_PREFIX, strlen (GLADE_UNNAMED_PREFIX)) == 0) - g_warning ("Loaded widget `%s' has internal glade prefix, please rename this widget", id); - } + { + id = glade_xml_get_property_string (node, GLADE_XML_TAG_ID); + + /* Here we use an internal unnamed prefix to identify unnamed widgets, then + * we just issue a warning if anyone was dense enough to actually use + * this prefix in a project as a widget name. + */ + if (!id) + id = glade_project_new_widget_name (project, NULL, GLADE_UNNAMED_PREFIX); + else if (strncmp (id, GLADE_UNNAMED_PREFIX, strlen (GLADE_UNNAMED_PREFIX)) == 0) + g_warning ("Loaded widget `%s' has internal glade prefix, please rename this widget", id); + } if (template_parent) { @@ -4097,60 +4097,60 @@ glade_widget_read (GladeProject *project, * Create GladeWidget instance based on type. */ if ((adaptor = glade_widget_adaptor_get_by_name (type_to_use)) && - (type = glade_widget_adaptor_get_object_type (adaptor)) && - G_TYPE_IS_INSTANTIATABLE (type) && - G_TYPE_IS_ABSTRACT (type) == FALSE) - { - /* Internal children !!! */ - if (internal) - { - GObject *child_object = - glade_widget_get_internal_child (NULL, parent, internal); - - if (!child_object) - { - g_warning ("Failed to locate " - "internal child %s of %s", - internal, glade_widget_get_name (parent)); - goto out; - } - - if (!(widget = glade_widget_get_from_gobject (child_object))) - g_warning ("Unable to get GladeWidget " - "for internal child %s\n", internal); - - /* Apply internal widget name from here */ - glade_widget_set_name (widget, id); - } - else - { - widget = glade_widget_adaptor_create_widget - (adaptor, FALSE, - "name", id, - "composite", template, - "parent", parent, - "project", project, "reason", GLADE_CREATE_LOAD, NULL); - } - - glade_widget_adaptor_read_widget (adaptor, widget, node); - } + (type = glade_widget_adaptor_get_object_type (adaptor)) && + G_TYPE_IS_INSTANTIATABLE (type) && + G_TYPE_IS_ABSTRACT (type) == FALSE) + { + /* Internal children !!! */ + if (internal) + { + GObject *child_object = + glade_widget_get_internal_child (NULL, parent, internal); + + if (!child_object) + { + g_warning ("Failed to locate " + "internal child %s of %s", + internal, glade_widget_get_name (parent)); + goto out; + } + + if (!(widget = glade_widget_get_from_gobject (child_object))) + g_warning ("Unable to get GladeWidget " + "for internal child %s\n", internal); + + /* Apply internal widget name from here */ + glade_widget_set_name (widget, id); + } + else + { + widget = glade_widget_adaptor_create_widget + (adaptor, FALSE, + "name", id, + "composite", template, + "parent", parent, + "project", project, "reason", GLADE_CREATE_LOAD, NULL); + } + + glade_widget_adaptor_read_widget (adaptor, widget, node); + } else - { - GObject *stub = g_object_new (GLADE_TYPE_OBJECT_STUB, - "object-type", klass, - "xml-node", node, - NULL); + { + GObject *stub = g_object_new (GLADE_TYPE_OBJECT_STUB, + "object-type", klass, + "xml-node", node, + NULL); - widget = glade_widget_adaptor_create_widget (glade_widget_adaptor_get_by_type (GTK_TYPE_WIDGET), - FALSE, - "parent", parent, - "composite", template, - "project", project, - "reason", GLADE_CREATE_LOAD, - "object", stub, - "name", id, - NULL); - } + widget = glade_widget_adaptor_create_widget (glade_widget_adaptor_get_by_type (GTK_TYPE_WIDGET), + FALSE, + "parent", parent, + "composite", template, + "project", project, + "reason", GLADE_CREATE_LOAD, + "object", stub, + "name", id, + NULL); + } g_free (id); g_free (template_parent); @@ -4309,19 +4309,19 @@ glade_widget_write_signals (GladeWidget *widget, gint i; for (i = 0; i < signals->len; i++) - { - signal = g_ptr_array_index (signals, i); + { + signal = g_ptr_array_index (signals, i); - sorted_signals = g_list_prepend (sorted_signals, signal); - } + sorted_signals = g_list_prepend (sorted_signals, signal); + } } sorted_signals = g_list_sort (sorted_signals, (GCompareFunc)signal_compare); for (l = sorted_signals; l; l = l->next) { - signal = l->data; - glade_signal_write (signal, context, node); + signal = l->data; + glade_signal_write (signal, context, node); } g_list_free (sorted_signals); @@ -4369,14 +4369,14 @@ glade_widget_write (GladeWidget *widget, { widget_node = glade_xml_node_new (context, GLADE_XML_TAG_WIDGET); glade_xml_node_set_property_string (widget_node, - GLADE_XML_TAG_CLASS, - glade_widget_adaptor_get_name (widget->priv->adaptor)); + GLADE_XML_TAG_CLASS, + glade_widget_adaptor_get_name (widget->priv->adaptor)); /* Conditionally omit the ID in the output if the name is 'unset' */ if (glade_widget_has_name (widget) || glade_project_writing_preview (widget->priv->project)) - glade_xml_node_set_property_string (widget_node, - GLADE_XML_TAG_ID, widget->priv->name); + glade_xml_node_set_property_string (widget_node, + GLADE_XML_TAG_ID, widget->priv->name); } glade_xml_node_append_child (node, widget_node); @@ -4566,7 +4566,7 @@ glade_widget_action_lookup (GList *actions, const gchar *path) GList *children = glade_widget_action_get_children (action); if (strcmp (aclass->path, path) == 0) - return action; + return action; if (children && g_str_has_prefix (path, aclass->path) && @@ -4698,8 +4698,8 @@ glade_widget_set_pack_action_sensitive (GladeWidget *widget, */ gboolean glade_widget_set_action_visible (GladeWidget *widget, - const gchar *action_path, - gboolean visible) + const gchar *action_path, + gboolean visible) { GladeWidgetAction *action; @@ -4725,8 +4725,8 @@ glade_widget_set_action_visible (GladeWidget *widget, */ gboolean glade_widget_set_pack_action_visible (GladeWidget *widget, - const gchar *action_path, - gboolean visible) + const gchar *action_path, + gboolean visible) { GladeWidgetAction *action; @@ -4847,7 +4847,7 @@ glade_widget_verify (GladeWidget *widget) if (!warning) warning = glade_project_verify_widget_adaptor (priv->project, priv->adaptor, - NULL); + NULL); /* If there is already support issues with the adaptor, skip signals * and properties @@ -4864,82 +4864,82 @@ glade_widget_verify (GladeWidget *widget) /* Collect signals with warnings on them */ g_hash_table_iter_init (&iter, priv->signals); while (g_hash_table_iter_next (&iter, &key, &value)) - { - GPtrArray *signals = (GPtrArray *)value; - gint i; + { + GPtrArray *signals = (GPtrArray *)value; + gint i; - for (i = 0; i < signals->len; i++) - { - GladeSignal *signal = g_ptr_array_index (signals, i); + for (i = 0; i < signals->len; i++) + { + GladeSignal *signal = g_ptr_array_index (signals, i); - if (glade_signal_get_support_warning (signal)) - warn_signals = g_list_prepend (warn_signals, signal); - } - } + if (glade_signal_get_support_warning (signal)) + warn_signals = g_list_prepend (warn_signals, signal); + } + } /* Collect properties with warnings on them */ for (l = priv->properties; l; l = g_list_next (l)) - { - GladeProperty *property = l->data; + { + GladeProperty *property = l->data; - if (glade_property_warn_usage (property)) - warn_properties = g_list_prepend (warn_properties, property); - } + if (glade_property_warn_usage (property)) + warn_properties = g_list_prepend (warn_properties, property); + } for (l = priv->packing_properties; l; l = g_list_next (l)) - { - GladeProperty *property = l->data; + { + GladeProperty *property = l->data; - if (glade_property_warn_usage (property)) - warn_properties = g_list_prepend (warn_properties, property); - } + if (glade_property_warn_usage (property)) + warn_properties = g_list_prepend (warn_properties, property); + } if (warn_signals || warn_properties) - string = g_string_new (NULL); + string = g_string_new (NULL); /* Print out property warnings */ for (l = warn_properties; l; l = g_list_next (l)) - { - GladeProperty *property = l->data; - GladePropertyClass *pclass = glade_property_get_class (property); - - if (l->prev == NULL) - { - if (l->next == NULL) - g_string_append (string, _("Property has versioning problems: ")); - else - g_string_append (string, _("Some properties have versioning problems: ")); - } - else - g_string_append (string, ", "); - - g_string_append (string, glade_property_class_get_name (pclass)); - } + { + GladeProperty *property = l->data; + GladePropertyClass *pclass = glade_property_get_class (property); + + if (l->prev == NULL) + { + if (l->next == NULL) + g_string_append (string, _("Property has versioning problems: ")); + else + g_string_append (string, _("Some properties have versioning problems: ")); + } + else + g_string_append (string, ", "); + + g_string_append (string, glade_property_class_get_name (pclass)); + } /* New line if printing both */ if (warn_signals && warn_properties) - g_string_append (string, "\n"); + g_string_append (string, "\n"); /* Print out signal warnings */ for (l = warn_signals; l; l = g_list_next (l)) - { - GladeSignal *signal = l->data; - - if (l->prev == NULL) - { - if (l->next == NULL) - g_string_append (string, _("Signal has versioning problems: ")); - else - g_string_append (string, _("Some signals have versioning problems: ")); - } - else - g_string_append (string, ", "); - - g_string_append (string, glade_signal_get_name (signal)); - } + { + GladeSignal *signal = l->data; + + if (l->prev == NULL) + { + if (l->next == NULL) + g_string_append (string, _("Signal has versioning problems: ")); + else + g_string_append (string, _("Some signals have versioning problems: ")); + } + else + g_string_append (string, ", "); + + g_string_append (string, glade_signal_get_name (signal)); + } if (string) - warning = g_string_free (string, FALSE); + warning = g_string_free (string, FALSE); } glade_widget_set_support_warning (widget, warning); @@ -5058,12 +5058,12 @@ glade_widget_support_changed (GladeWidget *widget) GtkTreeModel * glade_widget_get_signal_model (GladeWidget *widget) { - if (!widget->priv->signal_model) - { - widget->priv->signal_model = glade_signal_model_new (widget, + if (!widget->priv->signal_model) + { + widget->priv->signal_model = glade_signal_model_new (widget, widget->priv->signals); - } - return widget->priv->signal_model; + } + return widget->priv->signal_model; } GList * @@ -5084,18 +5084,18 @@ glade_widget_get_packing_properties (GladeWidget *widget) void glade_widget_ensure_name (GladeWidget *widget, - GladeProject *project, - gboolean use_command) + GladeProject *project, + gboolean use_command) { if (!glade_widget_has_name (widget)) { gchar *new_name = glade_project_new_widget_name (project, NULL, - glade_widget_adaptor_get_generic_name (widget->priv->adaptor)); + glade_widget_adaptor_get_generic_name (widget->priv->adaptor)); if (use_command) - glade_command_set_name (widget, new_name); + glade_command_set_name (widget, new_name); else - glade_widget_set_name (widget, new_name); + glade_widget_set_name (widget, new_name); g_free (new_name); } diff --git a/gladeui/glade-widget.h b/gladeui/glade-widget.h index 80fa9ee0..6ca09ea0 100644 --- a/gladeui/glade-widget.h +++ b/gladeui/glade-widget.h @@ -36,9 +36,9 @@ struct _GladeWidgetClass void (*remove_child) (GladeWidget *, GladeWidget *); void (*replace_child) (GladeWidget *, GObject *, GObject *); - void (*add_signal_handler) (GladeWidget *, GladeSignal *); - void (*remove_signal_handler) (GladeWidget *, GladeSignal *); - void (*change_signal_handler) (GladeWidget *, GladeSignal *); + void (*add_signal_handler) (GladeWidget *, GladeSignal *); + void (*remove_signal_handler) (GladeWidget *, GladeSignal *); + void (*change_signal_handler) (GladeWidget *, GladeSignal *); gint (*button_press_event) (GladeWidget *, GdkEvent *); gint (*button_release_event) (GladeWidget *, GdkEvent *); @@ -61,185 +61,185 @@ struct _GladeWidgetClass */ #define GLADE_UNNAMED_PREFIX "__glade_unnamed_" -#define IS_GLADE_WIDGET_EVENT(event) \ - ((event) == GDK_BUTTON_PRESS || \ - (event) == GDK_BUTTON_RELEASE || \ - (event) == GDK_MOTION_NOTIFY) +#define IS_GLADE_WIDGET_EVENT(event) \ + ((event) == GDK_BUTTON_PRESS || \ + (event) == GDK_BUTTON_RELEASE || \ + (event) == GDK_MOTION_NOTIFY) /******************************************************************************* General api *******************************************************************************/ -GType glade_widget_get_type (void); +GType glade_widget_get_type (void); GladeWidget *glade_widget_get_from_gobject (gpointer object); gboolean glade_widget_add_verify (GladeWidget *parent, - GladeWidget *child, - gboolean user_feedback); + GladeWidget *child, + gboolean user_feedback); void glade_widget_add_child (GladeWidget *parent, - GladeWidget *child, - gboolean at_mouse); + GladeWidget *child, + gboolean at_mouse); void glade_widget_remove_child (GladeWidget *parent, - GladeWidget *child); + GladeWidget *child); void glade_widget_replace (GladeWidget *parent, - GObject *old_object, - GObject *new_object); + GObject *old_object, + GObject *new_object); void glade_widget_rebuild (GladeWidget *gwidget); GladeWidget *glade_widget_dup (GladeWidget *template_widget, - gboolean exact); + gboolean exact); GList *glade_widget_get_signal_list (GladeWidget *widget); void glade_widget_copy_signals (GladeWidget *widget, - GladeWidget *template_widget); + GladeWidget *template_widget); void glade_widget_copy_properties (GladeWidget *widget, - GladeWidget *template_widget, - gboolean copy_parentless, - gboolean exact); + GladeWidget *template_widget, + gboolean copy_parentless, + gboolean exact); void glade_widget_set_packing_properties (GladeWidget *widget, - GladeWidget *container); + GladeWidget *container); GList *glade_widget_get_properties (GladeWidget *widget); GList *glade_widget_get_packing_properties (GladeWidget *widget); GladeProperty *glade_widget_get_property (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); GladeProperty *glade_widget_get_pack_property (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); GList *glade_widget_dup_properties (GladeWidget *dest_widget, - GList *template_props, + GList *template_props, gboolean as_load, - gboolean copy_parentless, - gboolean exact); + gboolean copy_parentless, + gboolean exact); void glade_widget_remove_property (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); void glade_widget_show (GladeWidget *widget); void glade_widget_hide (GladeWidget *widget); void glade_widget_add_signal_handler (GladeWidget *widget, - const GladeSignal *signal_handler); + const GladeSignal *signal_handler); void glade_widget_remove_signal_handler (GladeWidget *widget, - const GladeSignal *signal_handler); + const GladeSignal *signal_handler); void glade_widget_change_signal_handler (GladeWidget *widget, - const GladeSignal *old_signal_handler, - const GladeSignal *new_signal_handler); + const GladeSignal *old_signal_handler, + const GladeSignal *new_signal_handler); GPtrArray * glade_widget_list_signal_handlers (GladeWidget *widget, - const gchar *signal_name); + const gchar *signal_name); gboolean glade_widget_has_decendant (GladeWidget *widget, - GType type); + GType type); gboolean glade_widget_event (GladeWidget *gwidget, - GdkEvent *event); + GdkEvent *event); gboolean glade_widget_placeholder_relation (GladeWidget *parent, - GladeWidget *widget); + GladeWidget *widget); GladeWidgetAction *glade_widget_get_action (GladeWidget *widget, - const gchar *action_path); + const gchar *action_path); GladeWidgetAction *glade_widget_get_pack_action (GladeWidget *widget, - const gchar *action_path); + const gchar *action_path); GList *glade_widget_get_actions (GladeWidget *widget); GList *glade_widget_get_pack_actions (GladeWidget *widget); gboolean glade_widget_set_action_sensitive (GladeWidget *widget, - const gchar *action_path, - gboolean sensitive); + const gchar *action_path, + gboolean sensitive); gboolean glade_widget_set_pack_action_sensitive (GladeWidget *widget, - const gchar *action_path, - gboolean sensitive); + const gchar *action_path, + gboolean sensitive); gboolean glade_widget_set_action_visible (GladeWidget *widget, - const gchar *action_path, - gboolean sensitive); + const gchar *action_path, + gboolean sensitive); gboolean glade_widget_set_pack_action_visible (GladeWidget *widget, - const gchar *action_path, - gboolean sensitive); + const gchar *action_path, + gboolean sensitive); void glade_widget_write (GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node); + GladeXmlContext *context, + GladeXmlNode *node); void glade_widget_write_child (GladeWidget *widget, - GladeWidget *child, - GladeXmlContext *context, - GladeXmlNode *node); + GladeWidget *child, + GladeXmlContext *context, + GladeXmlNode *node); void glade_widget_write_signals (GladeWidget *widget, - GladeXmlContext *context, - GladeXmlNode *node); + GladeXmlContext *context, + GladeXmlNode *node); void glade_widget_write_placeholder (GladeWidget *parent, - GObject *object, - GladeXmlContext *context, - GladeXmlNode *node); - + GObject *object, + GladeXmlContext *context, + GladeXmlNode *node); + GladeWidget *glade_widget_read (GladeProject *project, - GladeWidget *parent, - GladeXmlNode *node, - const gchar *internal); + GladeWidget *parent, + GladeXmlNode *node, + const gchar *internal); void glade_widget_read_child (GladeWidget *widget, - GladeXmlNode *node); + GladeXmlNode *node); void glade_widget_write_special_child_prop (GladeWidget *parent, - GObject *object, - GladeXmlContext *context, - GladeXmlNode *node); + GObject *object, + GladeXmlContext *context, + GladeXmlNode *node); void glade_widget_set_child_type_from_node (GladeWidget *parent, - GObject *child, - GladeXmlNode *node); + GObject *child, + GladeXmlNode *node); GladeEditorProperty *glade_widget_create_editor_property (GladeWidget *widget, - const gchar *property, - gboolean packing, - gboolean use_command); + const gchar *property, + gboolean packing, + gboolean use_command); gchar *glade_widget_generate_path_name (GladeWidget *widget); gboolean glade_widget_is_ancestor (GladeWidget *widget, - GladeWidget *ancestor); + GladeWidget *ancestor); G_DEPRECATED gboolean glade_widget_depends (GladeWidget *widget, - GladeWidget *other); + GladeWidget *other); GdkDevice *glade_widget_get_device_from_event (GdkEvent *event); void glade_widget_ensure_name (GladeWidget *widget, - GladeProject *project, - gboolean use_command); + GladeProject *project, + gboolean use_command); /******************************************************************************* Project, object property references *******************************************************************************/ void glade_widget_add_prop_ref (GladeWidget *widget, - GladeProperty *property); + GladeProperty *property); void glade_widget_remove_prop_ref (GladeWidget *widget, - GladeProperty *property); + GladeProperty *property); GList *glade_widget_list_prop_refs (GladeWidget *widget); gboolean glade_widget_has_prop_refs (GladeWidget *widget); @@ -254,124 +254,124 @@ GList *glade_widget_get_parentless_reffed_widgets (GladeWidget *******************************************************************************/ void glade_widget_object_set_property (GladeWidget *widget, - const gchar *property_name, - const GValue *value); + const gchar *property_name, + const GValue *value); void glade_widget_object_get_property (GladeWidget *widget, - const gchar *property_name, - GValue *value); + const gchar *property_name, + GValue *value); void glade_widget_child_set_property (GladeWidget *widget, - GladeWidget *child, - const gchar *property_name, - const GValue *value); + GladeWidget *child, + const gchar *property_name, + const GValue *value); void glade_widget_child_get_property (GladeWidget *widget, - GladeWidget *child, - const gchar *property_name, - GValue *value); + GladeWidget *child, + const gchar *property_name, + GValue *value); /******************************************************************************* GladeProperty api convenience wrappers *******************************************************************************/ gboolean glade_widget_property_get (GladeWidget *widget, - const gchar *id_property, - ...); + const gchar *id_property, + ...); gboolean glade_widget_property_set (GladeWidget *widget, - const gchar *id_property, - ...); + const gchar *id_property, + ...); gboolean glade_widget_pack_property_get (GladeWidget *widget, - const gchar *id_property, - ...); + const gchar *id_property, + ...); gboolean glade_widget_pack_property_set (GladeWidget *widget, - const gchar *id_property, - ...); + const gchar *id_property, + ...); gboolean glade_widget_property_reset (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); gboolean glade_widget_pack_property_reset (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); gboolean glade_widget_property_default (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); gboolean glade_widget_property_original_default (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); gboolean glade_widget_pack_property_default (GladeWidget *widget, - const gchar *id_property); + const gchar *id_property); gboolean glade_widget_property_set_sensitive (GladeWidget *widget, - const gchar *id_property, - gboolean sensitive, - const gchar *reason); + const gchar *id_property, + gboolean sensitive, + const gchar *reason); gboolean glade_widget_pack_property_set_sensitive (GladeWidget *widget, - const gchar *id_property, - gboolean sensitive, - const gchar *reason); + const gchar *id_property, + gboolean sensitive, + const gchar *reason); gboolean glade_widget_property_set_enabled (GladeWidget *widget, - const gchar *id_property, - gboolean enabled); + const gchar *id_property, + gboolean enabled); gboolean glade_widget_pack_property_set_enabled (GladeWidget *widget, - const gchar *id_property, - gboolean enabled); + const gchar *id_property, + gboolean enabled); gboolean glade_widget_property_set_save_always (GladeWidget *widget, - const gchar *id_property, - gboolean setting); + const gchar *id_property, + gboolean setting); gboolean glade_widget_pack_property_set_save_always (GladeWidget *widget, - const gchar *id_property, - gboolean setting); + const gchar *id_property, + gboolean setting); gchar *glade_widget_property_string (GladeWidget *widget, - const gchar *id_property, - const GValue *value); + const gchar *id_property, + const GValue *value); gchar *glade_widget_pack_property_string (GladeWidget *widget, - const gchar *id_property, - const GValue *value); + const gchar *id_property, + const GValue *value); /******************************************************************************* Accessors *******************************************************************************/ -void glade_widget_set_name (GladeWidget *widget, - const gchar *name); +void glade_widget_set_name (GladeWidget *widget, + const gchar *name); G_CONST_RETURN gchar *glade_widget_get_name (GladeWidget *widget); G_CONST_RETURN gchar *glade_widget_get_display_name (GladeWidget *widget); gboolean glade_widget_has_name (GladeWidget *widget); void glade_widget_set_is_composite (GladeWidget *widget, - gboolean composite); + gboolean composite); gboolean glade_widget_get_is_composite (GladeWidget *widget); -void glade_widget_set_internal (GladeWidget *widget, - const gchar *internal); +void glade_widget_set_internal (GladeWidget *widget, + const gchar *internal); G_CONST_RETURN gchar *glade_widget_get_internal (GladeWidget *widget); GObject *glade_widget_get_object (GladeWidget *widget); -void glade_widget_set_project (GladeWidget *widget, - GladeProject *project); +void glade_widget_set_project (GladeWidget *widget, + GladeProject *project); GladeProject *glade_widget_get_project (GladeWidget *widget); void glade_widget_set_in_project (GladeWidget *widget, - gboolean in_project); + gboolean in_project); gboolean glade_widget_in_project (GladeWidget *widget); GladeWidgetAdaptor *glade_widget_get_adaptor (GladeWidget *widget); @@ -379,9 +379,9 @@ GladeWidgetAdaptor *glade_widget_get_adaptor (GladeWidget *w GladeWidget *glade_widget_get_parent (GladeWidget *widget); void glade_widget_set_parent (GladeWidget *widget, - GladeWidget *parent); + GladeWidget *parent); -GList *glade_widget_get_children (GladeWidget* widget); +GList *glade_widget_get_children (GladeWidget* widget); GladeWidget *glade_widget_get_toplevel (GladeWidget *widget); @@ -393,11 +393,11 @@ void glade_widget_pop_superuser (void); void glade_widget_verify (GladeWidget *widget); void glade_widget_set_support_warning (GladeWidget *widget, - const gchar *warning); + const gchar *warning); G_CONST_RETURN gchar *glade_widget_support_warning (GladeWidget *widget); void glade_widget_lock (GladeWidget *widget, - GladeWidget *locked); + GladeWidget *locked); void glade_widget_unlock (GladeWidget *widget); GladeWidget *glade_widget_get_locker (GladeWidget *widget); diff --git a/gladeui/glade-xml-utils.c b/gladeui/glade-xml-utils.c index 10a30721..c5e41432 100644 --- a/gladeui/glade-xml-utils.c +++ b/gladeui/glade-xml-utils.c @@ -71,10 +71,10 @@ struct _GladeXmlContext * also to skip whitespace between nodes */ #define skip_text(node) if ((xmlStrcmp ( ((xmlNodePtr)node)->name, BAD_CAST("text")) == 0) ||\ - (xmlStrcmp ( ((xmlNodePtr)node)->name, BAD_CAST("comment")) == 0)) { \ - node = (GladeXmlNode *)((xmlNodePtr)node)->next; continue ; }; + (xmlStrcmp ( ((xmlNodePtr)node)->name, BAD_CAST("comment")) == 0)) { \ + node = (GladeXmlNode *)((xmlNodePtr)node)->next; continue ; }; #define skip_text_libxml(node) if ((xmlStrcmp ( ((xmlNodePtr)node)->name, BAD_CAST("text")) == 0) ||\ - (xmlStrcmp ( ((xmlNodePtr)node)->name, BAD_CAST("comment")) == 0)) { \ + (xmlStrcmp ( ((xmlNodePtr)node)->name, BAD_CAST("comment")) == 0)) { \ node = ((xmlNodePtr)node)->next; continue ; }; diff --git a/gladeui/glade-xml-utils.h b/gladeui/glade-xml-utils.h index 6b00b270..4f2ee706 100644 --- a/gladeui/glade-xml-utils.h +++ b/gladeui/glade-xml-utils.h @@ -28,10 +28,10 @@ typedef struct _GladeProject GladeProject; #define GLADE_GTKBUILDER_VERSIONING_BASE_MAJOR 2 #define GLADE_GTKBUILDER_VERSIONING_BASE_MINOR 14 -#define GLADE_GTKBUILDER_HAS_VERSIONING(maj, min) \ - ((maj) > GLADE_GTKBUILDER_VERSIONING_BASE_MAJOR || \ - ((maj) == GLADE_GTKBUILDER_VERSIONING_BASE_MAJOR && \ - (min) >= GLADE_GTKBUILDER_VERSIONING_BASE_MINOR)) +#define GLADE_GTKBUILDER_HAS_VERSIONING(maj, min) \ + ((maj) > GLADE_GTKBUILDER_VERSIONING_BASE_MAJOR || \ + ((maj) == GLADE_GTKBUILDER_VERSIONING_BASE_MAJOR && \ + (min) >= GLADE_GTKBUILDER_VERSIONING_BASE_MINOR)) /* Used for catalog tags and attributes */ @@ -188,29 +188,29 @@ typedef struct _GladeProject GladeProject; /* search child */ -GladeXmlNode * glade_xml_search_child (GladeXmlNode * node, const gchar *name); -GladeXmlNode * glade_xml_search_child_required (GladeXmlNode * tree, const gchar* name); +GladeXmlNode * glade_xml_search_child (GladeXmlNode *node, const gchar *name); +GladeXmlNode * glade_xml_search_child_required (GladeXmlNode *tree, const gchar *name); /* content */ -gchar * glade_xml_get_content (GladeXmlNode * node_in); /* Get the content of the node */ +gchar * glade_xml_get_content (GladeXmlNode *node_in); /* Get the content of the node */ void glade_xml_set_content (GladeXmlNode *node_in, const gchar *content); -gboolean glade_xml_get_value_int (GladeXmlNode * node_in, const gchar *name, int *val); -gboolean glade_xml_get_value_int_required (GladeXmlNode * node, const gchar *name, int *val); +gboolean glade_xml_get_value_int (GladeXmlNode *node_in, const gchar *name, int *val); +gboolean glade_xml_get_value_int_required (GladeXmlNode *node, const gchar *name, int *val); -gchar * glade_xml_get_value_string (GladeXmlNode * node, const gchar *name); -gchar * glade_xml_get_value_string_required (GladeXmlNode * node, - const gchar *name, - const gchar *xtra_info); +gchar * glade_xml_get_value_string (GladeXmlNode *node, const gchar *name); +gchar * glade_xml_get_value_string_required (GladeXmlNode *node, + const gchar *name, + const gchar *xtra_info); -gboolean glade_xml_get_boolean (GladeXmlNode * node, const gchar *name, gboolean _default); +gboolean glade_xml_get_boolean (GladeXmlNode *node, const gchar *name, gboolean _default); -void glade_xml_set_value (GladeXmlNode * node_in, const gchar *name, const gchar *val); +void glade_xml_set_value (GladeXmlNode *node_in, const gchar *name, const gchar *val); /* Properties */ -gchar * glade_xml_get_property_string_required (GladeXmlNode *node_in, const gchar *name, const gchar *xtra); -gchar * glade_xml_get_property_string (GladeXmlNode *node_in, const gchar *name); +gchar *glade_xml_get_property_string_required (GladeXmlNode *node_in, const gchar *name, const gchar *xtra); +gchar *glade_xml_get_property_string (GladeXmlNode *node_in, const gchar *name); gboolean glade_xml_get_property_boolean (GladeXmlNode *node_in, const gchar *name, gboolean _default); gdouble glade_xml_get_property_double (GladeXmlNode *node_in, const gchar *name, gdouble _default); gint glade_xml_get_property_int (GladeXmlNode *node_in, const gchar *name, gint _default); @@ -229,14 +229,14 @@ void glade_xml_node_delete (GladeXmlNode *node); GladeXmlNode * glade_xml_node_get_children (GladeXmlNode *node); GladeXmlNode * glade_xml_node_get_parent (GladeXmlNode *node_in); GladeXmlNode * glade_xml_node_next (GladeXmlNode *node_in); -gboolean glade_xml_node_verify (GladeXmlNode * node_in, const gchar *name); +gboolean glade_xml_node_verify (GladeXmlNode *node_in, const gchar *name); gboolean glade_xml_node_verify_silent (GladeXmlNode *node_in, const gchar *name); const gchar * glade_xml_node_get_name (GladeXmlNode *node_in); -void glade_xml_node_append_child (GladeXmlNode * node, GladeXmlNode * child); +void glade_xml_node_append_child (GladeXmlNode * node, GladeXmlNode *child); void glade_xml_node_remove (GladeXmlNode *node_in); gboolean glade_xml_node_is_comment (GladeXmlNode *node_in); GladeXmlNode * glade_xml_node_next_with_comments (GladeXmlNode *node_in); -GladeXmlNode * glade_xml_node_prev_with_comments (GladeXmlNode * node_in); +GladeXmlNode * glade_xml_node_prev_with_comments (GladeXmlNode *node_in); GladeXmlNode * glade_xml_node_get_children_with_comments (GladeXmlNode *node); GladeXmlNode * glade_xml_node_add_prev_sibling (GladeXmlNode *node, GladeXmlNode *new_node); GladeXmlNode * glade_xml_node_add_next_sibling (GladeXmlNode *node, GladeXmlNode *new_node); @@ -254,17 +254,17 @@ GladeXmlContext * glade_xml_context_new (GladeXmlDoc *doc, const gchar *name void glade_xml_context_destroy (GladeXmlContext *context); void glade_xml_context_free (GladeXmlContext *context); GladeXmlContext * glade_xml_context_new_from_path (const gchar *full_path, - const gchar *nspace, - const gchar *root_name); + const gchar *nspace, + const gchar *root_name); GladeXmlDoc * glade_xml_context_get_doc (GladeXmlContext *context); /* Dumps an xml string from a context */ gchar * glade_xml_dump_from_context (GladeXmlContext *context); gboolean glade_xml_load_sym_from_node (GladeXmlNode *node_in, - GModule *module, - gchar *tagname, - gpointer *sym_location); + GModule *module, + gchar *tagname, + gpointer *sym_location); G_END_DECLS |