[vte/vte-next] fixup! Remove GdkColor APIs
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next] fixup! Remove GdkColor APIs
- Date: Tue, 3 May 2011 00:23:29 +0000 (UTC)
commit 674dfa17ecf316fbcae97899d12a1d643c734227
Author: Christian Persch <chpe gnome org>
Date: Tue May 3 02:20:15 2011 +0200
fixup! Remove GdkColor APIs
src/vteaccess.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/vteaccess.c b/src/vteaccess.c
index fd7f565..a1958cb 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -1353,14 +1353,12 @@ get_attribute_set (struct _VteCharAttributes attr)
}
at = g_new (AtkAttribute, 1);
at->name = g_strdup ("fg-color");
- at->value = g_strdup_printf ("%u,%u,%u",
- attr.fore.red, attr.fore.green, attr.fore.blue);
+ at->value = gdk_rgba_to_string (&attr.fore);
set = g_slist_append (set, at);
at = g_new (AtkAttribute, 1);
at->name = g_strdup ("bg-color");
- at->value = g_strdup_printf ("%u,%u,%u",
- attr.back.red, attr.back.green, attr.back.blue);
+ at->value = gdk_rgba_to_string (&attr.back);
set = g_slist_append (set, at);
return set;
@@ -1389,8 +1387,8 @@ vte_terminal_accessible_get_run_attributes(AtkText *text, gint offset,
cur_attr = g_array_index (priv->snapshot_attributes,
struct _VteCharAttributes,
i);
- if (!gdk_color_equal (&cur_attr.fore, &attr.fore) ||
- !gdk_color_equal (&cur_attr.back, &attr.back) ||
+ if (!gdk_rgba_equal (&cur_attr.fore, &attr.fore) ||
+ !gdk_rgba_equal (&cur_attr.back, &attr.back) ||
cur_attr.underline != attr.underline ||
cur_attr.strikethrough != attr.strikethrough) {
*start_offset = i + 1;
@@ -1402,8 +1400,8 @@ vte_terminal_accessible_get_run_attributes(AtkText *text, gint offset,
cur_attr = g_array_index (priv->snapshot_attributes,
struct _VteCharAttributes,
i);
- if (!gdk_color_equal (&cur_attr.fore, &attr.fore) ||
- !gdk_color_equal (&cur_attr.back, &attr.back) ||
+ if (!gdk_rgba_equal (&cur_attr.fore, &attr.fore) ||
+ !gdk_rgba_equal (&cur_attr.back, &attr.back) ||
cur_attr.underline != attr.underline ||
cur_attr.strikethrough != attr.strikethrough) {
*end_offset = i - 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]