[gnome-color-manager] For crap xorg drivers, show a note in the UI rather than just showing nothing
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] For crap xorg drivers, show a note in the UI rather than just showing nothing
- Date: Thu, 5 Nov 2009 14:00:10 +0000 (UTC)
commit 06a3d89664f0e3714f92abab2c14bc25e7eac350
Author: Richard Hughes <richard hughsie com>
Date: Thu Nov 5 13:59:25 2009 +0000
For crap xorg drivers, show a note in the UI rather than just showing nothing
src/gcm-prefs.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 4d92fd9..17344ff 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -422,6 +422,7 @@ static void
gcm_prefs_add_device_xrandr (GcmDevice *device)
{
GtkTreeIter iter;
+ gchar *title_tmp;
gchar *title;
gchar *id;
gboolean ret;
@@ -430,7 +431,7 @@ gcm_prefs_add_device_xrandr (GcmDevice *device)
/* get details */
g_object_get (device,
"id", &id,
- "title", &title,
+ "title", &title_tmp,
NULL);
/* set the gamma on the device */
@@ -438,7 +439,14 @@ gcm_prefs_add_device_xrandr (GcmDevice *device)
if (!ret) {
egg_warning ("failed to set output gamma: %s", error->message);
g_error_free (error);
- goto out;
+ }
+
+ /* use a different title if we have crap xorg drivers */
+ if (ret) {
+ title = g_strdup (title_tmp);
+ } else {
+ /* TRANSLATORS: this is where an output is not settable, but we are showing it in the UI */
+ title = g_strdup_printf ("%s\n<i>%s</i>", title_tmp, _("No hardware support"));
}
/* add to list */
@@ -448,8 +456,8 @@ gcm_prefs_add_device_xrandr (GcmDevice *device)
GPM_DEVICES_COLUMN_ID, id,
GPM_DEVICES_COLUMN_TITLE, title,
GPM_DEVICES_COLUMN_ICON, "video-display", -1);
-out:
g_free (id);
+ g_free (title_tmp);
g_free (title);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]