summaryrefslogtreecommitdiff
path: root/libnautilus
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-02-17 00:56:04 +0000
committerDarin Adler <darin@src.gnome.org>2001-02-17 00:56:04 +0000
commit33e0bb3642a3e55291ced022d6da53af07caac45 (patch)
treecd14126f0909755e1cb3634dbc14959fed1f826c /libnautilus
parent98c6648ca311757cfff9af18f4663d88aa3df00e (diff)
downloadnautilus-33e0bb3642a3e55291ced022d6da53af07caac45.tar.gz
reviewed by: John Sullivan <sullivan@eazel.com>
Fixed bug 6477 (no way for intall view to send user "back where they came from") by adding a "go back" command for views. * libnautilus/nautilus-view-component.idl: Add "go back". * libnautilus/nautilus-view.h: * libnautilus/nautilus-view.c: (nautilus_view_go_back): Add "go back". * src/nautilus-view-frame-private.h: * src/nautilus-view-frame-corba.c: (go_back), (impl_Nautilus_ViewFrame_go_back): Add "go back". * src/nautilus-view-frame.h: * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class), (nautilus_view_frame_go_back): Add "go back". * src/nautilus-window-manage-views.c: (go_back_callback): Add code to either go back or go home. * src/nautilus-window-toolbars.c: (back_or_forward_button_pressed_callback): Formatting tweak.
Diffstat (limited to 'libnautilus')
-rw-r--r--libnautilus/nautilus-view-component.idl10
-rw-r--r--libnautilus/nautilus-view.c13
-rw-r--r--libnautilus/nautilus-view.h1
3 files changed, 24 insertions, 0 deletions
diff --git a/libnautilus/nautilus-view-component.idl b/libnautilus/nautilus-view-component.idl
index badecc1db..ba8e515df 100644
--- a/libnautilus/nautilus-view-component.idl
+++ b/libnautilus/nautilus-view-component.idl
@@ -139,6 +139,16 @@ module Nautilus {
/* Called by a view component to change the title. */
oneway void set_title (in string new_title);
+
+ /* Called when a view component wants to make the
+ * window it's in "go back". At some point we may add a more
+ * complete set of operations. This one is very useful for
+ * components that do something and then return.
+ * If there's nowhere to go back to, it goes home, which
+ * is not quite the same as the "back" button in the UI,
+ * which does nothing if there's nowhere to go.
+ */
+ oneway void go_back ();
};
};
diff --git a/libnautilus/nautilus-view.c b/libnautilus/nautilus-view.c
index 7c979bce6..45982387c 100644
--- a/libnautilus/nautilus-view.c
+++ b/libnautilus/nautilus-view.c
@@ -646,6 +646,19 @@ nautilus_view_set_title (NautilusView *view,
view_frame_call_end (view_frame, &ev);
}
+void
+nautilus_view_go_back (NautilusView *view)
+{
+ CORBA_Environment ev;
+ Nautilus_ViewFrame view_frame;
+
+ view_frame = view_frame_call_begin (view, &ev);
+ if (view_frame != CORBA_OBJECT_NIL) {
+ Nautilus_ViewFrame_go_back (view_frame, &ev);
+ }
+ view_frame_call_end (view_frame, &ev);
+}
+
BonoboControl *
nautilus_view_get_bonobo_control (NautilusView *view)
{
diff --git a/libnautilus/nautilus-view.h b/libnautilus/nautilus-view.h
index a06a08727..adf0c0b81 100644
--- a/libnautilus/nautilus-view.h
+++ b/libnautilus/nautilus-view.h
@@ -89,6 +89,7 @@ void nautilus_view_report_load_complete (NautilusV
void nautilus_view_report_load_failed (NautilusView *view);
void nautilus_view_set_title (NautilusView *view,
const char *title);
+void nautilus_view_go_back (NautilusView *view);
/* Some utility functions useful for doing the CORBA work directly.
* Not needed by most components, but shared with the view frame code,