summaryrefslogtreecommitdiff
path: root/libnautilus-extensions/nautilus-bonobo-extensions.c
diff options
context:
space:
mode:
authorMathieu Lacage <mathieu@eazel.com>2000-10-06 23:35:54 +0000
committerMathieu Lacage <mathieu@src.gnome.org>2000-10-06 23:35:54 +0000
commitb579d848698af22fef0617a73b972087f901f61a (patch)
tree25e7ab5879529e3685bccfd7c5e4110623a56a70 /libnautilus-extensions/nautilus-bonobo-extensions.c
parentd5b404333015793b86af8ef2289ac5c8997629fd (diff)
downloadnautilus-b579d848698af22fef0617a73b972087f901f61a.tar.gz
Fix bug 3125. new bonbo ui handler.
2000-10-06 Mathieu Lacage <mathieu@eazel.com> Fix bug 3125. new bonbo ui handler. * libnautilus-extensions/nautilus-bonobo-extensions.c: (nautilus_bonobo_set_hidden), (nautilus_bonobo_get_hidden): add new functions. * libnautilus-extensions/nautilus-bonobo-extensions.h: add prototypes. * src/nautilus-window-menus.c: (nautilus_window_update_show_hide_menu_items): switch to new bonobo code to hide/show toolbars. change menu paths too. * src/nautilus-window-private.h: change menu paths. * src/nautilus-window.c: (show_dock_item), (hide_dock_item), (dock_item_showing), (nautilus_window_hide_location_bar), (nautilus_window_show_location_bar), (nautilus_window_location_bar_showing), (nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar), (nautilus_window_tool_bar_showing), (nautilus_window_hide_status_bar), (nautilus_window_show_status_bar), (nautilus_window_status_bar_showing): switch to new bonobo code for toolbar hiding/showing
Diffstat (limited to 'libnautilus-extensions/nautilus-bonobo-extensions.c')
-rw-r--r--libnautilus-extensions/nautilus-bonobo-extensions.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/libnautilus-extensions/nautilus-bonobo-extensions.c b/libnautilus-extensions/nautilus-bonobo-extensions.c
index 181600618..2f32f055b 100644
--- a/libnautilus-extensions/nautilus-bonobo-extensions.c
+++ b/libnautilus-extensions/nautilus-bonobo-extensions.c
@@ -71,6 +71,36 @@ nautilus_bonobo_set_sensitive (BonoboUIComponent *ui,
NULL);
}
+void
+nautilus_bonobo_set_hidden (BonoboUIComponent *ui,
+ const char *path,
+ gboolean hidden)
+{
+ bonobo_ui_component_set_prop (ui, path,
+ "hidden",
+ hidden ? "1" : "0",
+ NULL);
+}
+
+gboolean nautilus_bonobo_get_hidden (BonoboUIComponent *ui,
+ const char *path)
+{
+ char *value;
+ value = bonobo_ui_component_get_prop (ui, path,
+ "hidden",
+ NULL);
+ if (value == NULL) {
+ return TRUE;
+ }
+
+ if (strcmp (value, "1") == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
+
+
#ifdef UIH
/**