mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Support using names/nicks for the gdk_settings values for enum valued
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtksettings.c (gtk_settings_get_property): Support using names/nicks for the gdk_settings values for enum valued types. (#57678, reported by Anders Carlsson)
This commit is contained in:
parent
59bdb19b0e
commit
a906e7c6a9
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Wed Dec 12 15:11:49 2001 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtksettings.c (gtk_settings_get_property): Support
|
||||||
|
using names/nicks for the gdk_settings values for enum valued
|
||||||
|
types. (#57678, reported by Anders Carlsson)
|
||||||
|
|
||||||
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
Wed Dec 12 15:01:33 2001 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
|
||||||
|
@ -276,8 +276,15 @@ gtk_settings_get_property (GObject *object,
|
|||||||
GParamSpec *pspec)
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GtkSettings *settings = GTK_SETTINGS (object);
|
GtkSettings *settings = GTK_SETTINGS (object);
|
||||||
|
GType value_type = G_VALUE_TYPE (value);
|
||||||
|
GType fundamental_type = G_TYPE_FUNDAMENTAL (value_type);
|
||||||
|
|
||||||
if (g_value_type_transformable (G_TYPE_INT, G_VALUE_TYPE (value)) ||
|
/* For enums and strings, we need to get the value as a string,
|
||||||
|
* not as an int, since we support using names/nicks as the setting
|
||||||
|
* value.
|
||||||
|
*/
|
||||||
|
if ((g_value_type_transformable (G_TYPE_INT, value_type) &&
|
||||||
|
!(fundamental_type == G_TYPE_ENUM || fundamental_type == G_TYPE_FLAGS)) ||
|
||||||
g_value_type_transformable (G_TYPE_STRING, G_VALUE_TYPE (value)) ||
|
g_value_type_transformable (G_TYPE_STRING, G_VALUE_TYPE (value)) ||
|
||||||
g_value_type_transformable (GDK_TYPE_COLOR, G_VALUE_TYPE (value)))
|
g_value_type_transformable (GDK_TYPE_COLOR, G_VALUE_TYPE (value)))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user