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/>.
20
#include "applet-config.h"
21
#include "applet-notifications.h"
22
#include "applet-struct.h"
23
#include "applet-composite-manager.h"
24
#include "applet-init.h"
27
CD_APPLET_DEFINITION (N_("Composite-Manager"),
29
CAIRO_DOCK_CATEGORY_APPLET_DESKTOP,
30
N_("This applet allows you to <b>toggle the composite ON/OFF</b>.\n"
31
"The composite is what allows transparency on the desktop, but it can slow down your PC, especially during games.\n"
32
"<b>Click</b> on the icon to switch the composite ON/OFF. You can define a <b>shortcut</b> for this action.\n"
33
"The applet also lets you acces to some actions of the Window-Manager, from <b>middle-click and the menu</b>.\n"
34
"You can define in the configuration a Window-Manager that will provide the composite, and another as a fallback."),
41
CD_APPLET_SET_DESKLET_RENDERER ("Simple");
46
CD_APPLET_REGISTER_FOR_CLICK_EVENT;
47
CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT;
48
CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT;
55
CD_APPLET_UNREGISTER_FOR_CLICK_EVENT;
56
CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT;
57
CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT;
61
CD_APPLET_RELOAD_BEGIN
62
if (CD_APPLET_MY_CONFIG_CHANGED)
64
if (myDesklet && CD_APPLET_MY_CONTAINER_TYPE_CHANGED) // we are now in a desklet, set a renderer.
66
CD_APPLET_SET_DESKLET_RENDERER ("Simple");
69
cd_define_prefered_wms ();
71
cd_draw_current_state ();