mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
don't destroy a buttons child if it isn't a label.
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org> * gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons child if it isn't a label.
This commit is contained in:
parent
a91be9352f
commit
7702d2f8fc
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
child if it isn't a label.
|
||||||
|
|
||||||
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 11:41:38 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkdialog.h:
|
* gtk/gtkdialog.h:
|
||||||
|
@ -234,16 +234,18 @@ gtk_button_set_arg (GtkObject *object,
|
|||||||
|
|
||||||
switch (arg_id)
|
switch (arg_id)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *child;
|
||||||
|
|
||||||
case ARG_LABEL:
|
case ARG_LABEL:
|
||||||
if (GTK_BIN (button)->child)
|
child = GTK_BIN (button)->child;
|
||||||
gtk_container_remove (GTK_CONTAINER (button), GTK_BIN (button)->child);
|
if (!child)
|
||||||
|
child = gtk_widget_new (GTK_TYPE_LABEL,
|
||||||
label = gtk_label_new (GTK_VALUE_STRING(*arg) ? GTK_VALUE_STRING(*arg) : "");
|
"visible", TRUE,
|
||||||
gtk_widget_show (label);
|
"parent", button,
|
||||||
|
NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (button), label);
|
if (GTK_IS_LABEL (child))
|
||||||
|
gtk_label_set (GTK_LABEL (child),
|
||||||
|
GTK_VALUE_STRING (*arg) ? GTK_VALUE_STRING (*arg) : "");
|
||||||
break;
|
break;
|
||||||
case ARG_RELIEF:
|
case ARG_RELIEF:
|
||||||
gtk_button_set_relief (button, GTK_VALUE_ENUM (*arg));
|
gtk_button_set_relief (button, GTK_VALUE_ENUM (*arg));
|
||||||
|
Loading…
Reference in New Issue
Block a user