[brasero] Make the joliet request into a dialog not a single message included in the app as this is critical



commit 62d61102cd1e99b771491b64de53f960477b8f00
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Wed Jun 3 11:06:37 2009 +0200

    Make the joliet request into a dialog not a single message included in the app as this is critical
---
 src/brasero-data-disc.c |   61 ++++++++++++++++------------------------------
 1 files changed, 21 insertions(+), 40 deletions(-)

diff --git a/src/brasero-data-disc.c b/src/brasero-data-disc.c
index c89c149..2d74f61 100644
--- a/src/brasero-data-disc.c
+++ b/src/brasero-data-disc.c
@@ -819,58 +819,39 @@ brasero_data_disc_unknown_uri_cb (BraseroTrackDataCfg *vfs,
 }
 
 static void
-brasero_data_disc_use_joliet_response_cb (BraseroDiscMessage *message,
-					  GtkResponseType response,
-					  BraseroDataDisc *self)
-{
-	BraseroDataDiscPrivate *priv;
-
-	priv = BRASERO_DATA_DISC_PRIVATE (self);
-	if (response == GTK_RESPONSE_YES)
-		brasero_track_data_add_fs (BRASERO_TRACK_DATA (priv->project),
-					   BRASERO_IMAGE_FS_JOLIET);
-	else
-		brasero_track_data_rm_fs (BRASERO_TRACK_DATA (priv->project),
-					  BRASERO_IMAGE_FS_JOLIET);
-}
-
-static void
 brasero_data_disc_joliet_rename_cb (BraseroTrackDataCfg *project,
 				    BraseroDataDisc *self)
 {
 	BraseroDataDiscPrivate *priv;
-	GtkWidget *message;
+	GtkWidget *dialog;
 	gchar *secondary;
+	gint answer;
 
 	priv = BRASERO_DATA_DISC_PRIVATE (self);
+
+	dialog = brasero_app_dialog (brasero_app_get_default (),
+				     _("Should files be renamed to be fully Windows-compatible?"),
+				     GTK_BUTTONS_NONE,
+				     GTK_MESSAGE_WARNING);
 	secondary = g_strdup_printf ("%s\n%s",
 				     _("Some files don't have a suitable name for a fully Windows-compatible CD."),
 				     _("Those names should be changed and truncated to 64 characters."));
-	message = brasero_notify_message_add (BRASERO_NOTIFY (priv->message),
-					      _("Should files be renamed to be fully Windows-compatible?"),
-					      secondary,
-					      -1,
-					      BRASERO_NOTIFY_CONTEXT_SIZE);
+	gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), secondary);
 	g_free (secondary);
 
-	brasero_disc_message_set_image (BRASERO_DISC_MESSAGE (message),
-					GTK_STOCK_DIALOG_WARNING);
+	gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Rename for Full Windows Compatibility"), GTK_RESPONSE_YES);
+	gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Disable Full Windows Compatibility"), GTK_RESPONSE_CANCEL);
 
-	brasero_notify_button_add (BRASERO_NOTIFY (priv->message),
-				   BRASERO_DISC_MESSAGE (message),
-				   _("_Rename for Full Windows Compatibility"),
-				   NULL,
-				   GTK_RESPONSE_YES);
-	brasero_notify_button_add (BRASERO_NOTIFY (priv->message),
-				   BRASERO_DISC_MESSAGE (message),
-				   _("_Disable Full Windows Compatibility"),
-				   NULL,
-				   GTK_RESPONSE_CANCEL);
+	gtk_widget_show_all (dialog);
+	answer = gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
 
-	g_signal_connect (BRASERO_DISC_MESSAGE (message),
-			  "response",
-			  G_CALLBACK (brasero_data_disc_use_joliet_response_cb),
-			  self);
+	if (answer == GTK_RESPONSE_YES)
+		brasero_track_data_add_fs (BRASERO_TRACK_DATA (priv->project),
+					   BRASERO_IMAGE_FS_JOLIET);
+	else
+		brasero_track_data_rm_fs (BRASERO_TRACK_DATA (priv->project),
+					  BRASERO_IMAGE_FS_JOLIET);
 }
 
 static gboolean



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