Merge lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.3.0-3 into lp:ubuntu/oneiric/cairo-dock-plug-ins

Proposed by Matthieu Baerts
Status: Merged
Merged at revision: 20
Proposed branch: lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.3.0-3
Merge into: lp:ubuntu/oneiric/cairo-dock-plug-ins
Diff against target: 1611 lines (+21/-1508)
10 files modified
.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/CMakeLists.txt (+0/-941)
.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/dnd2share/src/applet-backend-ubuntuone.c (+0/-95)
.pc/02-weather-fix_upstream-version-2.3.0~2.2.patch/weather/src/applet-read-data.c (+0/-462)
.pc/applied-patches (+0/-2)
CMakeLists.txt (+1/-1)
Status-Notifier/src/CMakeLists.txt (+2/-2)
debian/changelog (+14/-0)
debian/control (+3/-3)
debian/patches/series (+0/-2)
weather/src/applet-load-icons.c (+1/-0)
To merge this branch: bzr merge lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.3.0-3
Reviewer Review Type Date Requested Status
Michael Terry Approve
Review via email: mp+65213@code.launchpad.net

Description of the change

This is a bugs fixed version.

How to reproduce the bugs:
   * Simply drop a file into the Drop to Share (aka DND2Share) applet configured to use UbuntuOne and u1sdtool will crash.
   * If the connection is stopped/slowed down during the download of weather xml files, the dock (version 2.3.0~1 and 2.3.0~2.1) will crash.
   * Translations of Status Notifier applet are not enabled.

Thank you

PS: please don't forget to update the core too (LP: #799773)

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

Looks good, thanks! Merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed directory '.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch'
=== removed file '.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/CMakeLists.txt'
--- .pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/CMakeLists.txt 2011-06-06 10:13:07 +0000
+++ .pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,941 +0,0 @@
1########### requirements ###############
2
3cmake_minimum_required (VERSION 2.6)
4find_package (PkgConfig)
5include (CheckLibraryExists)
6include (CheckIncludeFiles)
7include (CheckFunctionExists)
8include (CheckSymbolExists)
9
10########### project ###############
11
12project ("cairo-dock-plugins")
13set (VERSION "2.3.0~2")
14
15add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall
16if (NOT ${CMAKE_BUILD_TYPE})
17 add_definitions (-O3)
18endif()
19add_definitions (-DGL_GLEXT_PROTOTYPES="1")
20
21############ sources tarball #############
22
23set (CPACK_SOURCE_GENERATOR "TGZ")
24set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
25set (CPACK_SOURCE_IGNORE_FILES
26 "/build/;/.bzr/;bzrignore$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}")
27include (CPack)
28
29add_custom_target( dist
30 COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
31add_custom_target(dist-bzr
32 COMMAND bzr export ${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz
33 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
34
35############ uninstall #############
36
37configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake IMMEDIATE @ONLY)
38add_custom_target (uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
39
40########### global variables ###############
41
42if( WIN32 )
43 message(FATAL_ERROR "Cairo-Dock requires an air-conditioned room. Please close Windows!")
44endif( WIN32 )
45
46set (PACKAGE ${CMAKE_PROJECT_NAME})
47set (GETTEXT_PACKAGE ${PACKAGE})
48
49# get plug-ins install dir
50execute_process(
51 COMMAND pkg-config cairo-dock --variable=pluginsdir # /usr/lib/cairo-dock
52 OUTPUT_VARIABLE pluginsdir)
53STRING (REGEX REPLACE "\n" "" pluginsdir ${pluginsdir}) # la commande rajoute un retour chariot ...
54# get plug-ins data dir
55execute_process(
56 COMMAND pkg-config cairo-dock --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins
57 OUTPUT_VARIABLE pluginsdatadir)
58STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir})
59# check that version matches with the core
60execute_process(
61 COMMAND pkg-config --modversion cairo-dock # 2.2.0-3
62 OUTPUT_VARIABLE dock_version)
63STRING (REGEX REPLACE "\n" "" dock_version ${dock_version})
64if (NOT "${dock_version}" STREQUAL "${VERSION}") # Version
65 MESSAGE (FATAL_ERROR "warning : version mismatch with the core : " ${VERSION} <> ${dock_version})
66endif()
67
68#if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT "${FORCE_LIB64}" STREQUAL "") # 64bits and force install in lib64
69# set (libname "lib64")
70#else()
71# set (libname "lib${LIB_SUFFIX}")
72#endif()
73#set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock") # /usr/lib
74
75# check that installation dir matches with the core
76GET_FILENAME_COMPONENT(libdir "${pluginsdir}/.." ABSOLUTE) # /usr/lib
77GET_FILENAME_COMPONENT(prefix "${pluginsdir}/../.." ABSOLUTE) # /usr
78if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}")
79 message (STATUS "Warning : plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}")
80 set (CMAKE_INSTALL_PREFIX "${prefix}")
81 #set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock")
82endif()
83
84# set internationalisation
85set (GETTEXT_PLUGINS "cairo-dock-plugins")
86set (localedir "${CMAKE_INSTALL_PREFIX}/share/locale")
87set (gaugesdir "${CMAKE_INSTALL_PREFIX}/share/cairo-dock/gauges")
88
89set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files
90
91########### dependancies ###############
92
93message ("")
94message (STATUS "=====================")
95message (STATUS "Check dependancies...")
96message (STATUS "=====================")
97message ("")
98
99pkg_check_modules ("PACKAGE" REQUIRED "gtk+-2.0" "gthread-2.0" "cairo" "librsvg-2.0" "dbus-1" "dbus-glib-1" "libxml-2.0" "gtkglext-1.0" "cairo-dock")
100
101############# GLIB #################
102pkg_check_modules (GLIB glib-2.0)
103 STRING (REGEX REPLACE "\\..*" "" GLIB_MAJOR "${GLIB_VERSION}") # 2.28.3 => 2
104 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" GLIB_MINOR "${GLIB_VERSION}") # 2.28.3 => 2.28
105 STRING (REGEX REPLACE "\\.[0-9]*" "" GLIB_MINOR "${GLIB_MINOR}") # 2.28 => 28
106 STRING (REGEX REPLACE ".*\\." "" GLIB_NANO "${GLIB_VERSION}") # 2.28.3 => 3
107 STRING (REGEX REPLACE "-.*" "" GLIB_NANO "${GLIB_NANO}")
108
109############# ALSA_MIXER #################
110set (with_alsa "no")
111if (NOT "${enable-alsa-mixer}" STREQUAL "no")
112 pkg_check_modules (ALSA_MIXER_PACKAGE alsa)
113 if ("${ALSA_MIXER_PACKAGE_FOUND}" STREQUAL "")
114 message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.")
115 else()
116 set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS})
117 set (VERSION_ALSA_MIXER "1.0.12")
118 set (PACKAGE_ALSA_MIXER "cd-AlsaMixer")
119 set (with_alsa "yes")
120 set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer")
121 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/alsaMixer/data/AlsaMixer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/alsaMixer/data/AlsaMixer.conf)
122 add_subdirectory ("alsaMixer")
123 endif()
124endif()
125
126############# ANIMATED ICONS #################
127set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS})
128set (VERSION_ANIMATED_ICONS "1.0.10")
129set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons")
130set (animated_iconsdatadir "${pluginsdatadir}/Animated-icons")
131configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Animated-icons/data/Animated-icons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Animated-icons/data/Animated-icons.conf)
132add_subdirectory (Animated-icons)
133
134############# CAIRO_PENGUIN #################
135set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS})
136set (VERSION_CAIRO_PENGUIN "1.1.8")
137set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin")
138set (cairo_penguinuserdirname "Cairo-Penguin")
139set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin")
140configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Cairo-Penguin/data/Cairo-Penguin.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Cairo-Penguin/data/Cairo-Penguin.conf)
141add_subdirectory (Cairo-Penguin)
142
143############# CLIPPER #################
144set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS})
145set (VERSION_CLIPPER "1.1.4")
146set (PACKAGE_CLIPPER "cd-Clipper")
147set (Clipperdatadir "${pluginsdatadir}/Clipper")
148configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf)
149add_subdirectory (Clipper)
150
151############# CLOCK #################
152set (with_ical "yes")
153pkg_check_modules ("LIBICAL_PACKAGE" "libical")
154if ("${LIBICAL_PACKAGE_FOUND}" STREQUAL "")
155 set (with_ical "no")
156 message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.")
157endif()
158set (GETTEXT_CLOCK ${GETTEXT_PLUGINS})
159set (VERSION_CLOCK "2.1.2")
160set (PACKAGE_CLOCK "cd-clock")
161set (clockuserdirname "clock")
162set (clockdatadir "${pluginsdatadir}/clock")
163configure_file (${CMAKE_CURRENT_SOURCE_DIR}/clock/data/clock.conf.in ${CMAKE_CURRENT_BINARY_DIR}/clock/data/clock.conf)
164add_subdirectory (clock)
165
166############# COMPIZ_ICON #################
167set (GETTEXT_COMPIZ_ICON ${GETTEXT_PLUGINS})
168set (VERSION_COMPIZ_ICON "1.1.6")
169set (PACKAGE_COMPIZ_ICON "cd-compiz-icon")
170set (compiz_icondatadir "${pluginsdatadir}/compiz-icon")
171configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compiz-icon/data/compiz-icon.conf.in ${CMAKE_CURRENT_BINARY_DIR}/compiz-icon/data/compiz-icon.conf)
172add_subdirectory (compiz-icon)
173
174############# DBUS #################
175find_program (PYTHON_EXECUTABLE python)
176EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION)
177if ("${PYTHON_VERSION}" STREQUAL "")
178 message (STATUS "Could not find Python, won't install Python interface.")
179 set (with_python "no")
180else()
181 STRING (REGEX REPLACE "\n" "" PYTHON_VERSION ${PYTHON_VERSION})
182 message (STATUS "Python Version: ${PYTHON_VERSION}")
183 GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE)
184 if (EXISTS ${DEBIAN_VERSION})
185 message (STATUS " will use '--install-layout deb' with 'python setup.py install'")
186 set (DEBIAN_INSTALL_LAYOUT "--install-layout deb")
187 endif()
188 set (PYTHON_FOUND "TRUE")
189 set (with_python "yes")
190endif()
191
192# find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs.
193find_program (RUBY_EXECUTABLE ruby)
194EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']"
195 OUTPUT_VARIABLE RUBY_LIB_DIR)
196message (STATUS "RUBY_LIBRARY: ${RUBY_LIB_DIR}")
197if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil")
198 message (STATUS "Could not find ruby libs, won't install Ruby interface.")
199 set (with_ruby "no")
200else()
201 string (REGEX REPLACE "lib/ruby/[0-9].[0-9]" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}")
202 string (REGEX REPLACE "${RUBY_LIB_DIR_INSTALL}" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}")
203 set (RUBY_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${RUBY_LIB_DIR_INSTALL}")
204 message (STATUS " will be installed in: ${RUBY_LIB_DIR}")
205 set (RUBY_FOUND "TRUE")
206 set (with_ruby "yes")
207endif()
208
209#find_package (Mono)
210find_program (GMCS_EXECUTABLE gmcs)
211if ("${GMCS_EXECUTABLE}" STREQUAL "" OR NOT EXISTS ${GMCS_EXECUTABLE})
212 message (STATUS "Could not find Mono compiler gmcs, won't build Mono interface.")
213 set (with_mono "no")
214else()
215 pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0)
216 if ("${MONO_PACKAGE_FOUND}" STREQUAL "")
217 message (STATUS "Could not find glib-sharp-2.0, ndesk-dbus-1.0 or ndesk-dbus-glib-1.0; won't be built Mono interface.")
218 set (with_mono "no")
219 else()
220 set (MONO_FOUND "TRUE")
221 set (with_mono "yes")
222 endif()
223endif()
224
225# Valac is only riquired to convert vala files to C files.
226# So we can directly use produced files (c, h, vapi) without using valac.
227set (with_vala "yes")
228set (with_valac "no")
229find_program (VALAC_EXE valac)
230message (STATUS "VALAC_EXE: ${VALAC_EXE}")
231
232if ("${WITH_VALA}" STREQUAL "no")
233 set (with_vala "no")
234# >= Glib 2.26
235elseif (${GLIB_MAJOR} LESS 3 AND ${GLIB_MINOR} LESS 26)
236 set (with_vala "no")
237elseif (NOT "${VALAC_EXE}" STREQUAL "VALAC_EXE-NOTFOUND") # now it works with 0.10 and 0.11 (= next 0.12)
238 execute_process(COMMAND ${VALAC_EXE} "--version"
239 OUTPUT_VARIABLE "VALA_VERSION")
240 string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION})
241 string(STRIP ${VALA_VERSION} "VALA_VERSION")
242 message (STATUS "VALA_VERSION: ${VALA_VERSION}")
243
244 STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}")
245 # message (STATUS "VALA_MAJOR : ${VALA_MAJOR}")
246
247 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7
248 STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}")
249 # message (STATUS "VALA_MINOR : ${VALA_MINOR}")
250
251 STRING (REGEX REPLACE ".*\\." "" VALA_NANO "${VALA_VERSION}")
252 STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}")
253 # message (STATUS "VALA_NANO : ${VALA_NANO}")
254
255 if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala > 0.10
256 message (STATUS " Vala compiler OK (>= 0.10).")
257 set (VALAC_FOUND "TRUE")
258 set (with_valac "yes")
259 else()
260 message (STATUS "Vala compiler is too old (0.10 required), won't build Vala interface.")
261 endif()
262endif()
263
264
265set (GETTEXT_DBUS ${GETTEXT_PLUGINS})
266set (VERSION_DBUS "1.2.1")
267set (PACKAGE_DBUS "cd-Dbus")
268set (dbusdatadir "${pluginsdatadir}/Dbus")
269configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Dbus/data/Dbus.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Dbus/data/Dbus.conf)
270add_subdirectory (Dbus)
271
272############# DESKLET_RENDERING #################
273set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS})
274set (VERSION_DESKLET_RENDERING "1.5.6")
275set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering")
276set (desklet_renderingdatadir "${pluginsdatadir}/desklet-rendering")
277configure_file (${CMAKE_CURRENT_SOURCE_DIR}/desklet-rendering/data/desklet-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/desklet-rendering/data/desklet-rendering.conf)
278add_subdirectory (desklet-rendering)
279
280############# DIALOG_RENDERING #################
281set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS})
282set (VERSION_DIALOG_RENDERING "0.5.1")
283set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering")
284set (dialog_renderingdatadir "${pluginsdatadir}/dialog-rendering")
285configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dialog-rendering/data/dialog-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dialog-rendering/data/dialog-rendering.conf)
286add_subdirectory (dialog-rendering)
287
288############# DISKS #################
289set (with_disks "no")
290if ("${enable-disks}" STREQUAL "yes")
291 set (GETTEXT_DISKS ${GETTEXT_PLUGINS})
292 set (VERSION_DISKS "0.0.2")
293 set (PACKAGE_DISKS "cd-disks")
294 set (with_disks "yes")
295 set (disksdatadir "${pluginsdatadir}/Disks")
296 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Disks/data/Disks.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Disks/data/Disks.conf)
297 add_subdirectory ("Disks")
298endif()
299
300############# DND2SHARE #################
301set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS})
302set (VERSION_DND2SHARE "1.0.5")
303set (PACKAGE_DND2SHARE "cd-dnd2share")
304set (dnd2sharedatadir "${pluginsdatadir}/dnd2share")
305configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dnd2share/data/dnd2share.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dnd2share/data/dnd2share.conf)
306add_subdirectory (dnd2share)
307
308############# DOCK RENDERING #################
309set (GETTEXT_RENDERING ${GETTEXT_PLUGINS})
310set (VERSION_RENDERING "1.5.9")
311set (PACKAGE_RENDERING "cd-rendering")
312set (renderingdatadir "${pluginsdatadir}/rendering")
313configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dock-rendering/data/rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dock-rendering/data/rendering.conf)
314add_subdirectory (dock-rendering)
315
316############# DONCKY #################
317set (with_doncky "no")
318if ("${enable-doncky}" STREQUAL "yes")
319 set (GETTEXT_DONCKY ${GETTEXT_PLUGINS})
320 set (VERSION_DONCKY "0.0.4")
321 set (PACKAGE_DONCKY "cd-doncky")
322 set (with_doncky "yes")
323 set (donckydatadir "${pluginsdatadir}/Doncky")
324 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doncky/data/Doncky.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Doncky/data/Doncky.conf)
325 add_subdirectory (Doncky)
326endif()
327
328############# DROP INDICATOR #################
329set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS})
330set (VERSION_DROP_INDICATOR "1.1.4")
331set (PACKAGE_DROP_INDICATOR "cd-drop_indicator")
332set (drop_indicatordatadir "${pluginsdatadir}/drop-indicator")
333configure_file (${CMAKE_CURRENT_SOURCE_DIR}/drop-indicator/data/drop_indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/drop-indicator/data/drop_indicator.conf)
334add_subdirectory (drop-indicator)
335
336############# DUSTBIN #################
337set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS})
338set (VERSION_DUSTBIN "2.3.1")
339set (PACKAGE_DUSTBIN "cd-dustbin")
340set (dustbinuserdirname "dustbin")
341set (dustbindatadir "${pluginsdatadir}/dustbin")
342configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dustbin/data/dustbin.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dustbin/data/dustbin.conf)
343add_subdirectory (dustbin)
344
345############# FOLDERS #################
346set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS})
347set (VERSION_FOLDERS "0.2.1")
348set (PACKAGE_FOLDERS "cd-Folders")
349set (foldersdatadir "${pluginsdatadir}/Folders")
350configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf)
351add_subdirectory (Folders)
352
353############# GMENU #################
354set (with_gmenu "no")
355if (NOT "${enable-gmenu}" STREQUAL "no")
356 pkg_check_modules (GMENU_PACKAGE libgnome-menu)
357 if ("${GMENU_PACKAGE_FOUND}" STREQUAL "")
358 message (STATUS "Could not find libgnome-menu; Cairo-Dock won't be built with GMenu applet.")
359 else()
360 set (GETTEXT_GMENU ${GETTEXT_PLUGINS})
361 set (VERSION_GMENU "1.1.6")
362 set (PACKAGE_GMENU "cd-GMenu")
363 set (with_gmenu "yes")
364 set (gmenudatadir "${pluginsdatadir}/GMenu")
365 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/GMenu/data/GMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/GMenu/data/GMenu.conf)
366 add_subdirectory ("GMenu")
367 endif()
368endif()
369
370############# GVFS-INTEGRATION #################
371pkg_check_modules ("LIBGIO" "gio-2.0")
372add_subdirectory (gvfs-integration)
373
374############# GNOME-INTEGRATION #################
375set (with_gnome_integration "no")
376if (NOT "${enable-gnome-integration}" STREQUAL "no")
377 pkg_check_modules (GNOME_INTEGRATION gio-2.0)
378 if ("${GNOME_INTEGRATION_FOUND}" STREQUAL "")
379 message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.")
380 else()
381 set (VERSION_GNOME_INTEGRATION "1.0.3")
382 set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration")
383 set (with_gnome_integration "yes")
384 set (gnome_integrationdatadir "${pluginsdatadir}/gnome-integration")
385 add_subdirectory ("gnome-integration")
386 endif()
387endif()
388
389############# GNOME-INTEGRATION-OLD #################
390set (with_gnome_integration_old "no")
391if ("${enable-old-gnome-integration}" STREQUAL "yes")
392 pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0)
393 if ("${OLD_GNOME_INTEGRATION_FOUND}" STREQUAL "")
394 message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.")
395 else()
396 set (VERSION_GNOME_INTEGRATION_OLD "1.0.4")
397 set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old")
398 set (with_gnome_integration_old "yes")
399 set (gnome_integration_olddatadir "${pluginsdatadir}/gnome-integration-old")
400 add_subdirectory ("gnome-integration-old")
401 endif()
402endif()
403
404############# ICON EFFECT #################
405set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS})
406set (VERSION_ICON_EFFECTS "1.2.4")
407set (PACKAGE_ICON_EFFECTS "cd-icon-effect")
408set (icon_effectsdatadir "${pluginsdatadir}/icon-effect")
409configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf)
410add_subdirectory (icon-effect)
411
412############# INDICATOR-APPLET #################
413# Note: the names of dbusmenu-glib and dbusmenu-gtk have changed...
414pkg_check_modules (DBUSMENU_04 QUIET dbusmenu-glib-0.4)
415pkg_check_modules (DBUSMENU_GTK_04 QUIET dbusmenu-gtk-0.4)
416pkg_check_modules (INDICATOR_APPLET indicator libido-0.1)
417if ("${DBUSMENU_04_FOUND}" STREQUAL "1")
418 pkg_check_modules (DBUSMENU dbusmenu-glib-0.4)
419else()
420 pkg_check_modules (DBUSMENU dbusmenu-glib)
421endif()
422if ("${DBUSMENU_GTK_04_FOUND}" STREQUAL "1")
423 pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk-0.4)
424else()
425 pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk)
426endif()
427if ("${INDICATOR_APPLET_FOUND}" STREQUAL "1" AND "${DBUSMENU_FOUND}" STREQUAL "1" AND "${DBUSMENU_GTK_FOUND}" STREQUAL "1")
428 message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}")
429
430 STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}")
431 # message (STATUS "DBUSMENU_MAJOR : ${DBUSMENU_MAJOR}")
432
433 STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7
434 STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}")
435 # message (STATUS "DBUSMENU_MINOR : ${DBUSMENU_MINOR}")
436
437 STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}")
438 STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}")
439 # message (STATUS "DBUSMENU_NANO : ${DBUSMENU_NANO}")
440
441 execute_process(
442 COMMAND pkg-config --variable=iconsdir indicator
443 OUTPUT_VARIABLE INDICATORICONSDIR)
444 STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR ${INDICATORICONSDIR}) # la commande rajoute un retour chariot ...
445 add_subdirectory (Indicator-applet)
446 set (with_indicator "yes")
447endif()
448
449############# ILLUSION #################
450set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS})
451set (VERSION_ILLUSION "1.0.7")
452set (PACKAGE_ILLUSION "cd-illusion")
453set (illusiondatadir "${pluginsdatadir}/illusion")
454configure_file (${CMAKE_CURRENT_SOURCE_DIR}/illusion/data/illusion.conf.in ${CMAKE_CURRENT_BINARY_DIR}/illusion/data/illusion.conf)
455add_subdirectory (illusion)
456
457############# KDE-INTEGRATION #################
458set (with_kde_integration "no")
459if (NOT "${enable-kde-integration}" STREQUAL "no")
460 pkg_check_modules (KDE_INTEGRATION gio-2.0)
461 if ("${KDE_INTEGRATION_FOUND}" STREQUAL "")
462 message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.")
463 else()
464 set (VERSION_KDE_INTEGRATION "0.0.2")
465 set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
466 set (with_kde_integration "yes")
467 set (kde_integrationdatadir "${pluginsdatadir}/kde-integration")
468 add_subdirectory ("kde-integration")
469 endif()
470endif()
471
472############# KEYBOARD_INDICATOR #################
473set (with_keyboard_indicator "no")
474pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier)
475if ("${KEYBOARD_INDICATOR_PACKAGE_FOUND}" STREQUAL "")
476 message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.")
477else()
478 set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS})
479 set (VERSION_KEYBOARD_INDICATOR "1.1.3")
480 set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator")
481 set (with_keyboard_indicator "yes")
482 set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator")
483 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/keyboard-indicator/data/keyboard-indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/keyboard-indicator/data/keyboard-indicator.conf)
484 add_subdirectory ("keyboard-indicator")
485endif()
486
487############# LOGOUT #################
488set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS})
489set (VERSION_LOGOUT "1.2.10")
490set (PACKAGE_LOGOUT "cd-logout")
491set (logoutdatadir "${pluginsdatadir}/logout")
492configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf)
493add_subdirectory (logout)
494
495############# MAIL #################
496set (with_mail "no")
497# find the compilation flags
498execute_process(
499 COMMAND libetpan-config --cflags
500 OUTPUT_VARIABLE MAIL_PACKAGE_CFLAGS)
501if (NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "") # if we don't want to use it, we don't want to have an error
502 STRING (REGEX MATCHALL "-I[^ ]+ " TMP_VARIABLE "${MAIL_PACKAGE_CFLAGS}") # first extract the "-I" options
503 STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
504 STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
505 STRING (REGEX REPLACE "-I([^ ]+)" "\\1" MAIL_PACKAGE_INCLUDE_DIRS "${TMP_VARIABLE}") # then remove the "-I" string
506endif()
507# find the link flags
508execute_process(
509 COMMAND libetpan-config --libs
510 OUTPUT_VARIABLE MAIL_PACKAGE_LIBS)
511if (NOT "${MAIL_PACKAGE_LIBS}" STREQUAL "")
512 # find the link libraries
513 STRING (REGEX MATCHALL "-l[^ ]+ " TMP_VARIABLE "${MAIL_PACKAGE_LIBS}") # extract the "-l" options
514 STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
515 STRING (REGEX REPLACE " $" "" MAIL_PACKAGE_LIBRARIES "${TMP_VARIABLE}")
516 # find the link directories
517 STRING (REGEX MATCHALL "-L[^ ]+ " TMP_VARIABLE "${MAIL_PACKAGE_LIBS}") # extract the "-L" options
518 STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
519 STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
520 STRING (REGEX REPLACE "-L([^ ]+)" "\\1" MAIL_PACKAGE_LIBRARY_DIRS "${TMP_VARIABLE}") # then remove the "-L" string
521endif()
522if ("${MAIL_PACKAGE_LIBS}" STREQUAL "")
523 message (STATUS "warning : Could not find libetpan; Cairo-Dock won't be built with Mail applet.")
524else()
525 message (STATUS "libetpan found. Using the following options:")
526 message (STATUS " Include directories: ${MAIL_PACKAGE_INCLUDE_DIRS}")
527 message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}")
528 message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}")
529 set (GETTEXT_MAIL ${GETTEXT_PLUGINS})
530 set (VERSION_MAIL "1.0.8")
531 set (PACKAGE_MAIL "cd-mail")
532 set (maildatadir "${pluginsdatadir}/mail")
533 set (with_mail "yes")
534 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mail/data/mail.conf.in ${CMAKE_CURRENT_BINARY_DIR}/mail/data/mail.conf)
535 add_subdirectory ("mail")
536endif()
537
538############# MEMENU #################
539# We try to detect if the user is on Ubuntu to know which bus we have to use...
540execute_process(
541 COMMAND lsb_release -i
542 OUTPUT_VARIABLE DISTRO_ID) # -> "Distributor ID: Ubuntu"
543if (NOT "${DISTRO_ID}" STREQUAL "") # this tool isn't available on all distributions
544 STRING (REGEX REPLACE "\n" "" DISTRO_ID ${DISTRO_ID}) # retour chariot
545 STRING (REGEX REPLACE ".*: *\t*" "" DISTRO_ID ${DISTRO_ID})
546
547 execute_process(
548 COMMAND lsb_release -r
549 OUTPUT_VARIABLE DISTRO_RELEASE) # -> "Release: 10.10"
550 STRING (REGEX REPLACE "\n" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # retour chariot
551 STRING (REGEX REPLACE ".*: *\t*" "" DISTRO_RELEASE ${DISTRO_RELEASE})
552else()
553 # on Ubuntu deb builders, lsb_release isn't available but we can have a look to /etc/issue.net
554 get_filename_component(ISSUE_NET "/etc/issue.net" ABSOLUTE)
555 if (EXISTS ${ISSUE_NET}) # to not have an error with cat
556 execute_process(
557 COMMAND cat ${ISSUE_NET}
558 OUTPUT_VARIABLE DISTRO_RELEASE) # -> Ubuntu 10.10 || Ubuntu natty (development branch)
559 if (NOT "${DISTRO_RELEASE}" STREQUAL "")
560 STRING (REGEX REPLACE "\n" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # retour chariot
561 STRING (REGEX REPLACE " (.+)" "" DISTRO_ID ${DISTRO_RELEASE})
562 if ("${DISTRO_ID}" STREQUAL "Ubuntu")
563 STRING (REGEX REPLACE ".[(]development branch[)]" "" DISTRO_RELEASE ${DISTRO_RELEASE})
564 STRING (REGEX REPLACE ".LTS" "" DISTRO_RELEASE ${DISTRO_RELEASE}) # Ubuntu 10.04.1 LTS
565 STRING (REGEX REPLACE "(.+) " "" DISTRO_RELEASE ${DISTRO_RELEASE})
566 if ("${DISTRO_RELEASE}" STREQUAL "natty")
567 set (DISTRO_RELEASE "11.04")
568 elseif ("${DISTRO_RELEASE}" STREQUAL "oneiric")
569 set (DISTRO_RELEASE "11.10")
570 endif()
571 endif()
572 endif()
573 endif()
574endif()
575
576set (INDICATOR_OLD_NAMES 0)
577if (NOT "${DISTRO_ID}" STREQUAL "")
578 message (STATUS "DISTRO_ID: ${DISTRO_ID}, DISTRO_RELEASE: ${DISTRO_RELEASE}")
579endif()
580if ("${DISTRO_ID}" STREQUAL "Ubuntu")
581 STRING (REGEX REPLACE "\\..*" "" DISTRO_RELEASE_MAJOR ${DISTRO_RELEASE})
582 # message (STATUS "DISTRO_RELEASE_MAJOR: ${DISTRO_RELEASE_MAJOR}")
583 if (${DISTRO_RELEASE_MAJOR} LESS 11) # from 11.04, new names are used.
584 set (INDICATOR_OLD_NAMES 1)
585 message (STATUS "Indicators: use old Ayatana Dbus names")
586 endif()
587endif()
588
589set (with_me_menu "no")
590if ("${with_indicator}" STREQUAL "yes")
591 set (GETTEXT_MEMENU ${GETTEXT_PLUGINS})
592 set (VERSION_MEMENU "1.0.1")
593 set (PACKAGE_MEMENU "cd-MeMenu")
594 set (memenudatadir "${pluginsdatadir}/MeMenu")
595 set (with_me_menu "yes")
596 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/MeMenu/data/MeMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/MeMenu/data/MeMenu.conf)
597 add_subdirectory (MeMenu)
598endif()
599
600############# MESSAGING_MENU #################
601set (with_messaging_menu "no")
602if ("${with_indicator}" STREQUAL "yes")
603 set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS})
604 set (VERSION_MESSAGING_MENU "1.0.1")
605 set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu")
606 set (with_messaging_menu "yes")
607 set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu")
608 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Messaging-Menu/data/Messaging-Menu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Messaging-Menu/data/Messaging-Menu.conf)
609 add_subdirectory (Messaging-Menu)
610endif()
611
612############# MOTION BLUR #################
613set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS})
614set (VERSION_MOTION_BLUR "1.0.4")
615set (PACKAGE_MOTION_BLUR "cd-motion_blur")
616set (motion_blurdatadir "${pluginsdatadir}/motion-blur")
617configure_file (${CMAKE_CURRENT_SOURCE_DIR}/motion-blur/data/motion_blur.conf.in ${CMAKE_CURRENT_BINARY_DIR}/motion-blur/data/motion_blur.conf)
618add_subdirectory (motion-blur)
619
620############# MUSICPLAYER #################
621set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS})
622set (VERSION_MUSICPLAYER "1.0.7")
623set (PACKAGE_MUSICPLAYER "cd-musicPlayer")
624set (musicplayerdatadir "${pluginsdatadir}/musicPlayer")
625configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf)
626add_subdirectory (musicPlayer)
627
628############# NETSPEED #################
629set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS})
630set (VERSION_NETSPEED "1.2.5")
631set (PACKAGE_NETSPEED "cd-netspeed")
632set (netspeeddatadir "${pluginsdatadir}/netspeed")
633configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf)
634add_subdirectory (netspeed)
635
636############# NETWORK_MONITOR #################
637set (with_network_monitor "no")
638if ("${enable-network-monitor}" STREQUAL "yes")
639 set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS})
640 set (VERSION_NETWORK_MONITOR "0.2.3")
641 set (PACKAGE_NETWORK_MONITOR "cd-network-monitor")
642 set (with_network_monitor "yes")
643 set (network_monitordatadir "${pluginsdatadir}/Network-Monitor")
644 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Network-Monitor/data/Network-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Network-Monitor/data/Network-Monitor.conf)
645 add_subdirectory (Network-Monitor)
646endif()
647
648############# POWERMANAGER #################
649set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS})
650set (VERSION_POWERMANAGER "1.3.4")
651set (PACKAGE_POWERMANAGER "cd-powermanager")
652set (powermanagerdatadir "${pluginsdatadir}/powermanager")
653configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf)
654add_subdirectory (powermanager)
655
656############# QUICK BROWSER #################
657set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS})
658set (VERSION_QUICK_BROWSER "1.0.8")
659set (PACKAGE_QUICK_BROWSER "cd-quick-browser")
660set (quick_browserdatadir "${pluginsdatadir}/quick_browser")
661configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf)
662add_subdirectory (quick-browser)
663
664############# RECENT-EVENTS #################
665set (with_recent_events "no")
666pkg_check_modules (RECENT_EVENTS zeitgeist-1.0)
667if ("${RECENT_EVENTS_FOUND}" STREQUAL "")
668 message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.")
669else()
670 set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS})
671 set (VERSION_RECENT_EVENTS "0.0.2")
672 set (PACKAGE_RECENT_EVENTS "cd-Recent-Events")
673 set (with_recent_events "yes")
674 set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events")
675 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Recent-Events/data/Recent-Events.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Recent-Events/data/Recent-Events.conf)
676 add_subdirectory ("Recent-Events")
677endif()
678
679############# REMOTE_CONTROL #################
680set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS})
681set (VERSION_REMOTE_CONTROL "0.0.2")
682set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control")
683set (remote_controldatadir "${pluginsdatadir}/Remote-Control")
684configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Remote-Control/data/Remote-Control.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Remote-Control/data/Remote-Control.conf)
685add_subdirectory (Remote-Control)
686
687############# RSSREADER #################
688set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS})
689set (VERSION_RSS_READER "1.0.3")
690set (PACKAGE_RSS_READER "cd-rssreader")
691set (rss_readerdatadir "${pluginsdatadir}/RSSreader")
692configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf)
693add_subdirectory (RSSreader)
694
695############# SCOOBY_DO #################
696set (with_scooby_do "no")
697if ("${enable-scooby-do}" STREQUAL "yes")
698 set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS})
699 set (VERSION_SCOOBY_DO "0.1.1")
700 set (PACKAGE_SCOOBY_DO "cd-scooby-do")
701 set (with_scooby_do "yes")
702 set (scooby_dodatadir "${pluginsdatadir}/Scooby-Do")
703 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Scooby-Do/data/Scooby-Do.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Scooby-Do/data/Scooby-Do.conf)
704 add_subdirectory (Scooby-Do)
705endif()
706
707############# SHORTCUTS #################
708set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS})
709set (VERSION_SHORTCUTS "1.3.1")
710set (PACKAGE_SHORTCUTS "cd-shortcuts")
711set (shortcutsdatadir "${pluginsdatadir}/shortcuts")
712configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf)
713add_subdirectory (shortcuts)
714
715############# SHOW DESKTOP #################
716set (with_xrandr "yes")
717pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr)
718if ("${SHOW_DESKTOP_XRANDR_FOUND}" STREQUAL "")
719 message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.")
720 set (with_xrandr "no")
721endif()
722set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS})
723set (VERSION_SHOW_DESKTOP "1.2.4")
724set (PACKAGE_SHOW_DESKTOP "cd-showDesktop")
725set (show_desktopdatadir "${pluginsdatadir}/showDesktop")
726configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf)
727add_subdirectory (showDesktop)
728
729############# SHOW MOUSE #################
730set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS})
731set (VERSION_SHOW_MOUSE "1.0.4")
732set (PACKAGE_SHOW_MOUSE "cd-show_mouse")
733set (show_mousedatadir "${pluginsdatadir}/show_mouse")
734configure_file (${CMAKE_CURRENT_SOURCE_DIR}/show-mouse/data/show_mouse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/show-mouse/data/show_mouse.conf)
735add_subdirectory (show-mouse)
736
737############# SLIDER #################
738set (with_exif "yes")
739pkg_check_modules (EXIF libexif)
740if ("${EXIF_FOUND}" STREQUAL "")
741 message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.")
742 set (with_exif "no")
743endif()
744set (GETTEXT_SLIDER ${GETTEXT_PLUGINS})
745set (VERSION_SLIDER "2.0.8")
746set (PACKAGE_SLIDER "cd-slider")
747set (sliderdatadir "${pluginsdatadir}/slider")
748configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf)
749add_subdirectory (slider)
750
751############# STACK #################
752set (GETTEXT_STACK ${GETTEXT_PLUGINS})
753set (VERSION_STACK "0.3.1")
754set (PACKAGE_STACK "cd-stack")
755set (stackdatadir "${pluginsdatadir}/stack")
756configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf)
757add_subdirectory (stack)
758
759############# STATUS NOTIFIER #################
760if ("${DBUSMENU_GTK_FOUND}" STREQUAL "")
761 message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.")
762else()
763 set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS})
764 set (VERSION_STATUS_NOTIFIER "0.1.3")
765 set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier")
766 set (with_status_notifier "yes")
767 set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier")
768 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Status-Notifier/data/Status-Notifier.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Status-Notifier/data/Status-Notifier.conf)
769 add_subdirectory (Status-Notifier)
770endif()
771
772############# SWITCHER #################
773set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS})
774set (VERSION_SWITCHER "2.1.6")
775set (PACKAGE_SWITCHER "cd-switcher")
776set (switcherdatadir "${pluginsdatadir}/switcher")
777configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf)
778add_subdirectory (switcher)
779
780############# SYSTEM MONITOR #################
781set (with_sensors "yes")
782find_package (Sensors)
783if (NOT "${SENSORS_FOUND}" STREQUAL "TRUE")
784 message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.")
785 set (with_sensors "no")
786endif()
787set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS})
788set (VERSION_SYSTEM_MONITOR "1.0.6")
789set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor")
790set (system_monitordatadir "${pluginsdatadir}/System-monitor")
791configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf)
792add_subdirectory (System-Monitor)
793
794############# SYSTRAY #################
795set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS})
796set (VERSION_SYSTRAY "0.2.2")
797set (PACKAGE_SYSTRAY "cd-systray")
798set (systraydatadir "${pluginsdatadir}/systray")
799configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf)
800add_subdirectory (systray)
801
802############# TERMINAL #################
803pkg_check_modules (TERMINAL_PACKAGE vte)
804if ("${TERMINAL_PACKAGE_FOUND}" STREQUAL "")
805 message (STATUS "Could not find libvte; Cairo-Dock won't be built with terminal applet.")
806 set (with_terminal "no")
807else()
808 set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS})
809 set (VERSION_TERMINAL "1.0.10")
810 set (PACKAGE_TERMINAL "cd-terminal")
811 set (with_terminal "yes")
812 set (terminaldatadir "${pluginsdatadir}/terminal")
813 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/terminal/data/terminal.conf.in ${CMAKE_CURRENT_BINARY_DIR}/terminal/data/terminal.conf)
814 add_subdirectory (terminal)
815endif()
816
817############# TOMBOY #################
818set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS})
819set (VERSION_TOMBOY "1.3.1")
820set (PACKAGE_TOMBOY "cd-tomboy")
821set (tomboydatadir "${pluginsdatadir}/tomboy")
822configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf)
823add_subdirectory (tomboy)
824
825############# TOONS #################
826set (GETTEXT_TOONS ${GETTEXT_PLUGINS})
827set (VERSION_TOONS "1.0.8")
828set (PACKAGE_TOONS "cd-Toons")
829set (toonsdatadir "${pluginsdatadir}/Toons")
830set (toonsuserdirname "Toons")
831configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Toons/data/Toons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Toons/data/Toons.conf)
832add_subdirectory (Toons)
833
834############# WEATHER #################
835set (GETTEXT_WEATHER ${GETTEXT_PLUGINS})
836set (VERSION_WEATHER "1.2.10")
837set (PACKAGE_WEATHER "cd-weather")
838set (weatherdatadir "${pluginsdatadir}/weather")
839set (weatheruserdirname "weather")
840configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weather/data/weather.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weather/data/weather.conf)
841add_subdirectory (weather)
842
843############# WEBLETS #################
844set (with_weblets "no")
845if (NOT "${enable-weblets}" STREQUAL "no")
846 pkg_check_modules (WEBKIT webkit-1.0)
847 if ("${WEBKIT_FOUND}" STREQUAL "")
848 message (STATUS "Could not find webkit-1.0; Cairo-Dock won't be built with Weblets applet.")
849 else()
850 set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS})
851 set (VERSION_WEBLETS "0.0.10")
852 set (PACKAGE_WEBLETS "cd-weblets")
853 set (webletsdatadir "${pluginsdatadir}/weblets")
854 set (with_weblets "yes")
855 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weblets/data/weblets.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weblets/data/weblets.conf)
856 add_subdirectory ("weblets")
857 endif()
858endif()
859
860############# WIFI #################
861set (GETTEXT_WIFI ${GETTEXT_PLUGINS})
862set (VERSION_WIFI "1.2.6")
863set (PACKAGE_WIFI "cd-wifi")
864set (wifidatadir "${pluginsdatadir}/wifi")
865configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf)
866add_subdirectory (wifi)
867
868############# XFCE-INTEGRATION #################
869set (with_xfce_integration "no")
870if (NOT "${enable-xfce-integration}" STREQUAL "no")
871 pkg_check_modules (XFCE_INTEGRATION_THUNAR thunar-vfs-1)
872 pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0)
873 if ("${XFCE_INTEGRATION_THUNAR_FOUND}" STREQUAL "" AND "${XFCE_INTEGRATION_GVFS_FOUND}" STREQUAL "")
874 message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.")
875 else()
876 set (VERSION_XFCE_INTEGRATION "1.0.3")
877 set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration")
878 set (with_xfce_integration "yes")
879 set (xfce_integrationdatadir "${pluginsdatadir}/xfce-integration")
880 add_subdirectory ("xfce-integration")
881 endif()
882endif()
883
884############# XGAMMA #################
885pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm)
886if ("${XGAMMA_PACKAGE_FOUND}" STREQUAL "")
887 message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.")
888 set (with_xgamma "no")
889else()
890 set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS})
891 set (VERSION_XGAMMA "1.2.0")
892 set (PACKAGE_XGAMMA "cd-Xgamma")
893 set (with_xgamma "yes")
894 set (xgammadatadir "${pluginsdatadir}/Xgamma")
895 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Xgamma/data/Xgamma.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Xgamma/data/Xgamma.conf)
896 add_subdirectory ("Xgamma")
897endif()
898
899message ("")
900message (STATUS "===============")
901message (STATUS "Language build:")
902message (STATUS "===============")
903message ("")
904add_subdirectory (po)
905
906message ("")
907message (STATUS "===============")
908message (STATUS "Plug-ins build:")
909message (STATUS "===============")
910message ("")
911message (STATUS "Stable:")
912message (STATUS " - with Alsa-Mixer applet: ${with_alsa}")
913message (STATUS " - with iCal support: ${with_ical}")
914message (STATUS " - with GMenu applet: ${with_gmenu}")
915message (STATUS " - with Gnome support: ${with_gnome_integration}")
916message (STATUS " - with KDE support: ${with_kde_integration}")
917message (STATUS " - with XFCE support: ${with_xfce_integration}")
918message (STATUS " - with Keyboard-indicator applet: ${with_keyboard_indicator}")
919message (STATUS " - with Mail applet: ${with_mail}")
920message (STATUS " - with Me-Menu applet: ${with_me_menu}")
921message (STATUS " - with Messaging-Menu: ${with_messaging_menu}")
922message (STATUS " - with Screen Resolution support: ${with_xrandr}")
923message (STATUS " - with Status-Notifier applet: ${with_status_notifier}")
924message (STATUS " - with Sensors support: ${with_sensors}")
925message (STATUS " - with Terminal applet: ${with_terminal}")
926message (STATUS " - with Weblets applet: ${with_weblets}")
927message (STATUS " - with Xgamma applet: ${with_xgamma}")
928message (STATUS " - with Recent-Events applet: ${with_recent_events}")
929message (STATUS " - with Python interface: ${with_python}")
930message (STATUS " - with Ruby interface: ${with_ruby}")
931message (STATUS " - with Mono interface: ${with_mono}")
932message (STATUS " - with Vala interface: ${with_vala}")
933message (STATUS " - with Vala Translator (valac) : ${with_valac}")
934message (STATUS "Unstable:")
935message (STATUS " - with Disks applet: ${with_disks}")
936message (STATUS " - with Doncky applet: ${with_doncky}")
937message (STATUS " - with Network-Monitor applet: ${with_network_monitor}")
938message (STATUS " - with Scooby-Do applet: ${with_scooby_do}")
939message (STATUS "Unsupported:")
940message (STATUS " - with old Gnome support: ${with_gnome_integration_old}")
941message ("")
9420
=== removed directory '.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/dnd2share'
=== removed directory '.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/dnd2share/src'
=== removed file '.pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/dnd2share/src/applet-backend-ubuntuone.c'
--- .pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/dnd2share/src/applet-backend-ubuntuone.c 2011-06-06 10:13:07 +0000
+++ .pc/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch/dnd2share/src/applet-backend-ubuntuone.c 1970-01-01 00:00:00 +0000
@@ -1,95 +0,0 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
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.
11*
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/>.
18*/
19
20#define _BSD_SOURCE
21#include <stdlib.h>
22#include <math.h>
23#include <unistd.h>
24#include <glib/gstdio.h>
25#include <string.h>
26
27#include "applet-struct.h"
28#include "applet-dnd2share.h"
29#include "applet-backend-ubuntuone.h"
30
31#define NB_URLS 1
32static const gchar *s_UrlLabels[NB_URLS] = {"DirectLink"};
33
34
35static void upload (const gchar *cFilePath, gchar *cDropboxDir, gboolean bAnonymous, gint iLimitRate, gchar **cResultUrls)
36{
37 // On lance la commande d'upload.
38 gchar *cFileName = g_path_get_basename (cFilePath);
39 gchar *cLocalFilePath;
40 if (cDropboxDir)
41 cLocalFilePath = g_strdup_printf ("%s/%s", cDropboxDir, cFileName);
42 else
43 cLocalFilePath = g_strdup_printf ("/home/%s/Ubuntu One/%s", g_getenv ("USER"), cFileName);
44 g_free (cFileName);
45
46 gchar *cCommand = g_strdup_printf ("cp \"%s\" \"%s\"", cFilePath, cLocalFilePath);
47 cd_debug ("commande u1 : %s", cCommand);
48 int r = system (cCommand);
49 g_free (cCommand);
50 if (r != 0)
51 {
52 cd_warning ("couldn't copy the file to %s", cLocalFilePath);
53 g_free (cLocalFilePath);
54 return;
55 }
56
57 // On recupere l'URL (dispo tout de suite, sinon il faudra boucler en testant 'dropbox status' jusqu'a avoir 'Idle').
58 cCommand= g_strdup_printf ("u1sdtool --publish-file \"%s\"", cLocalFilePath);
59 cd_debug ("commande u2 : %s", cCommand);
60 gchar *cResult = cairo_dock_launch_command_sync (cCommand);
61 g_free (cCommand);
62 g_free (cLocalFilePath);
63 if (cResult == NULL || *cResult == '\0')
64 {
65 cd_warning ("is u1sdtool installed?");
66 return ;
67 }
68
69 if (cResult[strlen(cResult)-1] == '\r')
70 cResult[strlen(cResult)-1] = '\0';
71 if (cResult[strlen(cResult)-1] == '\n')
72 cResult[strlen(cResult)-1] = '\0';
73
74 // Enfin on remplit la memoire partagee avec nos URLs.
75 gchar *str = strstr (cResult, "http"); // File is published at http://ubuntuone.com/x/y
76 if (! str)
77 {
78 cd_warning ("couldn't publish this file: %s", cResult);
79 g_free (cResult);
80 return ;
81 }
82 cResultUrls[0] = g_strdup (str);
83 g_free (cResult);
84}
85
86
87void cd_dnd2share_register_ubuntuone_backend (void)
88{
89 cd_dnd2share_register_new_backend (CD_TYPE_FILE,
90 "UbuntuOne",
91 NB_URLS,
92 s_UrlLabels,
93 0,
94 upload);
95}
960
=== removed directory '.pc/02-weather-fix_upstream-version-2.3.0~2.2.patch'
=== removed directory '.pc/02-weather-fix_upstream-version-2.3.0~2.2.patch/weather'
=== removed directory '.pc/02-weather-fix_upstream-version-2.3.0~2.2.patch/weather/src'
=== removed file '.pc/02-weather-fix_upstream-version-2.3.0~2.2.patch/weather/src/applet-read-data.c'
--- .pc/02-weather-fix_upstream-version-2.3.0~2.2.patch/weather/src/applet-read-data.c 2011-06-06 10:13:07 +0000
+++ .pc/02-weather-fix_upstream-version-2.3.0~2.2.patch/weather/src/applet-read-data.c 1970-01-01 00:00:00 +0000
@@ -1,462 +0,0 @@
1/**
2* This file is a part of the Cairo-Dock project
3*
4* Copyright : (C) see the 'copyright' file.
5* E-mail : see the 'copyright' file.
6*
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.
11*
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/>.
18*/
19
20#define _BSD_SOURCE
21#include <string.h>
22#include <stdio.h>
23#include <unistd.h>
24
25#include <libxml/tree.h>
26#include <libxml/parser.h>
27#include <glib/gstdio.h>
28
29#include "applet-struct.h"
30#include "applet-load-icons.h"
31#include "applet-read-data.h"
32
33#define CD_WEATHER_BASE_URL "http://xml.weather.com"
34
35
36static xmlDocPtr _cd_weather_open_xml_buffer (const gchar *cData, xmlNodePtr *root_node, const gchar *cRootNodeName, GError **erreur)
37{
38 if (cData == NULL || *cData == '\0')
39 {
40 g_set_error (erreur, 1, 1, "empty data (no connection ?)");
41 return NULL;
42 }
43 int length = strlen (cData);
44
45 gchar *cRootNode = g_strdup_printf ("<%s ", cRootNodeName);
46 if (g_strstr_len (cData, length, cRootNode) == NULL) // on intercepte le cas ou une connexion a un hotspot nous renvoie une page meme quand la connexion a weather.com n'a pas pu se faire, car ca fait planter libxml.
47 {
48 g_set_error (erreur, 1, 1, "uncorrect data (no connection ?)");
49 g_free (cRootNode);
50 return NULL;
51 }
52 g_free (cRootNode);
53 xmlInitParser ();
54
55 xmlDocPtr doc = xmlParseMemory (cData, length);
56 if (doc == NULL)
57 {
58 g_set_error (erreur, 1, 1, "uncorrect data (no connection ?)");
59 return NULL;
60 }
61
62 xmlNodePtr noeud = xmlDocGetRootElement (doc);
63 if (noeud == NULL || xmlStrcmp (noeud->name, (const xmlChar *) cRootNodeName) != 0)
64 {
65 g_set_error (erreur, 1, 2, "xml data is not well formed (weather.com may have changed its data format)");
66 return doc;
67 }
68 *root_node = noeud;
69 return doc;
70}
71static xmlDocPtr _cd_weather_open_xml_file (const gchar *cDataFilePath, xmlNodePtr *root_node, const gchar *cRootNodeName, GError **erreur)
72{
73 gsize length = 0;
74 gchar *cContent = NULL;
75 g_file_get_contents (cDataFilePath,
76 &cContent,
77 &length,
78 NULL);
79 xmlDocPtr doc = _cd_weather_open_xml_buffer (cContent, root_node, cRootNodeName, erreur);
80 g_free (cContent);
81 return doc;
82}
83static void _cd_weather_close_xml_file (xmlDocPtr doc)
84{
85 if (doc != NULL)
86 xmlFreeDoc (doc); // pas de xmlCleanupParser, ca fout le boxon.
87}
88
89
90GList *cd_weather_parse_location_data (const gchar *cData, GError **erreur)
91{
92 GError *tmp_erreur = NULL;
93 xmlNodePtr noeud = NULL;
94 xmlDocPtr doc = _cd_weather_open_xml_buffer (cData, &noeud, "search", &tmp_erreur);
95 if (tmp_erreur != NULL)
96 {
97 g_propagate_error (erreur, tmp_erreur);
98 _cd_weather_close_xml_file (doc);
99 return NULL;
100 }
101
102 GList *cLocationsList = NULL;
103 xmlNodePtr param;
104 for (param = noeud->xmlChildrenNode; param != NULL; param = param->next)
105 {
106 if (xmlStrcmp (param->name, (const xmlChar *) "loc") == 0)
107 {
108 cLocationsList = g_list_prepend (cLocationsList, xmlNodeGetContent (param));
109 cLocationsList = g_list_prepend (cLocationsList, xmlGetProp (param, (xmlChar *) "id"));
110 }
111 }
112 _cd_weather_close_xml_file (doc);
113 return cLocationsList;
114}
115
116
117static void _cd_weather_parse_data (CDSharedMemory *pSharedMemory, const gchar *cData, gboolean bParseHeader, GError **erreur)
118{
119 GError *tmp_erreur = NULL;
120 xmlNodePtr noeud = NULL;
121 xmlDocPtr doc = _cd_weather_open_xml_buffer (cData, &noeud, "weather", &tmp_erreur);
122 if (tmp_erreur != NULL)
123 {
124 g_propagate_error (erreur, tmp_erreur);
125 _cd_weather_close_xml_file (doc);
126 return ;
127 }
128
129 xmlNodePtr param, fils, petitfils, arrpetitfils, arrarrpetitfils;
130 gchar *nom, *visible, *name, *defaultsource = NULL, *source, *where;
131 xmlChar *contenu;
132 int i, j;
133 gchar *index_str, *cDayName, *cDate, *str;
134 for (param = noeud->xmlChildrenNode; param != NULL; param = param->next)
135 {
136 if (bParseHeader && xmlStrcmp (param->name, (const xmlChar *) "head") == 0)
137 {
138 for (fils = param->children; fils != NULL; fils = fils->next)
139 {
140 if (xmlStrcmp (fils->name, (const xmlChar *) "ut") == 0)
141 {
142 gchar *degree = xmlNodeGetContent (fils);
143 if (degree == NULL || strncmp (degree, "°", strlen ("°")) != 0) // prepend ° if not present.
144 {
145 pSharedMemory->wdata.units.cTemp = g_strconcat ("°", degree, NULL);
146 g_free (degree);
147 }
148 else
149 pSharedMemory->wdata.units.cTemp = degree;
150 }
151 else if (xmlStrcmp (fils->name, (const xmlChar *) "ud") == 0)
152 pSharedMemory->wdata.units.cDistance = xmlNodeGetContent (fils);
153 else if (xmlStrcmp (fils->name, (const xmlChar *) "us") == 0)
154 pSharedMemory->wdata.units.cSpeed = xmlNodeGetContent (fils);
155 else if (xmlStrcmp (fils->name, (const xmlChar *) "up") == 0)
156 pSharedMemory->wdata.units.cPressure = xmlNodeGetContent (fils);
157 //else if (xmlStrcmp (fils->name, (const xmlChar *) "ur") == 0) // ?
158 // pSharedMemory->wdata.units.cR = xmlNodeGetContent (fils);
159 }
160 }
161 else if (bParseHeader && xmlStrcmp (param->name, (const xmlChar *) "loc") == 0)
162 {
163 for (fils = param->children; fils != NULL; fils = fils->next)
164 {
165 if (xmlStrcmp (fils->name, (const xmlChar *) "dnam") == 0)
166 pSharedMemory->wdata.cLocation = xmlNodeGetContent (fils);
167 /**else if (xmlStrcmp (fils->name, (const xmlChar *) "lat") == 0)
168 pSharedMemory->cLat = xmlNodeGetContent (fils);
169 else if (xmlStrcmp (fils->name, (const xmlChar *) "lon") == 0)
170 pSharedMemory->cLon = xmlNodeGetContent (fils);*/
171 else if (xmlStrcmp (fils->name, (const xmlChar *) "sunr") == 0)
172 pSharedMemory->wdata.currentConditions.cSunRise = xmlNodeGetContent (fils);
173 else if (xmlStrcmp (fils->name, (const xmlChar *) "suns") == 0)
174 pSharedMemory->wdata.currentConditions.cSunSet = xmlNodeGetContent (fils);
175 }
176 }
177 else if (xmlStrcmp (param->name, (const xmlChar *) "cc") == 0)
178 {
179 for (fils = param->children; fils != NULL; fils = fils->next)
180 {
181 if (xmlStrcmp (fils->name, (const xmlChar *) "lsup") == 0)
182 pSharedMemory->wdata.currentConditions.cDataAcquisitionDate = xmlNodeGetContent (fils);
183 else if (xmlStrcmp (fils->name, (const xmlChar *) "obst") == 0)
184 pSharedMemory->wdata.currentConditions.cObservatory = xmlNodeGetContent (fils);
185 else if (xmlStrcmp (fils->name, (const xmlChar *) "tmp") == 0)
186 pSharedMemory->wdata.currentConditions.cTemp = xmlNodeGetContent (fils);
187 else if (xmlStrcmp (fils->name, (const xmlChar *) "flik") == 0)
188 pSharedMemory->wdata.currentConditions.cFeltTemp = xmlNodeGetContent (fils);
189 else if (xmlStrcmp (fils->name, (const xmlChar *) "t") == 0)
190 pSharedMemory->wdata.currentConditions.cWeatherDescription = xmlNodeGetContent (fils);
191 else if (xmlStrcmp (fils->name, (const xmlChar *) "icon") == 0)
192 pSharedMemory->wdata.currentConditions.cIconNumber = xmlNodeGetContent (fils);
193 else if (xmlStrcmp (fils->name, (const xmlChar *) "wind") == 0)
194 {
195 for (petitfils = fils->children; petitfils != NULL; petitfils = petitfils->next)
196 {
197 if (xmlStrcmp (petitfils->name, (const xmlChar *) "s") == 0)
198 pSharedMemory->wdata.currentConditions.cWindSpeed = xmlNodeGetContent (petitfils);
199 else if (xmlStrcmp (petitfils->name, (const xmlChar *) "t") == 0)
200 pSharedMemory->wdata.currentConditions.cWindDirection = xmlNodeGetContent (petitfils);
201 }
202 }
203 else if (xmlStrcmp (fils->name, (const xmlChar *) "bar") == 0)
204 {
205 for (petitfils = fils->children; petitfils != NULL; petitfils = petitfils->next)
206 {
207 if (xmlStrcmp (petitfils->name, (const xmlChar *) "r") == 0)
208 pSharedMemory->wdata.currentConditions.cPressure = xmlNodeGetContent (petitfils);
209 }
210 }
211 else if (xmlStrcmp (fils->name, (const xmlChar *) "hmid") == 0)
212 pSharedMemory->wdata.currentConditions.cHumidity = xmlNodeGetContent (fils);
213 else if (xmlStrcmp (fils->name, (const xmlChar *) "moon") == 0)
214 {
215 for (petitfils = fils->children; petitfils != NULL; petitfils = petitfils->next)
216 {
217 if (xmlStrcmp (petitfils->name, (const xmlChar *) "icon") == 0)
218 pSharedMemory->wdata.currentConditions.cMoonIconNumber = xmlNodeGetContent (petitfils);
219 }
220 }
221 }
222 }
223 else if (xmlStrcmp (param->name, (const xmlChar *) "dayf") == 0)
224 {
225 for (fils = param->children; fils != NULL; fils = fils->next)
226 {
227 if (xmlStrcmp (fils->name, (const xmlChar *) "lsup") == 0)
228 pSharedMemory->wdata.currentConditions.cDataAcquisitionDate = xmlNodeGetContent (fils);
229 else if (xmlStrcmp (fils->name, (const xmlChar *) "day") == 0)
230 {
231 index_str = (gchar *) xmlGetProp (fils, (xmlChar *) "d");
232 if (index_str == NULL)
233 continue;
234 i = atoi (index_str);
235 g_free (index_str);
236 cDayName = (gchar *) xmlGetProp (fils, (xmlChar *) "t");
237 pSharedMemory->wdata.days[i].cName = g_strdup (D_(cDayName));
238 g_free (cDayName);
239 cDate = (gchar *) xmlGetProp (fils, (xmlChar *) "dt");
240 str = strchr (cDate, ' ');
241 if (str != NULL)
242 {
243 *str = '\0';
244 pSharedMemory->wdata.days[i].cDate = g_strconcat (D_(cDate), " ", str+1, NULL);
245 g_free (cDate);
246 }
247 else
248 pSharedMemory->wdata.days[i].cDate = cDate;
249 for (petitfils = fils->children; petitfils != NULL; petitfils = petitfils->next)
250 {
251 if (xmlStrcmp (petitfils->name, (const xmlChar *) "hi") == 0)
252 pSharedMemory->wdata.days[i].cTempMax = xmlNodeGetContent (petitfils);
253 else if (xmlStrcmp (petitfils->name, (const xmlChar *) "low") == 0)
254 pSharedMemory->wdata.days[i].cTempMin = xmlNodeGetContent (petitfils);
255 else if (xmlStrcmp (petitfils->name, (const xmlChar *) "sunr") == 0)
256 pSharedMemory->wdata.days[i].cSunRise = xmlNodeGetContent (petitfils);
257 else if (xmlStrcmp (petitfils->name, (const xmlChar *) "suns") == 0)
258 pSharedMemory->wdata.days[i].cSunSet = xmlNodeGetContent (petitfils);
259 else if (xmlStrcmp (petitfils->name, (const xmlChar *) "part") == 0)
260 {
261 index_str = (gchar *) xmlGetProp (petitfils, (xmlChar *) "p");
262 if (index_str == NULL)
263 continue;
264 j = (*index_str == 'd' ? 0 : 1); // jour : 0 / nuit : 1.
265 for (arrpetitfils = petitfils->children; arrpetitfils != NULL; arrpetitfils = arrpetitfils->next)
266 {
267 if (xmlStrcmp (arrpetitfils->name, (const xmlChar *) "icon") == 0)
268 pSharedMemory->wdata.days[i].part[j].cIconNumber = xmlNodeGetContent (arrpetitfils);
269 else if (xmlStrcmp (arrpetitfils->name, (const xmlChar *) "t") == 0)
270 pSharedMemory->wdata.days[i].part[j].cWeatherDescription = xmlNodeGetContent (arrpetitfils);
271 else if (xmlStrcmp (arrpetitfils->name, (const xmlChar *) "wind") == 0)
272 {
273 for (arrarrpetitfils = arrpetitfils->children; arrarrpetitfils != NULL; arrarrpetitfils = arrarrpetitfils->next)
274 {
275 if (xmlStrcmp (arrarrpetitfils->name, (const xmlChar *) "s") == 0)
276 pSharedMemory->wdata.days[i].part[j].cWindSpeed = xmlNodeGetContent (arrarrpetitfils);
277 else if (xmlStrcmp (arrarrpetitfils->name, (const xmlChar *) "t") == 0)
278 pSharedMemory->wdata.days[i].part[j].cWindDirection = xmlNodeGetContent (arrarrpetitfils);
279 }
280 }
281 else if (xmlStrcmp (arrpetitfils->name, (const xmlChar *) "hmid") == 0)
282 pSharedMemory->wdata.days[i].part[j].cHumidity = xmlNodeGetContent (arrpetitfils);
283 else if (xmlStrcmp (arrpetitfils->name, (const xmlChar *) "ppcp") == 0)
284 pSharedMemory->wdata.days[i].part[j].cPrecipitationProba = xmlNodeGetContent (arrpetitfils);
285 }
286 }
287 }
288 } // fin du jour n.
289 }
290 }
291 }
292 _cd_weather_close_xml_file (doc);
293}
294
295
296static void cd_weather_get_distant_data (CDSharedMemory *pSharedMemory)
297{
298 //\____________________ On recupere les conditions courantes sur le serveur.
299 pSharedMemory->bErrorInThread = FALSE;
300 GError *erreur = NULL;
301 gchar *cCommand;
302 gchar *cCCData = NULL;
303 if (pSharedMemory->bCurrentConditions)
304 {
305 gchar *cURL = g_strdup_printf (CD_WEATHER_BASE_URL"/weather/local/%s?cc=*%s", pSharedMemory->cLocationCode, (pSharedMemory->bISUnits ? "&unit=m" : ""));
306 cCCData = cairo_dock_get_url_data (cURL, &erreur);
307 g_free (cURL);
308 if (erreur != NULL)
309 {
310 cd_warning ("while downloading current conditions data:\n%s -> %s", cURL, erreur->message);
311 g_error_free (erreur);
312 erreur = NULL;
313 }
314 if (cCCData == NULL)
315 {
316 pSharedMemory->bErrorInThread = TRUE;
317 return; // a la 1ere erreur on quitte.
318 }
319 }
320
321 //\____________________ On recupere les previsions a N jours sur le serveur.
322 gchar *cForecastData = NULL;
323 if (pSharedMemory->iNbDays > 0)
324 {
325 gchar *cURL = g_strdup_printf (CD_WEATHER_BASE_URL"/weather/local/%s?dayf=%d%s", pSharedMemory->cLocationCode, pSharedMemory->iNbDays, (pSharedMemory->bISUnits ? "&unit=m" : ""));
326 cForecastData = cairo_dock_get_url_data (cURL, &erreur);
327 g_free (cURL);
328 if (erreur != NULL)
329 {
330 cd_warning ("while downloading forecast data:\n%s -> %s", cURL, erreur->message);
331 g_error_free (erreur);
332 erreur = NULL;
333 pSharedMemory->bErrorInThread = TRUE;
334 }
335 if (cForecastData == NULL)
336 {
337 pSharedMemory->bErrorInThread = TRUE;
338 }
339 }
340
341 //\____________________ On extrait les donnees des conditions courantes.
342 if (cCCData != NULL)
343 {
344 _cd_weather_parse_data (pSharedMemory, cCCData, TRUE, &erreur);
345 if (erreur != NULL)
346 {
347 cd_warning ("weather : %s", erreur->message);
348 g_error_free (erreur);
349 erreur = NULL;
350 pSharedMemory->bErrorInThread = TRUE;
351 }
352 g_free (cCCData);
353 }
354
355 //\____________________ On extrait les donnees des previsions a N jours.
356 if (cForecastData != NULL)
357 {
358 _cd_weather_parse_data (pSharedMemory, cForecastData, FALSE, &erreur);
359 if (erreur != NULL)
360 {
361 cd_warning ("weather : %s", erreur->message);
362 g_error_free (erreur);
363 erreur = NULL;
364 pSharedMemory->bErrorInThread = TRUE;
365 }
366 g_free (cForecastData);
367 }
368}
369
370
371
372static void _reset_units (Unit *pUnits)
373{
374 xmlFree (pUnits->cTemp);
375 xmlFree (pUnits->cDistance);
376 xmlFree (pUnits->cSpeed);
377 xmlFree (pUnits->cPressure);
378}
379
380static void _reset_current_conditions (CurrentContitions *pCurrentContitions)
381{
382 xmlFree (pCurrentContitions->cSunRise);
383 xmlFree (pCurrentContitions->cSunSet);
384 xmlFree (pCurrentContitions->cDataAcquisitionDate);
385 xmlFree (pCurrentContitions->cObservatory);
386 xmlFree (pCurrentContitions->cTemp);
387 xmlFree (pCurrentContitions->cFeltTemp);
388 xmlFree (pCurrentContitions->cWeatherDescription);
389 xmlFree (pCurrentContitions->cIconNumber);
390 xmlFree (pCurrentContitions->cWindSpeed);
391 xmlFree (pCurrentContitions->cWindDirection);
392 xmlFree (pCurrentContitions->cPressure);
393 xmlFree (pCurrentContitions->cHumidity);
394 xmlFree (pCurrentContitions->cMoonIconNumber);
395}
396
397static void _reset_current_one_day (Day *pDay)
398{
399 xmlFree (pDay->cName);
400 xmlFree (pDay->cDate);
401 xmlFree (pDay->cTempMax);
402 xmlFree (pDay->cTempMin);
403 xmlFree (pDay->cSunRise);
404 xmlFree (pDay->cSunSet);
405 int j;
406 for (j = 0; j < 2; j ++)
407 {
408 xmlFree (pDay->part[j].cIconNumber);
409 xmlFree (pDay->part[j].cWeatherDescription);
410 xmlFree (pDay->part[j].cWindSpeed);
411 xmlFree (pDay->part[j].cWindDirection);
412 xmlFree (pDay->part[j].cHumidity);
413 xmlFree (pDay->part[j].cPrecipitationProba);
414 }
415}
416
417void cd_weather_reset_weather_data (CDWeatherData *pData)
418{
419 /**xmlFree (pData->cLon);
420 xmlFree (pData->cLat);*/
421 xmlFree (pData->cLocation);
422 _reset_units (&pData->units);
423 _reset_current_conditions (&pData->currentConditions);
424 int i;
425 for (i = 0; i < WEATHER_NB_DAYS_MAX; i ++)
426 {
427 _reset_current_one_day (&pData->days[i]);
428 }
429}
430
431void cd_weather_reset_data (CairoDockModuleInstance *myApplet)
432{
433 cd_weather_reset_weather_data (&myData.wdata);
434}
435
436static void _free_shared_memory (CDSharedMemory *pSharedMemory)
437{
438 cd_weather_reset_weather_data (&pSharedMemory->wdata);
439 g_free (pSharedMemory);
440}
441void cd_weather_launch_periodic_task (CairoDockModuleInstance *myApplet)
442{
443 if (myData.pTask != NULL)
444 {
445 cairo_dock_discard_task (myData.pTask);
446 myData.pTask = NULL;
447 }
448
449 CDSharedMemory *pSharedMemory = g_new0 (CDSharedMemory, 1);
450 pSharedMemory->cLocationCode = g_strdup (myConfig.cLocationCode);
451 pSharedMemory->bISUnits = myConfig.bISUnits;
452 pSharedMemory->bCurrentConditions = myConfig.bCurrentConditions;
453 pSharedMemory->iNbDays = myConfig.iNbDays;
454 pSharedMemory->pApplet = myApplet;
455
456 myData.pTask = cairo_dock_new_task_full (myConfig.iCheckInterval,
457 (CairoDockGetDataAsyncFunc) cd_weather_get_distant_data,
458 (CairoDockUpdateSyncFunc) cd_weather_update_from_data,
459 (GFreeFunc) _free_shared_memory,
460 pSharedMemory);
461 cairo_dock_launch_task (myData.pTask);
462}
4630
=== removed file '.pc/applied-patches'
--- .pc/applied-patches 2011-06-06 10:13:07 +0000
+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
101-ubuntuone-fix_upstream-version-2.3.0~2.1.patch
202-weather-fix_upstream-version-2.3.0~2.2.patch
30
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2011-06-06 10:13:07 +0000
+++ CMakeLists.txt 2011-06-20 15:06:22 +0000
@@ -10,7 +10,7 @@
10########### project ###############10########### project ###############
1111
12project ("cairo-dock-plugins")12project ("cairo-dock-plugins")
13set (VERSION "2.3.0~2")13set (VERSION "2.3.0~3")
1414
15add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall15add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall
16if (NOT ${CMAKE_BUILD_TYPE})16if (NOT ${CMAKE_BUILD_TYPE})
1717
=== modified file 'Status-Notifier/src/CMakeLists.txt'
--- Status-Notifier/src/CMakeLists.txt 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/CMakeLists.txt 2011-06-20 15:06:22 +0000
@@ -18,8 +18,8 @@
18add_definitions (-DMY_APPLET_PREVIEW_FILE="preview.jpg")18add_definitions (-DMY_APPLET_PREVIEW_FILE="preview.jpg")
19add_definitions (-DMY_APPLET_CONF_FILE="Status-Notifier.conf")19add_definitions (-DMY_APPLET_CONF_FILE="Status-Notifier.conf")
20add_definitions (-DMY_APPLET_USER_DATA_DIR="Status-Notifier")20add_definitions (-DMY_APPLET_USER_DATA_DIR="Status-Notifier")
21add_definitions (-DMY_APPLET_VERSION="${VERSION_STATUSNOTIFIER}")21add_definitions (-DMY_APPLET_VERSION="${VERSION_STATUS_NOTIFIER}")
22add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_STATUSNOTIFIER}")22add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_STATUS_NOTIFIER}")
23add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")23add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")
24add_definitions (-DMY_APPLET_ICON_FILE="icon.png")24add_definitions (-DMY_APPLET_ICON_FILE="icon.png")
25add_definitions (-DINDICATOR_OLD_NAMES=${INDICATOR_OLD_NAMES})25add_definitions (-DINDICATOR_OLD_NAMES=${INDICATOR_OLD_NAMES})
2626
=== modified file 'debian/changelog'
--- debian/changelog 2011-06-09 21:29:28 +0000
+++ debian/changelog 2011-06-20 15:06:22 +0000
@@ -1,3 +1,17 @@
1cairo-dock-plug-ins (2.3.0~3-0ubuntu1) UNRELEASED; urgency=low
2
3 * New upstream release. (LP: #799774)
4 * Upstream ChangeLog:
5 - Status Notifier: enable translations (fixed a typo)
6 - Weather: prevent a crash if there is an error (LP: #788437)
7 - dnd2share: avoid a crash of u1sdtool
8 * debian/patches:
9 - Removed all patches (now in upstream)
10 * debian/control:
11 - Updated version
12
13 -- Matthieu Baerts (matttbe) <matttbe@gmail.com> Mon, 20 Jun 2011 17:00:53 +0200
14
1cairo-dock-plug-ins (2.3.0~2-0ubuntu1) oneiric; urgency=low15cairo-dock-plug-ins (2.3.0~2-0ubuntu1) oneiric; urgency=low
216
3 * New upstream release. (LP: #786105)17 * New upstream release. (LP: #786105)
418
=== modified file 'debian/control'
--- debian/control 2011-06-06 10:13:07 +0000
+++ debian/control 2011-06-20 15:06:22 +0000
@@ -15,9 +15,9 @@
15 libxml2-dev,15 libxml2-dev,
16 libxtst-dev,16 libxtst-dev,
17 libglib2.0-dev (>= 2.20),17 libglib2.0-dev (>= 2.20),
18 cairo-dock-dev (>= 2.3.0~0rc1),18 cairo-dock-data (>= 2.3.0~3),
19 cairo-dock-core (>= 2.3.0~0rc1),19 cairo-dock-core (>= 2.3.0~3),
20 cairo-dock-data (>= 2.3.0~0rc1),20 cairo-dock-dev (>= 2.3.0~3),
21 libasound2-dev,21 libasound2-dev,
22 libvte-dev,22 libvte-dev,
23 x11proto-xf86vidmode-dev,23 x11proto-xf86vidmode-dev,
2424
=== modified file 'debian/patches/series'
--- debian/patches/series 2011-06-06 10:13:07 +0000
+++ debian/patches/series 2011-06-20 15:06:22 +0000
@@ -1,2 +0,0 @@
101-ubuntuone-fix_upstream-version-2.3.0~2.1.patch
202-weather-fix_upstream-version-2.3.0~2.2.patch
30
=== modified file 'weather/src/applet-load-icons.c'
--- weather/src/applet-load-icons.c 2011-04-20 20:46:51 +0000
+++ weather/src/applet-load-icons.c 2011-06-20 15:06:22 +0000
@@ -135,6 +135,7 @@
135 135
136 }136 }
137 cd_weather_reset_weather_data (&pSharedMemory->wdata); // discard the results, since they are probably empty or incomplete.137 cd_weather_reset_weather_data (&pSharedMemory->wdata); // discard the results, since they are probably empty or incomplete.
138 memset (&pSharedMemory->wdata, 0, sizeof (CDWeatherData));
138 139
139 CD_APPLET_LEAVE (TRUE); // don't recreate the icons, since data have not changed.140 CD_APPLET_LEAVE (TRUE); // don't recreate the icons, since data have not changed.
140 }141 }

Subscribers

People subscribed via source and target branches