[brasero] Make extra sure the image type selection widget is not shown



commit ebc1967ff92ff0c7254ece1b8fd8e305ad5f935d
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Jul 13 16:27:09 2009 +0200

    Make extra sure the image type selection widget is not shown

 libbrasero-burn/brasero-image-properties.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/libbrasero-burn/brasero-image-properties.c b/libbrasero-burn/brasero-image-properties.c
index f032475..94f8a19 100644
--- a/libbrasero-burn/brasero-image-properties.c
+++ b/libbrasero-burn/brasero-image-properties.c
@@ -177,14 +177,12 @@ brasero_image_properties_set_formats (BraseroImageProperties *self,
 		return;
 	}	
 
-	if (!priv->format) {
+	if (!priv->format_box) {
 		GtkWidget *box;
 		GtkWidget *label;
 
 		box = gtk_hbox_new (FALSE, 6);
 		gtk_container_set_border_width (GTK_CONTAINER (box), 4);
-
-		gtk_widget_show (box);
 		gtk_box_pack_end (GTK_BOX (GTK_DIALOG (self)->vbox),
 				  box,
 				  FALSE,
@@ -230,10 +228,13 @@ brasero_image_properties_set_formats (BraseroImageProperties *self,
 		brasero_image_type_chooser_set_format (BRASERO_IMAGE_TYPE_CHOOSER (priv->format),
 						       format);
 
-	if (num > 1)
-		gtk_widget_show (priv->format_box);
+	if (num < 2) {
+		gtk_widget_destroy (priv->format_box);
+		priv->format_box = NULL;
+		priv->format = NULL;
+	}
 	else
-		gtk_widget_hide (priv->format_box);
+		gtk_widget_show (priv->format_box);
 }
 
 static void



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