static void
psppire_means_layer_dispose (GObject *obj)
{
- PsppireMeansLayer *w = (PsppireMeansLayer *)obj;
+ PsppireMeansLayer *w = PSPPIRE_MEANS_LAYER (obj);
if (w->dispose_has_run)
return;
}
-static void
+static void
psppire_means_layer_class_init (PsppireMeansLayerClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkTreeModel *tm = gtk_tree_view_get_model (GTK_TREE_VIEW (ml->var_view));
g_ptr_array_add (ml->layer, tm);
g_signal_connect_swapped (tm, "row-inserted", G_CALLBACK (refresh_view), ml);
-
+
g_object_ref (tm);
}
l = g_strdup_printf (_("Layer %d of %d"),
ml->current_layer + 1, ml->n_layers);
-
+
gtk_label_set_text (GTK_LABEL (ml->label), l);
g_free (l);
GtkTreeModel *tm = g_ptr_array_index (ml->layer, ml->current_layer);
g_return_if_fail (GTK_IS_TREE_MODEL (tm));
-
+
gtk_widget_set_sensitive (ml->forward,
gtk_tree_model_get_iter_first (tm, &dummy));
}
psppire_means_layer_update (ml);
}
-static void
+static void
psppire_means_layer_init (PsppireMeansLayer *ml)
{
- GtkWidget *hbox_upper = gtk_hbox_new (FALSE, 5);
- GtkWidget *hbox_lower = gtk_hbox_new (FALSE, 5);
- GtkWidget *alignment = gtk_alignment_new (0, 0.5, 0, 0);
+ GtkWidget *hbox_upper = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
+ GtkWidget *hbox_lower = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
gtk_orientable_set_orientation (GTK_ORIENTABLE (ml), GTK_ORIENTATION_VERTICAL);
-
+
ml->dispose_has_run = FALSE;
ml->forward = gtk_button_new_with_label (_("Forward"));
ml->back = gtk_button_new_with_label (_("Back"));
gtk_box_pack_start (GTK_BOX (hbox_upper), ml->label, TRUE, FALSE, 5);
gtk_box_pack_start (GTK_BOX (hbox_upper), ml->forward, FALSE, FALSE, 5);
- gtk_box_pack_start (GTK_BOX (hbox_lower), alignment, FALSE, FALSE, 5);
gtk_box_pack_start (GTK_BOX (hbox_lower), sw, TRUE, TRUE, 5);
gtk_container_add (GTK_CONTAINER (sw), ml->var_view);