cleaned up ::color-hash registration to not abuse class_n_properties and
Tue Jan 30 12:09:56 2007 Tim Janik <timj@gtk.org>
* gtk/gtksettings.c: cleaned up ::color-hash registration to not abuse
class_n_properties and leave an uninitialized value array behind.
svn path=/trunk/; revision=17235
This commit is contained in:
parent
160ea46dba
commit
98170cf57e
2 changed files with 22 additions and 9 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Tue Jan 30 12:09:56 2007 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtksettings.c: cleaned up ::color-hash registration to not abuse
|
||||
class_n_properties and leave an uninitialized value array behind.
|
||||
|
||||
2007-01-29 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_select)
|
||||
|
|
|
|||
|
|
@ -620,14 +620,14 @@ gtk_settings_class_init (GtkSettingsClass *class)
|
|||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_COLOR_HASH,
|
||||
g_param_spec_boxed ("color-hash",
|
||||
P_("Color Hash"),
|
||||
P_("A hash table representation of the color scheme."),
|
||||
G_TYPE_HASH_TABLE,
|
||||
GTK_PARAM_READABLE));
|
||||
class_n_properties++;
|
||||
result = settings_install_property_parser (class,
|
||||
g_param_spec_boxed ("color-hash",
|
||||
P_("Color Hash"),
|
||||
P_("A hash table representation of the color scheme."),
|
||||
G_TYPE_HASH_TABLE,
|
||||
GTK_PARAM_READABLE),
|
||||
NULL);
|
||||
g_assert (result == PROP_COLOR_HASH);
|
||||
|
||||
result = settings_install_property_parser (class,
|
||||
g_param_spec_string ("gtk-file-chooser-backend",
|
||||
|
|
@ -777,8 +777,10 @@ gtk_settings_get_property (GObject *object,
|
|||
GType value_type = G_VALUE_TYPE (value);
|
||||
GType fundamental_type = G_TYPE_FUNDAMENTAL (value_type);
|
||||
|
||||
if (property_id == PROP_COLOR_HASH)
|
||||
/* handle internal properties */
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_COLOR_HASH:
|
||||
g_value_set_boxed (value, get_color_hash (settings));
|
||||
return;
|
||||
}
|
||||
|
|
@ -1023,6 +1025,12 @@ settings_install_property_parser (GtkSettingsClass *class,
|
|||
case G_TYPE_DOUBLE:
|
||||
case G_TYPE_STRING:
|
||||
break;
|
||||
case G_TYPE_BOXED:
|
||||
if (strcmp (g_param_spec_get_name (pspec), "color-hash") == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
default:
|
||||
if (!parser)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue