annotate src/editors.h @ 1279:6248faa9e829

do not translate already translated texts from desktop files
author nadvornik
date Tue, 03 Feb 2009 18:04:10 +0000
parents e0e12512cde2
children 8b89e3ff286b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 140
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef EDITORS_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define EDITORS_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 234
diff changeset
17
976
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
18 #define EDITOR_KEEP_FS 0x00000001
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
19 #define EDITOR_VERBOSE 0x00000002
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
20 #define EDITOR_VERBOSE_MULTI 0x00000004
1272
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
21 #define EDITOR_TERMINAL 0x00000008
976
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
22
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
23 #define EDITOR_DEST 0x00000100
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
24 #define EDITOR_FOR_EACH 0x00000200
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
25 #define EDITOR_SINGLE_COMMAND 0x00000400
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 234
diff changeset
26
976
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
27 #define EDITOR_ERROR_EMPTY 0x00020000
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
28 #define EDITOR_ERROR_SYNTAX 0x00040000
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
29 #define EDITOR_ERROR_INCOMPATIBLE 0x00080000
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
30 #define EDITOR_ERROR_NO_FILE 0x00100000
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
31 #define EDITOR_ERROR_CANT_EXEC 0x00200000
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
32 #define EDITOR_ERROR_STATUS 0x00400000
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
33 #define EDITOR_ERROR_SKIPPED 0x00800000
140
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
34
976
cee16cea5f23 Use constants instead of enum since value (0xffff0000) overflow INT_MAX on some platforms (seen on Solaris 10 SPARC system using the native Sun version 5.9 compilers). Reported by Jeffery Small.
zas_
parents: 768
diff changeset
35 #define EDITOR_ERROR_MASK 0xffff0000
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 234
diff changeset
36
140
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
37
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
38 /* return values from callback function */
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
39 enum {
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
40 EDITOR_CB_CONTINUE = 0, /* continue multiple editor execution on remaining files*/
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
41 EDITOR_CB_SKIP, /* skip the remaining files */
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
42 EDITOR_CB_SUSPEND /* suspend execution, one of editor_resume or editor_skip
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 234
diff changeset
43 must be called later */
140
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
44 };
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
45
1272
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
46 extern GHashTable *editors;
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
47
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
48 void editor_load_descriptions(void);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
49 GList *editor_list_get(void);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
50
140
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
51
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
52 /*
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 234
diff changeset
53 Callback is called even on skipped files, with the EDITOR_ERROR_SKIPPED flag set.
140
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
54 It is a good place to call file_data_change_info_free().
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
55
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
56 ed - pointer that can be used for editor_resume/editor_skip or NULL if all files were already processed
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
57 flags - flags above
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
58 list - list of procesed FileData structures, typically single file or whole list passed to start_editor_*
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
59 data - generic pointer
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
60 */
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
61 typedef gint (*EditorCallback) (gpointer ed, gint flags, GList *list, gpointer data);
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
62
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
63
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
64 void editor_resume(gpointer ed);
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
65 void editor_skip(gpointer ed);
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
66
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
67
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68
1272
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
69 gint start_editor_from_file(const gchar *key, FileData *fd);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
70 gint start_editor_from_filelist(const gchar *key, GList *list);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
71 gint start_editor_from_file_full(const gchar *key, FileData *fd, EditorCallback cb, gpointer data);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
72 gint start_editor_from_filelist_full(const gchar *key, GList *list, EditorCallback cb, gpointer data);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
73 gint editor_window_flag_set(const gchar *key);
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
74 gint editor_is_filter(const gchar *key);
140
e57b0207e180 editors.c was almost completely rewritten:
nadvornik
parents: 138
diff changeset
75 const gchar *editor_get_error_str(gint flags);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76
1272
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
77 const gchar *editor_get_name(const gchar *key);
731
fa8f7d7396cf Introduce an helper function that returns the name of an editor.
zas_
parents: 475
diff changeset
78
1272
e0e12512cde2 read external editors from .desktop files
nadvornik
parents: 1055
diff changeset
79 gboolean is_valid_editor_command(const gchar *key);
766
7148e125bf23 Check for existing editor command using is_valid_editor_command().
zas_
parents: 753
diff changeset
80
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
81 #endif
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 976
diff changeset
82 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */