~ubuntu-branches/ubuntu/oneiric/cairo-dock/oneiric-201110111206

« back to all changes in this revision

Viewing changes to src/cairo-dock-desktop-file-factory.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne, Matthieu Baerts (matttbe), Julien Lavergne
  • Date: 2009-10-04 16:33:52 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20091004163352-ttbbjfmpb8uzl8j4
Tags: 2.0.9-0ubuntu1
[ Matthieu Baerts (matttbe) ]
* New Upstream Version. (LP: #435587)
* Added apport hook in debian/apport
 - Add debian/apport
 - debian/cairo-dock-core.install: Added debian/apport/cairo-dock.py
* Use .desktop provided by upstream
 - Removed debian/*.desktop
 - debian/cairo-dock-core.install: install upstream desktop files. 

[ Julien Lavergne ]
* Adjust debian/changelog with Daniel Holbach suggestions.
* debian/patches/01_rename_cairo-dock-package-theme.patch: drop, 
  merged upstream.
* debian/patches/01-desktop-file-category.patch:
 - Remove Encoding field and set category to Utility.
* debian/patches/02-merge-changelog.patch:
 - Merge ChangeLog and ChangeLog-2.0.9.
* debian/apport: Remove commands with grep, python doesn't like it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
* Desktop-file-factory headers for Cairo-Dock
 
2
* This file is a part of the Cairo-Dock project
3
3
*
4
 
* Copyright : (C) 2009 by Fabrice Rey
5
 
* E-mail    : fabounet@users.berlios.de
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
6
6
*
7
7
* This program is free software; you can redistribute it and/or
8
8
* modify it under the terms of the GNU General Public License
13
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
15
* GNU General Public License for more details.
16
 
*   http://www.gnu.org/licenses/licenses.html#GPL
 
16
* You should have received a copy of the GNU General Public License
 
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
*/
18
19
 
 
20
 
19
21
#ifndef __CAIRO_DOCK_DESKTOP_FILE_FACTORY__
20
22
#define  __CAIRO_DOCK_DESKTOP_FILE_FACTORY__
21
23
 
25
27
G_BEGIN_DECLS
26
28
 
27
29
/**
28
 
*@file cairo-dock-desktop-file-factory.h This class handles the creation of desktop files, which are group/key pair files used by the dock to store information about icons : launchers, separators, sub-docks, files.
 
30
*@file cairo-dock-desktop-file-factory.h This class handles the creation of desktop files, which are group/key pair files used by Cairo-Dock to store information about icons : launchers and files, separators, sub-docks.
29
31
*/
30
32
 
31
33
 
 
34
typedef enum {
 
35
        CAIRO_DOCK_DESKTOP_FILE_FOR_LAUNCHER = 0,
 
36
        CAIRO_DOCK_DESKTOP_FILE_FOR_CONTAINER,
 
37
        CAIRO_DOCK_DESKTOP_FILE_FOR_SEPARATOR,
 
38
        CAIRO_DOCK_DESKTOP_FILE_FOR_FILE,
 
39
        CAIRO_DOCK_NB_DESKTOP_FILES
 
40
        } CairoDockDesktopFileType;
 
41
 
32
42
/** Replace the %20 by normal spaces into the string. The string is directly modified.
33
43
*@param cString the string (it can't be a constant string)
34
44
*/
35
45
void cairo_dock_remove_html_spaces (gchar *cString);
36
46
 
37
 
gchar *cairo_dock_add_desktop_file_from_uri_full (const gchar *cURI, const gchar *cDockName, double fOrder, CairoDockNewLauncherType iNewLauncherType, CairoDock *pDock, GError **erreur);
38
 
 
39
 
/** Adds a desktop file corresponding to the given URI. This URI can be either a common desktop file, or a file/folder.
40
 
*/
41
 
#define cairo_dock_add_desktop_file_from_uri(cURI, cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (cURI, cDockName, fOrder, CAIRO_DOCK_LAUNCHER_FROM_DESKTOP_FILE, pDock, erreur)
42
 
 
43
 
/** Adds a desktop file for a sub-dock.
44
 
*/
45
 
#define cairo_dock_add_desktop_file_for_container(cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (NULL, cDockName, fOrder, CAIRO_DOCK_LAUNCHER_FOR_CONTAINER, pDock, erreur)
46
 
 
47
 
/** Adds a desktop file for a separator.
48
 
*/
49
 
#define cairo_dock_add_desktop_file_for_separator(cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (NULL, cDockName, fOrder, CAIRO_DOCK_LAUNCHER_FOR_SEPARATOR, pDock, erreur)
50
 
 
51
 
 
52
 
gchar *cairo_dock_generate_desktop_filename (const gchar *cBaseName, gchar *cCairoDockDataDir);
53
 
 
54
 
 
55
 
void cairo_dock_update_launcher_desktop_file (gchar *cDesktopFilePath, CairoDockNewLauncherType iLauncherType);
56
 
 
57
 
 
58
 
gchar *cairo_dock_get_launcher_template_conf_file (CairoDockNewLauncherType iNewLauncherType);
 
47
gchar *cairo_dock_add_desktop_file_from_uri_full (const gchar *cURI, const gchar *cDockName, double fOrder, CairoDockDesktopFileType iNewLauncherType, CairoDock *pDock, GError **erreur);
 
48
 
 
49
/** Create, add and fill a desktop file for a given URI. The URI can be either a common desktop file, a script, or a fule/folder/mounting point.
 
50
*@param cURI URI of a file defining the launcher.
 
51
*@param cDockName name of the dock the separator will be added.
 
52
*@param fOrder order of the icon inside the dock.
 
53
*@param pDock the dock that will hold the icon.
 
54
*@param erreur an error filled if something went wrong.
 
55
*/
 
56
#define cairo_dock_add_desktop_file_from_uri(cURI, cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (cURI, cDockName, fOrder, CAIRO_DOCK_DESKTOP_FILE_FOR_LAUNCHER, pDock, erreur)
 
57
 
 
58
/** Create and add a desktop file for a launcher.
 
59
*@param cDockName name of the dock the launcher will be added.
 
60
*@param fOrder order of the icon inside the dock.
 
61
*@param pDock the dock that will hold the icon.
 
62
*@param erreur an error filled if something went wrong.
 
63
*/
 
64
#define cairo_dock_add_desktop_file_for_launcher(cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (NULL, cDockName, fOrder, CAIRO_DOCK_DESKTOP_FILE_FOR_LAUNCHER, pDock, erreur)
 
65
 
 
66
/** Create and add a desktop file for a sub-dock.
 
67
*@param cDockName name of the dock the separator will be added.
 
68
*@param fOrder order of the icon inside the dock.
 
69
*@param pDock the dock that will hold the icon.
 
70
*@param erreur an error filled if something went wrong.
 
71
*/
 
72
#define cairo_dock_add_desktop_file_for_container(cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (NULL, cDockName, fOrder, CAIRO_DOCK_DESKTOP_FILE_FOR_CONTAINER, pDock, erreur)
 
73
 
 
74
/** Create and add a desktop file for a separator.
 
75
*@param cDockName name of the dock the separator will be added.
 
76
*@param fOrder order of the icon inside the dock.
 
77
*@param pDock the dock that will hold the icon.
 
78
*@param erreur an error filled if something went wrong.
 
79
*/
 
80
#define cairo_dock_add_desktop_file_for_separator(cDockName, fOrder, pDock, erreur) cairo_dock_add_desktop_file_from_uri_full (NULL, cDockName, fOrder, CAIRO_DOCK_DESKTOP_FILE_FOR_SEPARATOR, pDock, erreur)
 
81
 
 
82
 
 
83
void cairo_dock_update_launcher_desktop_file (gchar *cDesktopFilePath, CairoDockDesktopFileType iLauncherType);
 
84
 
 
85
 
 
86
void cairo_dock_write_container_name_in_conf_file (Icon *pIcon, const gchar *cParentDockName);
59
87
 
60
88
 
61
89
G_END_DECLS