[gnome-color-manager] trivial: ensure that no profile always clears the GtkInfoBar
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: ensure that no profile always clears the GtkInfoBar
- Date: Thu, 18 Feb 2010 12:37:47 +0000 (UTC)
commit d5423f38e28c51b06274f77ff7a07978316e50b9
Author: Richard Hughes <richard hughsie com>
Date: Thu Feb 18 12:33:03 2010 +0000
trivial: ensure that no profile always clears the GtkInfoBar
src/gcm-prefs.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 17097c0..d96002c 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -1628,7 +1628,6 @@ gcm_prefs_profile_combo_changed_cb (GtkWidget *widget, gpointer data)
GcmProfile *profile = NULL;
gboolean changed;
GcmDeviceTypeEnum type;
- GcmProfileTypeEnum profile_type;
GtkTreeIter iter;
GtkTreeModel *model;
GcmPrefsEntryType entry_type;
@@ -1669,20 +1668,26 @@ gcm_prefs_profile_combo_changed_cb (GtkWidget *widget, gpointer data)
}
}
+ /* get the device type */
+ g_object_get (current_device,
+ "type", &type,
+ NULL);
+
/* get profile filename */
if (entry_type == GCM_PREFS_ENTRY_TYPE_PROFILE) {
g_object_get (profile,
"filename", &filename,
"has-vcgt", &has_vcgt,
- "type", &profile_type,
NULL);
/* show a warning if the profile is crap */
- if (profile_type == GCM_PROFILE_TYPE_ENUM_DISPLAY_DEVICE && !has_vcgt && filename != NULL) {
+ if (type == GCM_DEVICE_TYPE_ENUM_DISPLAY && !has_vcgt && filename != NULL) {
gtk_widget_show (info_bar_vcgt);
} else {
gtk_widget_hide (info_bar_vcgt);
}
+ } else {
+ gtk_widget_hide (info_bar_vcgt);
}
/* see if it's changed */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]