README: add deprecation notice
[nautilus-actions.git] / src / ui / fma-menu.h
blob93e6341d0fe5dfe997d32f796ebeabfa291ea15a
1 /*
2 * FileManager-Actions
3 * A file-manager extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
9 * FileManager-Actions is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * FileManager-Actions is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with FileManager-Actions; see the file COPYING. If not, see
21 * <http://www.gnu.org/licenses/>.
23 * Authors:
24 * Frederic Ruaudel <grumz@grumz.net>
25 * Rodrigo Moya <rodrigo@gnome-db.org>
26 * Pierre Wieser <pwieser@trychlos.org>
27 * ... and many others (see AUTHORS)
30 #ifndef __UI_FMA_MENU_H__
31 #define __UI_FMA_MENU_H__
34 * SECTION: fma-menu
35 * @title: FMAMenu
36 * @short_description: The menu helpers functions
37 * @include: ui/fma-menu.h
40 #include "core/fma-updater.h"
42 #include "fma-application.h"
43 #include "fma-main-window-def.h"
45 G_BEGIN_DECLS
47 /* This is private data, set against the main window
48 * for exclusive use of menu functions
50 typedef struct {
52 /* set at initialization time
54 gulong update_sensitivities_handler_id;
55 FMAUpdater *updater;
56 GMenuModel *maintainer;
57 GMenuModel *popup;
58 gboolean is_level_zero_writable;
59 gboolean has_writable_providers;
61 /* set when the selection changes
63 guint count_selected;
64 GList *selected_items;
65 gboolean is_parent_writable; /* new menu/new action/paste menu or action */
66 gboolean enable_new_profile; /* new profile/paste a profile */
67 gboolean is_action_writable;
68 gboolean are_parents_writable; /* duplicate */
69 gboolean are_items_writable; /* cut/delete */
71 /* set when the count of modified or deleted FMAObjectItem changes
72 * or when the level zero is changed
74 gboolean is_tree_modified;
76 /* set on focus in/out
78 gboolean treeview_has_focus;
80 /* opening a contextual popup menu
82 gulong popup_handler;
84 /* set when total count of items changes
86 gint count_menus;
87 gint count_actions;
88 gint count_profiles;
89 gboolean have_exportables;
90 gint selected_menus;
91 gint selected_actions;
92 gint selected_profiles;
93 gint clipboard_menus;
94 gint clipboard_actions;
95 gint clipboard_profiles;
97 sMenuData;
99 /* Toolbars identifiers
100 * they are listed here in the order they should be displayed
102 enum {
103 TOOLBAR_FILE_ID = 1,
104 TOOLBAR_EDIT_ID,
105 TOOLBAR_TOOLS_ID,
106 TOOLBAR_HELP_ID,
109 void fma_menu_app ( FMAApplication *application );
111 void fma_menu_win ( FMAMainWindow *main_window );
113 void fma_menu_enable_item( FMAMainWindow *main_window,
114 const gchar *action_name,
115 gboolean enable );
117 sMenuData *fma_menu_get_data ( FMAMainWindow *main_window );
119 G_END_DECLS
121 #endif /* __UI_FMA_MENU_H__ */