From 04b3fe409909822afa86e31c05c32c4e969060e4 Mon Sep 17 00:00:00 2001 From: Jason Leach Date: Sun, 14 Jan 2001 02:17:37 +0000 Subject: (Fix bug #934: Add Right-click item to hide the shortcut bar) 2001-01-13 Jason Leach (Fix bug #934: Add Right-click item to hide the shortcut bar) * e-shortcuts-view.c (class_init): Create a new hide_requested signal. (hide_shortcut_bar_cb): New function that gets called from the right click menu items, it emits the hide_requested signal. * e-shell-view.c (setup_widgets): Connect the hide_requested from the shortcut bar. (hide_requested_cb): New function. svn path=/trunk/; revision=7485 --- shell/e-shell-view.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'shell/e-shell-view.c') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 3a0c7a436d..d8a3ff5055 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -365,6 +365,19 @@ activate_shortcut_cb (EShortcutsView *shortcut_view, e_shell_view_display_uri (shell_view, uri); } +/* Callback when user chooses "Hide shortcut bar" via a right click */ +static void +hide_requested_cb (EShortcutsView *shortcut_view, + void *data) +{ + EShellView *shell_view; + + shell_view = E_SHELL_VIEW (data); + + e_shell_view_set_shortcut_bar_mode (shell_view, + E_SHELL_VIEW_SUBWINDOW_HIDDEN); +} + /* Callback called when a folder on the tree view gets clicked. */ static void folder_selected_cb (EStorageSetView *storage_set_view, @@ -508,6 +521,9 @@ setup_widgets (EShellView *shell_view) gtk_signal_connect (GTK_OBJECT (priv->shortcut_bar), "activate_shortcut", GTK_SIGNAL_FUNC (activate_shortcut_cb), shell_view); + gtk_signal_connect (GTK_OBJECT (priv->shortcut_bar), "hide_requested", + GTK_SIGNAL_FUNC (hide_requested_cb), shell_view); + /* The storage set view. */ setup_storage_set_subwindow (shell_view); -- cgit v1.2.3