#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "psppire-syntax-window.h"
+#include "helper.h"
#include <gtk/gtk.h>
-#include <glade/glade.h>
#include <gettext.h>
#define _(msgid) gettext (msgid)
PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
struct weight_cases_dialog wcd;
- GladeXML *xml = XML_NEW ("psppire.glade");
+ GtkBuilder *xml = builder_new ("psppire.ui");
GtkWidget *dialog = get_widget_assert (xml, "weight-cases-dialog");
GtkWidget *source = get_widget_assert (xml, "weight-cases-treeview");
g_signal_connect (selector, "de-selected", G_CALLBACK (on_deselect),
radiobutton1);
- attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
- vs->dict,
- GTK_SELECTION_SINGLE,
- var_is_numeric
- );
+ g_object_set (source, "dictionary", vs->dict,
+ "selection-mode", GTK_SELECTION_SINGLE,
+ "predicate", var_is_numeric,
+ NULL);
psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
source,
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&wcd);
-
- GtkWidget *se = psppire_syntax_window_new ();
-
- gtk_text_buffer_insert_at_cursor (PSPPIRE_SYNTAX_WINDOW (se)->buffer, syntax, -1);
-
- gtk_widget_show (se);
-
+ paste_syntax_in_new_window (syntax);
g_free (syntax);
}
break;