~ubuntu-branches/ubuntu/maverick/nautilus-actions/maverick

« back to all changes in this revision

Viewing changes to utils/nautilus-actions-new-config.c

  • Committer: Bazaar Package Importer
  • Author(s): Christine Spang
  • Date: 2009-05-30 10:15:52 UTC
  • mfrom: (1.1.5 upstream) (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090530101552-imakfk5i8i9yx938
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
 
/* Nautilus Actions new config tool
 
1
/*
 
2
 * Nautilus Actions
 
3
 *
2
4
 * Copyright (C) 2005 The GNOME Foundation
3
 
 *
4
 
 * Authors:
5
 
 *  Frederic Ruaudel (grumz@grumz.net)
 
5
 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
 
6
 * Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
6
7
 *
7
8
 * This Program is free software; you can redistribute it and/or
8
9
 * modify it under the terms of the GNU General Public License as
9
 
 * published by the Free Software Foundation; either version 2 of the
10
 
 * License, or (at your option) any later version.
 
10
 * published by the Free Software Foundation; either version 2 of
 
11
 * the License, or (at your option) any later version.
11
12
 *
12
13
 * This Program is distributed in the hope that it will be useful,
13
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * General Public License for more details.
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
16
17
 *
17
18
 * You should have received a copy of the GNU General Public
18
19
 * License along with this Library; see the file COPYING.  If not,
19
 
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
 * Boston, MA 02111-1307, USA.
 
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)
21
28
 */
22
29
 
23
30
#include <config.h>
64
71
 
65
72
int main (int argc, char** argv)
66
73
{
67
 
        //GSList* iter;
 
74
        /*GSList* iter;*/
68
75
        GError * error = NULL;
69
76
        GOptionContext* context;
70
77
        gchar* path;
119
126
        nautilus_actions_config_action_profile_set_basenames (action_profile, basenames);
120
127
        g_slist_foreach (basenames, (GFunc) g_free, NULL);
121
128
        g_slist_free (basenames);
122
 
        
 
129
 
123
130
        nautilus_actions_config_action_profile_set_match_case (action_profile, match_case);
124
131
 
125
132
        i = 0;
156
163
                path = nautilus_actions_config_schema_writer_get_saved_filename (schema_configs, action->uuid);
157
164
                if (output_file)
158
165
                {
159
 
                        // Copy the content of the temporary file into the one asked by the user
 
166
                        /* Copy the content of the temporary file into the one asked by the user */
160
167
                        if ((success = g_file_get_contents (path, &contents, &length, &error)))
161
168
                        {
162
169
                                success = nautilus_actions_file_set_contents (output_file, contents, length, &error);
163
170
                                g_free (contents);
164
171
                        }
165
172
 
166
 
                        //--> Remove the temporary file
 
173
                        /* --> Remove the temporary file */
167
174
                        g_unlink (path);
168
 
                        
 
175
 
169
176
                        if (!success)
170
177
                        {
171
178
                                printf (_(" Failed: Can't create %s: %s\n"), output_file, error->message);
191
198
 
192
199
        exit (EXIT_SUCCESS);
193
200
}
194
 
 
195
 
// vim:ts=3:sw=3:tw=1024:cin