Re: Can't read gtk-double-click-time property
- From: Owen Taylor <otaylor redhat com>
- To: Lars Clausen <lrclause cs uiuc edu>
- Cc: gtk-list gnome org
- Subject: Re: Can't read gtk-double-click-time property
- Date: Fri, 27 Sep 2002 10:06:28 -0400 (EDT)
Lars Clausen <lrclause cs uiuc edu> writes:
> I'm trying to get the default setting for gtk-double-click-time, but can't
> seem to get it out of the GtkSettings object. Here's what I do:
>
> GtkSettings *settings = gtk_settings_get_default();
> GValue dctvalue;
> if (settings == NULL) {
> g_message(_("Couldn't get GTK settings"));
> } else {
> g_object_get(G_OBJECT(settings),
> "gtk-double-click-time", &dctvalue, NULL);
> if (g_type_is_a(G_VALUE_TYPE(&dctvalue), G_TYPE_INT)) {
> double_click_time = g_value_get_int(&dctvalue);
> }
> }
You want:
gint dctvalue
Not GValue dctvalue. g_object_get() handles the GValue manipulations
intenrally.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]