diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2004-10-26 17:40:07 +0000 |
---|---|---|
committer | David Hoover <dhoover@src.gnome.org> | 2004-10-26 17:40:07 +0000 |
commit | 80639c7c0df13c0d947d9f46eaafd329908b61d3 (patch) | |
tree | 4ef0bd4ca38c14818681b606bfc416fae193d9b1 /src/glade-gtk.c | |
parent | aad5c37c14c4cdacfb380a5f7e26df2a1b8cf100 (diff) | |
download | glade-80639c7c0df13c0d947d9f46eaafd329908b61d3.tar.gz |
CFLAGS was `-O2 -g', for now just `-g'. (Mixing these two compiler options
2004-10-26 Tristan Van Berkom <tristan.van.berkom@gmail.com>
* src/Makefile.am: CFLAGS was `-O2 -g', for now just `-g'. (Mixing
these two compiler options can cause really bad indigestion, i.e.
untracable bugs).
* src/glade-gtk.c:
- empty(): now serves as a standard noop for fill-empty functions
(as ignore() noop serves for get/set property).
- glade_gtk_fixed_post_create(): Removed useless
gtk_widget_add_events() line.
- glade_gtk_message_dialog_post_create: Fixed 155849, Message
dialog children
are now selectable usable through the UI.
- glade_gtk_fixed_fill_empty(): Obsoleted by `empty()'
* src/glade-project.c: glade_project_selection_add()/
glade_project_selection_set():
Functions no longer prematurly returns if the editor has no widget
loaded. (This is bug 155892)
* src/glade-property.c: glade_property_set() Function now takes care of
removing widgets from and adding widgets to the project if that
widget belongs to a project in the case of construct_only, also, if
that widget is in the selection list, the selection list is handled
here too.
* src/glade-widget.c:
- glade_widget_rebuild() Removed logic that handles
project/selection lists in favor of code in glade-property.c
- Added roboustness around glade_widget_set_widget() and
glade_widget_transport_children().
* widgets/gtkfixed.xml: Replaced fill-empty reference in favor of
`empty()'.
Diffstat (limited to 'src/glade-gtk.c')
-rw-r--r-- | src/glade-gtk.c | 76 |
1 files changed, 37 insertions, 39 deletions
diff --git a/src/glade-gtk.c b/src/glade-gtk.c index 78439fa9..d06c5677 100644 --- a/src/glade-gtk.c +++ b/src/glade-gtk.c @@ -531,7 +531,7 @@ glade_gtk_notebook_set_n_pages (GObject *object, GValue *value) * * TODO: write me */ -void GLADEGTK_API +static void glade_gtk_table_set_n_common (GObject *object, GValue *value, gboolean for_rows) { GladeWidget *widget; @@ -755,9 +755,10 @@ glade_gtk_statusbar_set_has_resize_grip (GObject *object, GValue *value) * @value: a #GValue * * This function does absolutely nothing + * (and is for use in overriding fill_empty functions). */ void GLADEGTK_API -empty (GObject *object, GValue *value) +empty (GObject *container) { } @@ -959,12 +960,6 @@ glade_gtk_fixed_post_create (GObject *object) * mouse events */ GTK_WIDGET_UNSET_FLAGS(object, GTK_NO_WINDOW); - gtk_widget_add_events(GTK_WIDGET(object), - GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | - GDK_ENTER_NOTIFY_MASK | - GDK_LEAVE_NOTIFY_MASK); - /* For backing pixmap */ g_signal_connect_after(object, "realize", @@ -1108,6 +1103,7 @@ glade_gtk_dialog_post_create (GObject *object) gtk_window_set_default_size (GTK_WINDOW (dialog), 320, 260); } + /** * glade_gtk_message_dialog_post_create: * @object: @@ -1117,13 +1113,44 @@ glade_gtk_dialog_post_create (GObject *object) void GLADEGTK_API glade_gtk_message_dialog_post_create (GObject *object) { - GtkMessageDialog *dialog = GTK_MESSAGE_DIALOG (object); - + GtkDialog *dialog = GTK_DIALOG (object); + GladeWidget *widget; + GladeWidget *vbox_widget; + GladeWidget *actionarea_widget; + GladeWidgetClass *child_class; + g_return_if_fail (GTK_IS_MESSAGE_DIALOG (dialog)); + widget = glade_widget_get_from_gtk_widget (GTK_WIDGET (dialog)); + if (!widget) + return; + + + /* create the GladeWidgets for internal children */ + child_class = glade_widget_class_get_by_name ("GtkVBox"); + if (!child_class) + return; + + vbox_widget = glade_widget_new_for_internal_child (child_class, widget, + dialog->vbox, "vbox"); + if (!vbox_widget) + return; + + child_class = glade_widget_class_get_by_name ("GtkHButtonBox"); + if (!child_class) + return; + + actionarea_widget = + glade_widget_new_for_internal_child + (child_class, vbox_widget, dialog->action_area, "action_area"); + if (!actionarea_widget) + return; + + gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 115); } + #if 0 void GLADEGTK_API glade_gtk_table_post_create (GObject *object) @@ -1193,27 +1220,6 @@ glade_gtk_container_replace_child (GtkWidget *current, g_free (param_spec); g_free (value); - -#if 0 - /* If there is still no reason to keep this around come release - * time, kill it. - */ - - gtk_widget_unparent (child_info->widget); - child_info->widget = new; - gtk_widget_set_parent (child_info->widget, GTK_WIDGET (container)); - - /* */ - child = new; - if (GTK_WIDGET_REALIZED (container)) - gtk_widget_realize (child); - if (GTK_WIDGET_VISIBLE (container) && GTK_WIDGET_VISIBLE (child)) { - if (GTK_WIDGET_MAPPED (container)) - gtk_widget_map (child); - gtk_widget_queue_resize (child); - } - /* */ -#endif } /** @@ -1279,14 +1285,6 @@ glade_gtk_container_fill_empty (GObject *container) gtk_container_add (GTK_CONTAINER (container), glade_placeholder_new ()); } -void GLADEGTK_API -glade_gtk_fixed_fill_empty (GObject *fixed) -{ - /* This is here purly to override `glade_gtk_container_fill_empty()' - * there is to be no placeholder by default. - */ -} - /** * glade_gtk_dialog_fill_empty: * @dialog: |