gchar * glade_gtk_widget_string_from_value (GladeWidgetAdaptor * adaptor, GladePropertyClass * klass, const GValue * value) { GParamSpec *pspec; pspec = glade_property_class_get_pspec (klass); if (pspec->value_type == GLADE_TYPE_ACCEL_GLIST) return glade_accels_make_string (g_value_get_boxed (value)); else if (pspec->value_type == GLADE_TYPE_STRING_LIST) { GList *list = g_value_get_boxed (value); return glade_string_list_to_string (list); } else return GWA_GET_CLASS (G_TYPE_OBJECT)->string_from_value (adaptor, klass, value); }
static void glade_eprop_accel_load (GladeEditorProperty * eprop, GladeProperty * property) { GladeEditorPropertyClass *parent_class = g_type_class_peek_parent (GLADE_EDITOR_PROPERTY_GET_CLASS (eprop)); GladeEPropAccel *eprop_accel = GLADE_EPROP_ACCEL (eprop); gchar *accels; /* Chain up first */ parent_class->load (eprop, property); if (property == NULL) return; if ((accels = glade_accels_make_string (g_value_get_boxed (glade_property_inline_value (property)))) != NULL) { gtk_entry_set_text (GTK_ENTRY (eprop_accel->entry), accels); g_free (accels); } else gtk_entry_set_text (GTK_ENTRY (eprop_accel->entry), ""); }