[five-or-more] Remove use of deprecated functions



commit 97c4ea9a7d9088c9fcf18288cf0caf28b8764e09
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Jul 6 08:29:25 2014 -0500

    Remove use of deprecated functions

 src/five-or-more.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/five-or-more.c b/src/five-or-more.c
index 9311cce..2622990 100644
--- a/src/five-or-more.c
+++ b/src/five-or-more.c
@@ -695,10 +695,8 @@ button_press_event (GtkWidget * widget, GdkEvent * event)
     draw_box (draw_area, cursor_x, cursor_y);
   }
 
-  /* FIXMEchpe: why not use event->[xy] here? */
-  gtk_widget_get_pointer (widget, &x, &y);
-  fx = x / boxsize;
-  fy = y / boxsize;
+  fx = event->button.x / boxsize;
+  fy = event->button.y / boxsize;
 
   /* If we click on the outer border pixels, the previous calculation
    * will be wrong and we must correct. */
@@ -1285,7 +1283,7 @@ bg_color_callback (GtkWidget * widget, gpointer data)
   GdkRGBA c;
   char str[64];
 
-  gtk_color_button_get_rgba (GTK_COLOR_BUTTON (widget), &c);
+  gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &c);
 
   g_snprintf (str, sizeof (str), "#%04x%04x%04x", (int) (c.red * 65535 + 0.5), (int) (c.green * 65535 + 
0.5), (int) (c.blue * 65535 + 0.5));
 
@@ -1384,7 +1382,7 @@ game_props_callback (GSimpleAction *action,
                       G_CALLBACK (set_selection), NULL);
 
     color_button = GTK_WIDGET (gtk_builder_get_object (builder_preferences, "colorbutton1"));
-    gtk_color_button_set_rgba (GTK_COLOR_BUTTON (color_button), &backgnd.color);
+    gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (color_button), &backgnd.color);
     g_signal_connect (color_button, "color-set",
                       G_CALLBACK (bg_color_callback), NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]