[gnome-control-center] color: Do not print '(null)' for virtual profiles
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] color: Do not print '(null)' for virtual profiles
- Date: Wed, 8 Feb 2012 11:54:13 +0000 (UTC)
commit 545d700142e0693db4317f20673715983d8722ab
Author: Richard Hughes <richard hughsie com>
Date: Wed Feb 8 11:51:30 2012 +0000
color: Do not print '(null)' for virtual profiles
Virtual profiles (e.g. from the PPD for printers) don't have filenames, and so
fall back to the ID for debugging.
NOTE: this warning uncovered a bug in libcolord, which is fixed by commit
876d961665d01f8c37094fe85b0130850a008051 in the colord project.
panels/color/cc-color-panel.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index add595f..c05eefb 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -1596,8 +1596,17 @@ gcm_prefs_device_set_model_by_iter (CcColorPanel *prefs, CdDevice *device, GtkTr
/* ignore profiles from other user accounts */
if (!cd_profile_has_access (profile))
{
- g_warning ("%s is not usable by this user",
- cd_profile_get_filename (profile));
+ /* only print the filename if it exists */
+ if (cd_profile_get_filename (profile) != NULL)
+ {
+ g_warning ("%s is not usable by this user",
+ cd_profile_get_filename (profile));
+ }
+ else
+ {
+ g_warning ("%s is not usable by this user",
+ cd_profile_get_id (profile));
+ }
goto out;
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]