nautilus r14287 - in trunk: . src
- From: cneumair svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14287 - in trunk: . src
- Date: Sat, 28 Jun 2008 12:20:22 +0000 (UTC)
Author: cneumair
Date: Sat Jun 28 12:20:22 2008
New Revision: 14287
URL: http://svn.gnome.org/viewvc/nautilus?rev=14287&view=rev
Log:
2008-06-28 Christian Neumair <cneumair gnome org>
* src/nautilus-window-manage-views.c
(nautilus_window_report_selection_changed),
(nautilus_window_report_load_underway),
(nautilus_window_report_load_complete), (free_location_change),
(nautilus_window_report_view_failed),
(nautilus_window_stop_loading):
* src/nautilus-window-private.h:
Stop loading of new view instead of just unreffing it when freeing a
location change.
Ignore view signals of new view when stopping it. Otherwise we'd have
infinite recursion.
Modified:
trunk/ChangeLog
trunk/src/nautilus-window-manage-views.c
trunk/src/nautilus-window-private.h
Modified: trunk/src/nautilus-window-manage-views.c
==============================================================================
--- trunk/src/nautilus-window-manage-views.c (original)
+++ trunk/src/nautilus-window-manage-views.c Sat Jun 28 12:20:22 2008
@@ -114,6 +114,10 @@
void
nautilus_window_report_selection_changed (NautilusWindowInfo *window)
{
+ if (window->details->temporarily_ignore_view_signals) {
+ return;
+ }
+
g_signal_emit_by_name (window, "selection_changed");
}
@@ -1212,6 +1216,10 @@
nautilus_window_report_load_underway (NautilusWindow *window,
NautilusView *view)
{
+ if (window->details->temporarily_ignore_view_signals) {
+ return;
+ }
+
g_assert (NAUTILUS_IS_WINDOW (window));
if (view == window->new_content_view) {
@@ -1511,6 +1519,10 @@
nautilus_window_report_load_complete (NautilusWindow *window,
NautilusView *view)
{
+ if (window->details->temporarily_ignore_view_signals) {
+ return;
+ }
+
g_assert (NAUTILUS_IS_WINDOW (window));
/* Only handle this if we're expecting it.
@@ -1575,6 +1587,10 @@
}
if (window->new_content_view != NULL) {
+ window->details->temporarily_ignore_view_signals = TRUE;
+ nautilus_view_stop_loading (window->new_content_view);
+ window->details->temporarily_ignore_view_signals = FALSE;
+
disconnect_view (window, window->new_content_view);
g_object_unref (window->new_content_view);
window->new_content_view = NULL;
@@ -1613,8 +1629,12 @@
{
gboolean do_close_window;
GFile *fallback_load_location;
- g_warning ("A view failed. The UI will handle this with a dialog but this should be debugged.");
+ if (window->details->temporarily_ignore_view_signals) {
+ return;
+ }
+
+ g_warning ("A view failed. The UI will handle this with a dialog but this should be debugged.");
do_close_window = FALSE;
fallback_load_location = NULL;
@@ -1761,7 +1781,9 @@
nautilus_view_stop_loading (window->content_view);
if (window->new_content_view != NULL) {
+ window->details->temporarily_ignore_view_signals = TRUE;
nautilus_view_stop_loading (window->new_content_view);
+ window->details->temporarily_ignore_view_signals = FALSE;
}
cancel_location_change (window);
Modified: trunk/src/nautilus-window-private.h
==============================================================================
--- trunk/src/nautilus-window-private.h (original)
+++ trunk/src/nautilus-window-private.h Sat Jun 28 12:20:22 2008
@@ -103,6 +103,12 @@
gboolean search_mode;
GCancellable *find_mount_cancellable;
+
+ /* Ensures that we do not react on signals of a
+ * view that is re-used as new view when its loading
+ * is cancelled
+ */
+ gboolean temporarily_ignore_view_signals;
};
struct _NautilusNavigationWindowDetails {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]