diff options
author | Jason Leach <jasonleach@usa.net> | 2001-01-14 10:17:37 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-01-14 10:17:37 +0800 |
commit | 04b3fe409909822afa86e31c05c32c4e969060e4 (patch) | |
tree | b78e32b4a6c0f1d011c6fa8c7359c30fd19e21a5 /shell/e-shortcuts-view.c | |
parent | d554c5bbab77882ed04cade3a1aa2f1191832c6d (diff) | |
download | gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.tar gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.tar.gz gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.tar.bz2 gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.tar.lz gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.tar.xz gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.tar.zst gsoc2013-evolution-04b3fe409909822afa86e31c05c32c4e969060e4.zip |
(Fix bug #934: Add Right-click item to hide the shortcut bar)
2001-01-13 Jason Leach <jasonleach@usa.net>
(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
Diffstat (limited to 'shell/e-shortcuts-view.c')
-rw-r--r-- | shell/e-shortcuts-view.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c index 30ced8d61f..855c0279a5 100644 --- a/shell/e-shortcuts-view.c +++ b/shell/e-shortcuts-view.c @@ -43,6 +43,7 @@ struct _EShortcutsViewPrivate { enum { ACTIVATE_SHORTCUT, + HIDE_REQUESTED, LAST_SIGNAL }; @@ -205,6 +206,20 @@ toggle_small_icons_cb (GtkWidget *widget, } static void +hide_shortcut_bar_cb (GtkWidget *widget, + void *data) +{ + RightClickMenuData *menu_data; + EShortcutsView *shortcut_view; + + menu_data = (RightClickMenuData *) data; + + shortcut_view = E_SHORTCUTS_VIEW (menu_data->shortcuts_view); + + gtk_signal_emit (GTK_OBJECT (shortcut_view), signals[HIDE_REQUESTED]); +} + +static void create_new_group_cb (GtkWidget *widget, void *data) { @@ -269,6 +284,12 @@ static GnomeUIInfo right_click_menu_uiinfo[] = { N_("Remove this shortcut group"), destroy_group_cb, NULL, NULL, 0, 0, 0, 0 }, + GNOMEUIINFO_SEPARATOR, + + { GNOME_APP_UI_ITEM, N_("_Hide the Shortcut Bar"), + N_("Hide the shortcut bar"), hide_shortcut_bar_cb, NULL, + NULL, 0, 0, 0, 0 }, + GNOMEUIINFO_END }; @@ -496,6 +517,15 @@ class_init (EShortcutsViewClass *klass) GTK_TYPE_POINTER, GTK_TYPE_STRING); + signals[HIDE_REQUESTED] = + gtk_signal_new ("hide_requested", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (EShortcutsViewClass, + hide_requested), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } |