[brasero/gnome-2-30] Fix #627005 - Starting brasero with --device=/dev/sr0 floating point exception GTK+ was not ready wh



commit f833dbd04092a46113544c76f1c4626b46225bae
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Aug 30 14:42:02 2010 +0200

    Fix #627005 - Starting brasero with --device=/dev/sr0 floating point exception
    GTK+ was not ready while displaying an error

 src/main.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index ab21d8c..6deb3bc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -236,7 +236,7 @@ brasero_main_burning_device (const gchar *option_name,
 		if (!brasero_drive_can_write (burner)) {
 			gchar *string;
 
-			/* Translators: %s is the path of drive */
+			/* Translators: %s is the path of a drive */
 			string = g_strdup_printf (_("\"%s\" cannot write."), value);
 			brasero_utils_message_dialog (NULL,
 						      _("Wrong command line option."),
@@ -463,6 +463,11 @@ main (int argc, char **argv)
 	g_thread_init (NULL);
 	g_type_init ();
 
+	/* Though we use gtk_get_option_group we nevertheless want gtk+ to be
+	 * in a usable state to display our error messages while brasero
+	 * specific options are parsed. Otherwise on error that crashes. */
+	gtk_init (&argc, &argv);
+
 	context = g_option_context_new (_("[URI] [URI] â?¦"));
 	g_option_context_add_main_entries (context,
 					   options,



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