hm if we save the default style, we should also provide a function to

Sun Mar  1 18:41:07 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkwidget.c (gtk_widget_restore_default_style): hm if we save the
        default style, we should also provide a function to restore it ;).

        * gtk/main.[hc]: small fixups to idle handlers, added support for quit
        handlers.
This commit is contained in:
Tim Janik
1998-03-01 17:44:24 +00:00
committed by Tim Janik
parent 16da0508af
commit 2a9e933d90
9 changed files with 79 additions and 0 deletions

View File

@ -2411,6 +2411,24 @@ gtk_widget_set_rc_style (GtkWidget *widget)
}
}
void
gtk_widget_restore_default_style (GtkWidget *widget)
{
GtkStyle *default_style;
g_return_if_fail (widget != NULL);
GTK_PRIVATE_UNSET_FLAG (widget, GTK_USER_STYLE);
default_style = gtk_object_get_data (GTK_OBJECT (widget), saved_default_style_key);
if (default_style)
{
gtk_object_remove_data (GTK_OBJECT (widget), saved_default_style_key);
gtk_widget_set_style_internal (widget, default_style, FALSE);
gtk_style_unref (default_style);
}
}
GtkStyle*
gtk_widget_get_style (GtkWidget *widget)
{