[gnome-color-manager] Do not allow the colorspace combobox to be zero sized. Fixes #606484



commit 0dd8da5d707de919dffbf591616f36fed430bc81
Author: Richard Hughes <richard hughsie com>
Date:   Sun Jan 10 09:44:41 2010 +0000

    Do not allow the colorspace combobox to be zero sized. Fixes #606484

 src/gcm-prefs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 4e147d6..8c88cc1 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -2345,6 +2345,12 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget, GcmProfileColorspace colorspa
 	}
 	if (profile_array != NULL)
 		g_ptr_array_unref (profile_array);
+	if (added_count == 0) {
+		/* TRANSLATORS: this is when there are no profiles that can be used */
+		gtk_combo_box_append_text (GTK_COMBO_BOX(widget), _("No profiles available"));
+		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), added_count);
+		gtk_widget_set_sensitive (widget, FALSE);
+	}
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]