output: Expand footnote support.
[pspp] / src / ui / gui / psppire-output-view.c
index ce29472e87095ee6f562b510f133ac5c8a8ee6e3..dd8618f7337d37560f8570e010440446babea4df 100644 (file)
@@ -160,7 +160,7 @@ create_xr (struct psppire_output_view *view)
   cairo_destroy (cr);
 }
 
-/* Return the horizontal position to place a widget whose 
+/* Return the horizontal position to place a widget whose
    width is CHILD_WIDTH */
 static gint
 get_xpos (const struct psppire_output_view *view, gint child_width)
@@ -183,9 +183,10 @@ create_drawing_area (struct psppire_output_view *view,
     {
       GdkRGBA green = {0, 1, 0, 1};
       gtk_widget_override_background_color (GTK_WIDGET (view->output),
-                                           GTK_STATE_NORMAL, &green);
+                                           GTK_STATE_FLAG_NORMAL, &green);
       GdkRGBA red = {1, 0, 0, 1};
-      gtk_widget_override_background_color (drawing_area, GTK_STATE_NORMAL, &red);
+      gtk_widget_override_background_color (drawing_area,
+                                            GTK_STATE_FLAG_NORMAL, &red);
     }
 
   g_object_set_data_full (G_OBJECT (drawing_area),
@@ -368,9 +369,10 @@ psppire_output_view_put (struct psppire_output_view *view,
         }
       else if (is_table_item (item))
         {
-          const char *title = table_item_get_title (to_table_item (item));
+          const struct table_item_text *title
+            = table_item_get_title (to_table_item (item));
           if (title != NULL)
-            ds_put_format (&name, "Table: %s", title);
+            ds_put_format (&name, "Table: %s", title->content);
           else
             ds_put_cstr (&name, "Table");
         }
@@ -641,18 +643,18 @@ on_realize (GtkWidget *overview, GObject *view)
 
   GAction *copy_action = g_action_map_lookup_action (G_ACTION_MAP (toplevel),
                                                     "copy");
-  
+
   GAction *select_all_action = g_action_map_lookup_action (G_ACTION_MAP (toplevel),
                                                           "select-all");
 
-  g_object_set (copy_action, "enabled", FALSE, NULL); 
+  g_object_set (copy_action, "enabled", FALSE, NULL);
 
   g_signal_connect_swapped (select_all_action, "activate",
                            G_CALLBACK (on_select_all), view);
 
   g_signal_connect_swapped (copy_action, "activate",
                             G_CALLBACK (on_copy), view);
-  
+
   g_signal_connect (sel, "changed", G_CALLBACK (on_selection_change),
                     copy_action);
 }
@@ -665,7 +667,7 @@ psppire_output_view_new (GtkLayout *output, GtkTreeView *overview)
   GtkCellRenderer *renderer;
 
   GtkTreeModel *model;
-  
+
   view = xmalloc (sizeof *view);
   view->xr = NULL;
   view->font_height = 0;
@@ -789,17 +791,17 @@ static cairo_t *
 get_cairo_context_from_print_context (GtkPrintContext *context)
 {
   cairo_t *cr = gtk_print_context_get_cairo_context (context);
-  
+
   /*
     For all platforms except windows, gtk_print_context_get_dpi_[xy] returns 72.
     Windows returns 600.
   */
   double xres = gtk_print_context_get_dpi_x (context);
   double yres = gtk_print_context_get_dpi_y (context);
-  
+
   /* This means that the cairo context now has its dimensions in Points */
   cairo_scale (cr, xres / 72.0, yres / 72.0);
-  
+
   return cr;
 }
 
@@ -918,7 +920,7 @@ psppire_output_view_print (struct psppire_output_view *view,
 
   GtkPrintOperation *print = gtk_print_operation_new ();
 
-  if (view->print_settings != NULL) 
+  if (view->print_settings != NULL)
     gtk_print_operation_set_print_settings (print, view->print_settings);
 
   g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), view);