handle box signals. fixups for 99.4 -timj
handle box signals. fixups for 99.4 -timj
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
|
Sat Feb 28 19:29:09 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
|
* gtk/gtkclist.c (gtk_clist_new_with_titles): retrive the clist widget
|
||||||
|
from gtk_type_new (gtk_clist_get_type ()), not gtk_clist_new(),
|
||||||
|
otherwise gtk_clist_construct() gets called twice.
|
||||||
|
|
||||||
|
* gtk/gtkhandlebox.h:
|
||||||
|
* gtk/gtkhandlebox.c: emit signals when the child is attached/detached.
|
||||||
|
|
||||||
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
Sat Feb 28 15:18:36 1998 Tim Janik <timj@gimp.org>
|
||||||
|
|
||||||
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
* gtk/gtkpreview.c: fix behavior of gtk_preview_put() with
|
||||||
|
|||||||
1
NEWS
1
NEWS
@ -22,6 +22,7 @@ Forthcoming Changes for GTK+ 0.99.4:
|
|||||||
g_string_hash() -> g_str_hash()
|
g_string_hash() -> g_str_hash()
|
||||||
g_string_equal() -> g_str_equal()
|
g_string_equal() -> g_str_equal()
|
||||||
gtk_tooltips_set_tips() -> gtk_tooltips_set_tip()
|
gtk_tooltips_set_tips() -> gtk_tooltips_set_tip()
|
||||||
|
* Motif window mangaer hints support.
|
||||||
* Clean ups and many many bug fixes by a lot of people all over the place.
|
* Clean ups and many many bug fixes by a lot of people all over the place.
|
||||||
* New, long and descriptive ChangeLog entries for bored readers ;)
|
* New, long and descriptive ChangeLog entries for bored readers ;)
|
||||||
|
|
||||||
|
|||||||
@ -467,19 +467,14 @@ GtkWidget *
|
|||||||
gtk_clist_new_with_titles (gint columns,
|
gtk_clist_new_with_titles (gint columns,
|
||||||
gchar * titles[])
|
gchar * titles[])
|
||||||
{
|
{
|
||||||
GtkCList *clist;
|
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
|
||||||
if (titles == NULL)
|
g_return_val_if_fail (titles != NULL, NULL);
|
||||||
return NULL;
|
|
||||||
|
|
||||||
widget = gtk_clist_new (columns);
|
widget = gtk_type_new (gtk_clist_get_type ());
|
||||||
if (!widget)
|
|
||||||
return NULL;
|
gtk_clist_construct (GTK_CLIST (widget), columns, titles);
|
||||||
else
|
|
||||||
clist = GTK_CLIST (widget);
|
|
||||||
|
|
||||||
gtk_clist_construct (clist, columns, titles);
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -255,8 +255,8 @@ gtk_combo_popup_list (GtkButton * button, GtkCombo * combo)
|
|||||||
gtk_widget_set_uposition (combo->popwin, x, y);
|
gtk_widget_set_uposition (combo->popwin, x, y);
|
||||||
gtk_widget_set_usize (combo->popwin, width, height);
|
gtk_widget_set_usize (combo->popwin, width, height);
|
||||||
gtk_widget_realize (combo->popwin);
|
gtk_widget_realize (combo->popwin);
|
||||||
gdk_window_set_cursor (combo->popwin->window,
|
/* gdk_window_set_cursor (combo->popwin->window, gdk_cursor_new (GDK_TOP_LEFT_ARROW));
|
||||||
gdk_cursor_new (GDK_TOP_LEFT_ARROW));
|
*/
|
||||||
gdk_window_resize (combo->popwin->window, width, height);
|
gdk_window_resize (combo->popwin->window, width, height);
|
||||||
gtk_widget_show (combo->popwin);
|
gtk_widget_show (combo->popwin);
|
||||||
gtk_widget_grab_focus (combo->popwin);
|
gtk_widget_grab_focus (combo->popwin);
|
||||||
|
|||||||
@ -71,6 +71,7 @@ static gint gtk_handle_box_delete_float (GtkWidget *widget,
|
|||||||
|
|
||||||
|
|
||||||
static GtkBinClass *parent_class;
|
static GtkBinClass *parent_class;
|
||||||
|
static gint handle_box_signals[SIGNAL_LAST] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
guint
|
guint
|
||||||
@ -97,6 +98,19 @@ gtk_handle_box_get_type (void)
|
|||||||
return handle_box_type;
|
return handle_box_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_handle_box_marshal_child_attached (GtkObject *object,
|
||||||
|
GtkSignalFunc func,
|
||||||
|
gpointer func_data,
|
||||||
|
GtkArg *args)
|
||||||
|
{
|
||||||
|
SignalChildAttached sfunc = (SignalChildAttached) func;
|
||||||
|
|
||||||
|
(* sfunc) (object,
|
||||||
|
(GtkWidget*) GTK_VALUE_OBJECT (args[0]),
|
||||||
|
func_data);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_handle_box_class_init (GtkHandleBoxClass *class)
|
gtk_handle_box_class_init (GtkHandleBoxClass *class)
|
||||||
{
|
{
|
||||||
@ -108,6 +122,24 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
|
|||||||
|
|
||||||
parent_class = gtk_type_class (gtk_bin_get_type ());
|
parent_class = gtk_type_class (gtk_bin_get_type ());
|
||||||
|
|
||||||
|
handle_box_signals[SIGNAL_CHILD_ATTACHED] =
|
||||||
|
gtk_signal_new ("child_attached",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GtkHandleBoxClass, child_attached),
|
||||||
|
gtk_handle_box_marshal_child_attached,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_WIDGET);
|
||||||
|
handle_box_signals[SIGNAL_CHILD_DETACHED] =
|
||||||
|
gtk_signal_new ("child_detached",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GtkHandleBoxClass, child_detached),
|
||||||
|
gtk_handle_box_marshal_child_attached,
|
||||||
|
GTK_TYPE_NONE, 1,
|
||||||
|
GTK_TYPE_WIDGET);
|
||||||
|
gtk_object_class_add_signals (object_class, handle_box_signals, SIGNAL_LAST);
|
||||||
|
|
||||||
object_class->destroy = gtk_handle_box_destroy;
|
object_class->destroy = gtk_handle_box_destroy;
|
||||||
|
|
||||||
widget_class->map = gtk_handle_box_map;
|
widget_class->map = gtk_handle_box_map;
|
||||||
@ -602,6 +634,10 @@ gtk_handle_box_motion (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_widget_hide (hb->float_window);
|
gtk_widget_hide (hb->float_window);
|
||||||
|
|
||||||
|
gtk_signal_emit (GTK_OBJECT (hb),
|
||||||
|
handle_box_signals[SIGNAL_CHILD_ATTACHED],
|
||||||
|
GTK_BIN (hb)->child);
|
||||||
|
|
||||||
while (gdk_pointer_grab (widget->window,
|
while (gdk_pointer_grab (widget->window,
|
||||||
FALSE,
|
FALSE,
|
||||||
(GDK_BUTTON1_MOTION_MASK
|
(GDK_BUTTON1_MOTION_MASK
|
||||||
@ -634,6 +670,10 @@ gtk_handle_box_motion (GtkWidget *widget,
|
|||||||
gdk_window_reparent (widget->window, hb->float_window->window, 0, 0);
|
gdk_window_reparent (widget->window, hb->float_window->window, 0, 0);
|
||||||
gtk_widget_show (hb->float_window);
|
gtk_widget_show (hb->float_window);
|
||||||
|
|
||||||
|
gtk_signal_emit (GTK_OBJECT (hb),
|
||||||
|
handle_box_signals[SIGNAL_CHILD_DETACHED],
|
||||||
|
GTK_BIN (hb)->child);
|
||||||
|
|
||||||
while (gdk_pointer_grab (widget->window,
|
while (gdk_pointer_grab (widget->window,
|
||||||
FALSE,
|
FALSE,
|
||||||
(GDK_BUTTON1_MOTION_MASK
|
(GDK_BUTTON1_MOTION_MASK
|
||||||
@ -669,6 +709,11 @@ gtk_handle_box_delete_float (GtkWidget *widget,
|
|||||||
|
|
||||||
gdk_window_reparent (GTK_WIDGET (hb)->window, hb->steady_window, 0, 0);
|
gdk_window_reparent (GTK_WIDGET (hb)->window, hb->steady_window, 0, 0);
|
||||||
gtk_widget_hide (hb->float_window);
|
gtk_widget_hide (hb->float_window);
|
||||||
|
|
||||||
|
gtk_signal_emit (GTK_OBJECT (hb),
|
||||||
|
handle_box_signals[SIGNAL_CHILD_ATTACHED],
|
||||||
|
GTK_BIN (hb)->child);
|
||||||
|
|
||||||
gtk_widget_queue_resize (GTK_WIDGET (hb));
|
gtk_widget_queue_resize (GTK_WIDGET (hb));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@ -235,7 +235,7 @@ static const gchar *event_key = "gtk-event-mask";
|
|||||||
static const gchar *extension_event_key = "gtk-extension-event-mode";
|
static const gchar *extension_event_key = "gtk-extension-event-mode";
|
||||||
static const gchar *parent_window_key = "gtk-parent-window";
|
static const gchar *parent_window_key = "gtk-parent-window";
|
||||||
static const gchar *shape_info_key = "gtk-shape-info";
|
static const gchar *shape_info_key = "gtk-shape-info";
|
||||||
static const gchar *saved_default_style = "gtk-saved-default-style";
|
static const gchar *saved_default_style_key = "gtk-saved-default-style";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2349,11 +2349,11 @@ gtk_widget_set_style (GtkWidget *widget,
|
|||||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_RC_STYLE);
|
GTK_WIDGET_UNSET_FLAGS (widget, GTK_RC_STYLE);
|
||||||
GTK_PRIVATE_SET_FLAG (widget, GTK_USER_STYLE);
|
GTK_PRIVATE_SET_FLAG (widget, GTK_USER_STYLE);
|
||||||
|
|
||||||
default_style = gtk_object_get_data (GTK_OBJECT (widget), saved_default_style);
|
default_style = gtk_object_get_data (GTK_OBJECT (widget), saved_default_style_key);
|
||||||
if (!default_style)
|
if (!default_style)
|
||||||
{
|
{
|
||||||
gtk_style_ref (widget->style);
|
gtk_style_ref (widget->style);
|
||||||
gtk_object_set_data (GTK_OBJECT (widget), saved_default_style, widget->style);
|
gtk_object_set_data (GTK_OBJECT (widget), saved_default_style_key, widget->style);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_set_style_internal (widget, style, initial_emission);
|
gtk_widget_set_style_internal (widget, style, initial_emission);
|
||||||
@ -2381,14 +2381,14 @@ gtk_widget_set_rc_style (GtkWidget *widget)
|
|||||||
GTK_PRIVATE_UNSET_FLAG (widget, GTK_USER_STYLE);
|
GTK_PRIVATE_UNSET_FLAG (widget, GTK_USER_STYLE);
|
||||||
GTK_WIDGET_SET_FLAGS (widget, GTK_RC_STYLE);
|
GTK_WIDGET_SET_FLAGS (widget, GTK_RC_STYLE);
|
||||||
|
|
||||||
saved_style = gtk_object_get_data (GTK_OBJECT (widget), saved_default_style);
|
saved_style = gtk_object_get_data (GTK_OBJECT (widget), saved_default_style_key);
|
||||||
new_style = gtk_rc_get_style (widget);
|
new_style = gtk_rc_get_style (widget);
|
||||||
if (new_style)
|
if (new_style)
|
||||||
{
|
{
|
||||||
if (!saved_style)
|
if (!saved_style)
|
||||||
{
|
{
|
||||||
gtk_style_ref (widget->style);
|
gtk_style_ref (widget->style);
|
||||||
gtk_object_set_data (GTK_OBJECT (widget), saved_default_style, widget->style);
|
gtk_object_set_data (GTK_OBJECT (widget), saved_default_style_key, widget->style);
|
||||||
}
|
}
|
||||||
gtk_widget_set_style_internal (widget, new_style, initial_emission);
|
gtk_widget_set_style_internal (widget, new_style, initial_emission);
|
||||||
}
|
}
|
||||||
@ -2398,7 +2398,7 @@ gtk_widget_set_rc_style (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
g_assert (initial_emission == FALSE); /* FIXME: remove this line */
|
g_assert (initial_emission == FALSE); /* FIXME: remove this line */
|
||||||
|
|
||||||
gtk_object_remove_data (GTK_OBJECT (widget), saved_default_style);
|
gtk_object_remove_data (GTK_OBJECT (widget), saved_default_style_key);
|
||||||
gtk_widget_set_style_internal (widget, saved_style, initial_emission);
|
gtk_widget_set_style_internal (widget, saved_style, initial_emission);
|
||||||
gtk_style_unref (saved_style);
|
gtk_style_unref (saved_style);
|
||||||
}
|
}
|
||||||
@ -3297,6 +3297,7 @@ static void
|
|||||||
gtk_widget_real_destroy (GtkObject *object)
|
gtk_widget_real_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
GtkWidget *widget = GTK_WIDGET (object);
|
GtkWidget *widget = GTK_WIDGET (object);
|
||||||
|
GtkStyle *saved_style;
|
||||||
|
|
||||||
gtk_widget_ref (widget);
|
gtk_widget_ref (widget);
|
||||||
|
|
||||||
@ -3321,6 +3322,13 @@ gtk_widget_real_destroy (GtkObject *object)
|
|||||||
if (widget->parent)
|
if (widget->parent)
|
||||||
gtk_container_remove (GTK_CONTAINER (widget->parent), widget);
|
gtk_container_remove (GTK_CONTAINER (widget->parent), widget);
|
||||||
|
|
||||||
|
saved_style = gtk_object_get_data (GTK_OBJECT (widget), saved_default_style_key);
|
||||||
|
if (saved_style)
|
||||||
|
{
|
||||||
|
gtk_style_unref (saved_style);
|
||||||
|
gtk_object_remove_data (GTK_OBJECT (widget), saved_default_style_key);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_style_unref (widget->style);
|
gtk_style_unref (widget->style);
|
||||||
widget->style = NULL;
|
widget->style = NULL;
|
||||||
|
|
||||||
|
|||||||
@ -938,6 +938,17 @@ create_statusbar ()
|
|||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
handle_box_child_signal (GtkHandleBox *hb,
|
||||||
|
GtkWidget *child,
|
||||||
|
const gchar *action)
|
||||||
|
{
|
||||||
|
printf ("%s: child <%s> %sed\n",
|
||||||
|
gtk_type_name (GTK_OBJECT_TYPE (hb)),
|
||||||
|
gtk_type_name (GTK_OBJECT_TYPE (child)),
|
||||||
|
action);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_handle_box ()
|
create_handle_box ()
|
||||||
{
|
{
|
||||||
@ -960,6 +971,14 @@ create_handle_box ()
|
|||||||
|
|
||||||
hbox = gtk_handle_box_new ();
|
hbox = gtk_handle_box_new ();
|
||||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (hbox),
|
||||||
|
"child_attached",
|
||||||
|
GTK_SIGNAL_FUNC (handle_box_child_signal),
|
||||||
|
"attached");
|
||||||
|
gtk_signal_connect (GTK_OBJECT (hbox),
|
||||||
|
"child_detached",
|
||||||
|
GTK_SIGNAL_FUNC (handle_box_child_signal),
|
||||||
|
"detached");
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
toolbar = make_toolbar (window);
|
toolbar = make_toolbar (window);
|
||||||
@ -1056,7 +1075,7 @@ create_reparent ()
|
|||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (box3), label, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (box3), label, FALSE, TRUE, 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (label),
|
gtk_signal_connect (GTK_OBJECT (label),
|
||||||
"set_parent",
|
"parent_set",
|
||||||
GTK_SIGNAL_FUNC (set_parent_signal),
|
GTK_SIGNAL_FUNC (set_parent_signal),
|
||||||
(GtkObject*) 42);
|
(GtkObject*) 42);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|||||||
@ -938,6 +938,17 @@ create_statusbar ()
|
|||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
handle_box_child_signal (GtkHandleBox *hb,
|
||||||
|
GtkWidget *child,
|
||||||
|
const gchar *action)
|
||||||
|
{
|
||||||
|
printf ("%s: child <%s> %sed\n",
|
||||||
|
gtk_type_name (GTK_OBJECT_TYPE (hb)),
|
||||||
|
gtk_type_name (GTK_OBJECT_TYPE (child)),
|
||||||
|
action);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_handle_box ()
|
create_handle_box ()
|
||||||
{
|
{
|
||||||
@ -960,6 +971,14 @@ create_handle_box ()
|
|||||||
|
|
||||||
hbox = gtk_handle_box_new ();
|
hbox = gtk_handle_box_new ();
|
||||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||||
|
gtk_signal_connect (GTK_OBJECT (hbox),
|
||||||
|
"child_attached",
|
||||||
|
GTK_SIGNAL_FUNC (handle_box_child_signal),
|
||||||
|
"attached");
|
||||||
|
gtk_signal_connect (GTK_OBJECT (hbox),
|
||||||
|
"child_detached",
|
||||||
|
GTK_SIGNAL_FUNC (handle_box_child_signal),
|
||||||
|
"detached");
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
toolbar = make_toolbar (window);
|
toolbar = make_toolbar (window);
|
||||||
@ -1056,7 +1075,7 @@ create_reparent ()
|
|||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (box3), label, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (box3), label, FALSE, TRUE, 0);
|
||||||
gtk_signal_connect (GTK_OBJECT (label),
|
gtk_signal_connect (GTK_OBJECT (label),
|
||||||
"set_parent",
|
"parent_set",
|
||||||
GTK_SIGNAL_FUNC (set_parent_signal),
|
GTK_SIGNAL_FUNC (set_parent_signal),
|
||||||
(GtkObject*) 42);
|
(GtkObject*) 42);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
|
|||||||
Reference in New Issue
Block a user