Set Nautilus-Actions as being the actual official product name
[nautilus-actions.git] / src / nact / nact-schemes-list.h
blobe58428ff0963900d3f2a40691c639bd1bf7c185d
1 /*
2 * Nautilus-Actions
3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009, 2010, 2011 Pierre Wieser and others (see AUTHORS)
9 * This Program 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 * This Program 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
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
24 * Authors:
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 #ifndef __NACT_SCHEMES_LIST_H__
32 #define __NACT_SCHEMES_LIST_H__
34 /**
35 * SECTION: nact_schemes_list
36 * @short_description: Schemes list view management.
37 * @include: nact/nact-schemes-list.h
39 * This set of functions manages the schemes list view.
41 * Up to 2.30.x, two modes were possible:
42 * - for action: the full list is displayed, and a check box is made active
43 * when the scheme is actually selected in the profile.
44 * Adding a scheme insert an editable new row (without the description).
45 * Inline edition of the scheme is possible.
46 * Removing a scheme is possible.
47 * - in preferences, when editing the default list of schemes
48 * the 'active' checkbox is not displayed
49 * the two columns 'scheme' and 'description' are editable inline
50 * adding/removing a scheme is possible
52 * Starting with 2.31.x serie (future 3.0), the scheme conditions of a
53 * #NAIContext are handled by nact-match-list.{c,h} set of function.
54 * This set of functions is only used:
55 * a) to edit the preferences
56 * add/remove scheme
57 * edit keyword and description
58 * In this mode, the widget is embedded in the Preferences notebook.
59 * Modifications are saved when user clicks the global OK button.
60 * b) to select a scheme from the default list
61 * schemes already used by the current #NAIContext are marked as used
62 * edition of the current list is not available
63 * In this mode, widget is embedded in a dedicated #NactAddSchemeDialog
64 * dialog box
65 * OK returns the current selection (only available if current scheme
66 * is not already used)
67 * Cancel returns NULL.
70 #include <gtk/gtk.h>
72 #include "base-window.h"
74 G_BEGIN_DECLS
76 typedef void ( *pf_new_selection_cb )( const gchar *, gboolean, void * );
78 enum {
79 SCHEMES_LIST_FOR_PREFERENCES = 1,
80 SCHEMES_LIST_FOR_ADD_FROM_DEFAULTS
83 void nact_schemes_list_create_model ( GtkTreeView *treeview, guint mode );
84 void nact_schemes_list_init_view ( GtkTreeView *treeview, BaseWindow *window, pf_new_selection_cb pf, void *user_data );
85 void nact_schemes_list_setup_values ( BaseWindow *window, GSList *schemes );
86 void nact_schemes_list_show_all ( BaseWindow *window );
87 gchar *nact_schemes_list_get_current_scheme( BaseWindow *window );
88 void nact_schemes_list_save_defaults ( BaseWindow *window );
89 void nact_schemes_list_dispose ( BaseWindow *window );
91 G_END_DECLS
93 #endif /* __NACT_SCHEMES_LIST_H__ */