2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
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/>.
21
#ifndef __CAIRO_DOCK_DESKTOP_FILE_FACTORY__
22
#define __CAIRO_DOCK_DESKTOP_FILE_FACTORY__
26
#include "cairo-dock-struct.h"
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.
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;
42
/** Replace the %20 by normal spaces into the string. The string is directly modified.
43
*@param cString the string (it can't be a constant string)
45
void cairo_dock_remove_html_spaces (gchar *cString);
47
gchar *cairo_dock_add_desktop_file_from_uri_full (const gchar *cURI, const gchar *cDockName, double fOrder, CairoDockDesktopFileType iNewLauncherType, CairoDock *pDock, GError **erreur);
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.
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)
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.
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)
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.
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)
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.
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)
83
void cairo_dock_update_launcher_desktop_file (gchar *cDesktopFilePath, CairoDockDesktopFileType iLauncherType);
86
void cairo_dock_write_container_name_in_conf_file (Icon *pIcon, const gchar *cParentDockName);