summaryrefslogtreecommitdiff
path: root/src/nautilus-view-frame.c
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-01-31 19:43:13 +0000
committerDarin Adler <darin@src.gnome.org>2001-01-31 19:43:13 +0000
commit140b9c15b1233ae0b27e60cef1909488a2576da0 (patch)
tree406b37d1d8248d6c3714839b000ec5fc80586a4e /src/nautilus-view-frame.c
parent17955b15190075a200dd9b6b2535014c36a556fb (diff)
downloadnautilus-140b9c15b1233ae0b27e60cef1909488a2576da0.tar.gz
reviewed by: Michael Engber <engber@eazel.com>
Fix bug 6192 ("mapped before underway" warning when clicking on any sidebar tab). * src/nautilus-view-frame.c: (nautilus_view_frame_map): Remove inappropriate check of state, and replace it with a simple NULL check that handles the failed case. * libnautilus-extensions/nautilus-directory-background.c: (nautilus_file_background_is_set): Fixed backwards logic by removing an erroneous "!". * libnautilus-extensions/nautilus-icon-factory.c: Formatting tweaks. * src/file-manager/fm-directory-view.c: Formatting tweak. * src/nautilus-application.c: (nautilus_application_startup): Fixed comment. (check_for_and_run_as_super_user): Formatting tweak.
Diffstat (limited to 'src/nautilus-view-frame.c')
-rw-r--r--src/nautilus-view-frame.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/nautilus-view-frame.c b/src/nautilus-view-frame.c
index 062f757b2..6f8c5fc50 100644
--- a/src/nautilus-view-frame.c
+++ b/src/nautilus-view-frame.c
@@ -1195,7 +1195,12 @@ nautilus_view_frame_set_label (NautilusViewFrame *view,
view->details->label = g_strdup (label);
}
-/* Calls activate on the underlying control frame. */
+/* Activate the underlying control frame whenever the view is mapped.
+ * This causes the view to merge its menu items, for example. For
+ * sidebar panels, it might be a little late to merge them at map
+ * time, especially since we don't unmerge them at unmap time (not
+ * until destroy time).
+ */
static void
nautilus_view_frame_map (GtkWidget *view_as_widget)
{
@@ -1205,20 +1210,9 @@ nautilus_view_frame_map (GtkWidget *view_as_widget)
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, map, (view_as_widget));
- switch (view->details->state) {
- case VIEW_FRAME_EMPTY:
- case VIEW_FRAME_NO_LOCATION:
- case VIEW_FRAME_WAITING:
- g_warning ("a view frame was mapped before it was underway");
- break;
- case VIEW_FRAME_FAILED:
- return;
- case VIEW_FRAME_UNDERWAY:
- case VIEW_FRAME_LOADED:
- break;
+ if (view->details->control_frame != NULL) {
+ bonobo_control_frame_control_activate (view->details->control_frame);
}
-
- bonobo_control_frame_control_activate (view->details->control_frame);
}
static Nautilus_History *