#include <libpspp/message.h>
#include <stdlib.h>
-
#include "psppire-syntax-window.h"
-#include "data-editor.h"
+#include "psppire-data-window.h"
+#include "psppire-window-register.h"
#include "about.h"
#include "psppire-syntax-window.h"
#include "syntax-editor-source.h"
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
-
-
static void psppire_syntax_window_base_finalize (PsppireSyntaxWindowClass *, gpointer);
static void psppire_syntax_window_base_init (PsppireSyntaxWindowClass *class);
static void psppire_syntax_window_class_init (PsppireSyntaxWindowClass *class);
static void psppire_syntax_window_init (PsppireSyntaxWindow *syntax_editor);
-
GType
psppire_syntax_window_get_type (void)
{
return psppire_syntax_window_type;
}
-
static void
psppire_syntax_window_finalize (GObject *object)
{
- g_debug ("%s %p", __FUNCTION__, object);
-
GObjectClass *class = G_OBJECT_GET_CLASS (object);
- GObjectClass *parent_class = g_type_class_peek_parent (class);
+ PsppireSyntaxWindow *window = PSPPIRE_SYNTAX_WINDOW (object);
+ GObjectClass *parent_class = g_type_class_peek_parent (class);
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
-
}
}
+
extern struct source_stream *the_source_stream ;
static void
g_signal_connect (get_widget_assert (xml,"file_new_data"),
"activate",
- G_CALLBACK (new_data_window),
+ G_CALLBACK (create_data_window),
window);
g_signal_connect (get_widget_assert (xml,"help_about"),
G_CALLBACK (on_run_to_end),
window);
-#if 0
g_signal_connect (get_widget_assert (xml,"windows_minimise_all"),
"activate",
- G_CALLBACK (minimise_all_windows),
- NULL);
-#endif
+ G_CALLBACK (psppire_window_minimise_all), NULL);
+
+ PSPPIRE_WINDOW (window)->menu = GTK_MENU (get_widget_assert (xml,"windows_menu"));
+ g_object_ref (PSPPIRE_WINDOW (window)->menu);
g_object_unref (xml);
GtkWidget*
psppire_syntax_window_new (void)
{
- return GTK_WIDGET (g_object_new (psppire_syntax_window_get_type (), NULL));
+ return GTK_WIDGET (g_object_new (psppire_syntax_window_get_type (),
+ "usage", PSPPIRE_WINDOW_USAGE_SYNTAX,
+ NULL));
}