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.
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)
35 #include <api/na-object-api.h>
37 #include "nact-clipboard.h"
38 #include "nact-menubar-priv.h"
39 #include "nact-main-window.h"
40 #include "nact-tree-ieditable.h"
43 * nact_menubar_maintainer_on_update_sensitivities:
44 * @bar: this #NactMenubar object.
46 * Update sensitivities on the Maintainer menu.
49 nact_menubar_maintainer_on_update_sensitivities( const NactMenubar
*bar
)
54 * nact_menubar_maintainer_on_dump_selection:
55 * @action: the #GtkAction of the item.
56 * @window: the #BaseWindow main application window.
58 * Triggers the "Maintainer/Dump selection" item.
61 nact_menubar_maintainer_on_dump_selection( GtkAction
*action
, BaseWindow
*window
)
65 BAR_WINDOW_VOID( window
);
67 items
= na_object_copyref_items( bar
->private->selected_items
);
68 na_object_dump_tree( items
);
69 na_object_free_items( items
);
73 * nact_menubar_maintainer_on_brief_tree_store_dump:
74 * @action: the #GtkAction of the item.
75 * @window: the #BaseWindow main application window.
77 * Triggers the "Maintainer/Brief treestore dump" item.
80 nact_menubar_maintainer_on_brief_tree_store_dump( GtkAction
*action
, BaseWindow
*window
)
82 NactTreeView
*items_view
;
85 items_view
= nact_main_window_get_items_view( NACT_MAIN_WINDOW( window
));
86 items
= nact_tree_view_get_items( items_view
);
87 na_object_dump_tree( items
);
88 na_object_free_items( items
);
92 * nact_menubar_maintainer_on_list_modified_items:
93 * @action: the #GtkAction of the item.
94 * @window: the #BaseWindow main application window.
96 * Triggers the "Maintainer/List modified items" item.
99 nact_menubar_maintainer_on_list_modified_items( GtkAction
*action
, BaseWindow
*window
)
101 NactTreeView
*items_view
;
103 items_view
= nact_main_window_get_items_view( NACT_MAIN_WINDOW( window
));
104 nact_tree_ieditable_dump_modified( NACT_TREE_IEDITABLE( items_view
));
108 * nact_menubar_maintainer_on_dump_clipboard:
109 * @action: the #GtkAction of the item.
110 * @window: the #BaseWindow main application window.
112 * Triggers the "Maintainer/Dump clipboard" item.
115 nact_menubar_maintainer_on_dump_clipboard( GtkAction
*action
, BaseWindow
*window
)
117 nact_clipboard_dump( nact_main_window_get_clipboard( NACT_MAIN_WINDOW( window
)));
121 * Test a miscellaneous function
124 nact_menubar_maintainer_on_test_function( GtkAction
*action
, BaseWindow
*window
)
126 gboolean is_willing
= base_window_is_willing_to_quit( BASE_WINDOW( window
));
127 g_debug( "nact_menubar_maintainer_on_test_function: willing_to=%s", is_willing
? "True":"False" );