summaryrefslogtreecommitdiff
path: root/gtk/gtksettings.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2001-11-13 00:53:47 +0000
committerTim Janik <timj@src.gnome.org>2001-11-13 00:53:47 +0000
commitd07573c090f8ca8c3fdb8f4d3f63b32be96ea7d6 (patch)
treeea660dfa3bec08f14714db1b2e9699bf5f126394 /gtk/gtksettings.c
parentaebe24f2bba1a41b23ab62b7adfc867e28adb3fc (diff)
downloadgtk+-d07573c090f8ca8c3fdb8f4d3f63b32be96ea7d6.tar.gz
added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001 Tim Janik <timj@gtk.org> * added gtkaccelmap.sgml. other updates. Mon Nov 12 23:08:37 2001 Tim Janik <timj@gtk.org> * gtk/maketypes.awk: fix type utils generation on unix. * gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator registry. * gtk/gtkaccelgroup.[hc]: major API/implementation revamp: removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default, gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry, gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove, gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object. introduced ::accel_changed signal for change notification, and gtk_accel_group_connect/disconnect to connect closures to accel groups. made gtk_accel_group_attach/detach and gtk_accel_group_activate private functions. deprecated gtk_accel_group_ref/unref. * gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention to accel group changed notification and basically operate on closures. removed gtk_accel_label_get_accel_object and gtk_accel_label_set_accel_object. introduced gtk_accel_label_set_accel_closure, and for convenience, gtk_accel_label_set_accel_widget. * gtk/gtkitemfactory.[hc]: removed accelerator propagation code which mostly moved into gtkaccelmap.[hc]. removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_* and gtk_item_factory_print_func. * gtk/gtkmain.c: call _gtk_accel_map_init(). * gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(), that associates an accelerator path with menu items, through which persistent accelerator settings on menu items are enabled. * gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator paths of menu item can be default constructed to allow installation of accelerators on menu items that don't come with an accelerator binding by default. * gtk/gtksettings.c: fix STRING type rc settings by special casing them appropriately in the parser. * gtk/gtksignal.[hc]: allow a class function offset of 0 for gtk_signal_newv(). * gtk/gtkwidget.[hc]: accelerator API revamp. removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal, gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and gtk_widget_(un)lock_accelerators. accelerators maintained through gtk_widget_add/remove_accelerator() are not runtime changable now, the correct sequence to setup a widget for runtime changable accelerators is now: gtk_accel_map_add_entry(accel_path, key, mods); _gtk_widget_set_accel_path(widget, accel_path, accel_group); * gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel group changes (as well as mnemonic changes) through the new signal ::accels_changed. Sat Nov 10 12:08:56 2001 Tim Janik <timj@gtk.org> * gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle GString->string conversions.
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r--gtk/gtksettings.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index bd666813de..28f7ed8f1b 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -399,8 +399,17 @@ _gtk_settings_parse_convert (GtkRcPropertyParser parser,
if (free_gstring)
g_string_free (gstring, TRUE);
}
- else if (!G_VALUE_HOLDS (src_value, G_TYPE_GSTRING) &&
- g_value_type_transformable (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value)))
+ else if (G_VALUE_HOLDS (src_value, G_TYPE_GSTRING))
+ {
+ if (G_VALUE_HOLDS (dest_value, G_TYPE_STRING))
+ {
+ GString *gstring = g_value_get_boxed (src_value);
+
+ g_value_set_string (dest_value, gstring ? gstring->str : NULL);
+ success = !g_param_value_validate (pspec, dest_value);
+ }
+ }
+ else if (g_value_type_transformable (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value)))
success = g_param_value_convert (pspec, src_value, dest_value, TRUE);
return success;
@@ -420,7 +429,7 @@ apply_queued_setting (GtkSettings *data,
g_object_set_property (G_OBJECT (data), pspec->name, &tmp_value);
else
{
- gchar *debug = g_strdup_value_contents (&tmp_value);
+ gchar *debug = g_strdup_value_contents (&qvalue->value);
g_message ("%s: failed to retrieve property `%s' of type `%s' from rc file value \"%s\" of type `%s'",
qvalue->origin,
@@ -519,7 +528,7 @@ _gtk_rc_property_parser_from_type (GType type)
void
gtk_settings_install_property (GParamSpec *pspec)
{
- GtkRcPropertyParser parser = NULL;
+ GtkRcPropertyParser parser;
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
@@ -549,9 +558,9 @@ free_value (gpointer data)
}
void
-gtk_settings_set_property_value (GtkSettings *settings,
- const gchar *prop_name,
- const GtkSettingsValue *new_value)
+gtk_settings_set_property_value (GtkSettings *settings,
+ const gchar *prop_name,
+ const GtkSettingsValue *new_value)
{
GtkSettingsValue *qvalue;
GParamSpec *pspec;
@@ -909,7 +918,6 @@ gtk_rc_property_parse_border (const GParamSpec *pspec,
return success;
}
-
void
_gtk_settings_handle_event (GdkEventSetting *event)
{