[atomix] Use GdkRGBA instead of deprecated GdkColor
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [atomix] Use GdkRGBA instead of deprecated GdkColor
- Date: Sat, 17 Jan 2015 21:25:07 +0000 (UTC)
commit e87cdce5b575f92d8bbd32c86c95f525cb51adb0
Author: Robert Roth <robert roth off gmail com>
Date: Sat Jan 17 23:24:57 2015 +0200
Use GdkRGBA instead of deprecated GdkColor
src/board-gtk.c | 4 ++++
src/goal-view.c | 3 +++
src/theme-manager.c | 2 +-
src/theme.c | 2 +-
src/theme.h | 2 +-
5 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/board-gtk.c b/src/board-gtk.c
index e0a3c89..11d9d38 100644
--- a/src/board-gtk.c
+++ b/src/board-gtk.c
@@ -408,7 +408,11 @@ void board_gtk_init (Theme * theme, gpointer canvas)
create_background_floor ();
create_logo ();
+ gdk_window_set_background_rgba (GDK_WINDOW (gtk_widget_get_window (
+ GTK_WIDGET (gtk_widget_get_parent (canvas)))),
+ theme_get_background_color (theme));
gtk_widget_show_all (GTK_WIDGET(board_canvas));
+
selector_data = selector_create ();
}
diff --git a/src/goal-view.c b/src/goal-view.c
index b3192a0..085e9ae 100644
--- a/src/goal-view.c
+++ b/src/goal-view.c
@@ -34,6 +34,9 @@ void goal_view_init (Theme *theme, GtkFixed *fixed)
goal_fixed = fixed;
goal_theme = theme;
+ gdk_window_set_background_rgba (GDK_WINDOW (gtk_widget_get_window (
+ gtk_widget_get_parent (GTK_WIDGET (fixed)))),
+ theme_get_background_color (theme));
}
void goal_view_render (Goal *goal)
diff --git a/src/theme-manager.c b/src/theme-manager.c
index 40fd0b4..04700df 100644
--- a/src/theme-manager.c
+++ b/src/theme-manager.c
@@ -111,7 +111,7 @@ theme_parser_start_element (GMarkupParseContext *context,
} else if (!g_strcmp0 (element_name, "bgcolor")) {
/* handle background color */
prop_value = get_attribute_value ("color", attribute_names, attribute_values);
- gdk_color_parse (prop_value, &(priv->bg_color));
+ gdk_rgba_parse (prop_value, &(priv->bg_color));
} else if (!g_strcmp0 (element_name, "bgcolor_rgb")) {
/* handle rgb color node */
prop_value = get_attribute_value ("red", attribute_names, attribute_values);
diff --git a/src/theme.c b/src/theme.c
index 9ef448c..15d3a0c 100644
--- a/src/theme.c
+++ b/src/theme.c
@@ -408,7 +408,7 @@ void theme_get_tile_size (Theme *theme, gint *width, gint *height)
*height = theme->priv->tile_height;
}
-GdkColor *theme_get_background_color (Theme *theme)
+GdkRGBA *theme_get_background_color (Theme *theme)
{
return &(theme->priv->bg_color);
}
diff --git a/src/theme.h b/src/theme.h
index a12f66e..d505785 100644
--- a/src/theme.h
+++ b/src/theme.h
@@ -53,7 +53,7 @@ GType theme_get_type (void);
GdkPixbuf *theme_get_tile_image (Theme * theme, Tile * tile);
-GdkColor *theme_get_background_color (Theme * theme);
+GdkRGBA *theme_get_background_color (Theme * theme);
GdkPixbuf *theme_get_selector_image (Theme * theme);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]