PsppireKeypad: Correct the attachment of buttons to the grid.
[pspp] / src / ui / gui / psppire-keypad.c
index d4eeff6119a177926a19a38cc79355e09297c462..5cc7f52a6fff88679688fa8ba78d7167a875a556 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2010, 2011, 2015 Free Software Foundation, Inc.
 
    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
@@ -17,6 +17,7 @@
 #include <config.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
+#include <gdk/gdkkeysyms-compat.h>
 #include "psppire-keypad.h"
 
 enum {
@@ -159,10 +160,7 @@ add_button (PsppireKeypad *kp, GtkWidget **button,
 {
   g_object_set (G_OBJECT (*button), "focus-on-click", FALSE, NULL);
 
-  gtk_table_attach_defaults (GTK_TABLE (kp->table),
-                            *button,
-                            x1, x2,
-                            y1, y2);
+  gtk_grid_attach (GTK_GRID(kp->table), *button, x1, y1, x2 - x1, y2 - y1);
 
   gtk_widget_set_size_request (*button,
                               30 * rows / (float) cols,
@@ -325,7 +323,7 @@ psppire_keypad_init (PsppireKeypad *kp)
 
   kp->frag_table = g_hash_table_new (g_direct_hash, g_direct_equal);
 
-  kp->table = gtk_table_new (rows, cols, TRUE);
+  kp->table = gtk_grid_new ();
 
   /* Buttons for the digits */
   for (i = 0; i < 10; i++)