Merge lp:~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet into lp:~cairo-dock-team/cairo-dock-plug-ins/plug-ins

Proposed by Jesús González on 2014-09-05
Status: Needs review
Proposed branch: lp:~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet
Merge into: lp:~cairo-dock-team/cairo-dock-plug-ins/plug-ins
Diff against target: 411 lines (+341/-0)
10 files modified
CMakeLists.txt (+14/-0)
Suspend-Workaround/CMakeLists.txt (+2/-0)
Suspend-Workaround/data/CMakeLists.txt (+7/-0)
Suspend-Workaround/data/Suspend-Workaround.conf.in (+8/-0)
Suspend-Workaround/src/CMakeLists.txt (+38/-0)
Suspend-Workaround/src/applet-config.h (+30/-0)
Suspend-Workaround/src/applet-init.c (+157/-0)
Suspend-Workaround/src/applet-init.h (+31/-0)
Suspend-Workaround/src/applet-struct.h (+47/-0)
copyright (+7/-0)
To merge this branch: bzr merge lp:~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet
Reviewer Review Type Date Requested Status
Cairo-Dock Devs 2014-09-05 Pending
Review via email: mp+233496@code.launchpad.net

Description of the change

Added Suspend-Workaround applet that fixes the icon corruption that happens with some graphic cards (e.g. nvidia) when suspending the computer.

Fixes bug #535065 "symptoms" with a workaround that doesn't need external scripts added and configured manually by affected users (as proposed in https://bugs.launchpad.net/cairo-dock-plug-ins/+bug/535065/comments/14), therefore it's a lot more user-friendly solution and it's more robust (the python script solution sometimes fails, maybe because dbus messages to reboot cairo-dock are lost).

To test it just install the applet in an affected computer and enable it, suspend the computer, resume, and voilà... icons aren't corrupted any more.

To post a comment you must log in.
Matthieu Baerts (matttbe) wrote :

Hello and thank you for this new applet!

As you said, it's easier and a more user-friendly solution to just enable an applet than downloading an external script and launching it at startup.

But the only goal of this applet is to provide a workaround to fix a bug in the Nvidia drivers and this is why we never add this solution in an applet... (Indeed it's better to fix the bug than having a lot of workarounds which are not so easy to maintain)

On the other hand, I agree with you: this bug is known and it seems Nvidia devs will not fix it soon. We have to find a solution!
Why not an even easier solution for the end user? Here we'll have a new plugin but the user will have to enable it (and we can't enable it by default, it has "a cost", it's just a workaround for a minority of users). Why not detecting the video drivers and then automatically reload the icons (or just the dynamic ones) if there is a change? We'll have to do that in the Core, a bit like the solution that we used before for the bug with the Intel 4000HD video card.

**@fabounet**: what do you think about that? It will not add any new dependences, just connect to a new signal only if proprietary NVidia drivers are used.

Matthieu Baerts (matttbe) wrote :

PS: if you want, there are some tips there about how to write a new applet: http://glx-dock.org/ww_page.php?p=Write an applet
(e.g. you can use 'myData' instead of 'myDataPtr', no need to add 'APPLET_LOG' in log messages but 'sed' can help you to only print lines linked to your applet, etc.)

Fabounet (fabounet03) wrote :

 **@fabounet**: what do you think about that? It will not add any new
dependences, just connect to a new signal only if proprietary NVidia
drivers are used.

I'm ok to add a workaround for this nvidia bug, however it should be done
in the core, not be an option, and only be enabled for nVidia cards (or any
cards that need this) and if opengl is used.
So, I would say probably in the openGL manager.

2014-09-07 22:53 GMT+02:00 Matthieu Baerts <email address hidden>:

> => http://glx-dock.org/ww_page.php?p=Write%20an%20applet
> --
>
> https://code.launchpad.net/~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet/+merge/233496
> Your team Cairo-Dock Devs is requested to review the proposed merge of
> lp:~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet into
> lp:cairo-dock-plug-ins.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~cairo-dock-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~cairo-dock-team
> More help : https://help.launchpad.net/ListHelp
>

Jesús González (jgonzalezdr) wrote :

Maybe the applet could be modified to an always activated applet (non-stoppable, I think that this can be easily done by just not declaring a stop function, isn't it?) that checks on initialization whether the graphics card is affected, and just does nothing if not needed.

This way, the applet would remain out of the core, and could be excluded from compilation.

Detecting an nvidia card could be done in many ways:
  * Querying the X server if the NV-CONTROL extension is present by using XQueryExtension() /
    XNVCTRLQueryExtension()
  * Checking if /sys/module/nvidia/ exists (the actual driver version could be also checked)
  * Checking if /proc/modules reports the nvidia kernel module being used (but that output's format
    depends on the kernel version, so it's not a very good idea)
  * A combination of the above methods.

Anyway, checking the reports about this bug, it seems that not all nvidia cards are affected (using propietary drivers, that is), and that there might be other cards affected too (maybe some Intels?), therefore an option to force the workaround activation could be useful.

I'll try to modify the applet to do this in the next days.

Matthieu Baerts (matttbe) wrote :

If we add this workaround in a new applet, we can easily disable it. But on the other hand it also means that the user has to enable it. We could automatically enable (like the gnome-integration applet) it but because this workaround doesn't need any new dependence, it could be managed by the core. To disable it, maybe we could add a new option or a flag to not compile the workaround.

The dock is already detecting the OpenGL driver in src/gldi/cairo-dock-opengl.c => https://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-core/cairo-dock/view/head:/src/gldit/cairo-dock-opengl.c#L296

We don't like workarounds but sometimes it's needed... And it's really not easy to know where it's the best place (read: the less ugly one :-P) to add a workaround :-)

@fabounet: what do you think about that.

Fabounet (fabounet03) wrote :

As I said, the workaround is OK and the code is OK too, it just needs to be
placed in the OpenGL manager (because it knows what graphic card is being
used, plus it's a problem about textures becoming corrupted on suspend)

2014-09-20 18:23 GMT+02:00 Matthieu Baerts <email address hidden>:

> If we add this workaround in a new applet, we can easily disable it. But
> on the other hand it also means that the user has to enable it. We could
> automatically enable (like the gnome-integration applet) it but because
> this workaround doesn't need any new dependence, it could be managed by the
> core. To disable it, maybe we could add a new option or a flag to not
> compile the workaround.
>
> The dock is already detecting the OpenGL driver in
> src/gldi/cairo-dock-opengl.c =>
> https://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-core/cairo-dock/view/head:/src/gldit/cairo-dock-opengl.c#L296
>
> We don't like workarounds but sometimes it's needed... And it's really not
> easy to know where it's the best place (read: the less ugly one :-P) to add
> a workaround :-)
>
> @fabounet: what do you think about that.
> --
>
> https://code.launchpad.net/~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet/+merge/233496
> Your team Cairo-Dock Devs is requested to review the proposed merge of
> lp:~jgonzalezdr/cairo-dock-plug-ins/suspend-workaround-applet into
> lp:cairo-dock-plug-ins.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~cairo-dock-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~cairo-dock-team
> More help : https://help.launchpad.net/ListHelp
>

Unmerged revisions

3119. By Jesús González on 2014-09-05

Added copyright info for the Suspend-Workaround applet

3118. By Jesús González on 2014-09-03

Added Suspend-Workaround applet that fixes the icon corruption that happens with some graphic cards (e.g. nvidia) when suspending the computer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-08-17 22:45:21 +0000
3+++ CMakeLists.txt 2014-09-05 11:39:20 +0000
4@@ -1468,6 +1468,19 @@
5 endif()
6 endif()
7
8+############# SUSPEND-WORKAROUND #################
9+set (with_suspend_workaround no)
10+if (enable-suspend-workaround)
11+ message (STATUS "> Suspend-Workaround:")
12+ set (GETTEXT_SUSPEND_WORKAROUND ${GETTEXT_PLUGINS})
13+ set (VERSION_SUSPEND_WORKAROUND "1.0.0")
14+ set (PACKAGE_SUSPEND_WORKAROUND "cd-SuspendWorkaround")
15+ set (with_suspend_workaround yes)
16+ set (suspendworkarounddatadir "${pluginsdatadir}/Suspend-Workaround")
17+ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Suspend-Workaround/data/Suspend-Workaround.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Suspend-Workaround/data/Suspend-Workaround.conf)
18+ add_subdirectory (Suspend-Workaround)
19+endif()
20+
21 message ("")
22 message (STATUS "===============")
23 message (STATUS "Language build:")
24@@ -1502,6 +1515,7 @@
25 message (STATUS " - with Terminal applet: ${with_terminal}")
26 message (STATUS " - with Weblets applet: ${with_weblets}")
27 message (STATUS " - with Xgamma applet: ${with_xgamma}")
28+message (STATUS " - with Suspend-Workaround applet: ${with_suspend_workaround}")
29 message (STATUS "Add On:")
30 message (STATUS " - with Sound-Menu support: ${with_soundmenu}")
31 message (STATUS " - with Screen Resolution support: ${with_xrandr}")
32
33=== added directory 'Suspend-Workaround'
34=== added file 'Suspend-Workaround/CMakeLists.txt'
35--- Suspend-Workaround/CMakeLists.txt 1970-01-01 00:00:00 +0000
36+++ Suspend-Workaround/CMakeLists.txt 2014-09-05 11:39:20 +0000
37@@ -0,0 +1,2 @@
38+add_subdirectory(src)
39+add_subdirectory(data)
40
41=== added directory 'Suspend-Workaround/data'
42=== added file 'Suspend-Workaround/data/CMakeLists.txt'
43--- Suspend-Workaround/data/CMakeLists.txt 1970-01-01 00:00:00 +0000
44+++ Suspend-Workaround/data/CMakeLists.txt 2014-09-05 11:39:20 +0000
45@@ -0,0 +1,7 @@
46+
47+########### install files ###############
48+
49+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Suspend-Workaround.conf
50+ icon.png
51+ DESTINATION ${suspendworkarounddatadir})
52+
53
54=== added file 'Suspend-Workaround/data/Suspend-Workaround.conf.in'
55--- Suspend-Workaround/data/Suspend-Workaround.conf.in 1970-01-01 00:00:00 +0000
56+++ Suspend-Workaround/data/Suspend-Workaround.conf.in 2014-09-05 11:39:20 +0000
57@@ -0,0 +1,8 @@
58+#@VERSION_SUSPEND_WORKAROUND@
59+
60+#[gtk-about]
61+[Icon]
62+
63+#A
64+handbook=Suspend-Workaround
65+
66
67=== added file 'Suspend-Workaround/data/icon.png'
68Binary files Suspend-Workaround/data/icon.png 1970-01-01 00:00:00 +0000 and Suspend-Workaround/data/icon.png 2014-09-05 11:39:20 +0000 differ
69=== added directory 'Suspend-Workaround/src'
70=== added file 'Suspend-Workaround/src/CMakeLists.txt'
71--- Suspend-Workaround/src/CMakeLists.txt 1970-01-01 00:00:00 +0000
72+++ Suspend-Workaround/src/CMakeLists.txt 2014-09-05 11:39:20 +0000
73@@ -0,0 +1,38 @@
74+
75+########### sources ###############
76+
77+SET(MODULE_SRCS
78+ applet-struct.h
79+ applet-init.c
80+ applet-init.h
81+ applet-config.h
82+)
83+
84+add_library(${PACKAGE_SUSPEND_WORKAROUND} SHARED ${MODULE_SRCS})
85+
86+########### compil ###############
87+add_definitions (-DMY_APPLET_SHARE_DATA_DIR="${suspendworkarounddatadir}")
88+add_definitions (-DMY_APPLET_PREVIEW_FILE="icon.png")
89+add_definitions (-DMY_APPLET_CONF_FILE="Suspend-Workaround.conf")
90+add_definitions (-DMY_APPLET_USER_DATA_DIR="Suspend-Workaround")
91+add_definitions (-DMY_APPLET_VERSION="${VERSION_SUSPEND_WORKAROUND}")
92+add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_SUSPEND_WORKAROUND}")
93+add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")
94+add_definitions (-DMY_APPLET_ICON_FILE="icon.png")
95+### uncomment the following line to allow multi-instance applet.
96+#add_definitions (-DCD_APPLET_MULTI_INSTANCE="1")
97+### uncomment the following line to allow extended OpenGL drawing.
98+#add_definitions (-DGL_GLEXT_PROTOTYPES="1")
99+
100+include_directories (
101+ ${PACKAGE_INCLUDE_DIRS})
102+
103+link_directories (
104+ ${PACKAGE_LIBRARY_DIRS})
105+
106+target_link_libraries (${PACKAGE_SUSPEND_WORKAROUND}
107+ ${PACKAGE_LIBRARIES})
108+
109+########### install files ###############
110+
111+install(TARGETS ${PACKAGE_SUSPEND_WORKAROUND} DESTINATION ${pluginsdir})
112
113=== added file 'Suspend-Workaround/src/applet-config.h'
114--- Suspend-Workaround/src/applet-config.h 1970-01-01 00:00:00 +0000
115+++ Suspend-Workaround/src/applet-config.h 2014-09-05 11:39:20 +0000
116@@ -0,0 +1,30 @@
117+/**
118+* This file is a part of the Cairo-Dock project
119+*
120+* Copyright : (C) see the 'copyright' file.
121+* E-mail : see the 'copyright' file.
122+*
123+* This program is free software; you can redistribute it and/or
124+* modify it under the terms of the GNU General Public License
125+* as published by the Free Software Foundation; either version 3
126+* of the License, or (at your option) any later version.
127+*
128+* This program is distributed in the hope that it will be useful,
129+* but WITHOUT ANY WARRANTY; without even the implied warranty of
130+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
131+* GNU General Public License for more details.
132+* You should have received a copy of the GNU General Public License
133+* along with this program. If not, see <http://www.gnu.org/licenses/>.
134+*/
135+
136+
137+#ifndef __APPLET_CONFIG__
138+#define __APPLET_CONFIG__
139+
140+#include <cairo-dock.h>
141+
142+
143+CD_APPLET_CONFIG_H
144+
145+
146+#endif
147
148=== added file 'Suspend-Workaround/src/applet-init.c'
149--- Suspend-Workaround/src/applet-init.c 1970-01-01 00:00:00 +0000
150+++ Suspend-Workaround/src/applet-init.c 2014-09-05 11:39:20 +0000
151@@ -0,0 +1,157 @@
152+/**
153+* This file is a part of the Cairo-Dock project
154+*
155+* Copyright : (C) see the 'copyright' file.
156+* E-mail : see the 'copyright' file.
157+*
158+* This program is free software; you can redistribute it and/or
159+* modify it under the terms of the GNU General Public License
160+* as published by the Free Software Foundation; either version 3
161+* of the License, or (at your option) any later version.
162+*
163+* This program is distributed in the hope that it will be useful,
164+* but WITHOUT ANY WARRANTY; without even the implied warranty of
165+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
166+* GNU General Public License for more details.
167+* You should have received a copy of the GNU General Public License
168+* along with this program. If not, see <http://www.gnu.org/licenses/>.
169+*/
170+
171+#include "stdlib.h"
172+
173+#include "applet-config.h"
174+#include "applet-struct.h"
175+#include "applet-init.h"
176+
177+#define SIGNAL_TYPE_LOGIN1 0
178+#define SIGNAL_TYPE_UPOWER 1
179+
180+#define APPLET_NAME "Suspend-Workaround"
181+#define APPLET_LOG APPLET_NAME " > "
182+
183+CD_APPLET_DEFINE_BEGIN( APPLET_NAME,
184+ 1, 0, 0,
185+ CAIRO_DOCK_CATEGORY_APPLET_SYSTEM,
186+ N_("This plug-in is a workaround that fixes the icon corruption that "
187+ "happens with some graphic cards (e.g. nvidia) when suspending the computer"),
188+ "Jesús González" )
189+ pInterface->initModule = CD_APPLET_INIT_FUNC;
190+ pInterface->stopModule = CD_APPLET_STOP_FUNC;
191+ CD_APPLET_SET_CONTAINER_TYPE( CAIRO_DOCK_MODULE_IS_PLUGIN );
192+ CD_APPLET_REDEFINE_TITLE (N_("Corruption-on-Suspend workaround"))
193+CD_APPLET_DEFINE_END
194+
195+#define DBUS_POWER_OBJECT_INFO_SIZE 2
196+
197+struct _dbus_power_object_info dbus_power_object_info[DBUS_POWER_OBJECT_INFO_SIZE] =
198+{
199+ {
200+ "org.freedesktop.login1", "/org/freedesktop/login1", "org.freedesktop.login1.Manager", "PrepareForSleep", G_TYPE_BOOLEAN,
201+ },
202+ {
203+ "org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower", "Resuming", G_TYPE_NONE,
204+ }
205+};
206+
207+static void _on_resuming(void)
208+{
209+ cd_message( APPLET_LOG "Resuming from sleep" );
210+ cairo_dock_load_current_theme();
211+}
212+
213+static void _on_prepare_for_sleep( DBusGProxy* proxy, gboolean going_to_sleep, gpointer userData )
214+{
215+ if( going_to_sleep )
216+ {
217+ cd_message( APPLET_LOG "Going to sleep" );
218+ }
219+ else
220+ {
221+ _on_resuming();
222+ }
223+}
224+
225+CD_APPLET_INIT_BEGIN
226+
227+ myDataPtr->power_object_info = NULL;
228+
229+ DBusGProxy *pMainProxy = cairo_dock_get_main_system_proxy();
230+ if( pMainProxy == NULL )
231+ {
232+ cd_warning( APPLET_LOG "Can't get main system dbus proxy" );
233+ return;
234+ }
235+
236+ int pwrobj_index = 0;
237+ gboolean pwrobj_found = FALSE;
238+ while( (pwrobj_index < DBUS_POWER_OBJECT_INFO_SIZE) ) {
239+ org_freedesktop_DBus_name_has_owner( pMainProxy, dbus_power_object_info[pwrobj_index].name, &pwrobj_found, NULL );
240+ if( pwrobj_found )
241+ {
242+ break;
243+ }
244+ pwrobj_index++;
245+ }
246+
247+ if( !pwrobj_found )
248+ {
249+ cd_warning( APPLET_LOG "Power management object not available on dbus" );
250+ return;
251+ }
252+
253+ myDataPtr->power_object_info = &dbus_power_object_info[pwrobj_index];
254+
255+ cd_message( APPLET_LOG "Power management object used is %s", myDataPtr->power_object_info->name );
256+
257+ myDataPtr->pProxy = cairo_dock_create_new_system_proxy( myDataPtr->power_object_info->name, myDataPtr->power_object_info->path, myDataPtr->power_object_info->interface );
258+ if( myDataPtr->pProxy == NULL )
259+ {
260+ cd_warning( APPLET_LOG "Error accessing power management object on dbus" );
261+ return;
262+ }
263+
264+ if( myDataPtr->power_object_info->signal_type == SIGNAL_TYPE_UPOWER )
265+ {
266+ dbus_g_object_register_marshaller (
267+ g_cclosure_marshal_VOID__VOID,
268+ G_TYPE_NONE,
269+ G_TYPE_INVALID);
270+
271+ dbus_g_proxy_add_signal( myDataPtr->pProxy, myDataPtr->power_object_info->resume_signal, G_TYPE_INVALID );
272+ dbus_g_proxy_connect_signal( myDataPtr->pProxy, myDataPtr->power_object_info->resume_signal, G_CALLBACK( _on_resuming ), NULL, NULL );
273+ }
274+ else
275+ {
276+ dbus_g_object_register_marshaller (
277+ g_cclosure_marshal_VOID__BOOLEAN,
278+ G_TYPE_NONE,
279+ G_TYPE_BOOLEAN,
280+ G_TYPE_INVALID);
281+
282+ dbus_g_proxy_add_signal( myDataPtr->pProxy, myDataPtr->power_object_info->resume_signal, G_TYPE_BOOLEAN, G_TYPE_INVALID );
283+ dbus_g_proxy_connect_signal( myDataPtr->pProxy, myDataPtr->power_object_info->resume_signal, G_CALLBACK( _on_prepare_for_sleep ), NULL, NULL );
284+ }
285+
286+ cd_message( APPLET_LOG "Listening for power management events..." );
287+
288+CD_APPLET_INIT_END
289+
290+
291+CD_APPLET_STOP_BEGIN
292+
293+ if( myDataPtr->pProxy != NULL )
294+ {
295+ if( myDataPtr->power_object_info->signal_type == SIGNAL_TYPE_UPOWER )
296+ {
297+ dbus_g_proxy_disconnect_signal( myDataPtr->pProxy, myDataPtr->power_object_info->resume_signal, G_CALLBACK( _on_resuming ), NULL);
298+ }
299+ else
300+ {
301+ dbus_g_proxy_disconnect_signal( myDataPtr->pProxy, myDataPtr->power_object_info->resume_signal, G_CALLBACK( _on_prepare_for_sleep ), NULL);
302+ }
303+ g_object_unref( myDataPtr->pProxy );
304+ }
305+
306+ cd_message( APPLET_LOG "Stopped listening for power management events" );
307+
308+CD_APPLET_STOP_END
309
310=== added file 'Suspend-Workaround/src/applet-init.h'
311--- Suspend-Workaround/src/applet-init.h 1970-01-01 00:00:00 +0000
312+++ Suspend-Workaround/src/applet-init.h 2014-09-05 11:39:20 +0000
313@@ -0,0 +1,31 @@
314+/**
315+* This file is a part of the Cairo-Dock project
316+*
317+* Copyright : (C) see the 'copyright' file.
318+* E-mail : see the 'copyright' file.
319+*
320+* This program is free software; you can redistribute it and/or
321+* modify it under the terms of the GNU General Public License
322+* as published by the Free Software Foundation; either version 3
323+* of the License, or (at your option) any later version.
324+*
325+* This program is distributed in the hope that it will be useful,
326+* but WITHOUT ANY WARRANTY; without even the implied warranty of
327+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
328+* GNU General Public License for more details.
329+* You should have received a copy of the GNU General Public License
330+* along with this program. If not, see <http://www.gnu.org/licenses/>.
331+*/
332+
333+
334+#ifndef __APPLET_INIT__
335+#define __APPLET_INIT__
336+
337+
338+#include <cairo-dock.h>
339+
340+
341+CD_APPLET_H
342+
343+
344+#endif
345
346=== added file 'Suspend-Workaround/src/applet-struct.h'
347--- Suspend-Workaround/src/applet-struct.h 1970-01-01 00:00:00 +0000
348+++ Suspend-Workaround/src/applet-struct.h 2014-09-05 11:39:20 +0000
349@@ -0,0 +1,47 @@
350+/**
351+* This file is a part of the Cairo-Dock project
352+*
353+* Copyright : (C) see the 'copyright' file.
354+* E-mail : see the 'copyright' file.
355+*
356+* This program is free software; you can redistribute it and/or
357+* modify it under the terms of the GNU General Public License
358+* as published by the Free Software Foundation; either version 3
359+* of the License, or (at your option) any later version.
360+*
361+* This program is distributed in the hope that it will be useful,
362+* but WITHOUT ANY WARRANTY; without even the implied warranty of
363+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
364+* GNU General Public License for more details.
365+* You should have received a copy of the GNU General Public License
366+* along with this program. If not, see <http://www.gnu.org/licenses/>.
367+*/
368+
369+
370+#ifndef __CD_APPLET_STRUCT__
371+#define __CD_APPLET_STRUCT__
372+
373+#include <cairo-dock.h>
374+
375+#include <dbus/dbus-glib.h>
376+
377+//\___________ structure containing the applet's configuration parameters.
378+struct _AppletConfig {
379+} ;
380+
381+struct _dbus_power_object_info {
382+ char* name;
383+ char* path;
384+ char* interface;
385+ char* resume_signal;
386+ int signal_type;
387+};
388+
389+//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
390+struct _AppletData {
391+ DBusGProxy *pProxy;
392+ struct _dbus_power_object_info *power_object_info;
393+} ;
394+
395+
396+#endif
397
398=== modified file 'copyright' (properties changed: +x to -x)
399--- copyright 2013-02-26 23:16:49 +0000
400+++ copyright 2014-09-05 11:39:20 +0000
401@@ -189,3 +189,10 @@
402 * You should have received a copy of the GNU General Public License
403 * along with this program; if not, write to the Free Software
404 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
405+
406+Files: Suspend-Workaround/*
407+Copyright: 2014 Jesús González <jgonzalez@gdr-sistemas.com>
408+License: GPL 3+ (See /usr/share/common-licenses/GPL-3 for complete license)
409+
410+Icon Suspend-Workaround/data/icon.png based on the works of New Mooon
411+<newmooon@gmail.com> and icons from the gnome icons theme by GNOME icon artists.

Subscribers

People subscribed via source and target branches