Merge lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2 into lp:ubuntu/oneiric/cairo-dock-plug-ins
- Oneiric (11.10)
- 2.4.0-0beta2
- Merge into oneiric
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 21 | ||||||||
Proposed branch: | lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2 | ||||||||
Merge into: | lp:ubuntu/oneiric/cairo-dock-plug-ins | ||||||||
Diff against target: |
333793 lines (+140404/-109035) 302 files modified
Animated-icons/data/Animated-icons.conf.in (+1/-1) Animated-icons/src/applet-wobbly.c (+1/-1) CMakeLists.txt (+345/-88) Cairo-Penguin/data/Cairo-Penguin.conf.in (+5/-6) Clipper/data/Clipper.conf.in (+6/-7) Clipper/src/applet-clipboard.c (+3/-0) Composite-Manager/CMakeLists.txt (+2/-0) Composite-Manager/data/CMakeLists.txt (+10/-0) Composite-Manager/data/Composite-Manager.conf.in (+137/-0) Composite-Manager/src/CMakeLists.txt (+39/-0) Composite-Manager/src/applet-composite-manager.c (+535/-0) Composite-Manager/src/applet-composite-manager.h (+46/-0) Composite-Manager/src/applet-config.c (+63/-0) Composite-Manager/src/applet-config.h (+30/-0) Composite-Manager/src/applet-init.c (+73/-0) Composite-Manager/src/applet-init.h (+31/-0) Composite-Manager/src/applet-notifications.c (+170/-0) Composite-Manager/src/applet-notifications.h (+35/-0) Composite-Manager/src/applet-struct.h (+83/-0) Dbus/data/Dbus.conf.in (+1/-1) Dbus/demos/demo_vala/demo_vala.conf (+101/-0) Dbus/interfaces/python/CDApplet.py (+58/-36) Dbus/interfaces/python/CMakeLists.txt (+1/-1) Dbus/interfaces/python/CairoDock.py (+111/-0) Dbus/interfaces/python/setup.py (+1/-1) Dbus/interfaces/vala/CMakeLists.txt (+5/-1) Dbus/src/applet-dbus.c (+67/-30) Dbus/src/dbus-main-spec.h (+425/-182) Dbus/src/dbus_introspectable.xml (+44/-36) Dbus/src/interface-applet-methods.c (+15/-9) Dbus/src/interface-applet-signals.c (+1/-1) Dbus/src/interface-main-methods.c (+1221/-344) Dbus/src/interface-main-methods.h (+36/-26) Disks/data/Disks.conf.in (+14/-24) Disks/src/applet-config.c (+4/-23) Disks/src/applet-config.h (+0/-2) Disks/src/applet-disks.c (+170/-77) Disks/src/applet-disks.h (+3/-0) Disks/src/applet-init.c (+48/-11) Disks/src/applet-struct.h (+4/-0) Doncky/data/Doncky.conf.in (+5/-6) Folders/data/Folders.conf.in (+5/-6) Folders/src/applet-config.c (+2/-2) Folders/src/applet-init.c (+5/-2) Folders/src/applet-notifications.c (+55/-30) Folders/src/applet-struct.h (+1/-1) GMenu/data/CMakeLists.txt (+2/-1) GMenu/data/GMenu.conf.in (+11/-7) GMenu/data/system-log-out.svg (+57/-0) GMenu/data/system-shutdown.svg (+50/-0) GMenu/src/applet-config.c (+1/-0) GMenu/src/applet-init.c (+5/-1) GMenu/src/applet-menu-callbacks.c (+62/-29) GMenu/src/applet-menu.c (+12/-0) GMenu/src/applet-recent.c (+8/-1) GMenu/src/applet-struct.h (+10/-0) Impulse/CMakeLists.txt (+2/-0) Impulse/data/CMakeLists.txt (+11/-0) Impulse/data/Impulse.conf.in (+158/-0) Impulse/data/impulse-error.svg (+713/-0) Impulse/data/impulse-running.svg (+375/-0) Impulse/data/impulse-stopped.svg (+347/-0) Impulse/src/CMakeLists.txt (+43/-0) Impulse/src/Impulse.c (+305/-0) Impulse/src/Impulse.h (+36/-0) Impulse/src/applet-config.c (+58/-0) Impulse/src/applet-config.h (+30/-0) Impulse/src/applet-impulse.c (+328/-0) Impulse/src/applet-impulse.h (+33/-0) Impulse/src/applet-init.c (+138/-0) Impulse/src/applet-init.h (+31/-0) Impulse/src/applet-notifications.c (+58/-0) Impulse/src/applet-notifications.h (+40/-0) Impulse/src/applet-struct.h (+67/-0) MeMenu/data/MeMenu.conf.in (+4/-5) MeMenu/src/applet-init.c (+4/-1) Messaging-Menu/data/Messaging-Menu.conf.in (+5/-6) Messaging-Menu/src/applet-init.c (+4/-1) Messaging-Menu/src/applet-menu.c (+5/-0) Network-Monitor/data/Network-Monitor.conf.in (+4/-5) RSSreader/data/RSSreader.conf.in (+4/-5) RSSreader/src/applet-config.c (+2/-0) RSSreader/src/applet-init.c (+4/-1) Recent-Events/data/Recent-Events.conf.in (+6/-7) Recent-Events/src/applet-dialog.c (+29/-13) Recent-Events/src/applet-search.c (+2/-1) Remote-Control/data/Remote-Control.conf.in (+1/-1) Scooby-Do/data/Scooby-Do.conf.in (+1/-1) Status-Notifier/CMakeLists.txt (+4/-0) Status-Notifier/data/Status-Notifier.conf.in (+8/-6) Status-Notifier/src/CMakeLists.txt (+3/-0) Status-Notifier/src/applet-config.c (+1/-0) Status-Notifier/src/applet-draw.c (+26/-6) Status-Notifier/src/applet-host-ias.c (+523/-0) Status-Notifier/src/applet-host-ias.h (+33/-0) Status-Notifier/src/applet-host-kde.c (+325/-0) Status-Notifier/src/applet-host-kde.h (+30/-0) Status-Notifier/src/applet-host.c (+28/-690) Status-Notifier/src/applet-host.h (+7/-1) Status-Notifier/src/applet-init.c (+1/-1) Status-Notifier/src/applet-item.c (+10/-4) Status-Notifier/src/applet-notifications.c (+43/-23) Status-Notifier/src/applet-struct.h (+3/-0) Status-Notifier/watcher/CMakeLists.txt (+18/-0) Status-Notifier/watcher/org.kde.StatusNotifierWatcher.xml (+42/-0) Status-Notifier/watcher/status-notifier-watcher.py (+131/-0) System-Monitor/data/System-Monitor.conf.in (+5/-6) System-Monitor/src/applet-monitor.c (+6/-6) System-Monitor/src/applet-top.c (+1/-0) Toons/data/Toons.conf.in (+4/-5) Toons/src/applet-init.c (+5/-1) Xgamma/data/Xgamma.conf.in (+4/-5) Xgamma/src/applet-init.c (+1/-0) alsaMixer/data/AlsaMixer.conf.in (+4/-5) alsaMixer/src/applet-init.c (+1/-0) alsaMixer/src/applet-mixer.c (+2/-0) alsaMixer/src/applet-notifications.c (+10/-1) clock/data/clock.conf.in (+6/-5) clock/src/applet-init.c (+1/-0) clock/src/applet-notifications.c (+5/-2) compiz-icon/CMakeLists.txt (+0/-14) compiz-icon/data/0.svg (+0/-264) compiz-icon/data/1.svg (+0/-325) compiz-icon/data/2.svg (+0/-396) compiz-icon/data/3.svg (+0/-2146) compiz-icon/data/4.svg (+0/-1023) compiz-icon/data/CMakeLists.txt (+0/-19) compiz-icon/data/broken.svg (+0/-598) compiz-icon/data/compiz (+0/-21) compiz-icon/data/compiz-icon.conf.in (+0/-184) compiz-icon/data/compiz-kill (+0/-28) compiz-icon/data/default.svg (+0/-278) compiz-icon/data/other.svg (+0/-256) compiz-icon/src/CMakeLists.txt (+0/-89) compiz-icon/src/applet-compiz.c (+0/-169) compiz-icon/src/applet-compiz.h (+0/-42) compiz-icon/src/applet-config.c (+0/-89) compiz-icon/src/applet-config.h (+0/-30) compiz-icon/src/applet-init.c (+0/-103) compiz-icon/src/applet-init.h (+0/-31) compiz-icon/src/applet-load-icon.c (+0/-106) compiz-icon/src/applet-load-icon.h (+0/-32) compiz-icon/src/applet-notifications.c (+0/-204) compiz-icon/src/applet-notifications.h (+0/-35) compiz-icon/src/applet-struct.h (+0/-94) copyright (+7/-0) debian/cairo-dock-plug-ins.install (+1/-0) debian/changelog (+31/-0) debian/control (+10/-6) debian/copyright (+10/-3) debian/patches/01-ubuntuone-fix_upstream-version-2.3.0~2.1.patch (+0/-36) debian/patches/02-weather-fix_upstream-version-2.3.0~2.2.patch (+0/-41) desklet-rendering/data/desklet-rendering.conf.in (+1/-1) desklet-rendering/src/CMakeLists.txt (+1/-60) desklet-rendering/src/rendering-desklet-panel.c (+614/-0) desklet-rendering/src/rendering-desklet-panel.h (+46/-0) desklet-rendering/src/rendering-desklet-slide.c (+0/-3) desklet-rendering/src/rendering-init.c (+5/-3) dialog-rendering/data/dialog-rendering.conf.in (+1/-1) dialog-rendering/src/applet-decorator-tooltip.c (+3/-3) dialog-rendering/src/applet-init.c (+2/-2) dnd2share/data/dnd2share.conf.in (+6/-7) dnd2share/src/applet-backend-ubuntuone.c (+1/-1) dnd2share/src/applet-backend-uppix.c (+1/-1) dnd2share/src/applet-notifications.c (+19/-1) dock-rendering/data/rendering.conf.in (+2/-2) dock-rendering/src/rendering-3D-plane.c (+9/-2) dock-rendering/src/rendering-curve.c (+8/-2) dock-rendering/src/rendering-diapo-simple.c (+89/-8) dock-rendering/src/rendering-init.c (+2/-2) dock-rendering/src/rendering-panel.c (+12/-1) dock-rendering/src/rendering-parabole.c (+5/-2) dock-rendering/src/rendering-rainbow.c (+3/-0) drop-indicator/data/drop_indicator.conf.in (+1/-1) drop-indicator/src/applet-init.c (+1/-1) drop-indicator/src/applet-notifications.c (+170/-163) dustbin/data/dustbin.conf.in (+5/-6) generate-new-applet.sh (+13/-3) gnome-integration-old/src/applet-init.c (+2/-2) gnome-integration/src/applet-init.c (+2/-2) gnome-integration/src/applet-utils.c (+15/-3) gvfs-integration/cairo-dock-gio-vfs.c (+75/-31) icon-effect/data/icon-effect.conf.in (+1/-1) illusion/data/illusion.conf.in (+1/-1) kde-integration/src/applet-init.c (+2/-2) keyboard-indicator/data/keyboard-indicator.conf.in (+5/-6) logout/data/CMakeLists.txt (+12/-3) logout/data/icon-scheduling.svg (+238/-0) logout/data/locked.svg (+60/-0) logout/data/logout.conf.in (+6/-7) logout/data/logout.sh (+22/-0) logout/data/system-guest.svg (+40/-0) logout/data/system-hibernate.svg (+31/-0) logout/data/system-log-out.svg (+57/-0) logout/data/system-restart.svg (+201/-0) logout/data/system-shutdown.svg (+28/-0) logout/data/system-suspend.svg (+142/-0) logout/src/CMakeLists.txt (+11/-49) logout/src/applet-config.c (+1/-0) logout/src/applet-init.c (+12/-6) logout/src/applet-logout.c (+525/-0) logout/src/applet-logout.h (+44/-0) logout/src/applet-notifications.c (+39/-172) logout/src/applet-struct.h (+23/-0) mail/data/mail.conf.in (+5/-6) motion-blur/data/motion_blur.conf.in (+1/-1) musicPlayer/data/musicPlayer.conf.in (+6/-7) musicPlayer/src/applet-audacious.c (+43/-31) musicPlayer/src/applet-init.c (+4/-1) musicPlayer/src/applet-notifications.c (+1/-1) musicPlayer/src/applet-rhythmbox.c (+16/-9) netspeed/data/netspeed.conf.in (+5/-6) po/CMakeLists.txt (+1/-1) po/ar.po (+2762/-3928) po/cairo-dock.pot (+2050/-2136) po/cs.po (+3771/-3956) po/de.po (+4084/-4034) po/el.po (+3746/-3998) po/en_GB.po (+6532/-3879) po/es.po (+5221/-4023) po/et.po (+2938/-3975) po/eu.po (+2783/-3920) po/fr.po (+7175/-3965) po/hu.po (+3520/-3985) po/id.po (+2738/-3920) po/it.po (+7654/-3947) po/ja.po (+6295/-3836) po/nl.po (+7511/-3979) po/pl.po (+2117/-2215) po/pt.po (+4435/-4024) po/pt_BR.po (+6821/-3967) po/ru.po (+6799/-3894) po/sk.po (+6216/-3906) po/sr.po (+2946/-3928) po/sv.po (+4485/-3934) po/tr.po (+3178/-3935) po/uk.po (+6610/-3905) po/zh_CN.po (+4946/-3936) po/zh_TW.po (+5678/-3824) powermanager/data/powermanager.conf.in (+5/-12) powermanager/src/CMakeLists.txt (+14/-56) powermanager/src/powermanager-common.c (+231/-0) powermanager/src/powermanager-common.h (+35/-0) powermanager/src/powermanager-config.c (+4/-3) powermanager/src/powermanager-dbus.c (+517/-483) powermanager/src/powermanager-dbus.h (+6/-6) powermanager/src/powermanager-draw.c (+139/-130) powermanager/src/powermanager-init.c (+40/-63) powermanager/src/powermanager-menu-functions.c (+9/-11) powermanager/src/powermanager-proc-acpi.c (+225/-0) powermanager/src/powermanager-proc-acpi.h (+32/-0) powermanager/src/powermanager-struct.h (+54/-14) powermanager/src/powermanager-sys-class.c (+204/-0) powermanager/src/powermanager-sys-class.h (+32/-0) powermanager/src/powermanager-upower.c (+243/-0) powermanager/src/powermanager-upower.h (+38/-0) quick-browser/data/quick-browser.conf.in (+5/-6) quick-browser/src/applet-init.c (+4/-1) quick-browser/src/applet-menu.c (+6/-0) shared-images/CMakeLists.txt (+9/-0) shared-images/expose-desktops.svg (+894/-0) shared-images/expose-windows.svg (+1478/-0) shared-images/show-desktop.svg (+1127/-0) shared-images/widget-layer.svg (+631/-0) shortcuts/data/shortcuts.conf.in (+6/-7) shortcuts/src/applet-init.c (+1/-4) show-mouse/data/show_mouse.conf.in (+1/-1) showDesktop/data/showDesktop.conf.in (+8/-9) showDesktop/src/applet-notifications.c (+24/-14) slider/data/slider.conf.in (+5/-6) stack/data/stack.conf.in (+6/-7) stack/src/applet-init.c (+2/-4) stack/src/applet-load-icons.c (+21/-13) stack/src/applet-notifications.c (+6/-3) stack/src/applet-stack.c (+18/-1) switcher/data/switcher.conf.in (+4/-5) switcher/src/applet-desktops.c (+31/-12) switcher/src/applet-desktops.h (+2/-2) switcher/src/applet-draw.c (+3/-0) switcher/src/applet-init.c (+32/-52) switcher/src/applet-load-icons.c (+0/-1) switcher/src/applet-notifications.c (+9/-9) switcher/src/applet-struct.h (+1/-1) systray/data/systray.conf.in (+5/-6) systray/src/systray-interface.c (+1/-0) template/data/CMakeLists.txt (+0/-2) template/data/template.conf.in (+5/-6) template/src/CMakeLists.txt (+1/-1) terminal/data/terminal.conf.in (+6/-7) terminal/src/terminal-callbacks.c (+15/-0) terminal/src/terminal-widget.c (+18/-0) tomboy/data/tomboy.conf.in (+5/-6) weather/data/weather.conf.in (+6/-7) weather/src/applet-init.c (+1/-0) weather/src/applet-load-icons.c (+5/-2) weblets/data/weblets.conf.in (+5/-6) wifi/data/wifi.conf.in (+5/-6) xfce-integration/data/CMakeLists.txt (+4/-0) xfce-integration/data/lock-screen.sh (+11/-0) xfce-integration/src/CMakeLists.txt (+1/-1) xfce-integration/src/applet-init.c (+3/-3) xfce-integration/src/applet-utils.c (+3/-3) |
||||||||
To merge this branch: | bzr merge lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kees Cook | Approve | ||
Review via email: mp+70953@code.launchpad.net |
Commit message
Description of the change
Hello,
The Cairo-Dock team proposes a new version of its Cairo-Dock package.
This is the Upstream (short) ChangeLog:
* Upstream (short) ChangeLog:
- A new Help applet has been added to help our beloved user.
- Improved integration in the XFCE and LXDE desktop.
- Improved the classifying of our files in the source code
and in share/cairo-dock directory.
- Launchers and applications now uses the linked .desktop file.
- Fixed a few bugs as usual
Please note that this new version fixes also this bug #811579 (Cairo-Dock Plug-Ins needs to be recompiled to fix a dependency issues).
**We are currently not able to install cairo-dock-plug-ins packages due to this problem.**
This branch should be ready to be pushed on lp:ubuntu/cairo-dock-plug-ins (except the UNRELEASED version in debian/changelog)
Please upload this version before the FF.
Thank you for your help
PS: Don't forget to upload these plug-ins AND Cairo-Dock ( LP: #823513 )
PSĀ²: is it possible to wait for 15-30 min in order to compile this cairo-dock-plug-ins package with the new cairo-dock (core) packages.
Preview Diff
1 | === modified file 'Animated-icons/data/Animated-icons.conf.in' | |||
2 | --- Animated-icons/data/Animated-icons.conf.in 2011-04-20 20:46:51 +0000 | |||
3 | +++ Animated-icons/data/Animated-icons.conf.in 2011-08-09 20:07:46 +0000 | |||
4 | @@ -1,4 +1,4 @@ | |||
6 | 1 | #!en;@VERSION_ANIMATED_ICONS@ | 1 | #@VERSION_ANIMATED_ICONS@ |
7 | 2 | 2 | ||
8 | 3 | #[gtk-preferences] | 3 | #[gtk-preferences] |
9 | 4 | [Global] | 4 | [Global] |
10 | 5 | 5 | ||
11 | === modified file 'Animated-icons/src/applet-wobbly.c' | |||
12 | --- Animated-icons/src/applet-wobbly.c 2011-04-20 20:46:51 +0000 | |||
13 | +++ Animated-icons/src/applet-wobbly.c 2011-08-09 20:07:46 +0000 | |||
14 | @@ -473,7 +473,7 @@ | |||
15 | 473 | 473 | ||
16 | 474 | ///glActiveTextureARB(GL_TEXTURE0_ARB); // Go pour le multitexturing 1ere passe | 474 | ///glActiveTextureARB(GL_TEXTURE0_ARB); // Go pour le multitexturing 1ere passe |
17 | 475 | glBindTexture(GL_TEXTURE_2D, pIcon->iIconTexture); | 475 | glBindTexture(GL_TEXTURE_2D, pIcon->iIconTexture); |
19 | 476 | glColor4f(1.0f, 1.0f, 1.0f, myIconsParam.fAlbedo * pIcon->fAlpha); // transparence du reflet. | 476 | glColor4f(1.0f, 1.0f, 1.0f, myIconsParam.fAlbedo * pIcon->fAlpha / 2); // transparence du reflet. |
20 | 477 | glBlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, | 477 | glBlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, |
21 | 478 | GL_ONE, GL_ONE_MINUS_SRC_ALPHA); | 478 | GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |
22 | 479 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | 479 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
23 | 480 | 480 | ||
24 | === modified file 'CMakeLists.txt' | |||
25 | --- CMakeLists.txt 2011-07-05 13:45:43 +0000 | |||
26 | +++ CMakeLists.txt 2011-08-09 20:07:46 +0000 | |||
27 | @@ -10,7 +10,7 @@ | |||
28 | 10 | ########### project ############### | 10 | ########### project ############### |
29 | 11 | 11 | ||
30 | 12 | project ("cairo-dock-plugins") | 12 | project ("cairo-dock-plugins") |
32 | 13 | set (VERSION "2.3.0~3") | 13 | set (VERSION "2.4.0~0beta2") |
33 | 14 | 14 | ||
34 | 15 | add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall | 15 | add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall |
35 | 16 | if (NOT ${CMAKE_BUILD_TYPE}) | 16 | if (NOT ${CMAKE_BUILD_TYPE}) |
36 | @@ -22,11 +22,11 @@ | |||
37 | 22 | 22 | ||
38 | 23 | set (CPACK_SOURCE_GENERATOR "TGZ") | 23 | set (CPACK_SOURCE_GENERATOR "TGZ") |
39 | 24 | set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}") | 24 | set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}") |
41 | 25 | set (CPACK_SOURCE_IGNORE_FILES | 25 | set (CPACK_SOURCE_IGNORE_FILES |
42 | 26 | "/build/;/.bzr/;bzrignore$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}") | 26 | "/build/;/.bzr/;bzrignore$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}") |
43 | 27 | include (CPack) | 27 | include (CPack) |
44 | 28 | 28 | ||
46 | 29 | add_custom_target( dist | 29 | add_custom_target(dist |
47 | 30 | COMMAND ${CMAKE_MAKE_PROGRAM} package_source) | 30 | COMMAND ${CMAKE_MAKE_PROGRAM} package_source) |
48 | 31 | add_custom_target(dist-bzr | 31 | add_custom_target(dist-bzr |
49 | 32 | COMMAND bzr export ${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz | 32 | COMMAND bzr export ${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz |
50 | @@ -48,21 +48,25 @@ | |||
51 | 48 | 48 | ||
52 | 49 | # get plug-ins install dir | 49 | # get plug-ins install dir |
53 | 50 | execute_process( | 50 | execute_process( |
55 | 51 | COMMAND pkg-config cairo-dock --variable=pluginsdir # /usr/lib/cairo-dock | 51 | COMMAND pkg-config gldi --variable=pluginsdir # /usr/lib/cairo-dock |
56 | 52 | OUTPUT_VARIABLE pluginsdir) | 52 | OUTPUT_VARIABLE pluginsdir) |
57 | 53 | STRING (REGEX REPLACE "\n" "" pluginsdir ${pluginsdir}) # la commande rajoute un retour chariot ... | 53 | STRING (REGEX REPLACE "\n" "" pluginsdir ${pluginsdir}) # la commande rajoute un retour chariot ... |
58 | 54 | # get plug-ins data dir | 54 | # get plug-ins data dir |
59 | 55 | execute_process( | 55 | execute_process( |
61 | 56 | COMMAND pkg-config cairo-dock --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins | 56 | COMMAND pkg-config gldi --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins |
62 | 57 | OUTPUT_VARIABLE pluginsdatadir) | 57 | OUTPUT_VARIABLE pluginsdatadir) |
63 | 58 | STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir}) | 58 | STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir}) |
64 | 59 | # check that version matches with the core | 59 | # check that version matches with the core |
65 | 60 | execute_process( | 60 | execute_process( |
67 | 61 | COMMAND pkg-config --modversion cairo-dock # 2.2.0-3 | 61 | COMMAND pkg-config --modversion gldi # 2.2.0-3 |
68 | 62 | OUTPUT_VARIABLE dock_version) | 62 | OUTPUT_VARIABLE dock_version) |
69 | 63 | STRING (REGEX REPLACE "\n" "" dock_version ${dock_version}) | 63 | STRING (REGEX REPLACE "\n" "" dock_version ${dock_version}) |
70 | 64 | if (NOT "${dock_version}" STREQUAL "${VERSION}") # Version | 64 | if (NOT "${dock_version}" STREQUAL "${VERSION}") # Version |
72 | 65 | MESSAGE (FATAL_ERROR "warning : version mismatch with the core : " ${VERSION} <> ${dock_version}) | 65 | if ("${PACKAGEMENT}" STREQUAL "") |
73 | 66 | MESSAGE (FATAL_ERROR "Error : version mismatch with the core : " ${VERSION} <> ${dock_version}) | ||
74 | 67 | else () | ||
75 | 68 | MESSAGE (WARNING "Warning : version mismatch with the core : " ${VERSION} <> ${dock_version}) | ||
76 | 69 | endif () | ||
77 | 66 | endif() | 70 | endif() |
78 | 67 | 71 | ||
79 | 68 | #if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT "${FORCE_LIB64}" STREQUAL "") # 64bits and force install in lib64 | 72 | #if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT "${FORCE_LIB64}" STREQUAL "") # 64bits and force install in lib64 |
80 | @@ -76,7 +80,9 @@ | |||
81 | 76 | GET_FILENAME_COMPONENT(libdir "${pluginsdir}/.." ABSOLUTE) # /usr/lib | 80 | GET_FILENAME_COMPONENT(libdir "${pluginsdir}/.." ABSOLUTE) # /usr/lib |
82 | 77 | GET_FILENAME_COMPONENT(prefix "${pluginsdir}/../.." ABSOLUTE) # /usr | 81 | GET_FILENAME_COMPONENT(prefix "${pluginsdir}/../.." ABSOLUTE) # /usr |
83 | 78 | if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}") | 82 | if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}") |
85 | 79 | message (STATUS "Warning : plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}") | 83 | message (STATUS "It seems that the current CMAKE_INSTALL_PREFIX flag is not the same that you have used with the core.") |
86 | 84 | message (STATUS " It will be replaced by this value: ${prefix}") | ||
87 | 85 | message (WARNING "Plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}") | ||
88 | 80 | set (CMAKE_INSTALL_PREFIX "${prefix}") | 86 | set (CMAKE_INSTALL_PREFIX "${prefix}") |
89 | 81 | #set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock") | 87 | #set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock") |
90 | 82 | endif() | 88 | endif() |
91 | @@ -88,6 +94,10 @@ | |||
92 | 88 | 94 | ||
93 | 89 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files | 95 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files |
94 | 90 | 96 | ||
95 | 97 | set (MODULES_MISSING "") | ||
96 | 98 | set (MODULES_INTEGRATION_MISSING "") | ||
97 | 99 | set (PROGRAMS_MISSING "") | ||
98 | 100 | |||
99 | 91 | ########### dependancies ############### | 101 | ########### dependancies ############### |
100 | 92 | 102 | ||
101 | 93 | message ("") | 103 | message ("") |
102 | @@ -96,7 +106,10 @@ | |||
103 | 96 | message (STATUS "=====================") | 106 | message (STATUS "=====================") |
104 | 97 | message ("") | 107 | message ("") |
105 | 98 | 108 | ||
107 | 99 | pkg_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") | 109 | pkg_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") |
108 | 110 | pkg_check_modules ("GLDI" REQUIRED "gldi") # we don't want to link with gldi | ||
109 | 111 | set (PACKAGE_INCLUDE_DIRS "${GLDI_INCLUDE_DIRS}") | ||
110 | 112 | #message (STATUS "PACKAGE: ${PACKAGE_INCLUDE_DIRS}") | ||
111 | 100 | 113 | ||
112 | 101 | ############# GLIB ################# | 114 | ############# GLIB ################# |
113 | 102 | pkg_check_modules (GLIB glib-2.0) | 115 | pkg_check_modules (GLIB glib-2.0) |
114 | @@ -107,14 +120,17 @@ | |||
115 | 107 | STRING (REGEX REPLACE "-.*" "" GLIB_NANO "${GLIB_NANO}") | 120 | STRING (REGEX REPLACE "-.*" "" GLIB_NANO "${GLIB_NANO}") |
116 | 108 | 121 | ||
117 | 109 | ############# ALSA_MIXER ################# | 122 | ############# ALSA_MIXER ################# |
118 | 123 | message (STATUS "> AlsaMixer:") | ||
119 | 110 | set (with_alsa "no") | 124 | set (with_alsa "no") |
120 | 111 | if (NOT "${enable-alsa-mixer}" STREQUAL "no") | 125 | if (NOT "${enable-alsa-mixer}" STREQUAL "no") |
121 | 112 | pkg_check_modules (ALSA_MIXER_PACKAGE alsa) | 126 | pkg_check_modules (ALSA_MIXER_PACKAGE alsa) |
122 | 113 | if ("${ALSA_MIXER_PACKAGE_FOUND}" STREQUAL "") | 127 | if ("${ALSA_MIXER_PACKAGE_FOUND}" STREQUAL "") |
123 | 114 | message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.") | 128 | message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.") |
124 | 129 | message (WARNING "This module is required to compile AlsaMixer applet: alsa") | ||
125 | 130 | set (MODULES_MISSING "${MODULES_MISSING} alsa") | ||
126 | 115 | else() | 131 | else() |
127 | 116 | set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS}) | 132 | set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS}) |
129 | 117 | set (VERSION_ALSA_MIXER "1.0.12") | 133 | set (VERSION_ALSA_MIXER "1.0.13") |
130 | 118 | set (PACKAGE_ALSA_MIXER "cd-AlsaMixer") | 134 | set (PACKAGE_ALSA_MIXER "cd-AlsaMixer") |
131 | 119 | set (with_alsa "yes") | 135 | set (with_alsa "yes") |
132 | 120 | set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer") | 136 | set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer") |
133 | @@ -124,6 +140,7 @@ | |||
134 | 124 | endif() | 140 | endif() |
135 | 125 | 141 | ||
136 | 126 | ############# ANIMATED ICONS ################# | 142 | ############# ANIMATED ICONS ################# |
137 | 143 | message (STATUS "> Animated Icons:") | ||
138 | 127 | set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS}) | 144 | set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS}) |
139 | 128 | set (VERSION_ANIMATED_ICONS "1.0.10") | 145 | set (VERSION_ANIMATED_ICONS "1.0.10") |
140 | 129 | set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons") | 146 | set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons") |
141 | @@ -132,8 +149,9 @@ | |||
142 | 132 | add_subdirectory (Animated-icons) | 149 | add_subdirectory (Animated-icons) |
143 | 133 | 150 | ||
144 | 134 | ############# CAIRO_PENGUIN ################# | 151 | ############# CAIRO_PENGUIN ################# |
145 | 152 | message (STATUS "> Cairo Penguin:") | ||
146 | 135 | set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS}) | 153 | set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS}) |
148 | 136 | set (VERSION_CAIRO_PENGUIN "1.1.8") | 154 | set (VERSION_CAIRO_PENGUIN "1.1.9") |
149 | 137 | set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin") | 155 | set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin") |
150 | 138 | set (cairo_penguinuserdirname "Cairo-Penguin") | 156 | set (cairo_penguinuserdirname "Cairo-Penguin") |
151 | 139 | set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin") | 157 | set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin") |
152 | @@ -141,54 +159,64 @@ | |||
153 | 141 | add_subdirectory (Cairo-Penguin) | 159 | add_subdirectory (Cairo-Penguin) |
154 | 142 | 160 | ||
155 | 143 | ############# CLIPPER ################# | 161 | ############# CLIPPER ################# |
156 | 162 | message (STATUS "> Clipper:") | ||
157 | 144 | set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS}) | 163 | set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS}) |
159 | 145 | set (VERSION_CLIPPER "1.1.4") | 164 | set (VERSION_CLIPPER "1.1.5") |
160 | 146 | set (PACKAGE_CLIPPER "cd-Clipper") | 165 | set (PACKAGE_CLIPPER "cd-Clipper") |
161 | 147 | set (Clipperdatadir "${pluginsdatadir}/Clipper") | 166 | set (Clipperdatadir "${pluginsdatadir}/Clipper") |
162 | 148 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf) | 167 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf) |
163 | 149 | add_subdirectory (Clipper) | 168 | add_subdirectory (Clipper) |
164 | 150 | 169 | ||
165 | 151 | ############# CLOCK ################# | 170 | ############# CLOCK ################# |
166 | 171 | message (STATUS "> Clock:") | ||
167 | 152 | set (with_ical "yes") | 172 | set (with_ical "yes") |
168 | 153 | pkg_check_modules ("LIBICAL_PACKAGE" "libical") | 173 | pkg_check_modules ("LIBICAL_PACKAGE" "libical") |
169 | 154 | if ("${LIBICAL_PACKAGE_FOUND}" STREQUAL "") | 174 | if ("${LIBICAL_PACKAGE_FOUND}" STREQUAL "") |
170 | 155 | set (with_ical "no") | 175 | set (with_ical "no") |
171 | 156 | message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.") | 176 | message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.") |
172 | 177 | message (WARNING "This module is required to compile Clock applet with iCal support: libical") | ||
173 | 178 | set (MODULES_MISSING "${MODULES_MISSING} libical") | ||
174 | 157 | endif() | 179 | endif() |
175 | 158 | set (GETTEXT_CLOCK ${GETTEXT_PLUGINS}) | 180 | set (GETTEXT_CLOCK ${GETTEXT_PLUGINS}) |
177 | 159 | set (VERSION_CLOCK "2.1.2") | 181 | set (VERSION_CLOCK "2.1.3") |
178 | 160 | set (PACKAGE_CLOCK "cd-clock") | 182 | set (PACKAGE_CLOCK "cd-clock") |
179 | 161 | set (clockuserdirname "clock") | 183 | set (clockuserdirname "clock") |
180 | 162 | set (clockdatadir "${pluginsdatadir}/clock") | 184 | set (clockdatadir "${pluginsdatadir}/clock") |
181 | 163 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/clock/data/clock.conf.in ${CMAKE_CURRENT_BINARY_DIR}/clock/data/clock.conf) | 185 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/clock/data/clock.conf.in ${CMAKE_CURRENT_BINARY_DIR}/clock/data/clock.conf) |
182 | 164 | add_subdirectory (clock) | 186 | add_subdirectory (clock) |
183 | 165 | 187 | ||
191 | 166 | ############# COMPIZ_ICON ################# | 188 | ############# COMPOSITE_MANAGER ################# |
192 | 167 | set (GETTEXT_COMPIZ_ICON ${GETTEXT_PLUGINS}) | 189 | message (STATUS "> Coposite Manager:") |
193 | 168 | set (VERSION_COMPIZ_ICON "1.1.6") | 190 | set (GETTEXT_COMPOSITE_MANAGER ${GETTEXT_PLUGINS}) |
194 | 169 | set (PACKAGE_COMPIZ_ICON "cd-compiz-icon") | 191 | set (VERSION_COMPOSITE_MANAGER "1.0.0") |
195 | 170 | set (compiz_icondatadir "${pluginsdatadir}/compiz-icon") | 192 | set (PACKAGE_COMPOSITE_MANAGER "cd-Composite-Manager") |
196 | 171 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compiz-icon/data/compiz-icon.conf.in ${CMAKE_CURRENT_BINARY_DIR}/compiz-icon/data/compiz-icon.conf) | 193 | set (composite_managerdatadir "${pluginsdatadir}/Composite-Manager") |
197 | 172 | add_subdirectory (compiz-icon) | 194 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Composite-Manager/data/Composite-Manager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Composite-Manager/data/Composite-Manager.conf) |
198 | 195 | add_subdirectory (Composite-Manager) | ||
199 | 173 | 196 | ||
200 | 174 | ############# DBUS ################# | 197 | ############# DBUS ################# |
201 | 198 | message (STATUS "> DBus:") | ||
202 | 199 | message (STATUS "* Python:") | ||
203 | 175 | find_program (PYTHON_EXECUTABLE python) | 200 | find_program (PYTHON_EXECUTABLE python) |
204 | 176 | EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION) | 201 | EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION) |
209 | 177 | if ("${PYTHON_VERSION}" STREQUAL "") | 202 | if ("${PYTHON_VERSION}" STREQUAL "") |
210 | 178 | message (STATUS "Could not find Python, won't install Python interface.") | 203 | message (STATUS "Could not find Python, won't install Python interface.") |
211 | 179 | set (with_python "no") | 204 | message (WARNING "This program is required to compile DBus applet with Python interface: python (version 2)") |
212 | 180 | else() | 205 | set (PROGRAMS_MISSING "${PROGRAMS_MISSING} python") |
213 | 206 | set (with_python "no") | ||
214 | 207 | else() | ||
215 | 181 | STRING (REGEX REPLACE "\n" "" PYTHON_VERSION ${PYTHON_VERSION}) | 208 | STRING (REGEX REPLACE "\n" "" PYTHON_VERSION ${PYTHON_VERSION}) |
220 | 182 | message (STATUS "Python Version: ${PYTHON_VERSION}") | 209 | message (STATUS "Python Version: ${PYTHON_VERSION}") |
221 | 183 | GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE) | 210 | GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE) |
222 | 184 | if (EXISTS ${DEBIAN_VERSION}) | 211 | if (EXISTS ${DEBIAN_VERSION}) |
223 | 185 | message (STATUS " will use '--install-layout deb' with 'python setup.py install'") | 212 | message (STATUS " will use '--install-layout deb' with 'python setup.py install'") |
224 | 186 | set (DEBIAN_INSTALL_LAYOUT "--install-layout deb") | 213 | set (DEBIAN_INSTALL_LAYOUT "--install-layout deb") |
225 | 187 | endif() | 214 | endif() |
226 | 188 | set (PYTHON_FOUND "TRUE") | 215 | set (PYTHON_FOUND "TRUE") |
228 | 189 | set (with_python "yes") | 216 | set (with_python "yes") |
229 | 190 | endif() | 217 | endif() |
230 | 191 | 218 | ||
231 | 219 | message (STATUS "* Ruby:") | ||
232 | 192 | # find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs. | 220 | # find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs. |
233 | 193 | find_program (RUBY_EXECUTABLE ruby) | 221 | find_program (RUBY_EXECUTABLE ruby) |
234 | 194 | EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']" | 222 | EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']" |
235 | @@ -196,6 +224,8 @@ | |||
236 | 196 | message (STATUS "RUBY_LIBRARY: ${RUBY_LIB_DIR}") | 224 | message (STATUS "RUBY_LIBRARY: ${RUBY_LIB_DIR}") |
237 | 197 | if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil") | 225 | if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil") |
238 | 198 | message (STATUS "Could not find ruby libs, won't install Ruby interface.") | 226 | message (STATUS "Could not find ruby libs, won't install Ruby interface.") |
239 | 227 | message (WARNING "This program is required to compile DBus applet with Ruby interface: ruby") | ||
240 | 228 | set (PROGRAMS_MISSING "${PROGRAMS_MISSING} ruby") | ||
241 | 199 | set (with_ruby "no") | 229 | set (with_ruby "no") |
242 | 200 | else() | 230 | else() |
243 | 201 | string (REGEX REPLACE "lib/ruby/[0-9].[0-9]" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}") | 231 | string (REGEX REPLACE "lib/ruby/[0-9].[0-9]" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}") |
244 | @@ -206,6 +236,7 @@ | |||
245 | 206 | set (with_ruby "yes") | 236 | set (with_ruby "yes") |
246 | 207 | endif() | 237 | endif() |
247 | 208 | 238 | ||
248 | 239 | message (STATUS "* Mono:") | ||
249 | 209 | #find_package (Mono) | 240 | #find_package (Mono) |
250 | 210 | find_program (GMCS_EXECUTABLE gmcs) | 241 | find_program (GMCS_EXECUTABLE gmcs) |
251 | 211 | if ("${GMCS_EXECUTABLE}" STREQUAL "" OR NOT EXISTS ${GMCS_EXECUTABLE}) | 242 | if ("${GMCS_EXECUTABLE}" STREQUAL "" OR NOT EXISTS ${GMCS_EXECUTABLE}) |
252 | @@ -215,6 +246,8 @@ | |||
253 | 215 | pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0) | 246 | pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0) |
254 | 216 | if ("${MONO_PACKAGE_FOUND}" STREQUAL "") | 247 | if ("${MONO_PACKAGE_FOUND}" STREQUAL "") |
255 | 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.") | 248 | 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.") |
256 | 249 | message (WARNING "These modules are required to compile DBus applet with Mono interface: glib-sharp-2.0, ndesk-dbus-1.0 and ndesk-dbus-glib-1.0") | ||
257 | 250 | set (MODULES_MISSING "${MODULES_MISSING} glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0") | ||
258 | 218 | set (with_mono "no") | 251 | set (with_mono "no") |
259 | 219 | else() | 252 | else() |
260 | 220 | set (MONO_FOUND "TRUE") | 253 | set (MONO_FOUND "TRUE") |
261 | @@ -222,6 +255,7 @@ | |||
262 | 222 | endif() | 255 | endif() |
263 | 223 | endif() | 256 | endif() |
264 | 224 | 257 | ||
265 | 258 | message (STATUS "* Vala:") | ||
266 | 225 | # Valac is only riquired to convert vala files to C files. | 259 | # Valac is only riquired to convert vala files to C files. |
267 | 226 | # So we can directly use produced files (c, h, vapi) without using valac. | 260 | # So we can directly use produced files (c, h, vapi) without using valac. |
268 | 227 | set (with_vala "yes") | 261 | set (with_vala "yes") |
269 | @@ -243,7 +277,7 @@ | |||
270 | 243 | 277 | ||
271 | 244 | STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}") | 278 | STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}") |
272 | 245 | # message (STATUS "VALA_MAJOR : ${VALA_MAJOR}") | 279 | # message (STATUS "VALA_MAJOR : ${VALA_MAJOR}") |
274 | 246 | 280 | ||
275 | 247 | STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7 | 281 | STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7 |
276 | 248 | STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}") | 282 | STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}") |
277 | 249 | # message (STATUS "VALA_MINOR : ${VALA_MINOR}") | 283 | # message (STATUS "VALA_MINOR : ${VALA_MINOR}") |
278 | @@ -252,13 +286,18 @@ | |||
279 | 252 | STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}") | 286 | STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}") |
280 | 253 | # message (STATUS "VALA_NANO : ${VALA_NANO}") | 287 | # message (STATUS "VALA_NANO : ${VALA_NANO}") |
281 | 254 | 288 | ||
284 | 255 | if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala > 0.10 | 289 | if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala >= 0.10 |
285 | 256 | message (STATUS " Vala compiler OK (>= 0.10).") | 290 | # AND (${VALA_MAJOR} LESS 1 AND ${VALA_MINOR} LESS 13)) # and <= 0.12 |
286 | 291 | message (STATUS " Vala compiler OK (>= 0.10).")# and <= 0.12).") | ||
287 | 257 | set (VALAC_FOUND "TRUE") | 292 | set (VALAC_FOUND "TRUE") |
288 | 258 | set (with_valac "yes") | 293 | set (with_valac "yes") |
289 | 259 | else() | 294 | else() |
291 | 260 | message (STATUS "Vala compiler is too old (0.10 required), won't build Vala interface.") | 295 | message (STATUS "Vala compiler is too old (0.10 required) or too new (> 0.12), won't build Vala interface.") |
292 | 261 | endif() | 296 | endif() |
293 | 297 | else() | ||
294 | 298 | message (STATUS "Could not find ValaC, won't build Vala interface with the version of your distribution.") | ||
295 | 299 | message (WARNING "This program is required to compile DBus applet with Python interface: valac (version > 0.10)") | ||
296 | 300 | set (PROGRAMS_MISSING "${PROGRAMS_MISSING} valac") | ||
297 | 262 | endif() | 301 | endif() |
298 | 263 | 302 | ||
299 | 264 | 303 | ||
300 | @@ -270,6 +309,7 @@ | |||
301 | 270 | add_subdirectory (Dbus) | 309 | add_subdirectory (Dbus) |
302 | 271 | 310 | ||
303 | 272 | ############# DESKLET_RENDERING ################# | 311 | ############# DESKLET_RENDERING ################# |
304 | 312 | message (STATUS "> Desklet Rendering:") | ||
305 | 273 | set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS}) | 313 | set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS}) |
306 | 274 | set (VERSION_DESKLET_RENDERING "1.5.6") | 314 | set (VERSION_DESKLET_RENDERING "1.5.6") |
307 | 275 | set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering") | 315 | set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering") |
308 | @@ -278,6 +318,7 @@ | |||
309 | 278 | add_subdirectory (desklet-rendering) | 318 | add_subdirectory (desklet-rendering) |
310 | 279 | 319 | ||
311 | 280 | ############# DIALOG_RENDERING ################# | 320 | ############# DIALOG_RENDERING ################# |
312 | 321 | message (STATUS "> Dialog Rendering:") | ||
313 | 281 | set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS}) | 322 | set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS}) |
314 | 282 | set (VERSION_DIALOG_RENDERING "0.5.1") | 323 | set (VERSION_DIALOG_RENDERING "0.5.1") |
315 | 283 | set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering") | 324 | set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering") |
316 | @@ -288,8 +329,9 @@ | |||
317 | 288 | ############# DISKS ################# | 329 | ############# DISKS ################# |
318 | 289 | set (with_disks "no") | 330 | set (with_disks "no") |
319 | 290 | if ("${enable-disks}" STREQUAL "yes") | 331 | if ("${enable-disks}" STREQUAL "yes") |
320 | 332 | message (STATUS "> Disks:") | ||
321 | 291 | set (GETTEXT_DISKS ${GETTEXT_PLUGINS}) | 333 | set (GETTEXT_DISKS ${GETTEXT_PLUGINS}) |
323 | 292 | set (VERSION_DISKS "0.0.2") | 334 | set (VERSION_DISKS "0.0.3") |
324 | 293 | set (PACKAGE_DISKS "cd-disks") | 335 | set (PACKAGE_DISKS "cd-disks") |
325 | 294 | set (with_disks "yes") | 336 | set (with_disks "yes") |
326 | 295 | set (disksdatadir "${pluginsdatadir}/Disks") | 337 | set (disksdatadir "${pluginsdatadir}/Disks") |
327 | @@ -298,6 +340,7 @@ | |||
328 | 298 | endif() | 340 | endif() |
329 | 299 | 341 | ||
330 | 300 | ############# DND2SHARE ################# | 342 | ############# DND2SHARE ################# |
331 | 343 | message (STATUS "> DND2Share:") | ||
332 | 301 | set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS}) | 344 | set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS}) |
333 | 302 | set (VERSION_DND2SHARE "1.0.6") | 345 | set (VERSION_DND2SHARE "1.0.6") |
334 | 303 | set (PACKAGE_DND2SHARE "cd-dnd2share") | 346 | set (PACKAGE_DND2SHARE "cd-dnd2share") |
335 | @@ -306,6 +349,7 @@ | |||
336 | 306 | add_subdirectory (dnd2share) | 349 | add_subdirectory (dnd2share) |
337 | 307 | 350 | ||
338 | 308 | ############# DOCK RENDERING ################# | 351 | ############# DOCK RENDERING ################# |
339 | 352 | message (STATUS "> Dock Rendering:") | ||
340 | 309 | set (GETTEXT_RENDERING ${GETTEXT_PLUGINS}) | 353 | set (GETTEXT_RENDERING ${GETTEXT_PLUGINS}) |
341 | 310 | set (VERSION_RENDERING "1.5.9") | 354 | set (VERSION_RENDERING "1.5.9") |
342 | 311 | set (PACKAGE_RENDERING "cd-rendering") | 355 | set (PACKAGE_RENDERING "cd-rendering") |
343 | @@ -316,8 +360,9 @@ | |||
344 | 316 | ############# DONCKY ################# | 360 | ############# DONCKY ################# |
345 | 317 | set (with_doncky "no") | 361 | set (with_doncky "no") |
346 | 318 | if ("${enable-doncky}" STREQUAL "yes") | 362 | if ("${enable-doncky}" STREQUAL "yes") |
347 | 363 | message (STATUS "> Doncky:") | ||
348 | 319 | set (GETTEXT_DONCKY ${GETTEXT_PLUGINS}) | 364 | set (GETTEXT_DONCKY ${GETTEXT_PLUGINS}) |
350 | 320 | set (VERSION_DONCKY "0.0.4") | 365 | set (VERSION_DONCKY "0.0.5") |
351 | 321 | set (PACKAGE_DONCKY "cd-doncky") | 366 | set (PACKAGE_DONCKY "cd-doncky") |
352 | 322 | set (with_doncky "yes") | 367 | set (with_doncky "yes") |
353 | 323 | set (donckydatadir "${pluginsdatadir}/Doncky") | 368 | set (donckydatadir "${pluginsdatadir}/Doncky") |
354 | @@ -326,6 +371,7 @@ | |||
355 | 326 | endif() | 371 | endif() |
356 | 327 | 372 | ||
357 | 328 | ############# DROP INDICATOR ################# | 373 | ############# DROP INDICATOR ################# |
358 | 374 | message (STATUS "> Drop Indicator:") | ||
359 | 329 | set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS}) | 375 | set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS}) |
360 | 330 | set (VERSION_DROP_INDICATOR "1.1.4") | 376 | set (VERSION_DROP_INDICATOR "1.1.4") |
361 | 331 | set (PACKAGE_DROP_INDICATOR "cd-drop_indicator") | 377 | set (PACKAGE_DROP_INDICATOR "cd-drop_indicator") |
362 | @@ -334,8 +380,9 @@ | |||
363 | 334 | add_subdirectory (drop-indicator) | 380 | add_subdirectory (drop-indicator) |
364 | 335 | 381 | ||
365 | 336 | ############# DUSTBIN ################# | 382 | ############# DUSTBIN ################# |
366 | 383 | message (STATUS "> Dustbin:") | ||
367 | 337 | set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS}) | 384 | set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS}) |
369 | 338 | set (VERSION_DUSTBIN "2.3.1") | 385 | set (VERSION_DUSTBIN "2.3.2") |
370 | 339 | set (PACKAGE_DUSTBIN "cd-dustbin") | 386 | set (PACKAGE_DUSTBIN "cd-dustbin") |
371 | 340 | set (dustbinuserdirname "dustbin") | 387 | set (dustbinuserdirname "dustbin") |
372 | 341 | set (dustbindatadir "${pluginsdatadir}/dustbin") | 388 | set (dustbindatadir "${pluginsdatadir}/dustbin") |
373 | @@ -343,22 +390,26 @@ | |||
374 | 343 | add_subdirectory (dustbin) | 390 | add_subdirectory (dustbin) |
375 | 344 | 391 | ||
376 | 345 | ############# FOLDERS ################# | 392 | ############# FOLDERS ################# |
377 | 393 | message (STATUS "> Folders:") | ||
378 | 346 | set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS}) | 394 | set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS}) |
380 | 347 | set (VERSION_FOLDERS "0.2.1") | 395 | set (VERSION_FOLDERS "0.2.2") |
381 | 348 | set (PACKAGE_FOLDERS "cd-Folders") | 396 | set (PACKAGE_FOLDERS "cd-Folders") |
382 | 349 | set (foldersdatadir "${pluginsdatadir}/Folders") | 397 | set (foldersdatadir "${pluginsdatadir}/Folders") |
383 | 350 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf) | 398 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf) |
384 | 351 | add_subdirectory (Folders) | 399 | add_subdirectory (Folders) |
385 | 352 | 400 | ||
386 | 353 | ############# GMENU ################# | 401 | ############# GMENU ################# |
387 | 402 | message (STATUS "> GMenu:") | ||
388 | 354 | set (with_gmenu "no") | 403 | set (with_gmenu "no") |
389 | 355 | if (NOT "${enable-gmenu}" STREQUAL "no") | 404 | if (NOT "${enable-gmenu}" STREQUAL "no") |
390 | 356 | pkg_check_modules (GMENU_PACKAGE libgnome-menu) | 405 | pkg_check_modules (GMENU_PACKAGE libgnome-menu) |
391 | 357 | if ("${GMENU_PACKAGE_FOUND}" STREQUAL "") | 406 | if ("${GMENU_PACKAGE_FOUND}" STREQUAL "") |
392 | 358 | message (STATUS "Could not find libgnome-menu; Cairo-Dock won't be built with GMenu applet.") | 407 | message (STATUS "Could not find libgnome-menu; Cairo-Dock won't be built with GMenu applet.") |
393 | 408 | message (WARNING "This module is required to compile GMenu applet: libgnome-menu") | ||
394 | 409 | set (MODULES_MISSING "${MODULES_MISSING} libgnome-menu") | ||
395 | 359 | else() | 410 | else() |
396 | 360 | set (GETTEXT_GMENU ${GETTEXT_PLUGINS}) | 411 | set (GETTEXT_GMENU ${GETTEXT_PLUGINS}) |
398 | 361 | set (VERSION_GMENU "1.1.6") | 412 | set (VERSION_GMENU "1.1.8") |
399 | 362 | set (PACKAGE_GMENU "cd-GMenu") | 413 | set (PACKAGE_GMENU "cd-GMenu") |
400 | 363 | set (with_gmenu "yes") | 414 | set (with_gmenu "yes") |
401 | 364 | set (gmenudatadir "${pluginsdatadir}/GMenu") | 415 | set (gmenudatadir "${pluginsdatadir}/GMenu") |
402 | @@ -368,15 +419,19 @@ | |||
403 | 368 | endif() | 419 | endif() |
404 | 369 | 420 | ||
405 | 370 | ############# GVFS-INTEGRATION ################# | 421 | ############# GVFS-INTEGRATION ################# |
406 | 422 | message (STATUS "> GVFS-Integration:") | ||
407 | 371 | pkg_check_modules ("LIBGIO" "gio-2.0") | 423 | pkg_check_modules ("LIBGIO" "gio-2.0") |
408 | 372 | add_subdirectory (gvfs-integration) | 424 | add_subdirectory (gvfs-integration) |
409 | 373 | 425 | ||
410 | 374 | ############# GNOME-INTEGRATION ################# | 426 | ############# GNOME-INTEGRATION ################# |
411 | 427 | message (STATUS "> Gnome-Integration:") | ||
412 | 375 | set (with_gnome_integration "no") | 428 | set (with_gnome_integration "no") |
413 | 376 | if (NOT "${enable-gnome-integration}" STREQUAL "no") | 429 | if (NOT "${enable-gnome-integration}" STREQUAL "no") |
414 | 377 | pkg_check_modules (GNOME_INTEGRATION gio-2.0) | 430 | pkg_check_modules (GNOME_INTEGRATION gio-2.0) |
415 | 378 | if ("${GNOME_INTEGRATION_FOUND}" STREQUAL "") | 431 | if ("${GNOME_INTEGRATION_FOUND}" STREQUAL "") |
416 | 379 | message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.") | 432 | message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.") |
417 | 433 | message (STATUS "This module is required to compile Gnome-Integration applet: gio-2.0") | ||
418 | 434 | set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0") | ||
419 | 380 | else() | 435 | else() |
420 | 381 | set (VERSION_GNOME_INTEGRATION "1.0.3") | 436 | set (VERSION_GNOME_INTEGRATION "1.0.3") |
421 | 382 | set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration") | 437 | set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration") |
422 | @@ -389,9 +444,13 @@ | |||
423 | 389 | ############# GNOME-INTEGRATION-OLD ################# | 444 | ############# GNOME-INTEGRATION-OLD ################# |
424 | 390 | set (with_gnome_integration_old "no") | 445 | set (with_gnome_integration_old "no") |
425 | 391 | if ("${enable-old-gnome-integration}" STREQUAL "yes") | 446 | if ("${enable-old-gnome-integration}" STREQUAL "yes") |
426 | 447 | message (STATUS "> Gnome-Integration:") | ||
427 | 448 | message (WARNING "This applet is deprecated") | ||
428 | 392 | pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0) | 449 | pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0) |
429 | 393 | if ("${OLD_GNOME_INTEGRATION_FOUND}" STREQUAL "") | 450 | if ("${OLD_GNOME_INTEGRATION_FOUND}" STREQUAL "") |
430 | 394 | message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.") | 451 | message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.") |
431 | 452 | message (STATUS "These modules are required to compile Gnome-Integration-Old applet: gnome-vfs-2.0 libgnomeui-2.0") | ||
432 | 453 | set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gnome-vfs-2.0 libgnomeui-2.0") | ||
433 | 395 | else() | 454 | else() |
434 | 396 | set (VERSION_GNOME_INTEGRATION_OLD "1.0.4") | 455 | set (VERSION_GNOME_INTEGRATION_OLD "1.0.4") |
435 | 397 | set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old") | 456 | set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old") |
436 | @@ -401,7 +460,8 @@ | |||
437 | 401 | endif() | 460 | endif() |
438 | 402 | endif() | 461 | endif() |
439 | 403 | 462 | ||
441 | 404 | ############# ICON EFFECT ################# | 463 | ############# ICON EFFECTS ################# |
442 | 464 | message (STATUS "> Icon Effects:") | ||
443 | 405 | set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS}) | 465 | set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS}) |
444 | 406 | set (VERSION_ICON_EFFECTS "1.2.4") | 466 | set (VERSION_ICON_EFFECTS "1.2.4") |
445 | 407 | set (PACKAGE_ICON_EFFECTS "cd-icon-effect") | 467 | set (PACKAGE_ICON_EFFECTS "cd-icon-effect") |
446 | @@ -409,11 +469,32 @@ | |||
447 | 409 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf) | 469 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf) |
448 | 410 | add_subdirectory (icon-effect) | 470 | add_subdirectory (icon-effect) |
449 | 411 | 471 | ||
450 | 472 | ############# IMPULSE ################# | ||
451 | 473 | set (with_impulse "no") | ||
452 | 474 | if ("${enable-impulse}" STREQUAL "yes") | ||
453 | 475 | message (STATUS "> Impulse:") | ||
454 | 476 | pkg_check_modules (IMPULSE_PACKAGES libpulse fftw3) | ||
455 | 477 | if ("${IMPULSE_PACKAGES_FOUND}" STREQUAL "") | ||
456 | 478 | message (STATUS "Could not find libpulse; Cairo-Dock won't be built with Impulse applet.") | ||
457 | 479 | message (WARNING "These modules are required to compile Impulse applet: libpulse fftw3") | ||
458 | 480 | set (MODULES_MISSING "${MODULES_MISSING} libpulse fftw3") | ||
459 | 481 | else() | ||
460 | 482 | set (GETTEXT_IMPULSE ${GETTEXT_PLUGINS}) | ||
461 | 483 | set (VERSION_IMPULSE "0.0.3") | ||
462 | 484 | set (PACKAGE_IMPULSE "cd-Impulse") | ||
463 | 485 | set (with_impulse "yes") | ||
464 | 486 | set (impulsedatadir "${pluginsdatadir}/Impulse") | ||
465 | 487 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Impulse/data/Impulse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Impulse/data/Impulse.conf) | ||
466 | 488 | add_subdirectory (Impulse) | ||
467 | 489 | endif() | ||
468 | 490 | endif() | ||
469 | 491 | |||
470 | 412 | ############# INDICATOR-APPLET ################# | 492 | ############# INDICATOR-APPLET ################# |
472 | 413 | # Note: the names of dbusmenu-glib and dbusmenu-gtk have changed... | 493 | message (STATUS "> Indicator-Applet:") |
473 | 494 | # Note: the names of dbusmenu-glib, dbusmenu-gtk and indicator have changed... | ||
474 | 414 | pkg_check_modules (DBUSMENU_04 QUIET dbusmenu-glib-0.4) | 495 | pkg_check_modules (DBUSMENU_04 QUIET dbusmenu-glib-0.4) |
475 | 415 | pkg_check_modules (DBUSMENU_GTK_04 QUIET dbusmenu-gtk-0.4) | 496 | pkg_check_modules (DBUSMENU_GTK_04 QUIET dbusmenu-gtk-0.4) |
477 | 416 | pkg_check_modules (INDICATOR_APPLET indicator libido-0.1) | 497 | pkg_check_modules (INDICATOR_04 QUIET indicator-0.4) |
478 | 417 | if ("${DBUSMENU_04_FOUND}" STREQUAL "1") | 498 | if ("${DBUSMENU_04_FOUND}" STREQUAL "1") |
479 | 418 | pkg_check_modules (DBUSMENU dbusmenu-glib-0.4) | 499 | pkg_check_modules (DBUSMENU dbusmenu-glib-0.4) |
480 | 419 | else() | 500 | else() |
481 | @@ -424,29 +505,45 @@ | |||
482 | 424 | else() | 505 | else() |
483 | 425 | pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk) | 506 | pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk) |
484 | 426 | endif() | 507 | endif() |
485 | 508 | if ("${INDICATOR_04_FOUND}" STREQUAL "1") | ||
486 | 509 | pkg_check_modules (INDICATOR_APPLET indicator-0.4 libido-0.1) | ||
487 | 510 | else() | ||
488 | 511 | pkg_check_modules (INDICATOR_APPLET indicator libido-0.1) | ||
489 | 512 | endif() | ||
490 | 513 | |||
491 | 427 | if ("${INDICATOR_APPLET_FOUND}" STREQUAL "1" AND "${DBUSMENU_FOUND}" STREQUAL "1" AND "${DBUSMENU_GTK_FOUND}" STREQUAL "1") | 514 | if ("${INDICATOR_APPLET_FOUND}" STREQUAL "1" AND "${DBUSMENU_FOUND}" STREQUAL "1" AND "${DBUSMENU_GTK_FOUND}" STREQUAL "1") |
494 | 428 | message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}") | 515 | #message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}") |
495 | 429 | 516 | ||
496 | 430 | STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}") | 517 | STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}") |
497 | 431 | # message (STATUS "DBUSMENU_MAJOR : ${DBUSMENU_MAJOR}") | 518 | # message (STATUS "DBUSMENU_MAJOR : ${DBUSMENU_MAJOR}") |
499 | 432 | 519 | ||
500 | 433 | STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7 | 520 | STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7 |
501 | 434 | STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}") | 521 | STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}") |
502 | 435 | # message (STATUS "DBUSMENU_MINOR : ${DBUSMENU_MINOR}") | 522 | # message (STATUS "DBUSMENU_MINOR : ${DBUSMENU_MINOR}") |
504 | 436 | 523 | ||
505 | 437 | STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}") | 524 | STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}") |
506 | 438 | STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}") | 525 | STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}") |
507 | 439 | # message (STATUS "DBUSMENU_NANO : ${DBUSMENU_NANO}") | 526 | # message (STATUS "DBUSMENU_NANO : ${DBUSMENU_NANO}") |
512 | 440 | 527 | ||
513 | 441 | execute_process( | 528 | if ("${INDICATOR_04_FOUND}" STREQUAL "1") |
514 | 442 | COMMAND pkg-config --variable=iconsdir indicator | 529 | execute_process( |
515 | 443 | OUTPUT_VARIABLE INDICATORICONSDIR) | 530 | COMMAND pkg-config --variable=iconsdir indicator-0.4 |
516 | 531 | OUTPUT_VARIABLE INDICATORICONSDIR) | ||
517 | 532 | else() | ||
518 | 533 | execute_process( | ||
519 | 534 | COMMAND pkg-config --variable=iconsdir indicator | ||
520 | 535 | OUTPUT_VARIABLE INDICATORICONSDIR) | ||
521 | 536 | endif() | ||
522 | 444 | STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR ${INDICATORICONSDIR}) # la commande rajoute un retour chariot ... | 537 | STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR ${INDICATORICONSDIR}) # la commande rajoute un retour chariot ... |
523 | 445 | add_subdirectory (Indicator-applet) | 538 | add_subdirectory (Indicator-applet) |
524 | 446 | set (with_indicator "yes") | 539 | set (with_indicator "yes") |
525 | 540 | else() | ||
526 | 541 | message (WARNING "These modules are required to compile Indicators applet (MeMenu and Messaging-Menu): indicator(-0.4), libido-0.1, dbusmenu-glib(-0.4), dbusmenu-gtk(-0.4)") | ||
527 | 542 | set (MODULES_MISSING "${MODULES_MISSING} indicator(-0.4) libido-0.1 dbusmenu-glib(-0.4) dbusmenu-gtk(-0.4)") | ||
528 | 447 | endif() | 543 | endif() |
529 | 448 | 544 | ||
530 | 449 | ############# ILLUSION ################# | 545 | ############# ILLUSION ################# |
531 | 546 | message (STATUS "> Illusion:") | ||
532 | 450 | set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS}) | 547 | set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS}) |
533 | 451 | set (VERSION_ILLUSION "1.0.7") | 548 | set (VERSION_ILLUSION "1.0.7") |
534 | 452 | set (PACKAGE_ILLUSION "cd-illusion") | 549 | set (PACKAGE_ILLUSION "cd-illusion") |
535 | @@ -455,13 +552,75 @@ | |||
536 | 455 | add_subdirectory (illusion) | 552 | add_subdirectory (illusion) |
537 | 456 | 553 | ||
538 | 457 | ############# KDE-INTEGRATION ################# | 554 | ############# KDE-INTEGRATION ################# |
539 | 555 | message (STATUS "> KDE-Integration:") | ||
540 | 458 | set (with_kde_integration "no") | 556 | set (with_kde_integration "no") |
542 | 459 | if (NOT "${enable-kde-integration}" STREQUAL "no") | 557 | set (with_kde_integration2 "no") |
543 | 558 | if ("${enable-kde-integration2}" STREQUAL "yes") | ||
544 | 559 | #find_package(KDE4) | ||
545 | 560 | find_package(Qt4) | ||
546 | 561 | if (QT4_FOUND) | ||
547 | 562 | message (STATUS " * Qt Includes: ${QT_INCLUDES}") | ||
548 | 563 | message (STATUS " * Qt Definitions: ${QT_DEFINITIONS}") | ||
549 | 564 | message (STATUS " * QtCore Library: ${QT_QTCORE_LIBRARY} / ${PACKAGE_LIBRARIES}") | ||
550 | 565 | else() | ||
551 | 566 | message (STATUS " * Qt unavailable") | ||
552 | 567 | endif() | ||
553 | 568 | |||
554 | 569 | find_path(KDECORE_INCLUDE_DIR "kdecore_export.h") | ||
555 | 570 | find_library(KDECORE_LIBRARY NAMES "kdecore") | ||
556 | 571 | GET_FILENAME_COMPONENT(KDECORE_LIBRARY ${KDECORE_LIBRARY} PATH) | ||
557 | 572 | |||
558 | 573 | find_path(KIO_INCLUDE_DIR "kio_export.h" PATH_SUFFIXES "kio") | ||
559 | 574 | find_library(KIO_LIBRARY NAMES "kio") | ||
560 | 575 | GET_FILENAME_COMPONENT(KIO_LIBRARY ${KIO_LIBRARY} PATH) | ||
561 | 576 | |||
562 | 577 | find_path(KDE_INCLUDE_DIR "KDirWatch" PATH_SUFFIXES "KDE") | ||
563 | 578 | |||
564 | 579 | if (NOT "${KDECORE_LIBRARY}" STREQUAL "") | ||
565 | 580 | message (STATUS " * KDECORE Dir: ${KDECORE_INCLUDE_DIR}") | ||
566 | 581 | message (STATUS " * KDECORE Library: ${KDECORE_LIBRARY}") | ||
567 | 582 | else() | ||
568 | 583 | message (STATUS " * KDECORE unavailable") | ||
569 | 584 | endif() | ||
570 | 585 | if (NOT "${KIO_LIBRARY}" STREQUAL "") | ||
571 | 586 | message (STATUS " * KIO Dir: ${KIO_INCLUDE_DIR}") | ||
572 | 587 | message (STATUS " * KIO Library: ${KIO_LIBRARY}") | ||
573 | 588 | else() | ||
574 | 589 | message (STATUS " * KIO unavailable") | ||
575 | 590 | endif() | ||
576 | 591 | if (NOT "${KDE_LIBRARY}" STREQUAL "") ## always empty? | ||
577 | 592 | message (STATUS " * KDE4 Dir: ${KDE_INCLUDE_DIR}") | ||
578 | 593 | message (STATUS " * KDE4 Library: ${KDE_LIBRARY}") | ||
579 | 594 | else() | ||
580 | 595 | message (STATUS " * KDE4 unavailable") | ||
581 | 596 | endif() | ||
582 | 597 | |||
583 | 598 | if (QT4_FOUND | ||
584 | 599 | AND KDECORE_INCLUDE_DIR | ||
585 | 600 | AND KDECORE_LIBRARY | ||
586 | 601 | AND KIO_INCLUDE_DIR | ||
587 | 602 | AND KIO_LIBRARY | ||
588 | 603 | AND KDE_INCLUDE_DIR) | ||
589 | 604 | message (STATUS "KDE: OK") | ||
590 | 605 | set (VERSION_KDE_INTEGRATION "0.0.3") | ||
591 | 606 | set (PACKAGE_KDE_INTEGRATION "cd_kde-integration") | ||
592 | 607 | set (with_kde_integration2 "yes") | ||
593 | 608 | set (kde_integrationdatadir "${pluginsdatadir}/kde-integration2") | ||
594 | 609 | add_subdirectory ("kde-integration2") | ||
595 | 610 | else() | ||
596 | 611 | message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.") | ||
597 | 612 | message (STATUS "These libraries are required to compile KDE experimental applet: kdecore, kio, kde4") | ||
598 | 613 | set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} kdecore, kio, kde4") | ||
599 | 614 | endif() | ||
600 | 615 | elseif (NOT "${enable-kde-integration}" STREQUAL "no") | ||
601 | 460 | pkg_check_modules (KDE_INTEGRATION gio-2.0) | 616 | pkg_check_modules (KDE_INTEGRATION gio-2.0) |
604 | 461 | if ("${KDE_INTEGRATION_FOUND}" STREQUAL "") | 617 | message (STATUS "KDE_INTEGRATION_FOUND: ${KDE_INTEGRATION_FOUND}") |
605 | 462 | message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.") | 618 | if (NOT KDE_INTEGRATION_FOUND) |
606 | 619 | message (STATUS "Could not find gio; Cairo-Dock won't be built with KDE support.") | ||
607 | 620 | message (STATUS "This module is required to compile KDE-Integration applet: gio-2.0") | ||
608 | 621 | set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0") | ||
609 | 463 | else() | 622 | else() |
611 | 464 | set (VERSION_KDE_INTEGRATION "0.0.2") | 623 | set (VERSION_KDE_INTEGRATION "1.0.3") |
612 | 465 | set (PACKAGE_KDE_INTEGRATION "cd_kde-integration") | 624 | set (PACKAGE_KDE_INTEGRATION "cd_kde-integration") |
613 | 466 | set (with_kde_integration "yes") | 625 | set (with_kde_integration "yes") |
614 | 467 | set (kde_integrationdatadir "${pluginsdatadir}/kde-integration") | 626 | set (kde_integrationdatadir "${pluginsdatadir}/kde-integration") |
615 | @@ -470,13 +629,16 @@ | |||
616 | 470 | endif() | 629 | endif() |
617 | 471 | 630 | ||
618 | 472 | ############# KEYBOARD_INDICATOR ################# | 631 | ############# KEYBOARD_INDICATOR ################# |
619 | 632 | message (STATUS "> Keyboard-Indicator:") | ||
620 | 473 | set (with_keyboard_indicator "no") | 633 | set (with_keyboard_indicator "no") |
621 | 474 | pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier) | 634 | pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier) |
622 | 475 | if ("${KEYBOARD_INDICATOR_PACKAGE_FOUND}" STREQUAL "") | 635 | if ("${KEYBOARD_INDICATOR_PACKAGE_FOUND}" STREQUAL "") |
623 | 476 | message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.") | 636 | message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.") |
624 | 637 | message (WARNING "This module is required to compile Keyboard-Indicator applet: libxklavier") | ||
625 | 638 | set (MODULES_MISSING "${MODULES_MISSING} libxklavier") | ||
626 | 477 | else() | 639 | else() |
627 | 478 | set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS}) | 640 | set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS}) |
629 | 479 | set (VERSION_KEYBOARD_INDICATOR "1.1.3") | 641 | set (VERSION_KEYBOARD_INDICATOR "1.1.4") |
630 | 480 | set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator") | 642 | set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator") |
631 | 481 | set (with_keyboard_indicator "yes") | 643 | set (with_keyboard_indicator "yes") |
632 | 482 | set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator") | 644 | set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator") |
633 | @@ -485,20 +647,32 @@ | |||
634 | 485 | endif() | 647 | endif() |
635 | 486 | 648 | ||
636 | 487 | ############# LOGOUT ################# | 649 | ############# LOGOUT ################# |
637 | 650 | message (STATUS "> LogOut:") | ||
638 | 651 | pkg_check_modules (UPOWER upower-glib) # useful for Powermanager too. | ||
639 | 652 | if (${UPOWER_FOUND}) | ||
640 | 653 | set (with_upower_support "yes") | ||
641 | 654 | else() | ||
642 | 655 | set (with_upower_support "no") | ||
643 | 656 | message (STATUS "Could not find upower-glib; LogOut and PowerManager plugin won't be built with UPower support.") | ||
644 | 657 | message (WARNING "This module is required to compile LogOut and PowerManager applet with UPower support: upower-glib") | ||
645 | 658 | set (MODULES_MISSING "${MODULES_MISSING} upower-glib") | ||
646 | 659 | endif() | ||
647 | 488 | set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS}) | 660 | set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS}) |
649 | 489 | set (VERSION_LOGOUT "1.2.10") | 661 | set (VERSION_LOGOUT "1.2.11") |
650 | 490 | set (PACKAGE_LOGOUT "cd-logout") | 662 | set (PACKAGE_LOGOUT "cd-logout") |
651 | 491 | set (logoutdatadir "${pluginsdatadir}/logout") | 663 | set (logoutdatadir "${pluginsdatadir}/logout") |
652 | 492 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf) | 664 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf) |
653 | 493 | add_subdirectory (logout) | 665 | add_subdirectory (logout) |
654 | 494 | 666 | ||
655 | 495 | ############# MAIL ################# | 667 | ############# MAIL ################# |
656 | 668 | message (STATUS "> Mail:") | ||
657 | 496 | set (with_mail "no") | 669 | set (with_mail "no") |
658 | 497 | # find the compilation flags | 670 | # find the compilation flags |
659 | 671 | find_program (LIBETPAN_CONFIG_EXECUTABLE libetpan-config) | ||
660 | 498 | execute_process( | 672 | execute_process( |
662 | 499 | COMMAND libetpan-config --cflags | 673 | COMMAND ${LIBETPAN_CONFIG_EXECUTABLE} --cflags |
663 | 500 | OUTPUT_VARIABLE MAIL_PACKAGE_CFLAGS) | 674 | OUTPUT_VARIABLE MAIL_PACKAGE_CFLAGS) |
665 | 501 | if (NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "") # if we don't want to use it, we don't want to have an error | 675 | if (NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "") # if there is a problem with the previous, we don't want to have a lot of errors |
666 | 502 | STRING (REGEX MATCHALL "-I[^ ]+ " TMP_VARIABLE "${MAIL_PACKAGE_CFLAGS}") # first extract the "-I" options | 676 | STRING (REGEX MATCHALL "-I[^ ]+ " TMP_VARIABLE "${MAIL_PACKAGE_CFLAGS}") # first extract the "-I" options |
667 | 503 | STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}") | 677 | STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}") |
668 | 504 | STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}") | 678 | STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}") |
669 | @@ -506,7 +680,7 @@ | |||
670 | 506 | endif() | 680 | endif() |
671 | 507 | # find the link flags | 681 | # find the link flags |
672 | 508 | execute_process( | 682 | execute_process( |
674 | 509 | COMMAND libetpan-config --libs | 683 | COMMAND ${LIBETPAN_CONFIG_EXECUTABLE} --libs |
675 | 510 | OUTPUT_VARIABLE MAIL_PACKAGE_LIBS) | 684 | OUTPUT_VARIABLE MAIL_PACKAGE_LIBS) |
676 | 511 | if (NOT "${MAIL_PACKAGE_LIBS}" STREQUAL "") | 685 | if (NOT "${MAIL_PACKAGE_LIBS}" STREQUAL "") |
677 | 512 | # find the link libraries | 686 | # find the link libraries |
678 | @@ -521,13 +695,15 @@ | |||
679 | 521 | endif() | 695 | endif() |
680 | 522 | if ("${MAIL_PACKAGE_LIBS}" STREQUAL "") | 696 | if ("${MAIL_PACKAGE_LIBS}" STREQUAL "") |
681 | 523 | message (STATUS "warning : Could not find libetpan; Cairo-Dock won't be built with Mail applet.") | 697 | message (STATUS "warning : Could not find libetpan; Cairo-Dock won't be built with Mail applet.") |
682 | 698 | message (WARNING "This module is required to compile Mail applet: libetpan") | ||
683 | 699 | set (PROGRAMS_MISSING "${PROGRAMS_MISSING} libetpan-config") | ||
684 | 524 | else() | 700 | else() |
685 | 525 | message (STATUS "libetpan found. Using the following options:") | 701 | message (STATUS "libetpan found. Using the following options:") |
686 | 526 | message (STATUS " Include directories: ${MAIL_PACKAGE_INCLUDE_DIRS}") | 702 | message (STATUS " Include directories: ${MAIL_PACKAGE_INCLUDE_DIRS}") |
687 | 527 | message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}") | 703 | message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}") |
688 | 528 | message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}") | 704 | message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}") |
689 | 529 | set (GETTEXT_MAIL ${GETTEXT_PLUGINS}) | 705 | set (GETTEXT_MAIL ${GETTEXT_PLUGINS}) |
691 | 530 | set (VERSION_MAIL "1.0.8") | 706 | set (VERSION_MAIL "1.0.9") |
692 | 531 | set (PACKAGE_MAIL "cd-mail") | 707 | set (PACKAGE_MAIL "cd-mail") |
693 | 532 | set (maildatadir "${pluginsdatadir}/mail") | 708 | set (maildatadir "${pluginsdatadir}/mail") |
694 | 533 | set (with_mail "yes") | 709 | set (with_mail "yes") |
695 | @@ -535,7 +711,8 @@ | |||
696 | 535 | add_subdirectory ("mail") | 711 | add_subdirectory ("mail") |
697 | 536 | endif() | 712 | endif() |
698 | 537 | 713 | ||
700 | 538 | ############# MEMENU ################# | 714 | ############# DISTRIBUTION ################# |
701 | 715 | message (STATUS "> Distribution:") | ||
702 | 539 | # We try to detect if the user is on Ubuntu to know which bus we have to use... | 716 | # We try to detect if the user is on Ubuntu to know which bus we have to use... |
703 | 540 | execute_process( | 717 | execute_process( |
704 | 541 | COMMAND lsb_release -i | 718 | COMMAND lsb_release -i |
705 | @@ -573,11 +750,17 @@ | |||
706 | 573 | endif() | 750 | endif() |
707 | 574 | endif() | 751 | endif() |
708 | 575 | 752 | ||
709 | 576 | set (INDICATOR_OLD_NAMES 0) | ||
710 | 577 | if (NOT "${DISTRO_ID}" STREQUAL "") | 753 | if (NOT "${DISTRO_ID}" STREQUAL "") |
711 | 578 | message (STATUS "DISTRO_ID: ${DISTRO_ID}, DISTRO_RELEASE: ${DISTRO_RELEASE}") | 754 | message (STATUS "DISTRO_ID: ${DISTRO_ID}, DISTRO_RELEASE: ${DISTRO_RELEASE}") |
712 | 579 | endif() | 755 | endif() |
714 | 580 | if ("${DISTRO_ID}" STREQUAL "Ubuntu") | 756 | |
715 | 757 | ############# INDICATOR_NAME ################# | ||
716 | 758 | message (STATUS "> Indicator Names:") | ||
717 | 759 | set (INDICATOR_OLD_NAMES 0) | ||
718 | 760 | if ("${force_old_indicator_names}" STREQUAL "yes") | ||
719 | 761 | set (INDICATOR_OLD_NAMES 1) | ||
720 | 762 | message (STATUS "Indicators: use old Ayatana Dbus names (forced)") | ||
721 | 763 | elseif ("${DISTRO_ID}" STREQUAL "Ubuntu") | ||
722 | 581 | STRING (REGEX REPLACE "\\..*" "" DISTRO_RELEASE_MAJOR ${DISTRO_RELEASE}) | 764 | STRING (REGEX REPLACE "\\..*" "" DISTRO_RELEASE_MAJOR ${DISTRO_RELEASE}) |
723 | 582 | # message (STATUS "DISTRO_RELEASE_MAJOR: ${DISTRO_RELEASE_MAJOR}") | 765 | # message (STATUS "DISTRO_RELEASE_MAJOR: ${DISTRO_RELEASE_MAJOR}") |
724 | 583 | if (${DISTRO_RELEASE_MAJOR} LESS 11) # from 11.04, new names are used. | 766 | if (${DISTRO_RELEASE_MAJOR} LESS 11) # from 11.04, new names are used. |
725 | @@ -586,10 +769,12 @@ | |||
726 | 586 | endif() | 769 | endif() |
727 | 587 | endif() | 770 | endif() |
728 | 588 | 771 | ||
729 | 772 | ############# MEMENU ################# | ||
730 | 589 | set (with_me_menu "no") | 773 | set (with_me_menu "no") |
731 | 590 | if ("${with_indicator}" STREQUAL "yes") | 774 | if ("${with_indicator}" STREQUAL "yes") |
732 | 775 | message (STATUS "> MeMenu:") | ||
733 | 591 | set (GETTEXT_MEMENU ${GETTEXT_PLUGINS}) | 776 | set (GETTEXT_MEMENU ${GETTEXT_PLUGINS}) |
735 | 592 | set (VERSION_MEMENU "1.0.1") | 777 | set (VERSION_MEMENU "1.0.2") |
736 | 593 | set (PACKAGE_MEMENU "cd-MeMenu") | 778 | set (PACKAGE_MEMENU "cd-MeMenu") |
737 | 594 | set (memenudatadir "${pluginsdatadir}/MeMenu") | 779 | set (memenudatadir "${pluginsdatadir}/MeMenu") |
738 | 595 | set (with_me_menu "yes") | 780 | set (with_me_menu "yes") |
739 | @@ -600,8 +785,9 @@ | |||
740 | 600 | ############# MESSAGING_MENU ################# | 785 | ############# MESSAGING_MENU ################# |
741 | 601 | set (with_messaging_menu "no") | 786 | set (with_messaging_menu "no") |
742 | 602 | if ("${with_indicator}" STREQUAL "yes") | 787 | if ("${with_indicator}" STREQUAL "yes") |
743 | 788 | message (STATUS "> Messaging-Menu:") | ||
744 | 603 | set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS}) | 789 | set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS}) |
746 | 604 | set (VERSION_MESSAGING_MENU "1.0.1") | 790 | set (VERSION_MESSAGING_MENU "1.0.2") |
747 | 605 | set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu") | 791 | set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu") |
748 | 606 | set (with_messaging_menu "yes") | 792 | set (with_messaging_menu "yes") |
749 | 607 | set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu") | 793 | set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu") |
750 | @@ -610,6 +796,7 @@ | |||
751 | 610 | endif() | 796 | endif() |
752 | 611 | 797 | ||
753 | 612 | ############# MOTION BLUR ################# | 798 | ############# MOTION BLUR ################# |
754 | 799 | message (STATUS "> Motion Blur:") | ||
755 | 613 | set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS}) | 800 | set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS}) |
756 | 614 | set (VERSION_MOTION_BLUR "1.0.4") | 801 | set (VERSION_MOTION_BLUR "1.0.4") |
757 | 615 | set (PACKAGE_MOTION_BLUR "cd-motion_blur") | 802 | set (PACKAGE_MOTION_BLUR "cd-motion_blur") |
758 | @@ -618,16 +805,18 @@ | |||
759 | 618 | add_subdirectory (motion-blur) | 805 | add_subdirectory (motion-blur) |
760 | 619 | 806 | ||
761 | 620 | ############# MUSICPLAYER ################# | 807 | ############# MUSICPLAYER ################# |
762 | 808 | message (STATUS "> MusicPlayer:") | ||
763 | 621 | set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS}) | 809 | set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS}) |
765 | 622 | set (VERSION_MUSICPLAYER "1.0.7") | 810 | set (VERSION_MUSICPLAYER "1.0.8") |
766 | 623 | set (PACKAGE_MUSICPLAYER "cd-musicPlayer") | 811 | set (PACKAGE_MUSICPLAYER "cd-musicPlayer") |
767 | 624 | set (musicplayerdatadir "${pluginsdatadir}/musicPlayer") | 812 | set (musicplayerdatadir "${pluginsdatadir}/musicPlayer") |
768 | 625 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf) | 813 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf) |
769 | 626 | add_subdirectory (musicPlayer) | 814 | add_subdirectory (musicPlayer) |
770 | 627 | 815 | ||
771 | 628 | ############# NETSPEED ################# | 816 | ############# NETSPEED ################# |
772 | 817 | message (STATUS "> NetSpeed:") | ||
773 | 629 | set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS}) | 818 | set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS}) |
775 | 630 | set (VERSION_NETSPEED "1.2.5") | 819 | set (VERSION_NETSPEED "1.2.6") |
776 | 631 | set (PACKAGE_NETSPEED "cd-netspeed") | 820 | set (PACKAGE_NETSPEED "cd-netspeed") |
777 | 632 | set (netspeeddatadir "${pluginsdatadir}/netspeed") | 821 | set (netspeeddatadir "${pluginsdatadir}/netspeed") |
778 | 633 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf) | 822 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf) |
779 | @@ -636,8 +825,9 @@ | |||
780 | 636 | ############# NETWORK_MONITOR ################# | 825 | ############# NETWORK_MONITOR ################# |
781 | 637 | set (with_network_monitor "no") | 826 | set (with_network_monitor "no") |
782 | 638 | if ("${enable-network-monitor}" STREQUAL "yes") | 827 | if ("${enable-network-monitor}" STREQUAL "yes") |
783 | 828 | message (STATUS "> Network Monitor:") | ||
784 | 639 | set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS}) | 829 | set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS}) |
786 | 640 | set (VERSION_NETWORK_MONITOR "0.2.3") | 830 | set (VERSION_NETWORK_MONITOR "0.2.4") |
787 | 641 | set (PACKAGE_NETWORK_MONITOR "cd-network-monitor") | 831 | set (PACKAGE_NETWORK_MONITOR "cd-network-monitor") |
788 | 642 | set (with_network_monitor "yes") | 832 | set (with_network_monitor "yes") |
789 | 643 | set (network_monitordatadir "${pluginsdatadir}/Network-Monitor") | 833 | set (network_monitordatadir "${pluginsdatadir}/Network-Monitor") |
790 | @@ -646,29 +836,34 @@ | |||
791 | 646 | endif() | 836 | endif() |
792 | 647 | 837 | ||
793 | 648 | ############# POWERMANAGER ################# | 838 | ############# POWERMANAGER ################# |
794 | 839 | message (STATUS "> PowerManager:") | ||
795 | 649 | set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS}) | 840 | set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS}) |
797 | 650 | set (VERSION_POWERMANAGER "1.3.4") | 841 | set (VERSION_POWERMANAGER "1.3.5") |
798 | 651 | set (PACKAGE_POWERMANAGER "cd-powermanager") | 842 | set (PACKAGE_POWERMANAGER "cd-powermanager") |
799 | 652 | set (powermanagerdatadir "${pluginsdatadir}/powermanager") | 843 | set (powermanagerdatadir "${pluginsdatadir}/powermanager") |
800 | 653 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf) | 844 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf) |
801 | 654 | add_subdirectory (powermanager) | 845 | add_subdirectory (powermanager) |
802 | 655 | 846 | ||
803 | 656 | ############# QUICK BROWSER ################# | 847 | ############# QUICK BROWSER ################# |
804 | 848 | message (STATUS "> Quick Browser:") | ||
805 | 657 | set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS}) | 849 | set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS}) |
807 | 658 | set (VERSION_QUICK_BROWSER "1.0.8") | 850 | set (VERSION_QUICK_BROWSER "1.0.9") |
808 | 659 | set (PACKAGE_QUICK_BROWSER "cd-quick-browser") | 851 | set (PACKAGE_QUICK_BROWSER "cd-quick-browser") |
809 | 660 | set (quick_browserdatadir "${pluginsdatadir}/quick_browser") | 852 | set (quick_browserdatadir "${pluginsdatadir}/quick_browser") |
810 | 661 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf) | 853 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf) |
811 | 662 | add_subdirectory (quick-browser) | 854 | add_subdirectory (quick-browser) |
812 | 663 | 855 | ||
813 | 664 | ############# RECENT-EVENTS ################# | 856 | ############# RECENT-EVENTS ################# |
814 | 857 | message (STATUS "> Recent-Events:") | ||
815 | 665 | set (with_recent_events "no") | 858 | set (with_recent_events "no") |
816 | 666 | pkg_check_modules (RECENT_EVENTS zeitgeist-1.0) | 859 | pkg_check_modules (RECENT_EVENTS zeitgeist-1.0) |
817 | 667 | if ("${RECENT_EVENTS_FOUND}" STREQUAL "") | 860 | if ("${RECENT_EVENTS_FOUND}" STREQUAL "") |
818 | 668 | message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.") | 861 | message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.") |
819 | 862 | message (WARNING "This module is required to compile Recent-Events applet: zeitgeist-1.0") | ||
820 | 863 | set (MODULES_MISSING "${MODULES_MISSING} zeitgeist-1.0") | ||
821 | 669 | else() | 864 | else() |
822 | 670 | set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS}) | 865 | set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS}) |
824 | 671 | set (VERSION_RECENT_EVENTS "0.0.2") | 866 | set (VERSION_RECENT_EVENTS "1.0.0") |
825 | 672 | set (PACKAGE_RECENT_EVENTS "cd-Recent-Events") | 867 | set (PACKAGE_RECENT_EVENTS "cd-Recent-Events") |
826 | 673 | set (with_recent_events "yes") | 868 | set (with_recent_events "yes") |
827 | 674 | set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events") | 869 | set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events") |
828 | @@ -677,6 +872,7 @@ | |||
829 | 677 | endif() | 872 | endif() |
830 | 678 | 873 | ||
831 | 679 | ############# REMOTE_CONTROL ################# | 874 | ############# REMOTE_CONTROL ################# |
832 | 875 | message (STATUS "> Remote Control:") | ||
833 | 680 | set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS}) | 876 | set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS}) |
834 | 681 | set (VERSION_REMOTE_CONTROL "0.0.2") | 877 | set (VERSION_REMOTE_CONTROL "0.0.2") |
835 | 682 | set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control") | 878 | set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control") |
836 | @@ -685,8 +881,9 @@ | |||
837 | 685 | add_subdirectory (Remote-Control) | 881 | add_subdirectory (Remote-Control) |
838 | 686 | 882 | ||
839 | 687 | ############# RSSREADER ################# | 883 | ############# RSSREADER ################# |
840 | 884 | message (STATUS "> RSSreader:") | ||
841 | 688 | set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS}) | 885 | set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS}) |
843 | 689 | set (VERSION_RSS_READER "1.0.3") | 886 | set (VERSION_RSS_READER "1.0.4") |
844 | 690 | set (PACKAGE_RSS_READER "cd-rssreader") | 887 | set (PACKAGE_RSS_READER "cd-rssreader") |
845 | 691 | set (rss_readerdatadir "${pluginsdatadir}/RSSreader") | 888 | set (rss_readerdatadir "${pluginsdatadir}/RSSreader") |
846 | 692 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf) | 889 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf) |
847 | @@ -695,6 +892,7 @@ | |||
848 | 695 | ############# SCOOBY_DO ################# | 892 | ############# SCOOBY_DO ################# |
849 | 696 | set (with_scooby_do "no") | 893 | set (with_scooby_do "no") |
850 | 697 | if ("${enable-scooby-do}" STREQUAL "yes") | 894 | if ("${enable-scooby-do}" STREQUAL "yes") |
851 | 895 | message (STATUS "> Scooby-Do:") | ||
852 | 698 | set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS}) | 896 | set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS}) |
853 | 699 | set (VERSION_SCOOBY_DO "0.1.1") | 897 | set (VERSION_SCOOBY_DO "0.1.1") |
854 | 700 | set (PACKAGE_SCOOBY_DO "cd-scooby-do") | 898 | set (PACKAGE_SCOOBY_DO "cd-scooby-do") |
855 | @@ -704,29 +902,38 @@ | |||
856 | 704 | add_subdirectory (Scooby-Do) | 902 | add_subdirectory (Scooby-Do) |
857 | 705 | endif() | 903 | endif() |
858 | 706 | 904 | ||
859 | 905 | ############# SHARED-IMAGES ################# | ||
860 | 906 | set (shared_imagesdatadir "${pluginsdatadir}/shared-images") | ||
861 | 907 | add_subdirectory (shared-images) | ||
862 | 908 | |||
863 | 707 | ############# SHORTCUTS ################# | 909 | ############# SHORTCUTS ################# |
864 | 910 | message (STATUS "> Shortcuts:") | ||
865 | 708 | set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS}) | 911 | set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS}) |
867 | 709 | set (VERSION_SHORTCUTS "1.3.1") | 912 | set (VERSION_SHORTCUTS "1.3.2") |
868 | 710 | set (PACKAGE_SHORTCUTS "cd-shortcuts") | 913 | set (PACKAGE_SHORTCUTS "cd-shortcuts") |
869 | 711 | set (shortcutsdatadir "${pluginsdatadir}/shortcuts") | 914 | set (shortcutsdatadir "${pluginsdatadir}/shortcuts") |
870 | 712 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf) | 915 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf) |
871 | 713 | add_subdirectory (shortcuts) | 916 | add_subdirectory (shortcuts) |
872 | 714 | 917 | ||
873 | 715 | ############# SHOW DESKTOP ################# | 918 | ############# SHOW DESKTOP ################# |
874 | 919 | message (STATUS "> ShowDesktop:") | ||
875 | 716 | set (with_xrandr "yes") | 920 | set (with_xrandr "yes") |
876 | 717 | pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr) | 921 | pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr) |
877 | 718 | if ("${SHOW_DESKTOP_XRANDR_FOUND}" STREQUAL "") | 922 | if ("${SHOW_DESKTOP_XRANDR_FOUND}" STREQUAL "") |
878 | 719 | message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.") | 923 | message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.") |
879 | 924 | message (WARNING "This module is required to compile ShowDesktop applet with xRandr support: xrandr") | ||
880 | 925 | set (MODULES_MISSING "${MODULES_MISSING} xrandr") | ||
881 | 720 | set (with_xrandr "no") | 926 | set (with_xrandr "no") |
882 | 721 | endif() | 927 | endif() |
883 | 722 | set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS}) | 928 | set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS}) |
885 | 723 | set (VERSION_SHOW_DESKTOP "1.2.4") | 929 | set (VERSION_SHOW_DESKTOP "1.2.5") |
886 | 724 | set (PACKAGE_SHOW_DESKTOP "cd-showDesktop") | 930 | set (PACKAGE_SHOW_DESKTOP "cd-showDesktop") |
887 | 725 | set (show_desktopdatadir "${pluginsdatadir}/showDesktop") | 931 | set (show_desktopdatadir "${pluginsdatadir}/showDesktop") |
888 | 726 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf) | 932 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf) |
889 | 727 | add_subdirectory (showDesktop) | 933 | add_subdirectory (showDesktop) |
890 | 728 | 934 | ||
891 | 729 | ############# SHOW MOUSE ################# | 935 | ############# SHOW MOUSE ################# |
892 | 936 | message (STATUS "> Show Mouse:") | ||
893 | 730 | set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS}) | 937 | set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS}) |
894 | 731 | set (VERSION_SHOW_MOUSE "1.0.4") | 938 | set (VERSION_SHOW_MOUSE "1.0.4") |
895 | 732 | set (PACKAGE_SHOW_MOUSE "cd-show_mouse") | 939 | set (PACKAGE_SHOW_MOUSE "cd-show_mouse") |
896 | @@ -735,33 +942,41 @@ | |||
897 | 735 | add_subdirectory (show-mouse) | 942 | add_subdirectory (show-mouse) |
898 | 736 | 943 | ||
899 | 737 | ############# SLIDER ################# | 944 | ############# SLIDER ################# |
900 | 945 | message (STATUS "> Slider:") | ||
901 | 738 | set (with_exif "yes") | 946 | set (with_exif "yes") |
902 | 739 | pkg_check_modules (EXIF libexif) | 947 | pkg_check_modules (EXIF libexif) |
903 | 740 | if ("${EXIF_FOUND}" STREQUAL "") | 948 | if ("${EXIF_FOUND}" STREQUAL "") |
904 | 741 | message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.") | 949 | message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.") |
905 | 950 | message (WARNING "This module is required to compile Slider applet with Exif support: libexif") | ||
906 | 951 | set (MODULES_MISSING "${MODULES_MISSING} libexif") | ||
907 | 742 | set (with_exif "no") | 952 | set (with_exif "no") |
908 | 743 | endif() | 953 | endif() |
909 | 744 | set (GETTEXT_SLIDER ${GETTEXT_PLUGINS}) | 954 | set (GETTEXT_SLIDER ${GETTEXT_PLUGINS}) |
911 | 745 | set (VERSION_SLIDER "2.0.8") | 955 | set (VERSION_SLIDER "2.0.9") |
912 | 746 | set (PACKAGE_SLIDER "cd-slider") | 956 | set (PACKAGE_SLIDER "cd-slider") |
913 | 747 | set (sliderdatadir "${pluginsdatadir}/slider") | 957 | set (sliderdatadir "${pluginsdatadir}/slider") |
914 | 748 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf) | 958 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf) |
915 | 749 | add_subdirectory (slider) | 959 | add_subdirectory (slider) |
916 | 750 | 960 | ||
917 | 751 | ############# STACK ################# | 961 | ############# STACK ################# |
918 | 962 | message (STATUS "> Stack:") | ||
919 | 752 | set (GETTEXT_STACK ${GETTEXT_PLUGINS}) | 963 | set (GETTEXT_STACK ${GETTEXT_PLUGINS}) |
921 | 753 | set (VERSION_STACK "0.3.1") | 964 | set (VERSION_STACK "0.3.2") |
922 | 754 | set (PACKAGE_STACK "cd-stack") | 965 | set (PACKAGE_STACK "cd-stack") |
923 | 755 | set (stackdatadir "${pluginsdatadir}/stack") | 966 | set (stackdatadir "${pluginsdatadir}/stack") |
924 | 756 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf) | 967 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf) |
925 | 757 | add_subdirectory (stack) | 968 | add_subdirectory (stack) |
926 | 758 | 969 | ||
927 | 759 | ############# STATUS NOTIFIER ################# | 970 | ############# STATUS NOTIFIER ################# |
928 | 971 | message (STATUS "> Status Notifier:") | ||
929 | 760 | if ("${DBUSMENU_GTK_FOUND}" STREQUAL "") | 972 | if ("${DBUSMENU_GTK_FOUND}" STREQUAL "") |
930 | 761 | message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.") | 973 | message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.") |
931 | 974 | message (WARNING "This module is required to compile Status Notifier applet: dbusmenu-gtk(-0.4)") | ||
932 | 975 | # set (MODULES_MISSING "${MODULES_MISSING} dbusmenu-gtk(-0.4)") # it should already be in the list. | ||
933 | 976 | set (with_status_notifier "no") | ||
934 | 762 | else() | 977 | else() |
935 | 763 | set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS}) | 978 | set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS}) |
937 | 764 | set (VERSION_STATUS_NOTIFIER "0.1.3") | 979 | set (VERSION_STATUS_NOTIFIER "0.1.4") |
938 | 765 | set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier") | 980 | set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier") |
939 | 766 | set (with_status_notifier "yes") | 981 | set (with_status_notifier "yes") |
940 | 767 | set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier") | 982 | set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier") |
941 | @@ -770,43 +985,51 @@ | |||
942 | 770 | endif() | 985 | endif() |
943 | 771 | 986 | ||
944 | 772 | ############# SWITCHER ################# | 987 | ############# SWITCHER ################# |
945 | 988 | message (STATUS "> Switcher:") | ||
946 | 773 | set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS}) | 989 | set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS}) |
948 | 774 | set (VERSION_SWITCHER "2.1.6") | 990 | set (VERSION_SWITCHER "2.1.7") |
949 | 775 | set (PACKAGE_SWITCHER "cd-switcher") | 991 | set (PACKAGE_SWITCHER "cd-switcher") |
950 | 776 | set (switcherdatadir "${pluginsdatadir}/switcher") | 992 | set (switcherdatadir "${pluginsdatadir}/switcher") |
951 | 777 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf) | 993 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf) |
952 | 778 | add_subdirectory (switcher) | 994 | add_subdirectory (switcher) |
953 | 779 | 995 | ||
954 | 780 | ############# SYSTEM MONITOR ################# | 996 | ############# SYSTEM MONITOR ################# |
955 | 997 | message (STATUS "> System Monitor:") | ||
956 | 781 | set (with_sensors "yes") | 998 | set (with_sensors "yes") |
957 | 782 | find_package (Sensors) | 999 | find_package (Sensors) |
958 | 783 | if (NOT "${SENSORS_FOUND}" STREQUAL "TRUE") | 1000 | if (NOT "${SENSORS_FOUND}" STREQUAL "TRUE") |
959 | 784 | message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.") | 1001 | message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.") |
960 | 1002 | message (WARNING "This package is required to compile System Monitor applet with Sensors support: sensors") | ||
961 | 1003 | set (PROGRAMS_MISSING "${PROGRAMS_MISSING} sensors") | ||
962 | 785 | set (with_sensors "no") | 1004 | set (with_sensors "no") |
963 | 786 | endif() | 1005 | endif() |
964 | 787 | set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS}) | 1006 | set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS}) |
966 | 788 | set (VERSION_SYSTEM_MONITOR "1.0.6") | 1007 | set (VERSION_SYSTEM_MONITOR "1.0.7") |
967 | 789 | set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor") | 1008 | set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor") |
968 | 790 | set (system_monitordatadir "${pluginsdatadir}/System-monitor") | 1009 | set (system_monitordatadir "${pluginsdatadir}/System-monitor") |
969 | 791 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf) | 1010 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf) |
970 | 792 | add_subdirectory (System-Monitor) | 1011 | add_subdirectory (System-Monitor) |
971 | 793 | 1012 | ||
972 | 794 | ############# SYSTRAY ################# | 1013 | ############# SYSTRAY ################# |
973 | 1014 | message (STATUS "> Systray:") | ||
974 | 795 | set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS}) | 1015 | set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS}) |
976 | 796 | set (VERSION_SYSTRAY "0.2.2") | 1016 | set (VERSION_SYSTRAY "0.2.3") |
977 | 797 | set (PACKAGE_SYSTRAY "cd-systray") | 1017 | set (PACKAGE_SYSTRAY "cd-systray") |
978 | 798 | set (systraydatadir "${pluginsdatadir}/systray") | 1018 | set (systraydatadir "${pluginsdatadir}/systray") |
979 | 799 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf) | 1019 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf) |
980 | 800 | add_subdirectory (systray) | 1020 | add_subdirectory (systray) |
981 | 801 | 1021 | ||
982 | 802 | ############# TERMINAL ################# | 1022 | ############# TERMINAL ################# |
983 | 1023 | message (STATUS "> Terminal:") | ||
984 | 803 | pkg_check_modules (TERMINAL_PACKAGE vte) | 1024 | pkg_check_modules (TERMINAL_PACKAGE vte) |
985 | 804 | if ("${TERMINAL_PACKAGE_FOUND}" STREQUAL "") | 1025 | if ("${TERMINAL_PACKAGE_FOUND}" STREQUAL "") |
986 | 805 | message (STATUS "Could not find libvte; Cairo-Dock won't be built with terminal applet.") | 1026 | message (STATUS "Could not find libvte; Cairo-Dock won't be built with terminal applet.") |
987 | 1027 | message (WARNING "This module is required to compile Terminal applet: vte") | ||
988 | 1028 | set (MODULES_MISSING "${MODULES_MISSING} vte") | ||
989 | 806 | set (with_terminal "no") | 1029 | set (with_terminal "no") |
990 | 807 | else() | 1030 | else() |
991 | 808 | set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS}) | 1031 | set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS}) |
993 | 809 | set (VERSION_TERMINAL "1.0.10") | 1032 | set (VERSION_TERMINAL "1.0.11") |
994 | 810 | set (PACKAGE_TERMINAL "cd-terminal") | 1033 | set (PACKAGE_TERMINAL "cd-terminal") |
995 | 811 | set (with_terminal "yes") | 1034 | set (with_terminal "yes") |
996 | 812 | set (terminaldatadir "${pluginsdatadir}/terminal") | 1035 | set (terminaldatadir "${pluginsdatadir}/terminal") |
997 | @@ -815,16 +1038,18 @@ | |||
998 | 815 | endif() | 1038 | endif() |
999 | 816 | 1039 | ||
1000 | 817 | ############# TOMBOY ################# | 1040 | ############# TOMBOY ################# |
1001 | 1041 | message (STATUS "> Tomboy:") | ||
1002 | 818 | set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS}) | 1042 | set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS}) |
1004 | 819 | set (VERSION_TOMBOY "1.3.1") | 1043 | set (VERSION_TOMBOY "1.3.2") |
1005 | 820 | set (PACKAGE_TOMBOY "cd-tomboy") | 1044 | set (PACKAGE_TOMBOY "cd-tomboy") |
1006 | 821 | set (tomboydatadir "${pluginsdatadir}/tomboy") | 1045 | set (tomboydatadir "${pluginsdatadir}/tomboy") |
1007 | 822 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf) | 1046 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf) |
1008 | 823 | add_subdirectory (tomboy) | 1047 | add_subdirectory (tomboy) |
1009 | 824 | 1048 | ||
1010 | 825 | ############# TOONS ################# | 1049 | ############# TOONS ################# |
1011 | 1050 | message (STATUS "> Toons:") | ||
1012 | 826 | set (GETTEXT_TOONS ${GETTEXT_PLUGINS}) | 1051 | set (GETTEXT_TOONS ${GETTEXT_PLUGINS}) |
1014 | 827 | set (VERSION_TOONS "1.0.8") | 1052 | set (VERSION_TOONS "1.0.9") |
1015 | 828 | set (PACKAGE_TOONS "cd-Toons") | 1053 | set (PACKAGE_TOONS "cd-Toons") |
1016 | 829 | set (toonsdatadir "${pluginsdatadir}/Toons") | 1054 | set (toonsdatadir "${pluginsdatadir}/Toons") |
1017 | 830 | set (toonsuserdirname "Toons") | 1055 | set (toonsuserdirname "Toons") |
1018 | @@ -832,8 +1057,9 @@ | |||
1019 | 832 | add_subdirectory (Toons) | 1057 | add_subdirectory (Toons) |
1020 | 833 | 1058 | ||
1021 | 834 | ############# WEATHER ################# | 1059 | ############# WEATHER ################# |
1022 | 1060 | message (STATUS "> Weather:") | ||
1023 | 835 | set (GETTEXT_WEATHER ${GETTEXT_PLUGINS}) | 1061 | set (GETTEXT_WEATHER ${GETTEXT_PLUGINS}) |
1025 | 836 | set (VERSION_WEATHER "1.2.10") | 1062 | set (VERSION_WEATHER "1.2.11") |
1026 | 837 | set (PACKAGE_WEATHER "cd-weather") | 1063 | set (PACKAGE_WEATHER "cd-weather") |
1027 | 838 | set (weatherdatadir "${pluginsdatadir}/weather") | 1064 | set (weatherdatadir "${pluginsdatadir}/weather") |
1028 | 839 | set (weatheruserdirname "weather") | 1065 | set (weatheruserdirname "weather") |
1029 | @@ -841,14 +1067,17 @@ | |||
1030 | 841 | add_subdirectory (weather) | 1067 | add_subdirectory (weather) |
1031 | 842 | 1068 | ||
1032 | 843 | ############# WEBLETS ################# | 1069 | ############# WEBLETS ################# |
1033 | 1070 | message (STATUS "> Weblets:") | ||
1034 | 844 | set (with_weblets "no") | 1071 | set (with_weblets "no") |
1035 | 845 | if (NOT "${enable-weblets}" STREQUAL "no") | 1072 | if (NOT "${enable-weblets}" STREQUAL "no") |
1036 | 846 | pkg_check_modules (WEBKIT webkit-1.0) | 1073 | pkg_check_modules (WEBKIT webkit-1.0) |
1037 | 847 | if ("${WEBKIT_FOUND}" STREQUAL "") | 1074 | if ("${WEBKIT_FOUND}" STREQUAL "") |
1038 | 848 | message (STATUS "Could not find webkit-1.0; Cairo-Dock won't be built with Weblets applet.") | 1075 | message (STATUS "Could not find webkit-1.0; Cairo-Dock won't be built with Weblets applet.") |
1039 | 1076 | message (WARNING "This module is required to compile Weblets applet: webkit-1.0") | ||
1040 | 1077 | set (MODULES_MISSING "${MODULES_MISSING} webkit-1.0") | ||
1041 | 849 | else() | 1078 | else() |
1042 | 850 | set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS}) | 1079 | set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS}) |
1044 | 851 | set (VERSION_WEBLETS "0.0.10") | 1080 | set (VERSION_WEBLETS "0.0.11") |
1045 | 852 | set (PACKAGE_WEBLETS "cd-weblets") | 1081 | set (PACKAGE_WEBLETS "cd-weblets") |
1046 | 853 | set (webletsdatadir "${pluginsdatadir}/weblets") | 1082 | set (webletsdatadir "${pluginsdatadir}/weblets") |
1047 | 854 | set (with_weblets "yes") | 1083 | set (with_weblets "yes") |
1048 | @@ -858,20 +1087,24 @@ | |||
1049 | 858 | endif() | 1087 | endif() |
1050 | 859 | 1088 | ||
1051 | 860 | ############# WIFI ################# | 1089 | ############# WIFI ################# |
1052 | 1090 | message (STATUS "> WiFi:") | ||
1053 | 861 | set (GETTEXT_WIFI ${GETTEXT_PLUGINS}) | 1091 | set (GETTEXT_WIFI ${GETTEXT_PLUGINS}) |
1055 | 862 | set (VERSION_WIFI "1.2.6") | 1092 | set (VERSION_WIFI "1.2.7") |
1056 | 863 | set (PACKAGE_WIFI "cd-wifi") | 1093 | set (PACKAGE_WIFI "cd-wifi") |
1057 | 864 | set (wifidatadir "${pluginsdatadir}/wifi") | 1094 | set (wifidatadir "${pluginsdatadir}/wifi") |
1058 | 865 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf) | 1095 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf) |
1059 | 866 | add_subdirectory (wifi) | 1096 | add_subdirectory (wifi) |
1060 | 867 | 1097 | ||
1061 | 868 | ############# XFCE-INTEGRATION ################# | 1098 | ############# XFCE-INTEGRATION ################# |
1062 | 1099 | message (STATUS "> XFCE-Integration:") | ||
1063 | 869 | set (with_xfce_integration "no") | 1100 | set (with_xfce_integration "no") |
1064 | 870 | if (NOT "${enable-xfce-integration}" STREQUAL "no") | 1101 | if (NOT "${enable-xfce-integration}" STREQUAL "no") |
1065 | 871 | pkg_check_modules (XFCE_INTEGRATION_THUNAR thunar-vfs-1) | 1102 | pkg_check_modules (XFCE_INTEGRATION_THUNAR thunar-vfs-1) |
1066 | 872 | pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0) | 1103 | pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0) |
1067 | 873 | if ("${XFCE_INTEGRATION_THUNAR_FOUND}" STREQUAL "" AND "${XFCE_INTEGRATION_GVFS_FOUND}" STREQUAL "") | 1104 | if ("${XFCE_INTEGRATION_THUNAR_FOUND}" STREQUAL "" AND "${XFCE_INTEGRATION_GVFS_FOUND}" STREQUAL "") |
1068 | 874 | message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.") | 1105 | message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.") |
1069 | 1106 | message (STATUS "This module is required to compile XFCE-Integration applet: gio-2.0 (or thunar-vfs-1)") | ||
1070 | 1107 | set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0") | ||
1071 | 875 | else() | 1108 | else() |
1072 | 876 | set (VERSION_XFCE_INTEGRATION "1.0.3") | 1109 | set (VERSION_XFCE_INTEGRATION "1.0.3") |
1073 | 877 | set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration") | 1110 | set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration") |
1074 | @@ -882,13 +1115,16 @@ | |||
1075 | 882 | endif() | 1115 | endif() |
1076 | 883 | 1116 | ||
1077 | 884 | ############# XGAMMA ################# | 1117 | ############# XGAMMA ################# |
1078 | 1118 | message (STATUS "> XGamma:") | ||
1079 | 885 | pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm) | 1119 | pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm) |
1080 | 886 | if ("${XGAMMA_PACKAGE_FOUND}" STREQUAL "") | 1120 | if ("${XGAMMA_PACKAGE_FOUND}" STREQUAL "") |
1081 | 887 | message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.") | 1121 | message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.") |
1082 | 1122 | message (WARNING "These modules are required to compile XGamma applet: x11 and xxf86vm") | ||
1083 | 1123 | set (MODULES_MISSING "${MODULES_MISSING} x11 xxf86vm") | ||
1084 | 888 | set (with_xgamma "no") | 1124 | set (with_xgamma "no") |
1085 | 889 | else() | 1125 | else() |
1086 | 890 | set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS}) | 1126 | set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS}) |
1088 | 891 | set (VERSION_XGAMMA "1.2.0") | 1127 | set (VERSION_XGAMMA "1.2.1") |
1089 | 892 | set (PACKAGE_XGAMMA "cd-Xgamma") | 1128 | set (PACKAGE_XGAMMA "cd-Xgamma") |
1090 | 893 | set (with_xgamma "yes") | 1129 | set (with_xgamma "yes") |
1091 | 894 | set (xgammadatadir "${pluginsdatadir}/Xgamma") | 1130 | set (xgammadatadir "${pluginsdatadir}/Xgamma") |
1092 | @@ -926,16 +1162,37 @@ | |||
1093 | 926 | message (STATUS " - with Weblets applet: ${with_weblets}") | 1162 | message (STATUS " - with Weblets applet: ${with_weblets}") |
1094 | 927 | message (STATUS " - with Xgamma applet: ${with_xgamma}") | 1163 | message (STATUS " - with Xgamma applet: ${with_xgamma}") |
1095 | 928 | message (STATUS " - with Recent-Events applet: ${with_recent_events}") | 1164 | message (STATUS " - with Recent-Events applet: ${with_recent_events}") |
1096 | 1165 | message (STATUS " - with UPower support: ${with_upower_support}") | ||
1097 | 929 | message (STATUS " - with Python interface: ${with_python}") | 1166 | message (STATUS " - with Python interface: ${with_python}") |
1098 | 930 | message (STATUS " - with Ruby interface: ${with_ruby}") | 1167 | message (STATUS " - with Ruby interface: ${with_ruby}") |
1099 | 931 | message (STATUS " - with Mono interface: ${with_mono}") | 1168 | message (STATUS " - with Mono interface: ${with_mono}") |
1100 | 932 | message (STATUS " - with Vala interface: ${with_vala}") | 1169 | message (STATUS " - with Vala interface: ${with_vala}") |
1102 | 933 | message (STATUS " - with Vala Translator (valac) : ${with_valac}") | 1170 | message (STATUS " - with Vala Translator (valac): ${with_valac}") |
1103 | 934 | message (STATUS "Unstable:") | 1171 | message (STATUS "Unstable:") |
1104 | 935 | message (STATUS " - with Disks applet: ${with_disks}") | 1172 | message (STATUS " - with Disks applet: ${with_disks}") |
1105 | 936 | message (STATUS " - with Doncky applet: ${with_doncky}") | 1173 | message (STATUS " - with Doncky applet: ${with_doncky}") |
1106 | 1174 | message (STATUS " - with Impulse applet: ${with_impulse}") | ||
1107 | 1175 | message (STATUS " - with KDE experimental support: ${with_kde_integration2}") | ||
1108 | 937 | message (STATUS " - with Network-Monitor applet: ${with_network_monitor}") | 1176 | message (STATUS " - with Network-Monitor applet: ${with_network_monitor}") |
1109 | 938 | message (STATUS " - with Scooby-Do applet: ${with_scooby_do}") | 1177 | message (STATUS " - with Scooby-Do applet: ${with_scooby_do}") |
1111 | 939 | message (STATUS "Unsupported:") | 1178 | message (STATUS "Deprecated:") |
1112 | 940 | message (STATUS " - with old Gnome support: ${with_gnome_integration_old}") | 1179 | message (STATUS " - with old Gnome support: ${with_gnome_integration_old}") |
1113 | 1180 | |||
1114 | 1181 | if (NOT "${MODULES_MISSING}" STREQUAL "") | ||
1115 | 1182 | message ("") | ||
1116 | 1183 | message (STATUS "WARNING: It seems that one (or more) module(s) is (are) missing:${MODULES_MISSING}") | ||
1117 | 1184 | message (STATUS "It can be interesting to install them (even more if you're a maintainer of Cairo-Dock's packages).") | ||
1118 | 1185 | endif () | ||
1119 | 1186 | |||
1120 | 1187 | if (NOT "${PROGRAMS_MISSING}" STREQUAL "") | ||
1121 | 1188 | message ("") | ||
1122 | 1189 | message (STATUS "WARNING: It seems that one (or more) program(s) or package(s) is (are) missing:${PROGRAMS_MISSING}") | ||
1123 | 1190 | message (STATUS "It can be interesting to install them (even more if you're a maintainer of Cairo-Dock's packages).") | ||
1124 | 1191 | endif () | ||
1125 | 1192 | |||
1126 | 1193 | if (NOT "${MODULES_INTEGRATION_MISSING}" STREQUAL "") | ||
1127 | 1194 | message ("") | ||
1128 | 1195 | message (STATUS "WARNING: It seems that one (or more) module(s) for the integration with the system is (are) missing:${MODULES_INTEGRATION_MISSING}") | ||
1129 | 1196 | message (STATUS "It's maybe not required for the user but it's recommended to install them if you're a maintainer of Cairo-Dock's packages.") | ||
1130 | 1197 | endif () | ||
1131 | 941 | message ("") | 1198 | message ("") |
1132 | 942 | 1199 | ||
1133 | === modified file 'Cairo-Penguin/data/Cairo-Penguin.conf.in' | |||
1134 | --- Cairo-Penguin/data/Cairo-Penguin.conf.in 2011-04-20 20:46:51 +0000 | |||
1135 | +++ Cairo-Penguin/data/Cairo-Penguin.conf.in 2011-08-09 20:07:46 +0000 | |||
1136 | @@ -1,9 +1,9 @@ | |||
1138 | 1 | #!en;@VERSION_CAIRO_PENGUIN@ | 1 | #@VERSION_CAIRO_PENGUIN@ |
1139 | 2 | 2 | ||
1140 | 3 | #[gtk-about] | 3 | #[gtk-about] |
1141 | 4 | [Icon] | 4 | [Icon] |
1142 | 5 | 5 | ||
1144 | 6 | #F[Applet] | 6 | #F[Icon] |
1145 | 7 | frame_maininfo= | 7 | frame_maininfo= |
1146 | 8 | 8 | ||
1147 | 9 | #d Name of the dock it belongs to: | 9 | #d Name of the dock it belongs to: |
1148 | @@ -11,13 +11,12 @@ | |||
1149 | 11 | 11 | ||
1150 | 12 | #s Name of the icon as it will appear in its caption in the dock: | 12 | #s Name of the icon as it will appear in its caption in the dock: |
1151 | 13 | name = | 13 | name = |
1155 | 14 | 14 | #v | |
1156 | 15 | #F[Display] | 15 | sep_display= |
1154 | 16 | frame_display= | ||
1157 | 17 | 16 | ||
1158 | 18 | icon = | 17 | icon = |
1159 | 19 | 18 | ||
1161 | 20 | #j+[0;128] Icon size for busy penguin: | 19 | #j+[0;128] Desired icon size for this applet |
1162 | 21 | #{Set to 0 to use the default applet size} | 20 | #{Set to 0 to use the default applet size} |
1163 | 22 | icon size = 0;0 | 21 | icon size = 0;0 |
1164 | 23 | 22 | ||
1165 | 24 | 23 | ||
1166 | === modified file 'Clipper/data/Clipper.conf.in' | |||
1167 | --- Clipper/data/Clipper.conf.in 2011-04-20 20:46:51 +0000 | |||
1168 | +++ Clipper/data/Clipper.conf.in 2011-08-09 20:07:46 +0000 | |||
1169 | @@ -1,23 +1,22 @@ | |||
1171 | 1 | #!en;@VERSION_CLIPPER@ | 1 | #@VERSION_CLIPPER@ |
1172 | 2 | 2 | ||
1173 | 3 | #[gtk-about] | 3 | #[gtk-about] |
1174 | 4 | [Icon] | 4 | [Icon] |
1175 | 5 | 5 | ||
1177 | 6 | #F[Applet] | 6 | #F[Icon] |
1178 | 7 | frame_maininfo= | 7 | frame_maininfo= |
1179 | 8 | 8 | ||
1180 | 9 | #d Name of the dock it belongs to: | 9 | #d Name of the dock it belongs to: |
1181 | 10 | dock name = | 10 | dock name = |
1182 | 11 | 11 | ||
1183 | 12 | #s Name of the icon as it will appear in its caption in the dock: | 12 | #s Name of the icon as it will appear in its caption in the dock: |
1188 | 13 | name = Clipboard | 13 | name = |
1189 | 14 | 14 | #v | |
1190 | 15 | #F[Display] | 15 | sep_display= |
1187 | 16 | frame_display= | ||
1191 | 17 | 16 | ||
1192 | 18 | #S+ Image filename: | 17 | #S+ Image filename: |
1193 | 19 | #{Leave empty to use the default one.} | 18 | #{Leave empty to use the default one.} |
1195 | 20 | icon = | 19 | icon=accessories-text-editor.svg |
1196 | 21 | 20 | ||
1197 | 22 | #j+[0;128] Desired icon size for this applet | 21 | #j+[0;128] Desired icon size for this applet |
1198 | 23 | #{Set to 0 to use the default applet size} | 22 | #{Set to 0 to use the default applet size} |
1199 | 24 | 23 | ||
1200 | === modified file 'Clipper/src/applet-clipboard.c' | |||
1201 | --- Clipper/src/applet-clipboard.c 2011-04-20 20:46:51 +0000 | |||
1202 | +++ Clipper/src/applet-clipboard.c 2011-08-09 20:07:46 +0000 | |||
1203 | @@ -451,6 +451,9 @@ | |||
1204 | 451 | pImage = gtk_image_new_from_pixbuf (pixbuf); | 451 | pImage = gtk_image_new_from_pixbuf (pixbuf); |
1205 | 452 | g_free (cIconFilePath); | 452 | g_free (cIconFilePath); |
1206 | 453 | g_object_unref (pixbuf); | 453 | g_object_unref (pixbuf); |
1207 | 454 | #if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16) | ||
1208 | 455 | gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE); | ||
1209 | 456 | #endif | ||
1210 | 454 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), pImage); | 457 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), pImage); |
1211 | 455 | } | 458 | } |
1212 | 456 | gtk_menu_shell_append (GTK_MENU_SHELL (pMenu), pMenuItem); | 459 | gtk_menu_shell_append (GTK_MENU_SHELL (pMenu), pMenuItem); |
1213 | 457 | 460 | ||
1214 | === added directory 'Composite-Manager' | |||
1215 | === added file 'Composite-Manager/CMakeLists.txt' | |||
1216 | --- Composite-Manager/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1217 | +++ Composite-Manager/CMakeLists.txt 2011-08-09 20:07:46 +0000 | |||
1218 | @@ -0,0 +1,2 @@ | |||
1219 | 1 | add_subdirectory(src) | ||
1220 | 2 | add_subdirectory(data) | ||
1221 | 0 | 3 | ||
1222 | === added directory 'Composite-Manager/data' | |||
1223 | === added file 'Composite-Manager/data/CMakeLists.txt' | |||
1224 | --- Composite-Manager/data/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1225 | +++ Composite-Manager/data/CMakeLists.txt 2011-08-09 20:07:46 +0000 | |||
1226 | @@ -0,0 +1,10 @@ | |||
1227 | 1 | |||
1228 | 2 | ########### install files ############### | ||
1229 | 3 | |||
1230 | 4 | install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Composite-Manager.conf | ||
1231 | 5 | preview.jpg | ||
1232 | 6 | icon.png | ||
1233 | 7 | composite-on.png | ||
1234 | 8 | composite-off.png | ||
1235 | 9 | DESTINATION ${composite_managerdatadir}) | ||
1236 | 10 | |||
1237 | 0 | 11 | ||
1238 | === added file 'Composite-Manager/data/Composite-Manager.conf.in' | |||
1239 | --- Composite-Manager/data/Composite-Manager.conf.in 1970-01-01 00:00:00 +0000 | |||
1240 | +++ Composite-Manager/data/Composite-Manager.conf.in 2011-08-09 20:07:46 +0000 | |||
1241 | @@ -0,0 +1,137 @@ | |||
1242 | 1 | #@VERSION_COMPOSITE_MANAGER@ | ||
1243 | 2 | |||
1244 | 3 | #[gtk-about] | ||
1245 | 4 | [Icon] | ||
1246 | 5 | |||
1247 | 6 | #F[Icon] | ||
1248 | 7 | frame_maininfo= | ||
1249 | 8 | |||
1250 | 9 | #d Name of the dock it belongs to: | ||
1251 | 10 | dock name = | ||
1252 | 11 | |||
1253 | 12 | #s Name of the icon as it will appear in its caption in the dock: | ||
1254 | 13 | name = | ||
1255 | 14 | #v | ||
1256 | 15 | sep_display= | ||
1257 | 16 | |||
1258 | 17 | icon = | ||
1259 | 18 | |||
1260 | 19 | #j[0;128] Desired icon size for this applet | ||
1261 | 20 | #{Set to 0 to use the default applet size} | ||
1262 | 21 | icon size = 0;0 | ||
1263 | 22 | |||
1264 | 23 | order= | ||
1265 | 24 | |||
1266 | 25 | #F[Applet's Handbook] | ||
1267 | 26 | frame_hand= | ||
1268 | 27 | #A | ||
1269 | 28 | handbook=Composite-Manager | ||
1270 | 29 | |||
1271 | 30 | |||
1272 | 31 | #[gtk-convert] | ||
1273 | 32 | [Desklet] | ||
1274 | 33 | |||
1275 | 34 | #X[Position] | ||
1276 | 35 | frame_pos = | ||
1277 | 36 | |||
1278 | 37 | #b Lock position? | ||
1279 | 38 | #{If locked, the desklet cannot be moved by simply dragging it with the left mouse button. It can still be moved with ALT + left-click.} | ||
1280 | 39 | locked = false | ||
1281 | 40 | |||
1282 | 41 | #j+[24;512] Desklet dimensions (width x height): | ||
1283 | 42 | #{Depending on your WindowManager, you may be able to resize this with ALT + middle-click or ALT + left-click.} | ||
1284 | 43 | size = 96;96 | ||
1285 | 44 | |||
1286 | 45 | #i[-2048;2048] Desklet position (x, y): | ||
1287 | 46 | #{Depending on your WindowManager, you may be able to move this with ALT + left-click.. Negative values are counted from the right/bottom of the screen} | ||
1288 | 47 | x position=0 | ||
1289 | 48 | #i[-2048;2048] ... | ||
1290 | 49 | y position=0 | ||
1291 | 50 | |||
1292 | 51 | #I[-180;180] Rotation: | ||
1293 | 52 | #{You can quickly rotate the desklet with the mouse, by dragging the little buttons on its left and top sides.} | ||
1294 | 53 | rotation = 0 | ||
1295 | 54 | |||
1296 | 55 | #X[Visibility] | ||
1297 | 56 | frame_visi = | ||
1298 | 57 | |||
1299 | 58 | #b Is detached from the dock | ||
1300 | 59 | initially detached=false | ||
1301 | 60 | #l[Normal;Keep above;Keep below;Keep on widget layer;Reserve space] Visibility: | ||
1302 | 61 | #{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)} | ||
1303 | 62 | accessibility=0 | ||
1304 | 63 | #b Should be visible on all desktops? | ||
1305 | 64 | sticky=true | ||
1306 | 65 | |||
1307 | 66 | |||
1308 | 67 | #F[Decorations;gtk-orientation-portrait] | ||
1309 | 68 | frame_deco= | ||
1310 | 69 | |||
1311 | 70 | #o+ Choose a decoration theme for this desklet: | ||
1312 | 71 | #{Choose 'Custom decorations' to define your own decorations below.} | ||
1313 | 72 | decorations = default | ||
1314 | 73 | |||
1315 | 74 | #v | ||
1316 | 75 | sep_deco = | ||
1317 | 76 | |||
1318 | 77 | #S+ Background image: | ||
1319 | 78 | #{Image to be displayed below drawings, e.g. a frame. Leave empty for no image.} | ||
1320 | 79 | bg desklet = | ||
1321 | 80 | #e+[0;1] Background transparency: | ||
1322 | 81 | bg alpha = 1 | ||
1323 | 82 | #i+[0;256] Left offset: | ||
1324 | 83 | #{in pixels. Use this to adjust the left position of drawings.} | ||
1325 | 84 | left offset = 0 | ||
1326 | 85 | #i+[0;256] Top offset: | ||
1327 | 86 | #{in pixels. Use this to adjust the top position of drawings.} | ||
1328 | 87 | top offset = 0 | ||
1329 | 88 | #i+[0;256] Right offset: | ||
1330 | 89 | #{in pixels. Use this to adjust the right position of drawings.} | ||
1331 | 90 | right offset = 0 | ||
1332 | 91 | #i+[0;256] Bottom offset: | ||
1333 | 92 | #{in pixels. Use this to adjust the bottom position of drawings.} | ||
1334 | 93 | bottom offset = 0 | ||
1335 | 94 | #S+ Foreground image: | ||
1336 | 95 | #{Image to be displayed above the drawings, e.g. a reflection. Leave empty for no image.} | ||
1337 | 96 | fg desklet = | ||
1338 | 97 | #e+[0;1] Foreground tansparency: | ||
1339 | 98 | fg alpha = 1 | ||
1340 | 99 | |||
1341 | 100 | |||
1342 | 101 | #[gtk-preferences] | ||
1343 | 102 | [Configuration] | ||
1344 | 103 | |||
1345 | 104 | #F[Style;gtk-color-picker] | ||
1346 | 105 | frame_style = | ||
1347 | 106 | |||
1348 | 107 | #S+ Image when composite is active: | ||
1349 | 108 | #{Leave empty to use the default one.} | ||
1350 | 109 | icon on = | ||
1351 | 110 | |||
1352 | 111 | #S+ Image when composite is inactive: | ||
1353 | 112 | #{Leave empty to use the default one.} | ||
1354 | 113 | icon off = | ||
1355 | 114 | |||
1356 | 115 | |||
1357 | 116 | #F[Behaviour;gtk-execute] | ||
1358 | 117 | frame_behav = | ||
1359 | 118 | |||
1360 | 119 | #E[;Compiz;KWin;Xfwm;Metacity] Composite window-manager: | ||
1361 | 120 | #{Let empty to use the default one. Alternatively, you can set any command you want.} | ||
1362 | 121 | compositor = | ||
1363 | 122 | |||
1364 | 123 | #E[;Compiz;KWin;Xfwm;Metacity] Fallback window-manager: | ||
1365 | 124 | #{Let empty to use the default one. Alternatively, you can set any command you want.} | ||
1366 | 125 | fallback = | ||
1367 | 126 | |||
1368 | 127 | #b Ask before switching: | ||
1369 | 128 | ask = true | ||
1370 | 129 | |||
1371 | 130 | #v | ||
1372 | 131 | sep_act= | ||
1373 | 132 | |||
1374 | 133 | #l[Edit Window-Manager settings;Reload Window-Manager;Show desktop;Expose all the desktops;Expose all the windows;Show the Widget Layer] Action on middle-click: | ||
1375 | 134 | action on click = 0 | ||
1376 | 135 | |||
1377 | 136 | #k Shortkey to toggle the composite ON/OFF: | ||
1378 | 137 | shortkey = <Control>F12 | ||
1379 | 0 | 138 | ||
1380 | === added file 'Composite-Manager/data/composite-off.png' | |||
1381 | 1 | Binary files Composite-Manager/data/composite-off.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/composite-off.png 2011-08-09 20:07:46 +0000 differ | 139 | Binary files Composite-Manager/data/composite-off.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/composite-off.png 2011-08-09 20:07:46 +0000 differ |
1382 | === added file 'Composite-Manager/data/composite-on.png' | |||
1383 | 2 | Binary files Composite-Manager/data/composite-on.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/composite-on.png 2011-08-09 20:07:46 +0000 differ | 140 | Binary files Composite-Manager/data/composite-on.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/composite-on.png 2011-08-09 20:07:46 +0000 differ |
1384 | === added file 'Composite-Manager/data/icon.png' | |||
1385 | 3 | Binary files Composite-Manager/data/icon.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/icon.png 2011-08-09 20:07:46 +0000 differ | 141 | Binary files Composite-Manager/data/icon.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/icon.png 2011-08-09 20:07:46 +0000 differ |
1386 | === added file 'Composite-Manager/data/preview.jpg' | |||
1387 | 4 | Binary files Composite-Manager/data/preview.jpg 1970-01-01 00:00:00 +0000 and Composite-Manager/data/preview.jpg 2011-08-09 20:07:46 +0000 differ | 142 | Binary files Composite-Manager/data/preview.jpg 1970-01-01 00:00:00 +0000 and Composite-Manager/data/preview.jpg 2011-08-09 20:07:46 +0000 differ |
1388 | === added directory 'Composite-Manager/src' | |||
1389 | === added file 'Composite-Manager/src/CMakeLists.txt' | |||
1390 | --- Composite-Manager/src/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
1391 | +++ Composite-Manager/src/CMakeLists.txt 2011-08-09 20:07:46 +0000 | |||
1392 | @@ -0,0 +1,39 @@ | |||
1393 | 1 | |||
1394 | 2 | ########### sources ############### | ||
1395 | 3 | |||
1396 | 4 | SET(MODULE_SRCS | ||
1397 | 5 | applet-struct.h | ||
1398 | 6 | applet-init.c applet-init.h | ||
1399 | 7 | applet-config.c applet-config.h | ||
1400 | 8 | applet-composite-manager.c applet-composite-manager.h | ||
1401 | 9 | applet-notifications.c applet-notifications.h | ||
1402 | 10 | ) | ||
1403 | 11 | |||
1404 | 12 | add_library(${PACKAGE_COMPOSITE_MANAGER} SHARED ${MODULE_SRCS}) | ||
1405 | 13 | |||
1406 | 14 | ########### compil ############### | ||
1407 | 15 | add_definitions (-DMY_APPLET_SHARE_DATA_DIR="${composite_managerdatadir}") | ||
1408 | 16 | add_definitions (-DMY_APPLET_PREVIEW_FILE="preview.jpg") | ||
1409 | 17 | add_definitions (-DMY_APPLET_CONF_FILE="Composite-Manager.conf") | ||
1410 | 18 | add_definitions (-DMY_APPLET_USER_DATA_DIR="Composite-Manager") | ||
1411 | 19 | add_definitions (-DMY_APPLET_VERSION="${VERSION_COMPOSITE_MANAGER}") | ||
1412 | 20 | add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_COMPOSITE_MANAGER}") | ||
1413 | 21 | add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}") | ||
1414 | 22 | add_definitions (-DMY_APPLET_ICON_FILE="icon.png") | ||
1415 | 23 | ### uncomment the following line to allow multi-instance applet. | ||
1416 | 24 | #add_definitions (-DCD_APPLET_MULTI_INSTANCE="1") | ||
1417 | 25 | ### uncomment the following line to allow extended OpenGL drawing. | ||
1418 | 26 | #add_definitions (-DGL_GLEXT_PROTOTYPES="1") | ||
1419 | 27 | |||
1420 | 28 | include_directories ( | ||
1421 | 29 | ${PACKAGE_INCLUDE_DIRS}) | ||
1422 | 30 | |||
1423 | 31 | link_directories ( | ||
1424 | 32 | ${PACKAGE_LIBRARY_DIRS}) | ||
1425 | 33 | |||
1426 | 34 | target_link_libraries (${PACKAGE_COMPOSITE_MANAGER} | ||
1427 | 35 | ${PACKAGE_LIBRARIES}) | ||
1428 | 36 | |||
1429 | 37 | ########### install files ############### | ||
1430 | 38 | |||
1431 | 39 | install(TARGETS ${PACKAGE_COMPOSITE_MANAGER} DESTINATION ${pluginsdir}) | ||
1432 | 0 | 40 | ||
1433 | === added file 'Composite-Manager/src/applet-composite-manager.c' | |||
1434 | --- Composite-Manager/src/applet-composite-manager.c 1970-01-01 00:00:00 +0000 | |||
1435 | +++ Composite-Manager/src/applet-composite-manager.c 2011-08-09 20:07:46 +0000 | |||
1436 | @@ -0,0 +1,535 @@ | |||
1437 | 1 | /** | ||
1438 | 2 | * This file is a part of the Cairo-Dock project | ||
1439 | 3 | * | ||
1440 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1441 | 5 | * E-mail : see the 'copyright' file. | ||
1442 | 6 | * | ||
1443 | 7 | * This program is free software; you can redistribute it and/or | ||
1444 | 8 | * modify it under the terms of the GNU General Public License | ||
1445 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1446 | 10 | * of the License, or (at your option) any later version. | ||
1447 | 11 | * | ||
1448 | 12 | * This program is distributed in the hope that it will be useful, | ||
1449 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1450 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1451 | 15 | * GNU General Public License for more details. | ||
1452 | 16 | * You should have received a copy of the GNU General Public License | ||
1453 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1454 | 18 | */ | ||
1455 | 19 | |||
1456 | 20 | #define _BSD_SOURCE | ||
1457 | 21 | #include <string.h> | ||
1458 | 22 | #include <stdlib.h> | ||
1459 | 23 | #include <stdio.h> | ||
1460 | 24 | #include <unistd.h> | ||
1461 | 25 | #include <glib/gstdio.h> | ||
1462 | 26 | #include <cairo-dock.h> | ||
1463 | 27 | |||
1464 | 28 | #include "applet-struct.h" | ||
1465 | 29 | #include "applet-composite-manager.h" | ||
1466 | 30 | |||
1467 | 31 | |||
1468 | 32 | /////////////////// | ||
1469 | 33 | /// WM BACKENDS /// | ||
1470 | 34 | /////////////////// | ||
1471 | 35 | |||
1472 | 36 | static CDWM *_get_wm_by_name (const gchar *cName) | ||
1473 | 37 | { | ||
1474 | 38 | int i; | ||
1475 | 39 | for (i = 0; i < NB_WM; i ++) | ||
1476 | 40 | { | ||
1477 | 41 | if (strcmp (cName, myData.pWmList[i].cName) == 0) | ||
1478 | 42 | return &myData.pWmList[i]; | ||
1479 | 43 | } | ||
1480 | 44 | return NULL; | ||
1481 | 45 | } | ||
1482 | 46 | static CDWM *_get_wm_by_index (CDWMIndex n) | ||
1483 | 47 | { | ||
1484 | 48 | if (n < NB_WM) | ||
1485 | 49 | return &myData.pWmList[n]; | ||
1486 | 50 | else | ||
1487 | 51 | return NULL; | ||
1488 | 52 | } | ||
1489 | 53 | |||
1490 | 54 | static void _set_metacity_composite (gboolean bActive) | ||
1491 | 55 | { | ||
1492 | 56 | int r; | ||
1493 | 57 | if (bActive) | ||
1494 | 58 | r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true"); | ||
1495 | 59 | else | ||
1496 | 60 | r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false"); | ||
1497 | 61 | } | ||
1498 | 62 | static void _set_xfwm_composite (gboolean bActive) | ||
1499 | 63 | { | ||
1500 | 64 | int r; | ||
1501 | 65 | if (bActive) | ||
1502 | 66 | r = system ("xfconf-query -c xfwm4 -p '/general/use_compositing' -t 'bool' -s 'true'"); | ||
1503 | 67 | else | ||
1504 | 68 | r = system ("xfconf-query -c xfwm4 -p '/general/use_compositing' -t 'bool' -s 'false'"); | ||
1505 | 69 | } | ||
1506 | 70 | static void _set_kwin_composite (gboolean bActive) | ||
1507 | 71 | { | ||
1508 | 72 | int r; | ||
1509 | 73 | if (bActive) | ||
1510 | 74 | r = system ("if test \"`qdbus org.kde.kwin /KWin compositingActive`\" = \"false\";then qdbus org.kde.kwin /KWin toggleCompositing; fi"); // not active, so activating | ||
1511 | 75 | else | ||
1512 | 76 | r = system ("if test \"`qdbus org.kde.kwin /KWin compositingActive`\" = \"true\"; then qdbus org.kde.kwin /KWin toggleCompositing; fi"); // active, so deactivating | ||
1513 | 77 | } | ||
1514 | 78 | static void _define_known_wms (void) | ||
1515 | 79 | { | ||
1516 | 80 | myData.pWmList[CD_COMPIZ].cName = "Compiz"; | ||
1517 | 81 | myData.pWmList[CD_COMPIZ].cCommand = "compiz --replace"; | ||
1518 | 82 | myData.pWmList[CD_COMPIZ].activate_composite = NULL; | ||
1519 | 83 | myData.pWmList[CD_COMPIZ].cConfigTool = "ccsm"; | ||
1520 | 84 | |||
1521 | 85 | myData.pWmList[CD_KWIN].cName = "KWin"; | ||
1522 | 86 | myData.pWmList[CD_KWIN].cCommand = "kwin --replace"; | ||
1523 | 87 | myData.pWmList[CD_KWIN].activate_composite = _set_kwin_composite; | ||
1524 | 88 | myData.pWmList[CD_KWIN].cConfigTool = NULL; /// TODO: find the config tool... | ||
1525 | 89 | |||
1526 | 90 | myData.pWmList[CD_XFWM].cName = "Xfwm"; | ||
1527 | 91 | myData.pWmList[CD_XFWM].cCommand = "xfwm4 --replace"; | ||
1528 | 92 | myData.pWmList[CD_XFWM].activate_composite = _set_xfwm_composite; | ||
1529 | 93 | myData.pWmList[CD_XFWM].cConfigTool = "xfwm4-settings"; // there is also xfwm4-tweaks-settings, wish they merge both ... | ||
1530 | 94 | |||
1531 | 95 | myData.pWmList[CD_METACITY].cName = "Metacity"; | ||
1532 | 96 | myData.pWmList[CD_METACITY].cCommand = "metacity --replace"; | ||
1533 | 97 | myData.pWmList[CD_METACITY].activate_composite = _set_metacity_composite; | ||
1534 | 98 | myData.pWmList[CD_METACITY].cConfigTool = "gconf-editor /apps/metacity"; | ||
1535 | 99 | |||
1536 | 100 | myData.pWmList[CD_CUSTOM_WMFB].cName = "Fallback"; | ||
1537 | 101 | myData.pWmList[CD_CUSTOM_WMFB].cCommand = NULL; | ||
1538 | 102 | myData.pWmList[CD_CUSTOM_WMFB].activate_composite = NULL; | ||
1539 | 103 | myData.pWmList[CD_CUSTOM_WMFB].bIsAvailable = TRUE; | ||
1540 | 104 | |||
1541 | 105 | myData.pWmList[CD_CUSTOM_WMC].cName = "Composite"; | ||
1542 | 106 | myData.pWmList[CD_CUSTOM_WMC].cCommand = NULL; | ||
1543 | 107 | myData.pWmList[CD_CUSTOM_WMC].activate_composite = NULL; | ||
1544 | 108 | myData.pWmList[CD_CUSTOM_WMC].bIsAvailable = TRUE; | ||
1545 | 109 | } | ||
1546 | 110 | |||
1547 | 111 | static void _check_available_wms (gchar *cWhich) | ||
1548 | 112 | { | ||
1549 | 113 | if (cWhich == NULL) // no known WM is present, skip the check. | ||
1550 | 114 | return; | ||
1551 | 115 | |||
1552 | 116 | CDWM *wm; | ||
1553 | 117 | wm = _get_wm_by_index (CD_COMPIZ); | ||
1554 | 118 | wm->bIsAvailable = (strstr (cWhich, "compiz") != NULL); | ||
1555 | 119 | wm = _get_wm_by_index (CD_KWIN); | ||
1556 | 120 | wm->bIsAvailable = (strstr (cWhich, "kwin") != NULL); | ||
1557 | 121 | wm = _get_wm_by_index (CD_XFWM); | ||
1558 | 122 | wm->bIsAvailable = (strstr (cWhich, "xfwm4") != NULL); | ||
1559 | 123 | wm = _get_wm_by_index (CD_METACITY); | ||
1560 | 124 | wm->bIsAvailable = (strstr (cWhich, "metacity") != NULL); | ||
1561 | 125 | } | ||
1562 | 126 | |||
1563 | 127 | static CDWMIndex _check_current_wm (gchar *cPs) | ||
1564 | 128 | { | ||
1565 | 129 | if (cPs == NULL) // no known WM is present, skip the check. | ||
1566 | 130 | return -1; | ||
1567 | 131 | |||
1568 | 132 | if (strstr (cPs, "compiz") != NULL) | ||
1569 | 133 | return CD_COMPIZ; | ||
1570 | 134 | if (strstr (cPs, "kwin") != NULL) | ||
1571 | 135 | return CD_KWIN; | ||
1572 | 136 | if (strstr (cPs, "xfwm4") != NULL) | ||
1573 | 137 | return CD_XFWM; | ||
1574 | 138 | if (strstr (cPs, "metacity") != NULL) | ||
1575 | 139 | return CD_METACITY; | ||
1576 | 140 | |||
1577 | 141 | return -1; | ||
1578 | 142 | } | ||
1579 | 143 | |||
1580 | 144 | |||
1581 | 145 | //////////////////////// | ||
1582 | 146 | /// COMPOSITE SIGNAL /// | ||
1583 | 147 | //////////////////////// | ||
1584 | 148 | |||
1585 | 149 | static void _on_composited_changed (GdkScreen *pScreen, gpointer data) | ||
1586 | 150 | { | ||
1587 | 151 | myData.bIsComposited = gdk_screen_is_composited (pScreen); | ||
1588 | 152 | cd_draw_current_state (); | ||
1589 | 153 | } | ||
1590 | 154 | static void _start_watching_composite_state (void) | ||
1591 | 155 | { | ||
1592 | 156 | // get the current state. | ||
1593 | 157 | GdkScreen *pScreen = gdk_screen_get_default (); | ||
1594 | 158 | myData.bIsComposited = gdk_screen_is_composited (pScreen); | ||
1595 | 159 | |||
1596 | 160 | // draw it. | ||
1597 | 161 | cd_draw_current_state (); | ||
1598 | 162 | |||
1599 | 163 | // listen for future changes. | ||
1600 | 164 | g_signal_connect (G_OBJECT (pScreen), "composited-changed", G_CALLBACK(_on_composited_changed), NULL); | ||
1601 | 165 | } | ||
1602 | 166 | |||
1603 | 167 | |||
1604 | 168 | /////////////////// | ||
1605 | 169 | /// PREFERED WM /// | ||
1606 | 170 | /////////////////// | ||
1607 | 171 | |||
1608 | 172 | static CDWM *_get_prefered_wmc (CDWMIndex iCurrentWm) | ||
1609 | 173 | { | ||
1610 | 174 | g_print ("%s (%s, %d)\n", __func__, myConfig.cWmCompositor, iCurrentWm); | ||
1611 | 175 | CDWM *wm; | ||
1612 | 176 | if (myConfig.cWmCompositor != NULL) // a composite WM is defined. | ||
1613 | 177 | { | ||
1614 | 178 | wm = _get_wm_by_name (myConfig.cWmCompositor); | ||
1615 | 179 | if (wm == NULL) // not one of the known WM -> define and take the custom one. | ||
1616 | 180 | { | ||
1617 | 181 | wm = _get_wm_by_index (CD_CUSTOM_WMC); | ||
1618 | 182 | g_free ((gchar*)wm->cCommand); | ||
1619 | 183 | wm->cCommand = g_strdup (myConfig.cWmCompositor); | ||
1620 | 184 | return wm; | ||
1621 | 185 | } | ||
1622 | 186 | else if (wm->bIsAvailable) | ||
1623 | 187 | return wm; | ||
1624 | 188 | } | ||
1625 | 189 | |||
1626 | 190 | // no WM defined, or the one defined is not available -> check if a suitable one is running. | ||
1627 | 191 | if (iCurrentWm < NB_WM) // one of the know WM is running | ||
1628 | 192 | { | ||
1629 | 193 | if (myData.bIsComposited) // and it provides composite => let's take it! | ||
1630 | 194 | { | ||
1631 | 195 | wm = _get_wm_by_index (iCurrentWm); | ||
1632 | 196 | if (wm->bIsAvailable) // just to be sure. | ||
1633 | 197 | return wm; | ||
1634 | 198 | } | ||
1635 | 199 | } | ||
1636 | 200 | |||
1637 | 201 | // no succes so far, take the most suitable one. | ||
1638 | 202 | int index[NB_COMPOSITE_WM] = {CD_COMPIZ, CD_KWIN, CD_XFWM, CD_METACITY}; // in this order by default. | ||
1639 | 203 | switch (g_iDesktopEnv) | ||
1640 | 204 | { | ||
1641 | 205 | case CAIRO_DOCK_GNOME: | ||
1642 | 206 | index[1] = CD_METACITY; | ||
1643 | 207 | index[3] = CD_KWIN; | ||
1644 | 208 | break; | ||
1645 | 209 | case CAIRO_DOCK_XFCE: | ||
1646 | 210 | index[1] = CD_XFWM; | ||
1647 | 211 | index[2] = CD_KWIN; | ||
1648 | 212 | break; | ||
1649 | 213 | case CAIRO_DOCK_KDE: | ||
1650 | 214 | default: | ||
1651 | 215 | break; | ||
1652 | 216 | } | ||
1653 | 217 | int i; | ||
1654 | 218 | for (i = 0; i < NB_COMPOSITE_WM; i ++) | ||
1655 | 219 | { | ||
1656 | 220 | wm = _get_wm_by_index (index[i]); | ||
1657 | 221 | g_print (" %d) %s, %d\n", index[i], wm->cName, wm->bIsAvailable); | ||
1658 | 222 | if (wm->bIsAvailable) | ||
1659 | 223 | return wm; | ||
1660 | 224 | } | ||
1661 | 225 | return NULL; | ||
1662 | 226 | } | ||
1663 | 227 | |||
1664 | 228 | static CDWM *_get_prefered_wmfb (CDWMIndex iCurrentWm) | ||
1665 | 229 | { | ||
1666 | 230 | g_print ("%s (%s, %d)\n", __func__, myConfig.cWmFallback, iCurrentWm); | ||
1667 | 231 | CDWM *wm; | ||
1668 | 232 | if (myConfig.cWmFallback != NULL) // a fallback WM is defined. | ||
1669 | 233 | { | ||
1670 | 234 | wm = _get_wm_by_name (myConfig.cWmFallback); | ||
1671 | 235 | if (wm == NULL) // not one of the known WM -> define and take the custom one. | ||
1672 | 236 | { | ||
1673 | 237 | wm = _get_wm_by_index (CD_CUSTOM_WMFB); | ||
1674 | 238 | g_free ((gchar*)wm->cCommand); | ||
1675 | 239 | wm->cCommand = g_strdup (myConfig.cWmFallback); | ||
1676 | 240 | return wm; | ||
1677 | 241 | } | ||
1678 | 242 | else if (wm->bIsAvailable) | ||
1679 | 243 | return wm; | ||
1680 | 244 | } | ||
1681 | 245 | |||
1682 | 246 | // no WM defined, or the one defined is not available -> check if a suitable one is running. | ||
1683 | 247 | if (iCurrentWm < NB_WM) // one of the know WM is running | ||
1684 | 248 | { | ||
1685 | 249 | if (!myData.bIsComposited) // and it is a fallback => let's take it! | ||
1686 | 250 | { | ||
1687 | 251 | wm = _get_wm_by_index (iCurrentWm); | ||
1688 | 252 | g_print ("current wm: %d, %d\n", iCurrentWm, wm->bIsAvailable); | ||
1689 | 253 | if (wm->bIsAvailable) // just to be sure. | ||
1690 | 254 | return wm; | ||
1691 | 255 | } | ||
1692 | 256 | } | ||
1693 | 257 | |||
1694 | 258 | // no succes so far, take the most suitable one. | ||
1695 | 259 | int index[NB_FALLBACK_WM] = {CD_METACITY, CD_XFWM, CD_KWIN}; // in this order by default. | ||
1696 | 260 | switch (g_iDesktopEnv) | ||
1697 | 261 | { | ||
1698 | 262 | case CAIRO_DOCK_GNOME: | ||
1699 | 263 | index[0] = CD_METACITY; | ||
1700 | 264 | index[1] = CD_XFWM; | ||
1701 | 265 | break; | ||
1702 | 266 | case CAIRO_DOCK_XFCE: | ||
1703 | 267 | index[0] = CD_XFWM; | ||
1704 | 268 | index[1] = CD_METACITY; | ||
1705 | 269 | break; | ||
1706 | 270 | case CAIRO_DOCK_KDE: | ||
1707 | 271 | index[0] = CD_KWIN; | ||
1708 | 272 | index[1] = CD_METACITY; | ||
1709 | 273 | index[2] = CD_XFWM; | ||
1710 | 274 | break; | ||
1711 | 275 | } | ||
1712 | 276 | int i; | ||
1713 | 277 | for (i = 0; i < NB_FALLBACK_WM; i ++) | ||
1714 | 278 | { | ||
1715 | 279 | wm = _get_wm_by_index (index[i]); | ||
1716 | 280 | g_print (" %s (%d)\n", wm->cName, wm->bIsAvailable); | ||
1717 | 281 | if (wm->bIsAvailable) | ||
1718 | 282 | return wm; | ||
1719 | 283 | } | ||
1720 | 284 | return NULL; | ||
1721 | 285 | } | ||
1722 | 286 | |||
1723 | 287 | static inline gchar *_get_running_wm (void) | ||
1724 | 288 | { | ||
1725 | 289 | return cairo_dock_launch_command_sync ("pgrep -l \"kwin$|compiz$|xfwm4$|metacity$\""); // -l = write the name of the program (not the command next to the PID in 'ps -ef'. we add a '$' after the names to avoid listing things like compiz-decorator or xfwm4-settings | ||
1726 | 290 | } | ||
1727 | 291 | static void _define_prefered_wms (gchar *cPs) | ||
1728 | 292 | { | ||
1729 | 293 | // get the compositor and fallback WMs | ||
1730 | 294 | CDWMIndex iCurrentWm = _check_current_wm (cPs); | ||
1731 | 295 | myData.wmc = _get_prefered_wmc (iCurrentWm); | ||
1732 | 296 | myData.wmfb = _get_prefered_wmfb (iCurrentWm); | ||
1733 | 297 | g_print ("***** WM: %s / %s\n", myData.wmc?myData.wmc->cName:NULL, myData.wmfb?myData.wmfb->cName:NULL); | ||
1734 | 298 | } | ||
1735 | 299 | void cd_define_prefered_wms (void) | ||
1736 | 300 | { | ||
1737 | 301 | gchar *ps = _get_running_wm (); | ||
1738 | 302 | _define_prefered_wms (ps); | ||
1739 | 303 | g_free (ps); | ||
1740 | 304 | } | ||
1741 | 305 | |||
1742 | 306 | ///////////////// | ||
1743 | 307 | /// INIT/STOP /// | ||
1744 | 308 | ///////////////// | ||
1745 | 309 | |||
1746 | 310 | static void _check_wms (CDSharedMemory *pSharedMemory) | ||
1747 | 311 | { | ||
1748 | 312 | pSharedMemory->which = cairo_dock_launch_command_sync ("which compiz kwin xfwm4 metacity"); | ||
1749 | 313 | |||
1750 | 314 | pSharedMemory->ps = _get_running_wm (); | ||
1751 | 315 | } | ||
1752 | 316 | static void _update_from_data (CDSharedMemory *pSharedMemory) | ||
1753 | 317 | { | ||
1754 | 318 | _check_available_wms (pSharedMemory->which); | ||
1755 | 319 | |||
1756 | 320 | _define_prefered_wms (pSharedMemory->ps); // we do it once we know the current state. | ||
1757 | 321 | |||
1758 | 322 | cairo_dock_discard_task (myData.pTask); | ||
1759 | 323 | myData.pTask = NULL; | ||
1760 | 324 | } | ||
1761 | 325 | |||
1762 | 326 | static void _free_shared_memory (CDSharedMemory *pSharedMemory) | ||
1763 | 327 | { | ||
1764 | 328 | g_free (pSharedMemory->which); | ||
1765 | 329 | g_free (pSharedMemory->ps); | ||
1766 | 330 | g_free (pSharedMemory); | ||
1767 | 331 | } | ||
1768 | 332 | void cd_init_wms (void) | ||
1769 | 333 | { | ||
1770 | 334 | _define_known_wms (); | ||
1771 | 335 | |||
1772 | 336 | _start_watching_composite_state (); | ||
1773 | 337 | |||
1774 | 338 | CDSharedMemory *pSharedMemory = g_new0 (CDSharedMemory, 1); | ||
1775 | 339 | myData.pTask = cairo_dock_new_task_full (0, // one-shot | ||
1776 | 340 | (CairoDockGetDataAsyncFunc) _check_wms, | ||
1777 | 341 | (CairoDockUpdateSyncFunc) _update_from_data, | ||
1778 | 342 | (GFreeFunc) _free_shared_memory, | ||
1779 | 343 | pSharedMemory); | ||
1780 | 344 | cairo_dock_launch_task_delayed (myData.pTask, 3000); // 3s delay, since we don't need these info right away. | ||
1781 | 345 | } | ||
1782 | 346 | |||
1783 | 347 | |||
1784 | 348 | void cd_stop_wms (void) | ||
1785 | 349 | { | ||
1786 | 350 | // discard task. | ||
1787 | 351 | cairo_dock_discard_task (myData.pTask); | ||
1788 | 352 | |||
1789 | 353 | // stop listening | ||
1790 | 354 | GdkScreen *pScreen = gdk_screen_get_default (); | ||
1791 | 355 | g_signal_handlers_disconnect_by_func (G_OBJECT(pScreen), _on_composited_changed, NULL); | ||
1792 | 356 | |||
1793 | 357 | // reset custom WMs. | ||
1794 | 358 | CDWM *wm; | ||
1795 | 359 | wm = _get_wm_by_index (CD_CUSTOM_WMC); | ||
1796 | 360 | g_free ((gchar*)wm->cCommand); | ||
1797 | 361 | wm = _get_wm_by_index (CD_CUSTOM_WMFB); | ||
1798 | 362 | g_free ((gchar*)wm->cCommand); | ||
1799 | 363 | } | ||
1800 | 364 | |||
1801 | 365 | |||
1802 | 366 | //////////// | ||
1803 | 367 | /// DRAW /// | ||
1804 | 368 | //////////// | ||
1805 | 369 | |||
1806 | 370 | void cd_draw_current_state (void) | ||
1807 | 371 | { | ||
1808 | 372 | g_print ("%s (%d)\n", __func__, myData.bIsComposited); | ||
1809 | 373 | if (myData.bIsComposited) | ||
1810 | 374 | CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconCompositeON, "composite-on.png"); | ||
1811 | 375 | else | ||
1812 | 376 | CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconCompositeOFF, "composite-off.png"); | ||
1813 | 377 | } | ||
1814 | 378 | |||
1815 | 379 | |||
1816 | 380 | ///////////////////// | ||
1817 | 381 | /// TOGGLE ON/OFF /// | ||
1818 | 382 | ///////////////////// | ||
1819 | 383 | |||
1820 | 384 | static gboolean _activate_composite_delayed (gpointer data) | ||
1821 | 385 | { | ||
1822 | 386 | if (data) | ||
1823 | 387 | { | ||
1824 | 388 | if (myData.wmc->activate_composite != NULL) | ||
1825 | 389 | myData.wmc->activate_composite (TRUE); | ||
1826 | 390 | } | ||
1827 | 391 | else | ||
1828 | 392 | { | ||
1829 | 393 | if (myData.wmfb->activate_composite != NULL) | ||
1830 | 394 | myData.wmfb->activate_composite (FALSE); | ||
1831 | 395 | } | ||
1832 | 396 | return FALSE; | ||
1833 | 397 | } | ||
1834 | 398 | |||
1835 | 399 | static gboolean _wm_is_running (CDWM *wm) | ||
1836 | 400 | { | ||
1837 | 401 | const gchar *cCommand = wm->cCommand; | ||
1838 | 402 | gchar *cWhich = g_strdup_printf ("pgrep %s$", cCommand); // see above for the '$' character. | ||
1839 | 403 | gchar *str = strchr (cWhich+6, ' '); // remove any parameter to the command, we just want the program name. | ||
1840 | 404 | if (str) // a space is found. | ||
1841 | 405 | { | ||
1842 | 406 | *str = '$'; | ||
1843 | 407 | *(str+1) = '\0'; | ||
1844 | 408 | } | ||
1845 | 409 | gchar *cResult = cairo_dock_launch_command_sync (cWhich); | ||
1846 | 410 | gboolean bIsRunning = (cResult != NULL && *cResult != '\0'); | ||
1847 | 411 | |||
1848 | 412 | g_free (cWhich); | ||
1849 | 413 | g_free (cResult); | ||
1850 | 414 | return bIsRunning; | ||
1851 | 415 | } | ||
1852 | 416 | |||
1853 | 417 | static void cd_turn_composite_on (void) | ||
1854 | 418 | { | ||
1855 | 419 | if (myData.wmc == NULL) // no compositor. | ||
1856 | 420 | { | ||
1857 | 421 | cairo_dock_show_temporary_dialog_with_icon (D_("No compositor is available."), myIcon, myContainer, 6000, "same icon"); | ||
1858 | 422 | return; | ||
1859 | 423 | } | ||
1860 | 424 | |||
1861 | 425 | // if not already launched, launch it. | ||
1862 | 426 | if (! _wm_is_running (myData.wmc)) // not running | ||
1863 | 427 | { | ||
1864 | 428 | cairo_dock_launch_command (myData.wmc->cCommand); | ||
1865 | 429 | g_timeout_add_seconds (2, _activate_composite_delayed, GINT_TO_POINTER (1)); // let the WM start for 2s. | ||
1866 | 430 | } | ||
1867 | 431 | else // already running, just toggle composite ON. | ||
1868 | 432 | { | ||
1869 | 433 | if (myData.wmc->activate_composite != NULL) | ||
1870 | 434 | myData.wmc->activate_composite (TRUE); | ||
1871 | 435 | else | ||
1872 | 436 | cairo_dock_show_temporary_dialog_with_icon (D_("No compositor is available."), myIcon, myContainer, 6000, "same icon"); | ||
1873 | 437 | } | ||
1874 | 438 | } | ||
1875 | 439 | |||
1876 | 440 | static void cd_turn_composite_off (void) | ||
1877 | 441 | { | ||
1878 | 442 | if (myData.wmfb == NULL) // no fallback. | ||
1879 | 443 | { | ||
1880 | 444 | cairo_dock_show_temporary_dialog_with_icon (D_("No fallback is available."), myIcon, myContainer, 6000, "same icon"); | ||
1881 | 445 | return; | ||
1882 | 446 | } | ||
1883 | 447 | |||
1884 | 448 | // if not already launched, launch it. | ||
1885 | 449 | if (! _wm_is_running (myData.wmfb)) // not running | ||
1886 | 450 | { | ||
1887 | 451 | cairo_dock_launch_command (myData.wmfb->cCommand); | ||
1888 | 452 | g_timeout_add_seconds (2, _activate_composite_delayed, 0); // let the WM start for 2s. | ||
1889 | 453 | } | ||
1890 | 454 | else // already running, just toggle composite OFF. | ||
1891 | 455 | { | ||
1892 | 456 | if (myData.wmfb->activate_composite != NULL) | ||
1893 | 457 | myData.wmfb->activate_composite (FALSE); | ||
1894 | 458 | else | ||
1895 | 459 | cairo_dock_show_temporary_dialog_with_icon (D_("No fallback is available."), myIcon, myContainer, 6000, "same icon"); | ||
1896 | 460 | } | ||
1897 | 461 | } | ||
1898 | 462 | |||
1899 | 463 | void cd_toggle_composite (void) | ||
1900 | 464 | { | ||
1901 | 465 | if (myData.bIsComposited) | ||
1902 | 466 | cd_turn_composite_off (); | ||
1903 | 467 | else | ||
1904 | 468 | cd_turn_composite_on (); | ||
1905 | 469 | } | ||
1906 | 470 | |||
1907 | 471 | |||
1908 | 472 | /////////////////// | ||
1909 | 473 | /// CONFIG TOOL /// | ||
1910 | 474 | /////////////////// | ||
1911 | 475 | |||
1912 | 476 | static const gchar *_get_config_tool (void) | ||
1913 | 477 | { | ||
1914 | 478 | if (myData.bIsComposited && myData.wmc) | ||
1915 | 479 | { | ||
1916 | 480 | return myData.wmc->cConfigTool; | ||
1917 | 481 | } | ||
1918 | 482 | else if (!myData.bIsComposited && myData.wmfb) | ||
1919 | 483 | { | ||
1920 | 484 | return myData.wmfb->cConfigTool; | ||
1921 | 485 | } | ||
1922 | 486 | return NULL; | ||
1923 | 487 | } | ||
1924 | 488 | void cd_open_wm_config (void) | ||
1925 | 489 | { | ||
1926 | 490 | const gchar *cConfigTool = _get_config_tool (); | ||
1927 | 491 | |||
1928 | 492 | if (cConfigTool != NULL) | ||
1929 | 493 | { | ||
1930 | 494 | gchar *cmd = g_strdup_printf ("which %s", cConfigTool); | ||
1931 | 495 | gchar *cResult = cairo_dock_launch_command_sync (cmd); | ||
1932 | 496 | g_free (cmd); | ||
1933 | 497 | if (cResult == NULL || *cResult != '/') | ||
1934 | 498 | { | ||
1935 | 499 | gchar *msg = g_strdup_printf (D_("You need to install '%s'"), cConfigTool); | ||
1936 | 500 | cairo_dock_show_temporary_dialog_with_icon (msg, myIcon, myContainer, 6000, "same icon"); | ||
1937 | 501 | g_free (msg); | ||
1938 | 502 | } | ||
1939 | 503 | else | ||
1940 | 504 | { | ||
1941 | 505 | cairo_dock_launch_command (cConfigTool); | ||
1942 | 506 | } | ||
1943 | 507 | } | ||
1944 | 508 | else | ||
1945 | 509 | { | ||
1946 | 510 | cairo_dock_show_temporary_dialog_with_icon (D_("No configuration tool is available."), myIcon, myContainer, 6000, "same icon"); | ||
1947 | 511 | } | ||
1948 | 512 | } | ||
1949 | 513 | |||
1950 | 514 | |||
1951 | 515 | static const gchar *_get_command (void) | ||
1952 | 516 | { | ||
1953 | 517 | if (myData.bIsComposited && myData.wmc) | ||
1954 | 518 | { | ||
1955 | 519 | return myData.wmc->cCommand; | ||
1956 | 520 | } | ||
1957 | 521 | else if (!myData.bIsComposited && myData.wmfb) | ||
1958 | 522 | { | ||
1959 | 523 | return myData.wmfb->cCommand; | ||
1960 | 524 | } | ||
1961 | 525 | return NULL; | ||
1962 | 526 | } | ||
1963 | 527 | |||
1964 | 528 | void cd_reload_wm (void) | ||
1965 | 529 | { | ||
1966 | 530 | const gchar *cCommand = _get_command (); | ||
1967 | 531 | if (cCommand != NULL) | ||
1968 | 532 | { | ||
1969 | 533 | cairo_dock_launch_command (cCommand); | ||
1970 | 534 | } | ||
1971 | 535 | } | ||
1972 | 0 | 536 | ||
1973 | === added file 'Composite-Manager/src/applet-composite-manager.h' | |||
1974 | --- Composite-Manager/src/applet-composite-manager.h 1970-01-01 00:00:00 +0000 | |||
1975 | +++ Composite-Manager/src/applet-composite-manager.h 2011-08-09 20:07:46 +0000 | |||
1976 | @@ -0,0 +1,46 @@ | |||
1977 | 1 | /** | ||
1978 | 2 | * This file is a part of the Cairo-Dock project | ||
1979 | 3 | * | ||
1980 | 4 | * Copyright : (C) see the 'copyright' file. | ||
1981 | 5 | * E-mail : see the 'copyright' file. | ||
1982 | 6 | * | ||
1983 | 7 | * This program is free software; you can redistribute it and/or | ||
1984 | 8 | * modify it under the terms of the GNU General Public License | ||
1985 | 9 | * as published by the Free Software Foundation; either version 3 | ||
1986 | 10 | * of the License, or (at your option) any later version. | ||
1987 | 11 | * | ||
1988 | 12 | * This program is distributed in the hope that it will be useful, | ||
1989 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1990 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1991 | 15 | * GNU General Public License for more details. | ||
1992 | 16 | * You should have received a copy of the GNU General Public License | ||
1993 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1994 | 18 | */ | ||
1995 | 19 | |||
1996 | 20 | #ifndef __APPLET_COMPOSITE_MANAGER__ | ||
1997 | 21 | #define __APPLET_COMPOSITE_MANAGER__ | ||
1998 | 22 | |||
1999 | 23 | #include <cairo-dock.h> | ||
2000 | 24 | |||
2001 | 25 | |||
2002 | 26 | void cd_init_wms (void); | ||
2003 | 27 | |||
2004 | 28 | void cd_stop_wms (void); | ||
2005 | 29 | |||
2006 | 30 | |||
2007 | 31 | void cd_define_prefered_wms (void); | ||
2008 | 32 | |||
2009 | 33 | |||
2010 | 34 | void cd_draw_current_state (void); | ||
2011 | 35 | |||
2012 | 36 | |||
2013 | 37 | void cd_toggle_composite (void); | ||
2014 | 38 | |||
2015 | 39 | |||
2016 | 40 | void cd_open_wm_config (void); | ||
2017 | 41 | |||
2018 | 42 | |||
2019 | 43 | void cd_reload_wm (void); | ||
2020 | 44 | |||
2021 | 45 | |||
2022 | 46 | #endif | ||
2023 | 0 | 47 | ||
2024 | === added file 'Composite-Manager/src/applet-config.c' | |||
2025 | --- Composite-Manager/src/applet-config.c 1970-01-01 00:00:00 +0000 | |||
2026 | +++ Composite-Manager/src/applet-config.c 2011-08-09 20:07:46 +0000 | |||
2027 | @@ -0,0 +1,63 @@ | |||
2028 | 1 | /** | ||
2029 | 2 | * This file is a part of the Cairo-Dock project | ||
2030 | 3 | * | ||
2031 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2032 | 5 | * E-mail : see the 'copyright' file. | ||
2033 | 6 | * | ||
2034 | 7 | * This program is free software; you can redistribute it and/or | ||
2035 | 8 | * modify it under the terms of the GNU General Public License | ||
2036 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2037 | 10 | * of the License, or (at your option) any later version. | ||
2038 | 11 | * | ||
2039 | 12 | * This program is distributed in the hope that it will be useful, | ||
2040 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2041 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2042 | 15 | * GNU General Public License for more details. | ||
2043 | 16 | * You should have received a copy of the GNU General Public License | ||
2044 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2045 | 18 | */ | ||
2046 | 19 | |||
2047 | 20 | #include <cairo-dock.h> | ||
2048 | 21 | |||
2049 | 22 | #include "applet-struct.h" | ||
2050 | 23 | #include "applet-composite-manager.h" | ||
2051 | 24 | #include "applet-config.h" | ||
2052 | 25 | |||
2053 | 26 | |||
2054 | 27 | static void _cd_on_keybinding_pull (const char *keystring, gpointer user_data) | ||
2055 | 28 | { | ||
2056 | 29 | cd_toggle_composite (); | ||
2057 | 30 | } | ||
2058 | 31 | |||
2059 | 32 | CD_APPLET_GET_CONFIG_BEGIN | ||
2060 | 33 | myConfig.cWmCompositor = CD_CONFIG_GET_STRING ("Configuration", "compositor"); | ||
2061 | 34 | myConfig.cWmFallback = CD_CONFIG_GET_STRING ("Configuration", "fallback"); | ||
2062 | 35 | |||
2063 | 36 | myConfig.cIconCompositeON = CD_CONFIG_GET_STRING ("Configuration", "icon on"); | ||
2064 | 37 | myConfig.cIconCompositeOFF = CD_CONFIG_GET_STRING ("Configuration", "icon off"); | ||
2065 | 38 | |||
2066 | 39 | myConfig.bAskBeforeSwitching = CD_CONFIG_GET_BOOLEAN ("Configuration", "ask"); | ||
2067 | 40 | |||
2068 | 41 | myConfig.iActionOnMiddleClick = CD_CONFIG_GET_INTEGER ("Configuration", "action on click"); | ||
2069 | 42 | |||
2070 | 43 | myConfig.cShortCut = CD_CONFIG_GET_STRING ("Configuration", "shortkey"); | ||
2071 | 44 | cd_keybinder_bind (myConfig.cShortCut, (CDBindkeyHandler)_cd_on_keybinding_pull, (gpointer)NULL); | ||
2072 | 45 | CD_APPLET_GET_CONFIG_END | ||
2073 | 46 | |||
2074 | 47 | |||
2075 | 48 | CD_APPLET_RESET_CONFIG_BEGIN | ||
2076 | 49 | g_free (myConfig.cWmCompositor); | ||
2077 | 50 | g_free (myConfig.cWmFallback); | ||
2078 | 51 | g_free (myConfig.cIconCompositeON); | ||
2079 | 52 | g_free (myConfig.cIconCompositeOFF); | ||
2080 | 53 | if (myConfig.cShortCut) | ||
2081 | 54 | { | ||
2082 | 55 | cd_keybinder_unbind(myConfig.cShortCut, (CDBindkeyHandler)_cd_on_keybinding_pull); | ||
2083 | 56 | g_free (myConfig.cShortCut); | ||
2084 | 57 | } | ||
2085 | 58 | CD_APPLET_RESET_CONFIG_END | ||
2086 | 59 | |||
2087 | 60 | |||
2088 | 61 | CD_APPLET_RESET_DATA_BEGIN | ||
2089 | 62 | |||
2090 | 63 | CD_APPLET_RESET_DATA_END | ||
2091 | 0 | 64 | ||
2092 | === added file 'Composite-Manager/src/applet-config.h' | |||
2093 | --- Composite-Manager/src/applet-config.h 1970-01-01 00:00:00 +0000 | |||
2094 | +++ Composite-Manager/src/applet-config.h 2011-08-09 20:07:46 +0000 | |||
2095 | @@ -0,0 +1,30 @@ | |||
2096 | 1 | /** | ||
2097 | 2 | * This file is a part of the Cairo-Dock project | ||
2098 | 3 | * | ||
2099 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2100 | 5 | * E-mail : see the 'copyright' file. | ||
2101 | 6 | * | ||
2102 | 7 | * This program is free software; you can redistribute it and/or | ||
2103 | 8 | * modify it under the terms of the GNU General Public License | ||
2104 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2105 | 10 | * of the License, or (at your option) any later version. | ||
2106 | 11 | * | ||
2107 | 12 | * This program is distributed in the hope that it will be useful, | ||
2108 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2109 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2110 | 15 | * GNU General Public License for more details. | ||
2111 | 16 | * You should have received a copy of the GNU General Public License | ||
2112 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2113 | 18 | */ | ||
2114 | 19 | |||
2115 | 20 | |||
2116 | 21 | #ifndef __APPLET_CONFIG__ | ||
2117 | 22 | #define __APPLET_CONFIG__ | ||
2118 | 23 | |||
2119 | 24 | #include <cairo-dock.h> | ||
2120 | 25 | |||
2121 | 26 | |||
2122 | 27 | CD_APPLET_CONFIG_H | ||
2123 | 28 | |||
2124 | 29 | |||
2125 | 30 | #endif | ||
2126 | 0 | 31 | ||
2127 | === added file 'Composite-Manager/src/applet-init.c' | |||
2128 | --- Composite-Manager/src/applet-init.c 1970-01-01 00:00:00 +0000 | |||
2129 | +++ Composite-Manager/src/applet-init.c 2011-08-09 20:07:46 +0000 | |||
2130 | @@ -0,0 +1,73 @@ | |||
2131 | 1 | /** | ||
2132 | 2 | * This file is a part of the Cairo-Dock project | ||
2133 | 3 | * | ||
2134 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2135 | 5 | * E-mail : see the 'copyright' file. | ||
2136 | 6 | * | ||
2137 | 7 | * This program is free software; you can redistribute it and/or | ||
2138 | 8 | * modify it under the terms of the GNU General Public License | ||
2139 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2140 | 10 | * of the License, or (at your option) any later version. | ||
2141 | 11 | * | ||
2142 | 12 | * This program is distributed in the hope that it will be useful, | ||
2143 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2144 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2145 | 15 | * GNU General Public License for more details. | ||
2146 | 16 | * You should have received a copy of the GNU General Public License | ||
2147 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2148 | 18 | */ | ||
2149 | 19 | |||
2150 | 20 | #include "applet-config.h" | ||
2151 | 21 | #include "applet-notifications.h" | ||
2152 | 22 | #include "applet-struct.h" | ||
2153 | 23 | #include "applet-composite-manager.h" | ||
2154 | 24 | #include "applet-init.h" | ||
2155 | 25 | |||
2156 | 26 | |||
2157 | 27 | CD_APPLET_DEFINITION (N_("Composite-Manager"), | ||
2158 | 28 | 2, 3, 0, | ||
2159 | 29 | CAIRO_DOCK_CATEGORY_APPLET_DESKTOP, | ||
2160 | 30 | N_("This applet allows you to <b>toggle the composite ON/OFF</b>.\n" | ||
2161 | 31 | "The composite is what allows transparency on the desktop, but it can slow down your PC, especially during games.\n" | ||
2162 | 32 | "<b>Click</b> on the icon to switch the composite ON/OFF. You can define a <b>shortcut</b> for this action.\n" | ||
2163 | 33 | "The applet also lets you acces to some actions of the Window-Manager, from <b>middle-click and the menu</b>.\n" | ||
2164 | 34 | "You can define in the configuration a Window-Manager that will provide the composite, and another as a fallback."), | ||
2165 | 35 | "Fabounet") | ||
2166 | 36 | |||
2167 | 37 | |||
2168 | 38 | CD_APPLET_INIT_BEGIN | ||
2169 | 39 | if (myDesklet) | ||
2170 | 40 | { | ||
2171 | 41 | CD_APPLET_SET_DESKLET_RENDERER ("Simple"); | ||
2172 | 42 | } | ||
2173 | 43 | |||
2174 | 44 | cd_init_wms (); | ||
2175 | 45 | |||
2176 | 46 | CD_APPLET_REGISTER_FOR_CLICK_EVENT; | ||
2177 | 47 | CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT; | ||
2178 | 48 | CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT; | ||
2179 | 49 | CD_APPLET_INIT_END | ||
2180 | 50 | |||
2181 | 51 | |||
2182 | 52 | CD_APPLET_STOP_BEGIN | ||
2183 | 53 | cd_stop_wms (); | ||
2184 | 54 | |||
2185 | 55 | CD_APPLET_UNREGISTER_FOR_CLICK_EVENT; | ||
2186 | 56 | CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT; | ||
2187 | 57 | CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT; | ||
2188 | 58 | CD_APPLET_STOP_END | ||
2189 | 59 | |||
2190 | 60 | |||
2191 | 61 | CD_APPLET_RELOAD_BEGIN | ||
2192 | 62 | if (CD_APPLET_MY_CONFIG_CHANGED) | ||
2193 | 63 | { | ||
2194 | 64 | if (myDesklet && CD_APPLET_MY_CONTAINER_TYPE_CHANGED) // we are now in a desklet, set a renderer. | ||
2195 | 65 | { | ||
2196 | 66 | CD_APPLET_SET_DESKLET_RENDERER ("Simple"); | ||
2197 | 67 | } | ||
2198 | 68 | |||
2199 | 69 | cd_define_prefered_wms (); | ||
2200 | 70 | |||
2201 | 71 | cd_draw_current_state (); | ||
2202 | 72 | } | ||
2203 | 73 | CD_APPLET_RELOAD_END | ||
2204 | 0 | 74 | ||
2205 | === added file 'Composite-Manager/src/applet-init.h' | |||
2206 | --- Composite-Manager/src/applet-init.h 1970-01-01 00:00:00 +0000 | |||
2207 | +++ Composite-Manager/src/applet-init.h 2011-08-09 20:07:46 +0000 | |||
2208 | @@ -0,0 +1,31 @@ | |||
2209 | 1 | /** | ||
2210 | 2 | * This file is a part of the Cairo-Dock project | ||
2211 | 3 | * | ||
2212 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2213 | 5 | * E-mail : see the 'copyright' file. | ||
2214 | 6 | * | ||
2215 | 7 | * This program is free software; you can redistribute it and/or | ||
2216 | 8 | * modify it under the terms of the GNU General Public License | ||
2217 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2218 | 10 | * of the License, or (at your option) any later version. | ||
2219 | 11 | * | ||
2220 | 12 | * This program is distributed in the hope that it will be useful, | ||
2221 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2222 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2223 | 15 | * GNU General Public License for more details. | ||
2224 | 16 | * You should have received a copy of the GNU General Public License | ||
2225 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2226 | 18 | */ | ||
2227 | 19 | |||
2228 | 20 | |||
2229 | 21 | #ifndef __APPLET_INIT__ | ||
2230 | 22 | #define __APPLET_INIT__ | ||
2231 | 23 | |||
2232 | 24 | |||
2233 | 25 | #include <cairo-dock.h> | ||
2234 | 26 | |||
2235 | 27 | |||
2236 | 28 | CD_APPLET_H | ||
2237 | 29 | |||
2238 | 30 | |||
2239 | 31 | #endif | ||
2240 | 0 | 32 | ||
2241 | === added file 'Composite-Manager/src/applet-notifications.c' | |||
2242 | --- Composite-Manager/src/applet-notifications.c 1970-01-01 00:00:00 +0000 | |||
2243 | +++ Composite-Manager/src/applet-notifications.c 2011-08-09 20:07:46 +0000 | |||
2244 | @@ -0,0 +1,170 @@ | |||
2245 | 1 | /** | ||
2246 | 2 | * This file is a part of the Cairo-Dock project | ||
2247 | 3 | * | ||
2248 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2249 | 5 | * E-mail : see the 'copyright' file. | ||
2250 | 6 | * | ||
2251 | 7 | * This program is free software; you can redistribute it and/or | ||
2252 | 8 | * modify it under the terms of the GNU General Public License | ||
2253 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2254 | 10 | * of the License, or (at your option) any later version. | ||
2255 | 11 | * | ||
2256 | 12 | * This program is distributed in the hope that it will be useful, | ||
2257 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2258 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2259 | 15 | * GNU General Public License for more details. | ||
2260 | 16 | * You should have received a copy of the GNU General Public License | ||
2261 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2262 | 18 | */ | ||
2263 | 19 | |||
2264 | 20 | #define _BSD_SOURCE | ||
2265 | 21 | #include <stdlib.h> | ||
2266 | 22 | #include <stdio.h> | ||
2267 | 23 | #include <string.h> | ||
2268 | 24 | #include <unistd.h> | ||
2269 | 25 | #include <glib/gi18n.h> | ||
2270 | 26 | #include <glib/gstdio.h> | ||
2271 | 27 | |||
2272 | 28 | #include "applet-struct.h" | ||
2273 | 29 | #include "applet-notifications.h" | ||
2274 | 30 | #include "applet-composite-manager.h" | ||
2275 | 31 | |||
2276 | 32 | static void _on_answer (int iClickedButton, GtkWidget *pInteractiveWidget, gpointer data, CairoDialog *pDialog) | ||
2277 | 33 | { | ||
2278 | 34 | if (iClickedButton == 0 || iClickedButton == -1) // ok or Enter | ||
2279 | 35 | { | ||
2280 | 36 | cd_toggle_composite (); | ||
2281 | 37 | } | ||
2282 | 38 | } | ||
2283 | 39 | |||
2284 | 40 | CD_APPLET_ON_CLICK_BEGIN | ||
2285 | 41 | if (myConfig.bAskBeforeSwitching) | ||
2286 | 42 | { | ||
2287 | 43 | cairo_dock_show_dialog_full (D_("Toggle composite?"), myIcon, myContainer, 0, "same icon", NULL, (CairoDockActionOnAnswerFunc)_on_answer, NULL, NULL); | ||
2288 | 44 | } | ||
2289 | 45 | else | ||
2290 | 46 | { | ||
2291 | 47 | cd_toggle_composite (); | ||
2292 | 48 | } | ||
2293 | 49 | CD_APPLET_ON_CLICK_END | ||
2294 | 50 | |||
2295 | 51 | |||
2296 | 52 | static void _cd_show_desktop (void) | ||
2297 | 53 | { | ||
2298 | 54 | gboolean bDesktopIsVisible = cairo_dock_desktop_is_visible (); | ||
2299 | 55 | cairo_dock_show_hide_desktop (! bDesktopIsVisible); | ||
2300 | 56 | } | ||
2301 | 57 | static void _cd_expose_windows (void) | ||
2302 | 58 | { | ||
2303 | 59 | cairo_dock_wm_present_windows (); | ||
2304 | 60 | } | ||
2305 | 61 | static gboolean _cd_expose_windows_idle (gpointer data) | ||
2306 | 62 | { | ||
2307 | 63 | _cd_expose_windows (); | ||
2308 | 64 | return FALSE; | ||
2309 | 65 | } | ||
2310 | 66 | static void _cd_expose_desktops (void) | ||
2311 | 67 | { | ||
2312 | 68 | cairo_dock_wm_present_desktops (); | ||
2313 | 69 | } | ||
2314 | 70 | static void _cd_show_widget_layer (void) | ||
2315 | 71 | { | ||
2316 | 72 | cairo_dock_wm_show_widget_layer (); | ||
2317 | 73 | } | ||
2318 | 74 | |||
2319 | 75 | CD_APPLET_ON_MIDDLE_CLICK_BEGIN | ||
2320 | 76 | switch (myConfig.iActionOnMiddleClick) | ||
2321 | 77 | { | ||
2322 | 78 | |||
2323 | 79 | case CD_EDIT_CONFIG: | ||
2324 | 80 | { | ||
2325 | 81 | cd_open_wm_config(); | ||
2326 | 82 | } | ||
2327 | 83 | break; | ||
2328 | 84 | case CD_RELOAD_WM: | ||
2329 | 85 | { | ||
2330 | 86 | cd_reload_wm(); | ||
2331 | 87 | } | ||
2332 | 88 | break; | ||
2333 | 89 | case CD_SHOW_DESKTOP: | ||
2334 | 90 | { | ||
2335 | 91 | _cd_show_desktop (); | ||
2336 | 92 | } | ||
2337 | 93 | break; | ||
2338 | 94 | case CD_EXPOSE_DESKTOPS: | ||
2339 | 95 | { | ||
2340 | 96 | _cd_expose_desktops (); | ||
2341 | 97 | } | ||
2342 | 98 | break; | ||
2343 | 99 | case CD_EXPOSE_WINDOWS: | ||
2344 | 100 | { | ||
2345 | 101 | // ok this is just crazy: if you call the Scale dbus method of Compiz before the middle button is released, it doesn't work. | ||
2346 | 102 | g_timeout_add (300, _cd_expose_windows_idle, NULL); | ||
2347 | 103 | } | ||
2348 | 104 | break; | ||
2349 | 105 | case CD_SHOW_WIDGET_LAYER: | ||
2350 | 106 | { | ||
2351 | 107 | _cd_show_widget_layer (); | ||
2352 | 108 | } | ||
2353 | 109 | break; | ||
2354 | 110 | default: // shouldn't happen. | ||
2355 | 111 | cd_warning ("problem in the config!"); | ||
2356 | 112 | break; | ||
2357 | 113 | } | ||
2358 | 114 | CD_APPLET_ON_MIDDLE_CLICK_END | ||
2359 | 115 | |||
2360 | 116 | |||
2361 | 117 | CD_APPLET_ON_BUILD_MENU_BEGIN | ||
2362 | 118 | gchar *cLabel; | ||
2363 | 119 | |||
2364 | 120 | cLabel = (myConfig.iActionOnMiddleClick == CD_EDIT_CONFIG ? g_strdup_printf ("%s (%s)", D_("Edit Window-Manager settings"), D_("middle-click")) : g_strdup (D_("Edit Window-Manager settings"))); | ||
2365 | 121 | CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel, | ||
2366 | 122 | GTK_STOCK_EDIT, | ||
2367 | 123 | cd_open_wm_config, | ||
2368 | 124 | CD_APPLET_MY_MENU); | ||
2369 | 125 | g_free (cLabel); | ||
2370 | 126 | |||
2371 | 127 | cLabel = (myConfig.iActionOnMiddleClick == CD_RELOAD_WM ? g_strdup_printf ("%s (%s)", D_("Reload Window-Manager"), D_("middle-click")) : g_strdup (D_("Reload Window-Manager"))); | ||
2372 | 128 | CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel, | ||
2373 | 129 | GTK_STOCK_REFRESH, | ||
2374 | 130 | cd_reload_wm, | ||
2375 | 131 | CD_APPLET_MY_MENU); | ||
2376 | 132 | g_free (cLabel); | ||
2377 | 133 | |||
2378 | 134 | CD_APPLET_ADD_SEPARATOR_IN_MENU (CD_APPLET_MY_MENU); | ||
2379 | 135 | |||
2380 | 136 | cLabel = (myConfig.iActionOnMiddleClick == CD_SHOW_DESKTOP ? g_strdup_printf ("%s (%s)", D_("Show desktop"), D_("middle-click")) : g_strdup (D_("Show desktop"))); | ||
2381 | 137 | CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel, | ||
2382 | 138 | MY_APPLET_SHARE_DATA_DIR"/../shared-images/show-desktop.svg", | ||
2383 | 139 | _cd_show_desktop, | ||
2384 | 140 | CD_APPLET_MY_MENU); | ||
2385 | 141 | g_free (cLabel); | ||
2386 | 142 | |||
2387 | 143 | if (cairo_dock_wm_can_present_desktops ()) | ||
2388 | 144 | { | ||
2389 | 145 | cLabel = (myConfig.iActionOnMiddleClick == CD_EXPOSE_DESKTOPS ? g_strdup_printf ("%s (%s)", D_("Expose all the desktops"), D_("middle-click")) : g_strdup (D_("Expose all the desktops"))); | ||
2390 | 146 | CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel, | ||
2391 | 147 | MY_APPLET_SHARE_DATA_DIR"/../shared-images/expose-desktops.svg", | ||
2392 | 148 | _cd_expose_desktops, | ||
2393 | 149 | CD_APPLET_MY_MENU); | ||
2394 | 150 | g_free (cLabel); | ||
2395 | 151 | } | ||
2396 | 152 | if (cairo_dock_wm_can_present_windows ()) | ||
2397 | 153 | { | ||
2398 | 154 | cLabel = (myConfig.iActionOnMiddleClick == CD_EXPOSE_WINDOWS ? g_strdup_printf ("%s (%s)", D_("Expose all the windows"), D_("middle-click")) : g_strdup (D_("Expose all the windows"))); | ||
2399 | 155 | CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel, | ||
2400 | 156 | MY_APPLET_SHARE_DATA_DIR"/../shared-images/expose-windows.svg", | ||
2401 | 157 | _cd_expose_windows, | ||
2402 | 158 | CD_APPLET_MY_MENU); | ||
2403 | 159 | g_free (cLabel); | ||
2404 | 160 | } | ||
2405 | 161 | if (cairo_dock_wm_can_show_widget_layer ()) | ||
2406 | 162 | { | ||
2407 | 163 | cLabel = (myConfig.iActionOnMiddleClick == CD_SHOW_WIDGET_LAYER ? g_strdup_printf ("%s (%s)", D_("Show the Widget Layer"), D_("middle-click")) : g_strdup (D_("Show the Widget Layer"))); | ||
2408 | 164 | CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel, | ||
2409 | 165 | GTK_STOCK_LEAVE_FULLSCREEN, | ||
2410 | 166 | _cd_show_widget_layer, | ||
2411 | 167 | CD_APPLET_MY_MENU); | ||
2412 | 168 | g_free (cLabel); | ||
2413 | 169 | } | ||
2414 | 170 | CD_APPLET_ON_BUILD_MENU_END | ||
2415 | 0 | 171 | ||
2416 | === added file 'Composite-Manager/src/applet-notifications.h' | |||
2417 | --- Composite-Manager/src/applet-notifications.h 1970-01-01 00:00:00 +0000 | |||
2418 | +++ Composite-Manager/src/applet-notifications.h 2011-08-09 20:07:46 +0000 | |||
2419 | @@ -0,0 +1,35 @@ | |||
2420 | 1 | /** | ||
2421 | 2 | * This file is a part of the Cairo-Dock project | ||
2422 | 3 | * | ||
2423 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2424 | 5 | * E-mail : see the 'copyright' file. | ||
2425 | 6 | * | ||
2426 | 7 | * This program is free software; you can redistribute it and/or | ||
2427 | 8 | * modify it under the terms of the GNU General Public License | ||
2428 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2429 | 10 | * of the License, or (at your option) any later version. | ||
2430 | 11 | * | ||
2431 | 12 | * This program is distributed in the hope that it will be useful, | ||
2432 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2433 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2434 | 15 | * GNU General Public License for more details. | ||
2435 | 16 | * You should have received a copy of the GNU General Public License | ||
2436 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2437 | 18 | */ | ||
2438 | 19 | |||
2439 | 20 | |||
2440 | 21 | #ifndef __APPLET_NOTIFICATIONS__ | ||
2441 | 22 | #define __APPLET_NOTIFICATIONS__ | ||
2442 | 23 | |||
2443 | 24 | |||
2444 | 25 | #include <cairo-dock.h> | ||
2445 | 26 | |||
2446 | 27 | |||
2447 | 28 | |||
2448 | 29 | CD_APPLET_ON_CLICK_H | ||
2449 | 30 | |||
2450 | 31 | CD_APPLET_ON_BUILD_MENU_H | ||
2451 | 32 | |||
2452 | 33 | CD_APPLET_ON_MIDDLE_CLICK_H | ||
2453 | 34 | |||
2454 | 35 | #endif | ||
2455 | 0 | 36 | ||
2456 | === added file 'Composite-Manager/src/applet-struct.h' | |||
2457 | --- Composite-Manager/src/applet-struct.h 1970-01-01 00:00:00 +0000 | |||
2458 | +++ Composite-Manager/src/applet-struct.h 2011-08-09 20:07:46 +0000 | |||
2459 | @@ -0,0 +1,83 @@ | |||
2460 | 1 | /** | ||
2461 | 2 | * This file is a part of the Cairo-Dock project | ||
2462 | 3 | * | ||
2463 | 4 | * Copyright : (C) see the 'copyright' file. | ||
2464 | 5 | * E-mail : see the 'copyright' file. | ||
2465 | 6 | * | ||
2466 | 7 | * This program is free software; you can redistribute it and/or | ||
2467 | 8 | * modify it under the terms of the GNU General Public License | ||
2468 | 9 | * as published by the Free Software Foundation; either version 3 | ||
2469 | 10 | * of the License, or (at your option) any later version. | ||
2470 | 11 | * | ||
2471 | 12 | * This program is distributed in the hope that it will be useful, | ||
2472 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2473 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2474 | 15 | * GNU General Public License for more details. | ||
2475 | 16 | * You should have received a copy of the GNU General Public License | ||
2476 | 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2477 | 18 | */ | ||
2478 | 19 | |||
2479 | 20 | |||
2480 | 21 | #ifndef __CD_APPLET_STRUCT__ | ||
2481 | 22 | #define __CD_APPLET_STRUCT__ | ||
2482 | 23 | |||
2483 | 24 | #include <cairo-dock.h> | ||
2484 | 25 | |||
2485 | 26 | typedef struct _CDWM { | ||
2486 | 27 | const gchar *cName; | ||
2487 | 28 | const gchar *cCommand; | ||
2488 | 29 | const gchar *cConfigTool; | ||
2489 | 30 | gboolean bIsAvailable; | ||
2490 | 31 | void (*activate_composite) (gboolean bActive); | ||
2491 | 32 | } CDWM; | ||
2492 | 33 | |||
2493 | 34 | typedef enum { | ||
2494 | 35 | CD_COMPIZ, | ||
2495 | 36 | CD_KWIN, | ||
2496 | 37 | CD_XFWM, | ||
2497 | 38 | CD_METACITY, | ||
2498 | 39 | CD_CUSTOM_WMFB, | ||
2499 | 40 | CD_CUSTOM_WMC, | ||
2500 | 41 | NB_WM | ||
2501 | 42 | } CDWMIndex; | ||
2502 | 43 | |||
2503 | 44 | #define NB_COMPOSITE_WM 4 // 4 of them can do composite | ||
2504 | 45 | #define NB_FALLBACK_WM 3 // 3 of them can do without | ||
2505 | 46 | |||
2506 | 47 | typedef enum { | ||
2507 | 48 | CD_EDIT_CONFIG, | ||
2508 | 49 | CD_RELOAD_WM, | ||
2509 | 50 | CD_SHOW_DESKTOP, | ||
2510 | 51 | CD_EXPOSE_DESKTOPS, | ||
2511 | 52 | CD_EXPOSE_WINDOWS, | ||
2512 | 53 | CD_SHOW_WIDGET_LAYER, | ||
2513 | 54 | CD_NB_ACTIONS | ||
2514 | 55 | } CDWMAction; | ||
2515 | 56 | |||
2516 | 57 | //\___________ structure containing the applet's configuration parameters. | ||
2517 | 58 | struct _AppletConfig { | ||
2518 | 59 | gchar *cWmCompositor; | ||
2519 | 60 | gchar *cWmFallback; | ||
2520 | 61 | gchar *cIconCompositeON; | ||
2521 | 62 | gchar *cIconCompositeOFF; | ||
2522 | 63 | gboolean bAskBeforeSwitching; | ||
2523 | 64 | CDWMAction iActionOnMiddleClick; | ||
2524 | 65 | gchar *cShortCut; | ||
2525 | 66 | } ; | ||
2526 | 67 | |||
2527 | 68 | typedef struct { | ||
2528 | 69 | gchar *which; | ||
2529 | 70 | gchar *ps; | ||
2530 | 71 | } CDSharedMemory; | ||
2531 | 72 | |||
2532 | 73 | //\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc. | ||
2533 | 74 | struct _AppletData { | ||
2534 | 75 | CairoDockTask *pTask; | ||
2535 | 76 | CDWM pWmList[NB_WM]; | ||
2536 | 77 | gboolean bIsComposited; | ||
2537 | 78 | CDWM *wmc; | ||
2538 | 79 | CDWM *wmfb; | ||
2539 | 80 | } ; | ||
2540 | 81 | |||
2541 | 82 | |||
2542 | 83 | #endif | ||
2543 | 0 | 84 | ||
2544 | === modified file 'Dbus/data/Dbus.conf.in' | |||
2545 | --- Dbus/data/Dbus.conf.in 2011-04-20 20:46:51 +0000 | |||
2546 | +++ Dbus/data/Dbus.conf.in 2011-08-09 20:07:46 +0000 | |||
2547 | @@ -1,4 +1,4 @@ | |||
2549 | 1 | #!en;@VERSION_DBUS@ | 1 | #@VERSION_DBUS@ |
2550 | 2 | 2 | ||
2551 | 3 | #[gtk-preferences] | 3 | #[gtk-preferences] |
2552 | 4 | [Configuration] | 4 | [Configuration] |
2553 | 5 | 5 | ||
2554 | === added file 'Dbus/demos/demo_vala/demo_vala.conf' | |||
2555 | --- Dbus/demos/demo_vala/demo_vala.conf 1970-01-01 00:00:00 +0000 | |||
2556 | +++ Dbus/demos/demo_vala/demo_vala.conf 2011-08-09 20:07:46 +0000 | |||
2557 | @@ -0,0 +1,101 @@ | |||
2558 | 1 | #!en;0.0.2 | ||
2559 | 2 | |||
2560 | 3 | #[gtk-about] | ||
2561 | 4 | [Icon] | ||
2562 | 5 | #j+[0;128] Desired icon size for this applet | ||
2563 | 6 | #{Set to 0 to use the default applet size} | ||
2564 | 7 | icon size = 0;0 | ||
2565 | 8 | |||
2566 | 9 | #s Name of the icon as it will appear in its label in the dock : | ||
2567 | 10 | name = Dbus Applet | ||
2568 | 11 | |||
2569 | 12 | #S+ Image's filename : | ||
2570 | 13 | #{Let empty to use the default one.} | ||
2571 | 14 | icon = | ||
2572 | 15 | |||
2573 | 16 | #d Name of the dock it belongs to: | ||
2574 | 17 | dock name = | ||
2575 | 18 | |||
2576 | 19 | order= | ||
2577 | 20 | |||
2578 | 21 | #F[Applet's Handbook] | ||
2579 | 22 | frame_hand= | ||
2580 | 23 | #A | ||
2581 | 24 | handbook=demo_vala | ||
2582 | 25 | |||
2583 | 26 | #[gtk-convert] | ||
2584 | 27 | [Desklet] | ||
2585 | 28 | |||
2586 | 29 | #j+[48;512] Desklet's dimension (width x height) : | ||
2587 | 30 | #{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.} | ||
2588 | 31 | size = 164;96 | ||
2589 | 32 | |||
2590 | 33 | #i[-2048;2048] Desklet's position (x ; y) : | ||
2591 | 34 | #{Depending on your WindowManager, you can move it with ALT + left_click} | ||
2592 | 35 | x position=0 | ||
2593 | 36 | #i[-2048;2048] ... | ||
2594 | 37 | y position=0 | ||
2595 | 38 | |||
2596 | 39 | #b Is detached from the dock ? | ||
2597 | 40 | initially detached=false | ||
2598 | 41 | #l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Accessibility : | ||
2599 | 42 | #{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)} | ||
2600 | 43 | accessibility=0 | ||
2601 | 44 | #b Should be visible on all desktops ? | ||
2602 | 45 | sticky=true | ||
2603 | 46 | |||
2604 | 47 | #b Lock position ? | ||
2605 | 48 | #{If locked, the desklet can't be moved by simply dragging it with the left mouse button. Of course you can still move it with ALT + left_click.} | ||
2606 | 49 | locked = false | ||
2607 | 50 | |||
2608 | 51 | #I[-180;180] Rotation : | ||
2609 | 52 | #{in degrees.} | ||
2610 | 53 | rotation = 0 | ||
2611 | 54 | |||
2612 | 55 | use size= | ||
2613 | 56 | |||
2614 | 57 | #F[Decorations;gtk-orientation-portrait] | ||
2615 | 58 | frame_deco= | ||
2616 | 59 | |||
2617 | 60 | #o+ Choose a decoration theme for this desklet : | ||
2618 | 61 | #{Choose the 'personnal' one to define your own decorations below.} | ||
2619 | 62 | decorations = default | ||
2620 | 63 | |||
2621 | 64 | #v | ||
2622 | 65 | sep_deco = | ||
2623 | 66 | |||
2624 | 67 | #S+ Background image : | ||
2625 | 68 | #{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.} | ||
2626 | 69 | bg desklet = | ||
2627 | 70 | #e+[0;1] Background tansparency : | ||
2628 | 71 | bg alpha = 1 | ||
2629 | 72 | #i+[0;256] Left offset : | ||
2630 | 73 | #{in pixels. Use this to adjust the left position of the drawings.} | ||
2631 | 74 | left offset = 0 | ||
2632 | 75 | #i+[0;256] Top offset : | ||
2633 | 76 | #{in pixels. Use this to adjust the top position of the drawings.} | ||
2634 | 77 | top offset = 0 | ||
2635 | 78 | #i+[0;256] Right offset : | ||
2636 | 79 | #{in pixels. Use this to adjust the right position of the drawings.} | ||
2637 | 80 | right offset = 0 | ||
2638 | 81 | #i+[0;256] Bottom offset : | ||
2639 | 82 | #{in pixels. Use this to adjust the bottom position of the drawings.} | ||
2640 | 83 | bottom offset = 0 | ||
2641 | 84 | #S+ Foreground image : | ||
2642 | 85 | #{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.} | ||
2643 | 86 | fg desklet = | ||
2644 | 87 | #e+[0;1] Foreground tansparency : | ||
2645 | 88 | fg alpha = 1 | ||
2646 | 89 | |||
2647 | 90 | #[gtk-preferences] | ||
2648 | 91 | [Configuration] | ||
2649 | 92 | |||
2650 | 93 | #h+[/usr/share/cairo-dock/gauges;gauges;gauges] Choose one of the available themes :/ | ||
2651 | 94 | theme = Turbo-night | ||
2652 | 95 | |||
2653 | 96 | #i[10;100] Max value : | ||
2654 | 97 | max value = 100 | ||
2655 | 98 | |||
2656 | 99 | #b Yes / No ? | ||
2657 | 100 | yesno = false | ||
2658 | 101 | |||
2659 | 0 | 102 | ||
2660 | === modified file 'Dbus/interfaces/python/CDApplet.py' | |||
2661 | --- Dbus/interfaces/python/CDApplet.py 2011-04-20 20:46:51 +0000 | |||
2662 | +++ Dbus/interfaces/python/CDApplet.py 2011-08-09 20:07:46 +0000 | |||
2663 | @@ -1,4 +1,4 @@ | |||
2665 | 1 | # This is a part of the external demo applet for Cairo-Dock | 1 | # This is a part of the external applets for Cairo-Dock |
2666 | 2 | # Copyright : (C) 2010-2011 by Fabounet | 2 | # Copyright : (C) 2010-2011 by Fabounet |
2667 | 3 | # E-mail : fabounet@glx-dock.org | 3 | # E-mail : fabounet@glx-dock.org |
2668 | 4 | # | 4 | # |
2669 | @@ -24,41 +24,59 @@ | |||
2670 | 24 | import ConfigParser | 24 | import ConfigParser |
2671 | 25 | import gobject | 25 | import gobject |
2672 | 26 | import glib | 26 | import glib |
2673 | 27 | import gettext | ||
2674 | 27 | import dbus | 28 | import dbus |
2675 | 28 | from dbus.mainloop.glib import DBusGMainLoop | 29 | from dbus.mainloop.glib import DBusGMainLoop |
2676 | 29 | 30 | ||
2677 | 30 | DBusGMainLoop(set_as_default=True) | 31 | DBusGMainLoop(set_as_default=True) |
2678 | 31 | 32 | ||
2679 | 33 | INSTALL_PREFIX = os.path.abspath("..") # applets are launched from their install directory, so ".." is the folder containing all applets. | ||
2680 | 34 | |||
2681 | 35 | GETTEXT_NAME = 'cairo-dock-plugins-extra' | ||
2682 | 36 | LOCALE_DIR = INSTALL_PREFIX + '/locale' # user version of /usr/share/locale | ||
2683 | 37 | gettext.textdomain(GETTEXT_NAME) | ||
2684 | 38 | gettext.bind_textdomain_codeset (GETTEXT_NAME, 'UTF-8'); | ||
2685 | 39 | gettext.bindtextdomain(GETTEXT_NAME, LOCALE_DIR) | ||
2686 | 40 | _ = lambda x: gettext.dgettext(GETTEXT_NAME,x) | ||
2687 | 41 | |||
2688 | 32 | #################### | 42 | #################### |
2689 | 33 | ### Applet class ### | 43 | ### Applet class ### |
2690 | 34 | #################### | 44 | #################### |
2691 | 35 | class CDApplet: | 45 | class CDApplet: |
2692 | 36 | 46 | ||
2693 | 47 | ############# | ||
2694 | 48 | ### Enums ### | ||
2695 | 49 | ############# | ||
2696 | 50 | # orientation | ||
2697 | 37 | BOTTOM = 0 | 51 | BOTTOM = 0 |
2698 | 38 | TOP = 1 | 52 | TOP = 1 |
2699 | 39 | RIGHT = 2 | 53 | RIGHT = 2 |
2700 | 40 | LEFT = 3 | 54 | LEFT = 3 |
2702 | 41 | 55 | # container type | |
2703 | 42 | DOCK = 0 | 56 | DOCK = 0 |
2704 | 43 | DESKLET = 1 | 57 | DESKLET = 1 |
2706 | 44 | 58 | # emblem position | |
2707 | 45 | UPPER_LEFT = 0 | 59 | UPPER_LEFT = 0 |
2708 | 46 | LOWER_RIGHT = 1 | 60 | LOWER_RIGHT = 1 |
2709 | 47 | LOWER_LEFT = 2 | 61 | LOWER_LEFT = 2 |
2710 | 48 | UPPER_RIGHT = 3 | 62 | UPPER_RIGHT = 3 |
2711 | 49 | MIDDLE = 4 | 63 | MIDDLE = 4 |
2713 | 50 | 64 | # menu item types | |
2714 | 51 | MENU_ENTRY = 0 | 65 | MENU_ENTRY = 0 |
2715 | 52 | MENU_SUB_MENU = 1 | 66 | MENU_SUB_MENU = 1 |
2716 | 53 | MENU_SEPARATOR = 2 | 67 | MENU_SEPARATOR = 2 |
2717 | 54 | MENU_CHECKBOX = 3 | 68 | MENU_CHECKBOX = 3 |
2718 | 55 | MENU_RADIO_BUTTON = 4 | 69 | MENU_RADIO_BUTTON = 4 |
2720 | 56 | 70 | # main menu ID | |
2721 | 57 | MAIN_MENU_ID = 0 | 71 | MAIN_MENU_ID = 0 |
2723 | 58 | 72 | # dialog key pressed | |
2724 | 59 | DIALOG_KEY_ENTER = -1 | 73 | DIALOG_KEY_ENTER = -1 |
2725 | 60 | DIALOG_KEY_ESCAPE = -2 | 74 | DIALOG_KEY_ESCAPE = -2 |
2726 | 61 | 75 | ||
2727 | 76 | ##################### | ||
2728 | 77 | ### INIT AND DBUS ### | ||
2729 | 78 | ##################### | ||
2730 | 79 | |||
2731 | 62 | def __init__(self): | 80 | def __init__(self): |
2732 | 63 | """ initialize the applet. Must be called by any class that inheritates from it. | 81 | """ initialize the applet. Must be called by any class that inheritates from it. |
2733 | 64 | It defines the following: | 82 | It defines the following: |
2734 | @@ -74,14 +92,44 @@ | |||
2735 | 74 | self.loop = None | 92 | self.loop = None |
2736 | 75 | self._bEnded = False | 93 | self._bEnded = False |
2737 | 76 | self._cMenuIconId = None | 94 | self._cMenuIconId = None |
2739 | 77 | self.cAppletName = sys.argv[0][2:] | 95 | self.cAppletName = sys.argv[0][2:] # the command is ./applet_name |
2740 | 78 | self.cBusPath = sys.argv[2] | 96 | self.cBusPath = sys.argv[2] |
2741 | 79 | self.cConfFile = sys.argv[3] | 97 | self.cConfFile = sys.argv[3] |
2742 | 80 | self.cParentAppName = sys.argv[4] | 98 | self.cParentAppName = sys.argv[4] |
2743 | 99 | self.cShareDataDir = INSTALL_PREFIX + '/' + self.cAppletName | ||
2744 | 81 | 100 | ||
2745 | 82 | self._get_config() | 101 | self._get_config() |
2746 | 83 | self._connect_to_dock() | 102 | self._connect_to_dock() |
2747 | 84 | 103 | ||
2748 | 104 | def _connect_to_dock(self): | ||
2749 | 105 | # get our applet on the bus. | ||
2750 | 106 | bus = dbus.SessionBus() | ||
2751 | 107 | try: | ||
2752 | 108 | applet_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath) | ||
2753 | 109 | except: | ||
2754 | 110 | print ">>> object '"+self.cBusPath+"' can't be found on the bus, exit.\nMake sure that Cairo-Dock is running" | ||
2755 | 111 | sys.exit(2) | ||
2756 | 112 | self.icon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") # this object represents our icon inside the dock or a desklet. | ||
2757 | 113 | sub_icons_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath+"/sub_icons") | ||
2758 | 114 | self.sub_icons = dbus.Interface(sub_icons_object, "org.cairodock.CairoDock.subapplet") # this object represents the list of icons contained in our sub-dock, or in our desklet. We'll add them one by one later, giving them a unique ID, which will be used to identify each of them. | ||
2759 | 115 | # connect to signals. | ||
2760 | 116 | self.icon.connect_to_signal("on_click", self.on_click) # when the user left-clicks on our icon. | ||
2761 | 117 | self.icon.connect_to_signal("on_middle_click", self.on_middle_click) # when the user middle-clicks on our icon. | ||
2762 | 118 | self.icon.connect_to_signal("on_build_menu", self._on_build_menu) # when the user right-clicks on our applet (which builds the menu) | ||
2763 | 119 | self.icon.connect_to_signal("on_menu_select", self._on_menu_select) # when the user selects an entry of this menu. | ||
2764 | 120 | self.icon.connect_to_signal("on_scroll", self.on_scroll) # when the user scroll up or down on our icon. | ||
2765 | 121 | self.icon.connect_to_signal("on_drop_data", self.on_drop_data) # when the user drops something on our icon. | ||
2766 | 122 | self.icon.connect_to_signal("on_answer_dialog", self.on_answer_dialog) # when the user answer a question. | ||
2767 | 123 | self.icon.connect_to_signal("on_shortkey", self.on_shortkey) # when the user press the shortkey. | ||
2768 | 124 | self.icon.connect_to_signal("on_change_focus", self.on_change_focus) # when the window's focus changes. | ||
2769 | 125 | self.icon.connect_to_signal("on_stop_module", self._on_stop) # when the user deactivate our applet (or the DBus plug-in, or when the Cairo-Dock is stopped). | ||
2770 | 126 | self.icon.connect_to_signal("on_reload_module", self._on_reload) # when the user changes something in our config, or when the desklet is resized (with no change in the config). | ||
2771 | 127 | self.sub_icons.connect_to_signal("on_click_sub_icon", self.on_click_sub_icon) # when the user left-clicks on a sub-icon. | ||
2772 | 128 | self.sub_icons.connect_to_signal("on_middle_click_sub_icon", self.on_middle_click_sub_icon) | ||
2773 | 129 | self.sub_icons.connect_to_signal("on_scroll_sub_icon", self.on_scroll_sub_icon) | ||
2774 | 130 | self.sub_icons.connect_to_signal("on_build_menu_sub_icon", self._on_build_menu_sub_icon) | ||
2775 | 131 | self.sub_icons.connect_to_signal("on_drop_data_sub_icon", self.on_drop_data_sub_icon) | ||
2776 | 132 | |||
2777 | 85 | def run(self): | 133 | def run(self): |
2778 | 86 | """ start the applet and enter the main loop; we never get out of this function """ | 134 | """ start the applet and enter the main loop; we never get out of this function """ |
2779 | 87 | self.begin() | 135 | self.begin() |
2780 | @@ -94,6 +142,7 @@ | |||
2781 | 94 | ################################## | 142 | ################################## |
2782 | 95 | ### callbacks on the main icon ### | 143 | ### callbacks on the main icon ### |
2783 | 96 | ################################## | 144 | ################################## |
2784 | 145 | |||
2785 | 97 | def on_click(self,iState): | 146 | def on_click(self,iState): |
2786 | 98 | """ action on click """ | 147 | """ action on click """ |
2787 | 99 | pass | 148 | pass |
2788 | @@ -148,6 +197,7 @@ | |||
2789 | 148 | ################################## | 197 | ################################## |
2790 | 149 | ### callbacks on the sub-icons ### | 198 | ### callbacks on the sub-icons ### |
2791 | 150 | ################################## | 199 | ################################## |
2792 | 200 | |||
2793 | 151 | def on_click_sub_icon(self, iState, cIconID): | 201 | def on_click_sub_icon(self, iState, cIconID): |
2794 | 152 | """ action on click on one of our sub-icons""" | 202 | """ action on click on one of our sub-icons""" |
2795 | 153 | pass | 203 | pass |
2796 | @@ -183,6 +233,7 @@ | |||
2797 | 183 | ############################### | 233 | ############################### |
2798 | 184 | ### callbacks on the applet ### | 234 | ### callbacks on the applet ### |
2799 | 185 | ############################### | 235 | ############################### |
2800 | 236 | |||
2801 | 186 | def begin(self): | 237 | def begin(self): |
2802 | 187 | """ action when the applet is started """ | 238 | """ action when the applet is started """ |
2803 | 188 | pass | 239 | pass |
2804 | @@ -215,32 +266,3 @@ | |||
2805 | 215 | keyfile.read(self.cConfFile) | 266 | keyfile.read(self.cConfFile) |
2806 | 216 | self.get_config(keyfile) | 267 | self.get_config(keyfile) |
2807 | 217 | 268 | ||
2808 | 218 | def _connect_to_dock(self): | ||
2809 | 219 | # get our applet on the bus. | ||
2810 | 220 | #~ applet_path = "/org/cairodock/CairoDock/"+self.cAppletName # path where our object is stored on the bus. | ||
2811 | 221 | bus = dbus.SessionBus() | ||
2812 | 222 | try: | ||
2813 | 223 | applet_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath) | ||
2814 | 224 | except: | ||
2815 | 225 | print ">>> object '"+self.cBusPath+"' can't be found on the bus, exit.\nMake sure that the 'Dbus' plug-in is activated in Cairo-Dock" | ||
2816 | 226 | sys.exit(2) | ||
2817 | 227 | self.icon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") # this object represents our icon inside the dock or a desklet. | ||
2818 | 228 | sub_icons_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath+"/sub_icons") | ||
2819 | 229 | self.sub_icons = dbus.Interface(sub_icons_object, "org.cairodock.CairoDock.subapplet") # this object represents the list of icons contained in our sub-dock, or in our desklet. We'll add them one by one later, giving them a unique ID, which will be used to identify each of them. | ||
2820 | 230 | # connect to signals. | ||
2821 | 231 | self.icon.connect_to_signal("on_click", self.on_click) # when the user left-clicks on our icon. | ||
2822 | 232 | self.icon.connect_to_signal("on_middle_click", self.on_middle_click) # when the user middle-clicks on our icon. | ||
2823 | 233 | self.icon.connect_to_signal("on_build_menu", self._on_build_menu) # when the user right-clicks on our applet (which builds the menu) | ||
2824 | 234 | self.icon.connect_to_signal("on_menu_select", self._on_menu_select) # when the user selects an entry of this menu. | ||
2825 | 235 | self.icon.connect_to_signal("on_scroll", self.on_scroll) # when the user scroll up or down on our icon. | ||
2826 | 236 | self.icon.connect_to_signal("on_drop_data", self.on_drop_data) # when the user drops something on our icon. | ||
2827 | 237 | self.icon.connect_to_signal("on_answer_dialog", self.on_answer_dialog) # when the user answer a question. | ||
2828 | 238 | self.icon.connect_to_signal("on_shortkey", self.on_shortkey) # when the user press the shortkey. | ||
2829 | 239 | self.icon.connect_to_signal("on_change_focus", self.on_change_focus) # when the window's focus changes. | ||
2830 | 240 | self.icon.connect_to_signal("on_stop_module", self._on_stop) # when the user deactivate our applet (or the DBus plug-in, or when the Cairo-Dock is stopped). | ||
2831 | 241 | self.icon.connect_to_signal("on_reload_module", self._on_reload) # when the user changes something in our config, or when the desklet is resized (with no change in the config). | ||
2832 | 242 | self.sub_icons.connect_to_signal("on_click_sub_icon", self.on_click_sub_icon) # when the user left-clicks on a sub-icon. | ||
2833 | 243 | self.sub_icons.connect_to_signal("on_middle_click_sub_icon", self.on_middle_click_sub_icon) | ||
2834 | 244 | self.sub_icons.connect_to_signal("on_scroll_sub_icon", self.on_scroll_sub_icon) | ||
2835 | 245 | self.sub_icons.connect_to_signal("on_build_menu_sub_icon", self._on_build_menu_sub_icon) | ||
2836 | 246 | self.sub_icons.connect_to_signal("on_drop_data_sub_icon", self.on_drop_data_sub_icon) | ||
2837 | 247 | 269 | ||
2838 | === modified file 'Dbus/interfaces/python/CMakeLists.txt' | |||
2839 | --- Dbus/interfaces/python/CMakeLists.txt 2011-04-20 20:46:51 +0000 | |||
2840 | +++ Dbus/interfaces/python/CMakeLists.txt 2011-08-09 20:07:46 +0000 | |||
2841 | @@ -3,7 +3,7 @@ | |||
2842 | 3 | 3 | ||
2843 | 4 | if (NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") | 4 | if (NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") |
2844 | 5 | # copy *.py to current binary dir (cleaner) | 5 | # copy *.py to current binary dir (cleaner) |
2846 | 6 | execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.py" ${CMAKE_CURRENT_BINARY_DIR}) | 6 | execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.py" "${CMAKE_CURRENT_SOURCE_DIR}/CairoDock.py" ${CMAKE_CURRENT_BINARY_DIR}) |
2847 | 7 | exec_program("${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}" ARGS "setup.py" "-q" "build") | 7 | exec_program("${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}" ARGS "setup.py" "-q" "build") |
2848 | 8 | endif() | 8 | endif() |
2849 | 9 | # Run a custom script with 'make install' | 9 | # Run a custom script with 'make install' |
2850 | 10 | 10 | ||
2851 | === added file 'Dbus/interfaces/python/CairoDock.py' | |||
2852 | --- Dbus/interfaces/python/CairoDock.py 1970-01-01 00:00:00 +0000 | |||
2853 | +++ Dbus/interfaces/python/CairoDock.py 2011-08-09 20:07:46 +0000 | |||
2854 | @@ -0,0 +1,111 @@ | |||
2855 | 1 | # This is a part of the Cairo-Dock plug-ins. | ||
2856 | 2 | # Copyright : (C) 2010-2011 by Fabounet | ||
2857 | 3 | # E-mail : fabounet@glx-dock.org | ||
2858 | 4 | # | ||
2859 | 5 | # This program is free software; you can redistribute it and/or | ||
2860 | 6 | # modify it under the terms of the GNU General Public License | ||
2861 | 7 | # as published by the Free Software Foundation; either version 2 | ||
2862 | 8 | # of the License, or (at your option) any later version. | ||
2863 | 9 | # | ||
2864 | 10 | # This program is distributed in the hope that it will be useful, | ||
2865 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2866 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2867 | 13 | # GNU General Public License for more details. | ||
2868 | 14 | # http://www.gnu.org/licenses/licenses.html#GPL | ||
2869 | 15 | |||
2870 | 16 | # Base class for Cairo-Dock's main interface. | ||
2871 | 17 | |||
2872 | 18 | #################### | ||
2873 | 19 | ### dependancies ### | ||
2874 | 20 | #################### | ||
2875 | 21 | import os.path | ||
2876 | 22 | import dbus | ||
2877 | 23 | import re | ||
2878 | 24 | |||
2879 | 25 | USER_CONFIG_DIR = os.path.abspath("~/.config") | ||
2880 | 26 | |||
2881 | 27 | |||
2882 | 28 | ################## | ||
2883 | 29 | ### Main class ### | ||
2884 | 30 | ################## | ||
2885 | 31 | class CairoDock: | ||
2886 | 32 | |||
2887 | 33 | ############# | ||
2888 | 34 | ### Enums ### | ||
2889 | 35 | ############# | ||
2890 | 36 | # orientation | ||
2891 | 37 | BOTTOM = 0 | ||
2892 | 38 | TOP = 1 | ||
2893 | 39 | RIGHT = 2 | ||
2894 | 40 | LEFT = 3 | ||
2895 | 41 | # container type | ||
2896 | 42 | DOCK = "Dock" | ||
2897 | 43 | DESKLET = "Desklet" | ||
2898 | 44 | # emblem position | ||
2899 | 45 | UPPER_LEFT = 0 | ||
2900 | 46 | LOWER_RIGHT = 1 | ||
2901 | 47 | LOWER_LEFT = 2 | ||
2902 | 48 | UPPER_RIGHT = 3 | ||
2903 | 49 | MIDDLE = 4 | ||
2904 | 50 | # module category | ||
2905 | 51 | CATEGORY_BEHAVIOR = 0 | ||
2906 | 52 | CATEGORY_THEME = 1 | ||
2907 | 53 | CATEGORY_APPLET_FILES = 2 | ||
2908 | 54 | CATEGORY_APPLET_INTERNET = 3 | ||
2909 | 55 | CATEGORY_APPLET_DESKTOP = 4 | ||
2910 | 56 | CATEGORY_APPLET_ACCESSORY = 5 | ||
2911 | 57 | CATEGORY_APPLET_SYSTEM = 6 | ||
2912 | 58 | CATEGORY_APPLET_FUN = 7 | ||
2913 | 59 | # module type | ||
2914 | 60 | CAN_DOCK = 1 | ||
2915 | 61 | CAN_DESKLET = 2 | ||
2916 | 62 | # icon type | ||
2917 | 63 | TYPE_LAUNCHER = "Launcher" | ||
2918 | 64 | TYPE_APPLICATION = "Application" | ||
2919 | 65 | TYPE_APPLET = "Applet" | ||
2920 | 66 | TYPE_SEPARATOR = "Separator" | ||
2921 | 67 | TYPE_CONTAINER = "Container" | ||
2922 | 68 | TYPE_CLASS_CONTAINER = "Class-Container" | ||
2923 | 69 | TYPE_OTHER = "Other" | ||
2924 | 70 | # toggle dock visibility | ||
2925 | 71 | HIDE_DOCK = 0 | ||
2926 | 72 | SHOW_DOCK = 1 | ||
2927 | 73 | TOGGLE_DOCK = 2 | ||
2928 | 74 | |||
2929 | 75 | ##################### | ||
2930 | 76 | ### INIT AND DBUS ### | ||
2931 | 77 | ##################### | ||
2932 | 78 | |||
2933 | 79 | def __init__(self, app_name="cairo-dock"): | ||
2934 | 80 | """ Initialize the interface. | ||
2935 | 81 | It defines the following: | ||
2936 | 82 | - cDataDir: main dir | ||
2937 | 83 | - cCurrentThemeDir: current theme dir | ||
2938 | 84 | - cConfFile : path to the global config file | ||
2939 | 85 | """ | ||
2940 | 86 | self.dock = None | ||
2941 | 87 | self.cAppName = app_name | ||
2942 | 88 | self.cDataDir = USER_CONFIG_DIR + '/' + app_name | ||
2943 | 89 | self.cCurrentThemeDir = self.cDataDir + '/current_theme' | ||
2944 | 90 | self.cLaunchersDir = self.cCurrentThemeDir + '/launchers' | ||
2945 | 91 | self.cPluginsDir = self.cCurrentThemeDir + '/plug-ins' | ||
2946 | 92 | self.cConfFile = self.cCurrentThemeDir + '/' + app_name + '.conf' | ||
2947 | 93 | |||
2948 | 94 | self._connect() | ||
2949 | 95 | |||
2950 | 96 | def _connect(self): | ||
2951 | 97 | # get gldi on the bus. | ||
2952 | 98 | bus = dbus.SessionBus() | ||
2953 | 99 | |||
2954 | 100 | name1 = self.cAppName.replace('-','') # -> cairodock | ||
2955 | 101 | name2 = re.sub('-[a-z]', lambda x: x.group(0).upper(), self.cAppName) | ||
2956 | 102 | name2 = re.sub('^[a-z]', lambda x: x.group(0).upper(), name2) # -> CairoDock | ||
2957 | 103 | name2 = name2.replace('-','') # -> CairoDock | ||
2958 | 104 | cBusPath = '/org/'+name1+'/'+name2 | ||
2959 | 105 | try: | ||
2960 | 106 | dbus_object = bus.get_object("org.cairodock.CairoDock", cBusPath) | ||
2961 | 107 | except: | ||
2962 | 108 | print ">>> object '"+cBusPath+"' can't be found on the bus, exit.\nMake sure that Cairo-Dock is running" | ||
2963 | 109 | return | ||
2964 | 110 | self.iface = dbus.Interface(dbus_object, "org.cairodock.CairoDock") # this object represents gldi. | ||
2965 | 111 | |||
2966 | 0 | 112 | ||
2967 | === modified file 'Dbus/interfaces/python/setup.py' | |||
2968 | --- Dbus/interfaces/python/setup.py 2011-04-20 20:46:51 +0000 | |||
2969 | +++ Dbus/interfaces/python/setup.py 2011-08-09 20:07:46 +0000 | |||
2970 | @@ -21,5 +21,5 @@ | |||
2971 | 21 | author_email='fabounet@glx-dock.org', | 21 | author_email='fabounet@glx-dock.org', |
2972 | 22 | description='Python interface for Cairo-Dock', | 22 | description='Python interface for Cairo-Dock', |
2973 | 23 | url='https://launchpad.net/cairo-dock', | 23 | url='https://launchpad.net/cairo-dock', |
2975 | 24 | py_modules=['CDApplet'] | 24 | py_modules=['CDApplet', 'CairoDock'] |
2976 | 25 | ) | 25 | ) |
2977 | 26 | 26 | ||
2978 | === modified file 'Dbus/interfaces/vala/CMakeLists.txt' | |||
2979 | --- Dbus/interfaces/vala/CMakeLists.txt 2011-04-20 20:46:51 +0000 | |||
2980 | +++ Dbus/interfaces/vala/CMakeLists.txt 2011-08-09 20:07:46 +0000 | |||
2981 | @@ -13,9 +13,13 @@ | |||
2982 | 13 | else() | 13 | else() |
2983 | 14 | set (VALA_DIR ${CMAKE_CURRENT_BINARY_DIR}) | 14 | set (VALA_DIR ${CMAKE_CURRENT_BINARY_DIR}) |
2984 | 15 | endif() | 15 | endif() |
2985 | 16 | if (${VALA_MAJOR} LESS 1 AND ${VALA_MINOR} LESS 13) | ||
2986 | 17 | set (DISABLE_DBUS_TRANSFORMATION "--disable-dbus-transformation") | ||
2987 | 18 | endif() | ||
2988 | 16 | # first, precompile the Vala code into C code. | 19 | # first, precompile the Vala code into C code. |
2989 | 17 | execute_process(COMMAND | 20 | execute_process(COMMAND |
2991 | 18 | ${VALAC_EXE} -q -C --disable-warnings --disable-dbus-transformation | 21 | ${VALAC_EXE} -q -C |
2992 | 22 | --disable-warnings ${DISABLE_DBUS_TRANSFORMATION} | ||
2993 | 19 | --pkg gio-2.0 | 23 | --pkg gio-2.0 |
2994 | 20 | --vapi=${VALA_DIR}/src/${CDAPPLET}.vapi | 24 | --vapi=${VALA_DIR}/src/${CDAPPLET}.vapi |
2995 | 21 | --header=${VALA_DIR}/src/${CDAPPLET}.h | 25 | --header=${VALA_DIR}/src/${CDAPPLET}.h |
2996 | 22 | 26 | ||
2997 | === modified file 'Dbus/src/applet-dbus.c' | |||
2998 | --- Dbus/src/applet-dbus.c 2011-04-20 20:46:51 +0000 | |||
2999 | +++ Dbus/src/applet-dbus.c 2011-08-09 20:07:46 +0000 | |||
3000 | @@ -38,6 +38,7 @@ | |||
3001 | 38 | #define __USE_POSIX | 38 | #define __USE_POSIX |
3002 | 39 | #include <signal.h> // kill | 39 | #include <signal.h> // kill |
3003 | 40 | #include <glib.h> | 40 | #include <glib.h> |
3004 | 41 | #include <glib/gstdio.h> | ||
3005 | 41 | #include <dbus/dbus-glib.h> | 42 | #include <dbus/dbus-glib.h> |
3006 | 42 | #include <dbus/dbus-glib-bindings.h> | 43 | #include <dbus/dbus-glib-bindings.h> |
3007 | 43 | 44 | ||
3008 | @@ -47,6 +48,9 @@ | |||
3009 | 47 | #include "interface-applet-signals.h" | 48 | #include "interface-applet-signals.h" |
3010 | 48 | #include "applet-dbus.h" | 49 | #include "applet-dbus.h" |
3011 | 49 | 50 | ||
3012 | 51 | #define DISTANT_DIR "2.4.0" | ||
3013 | 52 | #define GETTEXT_NAME_EXTRAS "cairo-dock-plugins-extra" | ||
3014 | 53 | #define LOCALE_DIR_NAME "locale" | ||
3015 | 50 | 54 | ||
3016 | 51 | /////////////////// | 55 | /////////////////// |
3017 | 52 | /// MAIN OBJECT /// | 56 | /// MAIN OBJECT /// |
3018 | @@ -82,7 +86,6 @@ | |||
3019 | 82 | 86 | ||
3020 | 83 | //\_____________ On initialise l'icone. | 87 | //\_____________ On initialise l'icone. |
3021 | 84 | cd_dbus_action_on_init_module (pModuleInstance); | 88 | cd_dbus_action_on_init_module (pModuleInstance); |
3022 | 85 | |||
3023 | 86 | //\_____________ On cree l'objet sur le bus. | 89 | //\_____________ On cree l'objet sur le bus. |
3024 | 87 | dbusApplet *pDbusApplet = cd_dbus_create_remote_applet_object (pModuleInstance); | 90 | dbusApplet *pDbusApplet = cd_dbus_create_remote_applet_object (pModuleInstance); |
3025 | 88 | g_return_if_fail (pDbusApplet != NULL); | 91 | g_return_if_fail (pDbusApplet != NULL); |
3026 | @@ -91,7 +94,12 @@ | |||
3027 | 91 | if (pKeyFile != NULL) | 94 | if (pKeyFile != NULL) |
3028 | 92 | { | 95 | { |
3029 | 93 | if (cairo_dock_conf_file_needs_update (pKeyFile, pModuleInstance->pModule->pVisitCard->cModuleVersion)) | 96 | if (cairo_dock_conf_file_needs_update (pKeyFile, pModuleInstance->pModule->pVisitCard->cModuleVersion)) |
3031 | 94 | cairo_dock_flush_conf_file (pKeyFile, pModuleInstance->cConfFilePath, pModuleInstance->pModule->pVisitCard->cShareDataDir, pModuleInstance->pModule->pVisitCard->cConfFileName); | 97 | { |
3032 | 98 | ///cairo_dock_flush_conf_file (pKeyFile, pModuleInstance->cConfFilePath, pModuleInstance->pModule->pVisitCard->cShareDataDir, pModuleInstance->pModule->pVisitCard->cConfFileName); | ||
3033 | 99 | gchar *cTemplate = g_strdup_printf ("%s/%s", pModuleInstance->pModule->pVisitCard->cShareDataDir, pModuleInstance->pModule->pVisitCard->cConfFileName); | ||
3034 | 100 | cairo_dock_upgrade_conf_file (pModuleInstance->cConfFilePath, pKeyFile, cTemplate); | ||
3035 | 101 | g_free (cTemplate); | ||
3036 | 102 | } | ||
3037 | 95 | } | 103 | } |
3038 | 96 | 104 | ||
3039 | 97 | //\_____________ On (re)lance l'executable de l'applet. | 105 | //\_____________ On (re)lance l'executable de l'applet. |
3040 | @@ -122,7 +130,7 @@ | |||
3041 | 122 | pVisitCard->iMinorVersionNeeded = 1; | 130 | pVisitCard->iMinorVersionNeeded = 1; |
3042 | 123 | pVisitCard->iMicroVersionNeeded = 1; | 131 | pVisitCard->iMicroVersionNeeded = 1; |
3043 | 124 | pVisitCard->cPreviewFilePath = cShareDataDir ? g_strdup_printf ("%s/preview", cShareDataDir) : NULL; | 132 | pVisitCard->cPreviewFilePath = cShareDataDir ? g_strdup_printf ("%s/preview", cShareDataDir) : NULL; |
3045 | 125 | pVisitCard->cGettextDomain = g_strdup_printf ("cd-%s", cModuleName); | 133 | pVisitCard->cGettextDomain = g_strdup (GETTEXT_NAME_EXTRAS); |
3046 | 126 | pVisitCard->cUserDataDir = g_strdup (cModuleName); | 134 | pVisitCard->cUserDataDir = g_strdup (cModuleName); |
3047 | 127 | pVisitCard->cShareDataDir = g_strdup (cShareDataDir); | 135 | pVisitCard->cShareDataDir = g_strdup (cShareDataDir); |
3048 | 128 | pVisitCard->cConfFileName = g_strdup_printf ("%s.conf", cModuleName); | 136 | pVisitCard->cConfFileName = g_strdup_printf ("%s.conf", cModuleName); |
3049 | @@ -219,16 +227,17 @@ | |||
3050 | 219 | return bActivationOk; | 227 | return bActivationOk; |
3051 | 220 | } | 228 | } |
3052 | 221 | 229 | ||
3054 | 222 | static void _cd_dbus_register_all_applets_in_dir (const gchar *cDirPath) | 230 | static gboolean _cd_dbus_register_all_applets_in_dir (const gchar *cDirPath) |
3055 | 223 | { | 231 | { |
3056 | 232 | gboolean bAppletRegistered = FALSE; | ||
3057 | 224 | const gchar *cFileName; | 233 | const gchar *cFileName; |
3058 | 225 | gchar *cThirdPartyPath = g_strdup_printf ("%s/%s", cDirPath, CD_DBUS_APPLETS_FOLDER); | 234 | gchar *cThirdPartyPath = g_strdup_printf ("%s/%s", cDirPath, CD_DBUS_APPLETS_FOLDER); |
3059 | 226 | 235 | ||
3061 | 227 | GDir *dir = g_dir_open (cThirdPartyPath, 0, NULL); // si le repertoire n'existe pas, on ne veut de warning. | 236 | GDir *dir = g_dir_open (cThirdPartyPath, 0, NULL); // si le repertoire n'existe pas, on ne veut pas de warning. |
3062 | 228 | if (dir == NULL) | 237 | if (dir == NULL) |
3063 | 229 | { | 238 | { |
3064 | 230 | g_free (cThirdPartyPath); | 239 | g_free (cThirdPartyPath); |
3066 | 231 | return ; | 240 | return bAppletRegistered; |
3067 | 232 | } | 241 | } |
3068 | 233 | 242 | ||
3069 | 234 | do | 243 | do |
3070 | @@ -236,12 +245,14 @@ | |||
3071 | 236 | cFileName = g_dir_read_name (dir); | 245 | cFileName = g_dir_read_name (dir); |
3072 | 237 | if (cFileName == NULL) | 246 | if (cFileName == NULL) |
3073 | 238 | break ; | 247 | break ; |
3076 | 239 | 248 | ||
3077 | 240 | cd_dbus_register_module_in_dir (cFileName, cThirdPartyPath); | 249 | if (strcmp (cFileName, LOCALE_DIR_NAME) != 0) |
3078 | 250 | bAppletRegistered |= cd_dbus_register_module_in_dir (cFileName, cThirdPartyPath); | ||
3079 | 241 | } | 251 | } |
3080 | 242 | while (1); | 252 | while (1); |
3081 | 243 | g_dir_close (dir); | 253 | g_dir_close (dir); |
3082 | 244 | g_free (cThirdPartyPath); | 254 | g_free (cThirdPartyPath); |
3083 | 255 | return bAppletRegistered; | ||
3084 | 245 | } | 256 | } |
3085 | 246 | 257 | ||
3086 | 247 | 258 | ||
3087 | @@ -253,19 +264,23 @@ | |||
3088 | 253 | { | 264 | { |
3089 | 254 | const gchar *cSharePackagesDir = MY_APPLET_SHARE_DATA_DIR"/"CD_DBUS_APPLETS_FOLDER; | 265 | const gchar *cSharePackagesDir = MY_APPLET_SHARE_DATA_DIR"/"CD_DBUS_APPLETS_FOLDER; |
3090 | 255 | gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER); | 266 | gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER); |
3093 | 256 | gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion); | 267 | ///gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion); |
3094 | 257 | gchar *cPath = cairo_dock_get_package_path (cModuleName, cSharePackagesDir, cUserPackagesDir, cDistantPackagesDir, CAIRO_DOCK_UPDATED_PACKAGE); | 268 | const gchar *cDistantPackagesDir = CD_DBUS_APPLETS_FOLDER"/"DISTANT_DIR; |
3095 | 269 | gchar *cPath = cairo_dock_get_package_path (cModuleName, | ||
3096 | 270 | cSharePackagesDir, | ||
3097 | 271 | cUserPackagesDir, | ||
3098 | 272 | cDistantPackagesDir, | ||
3099 | 273 | CAIRO_DOCK_UPDATED_PACKAGE); | ||
3100 | 258 | cd_debug ("*** update of the applet '%s' -> got '%s'\n", cModuleName, cPath); | 274 | cd_debug ("*** update of the applet '%s' -> got '%s'\n", cModuleName, cPath); |
3101 | 259 | g_free (cPath); | 275 | g_free (cPath); |
3102 | 260 | g_free (cUserPackagesDir); | 276 | g_free (cUserPackagesDir); |
3104 | 261 | g_free (cDistantPackagesDir); | 277 | //g_free (cDistantPackagesDir); |
3105 | 262 | } | 278 | } |
3106 | 263 | static gboolean _apply_package_update (gchar *cModuleName) | 279 | static gboolean _apply_package_update (gchar *cModuleName) |
3107 | 264 | { | 280 | { |
3108 | 265 | CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName); | 281 | CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName); |
3109 | 266 | g_return_val_if_fail (pModule != NULL, TRUE); | ||
3110 | 267 | 282 | ||
3112 | 268 | if (pModule->pInstancesList != NULL) // applet active => on la recharge. | 283 | if (pModule && pModule->pInstancesList != NULL) // applet active => reload it (pModule can be NULL in case of "locale"). |
3113 | 269 | { | 284 | { |
3114 | 270 | cd_debug ("*** applet '%s' is active, reload it", cModuleName); | 285 | cd_debug ("*** applet '%s' is active, reload it", cModuleName); |
3115 | 271 | CairoDockModuleInstance *pModuleInstance = pModule->pInstancesList->data; | 286 | CairoDockModuleInstance *pModuleInstance = pModule->pInstancesList->data; |
3116 | @@ -424,8 +439,8 @@ | |||
3117 | 424 | const gchar *cProgName = g_get_prgname (); | 439 | const gchar *cProgName = g_get_prgname (); |
3118 | 425 | g_return_if_fail (cProgName != NULL); | 440 | g_return_if_fail (cProgName != NULL); |
3119 | 426 | int n = strlen (cProgName); | 441 | int n = strlen (cProgName); |
3122 | 427 | gchar *cName1 = g_new0 (gchar, n+1); | 442 | gchar *cName1 = g_new0 (gchar, n+1); // prog name without '-' and '_' |
3123 | 428 | gchar *cName2 = g_new0 (gchar, n+1); | 443 | gchar *cName2 = g_new0 (gchar, n+1); // same but with upper char after the '-' and '_' |
3124 | 429 | int i, k=0; | 444 | int i, k=0; |
3125 | 430 | for (i = 0; i < n; i ++) | 445 | for (i = 0; i < n; i ++) |
3126 | 431 | { | 446 | { |
3127 | @@ -450,25 +465,47 @@ | |||
3128 | 450 | cairo_dock_register_service_name ("org.cairodock.CairoDock"); /// what happens if the gldi instance that had registered the name quits while a 2nd instance remains ? do we need to queue ?... | 465 | cairo_dock_register_service_name ("org.cairodock.CairoDock"); /// what happens if the gldi instance that had registered the name quits while a 2nd instance remains ? do we need to queue ?... |
3129 | 451 | 466 | ||
3130 | 452 | //\____________ create the main object on the bus. | 467 | //\____________ create the main object on the bus. |
3132 | 453 | myData.pMainObject = g_object_new (cd_dbus_main_get_type(), NULL); // appelle cd_dbus_main_class_init() et cd_dbus_main_init(). | 468 | myData.pMainObject = g_object_new (cd_dbus_main_get_type(), NULL); // call cd_dbus_main_class_init() and cd_dbus_main_init(). |
3133 | 454 | 469 | ||
3134 | 455 | //\____________ register the applets installed in the default folders. | 470 | //\____________ register the applets installed in the default folders. |
3138 | 456 | _cd_dbus_register_all_applets_in_dir (MY_APPLET_SHARE_DATA_DIR); | 471 | gboolean bAppletRegistered = FALSE; |
3139 | 457 | 472 | bAppletRegistered |= _cd_dbus_register_all_applets_in_dir (MY_APPLET_SHARE_DATA_DIR); | |
3140 | 458 | _cd_dbus_register_all_applets_in_dir (g_cCairoDockDataDir); | 473 | |
3141 | 474 | bAppletRegistered |= _cd_dbus_register_all_applets_in_dir (g_cCairoDockDataDir); | ||
3142 | 475 | |||
3143 | 476 | //\____________ internationalize the applets. | ||
3144 | 477 | gchar *cLocaleDir = g_strdup_printf ("%s/"CD_DBUS_APPLETS_FOLDER"/"LOCALE_DIR_NAME, g_cCairoDockDataDir); // user version of /usr/share/locale | ||
3145 | 478 | if (! g_file_test (cLocaleDir, G_FILE_TEST_EXISTS)) // translations not downloaded yet. | ||
3146 | 479 | { | ||
3147 | 480 | gchar *cUserAppletsFolder = g_strdup_printf ("%s/"CD_DBUS_APPLETS_FOLDER, g_cCairoDockDataDir); | ||
3148 | 481 | if (! g_file_test (cUserAppletsFolder, G_FILE_TEST_EXISTS)) | ||
3149 | 482 | { | ||
3150 | 483 | if (g_mkdir (cUserAppletsFolder, 7*8*8+7*8+5) != 0) // create an empty folder; since there is no date file, the "locale" package will be seen as "to be updated" by the package manager, and will therefore download it. | ||
3151 | 484 | cd_warning ("couldn't create '%s'; third-party applets can't be added", cUserAppletsFolder); | ||
3152 | 485 | } | ||
3153 | 486 | g_free (cUserAppletsFolder); | ||
3154 | 487 | |||
3155 | 488 | if (g_mkdir (cLocaleDir, 7*8*8+7*8+5) != 0) // create an empty folder; since there is no date file, the "locale" package will be seen as "to be updated" by the package manager, and will therefore download it. | ||
3156 | 489 | cd_warning ("couldn't create '%s'; applets won't be translated", cLocaleDir); | ||
3157 | 490 | } | ||
3158 | 491 | bindtextdomain (GETTEXT_NAME_EXTRAS, cLocaleDir); // bind the applets' domain to the user locale folder. | ||
3159 | 492 | bind_textdomain_codeset (GETTEXT_NAME_EXTRAS, "UTF-8"); | ||
3160 | 493 | g_free (cLocaleDir); | ||
3161 | 459 | 494 | ||
3162 | 460 | //\____________ download in background the list of existing applets. | 495 | //\____________ download in background the list of existing applets. |
3174 | 461 | const gchar *cSharePackagesDir = NULL; // MY_APPLET_SHARE_DATA_DIR"/"CD_DBUS_APPLETS_FOLDER; | 496 | if (bAppletRegistered) // only if some third-party applets are present on the disk. |
3175 | 462 | gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER); | 497 | { |
3176 | 463 | gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion); | 498 | const gchar *cSharePackagesDir = NULL; // no share data dir, since we can't write in /usr |
3177 | 464 | myData.pGetListTask = cairo_dock_list_packages_async (cSharePackagesDir, | 499 | gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER); |
3178 | 465 | cUserPackagesDir, | 500 | const gchar *cDistantPackagesDir = CD_DBUS_APPLETS_FOLDER"/"DISTANT_DIR; |
3179 | 466 | cDistantPackagesDir, | 501 | myData.pGetListTask = cairo_dock_list_packages_async (cSharePackagesDir, |
3180 | 467 | (CairoDockGetPackagesFunc) _on_got_list, | 502 | cUserPackagesDir, |
3181 | 468 | NULL, // data | 503 | cDistantPackagesDir, |
3182 | 469 | NULL); // table | 504 | (CairoDockGetPackagesFunc) _on_got_list, |
3183 | 470 | g_free (cUserPackagesDir); | 505 | NULL, // data |
3184 | 471 | g_free (cDistantPackagesDir); | 506 | NULL); // table |
3185 | 507 | g_free (cUserPackagesDir); | ||
3186 | 508 | } | ||
3187 | 472 | } | 509 | } |
3188 | 473 | 510 | ||
3189 | 474 | 511 | ||
3190 | 475 | 512 | ||
3191 | === modified file 'Dbus/src/dbus-main-spec.h' | |||
3192 | --- Dbus/src/dbus-main-spec.h 2011-04-20 20:46:51 +0000 | |||
3193 | +++ Dbus/src/dbus-main-spec.h 2011-08-09 20:07:46 +0000 | |||
3194 | @@ -55,105 +55,193 @@ | |||
3195 | 55 | #endif /* !G_ENABLE_DEBUG */ | 55 | #endif /* !G_ENABLE_DEBUG */ |
3196 | 56 | 56 | ||
3197 | 57 | 57 | ||
3244 | 58 | /* BOOLEAN:STRING,INT,STRING,STRING,STRING,POINTER */ | 58 | /* BOOLEAN:INT,POINTER */ |
3245 | 59 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER (GClosure *closure, | 59 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__INT_POINTER (GClosure *closure, |
3246 | 60 | GValue *return_value, | 60 | GValue *return_value, |
3247 | 61 | guint n_param_values, | 61 | guint n_param_values, |
3248 | 62 | const GValue *param_values, | 62 | const GValue *param_values, |
3249 | 63 | gpointer invocation_hint, | 63 | gpointer invocation_hint, |
3250 | 64 | gpointer marshal_data); | 64 | gpointer marshal_data); |
3251 | 65 | void | 65 | void |
3252 | 66 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER (GClosure *closure, | 66 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__INT_POINTER (GClosure *closure, |
3253 | 67 | GValue *return_value G_GNUC_UNUSED, | 67 | GValue *return_value G_GNUC_UNUSED, |
3254 | 68 | guint n_param_values, | 68 | guint n_param_values, |
3255 | 69 | const GValue *param_values, | 69 | const GValue *param_values, |
3256 | 70 | gpointer invocation_hint G_GNUC_UNUSED, | 70 | gpointer invocation_hint G_GNUC_UNUSED, |
3257 | 71 | gpointer marshal_data) | 71 | gpointer marshal_data) |
3258 | 72 | { | 72 | { |
3259 | 73 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER) (gpointer data1, | 73 | typedef gboolean (*GMarshalFunc_BOOLEAN__INT_POINTER) (gpointer data1, |
3260 | 74 | gpointer arg_1, | 74 | gint arg_1, |
3261 | 75 | gint arg_2, | 75 | gpointer arg_2, |
3262 | 76 | gpointer arg_3, | 76 | gpointer data2); |
3263 | 77 | gpointer arg_4, | 77 | register GMarshalFunc_BOOLEAN__INT_POINTER callback; |
3264 | 78 | gpointer arg_5, | 78 | register GCClosure *cc = (GCClosure*) closure; |
3265 | 79 | gpointer arg_6, | 79 | register gpointer data1, data2; |
3266 | 80 | gpointer data2); | 80 | gboolean v_return; |
3267 | 81 | register GMarshalFunc_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER callback; | 81 | |
3268 | 82 | register GCClosure *cc = (GCClosure*) closure; | 82 | g_return_if_fail (return_value != NULL); |
3269 | 83 | register gpointer data1, data2; | 83 | g_return_if_fail (n_param_values == 3); |
3270 | 84 | gboolean v_return; | 84 | |
3271 | 85 | 85 | if (G_CCLOSURE_SWAP_DATA (closure)) | |
3272 | 86 | g_return_if_fail (return_value != NULL); | 86 | { |
3273 | 87 | g_return_if_fail (n_param_values == 7); | 87 | data1 = closure->data; |
3274 | 88 | 88 | data2 = g_value_peek_pointer (param_values + 0); | |
3275 | 89 | if (G_CCLOSURE_SWAP_DATA (closure)) | 89 | } |
3276 | 90 | { | 90 | else |
3277 | 91 | data1 = closure->data; | 91 | { |
3278 | 92 | data2 = g_value_peek_pointer (param_values + 0); | 92 | data1 = g_value_peek_pointer (param_values + 0); |
3279 | 93 | } | 93 | data2 = closure->data; |
3280 | 94 | else | 94 | } |
3281 | 95 | { | 95 | callback = (GMarshalFunc_BOOLEAN__INT_POINTER) (marshal_data ? marshal_data : cc->callback); |
3282 | 96 | data1 = g_value_peek_pointer (param_values + 0); | 96 | |
3283 | 97 | data2 = closure->data; | 97 | v_return = callback (data1, |
3284 | 98 | } | 98 | g_marshal_value_peek_int (param_values + 1), |
3285 | 99 | callback = (GMarshalFunc_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); | 99 | g_marshal_value_peek_pointer (param_values + 2), |
3286 | 100 | 100 | data2); | |
3287 | 101 | v_return = callback (data1, | 101 | |
3288 | 102 | g_marshal_value_peek_string (param_values + 1), | 102 | g_value_set_boolean (return_value, v_return); |
3289 | 103 | g_marshal_value_peek_int (param_values + 2), | 103 | } |
3290 | 104 | |||
3291 | 105 | /* BOOLEAN:BOXED,POINTER */ | ||
3292 | 106 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOXED_POINTER (GClosure *closure, | ||
3293 | 107 | GValue *return_value, | ||
3294 | 108 | guint n_param_values, | ||
3295 | 109 | const GValue *param_values, | ||
3296 | 110 | gpointer invocation_hint, | ||
3297 | 111 | gpointer marshal_data); | ||
3298 | 112 | void | ||
3299 | 113 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOXED_POINTER (GClosure *closure, | ||
3300 | 114 | GValue *return_value G_GNUC_UNUSED, | ||
3301 | 115 | guint n_param_values, | ||
3302 | 116 | const GValue *param_values, | ||
3303 | 117 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3304 | 118 | gpointer marshal_data) | ||
3305 | 119 | { | ||
3306 | 120 | typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_POINTER) (gpointer data1, | ||
3307 | 121 | gpointer arg_1, | ||
3308 | 122 | gpointer arg_2, | ||
3309 | 123 | gpointer data2); | ||
3310 | 124 | register GMarshalFunc_BOOLEAN__BOXED_POINTER callback; | ||
3311 | 125 | register GCClosure *cc = (GCClosure*) closure; | ||
3312 | 126 | register gpointer data1, data2; | ||
3313 | 127 | gboolean v_return; | ||
3314 | 128 | |||
3315 | 129 | g_return_if_fail (return_value != NULL); | ||
3316 | 130 | g_return_if_fail (n_param_values == 3); | ||
3317 | 131 | |||
3318 | 132 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3319 | 133 | { | ||
3320 | 134 | data1 = closure->data; | ||
3321 | 135 | data2 = g_value_peek_pointer (param_values + 0); | ||
3322 | 136 | } | ||
3323 | 137 | else | ||
3324 | 138 | { | ||
3325 | 139 | data1 = g_value_peek_pointer (param_values + 0); | ||
3326 | 140 | data2 = closure->data; | ||
3327 | 141 | } | ||
3328 | 142 | callback = (GMarshalFunc_BOOLEAN__BOXED_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3329 | 143 | |||
3330 | 144 | v_return = callback (data1, | ||
3331 | 145 | g_marshal_value_peek_boxed (param_values + 1), | ||
3332 | 146 | g_marshal_value_peek_pointer (param_values + 2), | ||
3333 | 147 | data2); | ||
3334 | 148 | |||
3335 | 149 | g_value_set_boolean (return_value, v_return); | ||
3336 | 150 | } | ||
3337 | 151 | |||
3338 | 152 | /* BOOLEAN:BOOLEAN,POINTER */ | ||
3339 | 153 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure, | ||
3340 | 154 | GValue *return_value, | ||
3341 | 155 | guint n_param_values, | ||
3342 | 156 | const GValue *param_values, | ||
3343 | 157 | gpointer invocation_hint, | ||
3344 | 158 | gpointer marshal_data); | ||
3345 | 159 | void | ||
3346 | 160 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure, | ||
3347 | 161 | GValue *return_value G_GNUC_UNUSED, | ||
3348 | 162 | guint n_param_values, | ||
3349 | 163 | const GValue *param_values, | ||
3350 | 164 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3351 | 165 | gpointer marshal_data) | ||
3352 | 166 | { | ||
3353 | 167 | typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (gpointer data1, | ||
3354 | 168 | gboolean arg_1, | ||
3355 | 169 | gpointer arg_2, | ||
3356 | 170 | gpointer data2); | ||
3357 | 171 | register GMarshalFunc_BOOLEAN__BOOLEAN_POINTER callback; | ||
3358 | 172 | register GCClosure *cc = (GCClosure*) closure; | ||
3359 | 173 | register gpointer data1, data2; | ||
3360 | 174 | gboolean v_return; | ||
3361 | 175 | |||
3362 | 176 | g_return_if_fail (return_value != NULL); | ||
3363 | 177 | g_return_if_fail (n_param_values == 3); | ||
3364 | 178 | |||
3365 | 179 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3366 | 180 | { | ||
3367 | 181 | data1 = closure->data; | ||
3368 | 182 | data2 = g_value_peek_pointer (param_values + 0); | ||
3369 | 183 | } | ||
3370 | 184 | else | ||
3371 | 185 | { | ||
3372 | 186 | data1 = g_value_peek_pointer (param_values + 0); | ||
3373 | 187 | data2 = closure->data; | ||
3374 | 188 | } | ||
3375 | 189 | callback = (GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3376 | 190 | |||
3377 | 191 | v_return = callback (data1, | ||
3378 | 192 | g_marshal_value_peek_boolean (param_values + 1), | ||
3379 | 193 | g_marshal_value_peek_pointer (param_values + 2), | ||
3380 | 194 | data2); | ||
3381 | 195 | |||
3382 | 196 | g_value_set_boolean (return_value, v_return); | ||
3383 | 197 | } | ||
3384 | 198 | |||
3385 | 199 | /* BOOLEAN:BOOLEAN,STRING,STRING,POINTER */ | ||
3386 | 200 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_STRING_STRING_POINTER (GClosure *closure, | ||
3387 | 201 | GValue *return_value, | ||
3388 | 202 | guint n_param_values, | ||
3389 | 203 | const GValue *param_values, | ||
3390 | 204 | gpointer invocation_hint, | ||
3391 | 205 | gpointer marshal_data); | ||
3392 | 206 | void | ||
3393 | 207 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_STRING_STRING_POINTER (GClosure *closure, | ||
3394 | 208 | GValue *return_value G_GNUC_UNUSED, | ||
3395 | 209 | guint n_param_values, | ||
3396 | 210 | const GValue *param_values, | ||
3397 | 211 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3398 | 212 | gpointer marshal_data) | ||
3399 | 213 | { | ||
3400 | 214 | typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN_STRING_STRING_POINTER) (gpointer data1, | ||
3401 | 215 | gboolean arg_1, | ||
3402 | 216 | gpointer arg_2, | ||
3403 | 217 | gpointer arg_3, | ||
3404 | 218 | gpointer arg_4, | ||
3405 | 219 | gpointer data2); | ||
3406 | 220 | register GMarshalFunc_BOOLEAN__BOOLEAN_STRING_STRING_POINTER callback; | ||
3407 | 221 | register GCClosure *cc = (GCClosure*) closure; | ||
3408 | 222 | register gpointer data1, data2; | ||
3409 | 223 | gboolean v_return; | ||
3410 | 224 | |||
3411 | 225 | g_return_if_fail (return_value != NULL); | ||
3412 | 226 | g_return_if_fail (n_param_values == 5); | ||
3413 | 227 | |||
3414 | 228 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3415 | 229 | { | ||
3416 | 230 | data1 = closure->data; | ||
3417 | 231 | data2 = g_value_peek_pointer (param_values + 0); | ||
3418 | 232 | } | ||
3419 | 233 | else | ||
3420 | 234 | { | ||
3421 | 235 | data1 = g_value_peek_pointer (param_values + 0); | ||
3422 | 236 | data2 = closure->data; | ||
3423 | 237 | } | ||
3424 | 238 | callback = (GMarshalFunc_BOOLEAN__BOOLEAN_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3425 | 239 | |||
3426 | 240 | v_return = callback (data1, | ||
3427 | 241 | g_marshal_value_peek_boolean (param_values + 1), | ||
3428 | 242 | g_marshal_value_peek_string (param_values + 2), | ||
3429 | 104 | g_marshal_value_peek_string (param_values + 3), | 243 | g_marshal_value_peek_string (param_values + 3), |
3482 | 105 | g_marshal_value_peek_string (param_values + 4), | 244 | g_marshal_value_peek_pointer (param_values + 4), |
3431 | 106 | g_marshal_value_peek_string (param_values + 5), | ||
3432 | 107 | g_marshal_value_peek_pointer (param_values + 6), | ||
3433 | 108 | data2); | ||
3434 | 109 | |||
3435 | 110 | g_value_set_boolean (return_value, v_return); | ||
3436 | 111 | } | ||
3437 | 112 | |||
3438 | 113 | /* BOOLEAN:STRING,BOOLEAN,POINTER */ | ||
3439 | 114 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure, | ||
3440 | 115 | GValue *return_value, | ||
3441 | 116 | guint n_param_values, | ||
3442 | 117 | const GValue *param_values, | ||
3443 | 118 | gpointer invocation_hint, | ||
3444 | 119 | gpointer marshal_data); | ||
3445 | 120 | void | ||
3446 | 121 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure, | ||
3447 | 122 | GValue *return_value G_GNUC_UNUSED, | ||
3448 | 123 | guint n_param_values, | ||
3449 | 124 | const GValue *param_values, | ||
3450 | 125 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3451 | 126 | gpointer marshal_data) | ||
3452 | 127 | { | ||
3453 | 128 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (gpointer data1, | ||
3454 | 129 | gpointer arg_1, | ||
3455 | 130 | gboolean arg_2, | ||
3456 | 131 | gpointer arg_3, | ||
3457 | 132 | gpointer data2); | ||
3458 | 133 | register GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER callback; | ||
3459 | 134 | register GCClosure *cc = (GCClosure*) closure; | ||
3460 | 135 | register gpointer data1, data2; | ||
3461 | 136 | gboolean v_return; | ||
3462 | 137 | |||
3463 | 138 | g_return_if_fail (return_value != NULL); | ||
3464 | 139 | g_return_if_fail (n_param_values == 4); | ||
3465 | 140 | |||
3466 | 141 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3467 | 142 | { | ||
3468 | 143 | data1 = closure->data; | ||
3469 | 144 | data2 = g_value_peek_pointer (param_values + 0); | ||
3470 | 145 | } | ||
3471 | 146 | else | ||
3472 | 147 | { | ||
3473 | 148 | data1 = g_value_peek_pointer (param_values + 0); | ||
3474 | 149 | data2 = closure->data; | ||
3475 | 150 | } | ||
3476 | 151 | callback = (GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3477 | 152 | |||
3478 | 153 | v_return = callback (data1, | ||
3479 | 154 | g_marshal_value_peek_string (param_values + 1), | ||
3480 | 155 | g_marshal_value_peek_boolean (param_values + 2), | ||
3481 | 156 | g_marshal_value_peek_pointer (param_values + 3), | ||
3483 | 157 | data2); | 245 | data2); |
3484 | 158 | 246 | ||
3485 | 159 | g_value_set_boolean (return_value, v_return); | 247 | g_value_set_boolean (return_value, v_return); |
3486 | @@ -204,48 +292,203 @@ | |||
3487 | 204 | g_value_set_boolean (return_value, v_return); | 292 | g_value_set_boolean (return_value, v_return); |
3488 | 205 | } | 293 | } |
3489 | 206 | 294 | ||
3531 | 207 | /* BOOLEAN:BOOLEAN,POINTER */ | 295 | /* BOOLEAN:STRING,STRING,POINTER */ |
3532 | 208 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure, | 296 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER (GClosure *closure, |
3533 | 209 | GValue *return_value, | 297 | GValue *return_value, |
3534 | 210 | guint n_param_values, | 298 | guint n_param_values, |
3535 | 211 | const GValue *param_values, | 299 | const GValue *param_values, |
3536 | 212 | gpointer invocation_hint, | 300 | gpointer invocation_hint, |
3537 | 213 | gpointer marshal_data); | 301 | gpointer marshal_data); |
3538 | 214 | void | 302 | void |
3539 | 215 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure, | 303 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER (GClosure *closure, |
3540 | 216 | GValue *return_value G_GNUC_UNUSED, | 304 | GValue *return_value G_GNUC_UNUSED, |
3541 | 217 | guint n_param_values, | 305 | guint n_param_values, |
3542 | 218 | const GValue *param_values, | 306 | const GValue *param_values, |
3543 | 219 | gpointer invocation_hint G_GNUC_UNUSED, | 307 | gpointer invocation_hint G_GNUC_UNUSED, |
3544 | 220 | gpointer marshal_data) | 308 | gpointer marshal_data) |
3545 | 221 | { | 309 | { |
3546 | 222 | typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (gpointer data1, | 310 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_STRING_POINTER) (gpointer data1, |
3547 | 223 | gboolean arg_1, | 311 | gpointer arg_1, |
3548 | 224 | gpointer arg_2, | 312 | gpointer arg_2, |
3549 | 225 | gpointer data2); | 313 | gpointer arg_3, |
3550 | 226 | register GMarshalFunc_BOOLEAN__BOOLEAN_POINTER callback; | 314 | gpointer data2); |
3551 | 227 | register GCClosure *cc = (GCClosure*) closure; | 315 | register GMarshalFunc_BOOLEAN__STRING_STRING_POINTER callback; |
3552 | 228 | register gpointer data1, data2; | 316 | register GCClosure *cc = (GCClosure*) closure; |
3553 | 229 | gboolean v_return; | 317 | register gpointer data1, data2; |
3554 | 230 | 318 | gboolean v_return; | |
3555 | 231 | g_return_if_fail (return_value != NULL); | 319 | |
3556 | 232 | g_return_if_fail (n_param_values == 3); | 320 | g_return_if_fail (return_value != NULL); |
3557 | 233 | 321 | g_return_if_fail (n_param_values == 4); | |
3558 | 234 | if (G_CCLOSURE_SWAP_DATA (closure)) | 322 | |
3559 | 235 | { | 323 | if (G_CCLOSURE_SWAP_DATA (closure)) |
3560 | 236 | data1 = closure->data; | 324 | { |
3561 | 237 | data2 = g_value_peek_pointer (param_values + 0); | 325 | data1 = closure->data; |
3562 | 238 | } | 326 | data2 = g_value_peek_pointer (param_values + 0); |
3563 | 239 | else | 327 | } |
3564 | 240 | { | 328 | else |
3565 | 241 | data1 = g_value_peek_pointer (param_values + 0); | 329 | { |
3566 | 242 | data2 = closure->data; | 330 | data1 = g_value_peek_pointer (param_values + 0); |
3567 | 243 | } | 331 | data2 = closure->data; |
3568 | 244 | callback = (GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); | 332 | } |
3569 | 245 | 333 | callback = (GMarshalFunc_BOOLEAN__STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); | |
3570 | 246 | v_return = callback (data1, | 334 | |
3571 | 247 | g_marshal_value_peek_boolean (param_values + 1), | 335 | v_return = callback (data1, |
3572 | 336 | g_marshal_value_peek_string (param_values + 1), | ||
3573 | 337 | g_marshal_value_peek_string (param_values + 2), | ||
3574 | 338 | g_marshal_value_peek_pointer (param_values + 3), | ||
3575 | 339 | data2); | ||
3576 | 340 | |||
3577 | 341 | g_value_set_boolean (return_value, v_return); | ||
3578 | 342 | } | ||
3579 | 343 | |||
3580 | 344 | /* BOOLEAN:STRING,POINTER,POINTER */ | ||
3581 | 345 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER (GClosure *closure, | ||
3582 | 346 | GValue *return_value, | ||
3583 | 347 | guint n_param_values, | ||
3584 | 348 | const GValue *param_values, | ||
3585 | 349 | gpointer invocation_hint, | ||
3586 | 350 | gpointer marshal_data); | ||
3587 | 351 | void | ||
3588 | 352 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER (GClosure *closure, | ||
3589 | 353 | GValue *return_value G_GNUC_UNUSED, | ||
3590 | 354 | guint n_param_values, | ||
3591 | 355 | const GValue *param_values, | ||
3592 | 356 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3593 | 357 | gpointer marshal_data) | ||
3594 | 358 | { | ||
3595 | 359 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_POINTER_POINTER) (gpointer data1, | ||
3596 | 360 | gpointer arg_1, | ||
3597 | 361 | gpointer arg_2, | ||
3598 | 362 | gpointer arg_3, | ||
3599 | 363 | gpointer data2); | ||
3600 | 364 | register GMarshalFunc_BOOLEAN__STRING_POINTER_POINTER callback; | ||
3601 | 365 | register GCClosure *cc = (GCClosure*) closure; | ||
3602 | 366 | register gpointer data1, data2; | ||
3603 | 367 | gboolean v_return; | ||
3604 | 368 | |||
3605 | 369 | g_return_if_fail (return_value != NULL); | ||
3606 | 370 | g_return_if_fail (n_param_values == 4); | ||
3607 | 371 | |||
3608 | 372 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3609 | 373 | { | ||
3610 | 374 | data1 = closure->data; | ||
3611 | 375 | data2 = g_value_peek_pointer (param_values + 0); | ||
3612 | 376 | } | ||
3613 | 377 | else | ||
3614 | 378 | { | ||
3615 | 379 | data1 = g_value_peek_pointer (param_values + 0); | ||
3616 | 380 | data2 = closure->data; | ||
3617 | 381 | } | ||
3618 | 382 | callback = (GMarshalFunc_BOOLEAN__STRING_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3619 | 383 | |||
3620 | 384 | v_return = callback (data1, | ||
3621 | 385 | g_marshal_value_peek_string (param_values + 1), | ||
3622 | 248 | g_marshal_value_peek_pointer (param_values + 2), | 386 | g_marshal_value_peek_pointer (param_values + 2), |
3623 | 387 | g_marshal_value_peek_pointer (param_values + 3), | ||
3624 | 388 | data2); | ||
3625 | 389 | |||
3626 | 390 | g_value_set_boolean (return_value, v_return); | ||
3627 | 391 | } | ||
3628 | 392 | |||
3629 | 393 | /* BOOLEAN:STRING,INT,STRING,POINTER */ | ||
3630 | 394 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER (GClosure *closure, | ||
3631 | 395 | GValue *return_value, | ||
3632 | 396 | guint n_param_values, | ||
3633 | 397 | const GValue *param_values, | ||
3634 | 398 | gpointer invocation_hint, | ||
3635 | 399 | gpointer marshal_data); | ||
3636 | 400 | void | ||
3637 | 401 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER (GClosure *closure, | ||
3638 | 402 | GValue *return_value G_GNUC_UNUSED, | ||
3639 | 403 | guint n_param_values, | ||
3640 | 404 | const GValue *param_values, | ||
3641 | 405 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3642 | 406 | gpointer marshal_data) | ||
3643 | 407 | { | ||
3644 | 408 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_INT_STRING_POINTER) (gpointer data1, | ||
3645 | 409 | gpointer arg_1, | ||
3646 | 410 | gint arg_2, | ||
3647 | 411 | gpointer arg_3, | ||
3648 | 412 | gpointer arg_4, | ||
3649 | 413 | gpointer data2); | ||
3650 | 414 | register GMarshalFunc_BOOLEAN__STRING_INT_STRING_POINTER callback; | ||
3651 | 415 | register GCClosure *cc = (GCClosure*) closure; | ||
3652 | 416 | register gpointer data1, data2; | ||
3653 | 417 | gboolean v_return; | ||
3654 | 418 | |||
3655 | 419 | g_return_if_fail (return_value != NULL); | ||
3656 | 420 | g_return_if_fail (n_param_values == 5); | ||
3657 | 421 | |||
3658 | 422 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3659 | 423 | { | ||
3660 | 424 | data1 = closure->data; | ||
3661 | 425 | data2 = g_value_peek_pointer (param_values + 0); | ||
3662 | 426 | } | ||
3663 | 427 | else | ||
3664 | 428 | { | ||
3665 | 429 | data1 = g_value_peek_pointer (param_values + 0); | ||
3666 | 430 | data2 = closure->data; | ||
3667 | 431 | } | ||
3668 | 432 | callback = (GMarshalFunc_BOOLEAN__STRING_INT_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3669 | 433 | |||
3670 | 434 | v_return = callback (data1, | ||
3671 | 435 | g_marshal_value_peek_string (param_values + 1), | ||
3672 | 436 | g_marshal_value_peek_int (param_values + 2), | ||
3673 | 437 | g_marshal_value_peek_string (param_values + 3), | ||
3674 | 438 | g_marshal_value_peek_pointer (param_values + 4), | ||
3675 | 439 | data2); | ||
3676 | 440 | |||
3677 | 441 | g_value_set_boolean (return_value, v_return); | ||
3678 | 442 | } | ||
3679 | 443 | |||
3680 | 444 | /* BOOLEAN:STRING,DOUBLE,STRING,POINTER,POINTER */ | ||
3681 | 445 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER (GClosure *closure, | ||
3682 | 446 | GValue *return_value, | ||
3683 | 447 | guint n_param_values, | ||
3684 | 448 | const GValue *param_values, | ||
3685 | 449 | gpointer invocation_hint, | ||
3686 | 450 | gpointer marshal_data); | ||
3687 | 451 | void | ||
3688 | 452 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER (GClosure *closure, | ||
3689 | 453 | GValue *return_value G_GNUC_UNUSED, | ||
3690 | 454 | guint n_param_values, | ||
3691 | 455 | const GValue *param_values, | ||
3692 | 456 | gpointer invocation_hint G_GNUC_UNUSED, | ||
3693 | 457 | gpointer marshal_data) | ||
3694 | 458 | { | ||
3695 | 459 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER) (gpointer data1, | ||
3696 | 460 | gpointer arg_1, | ||
3697 | 461 | gdouble arg_2, | ||
3698 | 462 | gpointer arg_3, | ||
3699 | 463 | gpointer arg_4, | ||
3700 | 464 | gpointer arg_5, | ||
3701 | 465 | gpointer data2); | ||
3702 | 466 | register GMarshalFunc_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER callback; | ||
3703 | 467 | register GCClosure *cc = (GCClosure*) closure; | ||
3704 | 468 | register gpointer data1, data2; | ||
3705 | 469 | gboolean v_return; | ||
3706 | 470 | |||
3707 | 471 | g_return_if_fail (return_value != NULL); | ||
3708 | 472 | g_return_if_fail (n_param_values == 6); | ||
3709 | 473 | |||
3710 | 474 | if (G_CCLOSURE_SWAP_DATA (closure)) | ||
3711 | 475 | { | ||
3712 | 476 | data1 = closure->data; | ||
3713 | 477 | data2 = g_value_peek_pointer (param_values + 0); | ||
3714 | 478 | } | ||
3715 | 479 | else | ||
3716 | 480 | { | ||
3717 | 481 | data1 = g_value_peek_pointer (param_values + 0); | ||
3718 | 482 | data2 = closure->data; | ||
3719 | 483 | } | ||
3720 | 484 | callback = (GMarshalFunc_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback); | ||
3721 | 485 | |||
3722 | 486 | v_return = callback (data1, | ||
3723 | 487 | g_marshal_value_peek_string (param_values + 1), | ||
3724 | 488 | g_marshal_value_peek_double (param_values + 2), | ||
3725 | 489 | g_marshal_value_peek_string (param_values + 3), | ||
3726 | 490 | g_marshal_value_peek_pointer (param_values + 4), | ||
3727 | 491 | g_marshal_value_peek_pointer (param_values + 5), | ||
3728 | 249 | data2); | 492 | data2); |
3729 | 250 | 493 | ||
3730 | 251 | g_value_set_boolean (return_value, v_return); | 494 | g_value_set_boolean (return_value, v_return); |
3731 | @@ -298,35 +541,33 @@ | |||
3732 | 298 | g_value_set_boolean (return_value, v_return); | 541 | g_value_set_boolean (return_value, v_return); |
3733 | 299 | } | 542 | } |
3734 | 300 | 543 | ||
3742 | 301 | /* BOOLEAN:STRING,STRING,STRING,STRING,POINTER */ | 544 | /* BOOLEAN:STRING,BOOLEAN,POINTER */ |
3743 | 302 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER (GClosure *closure, | 545 | extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure, |
3744 | 303 | GValue *return_value, | 546 | GValue *return_value, |
3745 | 304 | guint n_param_values, | 547 | guint n_param_values, |
3746 | 305 | const GValue *param_values, | 548 | const GValue *param_values, |
3747 | 306 | gpointer invocation_hint, | 549 | gpointer invocation_hint, |
3748 | 307 | gpointer marshal_data); | 550 | gpointer marshal_data); |
3749 | 308 | void | 551 | void |
3756 | 309 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER (GClosure *closure, | 552 | dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure, |
3757 | 310 | GValue *return_value G_GNUC_UNUSED, | 553 | GValue *return_value G_GNUC_UNUSED, |
3758 | 311 | guint n_param_values, | 554 | guint n_param_values, |
3759 | 312 | const GValue *param_values, | 555 | const GValue *param_values, |
3760 | 313 | gpointer invocation_hint G_GNUC_UNUSED, | 556 | gpointer invocation_hint G_GNUC_UNUSED, |
3761 | 314 | gpointer marshal_data) | 557 | gpointer marshal_data) |
3762 | 315 | { | 558 | { |
3771 | 316 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_STRING_STRING_STRING_POINTER) (gpointer data1, | 559 | typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (gpointer data1, |
3772 | 317 | gpointer arg_1, | 560 | gpointer arg_1, |
3773 | 318 | gpointer arg_2, | 561 | gboolean arg_2, |
3774 | 319 | gpointer arg_3, | 562 | gpointer arg_3, |
3775 | 320 | gpointer arg_4, | 563 | gpointer data2); |
3776 | 321 | gpointer arg_5, | 564 | register GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER callback; |
3769 | 322 | gpointer data2); | ||
3770 | 323 | register GMarshalFunc_BOOLEAN__STRING_STRING_STRING_STRING_POINTER callback; | ||
3777 | 324 | register GCClosure *cc = (GCClosure*) closure; | 565 | register GCClosure *cc = (GCClosure*) closure; |
3778 | 325 | register gpointer data1, data2; | 566 | register gpointer data1, data2; |
3779 | 326 | gboolean v_return; | 567 | gboolean v_return; |
3780 | 327 | 568 | ||
3781 | 328 | g_return_if_fail (return_value != NULL); | 569 | g_return_if_fail (return_value != NULL); |
3783 | 329 | g_return_if_fail (n_param_values == 6); | 570 | g_return_if_fail (n_param_values == 4); |
3784 | 330 | 571 | ||
3785 | 331 | if (G_CCLOSURE_SWAP_DATA (closure)) | 572 | if (G_CCLOSURE_SWAP_DATA (closure)) |
3786 | 332 | { | 573 | { |
3787 | @@ -338,14 +579,12 @@ | |||
3788 | 338 | data1 = g_value_peek_pointer (param_values + 0); | 579 | data1 = g_value_peek_pointer (param_values + 0); |
3789 | 339 | data2 = closure->data; | 580 | data2 = closure->data; |
3790 | 340 | } | 581 | } |
3792 | 341 | callback = (GMarshalFunc_BOOLEAN__STRING_STRING_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback); | 582 | callback = (GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback); |
3793 | 342 | 583 | ||
3794 | 343 | v_return = callback (data1, | 584 | v_return = callback (data1, |
3795 | 344 | g_marshal_value_peek_string (param_values + 1), | 585 | g_marshal_value_peek_string (param_values + 1), |
3800 | 345 | g_marshal_value_peek_string (param_values + 2), | 586 | g_marshal_value_peek_boolean (param_values + 2), |
3801 | 346 | g_marshal_value_peek_string (param_values + 3), | 587 | g_marshal_value_peek_pointer (param_values + 3), |
3798 | 347 | g_marshal_value_peek_string (param_values + 4), | ||
3799 | 348 | g_marshal_value_peek_pointer (param_values + 5), | ||
3802 | 349 | data2); | 588 | data2); |
3803 | 350 | 589 | ||
3804 | 351 | g_value_set_boolean (return_value, v_return); | 590 | g_value_set_boolean (return_value, v_return); |
3805 | @@ -359,26 +598,30 @@ | |||
3806 | 359 | static const DBusGMethodInfo dbus_glib_cd_dbus_main_methods[] = { | 598 | static const DBusGMethodInfo dbus_glib_cd_dbus_main_methods[] = { |
3807 | 360 | { (GCallback) cd_dbus_main_reboot, dbus_glib_marshal_cd_dbus_main_BOOLEAN__POINTER, 0 }, | 599 | { (GCallback) cd_dbus_main_reboot, dbus_glib_marshal_cd_dbus_main_BOOLEAN__POINTER, 0 }, |
3808 | 361 | { (GCallback) cd_dbus_main_quit, dbus_glib_marshal_cd_dbus_main_BOOLEAN__POINTER, 34 }, | 600 | { (GCallback) cd_dbus_main_quit, dbus_glib_marshal_cd_dbus_main_BOOLEAN__POINTER, 34 }, |
3823 | 362 | { (GCallback) cd_dbus_main_show_desklet, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER, 66 }, | 601 | { (GCallback) cd_dbus_main_show_dock, dbus_glib_marshal_cd_dbus_main_BOOLEAN__INT_POINTER, 66 }, |
3824 | 363 | { (GCallback) cd_dbus_main_reload_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 121 }, | 602 | { (GCallback) cd_dbus_main_show_desklet, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER, 118 }, |
3825 | 364 | { (GCallback) cd_dbus_main_activate_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER, 177 }, | 603 | { (GCallback) cd_dbus_main_reload_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 173 }, |
3826 | 365 | { (GCallback) cd_dbus_main_show_dock, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER, 249 }, | 604 | { (GCallback) cd_dbus_main_activate_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER, 229 }, |
3827 | 366 | { (GCallback) cd_dbus_main_create_launcher_from_scratch, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 294 }, | 605 | { (GCallback) cd_dbus_main_get_icon_properties, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER, 301 }, |
3828 | 367 | { (GCallback) cd_dbus_main_load_launcher_from_file, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 405 }, | 606 | { (GCallback) cd_dbus_main_get_container_properties, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER, 390 }, |
3829 | 368 | { (GCallback) cd_dbus_main_reload_launcher, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 470 }, | 607 | { (GCallback) cd_dbus_main_get_module_properties, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER, 484 }, |
3830 | 369 | { (GCallback) cd_dbus_main_remove_launcher, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 529 }, | 608 | { (GCallback) cd_dbus_main_add_launcher, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER, 572 }, |
3831 | 370 | { (GCallback) cd_dbus_main_set_quick_info, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 588 }, | 609 | { (GCallback) cd_dbus_main_add_temporary_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOXED_POINTER, 679 }, |
3832 | 371 | { (GCallback) cd_dbus_main_set_label, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 690 }, | 610 | { (GCallback) cd_dbus_main_reload_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 747 }, |
3833 | 372 | { (GCallback) cd_dbus_main_set_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 784 }, | 611 | { (GCallback) cd_dbus_main_remove_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 800 }, |
3834 | 373 | { (GCallback) cd_dbus_main_set_emblem, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER, 877 }, | 612 | { (GCallback) cd_dbus_main_set_quick_info, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER, 853 }, |
3835 | 374 | { (GCallback) cd_dbus_main_animate, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER, 986 }, | 613 | { (GCallback) cd_dbus_main_set_label, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER, 923 }, |
3836 | 375 | { (GCallback) cd_dbus_main_show_dialog, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER, 1097 }, | 614 | { (GCallback) cd_dbus_main_set_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER, 985 }, |
3837 | 615 | { (GCallback) cd_dbus_main_set_emblem, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER, 1046 }, | ||
3838 | 616 | { (GCallback) cd_dbus_main_animate, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER, 1123 }, | ||
3839 | 617 | { (GCallback) cd_dbus_main_demands_attention, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_STRING_STRING_POINTER, 1202 }, | ||
3840 | 618 | { (GCallback) cd_dbus_main_show_dialog, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER, 1287 }, | ||
3841 | 376 | }; | 619 | }; |
3842 | 377 | 620 | ||
3843 | 378 | const DBusGObjectInfo dbus_glib_cd_dbus_main_object_info = { 1, | 621 | const DBusGObjectInfo dbus_glib_cd_dbus_main_object_info = { 1, |
3844 | 379 | dbus_glib_cd_dbus_main_methods, | 622 | dbus_glib_cd_dbus_main_methods, |
3847 | 380 | 16, | 623 | 20, |
3848 | 381 | "org.cairodock.CairoDock\0Reboot\0S\0\0org.cairodock.CairoDock\0Quit\0S\0\0org.cairodock.CairoDock\0ShowDesklet\0S\0widgetLayer\0I\0b\0\0org.cairodock.CairoDock\0ReloadModule\0S\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0ActivateModule\0S\0cModuleName\0I\0s\0bActivate\0I\0b\0\0org.cairodock.CairoDock\0ShowDock\0S\0show\0I\0b\0\0org.cairodock.CairoDock\0CreateLauncherFromScratch\0S\0cIconFile\0I\0s\0cLabel\0I\0s\0cCommand\0I\0s\0cParentDockName\0I\0s\0\0org.cairodock.CairoDock\0LoadLauncherFromFile\0S\0cDesktopFile\0I\0s\0\0org.cairodock.CairoDock\0ReloadLauncher\0S\0cDesktopFile\0I\0s\0\0org.cairodock.CairoDock\0RemoveLauncher\0S\0cDesktopFile\0I\0s\0\0org.cairodock.CairoDock\0SetQuickInfo\0S\0cQuickInfo\0I\0s\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0SetLabel\0S\0cLabel\0I\0s\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0SetIcon\0S\0cImage\0I\0s\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0SetEmblem\0S\0cImage\0I\0s\0iPosition\0I\0i\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0Animate\0S\0cAnimation\0I\0s\0iNbRounds\0I\0i\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0ShowDialog\0S\0message\0I\0s\0iDuration\0I\0i\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0\0", | 624 | "org.cairodock.CairoDock\0Reboot\0S\0\0org.cairodock.CairoDock\0Quit\0S\0\0org.cairodock.CairoDock\0ShowDock\0S\0iVisibility\0I\0i\0\0org.cairodock.CairoDock\0ShowDesklet\0S\0widgetLayer\0I\0b\0\0org.cairodock.CairoDock\0ReloadModule\0S\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0ActivateModule\0S\0cModuleName\0I\0s\0bActivate\0I\0b\0\0org.cairodock.CairoDock\0GetIconProperties\0S\0cIconQuery\0I\0s\0pIconProperties\0O\0F\0N\0aa{sv}\0\0org.cairodock.CairoDock\0GetContainerProperties\0S\0cName\0I\0s\0pContainerProperties\0O\0F\0N\0aa{sv}\0\0org.cairodock.CairoDock\0GetModuleProperties\0S\0cName\0I\0s\0pModuleProperties\0O\0F\0N\0aa{sv}\0\0org.cairodock.CairoDock\0AddLauncher\0S\0cDesktopFilePath\0I\0s\0fOrder\0I\0d\0cDockName\0I\0s\0cLauncherFile\0O\0F\0N\0s\0\0org.cairodock.CairoDock\0AddTemporaryIcon\0S\0hIconProperties\0I\0a{sv}\0\0org.cairodock.CairoDock\0ReloadIcon\0S\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0RemoveIcon\0S\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetQuickInfo\0S\0cQuickInfo\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetLabel\0S\0cLabel\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetIcon\0S\0cImage\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetEmblem\0S\0cImage\0I\0s\0iPosition\0I\0i\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0Animate\0S\0cAnimation\0I\0s\0iNbRounds\0I\0i\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0DemandsAttention\0S\0bStart\0I\0b\0cAnimation\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0ShowDialog\0S\0message\0I\0s\0iDuration\0I\0i\0cIconQuery\0I\0s\0\0\0", |
3849 | 382 | "\0", | 625 | "\0", |
3850 | 383 | "\0" | 626 | "\0" |
3851 | 384 | }; | 627 | }; |
3852 | 385 | 628 | ||
3853 | === modified file 'Dbus/src/dbus_introspectable.xml' | |||
3854 | --- Dbus/src/dbus_introspectable.xml 2011-04-20 20:46:51 +0000 | |||
3855 | +++ Dbus/src/dbus_introspectable.xml 2011-08-09 20:07:46 +0000 | |||
3856 | @@ -6,6 +6,9 @@ | |||
3857 | 6 | </method> | 6 | </method> |
3858 | 7 | <method name="Quit"> | 7 | <method name="Quit"> |
3859 | 8 | </method> | 8 | </method> |
3860 | 9 | <method name="ShowDock"> | ||
3861 | 10 | <arg name="iVisibility" type="i" direction="in"/> | ||
3862 | 11 | </method> | ||
3863 | 9 | <method name="ShowDesklet"> | 12 | <method name="ShowDesklet"> |
3864 | 10 | <arg name="widgetLayer" type="b" direction="in"/> | 13 | <arg name="widgetLayer" type="b" direction="in"/> |
3865 | 11 | </method> | 14 | </method> |
3866 | @@ -16,62 +19,67 @@ | |||
3867 | 16 | <arg name="cModuleName" type="s" direction="in"/> | 19 | <arg name="cModuleName" type="s" direction="in"/> |
3868 | 17 | <arg name="bActivate" type="b" direction="in"/> | 20 | <arg name="bActivate" type="b" direction="in"/> |
3869 | 18 | </method> | 21 | </method> |
3888 | 19 | <method name="ShowDock"> | 22 | |
3889 | 20 | <arg name="show" type="b" direction="in"/> | 23 | <method name="GetIconProperties"> |
3890 | 21 | </method> | 24 | <arg name="cIconQuery" type="s" direction="in"/> |
3891 | 22 | <method name="CreateLauncherFromScratch"> | 25 | <arg name="pIconProperties" direction="out" type="aa{sv}"/> |
3892 | 23 | <arg name="cIconFile" type="s" direction="in"/> | 26 | </method> |
3893 | 24 | <arg name="cLabel" type="s" direction="in"/> | 27 | <method name="GetContainerProperties"> |
3894 | 25 | <arg name="cCommand" type="s" direction="in"/> | 28 | <arg name="cName" type="s" direction="in"/> |
3895 | 26 | <arg name="cParentDockName" type="s" direction="in"/> | 29 | <arg name="pContainerProperties" direction="out" type="aa{sv}"/> |
3896 | 27 | </method> | 30 | </method> |
3897 | 28 | <method name="LoadLauncherFromFile"> | 31 | <method name="GetModuleProperties"> |
3898 | 29 | <arg name="cDesktopFile" type="s" direction="in"/> | 32 | <arg name="cName" type="s" direction="in"/> |
3899 | 30 | </method> | 33 | <arg name="pModuleProperties" direction="out" type="aa{sv}"/> |
3900 | 31 | <method name="ReloadLauncher"> | 34 | </method> |
3901 | 32 | <arg name="cDesktopFile" type="s" direction="in"/> | 35 | |
3902 | 33 | </method> | 36 | <method name="AddLauncher"> |
3903 | 34 | <method name="RemoveLauncher"> | 37 | <arg name="cDesktopFilePath" type="s" direction="in"/> |
3904 | 35 | <arg name="cDesktopFile" type="s" direction="in"/> | 38 | <arg name="fOrder" type="d" direction="in"/> |
3905 | 36 | </method> | 39 | <arg name="cDockName" type="s" direction="in"/> |
3906 | 40 | <arg name="cLauncherFile" type="s" direction="out"/> | ||
3907 | 41 | </method> | ||
3908 | 42 | <method name="AddTemporaryIcon"> | ||
3909 | 43 | <arg name="hIconProperties" direction="in" type="a{sv}"/> | ||
3910 | 44 | </method> | ||
3911 | 45 | <method name="ReloadIcon"> | ||
3912 | 46 | <arg name="cIconQuery" type="s" direction="in"/> | ||
3913 | 47 | </method> | ||
3914 | 48 | <method name="RemoveIcon"> | ||
3915 | 49 | <arg name="cIconQuery" type="s" direction="in"/> | ||
3916 | 50 | </method> | ||
3917 | 51 | |||
3918 | 37 | <method name="SetQuickInfo"> | 52 | <method name="SetQuickInfo"> |
3919 | 38 | <arg name="cQuickInfo" type="s" direction="in"/> | 53 | <arg name="cQuickInfo" type="s" direction="in"/> |
3923 | 39 | <arg name="cIconName" type="s" direction="in"/> | 54 | <arg name="cIconQuery" type="s" direction="in"/> |
3921 | 40 | <arg name="cIconCommand" type="s" direction="in"/> | ||
3922 | 41 | <arg name="cModuleName" type="s" direction="in"/> | ||
3924 | 42 | </method> | 55 | </method> |
3925 | 43 | <method name="SetLabel"> | 56 | <method name="SetLabel"> |
3926 | 44 | <arg name="cLabel" type="s" direction="in"/> | 57 | <arg name="cLabel" type="s" direction="in"/> |
3930 | 45 | <arg name="cIconName" type="s" direction="in"/> | 58 | <arg name="cIconQuery" type="s" direction="in"/> |
3928 | 46 | <arg name="cIconCommand" type="s" direction="in"/> | ||
3929 | 47 | <arg name="cModuleName" type="s" direction="in"/> | ||
3931 | 48 | </method> | 59 | </method> |
3932 | 49 | <method name="SetIcon"> | 60 | <method name="SetIcon"> |
3933 | 50 | <arg name="cImage" type="s" direction="in"/> | 61 | <arg name="cImage" type="s" direction="in"/> |
3937 | 51 | <arg name="cIconName" type="s" direction="in"/> | 62 | <arg name="cIconQuery" type="s" direction="in"/> |
3935 | 52 | <arg name="cIconCommand" type="s" direction="in"/> | ||
3936 | 53 | <arg name="cModuleName" type="s" direction="in"/> | ||
3938 | 54 | </method> | 63 | </method> |
3939 | 55 | <method name="SetEmblem"> | 64 | <method name="SetEmblem"> |
3940 | 56 | <arg name="cImage" type="s" direction="in"/> | 65 | <arg name="cImage" type="s" direction="in"/> |
3941 | 57 | <arg name="iPosition" type="i" direction="in"/> | 66 | <arg name="iPosition" type="i" direction="in"/> |
3945 | 58 | <arg name="cIconName" type="s" direction="in"/> | 67 | <arg name="cIconQuery" type="s" direction="in"/> |
3943 | 59 | <arg name="cIconCommand" type="s" direction="in"/> | ||
3944 | 60 | <arg name="cModuleName" type="s" direction="in"/> | ||
3946 | 61 | </method> | 68 | </method> |
3947 | 62 | <method name="Animate"> | 69 | <method name="Animate"> |
3948 | 63 | <arg name="cAnimation" type="s" direction="in"/> | 70 | <arg name="cAnimation" type="s" direction="in"/> |
3949 | 64 | <arg name="iNbRounds" type="i" direction="in"/> | 71 | <arg name="iNbRounds" type="i" direction="in"/> |
3953 | 65 | <arg name="cIconName" type="s" direction="in"/> | 72 | <arg name="cIconQuery" type="s" direction="in"/> |
3954 | 66 | <arg name="cIconCommand" type="s" direction="in"/> | 73 | </method> |
3955 | 67 | <arg name="cModuleName" type="s" direction="in"/> | 74 | <method name="DemandsAttention"> |
3956 | 75 | <arg name="bStart" type="b" direction="in"/> | ||
3957 | 76 | <arg name="cAnimation" type="s" direction="in"/> | ||
3958 | 77 | <arg name="cIconQuery" type="s" direction="in"/> | ||
3959 | 68 | </method> | 78 | </method> |
3960 | 69 | <method name="ShowDialog"> | 79 | <method name="ShowDialog"> |
3961 | 70 | <arg name="message" type="s" direction="in"/> | 80 | <arg name="message" type="s" direction="in"/> |
3962 | 71 | <arg name="iDuration" type="i" direction="in"/> | 81 | <arg name="iDuration" type="i" direction="in"/> |
3966 | 72 | <arg name="cIconName" type="s" direction="in"/> | 82 | <arg name="cIconQuery" type="s" direction="in"/> |
3964 | 73 | <arg name="cIconCommand" type="s" direction="in"/> | ||
3965 | 74 | <arg name="cModuleName" type="s" direction="in"/> | ||
3967 | 75 | </method> | 83 | </method> |
3968 | 76 | </interface> | 84 | </interface> |
3969 | 77 | </node> | 85 | </node> |
3970 | 78 | 86 | ||
3971 | === modified file 'Dbus/src/interface-applet-methods.c' | |||
3972 | --- Dbus/src/interface-applet-methods.c 2011-04-20 20:46:51 +0000 | |||
3973 | +++ Dbus/src/interface-applet-methods.c 2011-08-09 20:07:46 +0000 | |||
3974 | @@ -435,6 +435,7 @@ | |||
3975 | 435 | gtk_range_set_value (GTK_RANGE (pScale), fInitialValue); | 435 | gtk_range_set_value (GTK_RANGE (pScale), fInitialValue); |
3976 | 436 | 436 | ||
3977 | 437 | gtk_widget_set (pScale, "width-request", 150, NULL); | 437 | gtk_widget_set (pScale, "width-request", 150, NULL); |
3978 | 438 | cairo_dock_set_dialog_widget_text_color (pScale); | ||
3979 | 438 | 439 | ||
3980 | 439 | if (cMinLabel || cMaxLabel) | 440 | if (cMinLabel || cMaxLabel) |
3981 | 440 | { | 441 | { |
3982 | @@ -669,8 +670,8 @@ | |||
3983 | 669 | pIcon->pSubDock = NULL; | 670 | pIcon->pSubDock = NULL; |
3984 | 670 | } | 671 | } |
3985 | 671 | pInstance->pDesklet->icons = g_list_concat (pInstance->pDesklet->icons, pIconsList); | 672 | pInstance->pDesklet->icons = g_list_concat (pInstance->pDesklet->icons, pIconsList); |
3988 | 672 | gpointer data[2] = {GINT_TO_POINTER (TRUE), GINT_TO_POINTER (FALSE)}; | 673 | gpointer data[3] = {GINT_TO_POINTER (0), GINT_TO_POINTER (TRUE), NULL}; |
3989 | 673 | cairo_dock_set_desklet_renderer_by_name (pInstance->pDesklet, "Caroussel", (CairoDeskletRendererConfigPtr) data); | 674 | cairo_dock_set_desklet_renderer_by_name (pInstance->pDesklet, "Panel", (CairoDeskletRendererConfigPtr) data); |
3990 | 674 | } | 675 | } |
3991 | 675 | 676 | ||
3992 | 676 | return TRUE; | 677 | return TRUE; |
3993 | @@ -844,15 +845,15 @@ | |||
3994 | 844 | pRenderAttr->iMemorySize = (pIcon->fWidth > 1 ? pIcon->fWidth : 32); // fWidht peut etre <= 1 en mode desklet au chargement. | 845 | pRenderAttr->iMemorySize = (pIcon->fWidth > 1 ? pIcon->fWidth : 32); // fWidht peut etre <= 1 en mode desklet au chargement. |
3995 | 845 | // Line;Plain;Bar;Circle;Plain Circle | 846 | // Line;Plain;Bar;Circle;Plain Circle |
3996 | 846 | if (cTheme == NULL || strcmp (cTheme, "Line") == 0) | 847 | if (cTheme == NULL || strcmp (cTheme, "Line") == 0) |
3998 | 847 | attr.iType = CAIRO_DOCK_GRAPH2_LINE; | 848 | attr.iType = CAIRO_DOCK_GRAPH_LINE; |
3999 | 848 | else if (strcmp (cTheme, "Plain") == 0) | 849 | else if (strcmp (cTheme, "Plain") == 0) |
4001 | 849 | attr.iType = CAIRO_DOCK_GRAPH2_PLAIN; | 850 | attr.iType = CAIRO_DOCK_GRAPH_PLAIN; |
4002 | 850 | else if (strcmp (cTheme, "Bar") == 0) | 851 | else if (strcmp (cTheme, "Bar") == 0) |
4004 | 851 | attr.iType = CAIRO_DOCK_GRAPH2_BAR; | 852 | attr.iType = CAIRO_DOCK_GRAPH_BAR; |
4005 | 852 | else if (strcmp (cTheme, "Circle") == 0) | 853 | else if (strcmp (cTheme, "Circle") == 0) |
4007 | 853 | attr.iType = CAIRO_DOCK_GRAPH2_CIRCLE; | 854 | attr.iType = CAIRO_DOCK_GRAPH_CIRCLE; |
4008 | 854 | else if (strcmp (cTheme, "Plain Circle") == 0) | 855 | else if (strcmp (cTheme, "Plain Circle") == 0) |
4010 | 855 | attr.iType = CAIRO_DOCK_GRAPH2_CIRCLE_PLAIN; | 856 | attr.iType = CAIRO_DOCK_GRAPH_CIRCLE_PLAIN; |
4011 | 856 | attr.iRadius = 10; | 857 | attr.iRadius = 10; |
4012 | 857 | attr.bMixGraphs = FALSE; | 858 | attr.bMixGraphs = FALSE; |
4013 | 858 | double *fHighColor = g_new (double, iNbValues*3); | 859 | double *fHighColor = g_new (double, iNbValues*3); |
4014 | @@ -929,7 +930,9 @@ | |||
4015 | 929 | if (pIcon->cClass != NULL) | 930 | if (pIcon->cClass != NULL) |
4016 | 930 | cairo_dock_deinhibite_class (pIcon->cClass, pIcon); | 931 | cairo_dock_deinhibite_class (pIcon->cClass, pIcon); |
4017 | 931 | if (cClass != NULL) | 932 | if (cClass != NULL) |
4019 | 932 | cairo_dock_inhibite_class (cClass, pIcon); | 933 | { |
4020 | 934 | cairo_dock_inhibite_class (cClass, pIcon); /// useful to use cairo_dock_register_class ?... | ||
4021 | 935 | } | ||
4022 | 933 | if (! cairo_dock_is_loading ()) | 936 | if (! cairo_dock_is_loading ()) |
4023 | 934 | { | 937 | { |
4024 | 935 | CairoContainer *pContainer = pInstance->pContainer; | 938 | CairoContainer *pContainer = pInstance->pContainer; |
4025 | @@ -1124,6 +1127,9 @@ | |||
4026 | 1124 | { | 1127 | { |
4027 | 1125 | image = gtk_image_new_from_stock (cIcon, GTK_ICON_SIZE_MENU); | 1128 | image = gtk_image_new_from_stock (cIcon, GTK_ICON_SIZE_MENU); |
4028 | 1126 | } | 1129 | } |
4029 | 1130 | #if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16) | ||
4030 | 1131 | gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE); | ||
4031 | 1132 | #endif | ||
4032 | 1127 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), image); | 1133 | gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), image); |
4033 | 1128 | } | 1134 | } |
4034 | 1129 | } | 1135 | } |
4035 | @@ -1268,7 +1274,7 @@ | |||
4036 | 1268 | } | 1274 | } |
4037 | 1269 | else if (strcmp (cProperty, "orientation") == 0) | 1275 | else if (strcmp (cProperty, "orientation") == 0) |
4038 | 1270 | { | 1276 | { |
4040 | 1271 | CairoDockPositionType iScreenBorder = (g_pMainDock ? ((! g_pMainDock->container.bIsHorizontal) << 1) | (! g_pMainDock->container.bDirectionUp) : 0); | 1277 | CairoDockPositionType iScreenBorder = ((! pContainer->bIsHorizontal) << 1) | (! pContainer->bDirectionUp); |
4041 | 1272 | g_value_init (v, G_TYPE_UINT); | 1278 | g_value_init (v, G_TYPE_UINT); |
4042 | 1273 | g_value_set_uint (v, iScreenBorder); | 1279 | g_value_set_uint (v, iScreenBorder); |
4043 | 1274 | } | 1280 | } |
4044 | 1275 | 1281 | ||
4045 | === modified file 'Dbus/src/interface-applet-signals.c' | |||
4046 | --- Dbus/src/interface-applet-signals.c 2011-04-20 20:46:51 +0000 | |||
4047 | +++ Dbus/src/interface-applet-signals.c 2011-08-09 20:07:46 +0000 | |||
4048 | @@ -734,7 +734,7 @@ | |||
4049 | 734 | 734 | ||
4050 | 735 | void cd_dbus_emit_on_stop_module (CairoDockModuleInstance *pModuleInstance) | 735 | void cd_dbus_emit_on_stop_module (CairoDockModuleInstance *pModuleInstance) |
4051 | 736 | { | 736 | { |
4053 | 737 | //g_print ("%s (%s, %d)\n", __func__, pModuleInstance->pModule->pVisitCard->cModuleName, myData.bKeepObjectAlive); | 737 | //g_print ("%s (%s)\n", __func__, pModuleInstance->pModule->pVisitCard->cModuleName); |
4054 | 738 | dbusApplet *pDbusApplet = cd_dbus_get_dbus_applet_from_instance (pModuleInstance); | 738 | dbusApplet *pDbusApplet = cd_dbus_get_dbus_applet_from_instance (pModuleInstance); |
4055 | 739 | if (pDbusApplet != NULL) | 739 | if (pDbusApplet != NULL) |
4056 | 740 | g_signal_emit (pDbusApplet, | 740 | g_signal_emit (pDbusApplet, |
4057 | 741 | 741 | ||
4058 | === modified file 'Dbus/src/interface-main-methods.c' | |||
4059 | --- Dbus/src/interface-main-methods.c 2011-04-20 20:46:51 +0000 | |||
4060 | +++ Dbus/src/interface-main-methods.c 2011-08-09 20:07:46 +0000 | |||
4061 | @@ -21,21 +21,16 @@ | |||
4062 | 21 | exemples : | 21 | exemples : |
4063 | 22 | ---------- | 22 | ---------- |
4064 | 23 | 23 | ||
4074 | 24 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.CreateLauncherFromScratch string:gimp.png string:"fake gimp" string:gimp string:none | 24 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetQuickInfo string:123 string:"class=firefox" |
4075 | 25 | 25 | ||
4076 | 26 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetLabel string:new_label string:icon_name string:any string:none | 26 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:default int32:2 string:"class=firefox" |
4068 | 27 | |||
4069 | 28 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetQuickInfo string:123 string:none string:none string:dustbin | ||
4070 | 29 | |||
4071 | 30 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:default int32:2 string:any string:firefox string:none | ||
4072 | 31 | |||
4073 | 32 | dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetIcon string:firefox-3.0 string:any string:nautilus string:none | ||
4077 | 33 | 27 | ||
4078 | 34 | ******************************************************************************/ | 28 | ******************************************************************************/ |
4079 | 35 | 29 | ||
4080 | 36 | #include <unistd.h> | 30 | #include <unistd.h> |
4081 | 37 | #include <glib.h> | 31 | #include <glib.h> |
4082 | 38 | 32 | ||
4083 | 33 | #include "cairo-dock.h" | ||
4084 | 39 | #include "interface-main-methods.h" | 34 | #include "interface-main-methods.h" |
4085 | 40 | 35 | ||
4086 | 41 | #define nullify_argument(string) do {\ | 36 | #define nullify_argument(string) do {\ |
4087 | @@ -61,6 +56,77 @@ | |||
4088 | 61 | return TRUE; | 56 | return TRUE; |
4089 | 62 | } | 57 | } |
4090 | 63 | 58 | ||
4091 | 59 | static void _show_hide_one_dock (const gchar *cDockName, CairoDock *pDock, gpointer data) | ||
4092 | 60 | { | ||
4093 | 61 | if (pDock->iRefCount != 0) | ||
4094 | 62 | return ; | ||
4095 | 63 | gboolean bShow = GPOINTER_TO_INT (data); | ||
4096 | 64 | if (bShow) | ||
4097 | 65 | { | ||
4098 | 66 | ///cairo_dock_pop_up (pDock); | ||
4099 | 67 | ///if (pDock->bAutoHide) | ||
4100 | 68 | cairo_dock_emit_enter_signal (CAIRO_CONTAINER (pDock)); | ||
4101 | 69 | } | ||
4102 | 70 | else | ||
4103 | 71 | { | ||
4104 | 72 | ///cairo_dock_pop_down (pDock); // ne fait rien s'il n'etait pas "popped". | ||
4105 | 73 | ///if (pDock->bAutoHide) | ||
4106 | 74 | cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock)); | ||
4107 | 75 | } | ||
4108 | 76 | } | ||
4109 | 77 | gboolean cd_dbus_main_show_dock (dbusMainObject *pDbusCallback, gint iVisibiliy, GError **error) | ||
4110 | 78 | { | ||
4111 | 79 | if (! myConfig.bEnableShowDock) | ||
4112 | 80 | return FALSE; | ||
4113 | 81 | |||
4114 | 82 | if (g_pMainDock == NULL) | ||
4115 | 83 | return FALSE; | ||
4116 | 84 | |||
4117 | 85 | gboolean bShow; | ||
4118 | 86 | switch (iVisibiliy) | ||
4119 | 87 | { | ||
4120 | 88 | case 0: // hide | ||
4121 | 89 | bShow = FALSE; | ||
4122 | 90 | break; | ||
4123 | 91 | case 1: // show | ||
4124 | 92 | bShow = TRUE; | ||
4125 | 93 | break; | ||
4126 | 94 | case 2: // toggle | ||
4127 | 95 | default: | ||
4128 | 96 | bShow = (g_pMainDock->bIsBelow || (g_pMainDock->bAutoHide && g_pMainDock->fHideOffset == 1)); | ||
4129 | 97 | break; | ||
4130 | 98 | } | ||
4131 | 99 | |||
4132 | 100 | if (bShow) | ||
4133 | 101 | cairo_dock_stop_quick_hide (); | ||
4134 | 102 | |||
4135 | 103 | cairo_dock_foreach_docks ((GHFunc) _show_hide_one_dock, GINT_TO_POINTER (bShow)); | ||
4136 | 104 | |||
4137 | 105 | if (! bShow) | ||
4138 | 106 | cairo_dock_quick_hide_all_docks (); | ||
4139 | 107 | |||
4140 | 108 | return TRUE; | ||
4141 | 109 | } | ||
4142 | 110 | |||
4143 | 111 | gboolean cd_dbus_main_show_desklet (dbusMainObject *pDbusCallback, gboolean *widgetLayer, GError **error) | ||
4144 | 112 | { | ||
4145 | 113 | if (! myConfig.bEnableDesklets) | ||
4146 | 114 | return FALSE; | ||
4147 | 115 | if (dbus_deskletVisible) | ||
4148 | 116 | { | ||
4149 | 117 | cairo_dock_set_desklets_visibility_to_default (); | ||
4150 | 118 | cairo_dock_show_xwindow (dbus_xLastActiveWindow); | ||
4151 | 119 | } | ||
4152 | 120 | else | ||
4153 | 121 | { | ||
4154 | 122 | dbus_xLastActiveWindow = cairo_dock_get_current_active_window (); | ||
4155 | 123 | cairo_dock_set_all_desklets_visible (widgetLayer != NULL ? *widgetLayer : FALSE); | ||
4156 | 124 | } | ||
4157 | 125 | dbus_deskletVisible = !dbus_deskletVisible; | ||
4158 | 126 | return TRUE; | ||
4159 | 127 | } | ||
4160 | 128 | |||
4161 | 129 | |||
4162 | 64 | gboolean cd_dbus_main_reload_module (dbusMainObject *pDbusCallback, const gchar *cModuleName, GError **error) | 130 | gboolean cd_dbus_main_reload_module (dbusMainObject *pDbusCallback, const gchar *cModuleName, GError **error) |
4163 | 65 | { | 131 | { |
4164 | 66 | if (! myConfig.bEnableReloadModule) | 132 | if (! myConfig.bEnableReloadModule) |
4165 | @@ -72,11 +138,9 @@ | |||
4166 | 72 | } | 138 | } |
4167 | 73 | else | 139 | else |
4168 | 74 | { | 140 | { |
4169 | 75 | //CairoDockInternalModule *pInternalModule = cairo_dock_find_internal_module_from_name (cModuleName); | ||
4170 | 76 | GldiManager *pManager = gldi_get_manager (cModuleName); | 141 | GldiManager *pManager = gldi_get_manager (cModuleName); |
4171 | 77 | if (pManager != NULL) | 142 | if (pManager != NULL) |
4172 | 78 | { | 143 | { |
4173 | 79 | //cairo_dock_reload_internal_module (pInternalModule, g_cConfFile); | ||
4174 | 80 | gldi_reload_manager (pManager, g_cConfFile); | 144 | gldi_reload_manager (pManager, g_cConfFile); |
4175 | 81 | } | 145 | } |
4176 | 82 | else | 146 | else |
4177 | @@ -96,9 +160,9 @@ | |||
4178 | 96 | CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName); | 160 | CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName); |
4179 | 97 | if (pModule == NULL) | 161 | if (pModule == NULL) |
4180 | 98 | { | 162 | { |
4182 | 99 | /*if (cairo_dock_find_internal_module_from_name (cModuleName) != NULL) | 163 | if (gldi_get_manager (cModuleName) != NULL) |
4183 | 100 | cd_warning ("Internal modules can't be (de)activated."); | 164 | cd_warning ("Internal modules can't be (de)activated."); |
4185 | 101 | else*/ | 165 | else |
4186 | 102 | cd_warning ("no such module (%s)", cModuleName); | 166 | cd_warning ("no such module (%s)", cModuleName); |
4187 | 103 | return FALSE; | 167 | return FALSE; |
4188 | 104 | } | 168 | } |
4189 | @@ -110,86 +174,864 @@ | |||
4190 | 110 | return TRUE; | 174 | return TRUE; |
4191 | 111 | } | 175 | } |
4192 | 112 | 176 | ||
4253 | 113 | gboolean cd_dbus_main_show_desklet(dbusMainObject *pDbusCallback, gboolean *widgetLayer, GError **error) | 177 | |
4254 | 114 | { | 178 | ////////////////// |
4255 | 115 | if (! myConfig.bEnableDesklets) | 179 | /// ICON QUERY /// |
4256 | 116 | return FALSE; | 180 | ////////////////// |
4257 | 117 | if (dbus_deskletVisible) | 181 | |
4258 | 118 | { | 182 | typedef struct { |
4259 | 119 | cairo_dock_set_desklets_visibility_to_default (); | 183 | const gchar *cType; |
4260 | 120 | cairo_dock_show_xwindow (dbus_xLastActiveWindow); | 184 | const gchar *cName; |
4261 | 121 | } | 185 | const gchar *cCommand; |
4262 | 122 | else | 186 | const gchar *cClass; |
4263 | 123 | { | 187 | const gchar *cContainerName; |
4264 | 124 | dbus_xLastActiveWindow = cairo_dock_get_current_active_window (); | 188 | Window Xid; |
4265 | 125 | cairo_dock_set_all_desklets_visible (widgetLayer != NULL ? *widgetLayer : FALSE); | 189 | const gchar *cDesktopFile; |
4266 | 126 | } | 190 | const gchar *cModuleName; |
4267 | 127 | dbus_deskletVisible = !dbus_deskletVisible; | 191 | gint iPosition; |
4268 | 128 | return TRUE; | 192 | gboolean bMatchAll; |
4269 | 129 | } | 193 | GList *pMatchingIcons; |
4270 | 130 | 194 | } CDIconQueryBuffer; | |
4271 | 131 | static void _show_hide_one_dock (const gchar *cDockName, CairoDock *pDock, gpointer data) | 195 | static inline gboolean _strings_match (const gchar *q, const gchar *p) // query, parameter |
4272 | 132 | { | 196 | { |
4273 | 133 | if (pDock->iRefCount != 0) | 197 | if (!p) |
4274 | 134 | return ; | 198 | return (strcmp (q, "none") == 0); |
4275 | 135 | gboolean bShow = GPOINTER_TO_INT (data); | 199 | int n = strlen(q); |
4276 | 136 | if (bShow) | 200 | if (n != 0 && q[n-1] == '*') // ok with UTF-8 too. |
4277 | 137 | { | 201 | return (strncmp (q, p, n-1) == 0); |
4278 | 138 | ///cairo_dock_pop_up (pDock); | 202 | return (strcmp (q, p) == 0); |
4279 | 139 | if (pDock->bAutoHide) | 203 | } |
4280 | 140 | cairo_dock_emit_enter_signal (CAIRO_CONTAINER (pDock)); | 204 | static inline gboolean _strings_match_case (const gchar *q, const gchar *p) // query, parameter |
4281 | 141 | } | 205 | { |
4282 | 142 | else | 206 | if (!p) |
4283 | 143 | { | 207 | return (strcmp (q, "none") == 0); |
4284 | 144 | ///cairo_dock_pop_down (pDock); // ne fait rien s'il n'etait pas "popped". | 208 | int n = strlen(q); |
4285 | 145 | if (pDock->bAutoHide) | 209 | if (n != 0 && q[n-1] == '*') |
4286 | 146 | cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock)); | 210 | return (g_ascii_strncasecmp (q, p, n-1) == 0); |
4287 | 147 | } | 211 | return (g_ascii_strcasecmp (q, p) == 0); |
4288 | 148 | } | 212 | } |
4289 | 149 | gboolean cd_dbus_main_show_dock (dbusMainObject *pDbusCallback, gboolean bShow, GError **error) | 213 | static gboolean _icon_is_matching (Icon *pIcon, CairoContainer *pContainer, CDIconQueryBuffer *pQuery) |
4290 | 150 | { | 214 | { |
4291 | 151 | if (! myConfig.bEnableShowDock) | 215 | gboolean bOr = FALSE; |
4292 | 152 | return FALSE; | 216 | gboolean bAnd = TRUE; // at least 1 of the fields is not nul. |
4293 | 153 | 217 | gboolean r; | |
4294 | 154 | if (bShow) | 218 | if (pQuery->cType) |
4295 | 155 | cairo_dock_stop_quick_hide (); | 219 | { |
4296 | 156 | 220 | const gchar *cType; | |
4297 | 157 | cairo_dock_foreach_docks ((GHFunc) _show_hide_one_dock, GINT_TO_POINTER (bShow)); | 221 | if (CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (pIcon)) |
4298 | 158 | 222 | cType = "Launcher"; | |
4299 | 159 | if (! bShow) | 223 | else if (CAIRO_DOCK_ICON_TYPE_IS_APPLI (pIcon)) |
4300 | 160 | cairo_dock_quick_hide_all_docks (); | 224 | cType = "Application"; |
4301 | 161 | 225 | else if (CAIRO_DOCK_ICON_TYPE_IS_APPLET (pIcon)) | |
4302 | 162 | return TRUE; | 226 | cType = "Applet"; |
4303 | 163 | } | 227 | else if (CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon)) |
4304 | 164 | 228 | cType = "Separator"; | |
4305 | 165 | gboolean cd_dbus_main_create_launcher_from_scratch (dbusMainObject *pDbusCallback, const gchar *cIconFile, const gchar *cLabel, const gchar *cCommand, const gchar *cParentDockName, GError **error) | 229 | else if (CAIRO_DOCK_ICON_TYPE_IS_CONTAINER (pIcon)) |
4306 | 166 | { | 230 | cType = "Container"; |
4307 | 167 | if (! myConfig.bEnableCreateLauncher) | 231 | else if (CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER (pIcon)) |
4308 | 168 | return FALSE; | 232 | cType = "Class-Container"; |
4309 | 169 | 233 | else | |
4310 | 170 | nullify_argument (cParentDockName); | 234 | cType = "Other"; |
4311 | 171 | if (cParentDockName == NULL) | 235 | r = (strcmp (pQuery->cType, cType) == 0); |
4312 | 172 | cParentDockName = CAIRO_DOCK_MAIN_DOCK_NAME; | 236 | bOr |= r; |
4313 | 237 | bAnd &= r; | ||
4314 | 238 | } | ||
4315 | 239 | if (pQuery->cName) | ||
4316 | 240 | { | ||
4317 | 241 | r = _strings_match (pQuery->cName, pIcon->cName); | ||
4318 | 242 | bOr |= r; | ||
4319 | 243 | bAnd &= r; | ||
4320 | 244 | } | ||
4321 | 245 | if (pQuery->cCommand) | ||
4322 | 246 | { | ||
4323 | 247 | r = _strings_match (pQuery->cCommand, pIcon->cCommand); | ||
4324 | 248 | bOr |= r; | ||
4325 | 249 | bAnd &= r; | ||
4326 | 250 | } | ||
4327 | 251 | if (pQuery->cClass) | ||
4328 | 252 | { | ||
4329 | 253 | r = _strings_match_case (pQuery->cClass, pIcon->cClass); | ||
4330 | 254 | bOr |= r; | ||
4331 | 255 | bAnd &= r; | ||
4332 | 256 | } | ||
4333 | 257 | if (pQuery->cContainerName) | ||
4334 | 258 | { | ||
4335 | 259 | const gchar *cContainerName = NULL; | ||
4336 | 260 | if (CAIRO_DOCK_IS_DOCK (pContainer)) | ||
4337 | 261 | cContainerName = pIcon->cParentDockName; | ||
4338 | 262 | else if (CAIRO_DOCK_IS_DESKLET (pContainer)) | ||
4339 | 263 | { | ||
4340 | 264 | Icon *pMainIcon = CAIRO_DESKLET (pContainer)->pIcon; | ||
4341 | 265 | if (CAIRO_DOCK_IS_APPLET (pMainIcon)) | ||
4342 | 266 | cContainerName = pMainIcon->pModuleInstance->pModule->pVisitCard->cModuleName; | ||
4343 | 267 | } | ||
4344 | 268 | r = _strings_match (pQuery->cContainerName, cContainerName); | ||
4345 | 269 | bOr |= r; | ||
4346 | 270 | bAnd &= r; | ||
4347 | 271 | } | ||
4348 | 272 | if (pQuery->Xid != 0) | ||
4349 | 273 | { | ||
4350 | 274 | r = (pIcon->Xid == pQuery->Xid); | ||
4351 | 275 | bOr |= r; | ||
4352 | 276 | bAnd &= r; | ||
4353 | 277 | } | ||
4354 | 278 | if (pQuery->cDesktopFile) | ||
4355 | 279 | { | ||
4356 | 280 | r = _strings_match (pQuery->cDesktopFile, pIcon->cDesktopFileName); | ||
4357 | 281 | if (!r && CAIRO_DOCK_IS_APPLET (pIcon) && pIcon->pModuleInstance->cConfFilePath) | ||
4358 | 282 | { | ||
4359 | 283 | if (*pQuery->cDesktopFile == '/') // query the complete path. | ||
4360 | 284 | { | ||
4361 | 285 | r = _strings_match (pQuery->cDesktopFile, pIcon->pModuleInstance->cConfFilePath); | ||
4362 | 286 | } | ||
4363 | 287 | else // query the file name only. | ||
4364 | 288 | { | ||
4365 | 289 | gchar *str = strrchr (pIcon->pModuleInstance->cConfFilePath, '/'); | ||
4366 | 290 | if (str) | ||
4367 | 291 | r = _strings_match (pQuery->cDesktopFile, str+1); | ||
4368 | 292 | } | ||
4369 | 293 | } | ||
4370 | 294 | bOr |= r; | ||
4371 | 295 | bAnd &= r; | ||
4372 | 296 | } | ||
4373 | 297 | if (pQuery->cModuleName) | ||
4374 | 298 | { | ||
4375 | 299 | r = (CAIRO_DOCK_IS_APPLET (pIcon) && _strings_match (pQuery->cModuleName, pIcon->pModuleInstance->pModule->pVisitCard->cModuleName)); | ||
4376 | 300 | bOr |= r; | ||
4377 | 301 | bAnd &= r; | ||
4378 | 302 | } | ||
4379 | 303 | |||
4380 | 304 | return ((pQuery->bMatchAll && bAnd) || (!pQuery->bMatchAll && bOr)); | ||
4381 | 305 | } | ||
4382 | 306 | static void _check_icon_matching (Icon *pIcon, CairoContainer *pContainer, CDIconQueryBuffer *pQuery) | ||
4383 | 307 | { | ||
4384 | 308 | if (_icon_is_matching (pIcon, pContainer, pQuery)) | ||
4385 | 309 | pQuery->pMatchingIcons = g_list_prepend (pQuery->pMatchingIcons, pIcon); | ||
4386 | 310 | } | ||
4387 | 311 | static void _get_icon_at_position_in_dock (const gchar *cDockName, CairoDock *pDock, CDIconQueryBuffer *pQuery) | ||
4388 | 312 | { | ||
4389 | 313 | Icon *pIcon = g_list_nth_data (pDock->icons, pQuery->iPosition); | ||
4390 | 314 | if (pIcon != NULL) | ||
4391 | 315 | pQuery->pMatchingIcons = g_list_prepend (pQuery->pMatchingIcons, pIcon); | ||
4392 | 316 | } | ||
4393 | 317 | static gboolean _get_icon_at_position_in_desklet (CairoDesklet *pDesklet, CDIconQueryBuffer *pQuery) | ||
4394 | 318 | { | ||
4395 | 319 | Icon *pIcon = g_list_nth_data (pDesklet->icons, pQuery->iPosition); | ||
4396 | 320 | if (pIcon != NULL) | ||
4397 | 321 | pQuery->pMatchingIcons = g_list_prepend (pQuery->pMatchingIcons, pIcon); | ||
4398 | 322 | return FALSE; // don't stop. | ||
4399 | 323 | } | ||
4400 | 324 | static gboolean _prepare_query (CDIconQueryBuffer *pQuery, const gchar *cKey, const gchar *cValue) | ||
4401 | 325 | { | ||
4402 | 326 | g_return_val_if_fail (cKey != NULL, FALSE); | ||
4403 | 327 | if (cValue == NULL) // use "none" keyword to look for "icons that don't have key". | ||
4404 | 328 | return FALSE; | ||
4405 | 329 | |||
4406 | 330 | if (strcmp (cKey, "name") == 0 || strcmp (cKey, "label") == 0) | ||
4407 | 331 | pQuery->cName = cValue; | ||
4408 | 332 | else if (strcmp (cKey, "command") == 0) | ||
4409 | 333 | pQuery->cCommand = cValue; | ||
4410 | 334 | else if (strcmp (cKey, "class") == 0) | ||
4411 | 335 | pQuery->cClass = cValue; | ||
4412 | 336 | else if (strcmp (cKey, "container") == 0) | ||
4413 | 337 | pQuery->cContainerName = cValue; | ||
4414 | 338 | else if (strcmp (cKey, "Xid") == 0) | ||
4415 | 339 | pQuery->Xid = strtol(cValue, NULL, 0); // can read hexa, decimal or octal. | ||
4416 | 340 | else if (strcmp (cKey, "config-file") == 0) | ||
4417 | 341 | pQuery->cDesktopFile = cValue; | ||
4418 | 342 | else if (strcmp (cKey, "module") == 0) | ||
4419 | 343 | pQuery->cModuleName = cValue; | ||
4420 | 344 | else if (strcmp (cKey, "position") == 0) | ||
4421 | 345 | pQuery->iPosition = atoi (cValue); | ||
4422 | 346 | else if (strcmp (cKey, "type") == 0) | ||
4423 | 347 | pQuery->cType = cValue; | ||
4424 | 348 | else | ||
4425 | 349 | { | ||
4426 | 350 | cd_warning ("wrong key (%s)", cKey); | ||
4427 | 351 | return FALSE; | ||
4428 | 352 | } | ||
4429 | 353 | return TRUE; | ||
4430 | 354 | } | ||
4431 | 355 | static GList *_find_matching_icons_for_key (const gchar *cKey, const gchar *cValue) | ||
4432 | 356 | { | ||
4433 | 357 | //g_print (" %s (%s, %s)\n", __func__, cKey, cValue); | ||
4434 | 358 | CDIconQueryBuffer query; | ||
4435 | 359 | memset (&query, 0, sizeof (CDIconQueryBuffer)); | ||
4436 | 360 | query.iPosition = -1; | ||
4437 | 361 | query.bMatchAll = TRUE; | ||
4438 | 362 | |||
4439 | 363 | gboolean bValidQuery = _prepare_query (&query, cKey, cValue); | ||
4440 | 364 | g_return_val_if_fail (bValidQuery, NULL); | ||
4441 | 365 | |||
4442 | 366 | if (query.iPosition >= 0) | ||
4443 | 367 | { | ||
4444 | 368 | cairo_dock_foreach_docks ((GHFunc) _get_icon_at_position_in_dock, &query); | ||
4445 | 369 | cairo_dock_foreach_desklet ((CairoDockForeachDeskletFunc) _get_icon_at_position_in_desklet, &query); | ||
4446 | 370 | } | ||
4447 | 371 | else | ||
4448 | 372 | { | ||
4449 | 373 | cairo_dock_foreach_icons ((CairoDockForeachIconFunc) _check_icon_matching, &query); | ||
4450 | 374 | } | ||
4451 | 375 | return query.pMatchingIcons; | ||
4452 | 376 | } | ||
4453 | 377 | static GList *_find_matching_icons_for_test (gchar *cTest) | ||
4454 | 378 | { | ||
4455 | 379 | g_return_val_if_fail (cTest != NULL, NULL); | ||
4456 | 380 | //g_print (" %s (%s)\n", __func__, cTest); | ||
4457 | 381 | |||
4458 | 382 | gchar *str = strchr (cTest, '='); | ||
4459 | 383 | g_return_val_if_fail (str != NULL, NULL); | ||
4460 | 384 | |||
4461 | 385 | *str = '\0'; | ||
4462 | 386 | gchar *cKey = g_strstrip ((gchar*)cTest); // g_strstrip modifies the string in place (by moving the rest of the characters forward and cutting the trailing spaces) | ||
4463 | 387 | gchar *cValue = g_strstrip (str+1); | ||
4464 | 388 | |||
4465 | 389 | return _find_matching_icons_for_key (cKey, cValue); | ||
4466 | 390 | } | ||
4467 | 391 | static GList *_merge (GList *pList1, GList *pList2) | ||
4468 | 392 | { | ||
4469 | 393 | //g_print ("%s ()\n", __func__); | ||
4470 | 394 | GList *pList = NULL; | ||
4471 | 395 | GList *ic; | ||
4472 | 396 | Icon *pIcon; | ||
4473 | 397 | for (ic = pList1; ic != NULL; ic = ic->next) | ||
4474 | 398 | { | ||
4475 | 399 | pIcon = ic->data; | ||
4476 | 400 | if (g_list_find (pList2, pIcon) != NULL) | ||
4477 | 401 | pList = g_list_prepend (pList, pIcon); | ||
4478 | 402 | } | ||
4479 | 403 | g_list_free (pList1); | ||
4480 | 404 | g_list_free (pList2); | ||
4481 | 405 | return pList; | ||
4482 | 406 | } | ||
4483 | 407 | static GList *_concat (GList *pList1, GList *pList2) | ||
4484 | 408 | { | ||
4485 | 409 | //g_print ("%s ()\n", __func__); | ||
4486 | 410 | GList *pList = g_list_copy (pList2); | ||
4487 | 411 | GList *ic; | ||
4488 | 412 | Icon *pIcon; | ||
4489 | 413 | for (ic = pList1; ic != NULL; ic = ic->next) | ||
4490 | 414 | { | ||
4491 | 415 | pIcon = ic->data; | ||
4492 | 416 | if (!g_list_find (pList2, pIcon)) | ||
4493 | 417 | pList = g_list_prepend (pList, pIcon); | ||
4494 | 418 | } | ||
4495 | 419 | g_list_free (pList1); | ||
4496 | 420 | g_list_free (pList2); | ||
4497 | 421 | return pList; | ||
4498 | 422 | } | ||
4499 | 423 | GList *cd_dbus_find_matching_icons (gchar *cQuery) | ||
4500 | 424 | { | ||
4501 | 425 | g_return_val_if_fail (cQuery != NULL, NULL); | ||
4502 | 426 | //g_print ("%s (%s)\n", __func__, cQuery); | ||
4503 | 427 | |||
4504 | 428 | gchar *str; | ||
4505 | 429 | str = strchr (cQuery, '|'); // a && b || c && d <=> (a && b) || (c && d) | ||
4506 | 430 | if (str) | ||
4507 | 431 | { | ||
4508 | 432 | *str = '\0'; | ||
4509 | 433 | GList *pList1 = cd_dbus_find_matching_icons (cQuery); | ||
4510 | 434 | GList *pList2 = cd_dbus_find_matching_icons (str+1); | ||
4511 | 435 | return _concat (pList1, pList2); | ||
4512 | 436 | } | ||
4513 | 437 | str = strchr (cQuery, '&'); | ||
4514 | 438 | if (str) | ||
4515 | 439 | { | ||
4516 | 440 | *str = '\0'; | ||
4517 | 441 | GList *pList1 = cd_dbus_find_matching_icons (cQuery); | ||
4518 | 442 | GList *pList2 = cd_dbus_find_matching_icons (str+1); | ||
4519 | 443 | return _merge (pList1, pList2); | ||
4520 | 444 | } | ||
4521 | 445 | return _find_matching_icons_for_test (cQuery); | ||
4522 | 446 | } | ||
4523 | 447 | |||
4524 | 448 | |||
4525 | 449 | gboolean cd_dbus_main_get_icon_properties (dbusMainObject *pDbusCallback, gchar *cIconQuery, GPtrArray **pIconAttributes, GError **error) | ||
4526 | 450 | { | ||
4527 | 451 | GList *pList = cd_dbus_find_matching_icons (cIconQuery); // if NULL, will just return an empty array. | ||
4528 | 452 | |||
4529 | 453 | GPtrArray *pTab = g_ptr_array_new (); | ||
4530 | 454 | *pIconAttributes = pTab; | ||
4531 | 455 | |||
4532 | 456 | GHashTable *h; | ||
4533 | 457 | GValue *v; | ||
4534 | 458 | Icon *pIcon; | ||
4535 | 459 | CairoContainer *pContainer; | ||
4536 | 460 | int iPosition; | ||
4537 | 461 | const gchar *cType; | ||
4538 | 462 | const gchar *cContainerName; | ||
4539 | 463 | const gchar *cDesktopFile; | ||
4540 | 464 | GList *ic; | ||
4541 | 465 | for (ic = pList; ic != NULL; ic = ic->next) | ||
4542 | 466 | { | ||
4543 | 467 | pIcon = ic->data; | ||
4544 | 468 | pContainer = cairo_dock_search_container_from_icon (pIcon); | ||
4545 | 469 | |||
4546 | 470 | h = g_hash_table_new_full (g_str_hash, | ||
4547 | 471 | g_str_equal, | ||
4548 | 472 | g_free, /// can we use const char here instead of duplicating each string ?... | ||
4549 | 473 | g_free); | ||
4550 | 474 | g_ptr_array_add (pTab, h); | ||
4551 | 475 | |||
4552 | 476 | if (CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (pIcon)) | ||
4553 | 477 | cType = "Launcher"; | ||
4554 | 478 | else if (CAIRO_DOCK_ICON_TYPE_IS_APPLI (pIcon)) | ||
4555 | 479 | cType = "Application"; | ||
4556 | 480 | else if (CAIRO_DOCK_ICON_TYPE_IS_APPLET (pIcon)) | ||
4557 | 481 | cType = "Applet"; | ||
4558 | 482 | else if (CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon)) | ||
4559 | 483 | cType = "Separator"; | ||
4560 | 484 | else if (CAIRO_DOCK_ICON_TYPE_IS_CONTAINER (pIcon)) | ||
4561 | 485 | cType = "Container"; | ||
4562 | 486 | else if (CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER (pIcon)) | ||
4563 | 487 | cType = "Class-Container"; | ||
4564 | 488 | else | ||
4565 | 489 | cType = "Other"; | ||
4566 | 490 | v = g_new0 (GValue, 1); | ||
4567 | 491 | g_value_init (v, G_TYPE_STRING); | ||
4568 | 492 | g_value_set_string (v, cType); | ||
4569 | 493 | g_hash_table_insert (h, g_strdup ("type"), v); | ||
4570 | 494 | |||
4571 | 495 | cDesktopFile = NULL; | ||
4572 | 496 | if (pIcon->cDesktopFileName != NULL) | ||
4573 | 497 | cDesktopFile = pIcon->cDesktopFileName; | ||
4574 | 498 | else if (CAIRO_DOCK_IS_APPLET (pIcon)) | ||
4575 | 499 | cDesktopFile = pIcon->pModuleInstance->cConfFilePath; | ||
4576 | 500 | v = g_new0 (GValue, 1); | ||
4577 | 501 | g_value_init (v, G_TYPE_STRING); | ||
4578 | 502 | g_value_set_string (v, cDesktopFile); | ||
4579 | 503 | g_hash_table_insert (h, g_strdup ("config-file"), v); | ||
4580 | 504 | |||
4581 | 505 | if (CAIRO_DOCK_IS_APPLET (pIcon)) | ||
4582 | 506 | { | ||
4583 | 507 | v = g_new0 (GValue, 1); | ||
4584 | 508 | g_value_init (v, G_TYPE_STRING); | ||
4585 | 509 | g_value_set_string (v, pIcon->pModuleInstance->pModule->pVisitCard->cModuleName); | ||
4586 | 510 | g_hash_table_insert (h, g_strdup ("module"), v); | ||
4587 | 511 | } | ||
4588 | 512 | |||
4589 | 513 | v = g_new0 (GValue, 1); | ||
4590 | 514 | g_value_init (v, G_TYPE_STRING); | ||
4591 | 515 | g_value_set_string (v, pIcon->cName); /// g_value_set_static_string ?... | ||
4592 | 516 | g_hash_table_insert (h, g_strdup ("name"), v); | ||
4593 | 517 | |||
4594 | 518 | v = g_new0 (GValue, 1); | ||
4595 | 519 | g_value_init (v, G_TYPE_STRING); | ||
4596 | 520 | g_value_set_string (v, pIcon->cCommand); | ||
4597 | 521 | g_hash_table_insert (h, g_strdup ("command"), v); | ||
4598 | 522 | |||
4599 | 523 | v = g_new0 (GValue, 1); | ||
4600 | 524 | g_value_init (v, G_TYPE_STRING); | ||
4601 | 525 | g_value_set_string (v, pIcon->cClass); | ||
4602 | 526 | g_hash_table_insert (h, g_strdup ("class"), v); | ||
4603 | 527 | |||
4604 | 528 | v = g_new0 (GValue, 1); | ||
4605 | 529 | g_value_init (v, G_TYPE_STRING); | ||
4606 | 530 | g_value_set_string (v, pIcon->cFileName); | ||
4607 | 531 | g_hash_table_insert (h, g_strdup ("icon"), v); | ||
4608 | 532 | |||
4609 | 533 | v = g_new0 (GValue, 1); | ||
4610 | 534 | g_value_init (v, G_TYPE_STRING); | ||
4611 | 535 | g_value_set_string (v, pIcon->cQuickInfo); | ||
4612 | 536 | g_hash_table_insert (h, g_strdup ("quick-info"), v); | ||
4613 | 537 | |||
4614 | 538 | v = g_new0 (GValue, 1); | ||
4615 | 539 | g_value_init (v, G_TYPE_UINT); | ||
4616 | 540 | g_value_set_uint (v, pIcon->Xid); | ||
4617 | 541 | g_hash_table_insert (h, g_strdup ("Xid"), v); | ||
4618 | 542 | |||
4619 | 543 | iPosition = -1; | ||
4620 | 544 | cContainerName = NULL; | ||
4621 | 545 | if (CAIRO_DOCK_IS_DOCK (pContainer)) | ||
4622 | 546 | { | ||
4623 | 547 | CairoDock *pDock = CAIRO_DOCK (pContainer); | ||
4624 | 548 | iPosition = g_list_index (pDock->icons, pIcon); | ||
4625 | 549 | cContainerName = pIcon->cParentDockName; | ||
4626 | 550 | } | ||
4627 | 551 | else if (CAIRO_DOCK_IS_DESKLET (pContainer)) | ||
4628 | 552 | { | ||
4629 | 553 | CairoDesklet *pDesklet = CAIRO_DESKLET (pContainer); | ||
4630 | 554 | if (pDesklet->pIcon == pIcon) | ||
4631 | 555 | iPosition = 0; | ||
4632 | 556 | else | ||
4633 | 557 | iPosition = g_list_index (pDesklet->icons, pIcon); | ||
4634 | 558 | if (CAIRO_DOCK_IS_APPLET (pDesklet->pIcon)) | ||
4635 | 559 | cContainerName = pDesklet->pIcon->pModuleInstance->pModule->pVisitCard->cModuleName; | ||
4636 | 560 | } | ||
4637 | 561 | v = g_new0 (GValue, 1); | ||
4638 | 562 | g_value_init (v, G_TYPE_INT); | ||
4639 | 563 | g_value_set_int (v, iPosition); | ||
4640 | 564 | g_hash_table_insert (h, g_strdup ("position"), v); | ||
4641 | 565 | |||
4642 | 566 | v = g_new0 (GValue, 1); | ||
4643 | 567 | g_value_init (v, G_TYPE_STRING); | ||
4644 | 568 | g_value_set_string (v, cContainerName); | ||
4645 | 569 | g_hash_table_insert (h, g_strdup ("container"), v); | ||
4646 | 570 | |||
4647 | 571 | v = g_new0 (GValue, 1); | ||
4648 | 572 | g_value_init (v, G_TYPE_DOUBLE); | ||
4649 | 573 | g_value_set_double (v, pIcon->fOrder); | ||
4650 | 574 | g_hash_table_insert (h, g_strdup ("order"), v); | ||
4651 | 575 | } | ||
4652 | 576 | |||
4653 | 577 | g_list_free (pList); | ||
4654 | 578 | return TRUE; | ||
4655 | 579 | } | ||
4656 | 580 | |||
4657 | 581 | static void _set_container_props (CairoContainer *pContainer, GHashTable *h) | ||
4658 | 582 | { | ||
4659 | 583 | GValue *v; | ||
4660 | 584 | int x, y, w, ht; | ||
4661 | 585 | if (pContainer->bIsHorizontal) | ||
4662 | 586 | { | ||
4663 | 587 | x = pContainer->iWindowPositionX; | ||
4664 | 588 | y = pContainer->iWindowPositionY; | ||
4665 | 589 | w = pContainer->iWidth; | ||
4666 | 590 | ht = pContainer->iHeight; | ||
4667 | 591 | } | ||
4668 | 592 | else | ||
4669 | 593 | { | ||
4670 | 594 | y = pContainer->iWindowPositionX; | ||
4671 | 595 | x = pContainer->iWindowPositionY; | ||
4672 | 596 | ht = pContainer->iWidth; | ||
4673 | 597 | w = pContainer->iHeight; | ||
4674 | 598 | } | ||
4675 | 599 | v = g_new0 (GValue, 1); | ||
4676 | 600 | g_value_init (v, G_TYPE_INT); | ||
4677 | 601 | g_value_set_int (v, pContainer->iWindowPositionX); | ||
4678 | 602 | g_hash_table_insert (h, g_strdup ("x"), v); | ||
4679 | 603 | |||
4680 | 604 | v = g_new0 (GValue, 1); | ||
4681 | 605 | g_value_init (v, G_TYPE_INT); | ||
4682 | 606 | g_value_set_int (v, y); | ||
4683 | 607 | g_hash_table_insert (h, g_strdup ("y"), v); | ||
4684 | 608 | |||
4685 | 609 | v = g_new0 (GValue, 1); | ||
4686 | 610 | g_value_init (v, G_TYPE_INT); | ||
4687 | 611 | g_value_set_int (v, w); | ||
4688 | 612 | g_hash_table_insert (h, g_strdup ("width"), v); | ||
4689 | 613 | |||
4690 | 614 | v = g_new0 (GValue, 1); | ||
4691 | 615 | g_value_init (v, G_TYPE_INT); | ||
4692 | 616 | g_value_set_int (v, ht); | ||
4693 | 617 | g_hash_table_insert (h, g_strdup ("height"), v); | ||
4694 | 618 | |||
4695 | 619 | CairoDockPositionType iScreenBorder = ((! pContainer->bIsHorizontal) << 1) | (! pContainer->bDirectionUp); | ||
4696 | 620 | v = g_new0 (GValue, 1); | ||
4697 | 621 | g_value_init (v, G_TYPE_UINT); | ||
4698 | 622 | g_value_set_uint (v, iScreenBorder); | ||
4699 | 623 | g_hash_table_insert (h, g_strdup ("orientation"), v); | ||
4700 | 624 | } | ||
4701 | 625 | static void _insert_dock_props (const gchar *cDockName, CairoDock *pDock, GPtrArray *pTab) | ||
4702 | 626 | { | ||
4703 | 627 | GHashTable *h = g_hash_table_new_full (g_str_hash, | ||
4704 | 628 | g_str_equal, | ||
4705 | 629 | g_free, /// can we use const char here instead of duplicating each string ?... | ||
4706 | 630 | g_free); | ||
4707 | 631 | g_ptr_array_add (pTab, h); | ||
4708 | 632 | |||
4709 | 633 | GValue *v; | ||
4710 | 634 | |||
4711 | 635 | v = g_new0 (GValue, 1); | ||
4712 | 636 | g_value_init (v, G_TYPE_STRING); | ||
4713 | 637 | g_value_set_string (v, "Dock"); | ||
4714 | 638 | g_hash_table_insert (h, g_strdup ("type"), v); | ||
4715 | 639 | |||
4716 | 640 | v = g_new0 (GValue, 1); | ||
4717 | 641 | g_value_init (v, G_TYPE_STRING); | ||
4718 | 642 | g_value_set_string (v, cDockName); | ||
4719 | 643 | g_hash_table_insert (h, g_strdup ("name"), v); | ||
4720 | 644 | |||
4721 | 645 | v = g_new0 (GValue, 1); | ||
4722 | 646 | g_value_init (v, G_TYPE_BOOLEAN); | ||
4723 | 647 | g_value_set_boolean (v, (pDock->iRefCount > 0)); | ||
4724 | 648 | g_hash_table_insert (h, g_strdup ("is-sub-dock"), v); | ||
4725 | 649 | |||
4726 | 650 | v = g_new0 (GValue, 1); | ||
4727 | 651 | g_value_init (v, G_TYPE_INT); | ||
4728 | 652 | g_value_set_int (v, g_list_length (pDock->icons)); | ||
4729 | 653 | g_hash_table_insert (h, g_strdup ("nb-icons"), v); | ||
4730 | 654 | |||
4731 | 655 | _set_container_props (CAIRO_CONTAINER (pDock), h); | ||
4732 | 656 | } | ||
4733 | 657 | static gboolean _insert_desklet_props (CairoDesklet *pDesklet, GPtrArray *pTab) | ||
4734 | 658 | { | ||
4735 | 659 | GHashTable *h = g_hash_table_new_full (g_str_hash, | ||
4736 | 660 | g_str_equal, | ||
4737 | 661 | g_free, /// can we use const char here instead of duplicating each string ?... | ||
4738 | 662 | g_free); | ||
4739 | 663 | g_ptr_array_add (pTab, h); | ||
4740 | 664 | |||
4741 | 665 | GValue *v; | ||
4742 | 666 | |||
4743 | 667 | v = g_new0 (GValue, 1); | ||
4744 | 668 | g_value_init (v, G_TYPE_STRING); | ||
4745 | 669 | g_value_set_string (v, "Desklet"); | ||
4746 | 670 | g_hash_table_insert (h, g_strdup ("type"), v); | ||
4747 | 671 | |||
4748 | 672 | v = g_new0 (GValue, 1); | ||
4749 | 673 | g_value_init (v, G_TYPE_STRING); | ||
4750 | 674 | g_value_set_string (v, CAIRO_DOCK_IS_APPLET (pDesklet->pIcon) ? pDesklet->pIcon->pModuleInstance->pModule->pVisitCard->cModuleName : ""); | ||
4751 | 675 | g_hash_table_insert (h, g_strdup ("name"), v); | ||
4752 | 676 | |||
4753 | 677 | v = g_new0 (GValue, 1); | ||
4754 | 678 | g_value_init (v, G_TYPE_INT); | ||
4755 | 679 | g_value_set_int (v, 1 + g_list_length (pDesklet->icons)); | ||
4756 | 680 | g_hash_table_insert (h, g_strdup ("nb-icons"), v); | ||
4757 | 681 | |||
4758 | 682 | _set_container_props (CAIRO_CONTAINER (pDesklet), h); | ||
4759 | 683 | return FALSE; | ||
4760 | 684 | } | ||
4761 | 685 | static gboolean _check_desklet_name (CairoDesklet *pDesklet, const gchar *cName) | ||
4762 | 686 | { | ||
4763 | 687 | if (CAIRO_DOCK_IS_APPLET (pDesklet->pIcon)) | ||
4764 | 688 | { | ||
4765 | 689 | return (strcmp (cName, pDesklet->pIcon->pModuleInstance->pModule->pVisitCard->cModuleName) == 0); | ||
4766 | 690 | } | ||
4767 | 691 | return FALSE; | ||
4768 | 692 | } | ||
4769 | 693 | gboolean cd_dbus_main_get_container_properties (dbusMainObject *pDbusCallback, const gchar *cName, GPtrArray **pAttributes, GError **error) | ||
4770 | 694 | { | ||
4771 | 695 | nullify_argument (cName); | ||
4772 | 696 | |||
4773 | 697 | GPtrArray *pTab = g_ptr_array_new (); | ||
4774 | 698 | *pAttributes = pTab; | ||
4775 | 699 | |||
4776 | 700 | if (cName == NULL) | ||
4777 | 701 | { | ||
4778 | 702 | cairo_dock_foreach_docks ((GHFunc)_insert_dock_props, pTab); | ||
4779 | 703 | cairo_dock_foreach_desklet ((CairoDockForeachDeskletFunc) _insert_desklet_props, pTab); | ||
4780 | 704 | } | ||
4781 | 705 | else | ||
4782 | 706 | { | ||
4783 | 707 | CairoDock *pDock = cairo_dock_search_dock_from_name (cName); | ||
4784 | 708 | if (pDock != NULL) | ||
4785 | 709 | { | ||
4786 | 710 | _insert_dock_props (cName, pDock, pTab); | ||
4787 | 711 | } | ||
4788 | 712 | else | ||
4789 | 713 | { | ||
4790 | 714 | CairoDesklet *pDesklet = cairo_dock_foreach_desklet ((CairoDockForeachDeskletFunc) _check_desklet_name, (gpointer)cName); | ||
4791 | 715 | if (pDesklet != NULL) | ||
4792 | 716 | { | ||
4793 | 717 | _insert_desklet_props (pDesklet, pTab); | ||
4794 | 718 | } | ||
4795 | 719 | } | ||
4796 | 720 | } | ||
4797 | 721 | |||
4798 | 722 | return TRUE; | ||
4799 | 723 | } | ||
4800 | 724 | |||
4801 | 725 | static gboolean _insert_module_props (CairoDockModule *pModule, GPtrArray *pTab) | ||
4802 | 726 | { | ||
4803 | 727 | GHashTable *h = g_hash_table_new_full (g_str_hash, | ||
4804 | 728 | g_str_equal, | ||
4805 | 729 | g_free, /// can we use const char here instead of duplicating each string ?... | ||
4806 | 730 | g_free); | ||
4807 | 731 | g_ptr_array_add (pTab, h); | ||
4808 | 732 | |||
4809 | 733 | GValue *v; | ||
4810 | 734 | |||
4811 | 735 | v = g_new0 (GValue, 1); | ||
4812 | 736 | g_value_init (v, G_TYPE_STRING); | ||
4813 | 737 | g_value_set_string (v, pModule->pVisitCard->cModuleName); | ||
4814 | 738 | g_hash_table_insert (h, g_strdup ("name"), v); | ||
4815 | 739 | |||
4816 | 740 | v = g_new0 (GValue, 1); | ||
4817 | 741 | g_value_init (v, G_TYPE_UINT); | ||
4818 | 742 | g_value_set_uint (v, pModule->pVisitCard->iContainerType); | ||
4819 | 743 | g_hash_table_insert (h, g_strdup ("type"), v); | ||
4820 | 744 | |||
4821 | 745 | v = g_new0 (GValue, 1); | ||
4822 | 746 | g_value_init (v, G_TYPE_UINT); | ||
4823 | 747 | g_value_set_uint (v, pModule->pVisitCard->iCategory); | ||
4824 | 748 | g_hash_table_insert (h, g_strdup ("category"), v); | ||
4825 | 749 | |||
4826 | 750 | v = g_new0 (GValue, 1); | ||
4827 | 751 | g_value_init (v, G_TYPE_STRING); | ||
4828 | 752 | g_value_set_string (v, pModule->pVisitCard->cTitle); | ||
4829 | 753 | g_hash_table_insert (h, g_strdup ("title"), v); | ||
4830 | 754 | |||
4831 | 755 | v = g_new0 (GValue, 1); | ||
4832 | 756 | g_value_init (v, G_TYPE_STRING); | ||
4833 | 757 | g_value_set_string (v, pModule->pVisitCard->cIconFilePath); | ||
4834 | 758 | g_hash_table_insert (h, g_strdup ("icon"), v); | ||
4835 | 759 | |||
4836 | 760 | v = g_new0 (GValue, 1); | ||
4837 | 761 | g_value_init (v, G_TYPE_STRING); | ||
4838 | 762 | g_value_set_string (v, pModule->pVisitCard->cPreviewFilePath); | ||
4839 | 763 | g_hash_table_insert (h, g_strdup ("preview"), v); | ||
4840 | 764 | |||
4841 | 765 | v = g_new0 (GValue, 1); | ||
4842 | 766 | g_value_init (v, G_TYPE_STRING); | ||
4843 | 767 | g_value_set_string (v, dgettext (pModule->pVisitCard->cGettextDomain, pModule->pVisitCard->cDescription)); | ||
4844 | 768 | g_hash_table_insert (h, g_strdup ("description"), v); | ||
4845 | 769 | |||
4846 | 770 | v = g_new0 (GValue, 1); | ||
4847 | 771 | g_value_init (v, G_TYPE_STRING); | ||
4848 | 772 | g_value_set_string (v, pModule->pVisitCard->cAuthor); | ||
4849 | 773 | g_hash_table_insert (h, g_strdup ("author"), v); | ||
4850 | 774 | |||
4851 | 775 | v = g_new0 (GValue, 1); | ||
4852 | 776 | g_value_init (v, G_TYPE_BOOLEAN); | ||
4853 | 777 | g_value_set_boolean (v, pModule->pVisitCard->bMultiInstance); | ||
4854 | 778 | g_hash_table_insert (h, g_strdup ("is-multi-instance"), v); | ||
4855 | 779 | |||
4856 | 780 | g_print ("list instances ...\n"); | ||
4857 | 781 | gchar **pInstances = g_new0 (gchar*, g_list_length (pModule->pInstancesList)+1); | ||
4858 | 782 | CairoDockModuleInstance *pInstance; | ||
4859 | 783 | int i = 0; | ||
4860 | 784 | GList *mi; | ||
4861 | 785 | for (mi = pModule->pInstancesList; mi != NULL; mi = mi->next) | ||
4862 | 786 | { | ||
4863 | 787 | pInstance = mi->data; | ||
4864 | 788 | pInstances[i++] = g_strdup (pInstance->cConfFilePath); | ||
4865 | 789 | } | ||
4866 | 790 | g_print ("write instances ...\n"); | ||
4867 | 791 | v = g_new0 (GValue, 1); | ||
4868 | 792 | g_value_init (v, G_TYPE_STRV); | ||
4869 | 793 | g_value_set_boxed (v, pInstances); | ||
4870 | 794 | g_hash_table_insert (h, g_strdup ("instances"), v); | ||
4871 | 795 | g_print ("done.\n"); | ||
4872 | 796 | return TRUE; // continue | ||
4873 | 797 | } | ||
4874 | 798 | gboolean cd_dbus_main_get_module_properties (dbusMainObject *pDbusCallback, const gchar *cName, GPtrArray **pAttributes, GError **error) | ||
4875 | 799 | { | ||
4876 | 800 | nullify_argument (cName); | ||
4877 | 801 | |||
4878 | 802 | GPtrArray *pTab = g_ptr_array_new (); | ||
4879 | 803 | *pAttributes = pTab; | ||
4880 | 804 | |||
4881 | 805 | if (cName == NULL) | ||
4882 | 806 | { | ||
4883 | 807 | cairo_dock_foreach_module_in_alphabetical_order ((GCompareFunc) _insert_module_props, pTab); | ||
4884 | 808 | } | ||
4885 | 809 | else | ||
4886 | 810 | { | ||
4887 | 811 | CairoDockModule *pModule = cairo_dock_find_module_from_name (cName); | ||
4888 | 812 | if (pModule != NULL) | ||
4889 | 813 | { | ||
4890 | 814 | _insert_module_props (pModule, pTab); | ||
4891 | 815 | } | ||
4892 | 816 | } | ||
4893 | 817 | return TRUE; | ||
4894 | 818 | } | ||
4895 | 819 | |||
4896 | 820 | gboolean cd_dbus_main_add_launcher (dbusMainObject *pDbusCallback, const gchar *cDesktopFilePath, gdouble fOrder, const gchar *cDockName, gchar **cLauncherFile, GError **error) | ||
4897 | 821 | { | ||
4898 | 822 | *cLauncherFile = NULL; | ||
4899 | 823 | if (! myConfig.bEnableCreateLauncher) | ||
4900 | 824 | return FALSE; | ||
4901 | 825 | g_return_val_if_fail (cDesktopFilePath != NULL, FALSE); | ||
4902 | 826 | |||
4903 | 827 | //\_______________ get the dock where to insert the icon. | ||
4904 | 828 | nullify_argument (cDockName); | ||
4905 | 829 | if (cDockName == NULL) | ||
4906 | 830 | cDockName = CAIRO_DOCK_MAIN_DOCK_NAME; | ||
4907 | 831 | |||
4908 | 832 | CairoDock * pParentDock = cairo_dock_search_dock_from_name (cDockName); | ||
4909 | 833 | if (pParentDock == NULL) | ||
4910 | 834 | { | ||
4911 | 835 | cd_warning ("dock %s does not exist", cDockName); | ||
4912 | 836 | pParentDock = g_pMainDock; | ||
4913 | 837 | } | ||
4914 | 838 | |||
4915 | 839 | //\_______________ add a new icon in the current theme. | ||
4916 | 840 | int iLauncherType = -1; | ||
4917 | 841 | if (strcmp (cDesktopFilePath, "separator.desktop") == 0) | ||
4918 | 842 | iLauncherType = CAIRO_DOCK_DESKTOP_FILE_FOR_SEPARATOR; | ||
4919 | 843 | else if (strcmp (cDesktopFilePath, "container.desktop") == 0) | ||
4920 | 844 | iLauncherType = CAIRO_DOCK_DESKTOP_FILE_FOR_CONTAINER; | ||
4921 | 845 | else if (strcmp (cDesktopFilePath, "launcher.desktop") == 0) | ||
4922 | 846 | iLauncherType = CAIRO_DOCK_DESKTOP_FILE_FOR_LAUNCHER; | ||
4923 | 847 | |||
4924 | 848 | if (fOrder < 0) | ||
4925 | 849 | fOrder = CAIRO_DOCK_LAST_ORDER; | ||
4926 | 850 | Icon *pNewIcon; | ||
4927 | 851 | if (iLauncherType != -1) | ||
4928 | 852 | pNewIcon = cairo_dock_add_new_launcher_by_type (iLauncherType, pParentDock, fOrder, CAIRO_DOCK_LAUNCHER); | ||
4929 | 853 | else | ||
4930 | 854 | pNewIcon = cairo_dock_add_new_launcher_by_uri (cDesktopFilePath, pParentDock, fOrder); | ||
4931 | 855 | if (pNewIcon != NULL) | ||
4932 | 856 | { | ||
4933 | 857 | *cLauncherFile = g_strdup (pNewIcon->cDesktopFileName); | ||
4934 | 858 | return TRUE; | ||
4935 | 859 | } | ||
4936 | 860 | else | ||
4937 | 861 | return FALSE; | ||
4938 | 862 | } | ||
4939 | 863 | |||
4940 | 864 | gboolean cd_dbus_main_add_temporary_icon (dbusMainObject *pDbusCallback, GHashTable *hIconAttributes, GError **error) | ||
4941 | 865 | { | ||
4942 | 866 | if (! myConfig.bEnableCreateLauncher) | ||
4943 | 867 | return FALSE; | ||
4944 | 868 | |||
4945 | 869 | g_return_val_if_fail (hIconAttributes != NULL, FALSE); | ||
4946 | 870 | |||
4947 | 871 | //\_______________ get the attributes. | ||
4948 | 872 | GValue *v; | ||
4949 | 873 | const gchar *cType = "Launcher"; | ||
4950 | 874 | v = g_hash_table_lookup (hIconAttributes, "type"); | ||
4951 | 875 | if (v && G_VALUE_HOLDS_STRING (v)) | ||
4952 | 876 | { | ||
4953 | 877 | cType = g_value_get_string (v); | ||
4954 | 878 | } | ||
4955 | 879 | |||
4956 | 880 | const gchar *cIcon = NULL; | ||
4957 | 881 | v = g_hash_table_lookup (hIconAttributes, "icon"); | ||
4958 | 882 | if (v && G_VALUE_HOLDS_STRING (v)) | ||
4959 | 883 | { | ||
4960 | 884 | cIcon = g_value_get_string (v); | ||
4961 | 885 | } | ||
4962 | 886 | |||
4963 | 887 | const gchar *cName = NULL; | ||
4964 | 888 | v = g_hash_table_lookup (hIconAttributes, "name"); | ||
4965 | 889 | if (!v) | ||
4966 | 890 | v = g_hash_table_lookup (hIconAttributes, "label"); | ||
4967 | 891 | if (v && G_VALUE_HOLDS_STRING (v)) | ||
4968 | 892 | { | ||
4969 | 893 | cName = g_value_get_string (v); | ||
4970 | 894 | } | ||
4971 | 895 | |||
4972 | 896 | const gchar *cParentDockName = CAIRO_DOCK_MAIN_DOCK_NAME; | ||
4973 | 897 | v = g_hash_table_lookup (hIconAttributes, "container"); | ||
4974 | 898 | if (v && G_VALUE_HOLDS_STRING (v)) | ||
4975 | 899 | { | ||
4976 | 900 | cParentDockName = g_value_get_string (v); | ||
4977 | 901 | } | ||
4978 | 902 | |||
4979 | 903 | const gchar *cQuickInfo = NULL; | ||
4980 | 904 | v = g_hash_table_lookup (hIconAttributes, "quick-info"); | ||
4981 | 905 | if (v && G_VALUE_HOLDS_STRING (v)) | ||
4982 | 906 | { | ||
4983 | 907 | cQuickInfo = g_value_get_string (v); | ||
4984 | 908 | } | ||
4985 | 909 | |||
4986 | 910 | double fOrder = CAIRO_DOCK_LAST_ORDER; | ||
4987 | 911 | v = g_hash_table_lookup (hIconAttributes, "order"); | ||
4988 | 912 | if (v && G_VALUE_HOLDS_DOUBLE (v)) | ||
4989 | 913 | { | ||
4990 | 914 | fOrder = g_value_get_double (v); | ||
4991 | 915 | } | ||
4992 | 916 | |||
4993 | 917 | int iPosition = -1; | ||
4994 | 918 | v = g_hash_table_lookup (hIconAttributes, "position"); | ||
4995 | 919 | if (v && G_VALUE_HOLDS_INT (v)) | ||
4996 | 920 | { | ||
4997 | 921 | iPosition = g_value_get_int (v); | ||
4998 | 922 | } | ||
4999 | 923 | |||
5000 | 924 | const gchar *cCommand = NULL; |
Looks good, thanks!