X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire-output-window.c;h=89075424e0c6a1465098e68f41009cff05ba9147;hb=ef60a827a20593dcebdb98f509614d7d94e3fe5c;hp=69e7c05130b7950ca89aedc585d07549bae1daaa;hpb=a6aad395f291b161ebed2f0d783919f108438c90;p=pspp diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c index 69e7c05130..89075424e0 100644 --- a/src/ui/gui/psppire-output-window.c +++ b/src/ui/gui/psppire-output-window.c @@ -75,26 +75,20 @@ psppire_output_window_get_type (void) return psppire_output_window_type; } +static GObjectClass *parent_class; static void psppire_output_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); - - if (G_OBJECT_CLASS (parent_class)->finalize) (*G_OBJECT_CLASS (parent_class)->finalize) (object); - } static void psppire_output_window_class_init (PsppireOutputWindowClass *class) { + parent_class = g_type_class_peek_parent (class); } @@ -249,12 +243,13 @@ psppire_output_window_init (PsppireOutputWindow *window) G_CALLBACK (reference_manual), NULL); -#if 0 g_signal_connect (get_widget_assert (xml,"windows_minimise-all"), "activate", - G_CALLBACK (minimise_all_windows), + G_CALLBACK (psppire_window_minimise_all), NULL); -#endif + + PSPPIRE_WINDOW (window)->menu = GTK_MENU_SHELL (get_widget_assert (xml,"windows_menu")); + g_object_unref (xml); @@ -266,7 +261,9 @@ psppire_output_window_init (PsppireOutputWindow *window) GtkWidget* psppire_output_window_new (void) { - return GTK_WIDGET (g_object_new (psppire_output_window_get_type (), NULL)); + return GTK_WIDGET (g_object_new (psppire_output_window_get_type (), + "usage", PSPPIRE_WINDOW_USAGE_OUTPUT, + NULL)); } static void reload_viewer (PsppireOutputWindow *ow); @@ -283,7 +280,7 @@ psppire_output_window_reload (void) if ( NULL == the_output_viewer ) { the_output_viewer = PSPPIRE_OUTPUT_WINDOW (psppire_output_window_new ()); - gtk_widget_show (the_output_viewer); + gtk_widget_show (GTK_WIDGET (the_output_viewer)); } reload_viewer (the_output_viewer); @@ -307,9 +304,6 @@ reload_viewer (PsppireOutputWindow *ow) mark = gtk_text_buffer_create_mark (ow->buffer, NULL, &end_iter, TRUE); - - g_debug ("%s %p\n", __FUNCTION__, ow); - #ifdef __CYGWIN__ /* Apparently Windoze is not capabale of writing to a file whilst