nautilus r14743 - in trunk: . libnautilus-private



Author: alexl
Date: Mon Oct 20 09:41:38 2008
New Revision: 14743
URL: http://svn.gnome.org/viewvc/nautilus?rev=14743&view=rev

Log:
2008-10-20  Alexander Larsson  <alexl redhat com>

        * libnautilus-private/nautilus-mime-actions.c:
        (pause_activation_timed_cancel):
        (unpause_activation_timed_cancel):
        (activate_mount_op_active):
        (activate_files):
	Don't show timeout-based cancel when showing the "run or display"
	dialog. (#539954)



Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-mime-actions.c

Modified: trunk/libnautilus-private/nautilus-mime-actions.c
==============================================================================
--- trunk/libnautilus-private/nautilus-mime-actions.c	(original)
+++ trunk/libnautilus-private/nautilus-mime-actions.c	Mon Oct 20 09:41:38 2008
@@ -956,6 +956,24 @@
 }
 
 static void
+pause_activation_timed_cancel (ActivateParameters *parameters)
+{
+	if (parameters->timed_wait_active) {
+		eel_timed_wait_stop (cancel_activate_callback, parameters);
+		parameters->timed_wait_active = FALSE;
+	}
+}
+
+static void
+unpause_activation_timed_cancel (ActivateParameters *parameters)
+{
+	if (!parameters->timed_wait_active) {
+		activation_start_timed_cancel (parameters);
+	}
+}
+
+
+static void
 activate_mount_op_active (GtkMountOperation *operation,
 			  GParamSpec *pspec,
 			  ActivateParameters *parameters)
@@ -965,14 +983,9 @@
 	g_object_get (operation, "is-showing", &is_active, NULL);
 
 	if (is_active) {
-		if (parameters->timed_wait_active) {
-			eel_timed_wait_stop (cancel_activate_callback, parameters);
-			parameters->timed_wait_active = FALSE;
-		}
+		pause_activation_timed_cancel (parameters);
 	} else {
-		if (!parameters->timed_wait_active) {
-			activation_start_timed_cancel (parameters);
-		}
+		unpause_activation_timed_cancel (parameters);
 	}
 }
 
@@ -1051,7 +1064,9 @@
 			/* Special case for executable text files, since it might be
 			 * dangerous & unexpected to launch these.
 			 */
+			pause_activation_timed_cancel (parameters);
 			action = get_executable_text_file_action (parameters->parent_window, file);
+			unpause_activation_timed_cancel (parameters);
 		}
 
 		switch (action) {



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