Add some "mnemonic_widget" refs which had been forgotten
[pspp-builds.git] / src / ui / gui / psppire-output-window.c
index 658d36a4669f7d9aecb236a25214678ead7f4444..cf65a2f9e6c518c7dbd7b6581a0808b10ea06c92 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2008, 2009, 2010  Free Software Foundation
+   Copyright (C) 2008, 2009, 2010, 2011  Free Software Foundation
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
 #include "output/cairo.h"
 #include "output/chart-item.h"
 #include "output/driver-provider.h"
+#include "output/message-item.h"
 #include "output/output-item.h"
 #include "output/tab.h"
 #include "output/table-item.h"
@@ -305,6 +306,13 @@ psppire_output_submit (struct output_driver *this,
       ds_clear (&title);
       if (is_text_item (item))
         ds_put_cstr (&title, text_item_get_text (to_text_item (item)));
+      else if (is_message_item (item))
+        {
+          const struct message_item *msg_item = to_message_item (item);
+          const struct msg *msg = message_item_get_msg (msg_item);
+          ds_put_format (&title, "%s: %s", _("Message"),
+                         msg_severity_to_string (msg->severity));
+        }
       else if (is_table_item (item))
         {
           const char *caption = table_item_get_caption (to_table_item (item));
@@ -483,7 +491,7 @@ on_combo_change (GtkFileChooser *chooser)
   int x = 0; 
   gchar *fn = gtk_file_chooser_get_filename (chooser);
 
-  if (combo &&  GTK_WIDGET_REALIZED (combo))
+  if (combo &&  gtk_widget_get_realized (combo))
     x = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
 
   if (fn == NULL)
@@ -519,7 +527,7 @@ on_file_chooser_change (GObject *w, GParamSpec *pspec, gpointer data)
   GtkFileChooser *chooser = data;
   const gchar *name = g_param_spec_get_name (pspec);
 
-  if ( ! GTK_WIDGET_REALIZED (chooser))
+  if ( ! gtk_widget_get_realized (GTK_WIDGET (chooser)))
     return;
 
   /* Ignore this one.  It causes recursion. */