[gnome-control-center/gnome-3-2] color: Disable 'View details' button if gcm-viewer is not installed
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-2] color: Disable 'View details' button if gcm-viewer is not installed
- Date: Wed, 14 Sep 2011 12:01:35 +0000 (UTC)
commit 7d7aaf1b7dbf7031eca03ae65904f418e21a619f
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Wed Sep 14 14:01:10 2011 +0200
color: Disable 'View details' button if gcm-viewer is not installed
panels/color/cc-color-panel.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index b700de1..3de281e 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -896,6 +896,7 @@ gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *de
{
GtkWidget *widget;
CdDeviceRelation relation;
+ gchar *s;
CcColorPanelPrivate *priv = prefs->priv;
/* get profile */
@@ -926,7 +927,13 @@ gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *de
/* allow getting profile info */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
"toolbutton_profile_view"));
- gtk_widget_set_sensitive (widget, TRUE);
+ if ((s = g_find_program_in_path ("gcm-viewer")))
+ {
+ gtk_widget_set_sensitive (widget, TRUE);
+ g_free (s);
+ }
+ else
+ gtk_widget_set_sensitive (widget, FALSE);
/* hide device specific stuff */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]