#include "ui/gui/psppire-marshal.h"
#include "ui/gui/psppire-var-ptr.h"
-#include "ui/gui/efficient-sheet/jmd-datum.h"
+#include <ssw-datum.h>
#include <gobject/genums.h>
static GType
git (GListModel *list)
{
- return JMD_TYPE_DATUM;
+ return SSW_TYPE_DATUM;
}
static gpointer
gi (GListModel *list, guint id)
{
- JmdDatum *gd = JMD_DATUM (g_object_new (JMD_TYPE_DATUM, NULL));
+ SswDatum *gd = SSW_DATUM (g_object_new (SSW_TYPE_DATUM, NULL));
PsppireDict *dict = PSPPIRE_DICT (list);
-
+
if (id >= psppire_dict_get_var_cnt (dict))
{
gd->text = g_strdup (_("Var"));
static void
-jmd_init_iface (GListModelInterface *iface)
+ssw_init_iface (GListModelInterface *iface)
{
iface->get_n_items = gni;
iface->get_item = gi;
};
static const GInterfaceInfo list_model_info = {
- (GInterfaceInitFunc) jmd_init_iface,
+ (GInterfaceInitFunc) ssw_init_iface,
NULL,
NULL
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"PsppireDict",
&object_info, 0);
-
+
g_type_add_interface_static (object_type, GTK_TYPE_TREE_MODEL,
&tree_model_info);
parent_class = g_type_class_peek_parent (class);
object_class->dispose = psppire_dict_dispose;
-
+
signals [VARIABLE_CHANGED] =
g_signal_new ("variable-changed",
G_TYPE_FROM_CLASS (class),
{
PsppireDict *new_dict = g_object_new (PSPPIRE_TYPE_DICT, NULL);
new_dict->dict = d;
-
+
dict_set_callbacks (new_dict->dict, &gui_callbacks, new_dict);
return new_dict;
guint old_n = dict_get_var_cnt (dict->dict);
guint new_n = dict_get_var_cnt (d);
-
+
dict->dict = d;
weight_changed_callback (d, var ? var_get_dict_index (var) : -1, dict);
g_signal_emit (d, signals[VARIABLE_INSERTED], 0, idx);
g_signal_emit_by_name (d, "items-changed", idx, 0, 1);
-
+
return var;
}
}
-/* Return true is NAME would be a valid name of a variable to add to the
+/* Return true if NAME would be a valid name of a variable to add to the
dictionary. False otherwise.
If REPORT is true, then invalid names will be reported as such as errors
*/
g_return_val_if_fail (PSPPIRE_IS_DICT (model), (GType) 0);
GType t = 0;
-
+
switch (index)
{
case DICT_TVM_COL_NAME:
var = iter->user_data;
const struct fmt_spec *fs = var_get_write_format (var);
-
+
switch (column)
{
case DICT_TVM_COL_NAME: