4
* Copyright (C) 2005 The GNOME Foundation
5
* Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
6
* Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
8
* This Program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License as
10
* published by the Free Software Foundation; either version 2 of
11
* the License, or (at your option) any later version.
13
* This Program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public
19
* License along with this Library; see the file COPYING. If not,
20
* write to the Free Software Foundation, Inc., 59 Temple Place,
21
* Suite 330, Boston, MA 02111-1307, USA.
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)
32
#include <libnautilus-actions/nautilus-actions-config.h>
33
#include <libnautilus-actions/nautilus-actions-config-gconf-reader.h>
35
static void nautilus_actions_action_added_handler (NautilusActionsConfig* config,
36
NautilusActionsConfigAction* action,
39
printf ("Action added: <>\n");
40
/*nautilus_actions_config_free_actions_list (self->config_list);*/
41
/*self->config_list = nautilus_actions_config_get_actions (NAUTILUS_ACTIONS_CONFIG (self->configs));*/
44
static void nautilus_actions_action_changed_handler (NautilusActionsConfig* config,
45
NautilusActionsConfigAction* action,
48
printf ("Action changed: <%s>\n", action->label);
49
NautilusActionsConfigAction *cur_action = nautilus_actions_config_get_action (config, action->uuid);
50
printf ("Action changed: cur <%s>\n", cur_action->label);
51
/*nautilus_actions_config_free_actions_list (self->config_list);*/
52
/*self->config_list = nautilus_actions_config_get_actions (NAUTILUS_ACTIONS_CONFIG (self->configs));*/
55
static void nautilus_actions_action_removed_handler (NautilusActionsConfig* config,
56
NautilusActionsConfigAction* action,
59
printf ("Action removed: <>\n");
60
/*nautilus_actions_config_free_actions_list (self->config_list);*/
61
/*self->config_list = nautilus_actions_config_get_actions (NAUTILUS_ACTIONS_CONFIG (self->configs));*/
65
int main (int argc, char **argv)
67
NautilusActionsConfigGconfReader* config;
69
/* Initialize the widget set */
70
gtk_init (&argc, &argv);
72
printf ("Tracking for Action changes started... (Type Ctrl+C to stop)\n");
74
config = nautilus_actions_config_gconf_reader_get ();
76
g_signal_connect_after (G_OBJECT (config), "action_added",
77
(GCallback)nautilus_actions_action_added_handler,
79
g_signal_connect_after (G_OBJECT (config), "action_changed",
80
(GCallback)nautilus_actions_action_changed_handler,
82
g_signal_connect_after (G_OBJECT (config), "action_removed",
83
(GCallback)nautilus_actions_action_removed_handler,
86
/* Enter the main event loop, and wait for user interaction */
89
/* The user lost interest */