[gnome-games] gnect: replace deprecated GdkColor with GdkRGBA



commit 5ee7afcb07e320630d77eff6cb5b29802c1a5b5f
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date:   Tue Jan 10 01:46:28 2012 +0100

    gnect: replace deprecated GdkColor with GdkRGBA

 gnect/src/gfx.c   |    4 +++-
 gnect/src/theme.c |   16 +++++++---------
 gnect/src/theme.h |    2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gnect/src/gfx.c b/gnect/src/gfx.c
index 9114f92..343fc82 100644
--- a/gnect/src/gfx.c
+++ b/gnect/src/gfx.c
@@ -166,8 +166,10 @@ gfx_draw_grid (cairo_t *cr)
 {
   static const double dashes[] = { 4., 4. };
   gint i;
+  GdkRGBA color;
 
-  gdk_cairo_set_source_color (cr, &theme[p.theme_id].grid_color);
+  gdk_rgba_parse (&color, theme[p.theme_id].grid_color);
+  gdk_cairo_set_source_rgba (cr, &color);
   cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
   cairo_set_line_width (cr, 1);
   cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
diff --git a/gnect/src/theme.c b/gnect/src/theme.c
index f74832f..a17e012 100644
--- a/gnect/src/theme.c
+++ b/gnect/src/theme.c
@@ -36,56 +36,54 @@
 
 extern Prefs p;
 
-#define COLOR(r,g,b) { 0, 0x##r##00, 0x##g##00, 0x##b##00 }
-
 Theme theme[] = {
   {
    N_("Classic"),
    "tileset_50x50_sunspot.svg",
    NULL,
-   COLOR (99, 99, CC),
+   "#9999CC",
    N_("Red"), N_("Yellow")
    },
   {
    N_("High Contrast"),
    "tileset_50x50_hcontrast.svg",
    NULL,
-   COLOR (00, 00, 00),
+   "#000000",
    N_("Circle"), N_("Cross")
    },
   {
    N_("High Contrast Inverse"),
    "tileset_50x50_hcinverse.svg",
    NULL,
-   COLOR (FF, FF, FF),
+   "#FFFFFF",
    N_("Circle"), N_("Cross")
    },
   {
    N_("Cream Marbles"),
    "tileset_50x50_catseyes.png",
    "bg_toplight.png",
-   COLOR (72, 7F, 8C),
+   "#727F8C",
    N_("Red"), N_("Blue")
    },
   {
    N_("Glass Marbles"),
    "tileset_50x50_glassy.png",
    "bg_grotty.jpg",
-   COLOR (72, 7F, 8C),
+   "#727F8C",
    N_("Red"), N_("Blue")
    },
   {
    N_("Nightfall"),
    "tileset_50x50_glassy.png",
    "bg_nightfall.jpg",
-   COLOR (72, 7F, 8C),
+   "#727F8C",
    N_("Red"), N_("Blue")
    },
   {
    N_("Blocks"),
    "tileset_50x50_square.png",
    NULL,
-   COLOR (66, 66, 66),
+   "#666666",
    N_("Orange"), N_("Blue")
    }
 };
diff --git a/gnect/src/theme.h b/gnect/src/theme.h
index 8b47181..f2ea52c 100644
--- a/gnect/src/theme.h
+++ b/gnect/src/theme.h
@@ -7,7 +7,7 @@ struct _Theme {
   const gchar *title;
   const gchar *fname_tileset;
   const gchar *fname_bground;
-  const GdkColor grid_color;
+  const gchar *grid_color;
   const gchar *player1;
   const gchar *player2;
 };



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