#include "ui/gui/psppire-marshal.h"
#include "ui/gui/psppire-var-ptr.h"
-#include "ui/gui/efficient-sheet/src/jmd-datum.h"
-
#include <gobject/genums.h>
#include <gettext.h>
static GType
git (GListModel *list)
{
- return JMD_TYPE_DATUM;
+ return GTK_TYPE_BUTTON;
}
static gpointer
gi (GListModel *list, guint id)
{
- JmdDatum *gd = JMD_DATUM (g_object_new (JMD_TYPE_DATUM, NULL));
+ GtkWidget *button = gtk_button_new ();
PsppireDict *dict = PSPPIRE_DICT (list);
if (id >= psppire_dict_get_var_cnt (dict))
{
- gd->text = g_strdup (_("Var"));
+ gtk_button_set_label (GTK_BUTTON (button), _("Var"));
}
else
{
const struct variable *v = psppire_dict_get_variable (dict, id);
- gd->text = g_strdup (var_get_name (v));
- gd->label = g_strdup (var_get_label (v));
+ gtk_button_set_label (GTK_BUTTON (button), var_get_name (v));
+ gtk_widget_set_tooltip_text (button, var_get_label (v));
}
- return gd;
+ return button;
}
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
};
- The string may not contain whitespace.
- The first character may not be '$'
- The first character may not be a digit
- - The final charactor may not be '.' or '_'
+ - The final character may not be '.' or '_'
*/
len = snprintf (name, size, _("Var%04d"), d);
if (len + 1 >= size)