1 /* 2 * Nautilus-Actions 3 * A Nautilus extension which offers configurable context menu actions. 4 * 5 * Copyright (C) 2005 The GNOME Foundation 6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS) 7 * Copyright (C) 2009-2014 Pierre Wieser and others (see AUTHORS) 8 * 9 * Nautilus-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. 13 * 14 * Nautilus-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. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with Nautilus-Actions; see the file COPYING. If not, see 21 * <http://www.gnu.org/licenses/>. 22 * 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) 28 */ 29 30 #ifndef __NACT_SCHEMES_LIST_H__ 31 #define __NACT_SCHEMES_LIST_H__ 32 33 /** 34 * SECTION: nact_schemes_list 35 * @short_description: Schemes list view management. 36 * @include: nact/nact-schemes-list.h 37 * 38 * This set of functions manages the schemes list view. 39 * 40 * Up to 2.30.x, two modes were possible: 41 * - for action: the full list is displayed, and a check box is made active 42 * when the scheme is actually selected in the profile. 43 * Adding a scheme insert an editable new row (without the description). 44 * Inline edition of the scheme is possible. 45 * Removing a scheme is possible. 46 * - in preferences, when editing the default list of schemes 47 * the 'active' checkbox is not displayed 48 * the two columns 'scheme' and 'description' are editable inline 49 * adding/removing a scheme is possible 50 * 51 * Starting with 2.31.x serie (future 3.0), the scheme conditions of a 52 * #NAIContext are handled by nact-match-list.{c,h} set of function. 53 * This set of functions is only used: 54 * a) to edit the preferences 55 * add/remove scheme 56 * edit keyword and description 57 * In this mode, the widget is embedded in the Preferences notebook. 58 * Modifications are saved when user clicks the global OK button. 59 * b) to select a scheme from the default list 60 * schemes already used by the current #NAIContext are marked as used 61 * edition of the current list is not available 62 * In this mode, widget is embedded in a dedicated #NactAddSchemeDialog 63 * dialog box 64 * OK returns the current selection (only available if current scheme 65 * is not already used) 66 * Cancel returns NULL. 67 */ 68 69 #include <gtk/gtk.h> 70 71 #include "base-window.h" 72 73 G_BEGIN_DECLS 74 75 typedef void ( *pf_new_selection_cb )( const gchar *, gboolean, void * ); 76 77 enum { 78 SCHEMES_LIST_FOR_PREFERENCES = 1, 79 SCHEMES_LIST_FOR_ADD_FROM_DEFAULTS 80 }; 81 82 void nact_schemes_list_create_model ( GtkTreeView *treeview, guint mode ); 83 void nact_schemes_list_init_view ( GtkTreeView *treeview, BaseWindow *window, pf_new_selection_cb pf, void *user_data ); 84 void nact_schemes_list_setup_values ( BaseWindow *window, GSList *schemes ); 85 void nact_schemes_list_show_all ( BaseWindow *window ); 86 gchar *nact_schemes_list_get_current_scheme( BaseWindow *window ); 87 void nact_schemes_list_save_defaults ( BaseWindow *window ); 88 void nact_schemes_list_dispose ( BaseWindow *window ); 89 90 G_END_DECLS 91 92 #endif /* __NACT_SCHEMES_LIST_H__ */ 93