~ubuntu-branches/ubuntu/trusty/nautilus-actions/trusty-proposed

« back to all changes in this revision

Viewing changes to utils/nautilus-actions-check-actions-change.c

  • Committer: Bazaar Package Importer
  • Author(s): Christine Spang
  • Date: 2009-05-30 10:15:52 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090530101552-5nicx1db3luh9n7e
Tags: 1.10.1-1
* New upstream release.
  - Do not search through actions when the Nautilus-provided list of
    selected files is empty
  - Remove deprecated functions
  - All sources are now ansi-compliant, though not (yet) pedantic
  - Double-click on an action opens the editor
  - Enable the OK button as soon as required fields are filled
  - Enable syslog'ed debug messages when in maintainer mode
  - Use NACT_GNOME_COMPILE_WARNINGS (see Gnome bugzilla bug #582860)
  - Replace configure.in with configure.ac, updating all Makefile.am
    accordingly
  - Fix make distcheck
  - create nautilus-actions.doap
  - Gnome bugzilla bug #574919 fixed (Closes: #523854)
  - Gnome bugzilla bugs #522605, #573365, and #568366 fixed
  - translations updated
* Added Homepage: field to debian/control
* Bump to Standards-Version 3.8.1
* update GNOME_DOWNLOAD_URL in debian/rules
* add full list of contributors to debian/copyright
* Bump debhelper compat to 7
* Fix categories in .desktop file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Nautilus Actions
 
3
 *
 
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)
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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.
 
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
#include <config.h>
 
31
#include <gtk/gtk.h>
 
32
#include <libnautilus-actions/nautilus-actions-config.h>
 
33
#include <libnautilus-actions/nautilus-actions-config-gconf-reader.h>
 
34
 
 
35
static void nautilus_actions_action_added_handler (NautilusActionsConfig* config,
 
36
                                                                                                                                                                NautilusActionsConfigAction* action,
 
37
                                                                                                                                                                gpointer user_data)
 
38
{
 
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));*/
 
42
}
 
43
 
 
44
static void nautilus_actions_action_changed_handler (NautilusActionsConfig* config,
 
45
                                                                                                                                                                NautilusActionsConfigAction* action,
 
46
                                                                                                                                                                gpointer user_data)
 
47
{
 
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));*/
 
53
}
 
54
 
 
55
static void nautilus_actions_action_removed_handler (NautilusActionsConfig* config,
 
56
                                                                                                                                                                NautilusActionsConfigAction* action,
 
57
                                                                                                                                                                gpointer user_data)
 
58
{
 
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));*/
 
62
}
 
63
 
 
64
 
 
65
int main (int argc, char **argv)
 
66
{
 
67
        NautilusActionsConfigGconfReader* config;
 
68
 
 
69
        /* Initialize the widget set */
 
70
        gtk_init (&argc, &argv);
 
71
 
 
72
        printf ("Tracking for Action changes started... (Type Ctrl+C to stop)\n");
 
73
 
 
74
        config = nautilus_actions_config_gconf_reader_get ();
 
75
 
 
76
        g_signal_connect_after (G_OBJECT (config), "action_added",
 
77
                                                                        (GCallback)nautilus_actions_action_added_handler,
 
78
                                                                        NULL);
 
79
        g_signal_connect_after (G_OBJECT (config), "action_changed",
 
80
                                                                        (GCallback)nautilus_actions_action_changed_handler,
 
81
                                                                        NULL);
 
82
        g_signal_connect_after (G_OBJECT (config), "action_removed",
 
83
                                                                        (GCallback)nautilus_actions_action_removed_handler,
 
84
                                                                        NULL);
 
85
 
 
86
        /* Enter the main event loop, and wait for user interaction */
 
87
        gtk_main ();
 
88
 
 
89
        /* The user lost interest */
 
90
        return 0;
 
91
}