mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
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:
parent
16da0508af
commit
2a9e933d90
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
|
||||
|
@ -25,6 +25,11 @@ gtk_widget_set_rc_style ()
|
||||
restore the default style otherwise.
|
||||
This will override a previously set user style or rc style.
|
||||
|
||||
gtk_widget_restore_default_style ()
|
||||
Reset the widget's style to the default style, this is only usefull if
|
||||
the widgets default style had been saved by previous calls to
|
||||
gtk_widget_set_style() or gtk_widget_set_rc_style().
|
||||
|
||||
gtk_widget_ensure_style ()
|
||||
Ensure taht the widget either has a user style set, or an rc lookup
|
||||
has been performed.
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user