[brasero] Fix a problem that could appear with some themes and our use of GtkInfoBar



commit e630daece42cf46fe4f467c05c6e9c95a2b70385
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Fri Nov 27 09:15:22 2009 +0100

    Fix a problem that could appear with some themes and our use of GtkInfoBar

 libbrasero-burn/brasero-burn-options.c  |   40 +++++++-------
 libbrasero-burn/brasero-burn.c          |    2 +-
 libbrasero-utils/brasero-disc-message.c |   12 +---
 libbrasero-utils/brasero-misc.c         |   33 +++++++-----
 libbrasero-utils/brasero-notify.c       |   91 ++++---------------------------
 libbrasero-utils/brasero-notify.h       |   29 +---------
 src/brasero-audio-disc.c                |    6 +-
 src/brasero-data-disc.c                 |   18 +++---
 src/brasero-project.c                   |   24 ++++----
 9 files changed, 83 insertions(+), 172 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn-options.c b/libbrasero-burn/brasero-burn-options.c
index f315380..66d0381 100644
--- a/libbrasero-burn/brasero-burn-options.c
+++ b/libbrasero-burn/brasero-burn-options.c
@@ -238,14 +238,14 @@ brasero_burn_options_update_no_medium_warning (BraseroBurnOptions *self)
 	if (!priv->is_valid
 	||  !brasero_burn_session_is_dest_file (BRASERO_BURN_SESSION (priv->session))
 	||   brasero_medium_selection_get_media_num (BRASERO_MEDIUM_SELECTION (priv->selection)) != 1) {
-		brasero_notify_message_remove (BRASERO_NOTIFY (priv->message_output),
+		brasero_notify_message_remove (priv->message_output,
 					       BRASERO_BURN_OPTIONS_NO_MEDIUM_WARNING);
 		return;
 	}
 
 	/* The user may have forgotten to insert a disc so remind him of that if
 	 * there aren't any other possibility in the selection */
-	brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+	brasero_notify_message_add (priv->message_output,
 				    _("Please insert a writable CD or DVD if you don't want to write to an image file."),
 				    NULL,
 				    -1,
@@ -316,11 +316,11 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 
 	if (priv->message_input) {
 		gtk_widget_hide (priv->message_input);
-		brasero_notify_message_remove (BRASERO_NOTIFY (priv->message_input),
+		brasero_notify_message_remove (priv->message_input,
 					       BRASERO_NOTIFY_CONTEXT_SIZE);
 	}
 
-	brasero_notify_message_remove (BRASERO_NOTIFY (priv->message_output),
+	brasero_notify_message_remove (priv->message_output,
 				       BRASERO_NOTIFY_CONTEXT_SIZE);
 
 	if (valid == BRASERO_SESSION_NOT_READY) {
@@ -373,10 +373,10 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 		/* Here there is an alternative: we may be able to span the data
 		 * across multiple media. So try that. */
 		if (available_space > min_disc_size
-		&& brasero_session_span_possible (BRASERO_SESSION_SPAN (priv->session)) == BRASERO_BURN_RETRY) {
+		&&  brasero_session_span_possible (BRASERO_SESSION_SPAN (priv->session)) == BRASERO_BURN_RETRY) {
 			GtkWidget *message;
 
-			message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+			message = brasero_notify_message_add (priv->message_output,
 							      _("Would you like to burn the selection of files across several media?"),
 							      _("The data size is too large for the disc even with the overburn option."),
 							      -1,
@@ -393,21 +393,21 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 					  self);
 		}
 		else
-			brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+			brasero_notify_message_add (priv->message_output,
 						    _("Please choose another CD or DVD or insert a new one."),
 						    _("The data size is too large for the disc even with the overburn option."),
 						    -1,
 						    BRASERO_NOTIFY_CONTEXT_SIZE);
 	}
 	else if (valid == BRASERO_SESSION_NO_OUTPUT) {
-		brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+		brasero_notify_message_add (priv->message_output,
 					    _("Please insert a writable CD or DVD."),
 					    NULL,
 					    -1,
 					    BRASERO_NOTIFY_CONTEXT_SIZE);
 	}
 	else if (valid == BRASERO_SESSION_NO_CD_TEXT) {
-		brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+		brasero_notify_message_add (priv->message_output,
 					    _("No track information (artist, title, ...) will be written to the disc."),
 					    _("This is not supported by the current active burning backend."),
 					    -1,
@@ -420,19 +420,19 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 		brasero_burn_session_get_input_type (BRASERO_BURN_SESSION (priv->session), type);
 
 		if (brasero_track_type_get_has_data (type))
-			brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+			brasero_notify_message_add (priv->message_output,
 						    _("Please add files."),
 						    _("There are no files to write to disc"),
 						    -1,
 						    BRASERO_NOTIFY_CONTEXT_SIZE);
 		else if (!BRASERO_STREAM_FORMAT_HAS_VIDEO (brasero_track_type_get_stream_format (type)))
-			brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+			brasero_notify_message_add (priv->message_output,
 						    _("Please add songs."),
 						    _("There are no songs to write to disc"),
 						    -1,
 						    BRASERO_NOTIFY_CONTEXT_SIZE);
 		else
-			brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+			brasero_notify_message_add (priv->message_output,
 						     _("Please add videos."),
 						    _("There are no videos to write to disc"),
 						    -1,
@@ -446,7 +446,7 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 
 		if (priv->message_input) {
 			gtk_widget_show (priv->message_input);
-			message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message_input),
+			message = brasero_notify_message_add (priv->message_input,
 							      _("Please insert a disc holding data."),
 							      _("There is no inserted disc to copy."),
 							      -1,
@@ -458,7 +458,7 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 
 		if (priv->message_input) {
 			gtk_widget_show (priv->message_input);
-			message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message_input),
+			message = brasero_notify_message_add (priv->message_input,
 							      _("Please select a disc image."),
 							      _("There is no selected disc image."),
 							      -1,
@@ -470,7 +470,7 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 
 		if (priv->message_input) {
 			gtk_widget_show (priv->message_input);
-			message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message_input),
+			message = brasero_notify_message_add (priv->message_input,
 							      /* Translators: this is a disc image not a picture */
 							      C_("disc", "Please select another image."),
 							      _("It doesn't appear to be a valid disc image or a valid cue file."),
@@ -483,7 +483,7 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 
 		if (priv->message_input) {
 			gtk_widget_show (priv->message_input);
-			message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message_input),
+			message = brasero_notify_message_add (priv->message_input,
 							      _("Please insert a disc that is not copy protected."),
 							      _("All required applications and libraries are not installed."),
 							      -1,
@@ -491,7 +491,7 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 		}
 	}
 	else if (valid == BRASERO_SESSION_NOT_SUPPORTED) {
-		brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+		brasero_notify_message_add (priv->message_output,
 		                            _("Please replace the disc with a supported CD or DVD."),
 		                            NULL,
 		                            -1,
@@ -500,13 +500,14 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 	else if (valid == BRASERO_SESSION_OVERBURN_NECESSARY) {
 		GtkWidget *message;
 
-		message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+		message = brasero_notify_message_add (priv->message_output,
 						      _("Would you like to burn beyond the disc's reported capacity?"),
 						      _("The data size is too large for the disc and you must remove files from the selection otherwise."
 							"\nYou may want to use this option if you're using 90 or 100 min CD-R(W) which cannot be properly recognised and therefore need overburn option."
 							"\nNOTE: This option might cause failure."),
 						      -1,
 						      BRASERO_NOTIFY_CONTEXT_SIZE);
+
 		gtk_widget_set_tooltip_text (gtk_info_bar_add_button (GTK_INFO_BAR (message),
 								      _("_Overburn"),
 								      GTK_RESPONSE_OK),
@@ -519,11 +520,12 @@ brasero_burn_options_update_valid (BraseroBurnOptions *self)
 	}
 	else if (brasero_burn_session_same_src_dest_drive (BRASERO_BURN_SESSION (priv->session))) {
 		/* The medium is valid but it's a special case */
-		brasero_notify_message_add (BRASERO_NOTIFY (priv->message_output),
+		brasero_notify_message_add (priv->message_output,
 					    _("The drive that holds the source disc will also be the one used to record."),
 					    _("A new writable disc will be required once the currently loaded one has been copied."),
 					    -1,
 					    BRASERO_NOTIFY_CONTEXT_SIZE);
+		gtk_widget_show_all (priv->message_output);
 	}
 
 	brasero_burn_options_update_no_medium_warning (self);
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 5c5b062..e5d43bc 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -1804,7 +1804,7 @@ brasero_burn_check_data_loss (BraseroBurn *burn,
 		if (flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
 			/* There is an error if APPEND was set since this disc is not
 			 * supported without a prior blanking. */
-	g_print ("REAAA\n");
+
 			/* we warn the user is going to lose data even if in the case of
 			 * DVD+/-RW we don't really blank the disc we rather overwrite */
 			result = brasero_burn_emit_signal (burn,
diff --git a/libbrasero-utils/brasero-disc-message.c b/libbrasero-utils/brasero-disc-message.c
index d8f9b4a..58ea640 100644
--- a/libbrasero-utils/brasero-disc-message.c
+++ b/libbrasero-utils/brasero-disc-message.c
@@ -41,9 +41,6 @@
 
 #include "brasero-disc-message.h"
 
-/**
- * This code was heavily inspired by gedit famous message area (gedit-message-area.c)
- */
 
 typedef struct _BraseroDiscMessagePrivate BraseroDiscMessagePrivate;
 struct _BraseroDiscMessagePrivate
@@ -69,8 +66,6 @@ struct _BraseroDiscMessagePrivate
 
 G_DEFINE_TYPE (BraseroDiscMessage, brasero_disc_message, GTK_TYPE_INFO_BAR);
 
-#define RESPONSE_TYPE	"ResponseType"
-
 enum {
 	TEXT_COL,
 	NUM_COL
@@ -313,7 +308,6 @@ brasero_disc_message_set_primary (BraseroDiscMessage *self,
 	markup = g_strdup_printf ("<b>%s</b>", message);
 	gtk_label_set_markup (GTK_LABEL (priv->primary), markup);
 	g_free (markup);
-
 	gtk_widget_show (priv->primary);
 }
 
@@ -354,17 +348,17 @@ brasero_disc_message_init (BraseroDiscMessage *object)
 	priv = BRASERO_DISC_MESSAGE_PRIVATE (object);
 
 	main_box = gtk_info_bar_get_content_area (GTK_INFO_BAR (object));
-	gtk_container_set_border_width (GTK_CONTAINER (main_box), 0);
 
 	priv->text_box = gtk_vbox_new (FALSE, 6);
 	gtk_widget_show (priv->text_box);
-	gtk_box_pack_start (GTK_BOX (main_box), priv->text_box, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (main_box), priv->text_box, FALSE, FALSE, 0);
 
 	priv->primary = gtk_label_new (NULL);
+	gtk_widget_show (priv->primary);
 	gtk_label_set_line_wrap_mode (GTK_LABEL (priv->primary), GTK_WRAP_WORD);
 	gtk_label_set_line_wrap (GTK_LABEL (priv->primary), TRUE);
 	gtk_misc_set_alignment (GTK_MISC (priv->primary), 0.0, 0.5);
-	gtk_box_pack_start (GTK_BOX (priv->text_box), priv->primary, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (priv->text_box), priv->primary, FALSE, FALSE, 0);
 }
 
 static void
diff --git a/libbrasero-utils/brasero-misc.c b/libbrasero-utils/brasero-misc.c
index 0dbed00..6b5e89b 100644
--- a/libbrasero-utils/brasero-misc.c
+++ b/libbrasero-utils/brasero-misc.c
@@ -290,7 +290,11 @@ brasero_utils_pack_properties_list (const gchar *title, GSList *list)
 
 	label = gtk_label_new ("\t");
 	gtk_widget_show (label);
-	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (hbox),
+			    label,
+			    FALSE,
+			    TRUE,
+			    0);
 
 	vbox_prop = gtk_vbox_new (FALSE, 6);
 	gtk_widget_show (vbox_prop);
@@ -300,31 +304,34 @@ brasero_utils_pack_properties_list (const gchar *title, GSList *list)
 			    TRUE,
 			    0);
 
-	for (iter = list; iter; iter = iter->next) {
+	for (iter = list; iter; iter = iter->next)
 		gtk_box_pack_start (GTK_BOX (vbox_prop),
 				    iter->data,
 				    TRUE,
 				    TRUE,
 				    0);
-	}
 
 	if (title) {
-		GtkWidget *frame;
+		GtkWidget *vbox;
+		GtkWidget *label;
 
-		frame = gtk_frame_new (title);
-		gtk_widget_show (frame);
-		gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
+		vbox = gtk_vbox_new (FALSE, 0);
 
-		label = gtk_frame_get_label_widget (GTK_FRAME (frame));
+		label = gtk_label_new (title);
+		gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 		gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+		gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
+		gtk_widget_show (label);
 
-		gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
-		gtk_container_add (GTK_CONTAINER (frame), vbox_main);
-		return frame;
+		gtk_box_pack_start (GTK_BOX (vbox), vbox_main, TRUE, TRUE, 0);
+
+		gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+		gtk_widget_show (vbox);
+
+		return vbox;
 	}
-	else
-		gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 6);
 
+	gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 6);
 	return vbox_main;
 }
 
diff --git a/libbrasero-utils/brasero-notify.c b/libbrasero-utils/brasero-notify.c
index a97d907..3782050 100644
--- a/libbrasero-utils/brasero-notify.c
+++ b/libbrasero-utils/brasero-notify.c
@@ -39,39 +39,9 @@
 #include "brasero-notify.h"
 #include "brasero-disc-message.h"
 
-struct _BraseroNotifyPrivate
-{
-	GtkSizeGroup *message;
-};
-
-typedef struct _BraseroNotifyPrivate BraseroNotifyPrivate;
-
-#define BRASERO_NOTIFY_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), BRASERO_TYPE_NOTIFY, BraseroNotifyPrivate))
-
-G_DEFINE_TYPE (BraseroNotify, brasero_notify, GTK_TYPE_VBOX);
-
-void
-brasero_notify_remove_all_messages (BraseroNotify *self)
-{
-	GList *children;
-	GList *iter;
-
-	GDK_THREADS_ENTER ();
-
-	children = gtk_container_get_children (GTK_CONTAINER (self));
-	for (iter = children; iter; iter = iter->next) {
-		GtkWidget *widget;
-
-		widget = iter->data;
-		brasero_disc_message_destroy (BRASERO_DISC_MESSAGE (widget));
-	}
-	g_list_free (children);
-
-	GDK_THREADS_LEAVE ();
-}
 
 GtkWidget *
-brasero_notify_get_message_by_context_id (BraseroNotify *self,
+brasero_notify_get_message_by_context_id (GtkWidget *self,
 					  guint context_id)
 {
 	GtkWidget *retval = NULL;
@@ -98,15 +68,12 @@ brasero_notify_get_message_by_context_id (BraseroNotify *self,
 }
 
 void
-brasero_notify_message_remove (BraseroNotify *self,
+brasero_notify_message_remove (GtkWidget *self,
 			       guint context_id)
 {
-	BraseroNotifyPrivate *priv;
 	GList *children;
 	GList *iter;
 
-	priv = BRASERO_NOTIFY_PRIVATE (self);
-
 	GDK_THREADS_ENTER ();
 
 	children = gtk_container_get_children (GTK_CONTAINER (self));
@@ -124,73 +91,37 @@ brasero_notify_message_remove (BraseroNotify *self,
 }
 
 GtkWidget *
-brasero_notify_message_add (BraseroNotify *self,
+brasero_notify_message_add (GtkWidget *self,
 			    const gchar *primary,
 			    const gchar *secondary,
 			    gint timeout,
 			    guint context_id)
 {
-	BraseroNotifyPrivate *priv;
 	GtkWidget *message;
 
-	priv = BRASERO_NOTIFY_PRIVATE (self);
-
-	brasero_notify_message_remove (self, context_id);
-
 	GDK_THREADS_ENTER ();
 
+	brasero_notify_message_remove (self, context_id);
+	
 	message = brasero_disc_message_new ();
-	gtk_size_group_add_widget (priv->message, message);
-	brasero_disc_message_set_context (BRASERO_DISC_MESSAGE (message), context_id);
+
 	brasero_disc_message_set_primary (BRASERO_DISC_MESSAGE (message), primary);
 	brasero_disc_message_set_secondary (BRASERO_DISC_MESSAGE (message), secondary);
+	brasero_disc_message_set_context (BRASERO_DISC_MESSAGE (message), context_id);
+
 	if (timeout > 0)
 		brasero_disc_message_set_timeout (BRASERO_DISC_MESSAGE (message), timeout);
 
+	gtk_container_add (GTK_CONTAINER (self), message);
 	gtk_widget_show (message);
-	gtk_box_pack_start (GTK_BOX (self), message, FALSE, TRUE, 0);
-
+		
 	GDK_THREADS_LEAVE ();
 
 	return message;
 }
 
-static void
-brasero_notify_init (BraseroNotify *object)
-{
-	BraseroNotifyPrivate *priv;
-
-	priv = BRASERO_NOTIFY_PRIVATE (object);
-	priv->message = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
-}
-
-static void
-brasero_notify_finalize (GObject *object)
-{
-	BraseroNotifyPrivate *priv;
-
-	priv = BRASERO_NOTIFY_PRIVATE (object);
-
-	if (priv->message) {
-		g_object_unref (priv->message);
-		priv->message = NULL;
-	}
-	
-	G_OBJECT_CLASS (brasero_notify_parent_class)->finalize (object);
-}
-
-static void
-brasero_notify_class_init (BraseroNotifyClass *klass)
-{
-	GObjectClass* object_class = G_OBJECT_CLASS (klass);
-
-	g_type_class_add_private (klass, sizeof (BraseroNotifyPrivate));
-
-	object_class->finalize = brasero_notify_finalize;
-}
-
 GtkWidget *
 brasero_notify_new (void)
 {
-	return g_object_new (BRASERO_TYPE_NOTIFY, NULL);
+	return gtk_vbox_new (TRUE, 0);
 }
diff --git a/libbrasero-utils/brasero-notify.h b/libbrasero-utils/brasero-notify.h
index cef5f11..4886e50 100644
--- a/libbrasero-utils/brasero-notify.h
+++ b/libbrasero-utils/brasero-notify.h
@@ -39,26 +39,6 @@
 
 G_BEGIN_DECLS
 
-#define BRASERO_TYPE_NOTIFY             (brasero_notify_get_type ())
-#define BRASERO_NOTIFY(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), BRASERO_TYPE_NOTIFY, BraseroNotify))
-#define BRASERO_NOTIFY_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), BRASERO_TYPE_NOTIFY, BraseroNotifyClass))
-#define BRASERO_IS_NOTIFY(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BRASERO_TYPE_NOTIFY))
-#define BRASERO_IS_NOTIFY_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), BRASERO_TYPE_NOTIFY))
-#define BRASERO_NOTIFY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), BRASERO_TYPE_NOTIFY, BraseroNotifyClass))
-
-typedef struct _BraseroNotifyClass BraseroNotifyClass;
-typedef struct _BraseroNotify BraseroNotify;
-
-struct _BraseroNotifyClass
-{
-	GtkVBoxClass parent_class;
-};
-
-struct _BraseroNotify
-{
-	GtkVBox parent_instance;
-};
-
 typedef enum {
 	BRASERO_NOTIFY_CONTEXT_NONE		= 0,
 	BRASERO_NOTIFY_CONTEXT_SIZE		= 1,
@@ -71,21 +51,18 @@ GType brasero_notify_get_type (void) G_GNUC_CONST;
 GtkWidget *brasero_notify_new (void);
 
 GtkWidget *
-brasero_notify_message_add (BraseroNotify *notify,
+brasero_notify_message_add (GtkWidget *notify,
 			    const gchar *primary,
 			    const gchar *secondary,
 			    gint timeout,
 			    guint context_id);
 
 void
-brasero_notify_message_remove (BraseroNotify *notify,
+brasero_notify_message_remove (GtkWidget *notify,
 			       guint context_id);
 
-void
-brasero_notify_remove_all_messages (BraseroNotify *notify);
-
 GtkWidget *
-brasero_notify_get_message_by_context_id (BraseroNotify *notify,
+brasero_notify_get_message_by_context_id (GtkWidget *notify,
 					  guint context_id);
 
 G_END_DECLS
diff --git a/src/brasero-audio-disc.c b/src/brasero-audio-disc.c
index f55d8f4..026d6fd 100644
--- a/src/brasero-audio-disc.c
+++ b/src/brasero-audio-disc.c
@@ -533,7 +533,7 @@ brasero_audio_disc_reset_real (BraseroAudioDisc *disc)
 	}
 
 	if (disc->priv->message)
-		brasero_notify_message_remove (BRASERO_NOTIFY (disc->priv->message), BRASERO_AUDIO_DISC_CONTEXT);
+		brasero_notify_message_remove (disc->priv->message, BRASERO_AUDIO_DISC_CONTEXT);
 }
 
 static void
@@ -844,7 +844,7 @@ brasero_audio_disc_wav_dts_file_dialog (BraseroAudioDisc *disc)
 	BraseroSessionCfg *session;
 	GtkTreeModel *model;
 
-	if (brasero_notify_get_message_by_context_id (BRASERO_NOTIFY (disc->priv->message),
+	if (brasero_notify_get_message_by_context_id (disc->priv->message,
 	                                              BRASERO_AUDIO_DISC_CONTEXT))
 		return;
 
@@ -855,7 +855,7 @@ brasero_audio_disc_wav_dts_file_dialog (BraseroAudioDisc *disc)
 	                                  BRASERO_SESSION_STREAM_AUDIO_FORMAT,
 	                                  BRASERO_AUDIO_FORMAT_RAW);
 
-	message = brasero_notify_message_add (BRASERO_NOTIFY (disc->priv->message),
+	message = brasero_notify_message_add (disc->priv->message,
 					      _("Do you want to create an audio CD with DTS tracks?"),
 					      _("Some of the selected songs are suitable for creating DTS tracks."
 					        "\nThis type of audio CD track provides a higher quality of sound but can only be played by specific digital players."
diff --git a/src/brasero-data-disc.c b/src/brasero-data-disc.c
index 46b756d..1d1b433 100644
--- a/src/brasero-data-disc.c
+++ b/src/brasero-data-disc.c
@@ -253,7 +253,7 @@ brasero_data_disc_import_session_cb (GtkToggleAction *action,
 	if (!medium)
 		return;
 
-	brasero_notify_message_remove (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_MULTISESSION);
+	brasero_notify_message_remove (priv->message, BRASERO_NOTIFY_CONTEXT_MULTISESSION);
 	res = brasero_data_disc_import_session (self,
 						medium,
 						gtk_toggle_action_get_active (action));
@@ -529,7 +529,7 @@ brasero_data_disc_project_loading_cb (BraseroTrackDataCfg *project,
 	priv = BRASERO_DATA_DISC_PRIVATE (self);
 	priv->loading = TRUE;
 
-	message = brasero_notify_get_message_by_context_id (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_LOADING);
+	message = brasero_notify_get_message_by_context_id (priv->message, BRASERO_NOTIFY_CONTEXT_LOADING);
 	if (!message)
 		return;
 
@@ -548,7 +548,7 @@ brasero_data_disc_project_loaded_cb (BraseroTrackDataCfg *project,
 	priv = BRASERO_DATA_DISC_PRIVATE (self);
 	priv->loading = FALSE;
 
-	message = brasero_notify_get_message_by_context_id (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_LOADING);
+	message = brasero_notify_get_message_by_context_id (priv->message, BRASERO_NOTIFY_CONTEXT_LOADING);
 	if (!message)
 		return;
 
@@ -1074,7 +1074,7 @@ brasero_data_disc_remove_available_medium (BraseroDataDisc *self,
 	action = gtk_action_group_get_action (priv->import_group, action_name);
 	g_free (action_name);
 
-	brasero_notify_message_remove (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_MULTISESSION);
+	brasero_notify_message_remove (priv->message, BRASERO_NOTIFY_CONTEXT_MULTISESSION);
 
 	merge_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (action), BRASERO_DATA_DISC_MERGE_ID));
 	gtk_ui_manager_remove_ui (priv->manager, merge_id);
@@ -1109,7 +1109,7 @@ brasero_data_disc_session_available_cb (BraseroTrackDataCfg *session,
 		volume_name = brasero_volume_get_name (BRASERO_VOLUME (medium));
 		/* Translators: %s is the name of the volume to import */
 		string = g_strdup_printf (_("Do you want to import the session from \"%s\"?"), volume_name);
-		message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message),
+		message = brasero_notify_message_add (priv->message,
 						      string,
 						      _("That way, old files from previous sessions will be usable after burning."),
 						      10000,
@@ -1193,9 +1193,9 @@ brasero_data_disc_clear (BraseroDisc *disc)
 
 	priv->overburning = FALSE;
 
- 	brasero_notify_message_remove (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_SIZE);
-	brasero_notify_message_remove (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_LOADING);
-	brasero_notify_message_remove (BRASERO_NOTIFY (priv->message), BRASERO_NOTIFY_CONTEXT_MULTISESSION);
+ 	brasero_notify_message_remove (priv->message, BRASERO_NOTIFY_CONTEXT_SIZE);
+	brasero_notify_message_remove (priv->message, BRASERO_NOTIFY_CONTEXT_LOADING);
+	brasero_notify_message_remove (priv->message, BRASERO_NOTIFY_CONTEXT_MULTISESSION);
 
 	brasero_track_data_cfg_reset (priv->project);
 }
@@ -1467,7 +1467,7 @@ brasero_data_disc_set_track (BraseroDataDisc *disc,
 		return BRASERO_DISC_ERROR_UNKNOWN;
 	}
 
-	message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message),
+	message = brasero_notify_message_add (priv->message,
 					      _("Please wait while the project is loading."),
 					      NULL,
 					      -1,
diff --git a/src/brasero-project.c b/src/brasero-project.c
index a75976f..a2bfe9c 100644
--- a/src/brasero-project.c
+++ b/src/brasero-project.c
@@ -904,7 +904,7 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 	 * that means that file selection is not empty */
 
 	/* Clean any message */
-	brasero_notify_message_remove (BRASERO_NOTIFY (project->priv->message),
+	brasero_notify_message_remove (project->priv->message,
 				       BRASERO_NOTIFY_CONTEXT_SIZE);
 
 	if (valid == BRASERO_SESSION_EMPTY) {
@@ -931,7 +931,7 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 		&& brasero_session_span_possible (BRASERO_SESSION_SPAN (session)) == BRASERO_BURN_RETRY) {
 			GtkWidget *message;
 
-			message = brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+			message = brasero_notify_message_add (project->priv->message,
 							      _("Would you like to burn the selection of files across several media?"),
 							      _("The project is too large for the disc even with the overburn option."),
 							      -1,
@@ -947,7 +947,7 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 					  project);
 		}
 		else
-			brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+			brasero_notify_message_add (project->priv->message,
 						    _("Please choose another CD or DVD or insert a new one."),
 						    _("The project is too large for the disc even with the overburn option."),
 						    -1,
@@ -958,7 +958,7 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 
 		project->priv->empty = FALSE;
 		project->priv->oversized = TRUE;
-		message = brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+		message = brasero_notify_message_add (project->priv->message,
 						      _("Would you like to burn beyond the disc's reported capacity?"),
 						      _("The project is too large for the disc and you must remove files from it."
 							"\nYou may want to use this option if you're using 90 or 100 min CD-R(W) which cannot be properly recognized and therefore needs the overburn option."
@@ -977,7 +977,7 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 	}
 	else if (valid == BRASERO_SESSION_NO_OUTPUT) {
 		project->priv->empty = FALSE;
-		brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+		brasero_notify_message_add (project->priv->message,
 					    _("Please insert a writable CD or DVD."),
 					    NULL,
 					    -1,
@@ -985,14 +985,14 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 	}
 	else if (valid == BRASERO_SESSION_NOT_SUPPORTED) {
 		project->priv->empty = FALSE;
-		brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+		brasero_notify_message_add (project->priv->message,
 					    _("Please replace the disc with a supported CD or DVD."),
 					    NULL,
 					    -1,
 					    BRASERO_NOTIFY_CONTEXT_SIZE);
 	}
 	else if (valid == BRASERO_SESSION_NO_CD_TEXT) {
-		brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+		brasero_notify_message_add (project->priv->message,
 					    _("No track information (artist, title, ...) will be written to the disc."),
 					    _("This is not supported by the current active burning backend."),
 					    -1,
@@ -1002,7 +1002,7 @@ brasero_project_is_valid (BraseroSessionCfg *session,
 	     &&  brasero_medium_selection_get_media_num (BRASERO_MEDIUM_SELECTION (project->priv->selection)) == 1) {
 		/* The user may have forgotten to insert a disc so remind him of that if
 		 * there aren't any other possibility in the selection */
-		brasero_notify_message_add (BRASERO_NOTIFY (project->priv->message),
+		brasero_notify_message_add (project->priv->message,
 					    _("Please insert a writable CD or DVD if you don't want to write to an image file."),
 					    NULL,
 					    10000,
@@ -1699,9 +1699,9 @@ brasero_project_reset (BraseroProject *project)
 		project->priv->session = NULL;
 	}
 
-	brasero_notify_message_remove (BRASERO_NOTIFY (project->priv->message), BRASERO_NOTIFY_CONTEXT_SIZE);
-	brasero_notify_message_remove (BRASERO_NOTIFY (project->priv->message), BRASERO_NOTIFY_CONTEXT_LOADING);
-	brasero_notify_message_remove (BRASERO_NOTIFY (project->priv->message), BRASERO_NOTIFY_CONTEXT_MULTISESSION);
+	brasero_notify_message_remove (project->priv->message, BRASERO_NOTIFY_CONTEXT_SIZE);
+	brasero_notify_message_remove (project->priv->message, BRASERO_NOTIFY_CONTEXT_LOADING);
+	brasero_notify_message_remove (project->priv->message, BRASERO_NOTIFY_CONTEXT_MULTISESSION);
 }
 
 static void
@@ -1781,7 +1781,7 @@ brasero_project_switch (BraseroProject *project, BraseroProjectType type)
 						   BRASERO_BURN_SESSION (project->priv->session));
 	}
 
-	brasero_notify_message_remove (BRASERO_NOTIFY (project->priv->message), BRASERO_NOTIFY_CONTEXT_SIZE);
+	brasero_notify_message_remove (project->priv->message, BRASERO_NOTIFY_CONTEXT_SIZE);
 
 	/* update the menus */
 	action = gtk_action_group_get_action (project->priv->project_group, "Add");



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