de->dict = g_value_get_pointer (value);
g_object_ref (de->dict);
- g_object_set (de->data_sheet, "hmodel", de->dict, NULL);
g_object_set (de->var_sheet, "data-model", de->dict, NULL);
break;
case PROP_VALUE_LABELS:
return GTK_WIDGET (obj);
}
+static void
+set_dictionary (PsppireDataSheet *sheet)
+{
+ GtkTreeModel *data_model = NULL;
+ g_object_get (sheet, "data-model", &data_model, NULL);
+
+ PsppireDataStore *store = PSPPIRE_DATA_STORE (data_model);
+ g_object_set (sheet, "hmodel", store->dict, NULL);
+}
static void
psppire_data_sheet_init (PsppireDataSheet *sheet)
g_signal_connect (sheet, "value-changed",
G_CALLBACK (change_data_value), NULL);
+
+ g_signal_connect (sheet, "notify::data-model",
+ G_CALLBACK (set_dictionary), NULL);
}