28
28
#define MY_NB_ICON_STATE 3
29
29
#define MY_NB_SUB_ICONS 5
31
static gchar *s_iconName[MY_NB_SUB_ICONS] = {N_("Configure Compiz"), N_("Emerald Manager"), N_("Reload WM"), N_("Exposition"), N_("Widget Layer")};
33
static gchar *s_iconClass[MY_NB_SUB_ICONS] = {"ccsm", "emerald-theme-manager", NULL, NULL, NULL};
35
static gchar *s_iconFile[MY_NB_ICON_STATE] = {"default.svg", "broken.svg", "other.svg"};
31
static const gchar *s_iconName[MY_NB_SUB_ICONS] = {N_("Configure Compiz"), N_("Emerald Manager"), N_("Reload WM"), N_("Exposition"), N_("Widget Layer")};
33
static const gchar *s_iconClass[MY_NB_SUB_ICONS] = {"ccsm", "emerald-theme-manager", NULL, NULL, NULL};
35
static const gchar *s_iconFile[MY_NB_ICON_STATE] = {"default.svg", "broken.svg", "other.svg"};
38
38
static GList * _list_icons (void) {
43
43
if (myConfig.bScriptSubDock)
46
for (i = 0; i < j; i ++) {
46
for (i = 0; i < j; i ++)
47
48
if (i == 1 && ! myConfig.bEmeraldIcon)
49
pIcon = g_new0 (Icon, 1);
50
pIcon->cName = g_strdup (D_(s_iconName[i]));
51
if (myConfig.cUserImage[i+MY_NB_ICON_STATE] != NULL) {
52
pIcon->cFileName = cairo_dock_generate_file_path (myConfig.cUserImage[i+MY_NB_ICON_STATE]);
55
pIcon->cFileName = g_strdup_printf ("%s/%d.svg", MY_APPLET_SHARE_DATA_DIR, i);
61
pIcon->fWidthFactor = 1.;
62
pIcon->fHeightFactor = 1.;
63
pIcon->cCommand = (s_iconClass[i] != NULL ? g_strdup (s_iconClass[i]) : g_strdup ("none"));
50
pIcon = cairo_dock_create_dummy_launcher (g_strdup (D_(s_iconName[i])),
51
(myConfig.cUserImage[i+MY_NB_ICON_STATE] != NULL ?
52
cairo_dock_generate_file_path (myConfig.cUserImage[i+MY_NB_ICON_STATE]) :
53
g_strdup_printf ("%s/%d.svg", MY_APPLET_SHARE_DATA_DIR, i)),
54
(s_iconClass[i] != NULL ? g_strdup (s_iconClass[i]) : g_strdup ("none")),
64
57
pIcon->cParentDockName = g_strdup (myIcon->cName);
65
58
pIconList = g_list_append (pIconList, pIcon);
66
if (myConfig.bStealTaskBarIcon && s_iconClass[i] != NULL) {
59
if (myConfig.bStealTaskBarIcon && s_iconClass[i] != NULL)
67
61
cairo_dock_inhibate_class (s_iconClass[i], pIcon);
106
100
CD_APPLET_SET_NAME_FOR_MY_ICON (COMPIZ_DEFAULT_NAME);
108
102
GList *pIconList = _list_icons (); // ne nous appartiendra plus, donc ne pas desallouer.
110
CD_APPLET_CREATE_MY_SUBDOCK (pIconList, myConfig.cRenderer);
113
myDesklet->icons = pIconList;
114
gpointer pConfig[2] = {GINT_TO_POINTER (FALSE), GINT_TO_POINTER (FALSE)};
115
CD_APPLET_SET_DESKLET_RENDERER_WITH_DATA ("Caroussel", pConfig);
104
gpointer pConfig[2] = {GINT_TO_POINTER (FALSE), GINT_TO_POINTER (FALSE)};
105
CD_APPLET_LOAD_MY_ICONS_LIST (pIconList, myConfig.cRenderer, "Caroussel", pConfig);