gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary", scd.dict,
+ g_object_set (dict_view, "model", scd.dict,
"selection-mode", GTK_SELECTION_SINGLE,
NULL);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &dict, NULL);
- g_object_set (source, "dictionary", dict, NULL);
+ g_object_set (source, "model", dict, NULL);
set_dest_model (GTK_TREE_VIEW (dest_rows), dict);
set_dest_model (GTK_TREE_VIEW (dest_cols), dict);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
- g_object_set (source, "dictionary", dict,
+ g_object_set (source, "model", dict,
"predicate", var_is_numeric, NULL);
set_dest_model (GTK_TREE_VIEW (dest), dict);
gtk_window_set_transient_for (GTK_WINDOW (ex_d.opts_dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &ex_d.dict, NULL);
- g_object_set (source, "dictionary", ex_d.dict, NULL);
+ g_object_set (source, "model", ex_d.dict, NULL);
set_dest_model (GTK_TREE_VIEW (ex_d.dep_list), ex_d.dict);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
- g_object_set (source, "dictionary", fd.dict,
+ g_object_set (source, "model", fd.dict,
"selection-mode", GTK_SELECTION_SINGLE,
NULL);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &fd.dict, NULL);
- g_object_set (source, "dictionary", fd.dict, NULL);
+ g_object_set (source, "model", fd.dict, NULL);
set_dest_model (GTK_TREE_VIEW (dest), fd.dict);
gtk_window_set_transient_for (ow.dialog, GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary", ow.dict, NULL);
+ g_object_set (dict_view, "model", ow.dict, NULL);
set_dest_model (GTK_TREE_VIEW (ow.vars_treeview), ow.dict);
enum
{
PROP_0,
- PROP_MODEL,
PROP_DICTIONARY,
PROP_PREDICATE,
PROP_SELECTION_MODE
case PROP_DICTIONARY:
dict_view->dict = g_value_get_object (value);
break;
- case PROP_MODEL:
- g_critical ("Don't set the \"model\" property on %s. "
- "Use the \"dictionary\" property instead.",
- G_OBJECT_TYPE_NAME (dict_view));
- break;
case PROP_PREDICATE:
dict_view->predicate = g_value_get_pointer (value);
break;
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- GParamSpec *dictionary_spec =
- g_param_spec_object ("dictionary",
- "Dictionary",
- _("The dictionary to be displayed by this widget"),
- PSPPIRE_TYPE_DICT,
- G_PARAM_READABLE | G_PARAM_WRITABLE);
-
GParamSpec *predicate_spec =
g_param_spec_pointer ("predicate",
"Predicate",
GTK_SELECTION_MULTIPLE,
G_PARAM_CONSTRUCT | G_PARAM_READABLE | G_PARAM_WRITABLE);
-
- GParamSpec *dummy_spec =
- g_param_spec_pointer ("model",
- "Model",
- "Don't set the property",
- G_PARAM_WRITABLE);
-
object_class->set_property = psppire_dict_view_set_property;
object_class->get_property = psppire_dict_view_get_property;
- g_object_class_install_property (object_class,
- PROP_MODEL,
- dummy_spec);
-
- g_object_class_install_property (object_class,
- PROP_DICTIONARY,
- dictionary_spec);
+ g_object_class_override_property (object_class,
+ PROP_DICTIONARY,
+ "model");
g_object_class_install_property (object_class,
PROP_PREDICATE,
static void
dv_get_base_model (GtkTreeModel *top_model, GtkTreeIter *top_iter,
- GtkTreeModel **model, GtkTreeIter *iter
- )
+ GtkTreeModel **model, GtkTreeIter *iter)
{
*model = top_model;
if ( NULL == selector->source )
return;
- g_signal_connect_swapped (selector->source, "notify::dictionary",
- G_CALLBACK (update_subjects), selector);
-
g_signal_connect_swapped (selector->source, "notify::model",
G_CALLBACK (update_subjects), selector);
gtk_window_set_transient_for (GTK_WINDOW (rd.dialog), GTK_WINDOW (de));
- g_object_set (vars, "dictionary", rd.dict, NULL);
+ g_object_set (vars, "model", rd.dict, NULL);
set_dest_model (GTK_TREE_VIEW (rd.rank_vars), rd.dict);
gtk_window_set_transient_for (GTK_WINDOW (rd.dialog), GTK_WINDOW (de));
- g_object_set (rd.dict_treeview, "dictionary", rd.dict, NULL);
+ g_object_set (rd.dict_treeview, "model", rd.dict, NULL);
if ( ! rd.different )
{
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &rd.dict, NULL);
- g_object_set (source, "dictionary", rd.dict, NULL);
+ g_object_set (source, "model", rd.dict, NULL);
set_dest_model (GTK_TREE_VIEW (dest_dep), rd.dict);
set_dest_model (GTK_TREE_VIEW (dest_indep), rd.dict);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &rd.dict, NULL);
- g_object_set (source, "dictionary", rd.dict, NULL);
+ g_object_set (source, "model", rd.dict, NULL);
set_dest_model (GTK_TREE_VIEW (rd.variables), rd.dict);
{
GtkWidget *source = get_widget_assert (scd.xml, "select-cases-treeview");
- g_object_set (source, "dictionary",
+ g_object_set (source, "model",
scd.data_store->dict,
"selection-mode",
GTK_SELECTION_SINGLE, NULL);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &scd.dict, NULL);
- g_object_set (source, "dictionary", scd.dict, NULL);
+ g_object_set (source, "model", scd.dict, NULL);
set_dest_model (GTK_TREE_VIEW (dest), scd.dict);
sfd.selector = PSPPIRE_SELECTOR (
get_widget_assert (sfd.xml, "split-file-selector"));
- g_object_set (source, "dictionary", sfd.dict, NULL);
+ g_object_set (source, "model", sfd.dict, NULL);
g_signal_connect (on_off, "toggled", G_CALLBACK(on_off_toggled), sfd.xml);
gtk_window_set_transient_for (GTK_WINDOW (tt_d.dialog), GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary", tt_d.dict, NULL);
+ g_object_set (dict_view, "model", tt_d.dict, NULL);
set_dest_model (GTK_TREE_VIEW (test_variables_treeview), tt_d.dict);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary",
+ g_object_set (dict_view, "model",
tt_d.dict,
"predicate",
var_is_numeric, NULL);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
- g_object_set (dict_view, "dictionary", tt_d.dict,
+ g_object_set (dict_view, "model", tt_d.dict,
"predicate",
var_is_numeric, NULL);
g_object_get (de->data_editor, "var-store", &vs, NULL);
g_object_get (vs, "dictionary", &dict, NULL);
- g_object_set (source, "dictionary", dict, NULL);
+ g_object_set (source, "model", dict, NULL);
set_dest_model (GTK_TREE_VIEW (dest), dict);
struct val_labs_dialog *dialog = g_malloc (sizeof (*dialog));
dialog->var_store = var_store;
- g_object_get (var_store, "dictionary", &dialog->dict, NULL);
+ g_object_get (var_store, "model", &dialog->dict, NULL);
dialog->window = get_widget_assert (xml,"val_labs_dialog");
dialog->value_entry = get_widget_assert (xml,"value_entry");
dialog->label_entry = get_widget_assert (xml,"label_entry");
if ( var == NULL)
return;
- g_object_get (treeview, "dictionary", &dict,
+ g_object_get (treeview, "model", &dict,
NULL);
gstring = g_string_sized_new (200);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_object_get (vs, "dictionary", &dict, NULL);
- g_object_set (treeview, "dictionary", dict,
+ g_object_set (treeview, "model", dict,
"selection-mode", GTK_SELECTION_SINGLE,
NULL);
radiobutton1);
- g_object_set (source, "dictionary", wcd.dict,
+ g_object_set (source, "model", wcd.dict,
"selection-mode", GTK_SELECTION_SINGLE,
"predicate", var_is_numeric,
NULL);