brasero r1598 - in trunk: . src



Author: philippr
Date: Tue Dec  2 20:45:59 2008
New Revision: 1598
URL: http://svn.gnome.org/viewvc/brasero?rev=1598&view=rev

Log:
	Fix alert error window popping up before his parent is shown

	* src/brasero-drive-properties.c
	(brasero_drive_properties_set_tmpdir_info):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-drive-properties.c

Modified: trunk/src/brasero-drive-properties.c
==============================================================================
--- trunk/src/brasero-drive-properties.c	(original)
+++ trunk/src/brasero-drive-properties.c	Tue Dec  2 20:45:59 2008
@@ -137,6 +137,7 @@
 	GFile *file;
 	gchar *string;
 	GFileInfo *info;
+	gboolean noalert;
 	GError *error = NULL;
 	guint64 vol_size = 0;
 	const gchar *filesystem;
@@ -144,6 +145,12 @@
 
 	priv = BRASERO_DRIVE_PROPERTIES_PRIVATE (self);
 
+	/* This is to avoid showing an alert right before window is shown */
+	if (!GTK_WIDGET_VISIBLE (self))
+		noalert = TRUE;
+	else
+		noalert = FALSE;
+
 	/* get the volume free space */
 	file = g_file_new_for_commandline_arg (path);
 	if (!file) {
@@ -168,7 +175,8 @@
 		return FALSE;
 	}
 
-	if (!g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
+	if (!noalert
+	&&  !g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
 		gint answer;
 		gchar *string;
 		GtkWidget *dialog;
@@ -222,6 +230,7 @@
 	filesystem = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
 	if (priv->check_filesystem
 	&&  filesystem
+	&& !noalert
 	&& !strcmp (filesystem, "msdos")) {
 		gint answer;
 		GtkWidget *dialog;



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