Merge lp:~cairo-dock-team/ubuntu/natty/cairo-dock-plug-ins/2.3.0-0rc1 into lp:ubuntu/natty/cairo-dock-plug-ins
- Natty (11.04)
- 2.3.0-0rc1
- Merge into natty
Status: | Needs review |
---|---|
Proposed branch: | lp:~cairo-dock-team/ubuntu/natty/cairo-dock-plug-ins/2.3.0-0rc1 |
Merge into: | lp:ubuntu/natty/cairo-dock-plug-ins |
Diff against target: |
216785 lines (+102141/-48611) 442 files modified
Animated-icons/src/applet-config.c (+1/-1) Animated-icons/src/applet-init.c (+56/-20) Animated-icons/src/applet-notifications.c (+7/-8) Animated-icons/src/applet-rotation.c (+4/-4) Animated-icons/src/applet-spot.c (+7/-7) Animated-icons/src/applet-struct.h (+2/-2) Animated-icons/src/applet-unfold.c (+9/-86) Animated-icons/src/applet-wave.c (+6/-6) Animated-icons/src/applet-wobbly.c (+11/-8) Applets.stable (+6/-0) CMakeLists.txt (+334/-110) Cairo-Penguin/data/Cairo-Penguin.conf.in (+16/-7) Cairo-Penguin/src/applet-animation.c (+10/-10) Cairo-Penguin/src/applet-animation.h (+3/-3) Cairo-Penguin/src/applet-init.c (+32/-8) Cairo-Penguin/src/applet-notifications.c (+12/-5) Cairo-Penguin/src/applet-notifications.h (+2/-2) Clipper/data/Clipper.conf.in (+14/-7) Clipper/src/applet-clipboard.c (+1/-1) Clipper/src/applet-notifications.c (+3/-2) Dbus/CMakeLists.txt (+2/-12) Dbus/data/Dbus.conf.in (+0/-5) Dbus/demos/demo_bash/demo_bash (+16/-99) Dbus/demos/demo_bash/demo_bash.sh (+106/-163) Dbus/demos/demo_mono/demo_mono.conf (+101/-0) Dbus/demos/demo_mono/demo_mono.cs (+128/-152) Dbus/demos/demo_python/auto-load.conf (+6/-0) Dbus/demos/demo_python/demo_python (+109/-134) Dbus/demos/demo_ruby/README (+19/-0) Dbus/demos/demo_ruby/auto-load.conf (+19/-0) Dbus/demos/demo_ruby/demo_ruby (+127/-0) Dbus/demos/demo_ruby/demo_ruby.conf (+101/-0) Dbus/demos/demo_vala/demo_vala.vala (+101/-116) Dbus/interfaces/CMakeLists.txt (+14/-0) Dbus/interfaces/bash/BashInstall.cmake.in (+15/-0) Dbus/interfaces/bash/CDBashApplet.py (+83/-0) Dbus/interfaces/bash/CDBashApplet.sh (+178/-0) Dbus/interfaces/bash/CMakeLists.txt (+19/-0) Dbus/interfaces/bash/setup.py (+25/-0) Dbus/interfaces/mono/CDApplet.cs (+273/-0) Dbus/interfaces/mono/CMakeLists.txt (+13/-0) Dbus/interfaces/mono/IApplet.cs (+91/-0) Dbus/interfaces/mono/ISubApplet.cs (+43/-0) Dbus/interfaces/python/CDApplet.py (+246/-0) Dbus/interfaces/python/CMakeLists.txt (+13/-0) Dbus/interfaces/python/PythonInstall.cmake.in (+15/-0) Dbus/interfaces/python/setup.py (+25/-0) Dbus/interfaces/ruby/CDApplet.rb (+291/-0) Dbus/interfaces/ruby/CMakeLists.txt (+5/-0) Dbus/interfaces/vala/CDApplet.deps (+1/-0) Dbus/interfaces/vala/CDApplet.pc.in (+11/-0) Dbus/interfaces/vala/CDApplet.vala (+328/-0) Dbus/interfaces/vala/CMakeLists.txt (+51/-0) Dbus/interfaces/vala/ValaVapiPath.txt.in (+1/-0) Dbus/interfaces/vala/src/CDApplet.c (+3530/-0) Dbus/interfaces/vala/src/CDApplet.h (+215/-0) Dbus/interfaces/vala/src/CDApplet.vapi (+116/-0) Dbus/interfaces/vala/src/CMakeLists.txt (+30/-0) Dbus/interfaces/vala/src/ValaVapiPath.txt (+1/-0) Dbus/src/CMakeLists.txt (+0/-55) Dbus/src/applet-config.c (+0/-15) Dbus/src/applet-dbus.c (+255/-219) Dbus/src/applet-dbus.h (+2/-8) Dbus/src/applet-init.c (+28/-22) Dbus/src/applet-marshallers.c (+230/-0) Dbus/src/applet-marshallers.h (+72/-0) Dbus/src/applet-struct.h (+4/-5) Dbus/src/dbus-applet-spec.h (+3/-2) Dbus/src/dbus-main-spec.h (+3/-2) Dbus/src/dbus-sub-applet-spec.h (+4/-3) Dbus/src/dbus_sub_applet_introspectable.xml (+0/-8) Dbus/src/interface-applet-methods.c (+100/-38) Dbus/src/interface-applet-object.c (+102/-157) Dbus/src/interface-applet-object.h (+2/-4) Dbus/src/interface-applet-signals.c (+52/-102) Dbus/src/interface-main-methods.c (+42/-11) Disks/CMakeLists.txt (+3/-0) Disks/data/CMakeLists.txt (+7/-0) Disks/data/Disks.conf.in (+187/-0) Disks/src/CMakeLists.txt (+40/-0) Disks/src/applet-config.c (+98/-0) Disks/src/applet-config.h (+31/-0) Disks/src/applet-disks.c (+264/-0) Disks/src/applet-disks.h (+29/-0) Disks/src/applet-init.c (+181/-0) Disks/src/applet-init.h (+31/-0) Disks/src/applet-notifications.c (+111/-0) Disks/src/applet-notifications.h (+35/-0) Disks/src/applet-struct.h (+84/-0) Doncky/data/Doncky.conf.in (+11/-5) Doncky/data/default.xml (+13/-1) Doncky/src/applet-config.c (+9/-12) Doncky/src/applet-draw.c (+16/-153) Doncky/src/applet-init.c (+7/-14) Doncky/src/applet-notifications.c (+344/-0) Doncky/src/applet-notifications.h (+2/-1) Doncky/src/applet-struct.h (+22/-96) Doncky/src/applet-xml.c (+2/-2) Folders/data/Folders.conf.in (+16/-8) Folders/src/applet-config.c (+6/-2) Folders/src/applet-init.c (+39/-14) Folders/src/applet-load-icons.c (+15/-6) Folders/src/applet-notifications.c (+31/-12) Folders/src/applet-struct.h (+1/-0) GMenu/data/GMenu.conf.in (+12/-5) GMenu/src/applet-notifications.c (+13/-9) GMenu/src/applet-run-dialog.c (+1/-1) GMenu/src/applet-util.c (+1/-1) Indicator-applet/CMakeLists.txt (+3/-0) Indicator-applet/indicator-applet.c (+31/-8) MeMenu/data/MeMenu.conf.in (+13/-6) MeMenu/src/CMakeLists.txt (+3/-0) MeMenu/src/applet-me.c (+7/-9) MeMenu/src/applet-menu.c (+316/-6) MeMenu/src/applet-menu.h (+2/-1) MeMenu/src/dbus-shared-names.h (+1/-0) Messaging-Menu/data/Messaging-Menu.conf.in (+14/-8) Messaging-Menu/src/CMakeLists.txt (+3/-0) Messaging-Menu/src/applet-init.c (+2/-2) Messaging-Menu/src/applet-menu.c (+152/-20) Messaging-Menu/src/applet-messaging.c (+3/-3) Messaging-Menu/src/dbus-data.h (+7/-5) Network-Monitor/data/Network-Monitor.conf.in (+16/-8) Network-Monitor/src/applet-config.c (+1/-1) Network-Monitor/src/applet-draw.c (+1/-1) Network-Monitor/src/applet-notifications.c (+4/-3) RSSreader/data/RSSreader.conf.in (+11/-5) RSSreader/src/applet-draw.c (+1/-0) RSSreader/src/applet-notifications.c (+22/-12) RSSreader/src/applet-rss.c (+47/-35) RSSreader/src/applet-struct.h (+1/-1) Recent-Events/CMakeLists.txt (+2/-0) Recent-Events/data/CMakeLists.txt (+10/-0) Recent-Events/data/Recent-Events.conf.in (+111/-0) Recent-Events/data/icon.svg (+694/-0) Recent-Events/src/CMakeLists.txt (+43/-0) Recent-Events/src/applet-config.c (+50/-0) Recent-Events/src/applet-config.h (+30/-0) Recent-Events/src/applet-dialog.c (+478/-0) Recent-Events/src/applet-dialog.h (+33/-0) Recent-Events/src/applet-init.c (+83/-0) Recent-Events/src/applet-init.h (+31/-0) Recent-Events/src/applet-notifications.c (+174/-0) Recent-Events/src/applet-notifications.h (+40/-0) Recent-Events/src/applet-search.c (+464/-0) Recent-Events/src/applet-search.h (+41/-0) Recent-Events/src/applet-struct.h (+73/-0) Remote-Control/CMakeLists.txt (+2/-0) Remote-Control/data/CMakeLists.txt (+11/-0) Remote-Control/data/Remote-Control.conf.in (+14/-0) Remote-Control/data/arrows.svg (+348/-0) Remote-Control/src/CMakeLists.txt (+40/-0) Remote-Control/src/applet-config.c (+51/-0) Remote-Control/src/applet-config.h (+30/-0) Remote-Control/src/applet-icon-finder.c (+257/-0) Remote-Control/src/applet-icon-finder.h (+40/-0) Remote-Control/src/applet-init.c (+66/-0) Remote-Control/src/applet-init.h (+31/-0) Remote-Control/src/applet-notifications.c (+480/-0) Remote-Control/src/applet-notifications.h (+45/-0) Remote-Control/src/applet-session.c (+150/-0) Remote-Control/src/applet-session.h (+38/-0) Remote-Control/src/applet-struct.h (+51/-0) Scooby-Do/data/CMakeLists.txt (+0/-1) Scooby-Do/data/Scooby-Do.conf.in (+0/-3) Scooby-Do/data/arrows.svg (+0/-289) Scooby-Do/src/applet-appli-finder.h (+0/-2) Scooby-Do/src/applet-backend-files.c (+4/-4) Scooby-Do/src/applet-backend-firefox.c (+1/-1) Scooby-Do/src/applet-backend-recent.c (+3/-3) Scooby-Do/src/applet-backend-web.c (+2/-2) Scooby-Do/src/applet-config.c (+0/-9) Scooby-Do/src/applet-draw.c (+4/-51) Scooby-Do/src/applet-icon-finder.c (+9/-209) Scooby-Do/src/applet-icon-finder.h (+0/-1) Scooby-Do/src/applet-init.c (+17/-18) Scooby-Do/src/applet-listing.c (+37/-37) Scooby-Do/src/applet-notifications.c (+85/-364) Scooby-Do/src/applet-notifications.h (+0/-4) Scooby-Do/src/applet-search.c (+3/-3) Scooby-Do/src/applet-session.c (+63/-55) Scooby-Do/src/applet-session.h (+3/-5) Scooby-Do/src/applet-struct.h (+2/-33) Status-Notifier/data/Status-Notifier.conf.in (+13/-7) Status-Notifier/src/CMakeLists.txt (+3/-3) Status-Notifier/src/applet-draw.c (+13/-12) Status-Notifier/src/applet-host.c (+19/-19) Status-Notifier/src/applet-init.c (+10/-4) Status-Notifier/src/applet-item.c (+32/-38) Status-Notifier/src/applet-notifications.c (+7/-8) System-Monitor/data/System-Monitor.conf.in (+35/-15) System-Monitor/data/nvidia-config (+1/-1) System-Monitor/src/CMakeLists.txt (+21/-65) System-Monitor/src/applet-config.c (+5/-8) System-Monitor/src/applet-cpusage.c (+21/-5) System-Monitor/src/applet-cpusage.h (+2/-2) System-Monitor/src/applet-init.c (+35/-32) System-Monitor/src/applet-monitor.c (+69/-7) System-Monitor/src/applet-notifications.c (+41/-44) System-Monitor/src/applet-nvidia.c (+22/-2) System-Monitor/src/applet-nvidia.h (+1/-1) System-Monitor/src/applet-rame.c (+18/-0) System-Monitor/src/applet-rame.h (+2/-0) System-Monitor/src/applet-sensors.c (+433/-0) System-Monitor/src/applet-sensors.h (+39/-0) System-Monitor/src/applet-struct.h (+23/-3) Toons/data/Toons.conf.in (+15/-9) Xgamma/data/Xgamma.conf.in (+16/-8) Xgamma/src/applet-config.c (+3/-2) Xgamma/src/applet-notifications.c (+2/-33) Xgamma/src/applet-struct.h (+3/-2) Xgamma/src/applet-xgamma.c (+101/-4) Xgamma/src/applet-xgamma.h (+5/-2) alsaMixer/data/AlsaMixer.conf.in (+17/-9) alsaMixer/src/applet-config.c (+4/-4) alsaMixer/src/applet-mixer.c (+8/-6) alsaMixer/src/applet-notifications.c (+7/-2) clock/data/clock.conf.in (+17/-9) clock/src/CMakeLists.txt (+2/-1) clock/src/applet-backend-default.c (+34/-6) clock/src/applet-backend-ical.c (+5/-3) clock/src/applet-calendar.c (+91/-0) clock/src/applet-calendar.h (+2/-0) clock/src/applet-config.c (+4/-3) clock/src/applet-draw.c (+36/-398) clock/src/applet-draw.h (+0/-12) clock/src/applet-init.c (+1/-6) clock/src/applet-notifications.c (+4/-4) clock/src/applet-struct.h (+3/-0) clock/src/applet-timer.c (+507/-0) clock/src/applet-timer.h (+35/-0) cmake_modules/FindSensors.cmake (+23/-0) compiz-icon/data/compiz-icon.conf.in (+16/-8) compiz-icon/src/applet-load-icon.c (+1/-1) copyright (+1/-1) debian/cairo-dock-plug-ins.install (+5/-0) debian/changelog (+81/-0) debian/control (+14/-4) debian/rules (+3/-2) debian/source/format (+1/-0) debian/watch (+1/-1) desklet-rendering/src/rendering-desklet-caroussel.c (+23/-23) desklet-rendering/src/rendering-desklet-controler.c (+17/-17) desklet-rendering/src/rendering-desklet-mediaplayer.c (+13/-13) desklet-rendering/src/rendering-desklet-slide.c (+18/-18) desklet-rendering/src/rendering-desklet-viewport.c (+19/-19) desklet-rendering/src/rendering-init.c (+1/-3) dialog-rendering/data/dialog-rendering.conf.in (+1/-17) dialog-rendering/src/applet-config.c (+2/-2) dialog-rendering/src/applet-decorator-3Dplane.c (+15/-1) dialog-rendering/src/applet-decorator-comics.c (+78/-60) dialog-rendering/src/applet-decorator-curly.c (+41/-22) dialog-rendering/src/applet-decorator-modern.c (+1/-1) dialog-rendering/src/applet-decorator-tooltip.c (+39/-46) dialog-rendering/src/applet-init.c (+3/-8) dnd2share/data/dnd2share.conf.in (+17/-7) dnd2share/src/CMakeLists.txt (+8/-61) dnd2share/src/applet-backend-codepad.c (+78/-0) dnd2share/src/applet-backend-codepad.h (+30/-0) dnd2share/src/applet-backend-dropbox.c (+76/-76) dnd2share/src/applet-backend-free.c (+46/-46) dnd2share/src/applet-backend-imagebin.c (+75/-75) dnd2share/src/applet-backend-imageshack.c (+87/-87) dnd2share/src/applet-backend-paste-ubuntu.c (+84/-0) dnd2share/src/applet-backend-paste-ubuntu.h (+30/-0) dnd2share/src/applet-backend-pastebin-mozilla.c (+91/-0) dnd2share/src/applet-backend-pastebin-mozilla.h (+30/-0) dnd2share/src/applet-backend-pastebin.c (+51/-85) dnd2share/src/applet-backend-pastebin.h (+11/-11) dnd2share/src/applet-backend-ubuntuone.c (+95/-0) dnd2share/src/applet-backend-ubuntuone.h (+30/-0) dnd2share/src/applet-backend-uppix.c (+109/-109) dnd2share/src/applet-backend-videobin.c (+42/-42) dnd2share/src/applet-config.c (+1/-0) dnd2share/src/applet-dnd2share.c (+23/-16) dnd2share/src/applet-init.c (+13/-4) dnd2share/src/applet-notifications.c (+3/-3) dnd2share/src/applet-struct.h (+1/-0) dock-rendering/data/CMakeLists.txt (+9/-15) dock-rendering/data/rendering.conf.in (+6/-5) dock-rendering/src/rendering-3D-plane.c (+58/-58) dock-rendering/src/rendering-caroussel.c (+24/-24) dock-rendering/src/rendering-commons.c (+18/-18) dock-rendering/src/rendering-config.c (+28/-33) dock-rendering/src/rendering-curve.c (+60/-60) dock-rendering/src/rendering-diapo-simple.c (+233/-134) dock-rendering/src/rendering-diapo.c (+2/-2) dock-rendering/src/rendering-init.c (+29/-10) dock-rendering/src/rendering-panel.c (+62/-62) dock-rendering/src/rendering-parabole.c (+10/-9) dock-rendering/src/rendering-rainbow.c (+27/-27) drop-indicator/src/applet-init.c (+31/-11) drop-indicator/src/applet-notifications.c (+5/-3) dustbin/data/dustbin.conf.in (+15/-7) dustbin/data/themes/default/CMakeLists.txt (+6/-13) dustbin/data/themes/default/preview (+545/-0) dustbin/src/applet-notifications.c (+3/-1) gnome-integration-old/src/applet-gnome-vfs.c (+1/-1) gvfs-integration/cairo-dock-gio-vfs.c (+115/-54) icon-effect/src/applet-config.c (+1/-1) icon-effect/src/applet-fire.c (+2/-2) icon-effect/src/applet-firework.c (+4/-5) icon-effect/src/applet-init.c (+49/-18) icon-effect/src/applet-notifications.c (+9/-11) icon-effect/src/applet-rain.c (+2/-2) icon-effect/src/applet-snow.c (+2/-2) icon-effect/src/applet-star.c (+2/-2) icon-effect/src/applet-storm.c (+2/-2) icon-effect/src/applet-struct.h (+1/-1) illusion/src/applet-evaporate.c (+6/-6) illusion/src/applet-init.c (+37/-13) illusion/src/applet-lightning.c (+3/-2) illusion/src/applet-notifications.c (+7/-4) kde-integration/src/applet-vfs.c (+4/-3) keyboard-indicator/data/keyboard-indicator.conf.in (+15/-8) keyboard-indicator/src/applet-draw.c (+8/-5) keyboard-indicator/src/applet-init.c (+4/-2) keyboard-indicator/src/applet-notifications.c (+7/-1) keyboard-indicator/src/applet-xklavier.c (+3/-2) logout/data/CMakeLists.txt (+1/-0) logout/data/logout.conf.in (+24/-10) logout/src/applet-config.c (+4/-2) logout/src/applet-init.c (+8/-2) logout/src/applet-notifications.c (+117/-16) logout/src/applet-notifications.h (+5/-2) logout/src/applet-struct.h (+13/-1) mail/data/mail.conf.in (+56/-31) mail/src/cd-mail-applet-accounts.c (+698/-480) mail/src/cd-mail-applet-accounts.h (+16/-0) mail/src/cd-mail-applet-config.c (+42/-18) mail/src/cd-mail-applet-etpan.c (+29/-14) mail/src/cd-mail-applet-notifications.c (+36/-11) mail/src/cd-mail-applet-struct.h (+2/-0) motion-blur/src/applet-init.c (+48/-13) motion-blur/src/applet-notifications.c (+11/-0) motion-blur/src/applet-notifications.h (+2/-3) musicPlayer/data/musicPlayer.conf.in (+16/-8) musicPlayer/src/applet-banshee.c (+1/-1) musicPlayer/src/applet-draw.c (+12/-9) musicPlayer/src/applet-exaile3.c (+1/-1) musicPlayer/src/applet-init.c (+8/-8) musicPlayer/src/applet-mpris.c (+16/-18) musicPlayer/src/applet-notifications.c (+15/-3) musicPlayer/src/applet-rhythmbox.c (+1/-1) netspeed/data/netspeed (+1/-1) netspeed/data/netspeed.conf.in (+15/-7) netspeed/src/applet-notifications.c (+38/-33) po/ar.po (+1639/-1331) po/cairo-dock.pot (+1653/-1457) po/cs.po (+1713/-1513) po/de.po (+2167/-1834) po/el.po (+8450/-0) po/en.po (+0/-8567) po/en_GB.po (+8906/-0) po/es.po (+1968/-1609) po/et.po (+1821/-1557) po/eu.po (+7737/-0) po/fr.po (+1981/-1587) po/hu.po (+1721/-1541) po/id.po (+7711/-0) po/it.po (+2058/-1676) po/ja.po (+1901/-1562) po/nl.po (+1986/-1601) po/pl.po (+7705/-0) po/pt.po (+1857/-1642) po/pt_BR.po (+2090/-1715) po/ru.po (+1979/-1590) po/sk.po (+1862/-1566) po/sr.po (+1666/-1295) po/sv.po (+1748/-1536) po/tr.po (+1693/-1506) po/uk.po (+1995/-1607) po/zh_CN.po (+2332/-1943) po/zh_TW.po (+1911/-1562) powermanager/data/powermanager.conf.in (+16/-9) powermanager/src/powermanager-config.c (+0/-2) powermanager/src/powermanager-dbus.c (+6/-6) powermanager/src/powermanager-draw.c (+2/-2) powermanager/src/powermanager-struct.h (+0/-2) quick-browser/data/quick-browser.conf.in (+12/-6) quick-browser/src/applet-init.c (+0/-1) quick-browser/src/applet-menu.c (+1/-1) quick-browser/src/applet-notifications.c (+10/-1) shortcuts/data/shortcuts.conf.in (+12/-5) shortcuts/src/applet-bookmarks.c (+7/-7) shortcuts/src/applet-disk-usage.c (+2/-2) shortcuts/src/applet-drives.c (+14/-14) shortcuts/src/applet-init.c (+11/-3) shortcuts/src/applet-load-icons.c (+15/-11) shortcuts/src/applet-notifications.c (+17/-8) show-mouse/data/show_mouse.conf.in (+2/-2) show-mouse/src/applet-init.c (+16/-16) show-mouse/src/applet-notifications.c (+3/-2) showDesktop/data/showDesktop.conf.in (+12/-8) showDesktop/src/applet-init.c (+4/-2) showDesktop/src/applet-notifications.c (+36/-2) slider/data/slider.conf.in (+49/-16) slider/src/applet-config.c (+13/-5) slider/src/applet-init.c (+66/-30) slider/src/applet-notifications.c (+161/-55) slider/src/applet-notifications.h (+2/-1) slider/src/applet-slider.c (+96/-48) slider/src/applet-slider.h (+1/-0) slider/src/applet-struct.h (+16/-3) slider/src/applet-transitions.c (+82/-22) slider/src/applet-transitions.h (+2/-0) stack/data/stack.conf.in (+12/-5) stack/src/applet-init.c (+7/-2) stack/src/applet-load-icons.c (+44/-6) stack/src/applet-notifications.c (+5/-2) stack/src/applet-stack.c (+206/-0) stack/src/applet-struct.h (+11/-0) switcher/data/switcher.conf.in (+13/-6) switcher/src/applet-desktops.c (+24/-32) switcher/src/applet-draw.c (+60/-55) switcher/src/applet-init.c (+45/-31) switcher/src/applet-notifications.c (+34/-20) switcher/src/applet-struct.h (+9/-2) systray/data/systray.conf.in (+12/-5) systray/src/systray-init.c (+3/-4) template/data/template.conf.in (+11/-5) terminal/data/terminal.conf.in (+12/-5) terminal/src/terminal-init.c (+1/-1) terminal/src/terminal-widget.c (+73/-22) tomboy/data/tomboy.conf.in (+13/-6) tomboy/src/tomboy-dbus.c (+12/-3) tomboy/src/tomboy-init.c (+8/-2) tomboy/src/tomboy-notifications.c (+18/-4) weather/data/themes/Classic/readme (+2/-1) weather/data/weather.conf.in (+13/-5) weather/src/applet-config.c (+38/-17) weather/src/applet-init.c (+2/-0) weather/src/applet-load-icons.c (+11/-2) weather/src/applet-notifications.c (+69/-31) weather/src/applet-notifications.h (+2/-3) weather/src/applet-struct.h (+3/-1) weblets/data/weblets.conf.in (+12/-5) weblets/src/applet-notifications.c (+1/-1) wifi/data/wifi.conf.in (+15/-7) wifi/src/applet-notifications.c (+5/-9) xfce-integration/src/applet-thunar-vfs.c (+2/-2) xfce-integration/src/applet-utils.c (+1/-1) |
To merge this branch: | bzr merge lp:~cairo-dock-team/ubuntu/natty/cairo-dock-plug-ins/2.3.0-0rc1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Micah Gersten (community) | Needs Fixing | ||
Review via email: mp+51035@code.launchpad.net |
Commit message
Description of the change
The Cairo-Dock team proposes a Release Candidate for the version 2.3.0.
It's a major version, and it brings several improvements and fixes several bugs.
This version has been proposed on Debian too (on mentors.
PS: don't forget to upload Cairo-Dock Core before because it contains the new API (LP: #723994)
(Bug report linked LP: #723995)
REM: it seems that the ubuntu branch (lp:ubuntu/cairo-dock-plug-ins) is not up to date. This bug has already been reported (LP: #704694)
Matthieu Baerts (matttbe) wrote : | # |
Hello Micah,
Thank you for your support!
About Cairo-Dock I've tried to use 'bzr merge-upstream' but it was strange it didn't work. Even after having added a few tags as said on this wiki page https:/
This what I did: bzr merge-upstream --version 2.3.0~0rc1 lp:cairo-dock-core -r tag:2.3.0~0rc1 --distribution=
But:
* I've added this tag in lp:cairo-dock-core and lp:cairo-dock-plug-ins: 2.3.0~0rc1
* Added two new series: lp:cairo-dock-core/2.3 and lp:cairo-dock-plug-ins/2.3 with this RC release.
* Added two tarballs on launchpad: https:/
* And updated the debian/watch (uscan detects the new RC)
I hope one of this point can help you to update Cairo-Dock version on Ubuntu :)
(about Cairo-Dock Plug-Ins, it needs the latest version (this 2.3.0~0rc1 version) of Cairo-Dock (Core) to compile because it contains the new API)
Do I have to do something else?
Don't hesitate to contact me!
Best Regards,
Matt
- 21. By Matthieu Baerts
-
* New Upstream Version (LP: #723995)
* Added debian/source/ format: 3.0
* debian/cairo-dock- plug-ins. install:
- Added new files (interfaces for python, ruby, vala and mono)
* debian/control:
- Added new dependences for new applets (sensors and zeitgeist)
and new interfaces (python, valac, ruby and mono)
- Updated the version of cairo-dock build-dependences
* debian/rules:
- Added a new CMake flag to install python interface in debian/tmp
* Updated debian/watch
Unmerged revisions
- 21. By Matthieu Baerts
-
* New Upstream Version (LP: #723995)
* Added debian/source/ format: 3.0
* debian/cairo-dock- plug-ins. install:
- Added new files (interfaces for python, ruby, vala and mono)
* debian/control:
- Added new dependences for new applets (sensors and zeitgeist)
and new interfaces (python, valac, ruby and mono)
- Updated the version of cairo-dock build-dependences
* debian/rules:
- Added a new CMake flag to install python interface in debian/tmp
* Updated debian/watch - 20. By Matthieu Baerts
-
* debian/control:
- Replaced libwebkit-dev by libwebkitgtk-dev (LP: #704032)
* No change rebuild for libindicator1 > libindicator2 transition
* No change rebuild for libdbusmenu-gtk1 > libdbusmenu-gtk2 transition - 19. By Matthieu Baerts
-
* New Upstream Version (LP: #653702)
* Fixed a few bugs:
- All .mo files aren't installed into the right directory (LP: #653336)
- Dbus: Fixed a crash when exiting Cairo-Dock
- Indicator: Some modifications needed for the latest
version of libindicator
- RSSreader: Prevented a crash if myDrawContext != NULL
- Clock: Prevented a crash if myDrawContext != NULL
- Switcher:
- Prevented a crash if myDrawContext != NULL
- Fixed a crash if the plugin is launched much time before the WM
- musicPlayer:
- Used the right image set from the config panel
- MPRIS plugin: fixed a bug with the tracknumber
- Systray: not drawn outside the screen.
- tomboy: not popup a dialogue inside the screen
- xfce-integration: displayed a window when logout applet is launched
* debian/control:
- Updated the version of cairo-dock-dev and cairo-dock-core - 18. By Didier Roche-Tolomelli
-
debian/control: depends on latest libindicator-dev (LP: #637692)
- 17. By Matthieu Baerts
-
- Fixed a crash in rainbow view if the subdock is empty
* debian/control
- Updated the version of cairo-dock-dev and cairo-dock-core - 16. By Matthieu Baerts
-
Status-Notifier: Fixed a typo
- 15. By Matthieu Baerts
-
* New Upstream Version (LP: #638529)
* Fixed a few bugs on LP:
- Fixed a crash in rainbow view when the cone is completely opened
- Installed in lib directory by default even in 64bits arch
- Status-Notifier: fixed few bugs
- Clock applet:
- Notify of missed tasks (moved some functions to a new file)
- Fixed a little memory leak
- Removed some 'g_print' (LP: #500677: xsession-errors log)
* Updated translations - 14. By Matthieu Baerts
-
* New Upstream Version (LP: #632054)
* Fixed a few bugs on LP:
- LP: #616176 Dust Bin Hang and Incorrect Configuration
- LP: #604034 Change terminal tab's name lost the color
- LP: #582452 GMenu does not contain any applications
* Fixed a few bugs on glx-dock forum:
- Fixed support of GMusicBrowser.
- AlsaMixer has no emblem.
- Status-Notifier doesn't be drawed into the dock.
* Updated translations
* debian/control:
- Added cairo-dock-core as build-depends in order to prevent
some builds errors. - 13. By Didier Roche-Tolomelli
-
fix versionning
- 12. By Fabounet
-
applied Matttbe's patch on changelog and control files
Preview Diff
1 | === modified file 'Animated-icons/src/applet-config.c' |
2 | --- Animated-icons/src/applet-config.c 2009-10-05 19:27:17 +0000 |
3 | +++ Animated-icons/src/applet-config.c 2011-03-17 14:49:16 +0000 |
4 | @@ -31,7 +31,7 @@ |
5 | { |
6 | myConfig.iEffectsOnMouseOver[i] = -1; |
7 | } |
8 | - for (j = 0; j < CAIRO_DOCK_NB_TYPES; j += 2) |
9 | + for (j = 0; j < CAIRO_DOCK_NB_GROUPS; j += 2) |
10 | { |
11 | for (i = 0; i < CD_ANIMATIONS_NB_EFFECTS; i ++) |
12 | { |
13 | |
14 | === modified file 'Animated-icons/src/applet-init.c' |
15 | --- Animated-icons/src/applet-init.c 2010-08-07 01:43:25 +0000 |
16 | +++ Animated-icons/src/applet-init.c 2011-03-17 14:49:16 +0000 |
17 | @@ -44,14 +44,38 @@ |
18 | if (! cairo_dock_reserve_data_slot (myApplet)) |
19 | return; |
20 | |
21 | - cairo_dock_register_notification (CAIRO_DOCK_ENTER_ICON, (CairoDockNotificationFunc) cd_animations_on_enter, CAIRO_DOCK_RUN_AFTER, NULL); |
22 | - cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) cd_animations_on_click, CAIRO_DOCK_RUN_FIRST, NULL); |
23 | - cairo_dock_register_notification (CAIRO_DOCK_REQUEST_ICON_ANIMATION, (CairoDockNotificationFunc) cd_animations_on_request, CAIRO_DOCK_RUN_FIRST, NULL); |
24 | - cairo_dock_register_notification (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) cd_animations_update_icon , CAIRO_DOCK_RUN_AFTER, NULL); |
25 | - cairo_dock_register_notification (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_render_icon, CAIRO_DOCK_RUN_FIRST, NULL); |
26 | - cairo_dock_register_notification (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_post_render_icon, CAIRO_DOCK_RUN_AFTER, NULL); |
27 | - cairo_dock_register_notification (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_animations_free_data, CAIRO_DOCK_RUN_AFTER, NULL); |
28 | - cairo_dock_register_notification (CAIRO_DOCK_UNFOLD_SUBDOCK, (CairoDockNotificationFunc) cd_animations_unfold_subdock, CAIRO_DOCK_RUN_AFTER, NULL); |
29 | + cairo_dock_register_notification_on_object (&myContainersMgr, |
30 | + NOTIFICATION_ENTER_ICON, |
31 | + (CairoDockNotificationFunc) cd_animations_on_enter, |
32 | + CAIRO_DOCK_RUN_AFTER, NULL); |
33 | + cairo_dock_register_notification_on_object (&myContainersMgr, |
34 | + NOTIFICATION_CLICK_ICON, |
35 | + (CairoDockNotificationFunc) cd_animations_on_click, |
36 | + CAIRO_DOCK_RUN_FIRST, NULL); |
37 | + cairo_dock_register_notification_on_object (&myIconsMgr, |
38 | + NOTIFICATION_REQUEST_ICON_ANIMATION, |
39 | + (CairoDockNotificationFunc) cd_animations_on_request, |
40 | + CAIRO_DOCK_RUN_FIRST, NULL); |
41 | + cairo_dock_register_notification_on_object (&myIconsMgr, |
42 | + NOTIFICATION_UPDATE_ICON, |
43 | + (CairoDockNotificationFunc) cd_animations_update_icon, |
44 | + CAIRO_DOCK_RUN_AFTER, NULL); |
45 | + cairo_dock_register_notification_on_object (&myIconsMgr, |
46 | + NOTIFICATION_RENDER_ICON, |
47 | + (CairoDockNotificationFunc) cd_animations_render_icon, |
48 | + CAIRO_DOCK_RUN_FIRST, NULL); |
49 | + cairo_dock_register_notification_on_object (&myIconsMgr, |
50 | + NOTIFICATION_RENDER_ICON, |
51 | + (CairoDockNotificationFunc) cd_animations_post_render_icon, |
52 | + CAIRO_DOCK_RUN_AFTER, NULL); |
53 | + cairo_dock_register_notification_on_object (&myIconsMgr, |
54 | + NOTIFICATION_STOP_ICON, |
55 | + (CairoDockNotificationFunc) cd_animations_free_data, |
56 | + CAIRO_DOCK_RUN_AFTER, NULL); |
57 | + cairo_dock_register_notification_on_object (&myIconsMgr, |
58 | + NOTIFICATION_UNFOLD_SUBDOCK, |
59 | + (CairoDockNotificationFunc) cd_animations_unfold_subdock, |
60 | + CAIRO_DOCK_RUN_AFTER, NULL); |
61 | |
62 | myData.iAnimationID[CD_ANIMATIONS_BOUNCE] = cairo_dock_register_animation ("bounce", D_("Bounce"), FALSE); |
63 | myData.iAnimationID[CD_ANIMATIONS_ROTATE] = cairo_dock_register_animation ("rotate", D_("Rotate"), FALSE); |
64 | @@ -60,9 +84,6 @@ |
65 | myData.iAnimationID[CD_ANIMATIONS_WOBBLY] = cairo_dock_register_animation ("wobbly", D_("Wobbly"), FALSE); |
66 | myData.iAnimationID[CD_ANIMATIONS_WAVE] = cairo_dock_register_animation ("wave", D_("Wave"), FALSE); |
67 | myData.iAnimationID[CD_ANIMATIONS_SPOT] = cairo_dock_register_animation ("spot", D_("Spot"), FALSE); |
68 | - |
69 | - if (! cairo_dock_is_loading ()) |
70 | - cairo_dock_update_animations_list_for_gui (); |
71 | CD_APPLET_INIT_END |
72 | |
73 | static void _free_data_on_icon (Icon *pIcon, CairoDock *pDock, gpointer data) |
74 | @@ -71,14 +92,30 @@ |
75 | } |
76 | //\___________ Here is where you stop your applet. myConfig and myData are still valid, but will be reseted to 0 at the end of the function. In the end, your applet will go back to its original state, as if it had never been activated. |
77 | CD_APPLET_STOP_BEGIN |
78 | - cairo_dock_remove_notification_func (CAIRO_DOCK_ENTER_ICON, (CairoDockNotificationFunc) cd_animations_on_enter, NULL); |
79 | - cairo_dock_remove_notification_func (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) cd_animations_on_click, NULL); |
80 | - cairo_dock_remove_notification_func (CAIRO_DOCK_REQUEST_ICON_ANIMATION, (CairoDockNotificationFunc) cd_animations_on_request, NULL); |
81 | - cairo_dock_remove_notification_func (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) cd_animations_update_icon, NULL); |
82 | - cairo_dock_remove_notification_func (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_render_icon, NULL); |
83 | - cairo_dock_remove_notification_func (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_post_render_icon, NULL); |
84 | - cairo_dock_remove_notification_func (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_animations_free_data, NULL); |
85 | - cairo_dock_remove_notification_func (CAIRO_DOCK_UNFOLD_SUBDOCK, (CairoDockNotificationFunc) cd_animations_unfold_subdock, NULL); |
86 | + cairo_dock_remove_notification_func_on_object (&myContainersMgr, |
87 | + NOTIFICATION_ENTER_ICON, |
88 | + (CairoDockNotificationFunc) cd_animations_on_enter, NULL); |
89 | + cairo_dock_remove_notification_func_on_object (&myContainersMgr, |
90 | + NOTIFICATION_CLICK_ICON, |
91 | + (CairoDockNotificationFunc) cd_animations_on_click, NULL); |
92 | + cairo_dock_remove_notification_func_on_object (&myIconsMgr, |
93 | + NOTIFICATION_REQUEST_ICON_ANIMATION, |
94 | + (CairoDockNotificationFunc) cd_animations_on_request, NULL); |
95 | + cairo_dock_remove_notification_func_on_object (&myIconsMgr, |
96 | + NOTIFICATION_UPDATE_ICON, |
97 | + (CairoDockNotificationFunc) cd_animations_update_icon, NULL); |
98 | + cairo_dock_remove_notification_func_on_object (&myIconsMgr, |
99 | + NOTIFICATION_RENDER_ICON, |
100 | + (CairoDockNotificationFunc) cd_animations_render_icon, NULL); |
101 | + cairo_dock_remove_notification_func_on_object (&myIconsMgr, |
102 | + NOTIFICATION_RENDER_ICON, |
103 | + (CairoDockNotificationFunc) cd_animations_post_render_icon, NULL); |
104 | + cairo_dock_remove_notification_func_on_object (&myIconsMgr, |
105 | + NOTIFICATION_STOP_ICON, |
106 | + (CairoDockNotificationFunc) cd_animations_free_data, NULL); |
107 | + cairo_dock_remove_notification_func_on_object (&myIconsMgr, |
108 | + NOTIFICATION_UNFOLD_SUBDOCK, |
109 | + (CairoDockNotificationFunc) cd_animations_unfold_subdock, NULL); |
110 | |
111 | cairo_dock_unregister_animation ("bounce"); |
112 | cairo_dock_unregister_animation ("rotate"); |
113 | @@ -87,7 +124,6 @@ |
114 | cairo_dock_unregister_animation ("wobbly"); |
115 | cairo_dock_unregister_animation ("wave"); |
116 | cairo_dock_unregister_animation ("spot"); |
117 | - cairo_dock_update_animations_list_for_gui (); |
118 | |
119 | cairo_dock_foreach_icons ((CairoDockForeachIconFunc) _free_data_on_icon, NULL); |
120 | CD_APPLET_STOP_END |
121 | |
122 | === modified file 'Animated-icons/src/applet-notifications.c' |
123 | --- Animated-icons/src/applet-notifications.c 2010-08-07 01:43:25 +0000 |
124 | +++ Animated-icons/src/applet-notifications.c 2011-03-17 14:49:16 +0000 |
125 | @@ -56,7 +56,7 @@ |
126 | _set_new_data (pIcon); |
127 | |
128 | gboolean bUseOpenGL = CAIRO_DOCK_CONTAINER_IS_OPENGL (CAIRO_CONTAINER (pDock)); |
129 | - double dt = (bUseOpenGL ? mySystem.iGLAnimationDeltaT : mySystem.iCairoAnimationDeltaT); |
130 | + double dt = cairo_dock_get_animation_delta_t (CAIRO_CONTAINER (pDock)); |
131 | |
132 | int i; |
133 | for (i = 0; i < CD_ANIMATIONS_NB_EFFECTS; i ++) |
134 | @@ -116,7 +116,7 @@ |
135 | if (pIcon->bStatic || ! CAIRO_DOCK_CONTAINER_IS_OPENGL (CAIRO_CONTAINER (pDock)) || pIcon->iAnimationState > CAIRO_DOCK_STATE_MOUSE_HOVERED) |
136 | return CAIRO_DOCK_LET_PASS_NOTIFICATION; |
137 | |
138 | - if (pIcon->pSubDock && pIcon->iSubdockViewType == 3 && !myAccessibility.bShowSubDockOnClick) |
139 | + if (pIcon->pSubDock && pIcon->iSubdockViewType == 3 && !myDocksParam.bShowSubDockOnClick) // icone de sous-dock avec rendu de type "box"-> on n'anime pas. |
140 | { |
141 | //cd_animations_free_data (pUserData, pIcon); |
142 | return CAIRO_DOCK_LET_PASS_NOTIFICATION; |
143 | @@ -138,7 +138,7 @@ |
144 | if (! CAIRO_DOCK_IS_DOCK (pDock) || pIcon->iAnimationState > CAIRO_DOCK_STATE_CLICKED) |
145 | return CAIRO_DOCK_LET_PASS_NOTIFICATION; |
146 | |
147 | - if (pIcon->pSubDock && pIcon->iSubdockViewType == 3) |
148 | + if (pIcon->pSubDock && pIcon->iSubdockViewType == 3) // icone de sous-dock avec rendu de type "box" -> on arrete l'animation en cours. |
149 | { |
150 | CDAnimationData *pData = CD_APPLET_GET_MY_ICON_DATA (pIcon); |
151 | if (pData && ! pData->bIsUnfolding) |
152 | @@ -146,11 +146,9 @@ |
153 | return CAIRO_DOCK_LET_PASS_NOTIFICATION; |
154 | } |
155 | |
156 | - CairoDockIconType iType = cairo_dock_get_icon_type (pIcon); |
157 | + CairoDockIconGroup iType = cairo_dock_get_icon_type (pIcon); |
158 | if (iType == CAIRO_DOCK_LAUNCHER && CAIRO_DOCK_IS_APPLI (pIcon) && ! (iButtonState & GDK_SHIFT_MASK)) |
159 | iType = CAIRO_DOCK_APPLI; |
160 | - /**if (iType == CAIRO_DOCK_APPLI && CAIRO_DOCK_IS_LAUNCHER (pIcon) && iButtonState & GDK_SHIFT_MASK) |
161 | - iType = CAIRO_DOCK_LAUNCHER;*/ |
162 | |
163 | gboolean bStartAnimation = FALSE; |
164 | _cd_animations_start (pUserData, pIcon, pDock, myConfig.iEffectsOnClick[iType], &bStartAnimation); |
165 | @@ -171,7 +169,7 @@ |
166 | CDAnimationsEffects anim[2] = {0, -1}; |
167 | if (strcmp (cAnimation, "default") == 0) |
168 | { |
169 | - CairoDockIconType iType = cairo_dock_get_icon_type (pIcon); |
170 | + CairoDockIconGroup iType = cairo_dock_get_icon_type (pIcon); |
171 | anim[0] = myConfig.iEffectsOnClick[iType][0]; |
172 | } |
173 | else |
174 | @@ -362,7 +360,7 @@ |
175 | if (pData == NULL) |
176 | return CAIRO_DOCK_LET_PASS_NOTIFICATION; |
177 | gboolean bUseOpenGL = CAIRO_DOCK_CONTAINER_IS_OPENGL (CAIRO_CONTAINER (pDock)); |
178 | - double dt = (bUseOpenGL ? mySystem.iGLAnimationDeltaT : mySystem.iCairoAnimationDeltaT); |
179 | + double dt = cairo_dock_get_animation_delta_t (CAIRO_CONTAINER (pDock)); |
180 | |
181 | if (pData->bIsUnfolding) |
182 | { |
183 | @@ -444,6 +442,7 @@ |
184 | pIcon->fReflectShading = (double) pData->iReflectShadeCount / _REFLECT_FADE_NB_STEP; |
185 | if (pData->iReflectShadeCount != 0) |
186 | *bContinueAnimation = TRUE; |
187 | + cairo_dock_redraw_icon (pIcon, CAIRO_CONTAINER (pDock)); |
188 | } |
189 | |
190 | if (pData->fRadiusFactor != 0) |
191 | |
192 | === modified file 'Animated-icons/src/applet-rotation.c' |
193 | --- Animated-icons/src/applet-rotation.c 2010-02-14 00:51:22 +0000 |
194 | +++ Animated-icons/src/applet-rotation.c 2011-03-17 14:49:16 +0000 |
195 | @@ -248,7 +248,7 @@ |
196 | if (pDock->container.bUseReflect) |
197 | { |
198 | glPushMatrix (); |
199 | - _cairo_dock_set_alpha (myIcons.fAlbedo * sqrt (myIcons.fAlbedo) * pIcon->fAlpha); // transparence du reflet, arrange pour essayer de cacher l'absence de degrade :p |
200 | + _cairo_dock_set_alpha (myIconsParam.fAlbedo * sqrt (myIconsParam.fAlbedo) * pIcon->fAlpha); // transparence du reflet, arrange pour essayer de cacher l'absence de degrade :p |
201 | double fOffsetY = pIcon->fHeight * pIcon->fScale + (0 + pIcon->fDeltaYReflection) * pDock->container.fRatio; |
202 | if (pDock->container.bIsHorizontal) |
203 | { |
204 | @@ -261,7 +261,7 @@ |
205 | else |
206 | { |
207 | glTranslatef (0., fOffsetY, 0.); |
208 | - //glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, myIcons.fReflectSize * pDock->container.fRatio, 1.); |
209 | + //glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, myIconsParam.fReflectSize * pDock->container.fRatio, 1.); |
210 | } |
211 | glScalef (1., -1., 1.); |
212 | } |
213 | @@ -270,12 +270,12 @@ |
214 | if (pDock->container.bDirectionUp) |
215 | { |
216 | glTranslatef (fOffsetY, 0., 0.); |
217 | - //glScalef (- myIcons.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
218 | + //glScalef (- myIconsParam.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
219 | } |
220 | else |
221 | { |
222 | glTranslatef (- fOffsetY, 0., 0.); |
223 | - //glScalef (myIcons.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
224 | + //glScalef (myIconsParam.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
225 | } |
226 | glScalef (-1., 1., 1.); |
227 | } |
228 | |
229 | === modified file 'Animated-icons/src/applet-spot.c' |
230 | --- Animated-icons/src/applet-spot.c 2010-02-14 00:51:22 +0000 |
231 | +++ Animated-icons/src/applet-spot.c 2011-03-17 14:49:16 +0000 |
232 | @@ -51,7 +51,7 @@ |
233 | glRotatef (90, 0., 0., 1.); |
234 | double fY = (- pIcon->fHeight + CD_ANIMATIONS_SPOT_HEIGHT) * pIcon->fScale/2; // * fRadiusFactor |
235 | if (pDock->container.bUseReflect) |
236 | - fY -= MIN (myIcons.fReflectSize, CD_ANIMATIONS_SPOT_HEIGHT/2); |
237 | + fY -= MIN (myIconsParam.fReflectSize, CD_ANIMATIONS_SPOT_HEIGHT/2); |
238 | if (! pDock->container.bDirectionUp) |
239 | fY = -fY; |
240 | glTranslatef (0., fY, 0.); |
241 | @@ -81,7 +81,7 @@ |
242 | glRotatef (90, 0., 0., 1.); |
243 | double fY = CD_ANIMATIONS_SPOT_HEIGHT * (1 + cos (G_PI * fHaloRotationAngle / 180.))/2 - pIcon->fHeight * pIcon->fScale/2; // * fRadiusFactor |
244 | if (pDock->container.bUseReflect) |
245 | - fY -= MIN (myIcons.fReflectSize, CD_ANIMATIONS_SPOT_HEIGHT/2); |
246 | + fY -= MIN (myIconsParam.fReflectSize, CD_ANIMATIONS_SPOT_HEIGHT/2); |
247 | if (! pDock->container.bDirectionUp) |
248 | fY = -fY; |
249 | double fX = .9 * pIcon->fWidth * pIcon->fScale/2; // * fRadiusFactor |
250 | @@ -115,7 +115,7 @@ |
251 | glRotatef (90, 0., 0., 1.); |
252 | double fY = (- pIcon->fHeight + CD_ANIMATIONS_SPOT_HEIGHT/2 + pIcon->fHeight * fRadiusFactor) * pIcon->fScale/2; // CD_ANIMATIONS_SPOT_HEIGHT/2 * fRadiusFactor |
253 | if (pDock->container.bUseReflect) |
254 | - fY -= MIN (myIcons.fReflectSize, CD_ANIMATIONS_SPOT_HEIGHT/2); |
255 | + fY -= MIN (myIconsParam.fReflectSize, CD_ANIMATIONS_SPOT_HEIGHT/2); |
256 | if (! pDock->container.bDirectionUp) |
257 | fY = -fY; |
258 | glTranslatef (0., fY, 0.); |
259 | @@ -151,9 +151,9 @@ |
260 | if (!bWillContinue) |
261 | pData->bGrowingSpot = FALSE; |
262 | } |
263 | - pData->fIconOffsetY += 1.*myLabels.iconTextDescription.iSize / myConfig.iSpotDuration * dt; |
264 | - if (pData->fIconOffsetY > myLabels.iconTextDescription.iSize) |
265 | - pData->fIconOffsetY = myLabels.iconTextDescription.iSize; |
266 | + pData->fIconOffsetY += 1.*myIconsParam.iconTextDescription.iSize / myConfig.iSpotDuration * dt; |
267 | + if (pData->fIconOffsetY > myIconsParam.iconTextDescription.iSize) |
268 | + pData->fIconOffsetY = myIconsParam.iconTextDescription.iSize; |
269 | } |
270 | else |
271 | { |
272 | @@ -162,7 +162,7 @@ |
273 | pData->fRadiusFactor = 0.; |
274 | else |
275 | bContinueAnimation = TRUE; |
276 | - pData->fIconOffsetY -= 1.*myLabels.iconTextDescription.iSize / myConfig.iSpotDuration * dt; |
277 | + pData->fIconOffsetY -= 1.*myIconsParam.iconTextDescription.iSize / myConfig.iSpotDuration * dt; |
278 | if (pData->fIconOffsetY < 0) |
279 | pData->fIconOffsetY = 0.; |
280 | else |
281 | |
282 | === modified file 'Animated-icons/src/applet-struct.h' |
283 | --- Animated-icons/src/applet-struct.h 2010-08-07 01:43:25 +0000 |
284 | +++ Animated-icons/src/applet-struct.h 2011-03-17 14:49:16 +0000 |
285 | @@ -95,8 +95,8 @@ |
286 | gboolean bContinueBlink; |
287 | |
288 | CDAnimationsEffects iEffectsOnMouseOver[CD_ANIMATIONS_NB_EFFECTS]; |
289 | - CDAnimationsEffects iEffectsOnClick[CAIRO_DOCK_NB_TYPES][CD_ANIMATIONS_NB_EFFECTS]; |
290 | - gint iNbRoundsOnClick[CAIRO_DOCK_NB_TYPES]; |
291 | + CDAnimationsEffects iEffectsOnClick[CAIRO_DOCK_NB_GROUPS][CD_ANIMATIONS_NB_EFFECTS]; |
292 | + gint iNbRoundsOnClick[CAIRO_DOCK_NB_GROUPS]; |
293 | } ; |
294 | |
295 | //\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc. |
296 | |
297 | === modified file 'Animated-icons/src/applet-unfold.c' |
298 | --- Animated-icons/src/applet-unfold.c 2010-08-07 01:43:25 +0000 |
299 | +++ Animated-icons/src/applet-unfold.c 2011-03-17 14:49:16 +0000 |
300 | @@ -90,7 +90,7 @@ |
301 | for (ic = pIcon->pSubDock->icons, i = 0; ic != NULL && i < 3; ic = ic->next, i++) |
302 | { |
303 | icon = ic->data; |
304 | - if (CAIRO_DOCK_IS_SEPARATOR (icon)) |
305 | + if (CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (icon)) |
306 | { |
307 | i --; |
308 | continue; |
309 | @@ -139,90 +139,8 @@ |
310 | cairo_restore (pCairoContext); |
311 | |
312 | //\_____________________ On dessine son reflet. |
313 | - if (pDock->container.bUseReflect && pIcon->pReflectionBuffer != NULL) // on dessine les reflets. |
314 | - { |
315 | - cairo_save (pCairoContext); |
316 | - double fRatio = pDock->container.fRatio; |
317 | - if (pDock->container.bIsHorizontal) |
318 | - { |
319 | - if (myIcons.bConstantSeparatorSize && CAIRO_DOCK_IS_SEPARATOR (pIcon)) |
320 | - cairo_translate (pCairoContext, 0, (pDock->container.bDirectionUp ? pIcon->fDeltaYReflection + pIcon->fHeight : -pIcon->fDeltaYReflection - myIcons.fReflectSize * fRatio)); |
321 | - else |
322 | - cairo_translate (pCairoContext, 0, (pDock->container.bDirectionUp ? pIcon->fDeltaYReflection + pIcon->fHeight * pIcon->fScale : -pIcon->fDeltaYReflection - myIcons.fReflectSize * pIcon->fScale * fRatio)); |
323 | - } |
324 | - else |
325 | - { |
326 | - if (myIcons.bConstantSeparatorSize && CAIRO_DOCK_IS_SEPARATOR (pIcon)) |
327 | - cairo_translate (pCairoContext, (pDock->container.bDirectionUp ? pIcon->fDeltaYReflection + pIcon->fHeight : -pIcon->fDeltaYReflection - myIcons.fReflectSize * fRatio), 0); |
328 | - else |
329 | - cairo_translate (pCairoContext, (pDock->container.bDirectionUp ? pIcon->fDeltaYReflection + pIcon->fHeight * pIcon->fScale : -pIcon->fDeltaYReflection - myIcons.fReflectSize * pIcon->fScale * fRatio), 0); |
330 | - } |
331 | - cairo_dock_set_icon_scale_on_context (pCairoContext, pIcon, pDock->container.bIsHorizontal, fRatio, pDock->container.bDirectionUp); |
332 | - |
333 | - cairo_set_source_surface (pCairoContext, pIcon->pReflectionBuffer, 0.0, 0.0); |
334 | - |
335 | - if (mySystem.bDynamicReflection && pIcon->fScale > 1) // on applique la surface avec un degrade en transparence, ou avec une transparence simple. |
336 | - { |
337 | - cairo_pattern_t *pGradationPattern; |
338 | - if (pDock->container.bIsHorizontal) |
339 | - { |
340 | - pGradationPattern = cairo_pattern_create_linear (0., |
341 | - (pDock->container.bDirectionUp ? 0. : myIcons.fReflectSize / fRatio * (1 + myIcons.fAmplitude)), |
342 | - 0., |
343 | - (pDock->container.bDirectionUp ? myIcons.fReflectSize / fRatio * (1 + myIcons.fAmplitude) / pIcon->fScale : myIcons.fReflectSize / fRatio * (1 + myIcons.fAmplitude) * (1. - 1./ pIcon->fScale))); // de haut en bas. |
344 | - g_return_if_fail (cairo_pattern_status (pGradationPattern) == CAIRO_STATUS_SUCCESS); |
345 | - |
346 | - cairo_pattern_set_extend (pGradationPattern, CAIRO_EXTEND_NONE); |
347 | - cairo_pattern_add_color_stop_rgba (pGradationPattern, |
348 | - 0., |
349 | - 0., |
350 | - 0., |
351 | - 0., |
352 | - 1.); |
353 | - cairo_pattern_add_color_stop_rgba (pGradationPattern, |
354 | - 1., |
355 | - 0., |
356 | - 0., |
357 | - 0., |
358 | - 1 - (pIcon->fScale - 1) / myIcons.fAmplitude); // astuce pour ne pas avoir a re-creer la surface de la reflection. |
359 | - } |
360 | - else |
361 | - { |
362 | - pGradationPattern = cairo_pattern_create_linear ((pDock->container.bDirectionUp ? 0. : myIcons.fReflectSize / fRatio * (1 + myIcons.fAmplitude)), |
363 | - 0., |
364 | - (pDock->container.bDirectionUp ? myIcons.fReflectSize / fRatio * (1 + myIcons.fAmplitude) / pIcon->fScale : myIcons.fReflectSize / fRatio * (1 + myIcons.fAmplitude) * (1. - 1./ pIcon->fScale)), |
365 | - 0.); |
366 | - g_return_if_fail (cairo_pattern_status (pGradationPattern) == CAIRO_STATUS_SUCCESS); |
367 | - |
368 | - cairo_pattern_set_extend (pGradationPattern, CAIRO_EXTEND_NONE); |
369 | - cairo_pattern_add_color_stop_rgba (pGradationPattern, |
370 | - 0., |
371 | - 0., |
372 | - 0., |
373 | - 0., |
374 | - 1.); |
375 | - cairo_pattern_add_color_stop_rgba (pGradationPattern, |
376 | - 1., |
377 | - 0., |
378 | - 0., |
379 | - 0., |
380 | - 1. - (pIcon->fScale - 1) / myIcons.fAmplitude); // astuce pour ne pas avoir a re-creer la surface de la reflection. |
381 | - } |
382 | - cairo_set_operator (pCairoContext, CAIRO_OPERATOR_OVER); |
383 | - cairo_translate (pCairoContext, 0, 0); |
384 | - cairo_mask (pCairoContext, pGradationPattern); |
385 | - |
386 | - cairo_pattern_destroy (pGradationPattern); |
387 | - } |
388 | - else |
389 | - { |
390 | - if (pIcon->fAlpha == 1) |
391 | - cairo_paint (pCairoContext); |
392 | - else |
393 | - cairo_paint_with_alpha (pCairoContext, pIcon->fAlpha); |
394 | - } |
395 | - cairo_restore (pCairoContext); |
396 | - } |
397 | + cairo_dock_draw_icon_reflect_cairo (pIcon, pDock, pCairoContext); |
398 | + |
399 | cairo_restore (pCairoContext); |
400 | } |
401 | |
402 | @@ -283,7 +201,7 @@ |
403 | for (ic = pIcon->pSubDock->icons, i = 0; ic != NULL && i < 3; ic = ic->next, i++) |
404 | { |
405 | icon = ic->data; |
406 | - if (CAIRO_DOCK_IS_SEPARATOR (icon)) |
407 | + if (CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (icon)) |
408 | { |
409 | i --; |
410 | continue; |
411 | @@ -302,4 +220,9 @@ |
412 | _cairo_dock_set_alpha (1.); |
413 | _cairo_dock_apply_texture_at_size (g_pBoxAboveBuffer.iTexture, w, h); |
414 | glPopMatrix (); |
415 | + |
416 | + //\_____________________ On dessine son reflet. |
417 | + cairo_dock_draw_icon_reflect_opengl (pIcon, pDock); |
418 | + |
419 | + _cairo_dock_disable_texture (); |
420 | } |
421 | |
422 | === modified file 'Animated-icons/src/applet-wave.c' |
423 | --- Animated-icons/src/applet-wave.c 2010-08-07 01:43:25 +0000 |
424 | +++ Animated-icons/src/applet-wave.c 2011-03-17 14:49:16 +0000 |
425 | @@ -186,8 +186,8 @@ |
426 | { |
427 | glPushMatrix (); |
428 | double x0, y0, x1, y1; |
429 | - double fReflectRatio = myIcons.fReflectSize * pDock->container.fRatio / pIcon->fHeight / pIcon->fScale; |
430 | - double fOffsetY = pIcon->fHeight * pIcon->fScale/2 + (myIcons.fReflectSize/2 + pIcon->fDeltaYReflection) * pDock->container.fRatio; |
431 | + double fReflectRatio = myIconsParam.fReflectSize * pDock->container.fRatio / pIcon->fHeight / pIcon->fScale; |
432 | + double fOffsetY = pIcon->fHeight * pIcon->fScale/2 + (myIconsParam.fReflectSize/2 + pIcon->fDeltaYReflection) * pDock->container.fRatio; |
433 | if (pDock->container.bIsHorizontal) |
434 | { |
435 | if (pDock->container.bDirectionUp) |
436 | @@ -203,7 +203,7 @@ |
437 | else |
438 | { |
439 | glTranslatef (0., fOffsetY, 0.); |
440 | - glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, myIcons.fReflectSize * pDock->container.fRatio, 1.); |
441 | + glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, myIconsParam.fReflectSize * pDock->container.fRatio, 1.); |
442 | x0 = 0.; |
443 | y0 = fReflectRatio; |
444 | x1 = 1.; |
445 | @@ -215,7 +215,7 @@ |
446 | if (pDock->container.bDirectionUp) |
447 | { |
448 | glTranslatef (fOffsetY, 0., 0.); |
449 | - glScalef (- myIcons.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
450 | + glScalef (- myIconsParam.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
451 | x0 = 1. - fReflectRatio; |
452 | y0 = 0.; |
453 | x1 = 1.; |
454 | @@ -224,7 +224,7 @@ |
455 | else |
456 | { |
457 | glTranslatef (- fOffsetY, 0., 0.); |
458 | - glScalef (myIcons.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
459 | + glScalef (myIconsParam.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
460 | x0 = fReflectRatio; |
461 | y0 = 0.; |
462 | x1 = 0.; |
463 | @@ -236,7 +236,7 @@ |
464 | glEnable(GL_TEXTURE_2D); // On active le texturing sur cette passe |
465 | glBindTexture(GL_TEXTURE_2D, pIcon->iIconTexture); |
466 | |
467 | - glColor4f(1., 1., 1., myIcons.fAlbedo * pIcon->fAlpha); // transparence du reflet. |
468 | + glColor4f(1., 1., 1., myIconsParam.fAlbedo * pIcon->fAlpha); // transparence du reflet. |
469 | glEnable(GL_BLEND); |
470 | glBlendFunc (1, 0); |
471 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
472 | |
473 | === modified file 'Animated-icons/src/applet-wobbly.c' |
474 | --- Animated-icons/src/applet-wobbly.c 2009-10-05 19:27:17 +0000 |
475 | +++ Animated-icons/src/applet-wobbly.c 2011-03-17 14:49:16 +0000 |
476 | @@ -422,13 +422,14 @@ |
477 | { |
478 | glPushMatrix (); |
479 | double x0, y0, x1, y1; |
480 | - double fReflectRatio = myIcons.fReflectSize * pDock->container.fRatio / pIcon->fHeight / pIcon->fScale; |
481 | - double fOffsetY = pIcon->fHeight * pIcon->fScale/2 + (myIcons.fReflectSize/2 + pIcon->fDeltaYReflection) * pDock->container.fRatio; |
482 | + double fReflectRatio = myIconsParam.fReflectSize * pDock->container.fRatio / pIcon->fHeight / pIcon->fScale; |
483 | + ///double fOffsetY = pIcon->fHeight * pIcon->fScale/2 + (myIconsParam.fReflectSize/2 + pIcon->fDeltaYReflection) * pDock->container.fRatio; |
484 | + double fOffsetY = pIcon->fHeight * pIcon->fScale + pIcon->fDeltaYReflection; |
485 | if (pDock->container.bIsHorizontal) |
486 | { |
487 | if (pDock->container.bDirectionUp) |
488 | { |
489 | - fOffsetY = pIcon->fHeight * pIcon->fScale + pIcon->fDeltaYReflection; |
490 | + //fOffsetY = pIcon->fHeight * pIcon->fScale + pIcon->fDeltaYReflection; |
491 | glTranslatef (0., - fOffsetY, 0.); |
492 | glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, - pIcon->fHeight * pIcon->fScale, 1.); // taille du reflet et on se retourne. |
493 | x0 = 0.; |
494 | @@ -439,7 +440,7 @@ |
495 | else |
496 | { |
497 | glTranslatef (0., fOffsetY, 0.); |
498 | - glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, myIcons.fReflectSize * pDock->container.fRatio, 1.); |
499 | + glScalef (pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, - pIcon->fHeight * pIcon->fScale, 1.); |
500 | x0 = 0.; |
501 | y0 = fReflectRatio; |
502 | x1 = 1.; |
503 | @@ -450,8 +451,9 @@ |
504 | { |
505 | if (pDock->container.bDirectionUp) |
506 | { |
507 | + //fOffsetY = pIcon->fHeight * pIcon->fScale + pIcon->fDeltaYReflection; |
508 | glTranslatef (fOffsetY, 0., 0.); |
509 | - glScalef (- myIcons.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
510 | + glScalef (- pIcon->fHeight * pIcon->fScale, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
511 | x0 = 1. - fReflectRatio; |
512 | y0 = 0.; |
513 | x1 = 1.; |
514 | @@ -459,8 +461,9 @@ |
515 | } |
516 | else |
517 | { |
518 | + //fOffsetY = pIcon->fHeight * pIcon->fScale + pIcon->fDeltaYReflection; |
519 | glTranslatef (- fOffsetY, 0., 0.); |
520 | - glScalef (myIcons.fReflectSize * pDock->container.fRatio, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
521 | + glScalef (- pIcon->fHeight * pIcon->fScale, pIcon->fWidth * pIcon->fWidthFactor * pIcon->fScale, 1.); |
522 | x0 = fReflectRatio; |
523 | y0 = 0.; |
524 | x1 = 0.; |
525 | @@ -470,7 +473,7 @@ |
526 | |
527 | ///glActiveTextureARB(GL_TEXTURE0_ARB); // Go pour le multitexturing 1ere passe |
528 | glBindTexture(GL_TEXTURE_2D, pIcon->iIconTexture); |
529 | - glColor4f(1.0f, 1.0f, 1.0f, myIcons.fAlbedo * pIcon->fAlpha); // transparence du reflet. |
530 | + glColor4f(1.0f, 1.0f, 1.0f, myIconsParam.fAlbedo * pIcon->fAlpha); // transparence du reflet. |
531 | glBlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, |
532 | GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |
533 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); |
534 | @@ -481,7 +484,7 @@ |
535 | /*glActiveTextureARB(GL_TEXTURE1_ARB); // Go pour le texturing 2eme passe |
536 | glEnable(GL_TEXTURE_2D); |
537 | glBindTexture(GL_TEXTURE_2D, g_pGradationTexture[pDock->container.bIsHorizontal]); |
538 | - glColor4f(1.0f, 1.0f, 1.0f, myIcons.fAlbedo * pIcon->fAlpha); // transparence du reflet. // myIcons.fAlbedo * pIcon->fAlpha |
539 | + glColor4f(1.0f, 1.0f, 1.0f, myIconsParam.fAlbedo * pIcon->fAlpha); // transparence du reflet. // myIconsParam.fAlbedo * pIcon->fAlpha |
540 | glEnable(GL_BLEND); |
541 | glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
542 | glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); // Le mode de combinaison des textures |
543 | |
544 | === modified file 'Applets.stable' |
545 | --- Applets.stable 2010-08-07 01:43:25 +0000 |
546 | +++ Applets.stable 2011-03-17 14:49:16 +0000 |
547 | @@ -49,6 +49,12 @@ |
548 | ###Added in v2.1.3 |
549 | RSSReader |
550 | kde-integration |
551 | +###Added in v2.2.0 |
552 | +MeMenu |
553 | +Messaging-Menu |
554 | ###All other applets are considered to be either not enough functionnal, buggy/untested, or under heavy development. |
555 | #Scooby-Do |
556 | #Network-Monitor |
557 | +#Recent-Events |
558 | +#Remote-Control |
559 | +#Status-Notifier |
560 | |
561 | === modified file 'CMakeLists.txt' |
562 | --- CMakeLists.txt 2010-09-07 00:39:20 +0000 |
563 | +++ CMakeLists.txt 2011-03-17 14:49:16 +0000 |
564 | @@ -10,7 +10,7 @@ |
565 | ########### project ############### |
566 | |
567 | project ("cairo-dock-plugins") |
568 | -set (VERSION "2.2.0-0rc1") |
569 | +set (VERSION "2.3.0~0rc1") |
570 | |
571 | add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall |
572 | if (NOT ${CMAKE_BUILD_TYPE}) |
573 | @@ -23,7 +23,7 @@ |
574 | set (CPACK_SOURCE_GENERATOR "TGZ") |
575 | set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}") |
576 | set (CPACK_SOURCE_IGNORE_FILES |
577 | - "/build/;/.bzr/;bzrignore$;/misc/;/en_GB.po$;~$;${CPACK_SOURCE_IGNORE_FILES}") |
578 | + "/build/;/.bzr/;bzrignore$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}") |
579 | include (CPack) |
580 | |
581 | add_custom_target( dist |
582 | @@ -45,52 +45,70 @@ |
583 | |
584 | set (PACKAGE ${CMAKE_PROJECT_NAME}) |
585 | set (GETTEXT_PACKAGE ${PACKAGE}) |
586 | + |
587 | +# get plug-ins install dir |
588 | execute_process( |
589 | - COMMAND pkg-config cairo-dock --variable=pluginsdir |
590 | + COMMAND pkg-config cairo-dock --variable=pluginsdir # /usr/lib/cairo-dock |
591 | OUTPUT_VARIABLE pluginsdir) |
592 | STRING (REGEX REPLACE "\n" "" pluginsdir ${pluginsdir}) # la commande rajoute un retour chariot ... |
593 | +# get plug-ins data dir |
594 | execute_process( |
595 | - COMMAND pkg-config cairo-dock --variable=pluginsdatadir |
596 | + COMMAND pkg-config cairo-dock --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins |
597 | OUTPUT_VARIABLE pluginsdatadir) |
598 | STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir}) |
599 | +# check that version matches with the core |
600 | execute_process( |
601 | - COMMAND pkg-config --modversion cairo-dock |
602 | + COMMAND pkg-config --modversion cairo-dock # 2.2.0-3 |
603 | OUTPUT_VARIABLE dock_version) |
604 | STRING (REGEX REPLACE "\n" "" dock_version ${dock_version}) |
605 | -if (NOT "${dock_version}" STREQUAL "${VERSION}") |
606 | +if (NOT "${dock_version}" STREQUAL "${VERSION}") # Version |
607 | MESSAGE (FATAL_ERROR "warning : version mismatch with the core : " ${VERSION} <> ${dock_version}) |
608 | endif() |
609 | + |
610 | +#if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT "${FORCE_LIB64}" STREQUAL "") # 64bits and force install in lib64 |
611 | +# set (libname "lib64") |
612 | +#else() |
613 | +# set (libname "lib${LIB_SUFFIX}") |
614 | +#endif() |
615 | +#set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock") # /usr/lib |
616 | + |
617 | +# check that installation dir matches with the core |
618 | +GET_FILENAME_COMPONENT(libdir "${pluginsdir}/.." ABSOLUTE) # /usr/lib |
619 | +GET_FILENAME_COMPONENT(prefix "${pluginsdir}/../.." ABSOLUTE) # /usr |
620 | +if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}") |
621 | + message (STATUS "Warning : plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}") |
622 | + set (CMAKE_INSTALL_PREFIX "${prefix}") |
623 | + #set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock") |
624 | +endif() |
625 | + |
626 | +# set internationalisation |
627 | set (GETTEXT_PLUGINS "cairo-dock-plugins") |
628 | - |
629 | -if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND "${LIB_SUFFIX}" STREQUAL "" AND "${FORCE_NOT_LIB64}" STREQUAL "" ) |
630 | - set (libdir lib64/cairo-dock) |
631 | -elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT "${FORCE_NOT_LIB64}" STREQUAL "" ) |
632 | - set (libdir lib${LIB_SUFFIX}/cairo-dock) |
633 | -else() |
634 | - set (libdir lib${LIB_SUFFIX}/cairo-dock) |
635 | -endif() |
636 | - |
637 | -if (NOT "${pluginsdir}" STREQUAL "${CMAKE_INSTALL_PREFIX}/${libdir}") |
638 | - message (STATUS "Warning : plug-ins should be installed in the same place asthe dock, that is to say in ${pluginsdir}") |
639 | - STRING (REGEX REPLACE "/${libdir}" "" CMAKE_INSTALL_PREFIX ${pluginsdir}) |
640 | -endif() |
641 | set (localedir "${CMAKE_INSTALL_PREFIX}/share/locale") |
642 | set (gaugesdir "${CMAKE_INSTALL_PREFIX}/share/cairo-dock/gauges") |
643 | |
644 | - |
645 | -########### dependencies ############### |
646 | +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files |
647 | + |
648 | +########### dependancies ############### |
649 | + |
650 | +message ("") |
651 | +message (STATUS "=====================") |
652 | +message (STATUS "Check dependancies...") |
653 | +message (STATUS "=====================") |
654 | +message ("") |
655 | |
656 | 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") |
657 | |
658 | ############# ALSA_MIXER ################# |
659 | -if (NOT "${enable_alsa_mixer}" STREQUAL "no") |
660 | +set (with_alsa "no") |
661 | +if (NOT "${enable-alsa-mixer}" STREQUAL "no") |
662 | pkg_check_modules (ALSA_MIXER_PACKAGE alsa) |
663 | if ("${ALSA_MIXER_PACKAGE_FOUND}" STREQUAL "") |
664 | message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.") |
665 | else() |
666 | set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS}) |
667 | - set (VERSION_ALSA_MIXER "1.0.11") |
668 | + set (VERSION_ALSA_MIXER "1.0.12") |
669 | set (PACKAGE_ALSA_MIXER "cd-AlsaMixer") |
670 | + set (with_alsa "yes") |
671 | set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer") |
672 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/alsaMixer/data/AlsaMixer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/alsaMixer/data/AlsaMixer.conf) |
673 | add_subdirectory ("alsaMixer") |
674 | @@ -99,7 +117,7 @@ |
675 | |
676 | ############# ANIMATED ICONS ################# |
677 | set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS}) |
678 | -set (VERSION_ANIMATED_ICONS "1.0.8") |
679 | +set (VERSION_ANIMATED_ICONS "1.0.9") |
680 | set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons") |
681 | set (animated_iconsdatadir "${pluginsdatadir}/Animated-icons") |
682 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Animated-icons/data/Animated-icons.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Animated-icons/data/Animated-icons.conf) |
683 | @@ -107,7 +125,7 @@ |
684 | |
685 | ############# CAIRO_PENGUIN ################# |
686 | set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS}) |
687 | -set (VERSION_CAIRO_PENGUIN "1.1.7") |
688 | +set (VERSION_CAIRO_PENGUIN "1.1.8") |
689 | set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin") |
690 | set (cairo_penguinuserdirname "Cairo-Penguin") |
691 | set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin") |
692 | @@ -116,19 +134,21 @@ |
693 | |
694 | ############# CLIPPER ################# |
695 | set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS}) |
696 | -set (VERSION_CLIPPER "1.1.3") |
697 | +set (VERSION_CLIPPER "1.1.4") |
698 | set (PACKAGE_CLIPPER "cd-Clipper") |
699 | set (Clipperdatadir "${pluginsdatadir}/Clipper") |
700 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf) |
701 | add_subdirectory (Clipper) |
702 | |
703 | ############# CLOCK ################# |
704 | +set (with_ical "yes") |
705 | pkg_check_modules ("LIBICAL_PACKAGE" "libical") |
706 | if ("${LIBICAL_PACKAGE_FOUND}" STREQUAL "") |
707 | + set (with_ical "no") |
708 | message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.") |
709 | endif() |
710 | set (GETTEXT_CLOCK ${GETTEXT_PLUGINS}) |
711 | -set (VERSION_CLOCK "2.1.1") |
712 | +set (VERSION_CLOCK "2.1.2") |
713 | set (PACKAGE_CLOCK "cd-clock") |
714 | set (clockuserdirname "clock") |
715 | set (clockdatadir "${pluginsdatadir}/clock") |
716 | @@ -137,15 +157,98 @@ |
717 | |
718 | ############# COMPIZ_ICON ################# |
719 | set (GETTEXT_COMPIZ_ICON ${GETTEXT_PLUGINS}) |
720 | -set (VERSION_COMPIZ_ICON "1.1.5") |
721 | +set (VERSION_COMPIZ_ICON "1.1.6") |
722 | set (PACKAGE_COMPIZ_ICON "cd-compiz-icon") |
723 | set (compiz_icondatadir "${pluginsdatadir}/compiz-icon") |
724 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compiz-icon/data/compiz-icon.conf.in ${CMAKE_CURRENT_BINARY_DIR}/compiz-icon/data/compiz-icon.conf) |
725 | add_subdirectory (compiz-icon) |
726 | |
727 | ############# DBUS ################# |
728 | +find_program (PYTHON_EXECUTABLE python) |
729 | +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION) |
730 | +if ("${PYTHON_VERSION}" STREQUAL "") |
731 | + message (STATUS "Could not find Python, won't install Python interface.") |
732 | + set (with_python "no") |
733 | +else() |
734 | + STRING (REGEX REPLACE "\n" "" PYTHON_VERSION ${PYTHON_VERSION}) |
735 | + message (STATUS "Python Version: ${PYTHON_VERSION}") |
736 | + GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE) |
737 | + if (EXISTS ${DEBIAN_VERSION}) |
738 | + message (STATUS " will use '--install-layout deb' with 'python setup.py install'") |
739 | + set (DEBIAN_INSTALL_LAYOUT "--install-layout deb") |
740 | + endif() |
741 | + set (PYTHON_FOUND "TRUE") |
742 | + set (with_python "yes") |
743 | +endif() |
744 | + |
745 | +# find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs. |
746 | +find_program (RUBY_EXECUTABLE ruby) |
747 | +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']" |
748 | + OUTPUT_VARIABLE RUBY_LIB_DIR) |
749 | +message (STATUS "RUBY_LIBRARY: ${RUBY_LIB_DIR}") |
750 | +if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil") |
751 | + message (STATUS "Could not find ruby libs, won't install Ruby interface.") |
752 | + set (with_ruby "no") |
753 | +else() |
754 | + string (REGEX REPLACE "lib/ruby/[0-9].[0-9]" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}") |
755 | + string (REGEX REPLACE "${RUBY_LIB_DIR_INSTALL}" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}") |
756 | + set (RUBY_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${RUBY_LIB_DIR_INSTALL}") |
757 | + message (STATUS " will be installed in: ${RUBY_LIB_DIR}") |
758 | + set (RUBY_FOUND "TRUE") |
759 | + set (with_ruby "yes") |
760 | +endif() |
761 | + |
762 | +#find_package (Mono) |
763 | +find_program (GMCS_EXECUTABLE gmcs) |
764 | +if ("${GMCS_EXECUTABLE}" STREQUAL "" OR NOT EXISTS ${GMCS_EXECUTABLE}) |
765 | + message (STATUS "Could not find Mono compiler gmcs, won't build Mono interface.") |
766 | + set (with_mono "no") |
767 | +else() |
768 | + set (MONO_FOUND "TRUE") |
769 | + pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0) |
770 | + if ("${MONO_PACKAGE_FOUND}" STREQUAL "") |
771 | + 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.") |
772 | + set (with_mono "no") |
773 | + else() |
774 | + set (with_mono "yes") |
775 | + endif() |
776 | +endif() |
777 | + |
778 | +set (with_vala "yes") |
779 | +set (with_valac "no") |
780 | +find_program (VALA_EXECUTABLE valac) |
781 | +if ("${WITH_VALA}" STREQUAL "no") |
782 | + set (with_vala "no") |
783 | +elseif ("${WITH_VALA}" STREQUAL "yes" AND NOT "${VALA_EXECUTABLE}" STREQUAL "") |
784 | + execute_process(COMMAND ${VALA_EXECUTABLE} "--version" |
785 | + OUTPUT_VARIABLE "VALA_VERSION") |
786 | + string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION}) |
787 | + string(STRIP ${VALA_VERSION} "VALA_VERSION") |
788 | + message (STATUS "VALA_VERSION: ${VALA_VERSION}") |
789 | + |
790 | + STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}") |
791 | + message (STATUS "VALA_MAJOR : ${VALA_MAJOR}") |
792 | + |
793 | + STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7 |
794 | + STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}") |
795 | + message (STATUS "VALA_MINOR : ${VALA_MINOR}") |
796 | + |
797 | + STRING (REGEX REPLACE ".*\\." "" VALA_NANO "${VALA_VERSION}") |
798 | + STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}") |
799 | + message (STATUS "VALA_NANO : ${VALA_NANO}") |
800 | + |
801 | + if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala > 0.10 |
802 | + message (STATUS "Vala compiler ok.") |
803 | + set (VALAC_FOUND "TRUE") |
804 | + set (with_valac "yes") |
805 | + else() |
806 | + message (STATUS "Vala compiler too old (0.10 required), won't build Vala interface.") |
807 | + endif() |
808 | +endif() |
809 | + |
810 | + |
811 | set (GETTEXT_DBUS ${GETTEXT_PLUGINS}) |
812 | -set (VERSION_DBUS "1.0.0") |
813 | +set (VERSION_DBUS "1.2.1") |
814 | set (PACKAGE_DBUS "cd-Dbus") |
815 | set (dbusdatadir "${pluginsdatadir}/Dbus") |
816 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Dbus/data/Dbus.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Dbus/data/Dbus.conf) |
817 | @@ -153,7 +256,7 @@ |
818 | |
819 | ############# DESKLET_RENDERING ################# |
820 | set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS}) |
821 | -set (VERSION_DESKLET_RENDERING "1.5.5") |
822 | +set (VERSION_DESKLET_RENDERING "1.5.6") |
823 | set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering") |
824 | set (desklet_renderingdatadir "${pluginsdatadir}/desklet-rendering") |
825 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/desklet-rendering/data/desklet-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/desklet-rendering/data/desklet-rendering.conf) |
826 | @@ -161,15 +264,27 @@ |
827 | |
828 | ############# DIALOG_RENDERING ################# |
829 | set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS}) |
830 | -set (VERSION_DIALOG_RENDERING "0.4.4") |
831 | +set (VERSION_DIALOG_RENDERING "0.5.1") |
832 | set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering") |
833 | set (dialog_renderingdatadir "${pluginsdatadir}/dialog-rendering") |
834 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dialog-rendering/data/dialog-rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dialog-rendering/data/dialog-rendering.conf) |
835 | add_subdirectory (dialog-rendering) |
836 | |
837 | +############# DISKS ################# |
838 | +set (with_disks "no") |
839 | +if ("${enable-disks}" STREQUAL "yes") |
840 | + set (GETTEXT_DISKS ${GETTEXT_PLUGINS}) |
841 | + set (VERSION_DISKS "0.0.2") |
842 | + set (PACKAGE_DISKS "cd-disks") |
843 | + set (with_disks "yes") |
844 | + set (disksdatadir "${pluginsdatadir}/Disks") |
845 | + configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Disks/data/Disks.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Disks/data/Disks.conf) |
846 | + add_subdirectory ("Disks") |
847 | +endif() |
848 | + |
849 | ############# DND2SHARE ################# |
850 | set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS}) |
851 | -set (VERSION_DND2SHARE "1.0.3") |
852 | +set (VERSION_DND2SHARE "1.0.5") |
853 | set (PACKAGE_DND2SHARE "cd-dnd2share") |
854 | set (dnd2sharedatadir "${pluginsdatadir}/dnd2share") |
855 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dnd2share/data/dnd2share.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dnd2share/data/dnd2share.conf) |
856 | @@ -177,17 +292,19 @@ |
857 | |
858 | ############# DOCK RENDERING ################# |
859 | set (GETTEXT_RENDERING ${GETTEXT_PLUGINS}) |
860 | -set (VERSION_RENDERING "1.5.7") |
861 | +set (VERSION_RENDERING "1.5.9") |
862 | set (PACKAGE_RENDERING "cd-rendering") |
863 | set (renderingdatadir "${pluginsdatadir}/rendering") |
864 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dock-rendering/data/rendering.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dock-rendering/data/rendering.conf) |
865 | add_subdirectory (dock-rendering) |
866 | |
867 | ############# DONCKY ################# |
868 | +set (with_doncky "no") |
869 | if ("${enable-doncky}" STREQUAL "yes") |
870 | set (GETTEXT_DONCKY ${GETTEXT_PLUGINS}) |
871 | - set (VERSION_DONCKY "0.0.3") |
872 | + set (VERSION_DONCKY "0.0.4") |
873 | set (PACKAGE_DONCKY "cd-doncky") |
874 | + set (with_doncky "yes") |
875 | set (donckydatadir "${pluginsdatadir}/Doncky") |
876 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doncky/data/Doncky.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Doncky/data/Doncky.conf) |
877 | add_subdirectory (Doncky) |
878 | @@ -195,7 +312,7 @@ |
879 | |
880 | ############# DROP INDICATOR ################# |
881 | set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS}) |
882 | -set (VERSION_DROP_INDICATOR "1.1.3") |
883 | +set (VERSION_DROP_INDICATOR "1.1.4") |
884 | set (PACKAGE_DROP_INDICATOR "cd-drop_indicator") |
885 | set (drop_indicatordatadir "${pluginsdatadir}/drop-indicator") |
886 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/drop-indicator/data/drop_indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/drop-indicator/data/drop_indicator.conf) |
887 | @@ -203,7 +320,7 @@ |
888 | |
889 | ############# DUSTBIN ################# |
890 | set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS}) |
891 | -set (VERSION_DUSTBIN "2.3.0") |
892 | +set (VERSION_DUSTBIN "2.3.1") |
893 | set (PACKAGE_DUSTBIN "cd-dustbin") |
894 | set (dustbinuserdirname "dustbin") |
895 | set (dustbindatadir "${pluginsdatadir}/dustbin") |
896 | @@ -212,21 +329,23 @@ |
897 | |
898 | ############# FOLDERS ################# |
899 | set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS}) |
900 | -set (VERSION_FOLDERS "0.2.0") |
901 | +set (VERSION_FOLDERS "0.2.1") |
902 | set (PACKAGE_FOLDERS "cd-Folders") |
903 | set (foldersdatadir "${pluginsdatadir}/Folders") |
904 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf) |
905 | add_subdirectory (Folders) |
906 | |
907 | ############# GMENU ################# |
908 | -if (NOT "${enable_gmenu}" STREQUAL "no") |
909 | +set (with_gmenu "no") |
910 | +if (NOT "${enable-gmenu}" STREQUAL "no") |
911 | pkg_check_modules (GMENU_PACKAGE libgnome-menu) |
912 | if ("${GMENU_PACKAGE_FOUND}" STREQUAL "") |
913 | message (STATUS "Could not find libgnome-menu; Cairo-Dock won't be built with GMenu applet.") |
914 | else() |
915 | set (GETTEXT_GMENU ${GETTEXT_PLUGINS}) |
916 | - set (VERSION_GMENU "1.1.5") |
917 | + set (VERSION_GMENU "1.1.6") |
918 | set (PACKAGE_GMENU "cd-GMenu") |
919 | + set (with_gmenu "yes") |
920 | set (gmenudatadir "${pluginsdatadir}/GMenu") |
921 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/GMenu/data/GMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/GMenu/data/GMenu.conf) |
922 | add_subdirectory ("GMenu") |
923 | @@ -238,26 +357,30 @@ |
924 | add_subdirectory (gvfs-integration) |
925 | |
926 | ############# GNOME-INTEGRATION ################# |
927 | -if (NOT "${enable_gnome_integration}" STREQUAL "no") |
928 | +set (with_gnome_integration "no") |
929 | +if (NOT "${enable-gnome-integration}" STREQUAL "no") |
930 | pkg_check_modules (GNOME_INTEGRATION gio-2.0) |
931 | if ("${GNOME_INTEGRATION_FOUND}" STREQUAL "") |
932 | message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.") |
933 | else() |
934 | - set (VERSION_GNOME_INTEGRATION "1.0.2") |
935 | + set (VERSION_GNOME_INTEGRATION "1.0.3") |
936 | set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration") |
937 | + set (with_gnome_integration "yes") |
938 | set (gnome_integrationdatadir "${pluginsdatadir}/gnome-integration") |
939 | add_subdirectory ("gnome-integration") |
940 | endif() |
941 | endif() |
942 | |
943 | ############# GNOME-INTEGRATION-OLD ################# |
944 | -if ("${enable_old_gnome_integration}" STREQUAL "yes") |
945 | +set (with_gnome_integration_old "no") |
946 | +if ("${enable-old-gnome-integration}" STREQUAL "yes") |
947 | pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0) |
948 | if ("${OLD_GNOME_INTEGRATION_FOUND}" STREQUAL "") |
949 | message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.") |
950 | else() |
951 | - set (VERSION_GNOME_INTEGRATION_OLD "1.0.3") |
952 | + set (VERSION_GNOME_INTEGRATION_OLD "1.0.4") |
953 | set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old") |
954 | + set (with_gnome_integration_old "yes") |
955 | set (gnome_integration_olddatadir "${pluginsdatadir}/gnome-integration-old") |
956 | add_subdirectory ("gnome-integration-old") |
957 | endif() |
958 | @@ -265,48 +388,82 @@ |
959 | |
960 | ############# ICON EFFECT ################# |
961 | set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS}) |
962 | -set (VERSION_ICON_EFFECTS "1.2.3") |
963 | +set (VERSION_ICON_EFFECTS "1.2.4") |
964 | set (PACKAGE_ICON_EFFECTS "cd-icon-effect") |
965 | set (icon_effectsdatadir "${pluginsdatadir}/icon-effect") |
966 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf) |
967 | add_subdirectory (icon-effect) |
968 | |
969 | ############# INDICATOR-APPLET ################# |
970 | -pkg_check_modules (DBUSMENU dbusmenu-glib) |
971 | -pkg_check_modules (INDICATOR_APPLET indicator libido-0.1 dbusmenu-gtk) |
972 | -if (NOT "${INDICATOR_APPLET_FOUND}" STREQUAL "" AND NOT "${DBUSMENU_FOUND}" STREQUAL "") |
973 | +# Note: the names of dbusmenu-glib and dbusmenu-gtk have changed... |
974 | +pkg_check_modules (DBUSMENU_04 QUIET dbusmenu-glib-0.4) |
975 | +pkg_check_modules (DBUSMENU_GTK_04 QUIET dbusmenu-gtk-0.4) |
976 | +pkg_check_modules (INDICATOR_APPLET indicator libido-0.1) |
977 | +if ("${DBUSMENU_04_FOUND}" STREQUAL "1") |
978 | + pkg_check_modules (DBUSMENU dbusmenu-glib-0.4) |
979 | +else() |
980 | + pkg_check_modules (DBUSMENU dbusmenu-glib) |
981 | +endif() |
982 | +if ("${DBUSMENU_GTK_04_FOUND}" STREQUAL "1") |
983 | + pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk-0.4) |
984 | +else() |
985 | + pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk) |
986 | +endif() |
987 | +if ("${INDICATOR_APPLET_FOUND}" STREQUAL "1" AND "${DBUSMENU_FOUND}" STREQUAL "1" AND "${DBUSMENU_GTK_FOUND}" STREQUAL "1") |
988 | + message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}") |
989 | + |
990 | + STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}") |
991 | + message (STATUS "DBUSMENU_MAJOR : ${DBUSMENU_MAJOR}") |
992 | + |
993 | + STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7 |
994 | + STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}") |
995 | + message (STATUS "DBUSMENU_MINOR : ${DBUSMENU_MINOR}") |
996 | + |
997 | + STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}") |
998 | + STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}") |
999 | + message (STATUS "DBUSMENU_NANO : ${DBUSMENU_NANO}") |
1000 | + |
1001 | + execute_process( |
1002 | + COMMAND pkg-config --variable=iconsdir indicator |
1003 | + OUTPUT_VARIABLE INDICATORICONSDIR) |
1004 | + STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR ${INDICATORICONSDIR}) # la commande rajoute un retour chariot ... |
1005 | add_subdirectory (Indicator-applet) |
1006 | + set (with_indicator "yes") |
1007 | endif() |
1008 | |
1009 | ############# ILLUSION ################# |
1010 | set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS}) |
1011 | -set (VERSION_ILLUSION "1.0.6") |
1012 | +set (VERSION_ILLUSION "1.0.7") |
1013 | set (PACKAGE_ILLUSION "cd-illusion") |
1014 | set (illusiondatadir "${pluginsdatadir}/illusion") |
1015 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/illusion/data/illusion.conf.in ${CMAKE_CURRENT_BINARY_DIR}/illusion/data/illusion.conf) |
1016 | add_subdirectory (illusion) |
1017 | |
1018 | ############# KDE-INTEGRATION ################# |
1019 | -if (NOT "${enable_kde_integration}" STREQUAL "no") |
1020 | +set (with_kde_integration "no") |
1021 | +if (NOT "${enable-kde-integration}" STREQUAL "no") |
1022 | pkg_check_modules (KDE_INTEGRATION gio-2.0) |
1023 | if ("${KDE_INTEGRATION_FOUND}" STREQUAL "") |
1024 | message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.") |
1025 | else() |
1026 | - set (VERSION_KDE_INTEGRATION "0.0.1") |
1027 | + set (VERSION_KDE_INTEGRATION "0.0.2") |
1028 | set (PACKAGE_KDE_INTEGRATION "cd_kde-integration") |
1029 | + set (with_kde_integration "yes") |
1030 | set (kde_integrationdatadir "${pluginsdatadir}/kde-integration") |
1031 | add_subdirectory ("kde-integration") |
1032 | endif() |
1033 | endif() |
1034 | |
1035 | ############# KEYBOARD_INDICATOR ################# |
1036 | +set (with_keyboard_indicator "no") |
1037 | pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier) |
1038 | if ("${KEYBOARD_INDICATOR_PACKAGE_FOUND}" STREQUAL "") |
1039 | message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.") |
1040 | else() |
1041 | set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS}) |
1042 | - set (VERSION_KEYBOARD_INDICATOR "1.1.2") |
1043 | + set (VERSION_KEYBOARD_INDICATOR "1.1.3") |
1044 | set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator") |
1045 | + set (with_keyboard_indicator "yes") |
1046 | set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator") |
1047 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/keyboard-indicator/data/keyboard-indicator.conf.in ${CMAKE_CURRENT_BINARY_DIR}/keyboard-indicator/data/keyboard-indicator.conf) |
1048 | add_subdirectory ("keyboard-indicator") |
1049 | @@ -314,13 +471,14 @@ |
1050 | |
1051 | ############# LOGOUT ################# |
1052 | set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS}) |
1053 | -set (VERSION_LOGOUT "1.2.9") |
1054 | +set (VERSION_LOGOUT "1.2.10") |
1055 | set (PACKAGE_LOGOUT "cd-logout") |
1056 | set (logoutdatadir "${pluginsdatadir}/logout") |
1057 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf) |
1058 | add_subdirectory (logout) |
1059 | |
1060 | ############# MAIL ################# |
1061 | +set (with_mail "no") |
1062 | # find the compilation flags |
1063 | execute_process( |
1064 | COMMAND libetpan-config --cflags |
1065 | @@ -351,41 +509,33 @@ |
1066 | message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}") |
1067 | message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}") |
1068 | set (GETTEXT_MAIL ${GETTEXT_PLUGINS}) |
1069 | - set (VERSION_MAIL "1.0.6") |
1070 | + set (VERSION_MAIL "1.0.8") |
1071 | set (PACKAGE_MAIL "cd-mail") |
1072 | set (maildatadir "${pluginsdatadir}/mail") |
1073 | + set (with_mail "yes") |
1074 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mail/data/mail.conf.in ${CMAKE_CURRENT_BINARY_DIR}/mail/data/mail.conf) |
1075 | add_subdirectory ("mail") |
1076 | endif() |
1077 | |
1078 | ############# MEMENU ################# |
1079 | -if (NOT "${INDICATOR_APPLET_FOUND}" STREQUAL "" AND NOT "${DBUSMENU_FOUND}" STREQUAL "") |
1080 | - message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}") |
1081 | - |
1082 | - STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}") |
1083 | - message (STATUS "DBUSMENU_MAJOR : ${DBUSMENU_MAJOR}") |
1084 | - |
1085 | - STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7 |
1086 | - STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}") |
1087 | - message (STATUS "DBUSMENU_MINOR : ${DBUSMENU_MINOR}") |
1088 | - |
1089 | - STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}") |
1090 | - STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}") |
1091 | - message (STATUS "DBUSMENU_NANO : ${DBUSMENU_NANO}") |
1092 | - |
1093 | +set (with_me_menu "no") |
1094 | +if ("${with_indicator}" STREQUAL "yes") |
1095 | set (GETTEXT_MEMENU ${GETTEXT_PLUGINS}) |
1096 | - set (VERSION_MEMENU "1.0.0") |
1097 | + set (VERSION_MEMENU "1.0.1") |
1098 | set (PACKAGE_MEMENU "cd-MeMenu") |
1099 | set (memenudatadir "${pluginsdatadir}/MeMenu") |
1100 | + set (with_me_menu "yes") |
1101 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/MeMenu/data/MeMenu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/MeMenu/data/MeMenu.conf) |
1102 | add_subdirectory (MeMenu) |
1103 | endif() |
1104 | |
1105 | ############# MESSAGING_MENU ################# |
1106 | -if (NOT "${INDICATOR_APPLET_FOUND}" STREQUAL "" AND NOT "${DBUSMENU_FOUND}" STREQUAL "") |
1107 | +set (with_messaging_menu "no") |
1108 | +if ("${with_indicator}" STREQUAL "yes") |
1109 | set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS}) |
1110 | - set (VERSION_MESSAGING_MENU "0.0.1") |
1111 | + set (VERSION_MESSAGING_MENU "1.0.1") |
1112 | set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu") |
1113 | + set (with_messaging_menu "yes") |
1114 | set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu") |
1115 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Messaging-Menu/data/Messaging-Menu.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Messaging-Menu/data/Messaging-Menu.conf) |
1116 | add_subdirectory (Messaging-Menu) |
1117 | @@ -393,7 +543,7 @@ |
1118 | |
1119 | ############# MOTION BLUR ################# |
1120 | set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS}) |
1121 | -set (VERSION_MOTION_BLUR "1.0.3") |
1122 | +set (VERSION_MOTION_BLUR "1.0.4") |
1123 | set (PACKAGE_MOTION_BLUR "cd-motion_blur") |
1124 | set (motion_blurdatadir "${pluginsdatadir}/motion-blur") |
1125 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/motion-blur/data/motion_blur.conf.in ${CMAKE_CURRENT_BINARY_DIR}/motion-blur/data/motion_blur.conf) |
1126 | @@ -401,7 +551,7 @@ |
1127 | |
1128 | ############# MUSICPLAYER ################# |
1129 | set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS}) |
1130 | -set (VERSION_MUSICPLAYER "1.0.6") |
1131 | +set (VERSION_MUSICPLAYER "1.0.7") |
1132 | set (PACKAGE_MUSICPLAYER "cd-musicPlayer") |
1133 | set (musicplayerdatadir "${pluginsdatadir}/musicPlayer") |
1134 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf) |
1135 | @@ -409,17 +559,19 @@ |
1136 | |
1137 | ############# NETSPEED ################# |
1138 | set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS}) |
1139 | -set (VERSION_NETSPEED "1.2.4") |
1140 | +set (VERSION_NETSPEED "1.2.5") |
1141 | set (PACKAGE_NETSPEED "cd-netspeed") |
1142 | set (netspeeddatadir "${pluginsdatadir}/netspeed") |
1143 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf) |
1144 | add_subdirectory (netspeed) |
1145 | |
1146 | ############# NETWORK_MONITOR ################# |
1147 | +set (with_network_monitor "no") |
1148 | if ("${enable-network-monitor}" STREQUAL "yes") |
1149 | set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS}) |
1150 | - set (VERSION_NETWORK_MONITOR "0.2.2") |
1151 | + set (VERSION_NETWORK_MONITOR "0.2.3") |
1152 | set (PACKAGE_NETWORK_MONITOR "cd-network-monitor") |
1153 | + set (with_network_monitor "yes") |
1154 | set (network_monitordatadir "${pluginsdatadir}/Network-Monitor") |
1155 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Network-Monitor/data/Network-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Network-Monitor/data/Network-Monitor.conf) |
1156 | add_subdirectory (Network-Monitor) |
1157 | @@ -427,7 +579,7 @@ |
1158 | |
1159 | ############# POWERMANAGER ################# |
1160 | set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS}) |
1161 | -set (VERSION_POWERMANAGER "1.3.3") |
1162 | +set (VERSION_POWERMANAGER "1.3.4") |
1163 | set (PACKAGE_POWERMANAGER "cd-powermanager") |
1164 | set (powermanagerdatadir "${pluginsdatadir}/powermanager") |
1165 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf) |
1166 | @@ -435,25 +587,50 @@ |
1167 | |
1168 | ############# QUICK BROWSER ################# |
1169 | set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS}) |
1170 | -set (VERSION_QUICK_BROWSER "1.0.7") |
1171 | +set (VERSION_QUICK_BROWSER "1.0.8") |
1172 | set (PACKAGE_QUICK_BROWSER "cd-quick-browser") |
1173 | set (quick_browserdatadir "${pluginsdatadir}/quick_browser") |
1174 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf) |
1175 | add_subdirectory (quick-browser) |
1176 | |
1177 | +############# RECENT-EVENTS ################# |
1178 | +set (with_recent_events "no") |
1179 | +pkg_check_modules (RECENT_EVENTS zeitgeist-1.0) |
1180 | +if ("${RECENT_EVENTS_FOUND}" STREQUAL "") |
1181 | + message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.") |
1182 | +else() |
1183 | + set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS}) |
1184 | + set (VERSION_RECENT_EVENTS "0.0.2") |
1185 | + set (PACKAGE_RECENT_EVENTS "cd-Recent-Events") |
1186 | + set (with_recent_events "yes") |
1187 | + set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events") |
1188 | + configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Recent-Events/data/Recent-Events.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Recent-Events/data/Recent-Events.conf) |
1189 | + add_subdirectory ("Recent-Events") |
1190 | +endif() |
1191 | + |
1192 | +############# REMOTE_CONTROL ################# |
1193 | +set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS}) |
1194 | +set (VERSION_REMOTE_CONTROL "0.0.2") |
1195 | +set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control") |
1196 | +set (remote_controldatadir "${pluginsdatadir}/Remote-Control") |
1197 | +configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Remote-Control/data/Remote-Control.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Remote-Control/data/Remote-Control.conf) |
1198 | +add_subdirectory (Remote-Control) |
1199 | + |
1200 | ############# RSSREADER ################# |
1201 | set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS}) |
1202 | -set (VERSION_RSS_READER "1.0.2") |
1203 | +set (VERSION_RSS_READER "1.0.3") |
1204 | set (PACKAGE_RSS_READER "cd-rssreader") |
1205 | set (rss_readerdatadir "${pluginsdatadir}/RSSreader") |
1206 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf) |
1207 | add_subdirectory (RSSreader) |
1208 | |
1209 | ############# SCOOBY_DO ################# |
1210 | +set (with_scooby_do "no") |
1211 | if ("${enable-scooby-do}" STREQUAL "yes") |
1212 | set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS}) |
1213 | - set (VERSION_SCOOBY_DO "0.1.0") |
1214 | + set (VERSION_SCOOBY_DO "0.1.1") |
1215 | set (PACKAGE_SCOOBY_DO "cd-scooby-do") |
1216 | + set (with_scooby_do "yes") |
1217 | set (scooby_dodatadir "${pluginsdatadir}/Scooby-Do") |
1218 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Scooby-Do/data/Scooby-Do.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Scooby-Do/data/Scooby-Do.conf) |
1219 | add_subdirectory (Scooby-Do) |
1220 | @@ -461,19 +638,21 @@ |
1221 | |
1222 | ############# SHORTCUTS ################# |
1223 | set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS}) |
1224 | -set (VERSION_SHORTCUTS "1.3.0") |
1225 | +set (VERSION_SHORTCUTS "1.3.1") |
1226 | set (PACKAGE_SHORTCUTS "cd-shortcuts") |
1227 | set (shortcutsdatadir "${pluginsdatadir}/shortcuts") |
1228 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf) |
1229 | add_subdirectory (shortcuts) |
1230 | |
1231 | ############# SHOW DESKTOP ################# |
1232 | +set (with_xrandr "yes") |
1233 | pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr) |
1234 | if ("${SHOW_DESKTOP_XRANDR_FOUND}" STREQUAL "") |
1235 | message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.") |
1236 | + set (with_xrandr "no") |
1237 | endif() |
1238 | set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS}) |
1239 | -set (VERSION_SHOW_DESKTOP "1.2.2") |
1240 | +set (VERSION_SHOW_DESKTOP "1.2.3") |
1241 | set (PACKAGE_SHOW_DESKTOP "cd-showDesktop") |
1242 | set (show_desktopdatadir "${pluginsdatadir}/showDesktop") |
1243 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf) |
1244 | @@ -481,19 +660,21 @@ |
1245 | |
1246 | ############# SHOW MOUSE ################# |
1247 | set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS}) |
1248 | -set (VERSION_SHOW_MOUSE "1.0.3") |
1249 | +set (VERSION_SHOW_MOUSE "1.0.4") |
1250 | set (PACKAGE_SHOW_MOUSE "cd-show_mouse") |
1251 | set (show_mousedatadir "${pluginsdatadir}/show_mouse") |
1252 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/show-mouse/data/show_mouse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/show-mouse/data/show_mouse.conf) |
1253 | add_subdirectory (show-mouse) |
1254 | |
1255 | ############# SLIDER ################# |
1256 | +set (with_exif "yes") |
1257 | pkg_check_modules (EXIF libexif) |
1258 | if ("${EXIF_FOUND}" STREQUAL "") |
1259 | message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.") |
1260 | + set (with_exif "no") |
1261 | endif() |
1262 | set (GETTEXT_SLIDER ${GETTEXT_PLUGINS}) |
1263 | -set (VERSION_SLIDER "2.0.6") |
1264 | +set (VERSION_SLIDER "2.0.8") |
1265 | set (PACKAGE_SLIDER "cd-slider") |
1266 | set (sliderdatadir "${pluginsdatadir}/slider") |
1267 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf) |
1268 | @@ -501,21 +682,22 @@ |
1269 | |
1270 | ############# STACK ################# |
1271 | set (GETTEXT_STACK ${GETTEXT_PLUGINS}) |
1272 | -set (VERSION_STACK "0.3.0") |
1273 | +set (VERSION_STACK "0.3.1") |
1274 | set (PACKAGE_STACK "cd-stack") |
1275 | set (stackdatadir "${pluginsdatadir}/stack") |
1276 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf) |
1277 | add_subdirectory (stack) |
1278 | |
1279 | ############# STATUS NOTIFIER ################# |
1280 | +set (with_status_notifier "no") |
1281 | if ("${enable-status-notifier}" STREQUAL "yes") |
1282 | - pkg_check_modules (STATUS_NOTIFIER dbusmenu-gtk) |
1283 | - if ("${STATUS_NOTIFIER_FOUND}" STREQUAL "") |
1284 | + if ("${DBUSMENU_GTK_FOUND}" STREQUAL "") |
1285 | message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.") |
1286 | else() |
1287 | set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS}) |
1288 | - set (VERSION_STATUS_NOTIFIER "0.1.0") |
1289 | + set (VERSION_STATUS_NOTIFIER "0.1.1") |
1290 | set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier") |
1291 | + set (with_status_notifier "yes") |
1292 | set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier") |
1293 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Status-Notifier/data/Status-Notifier.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Status-Notifier/data/Status-Notifier.conf) |
1294 | add_subdirectory (Status-Notifier) |
1295 | @@ -524,15 +706,21 @@ |
1296 | |
1297 | ############# SWITCHER ################# |
1298 | set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS}) |
1299 | -set (VERSION_SWITCHER "2.1.4") |
1300 | +set (VERSION_SWITCHER "2.1.5") |
1301 | set (PACKAGE_SWITCHER "cd-switcher") |
1302 | set (switcherdatadir "${pluginsdatadir}/switcher") |
1303 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf) |
1304 | add_subdirectory (switcher) |
1305 | |
1306 | ############# SYSTEM MONITOR ################# |
1307 | +set (with_sensors "yes") |
1308 | +find_package (Sensors) |
1309 | +if (NOT "${SENSORS_FOUND}" STREQUAL "TRUE") |
1310 | + message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.") |
1311 | + set (with_sensors "no") |
1312 | +endif() |
1313 | set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS}) |
1314 | -set (VERSION_SYSTEM_MONITOR "1.0.5") |
1315 | +set (VERSION_SYSTEM_MONITOR "1.0.6") |
1316 | set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor") |
1317 | set (system_monitordatadir "${pluginsdatadir}/System-monitor") |
1318 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf) |
1319 | @@ -540,7 +728,7 @@ |
1320 | |
1321 | ############# SYSTRAY ################# |
1322 | set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS}) |
1323 | -set (VERSION_SYSTRAY "0.2.1") |
1324 | +set (VERSION_SYSTRAY "0.2.2") |
1325 | set (PACKAGE_SYSTRAY "cd-systray") |
1326 | set (systraydatadir "${pluginsdatadir}/systray") |
1327 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf) |
1328 | @@ -550,18 +738,20 @@ |
1329 | pkg_check_modules (TERMINAL_PACKAGE vte) |
1330 | if ("${TERMINAL_PACKAGE_FOUND}" STREQUAL "") |
1331 | message (STATUS "Could not find libvte; Cairo-Dock won't be built with terminal applet.") |
1332 | + set (with_terminal "no") |
1333 | else() |
1334 | set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS}) |
1335 | - set (VERSION_TERMINAL "1.0.9") |
1336 | + set (VERSION_TERMINAL "1.0.10") |
1337 | set (PACKAGE_TERMINAL "cd-terminal") |
1338 | + set (with_terminal "yes") |
1339 | set (terminaldatadir "${pluginsdatadir}/terminal") |
1340 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/terminal/data/terminal.conf.in ${CMAKE_CURRENT_BINARY_DIR}/terminal/data/terminal.conf) |
1341 | add_subdirectory (terminal) |
1342 | endif() |
1343 | |
1344 | -############# OY ################# |
1345 | +############# TOMBOY ################# |
1346 | set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS}) |
1347 | -set (VERSION_TOMBOY "1.3.0") |
1348 | +set (VERSION_TOMBOY "1.3.1") |
1349 | set (PACKAGE_TOMBOY "cd-tomboy") |
1350 | set (tomboydatadir "${pluginsdatadir}/tomboy") |
1351 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf) |
1352 | @@ -569,7 +759,7 @@ |
1353 | |
1354 | ############# TOONS ################# |
1355 | set (GETTEXT_TOONS ${GETTEXT_PLUGINS}) |
1356 | -set (VERSION_TOONS "1.0.7") |
1357 | +set (VERSION_TOONS "1.0.8") |
1358 | set (PACKAGE_TOONS "cd-Toons") |
1359 | set (toonsdatadir "${pluginsdatadir}/Toons") |
1360 | set (toonsuserdirname "Toons") |
1361 | @@ -578,7 +768,7 @@ |
1362 | |
1363 | ############# WEATHER ################# |
1364 | set (GETTEXT_WEATHER ${GETTEXT_PLUGINS}) |
1365 | -set (VERSION_WEATHER "1.2.9") |
1366 | +set (VERSION_WEATHER "1.2.10") |
1367 | set (PACKAGE_WEATHER "cd-weather") |
1368 | set (weatherdatadir "${pluginsdatadir}/weather") |
1369 | set (weatheruserdirname "weather") |
1370 | @@ -586,15 +776,17 @@ |
1371 | add_subdirectory (weather) |
1372 | |
1373 | ############# WEBLETS ################# |
1374 | -pkg_check_modules (WEBKIT webkit-1.0) |
1375 | -if (NOT "${enable_weblets}" STREQUAL "no") |
1376 | +set (with_weblets "no") |
1377 | +if (NOT "${enable-weblets}" STREQUAL "no") |
1378 | + pkg_check_modules (WEBKIT webkit-1.0) |
1379 | if ("${WEBKIT_FOUND}" STREQUAL "") |
1380 | message (STATUS "Could not find webkit-1.0; Cairo-Dock won't be built with Weblets applet.") |
1381 | else() |
1382 | set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS}) |
1383 | - set (VERSION_WEBLETS "0.0.9") |
1384 | + set (VERSION_WEBLETS "0.0.10") |
1385 | set (PACKAGE_WEBLETS "cd-weblets") |
1386 | set (webletsdatadir "${pluginsdatadir}/weblets") |
1387 | + set (with_weblets "yes") |
1388 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/weblets/data/weblets.conf.in ${CMAKE_CURRENT_BINARY_DIR}/weblets/data/weblets.conf) |
1389 | add_subdirectory ("weblets") |
1390 | endif() |
1391 | @@ -602,21 +794,23 @@ |
1392 | |
1393 | ############# WIFI ################# |
1394 | set (GETTEXT_WIFI ${GETTEXT_PLUGINS}) |
1395 | -set (VERSION_WIFI "1.2.5") |
1396 | +set (VERSION_WIFI "1.2.6") |
1397 | set (PACKAGE_WIFI "cd-wifi") |
1398 | set (wifidatadir "${pluginsdatadir}/wifi") |
1399 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf) |
1400 | add_subdirectory (wifi) |
1401 | |
1402 | ############# XFCE-INTEGRATION ################# |
1403 | -if (NOT "${enable_xfce_integration}" STREQUAL "no") |
1404 | +set (with_xfce_integration "no") |
1405 | +if (NOT "${enable-xfce-integration}" STREQUAL "no") |
1406 | pkg_check_modules (XFCE_INTEGRATION_THUNAR thunar-vfs-1) |
1407 | pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0) |
1408 | if ("${XFCE_INTEGRATION_THUNAR_FOUND}" STREQUAL "" AND "${XFCE_INTEGRATION_GVFS_FOUND}" STREQUAL "") |
1409 | message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.") |
1410 | else() |
1411 | - set (VERSION_XFCE_INTEGRATION "1.0.2") |
1412 | + set (VERSION_XFCE_INTEGRATION "1.0.3") |
1413 | set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration") |
1414 | + set (with_xfce_integration "yes") |
1415 | set (xfce_integrationdatadir "${pluginsdatadir}/xfce-integration") |
1416 | add_subdirectory ("xfce-integration") |
1417 | endif() |
1418 | @@ -626,23 +820,53 @@ |
1419 | pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm) |
1420 | if ("${XGAMMA_PACKAGE_FOUND}" STREQUAL "") |
1421 | message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.") |
1422 | + set (with_xgamma "no") |
1423 | else() |
1424 | set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS}) |
1425 | - set (VERSION_XGAMMA "1.1.5") |
1426 | + set (VERSION_XGAMMA "1.2.0") |
1427 | set (PACKAGE_XGAMMA "cd-Xgamma") |
1428 | + set (with_xgamma "yes") |
1429 | set (xgammadatadir "${pluginsdatadir}/Xgamma") |
1430 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Xgamma/data/Xgamma.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Xgamma/data/Xgamma.conf) |
1431 | add_subdirectory ("Xgamma") |
1432 | endif() |
1433 | |
1434 | +message ("") |
1435 | +message (STATUS "===============") |
1436 | +message (STATUS "Language build:") |
1437 | +message (STATUS "===============") |
1438 | +message ("") |
1439 | add_subdirectory (po) |
1440 | |
1441 | -############# REMOTE_CONTROL ################# |
1442 | -if ("${enable_remote_control}" STREQUAL "yes") |
1443 | - set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS}) |
1444 | - set (VERSION_REMOTE_CONTROL "0.0.1") |
1445 | - set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control") |
1446 | - set (remote_controldatadir "${pluginsdatadir}/Remote-Control") |
1447 | - configure_file (Remote-Control/data/Remote-Control.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/Remote-Control/data/Remote-Control.conf) |
1448 | - add_subdirectory (Remote-Control) |
1449 | -endif() |
1450 | +message ("") |
1451 | +message (STATUS "===============") |
1452 | +message (STATUS "Plug-ins build:") |
1453 | +message (STATUS "===============") |
1454 | +message ("") |
1455 | +message (STATUS " - with Alsa-Mixer applet: ${with_alsa}") |
1456 | +message (STATUS " - with iCal support: ${with_ical}") |
1457 | +message (STATUS " - with Disks applet: ${with_disks}") |
1458 | +message (STATUS " - with Doncky applet: ${with_doncky}") |
1459 | +message (STATUS " - with GMenu applet: ${with_gmenu}") |
1460 | +message (STATUS " - with Gnome support: ${with_gnome_integration}") |
1461 | +message (STATUS " - with old Gnome support: ${with_gnome_integration_old}") |
1462 | +message (STATUS " - with KDE support: ${with_kde_integration}") |
1463 | +message (STATUS " - with XFCE support: ${with_xfce_integration}") |
1464 | +message (STATUS " - with Keyboard-indicator applet: ${with_keyboard_indicator}") |
1465 | +message (STATUS " - with Mail applet: ${with_mail}") |
1466 | +message (STATUS " - with Me-Menu applet: ${with_me_menu}") |
1467 | +message (STATUS " - with Messaging-Menu: ${with_messaging_menu}") |
1468 | +message (STATUS " - with Network-Monitor applet: ${with_network_monitor}") |
1469 | +message (STATUS " - with Scooby-Do applet: ${with_scooby_do}") |
1470 | +message (STATUS " - with Screen Resolution support: ${with_xrandr}") |
1471 | +message (STATUS " - with Status-Notifier applet: ${with_status_notifier}") |
1472 | +message (STATUS " - with Sensors support: ${with_sensors}") |
1473 | +message (STATUS " - with Terminal applet: ${with_terminal}") |
1474 | +message (STATUS " - with Weblets applet: ${with_weblets}") |
1475 | +message (STATUS " - with Xgamma applet: ${with_xgamma}") |
1476 | +message (STATUS " - with Recent-Events applet: ${with_recent_events}") |
1477 | +message (STATUS " - with Python interface: ${with_python}") |
1478 | +message (STATUS " - with Ruby interface: ${with_ruby}") |
1479 | +message (STATUS " - with Mono interface: ${with_mono}") |
1480 | +message (STATUS " - with Vala interface: ${with_vala}") |
1481 | +message (STATUS " - with Vala Translator (valac) : ${with_valac}") |
1482 | |
1483 | === modified file 'Cairo-Penguin/data/Cairo-Penguin.conf.in' |
1484 | --- Cairo-Penguin/data/Cairo-Penguin.conf.in 2010-09-07 00:39:20 +0000 |
1485 | +++ Cairo-Penguin/data/Cairo-Penguin.conf.in 2011-03-17 14:49:16 +0000 |
1486 | @@ -2,16 +2,25 @@ |
1487 | |
1488 | #[gtk-about] |
1489 | [Icon] |
1490 | + |
1491 | +#F[Applet] |
1492 | +frame_maininfo= |
1493 | + |
1494 | +#d Name of the dock it belongs to: |
1495 | +dock name = |
1496 | + |
1497 | +#s Name of the icon as it will appear in its caption in the dock: |
1498 | +name = |
1499 | + |
1500 | +#F[Display] |
1501 | +frame_display= |
1502 | + |
1503 | +icon = |
1504 | + |
1505 | #j+[0;128] Icon size for busy penguin: |
1506 | #{Set to 0 to use the default applet size} |
1507 | icon size = 0;0 |
1508 | |
1509 | -#s Icon name for busy penguin: |
1510 | -name = |
1511 | - |
1512 | -#d Name of the dock it belongs to: |
1513 | -dock name = |
1514 | - |
1515 | order = |
1516 | |
1517 | #F[Applet's Handbook] |
1518 | @@ -25,7 +34,7 @@ |
1519 | #h+[@cairo_penguindatadir@/themes;@cairo_penguinuserdirname@;Cairo-Penguin] Choose one of the available themes:/ |
1520 | theme = Classic |
1521 | |
1522 | -#i Delay between animation changes : |
1523 | +#i[4;30] Delay between animation changes : |
1524 | #{in seconds.} |
1525 | change delay = 8 |
1526 | |
1527 | |
1528 | === modified file 'Cairo-Penguin/src/applet-animation.c' |
1529 | --- Cairo-Penguin/src/applet-animation.c 2010-08-07 01:43:25 +0000 |
1530 | +++ Cairo-Penguin/src/applet-animation.c 2011-03-17 14:49:16 +0000 |
1531 | @@ -201,7 +201,7 @@ |
1532 | cairo_dock_get_icon_extent (myIcon, myContainer, &iIconWidth, &iIconHeight); |
1533 | |
1534 | g_return_if_fail (pAnimation->iTexture != 0); |
1535 | - double f = (1 + g_fAmplitude) / fScale; |
1536 | + double f = (1 + myIconsParam.fAmplitude) / fScale; |
1537 | double x, y; // centre du pingouin, en coordonnées absolues. |
1538 | x = myData.iCurrentPositionX - iXMin - iIconWidth/2 + pAnimation->iFrameWidth/2*f; |
1539 | y = myData.iCurrentPositionY + pAnimation->iFrameHeight/2*f; |
1540 | @@ -235,7 +235,7 @@ |
1541 | if (pSurface != NULL) |
1542 | { |
1543 | cairo_save (myDrawContext); |
1544 | - cairo_scale (myDrawContext, (1 + g_fAmplitude) / fScale, (1 + g_fAmplitude) / fScale); |
1545 | + cairo_scale (myDrawContext, (1 + myIconsParam.fAmplitude) / fScale, (1 + myIconsParam.fAmplitude) / fScale); |
1546 | cairo_set_source_surface ( |
1547 | myDrawContext, |
1548 | pSurface, |
1549 | @@ -308,9 +308,9 @@ |
1550 | } |
1551 | } |
1552 | |
1553 | - if (myData.iCurrentPositionY < (myConfig.bFree ? myBackground.iDockLineWidth + myConfig.iGroundOffset : 0)) |
1554 | + if (myData.iCurrentPositionY < (myConfig.bFree ? myDocksParam.iDockLineWidth + myConfig.iGroundOffset : 0)) |
1555 | { |
1556 | - myData.iCurrentPositionY = (myConfig.bFree ? myBackground.iDockLineWidth + myConfig.iGroundOffset : 0); |
1557 | + myData.iCurrentPositionY = (myConfig.bFree ? myDocksParam.iDockLineWidth + myConfig.iGroundOffset : 0); |
1558 | } |
1559 | else if (myData.iCurrentPositionY + pAnimation->iFrameHeight > iHeight) |
1560 | { |
1561 | @@ -340,7 +340,7 @@ |
1562 | cairo_surface_destroy (myIcon->pReflectionBuffer); |
1563 | myIcon->pReflectionBuffer = NULL; |
1564 | } |
1565 | - if (CAIRO_DOCK_CONTAINER_IS_OPENGL (myContainer)) |
1566 | + if (CAIRO_DOCK_CONTAINER_IS_OPENGL (myContainer)) |
1567 | cairo_dock_update_icon_texture (myIcon); |
1568 | } |
1569 | else // on reste sur la derniere image de l'animation de fin. |
1570 | @@ -484,7 +484,7 @@ |
1571 | myData.iCurrentDirection = g_random_int_range (0, 2); // [a;b[ |
1572 | else |
1573 | myData.iCurrentDirection = 0; |
1574 | - myData.iCurrentPositionY = (myConfig.bFree ? myBackground.iDockLineWidth + myConfig.iGroundOffset : 0); |
1575 | + myData.iCurrentPositionY = (myConfig.bFree ? myDocksParam.iDockLineWidth + myConfig.iGroundOffset : 0); |
1576 | } |
1577 | else // la direction reste la meme. |
1578 | { |
1579 | @@ -533,12 +533,12 @@ |
1580 | penguin_remove_notfications(); |
1581 | if (myConfig.bFree) |
1582 | { |
1583 | - cairo_dock_register_notification_on_container (myContainer, CAIRO_DOCK_UPDATE_DOCK_SLOW, (CairoDockNotificationFunc) penguin_update_container, CAIRO_DOCK_RUN_AFTER, myApplet); |
1584 | - cairo_dock_register_notification_on_container (myContainer, CAIRO_DOCK_RENDER_DOCK, (CairoDockNotificationFunc) penguin_render_on_container, CAIRO_DOCK_RUN_AFTER, myApplet); |
1585 | + cairo_dock_register_notification_on_object (myContainer, NOTIFICATION_UPDATE_DOCK_SLOW, (CairoDockNotificationFunc) penguin_update_container, CAIRO_DOCK_RUN_AFTER, myApplet); |
1586 | + cairo_dock_register_notification_on_object (myContainer, NOTIFICATION_RENDER_DOCK, (CairoDockNotificationFunc) penguin_render_on_container, CAIRO_DOCK_RUN_AFTER, myApplet); |
1587 | } |
1588 | else |
1589 | { |
1590 | - cairo_dock_register_notification_on_icon (myIcon, CAIRO_DOCK_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) penguin_update_icon, CAIRO_DOCK_RUN_AFTER, myApplet); |
1591 | + cairo_dock_register_notification_on_object (myIcon, NOTIFICATION_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) penguin_update_icon, CAIRO_DOCK_RUN_AFTER, myApplet); |
1592 | } |
1593 | } |
1594 | |
1595 | @@ -554,7 +554,7 @@ |
1596 | |
1597 | if (myConfig.bFree) // attention : c'est un hack moyen; il faudrait pouvoir indiquer a cairo-dock de ne pas inserer notre icone... |
1598 | { |
1599 | - cairo_dock_detach_icon_from_dock (myIcon, myDock, myIcons.iSeparateIcons); |
1600 | + cairo_dock_detach_icon_from_dock (myIcon, myDock, myIconsParam.iSeparateIcons); |
1601 | cairo_dock_update_dock_size (myDock); |
1602 | } |
1603 | else |
1604 | |
1605 | === modified file 'Cairo-Penguin/src/applet-animation.h' |
1606 | --- Cairo-Penguin/src/applet-animation.h 2009-10-05 19:27:17 +0000 |
1607 | +++ Cairo-Penguin/src/applet-animation.h 2011-03-17 14:49:16 +0000 |
1608 | @@ -29,9 +29,9 @@ |
1609 | #define penguin_is_resting(pAnimation) ((pAnimation) == NULL || (pAnimation)->iNbFrames <= 1 && (pAnimation)->iSpeed == 0) |
1610 | |
1611 | #define penguin_remove_notfications() do {\ |
1612 | - cairo_dock_remove_notification_func_on_icon (myIcon, CAIRO_DOCK_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) penguin_update_icon, myApplet);\ |
1613 | - cairo_dock_remove_notification_func_on_container (CAIRO_CONTAINER (g_pMainDock), CAIRO_DOCK_UPDATE_DOCK_SLOW, (CairoDockNotificationFunc) penguin_update_container, myApplet);\ |
1614 | - cairo_dock_remove_notification_func_on_container (CAIRO_CONTAINER (g_pMainDock), CAIRO_DOCK_RENDER_DOCK, (CairoDockNotificationFunc) penguin_render_on_container, myApplet); } while (0) |
1615 | + cairo_dock_remove_notification_func_on_object (myIcon, NOTIFICATION_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) penguin_update_icon, myApplet);\ |
1616 | + cairo_dock_remove_notification_func_on_object (myDock, NOTIFICATION_UPDATE_DOCK_SLOW, (CairoDockNotificationFunc) penguin_update_container, myApplet);\ |
1617 | + cairo_dock_remove_notification_func_on_object (myDock, NOTIFICATION_RENDER_DOCK, (CairoDockNotificationFunc) penguin_render_on_container, myApplet); } while (0) |
1618 | |
1619 | void penguin_move_in_dock (CairoDockModuleInstance *myApplet); |
1620 | gboolean penguin_render_on_container (CairoDockModuleInstance *myApplet, CairoContainer *pContainer, cairo_t *pCairoContext); |
1621 | |
1622 | === modified file 'Cairo-Penguin/src/applet-init.c' |
1623 | --- Cairo-Penguin/src/applet-init.c 2010-08-07 01:43:25 +0000 |
1624 | +++ Cairo-Penguin/src/applet-init.c 2011-03-17 14:49:16 +0000 |
1625 | @@ -47,23 +47,47 @@ |
1626 | |
1627 | penguin_start_animating_with_delay (myApplet); |
1628 | |
1629 | - cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON, |
1630 | + cairo_dock_register_notification_on_object (myContainer, |
1631 | + NOTIFICATION_CLICK_ICON, |
1632 | (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC, |
1633 | CAIRO_DOCK_RUN_FIRST, |
1634 | myApplet); |
1635 | - cairo_dock_register_notification (CAIRO_DOCK_MIDDLE_CLICK_ICON, |
1636 | + cairo_dock_register_notification_on_object (myContainer, |
1637 | + NOTIFICATION_MIDDLE_CLICK_ICON, |
1638 | (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC, |
1639 | CAIRO_DOCK_RUN_FIRST, |
1640 | myApplet); |
1641 | - CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT; |
1642 | + cairo_dock_register_notification_on_object (myContainer, |
1643 | + NOTIFICATION_BUILD_ICON_MENU, |
1644 | + (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC, |
1645 | + CAIRO_DOCK_RUN_FIRST, |
1646 | + myApplet); |
1647 | + cairo_dock_register_notification_on_object (myDock, |
1648 | + NOTIFICATION_STOP_DOCK, |
1649 | + (CairoDockNotificationFunc) cd_on_dock_destroyed, |
1650 | + CAIRO_DOCK_RUN_AFTER, |
1651 | + myApplet); |
1652 | CD_APPLET_INIT_END |
1653 | |
1654 | |
1655 | CD_APPLET_STOP_BEGIN |
1656 | //\_______________ On se desabonne de nos notifications. |
1657 | - CD_APPLET_UNREGISTER_FOR_CLICK_EVENT; |
1658 | - CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT; |
1659 | - CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT; |
1660 | + cairo_dock_remove_notification_func_on_object (myContainer, |
1661 | + NOTIFICATION_CLICK_ICON, |
1662 | + (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC, |
1663 | + myApplet); |
1664 | + cairo_dock_remove_notification_func_on_object (myContainer, |
1665 | + NOTIFICATION_MIDDLE_CLICK_ICON, |
1666 | + (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC, |
1667 | + myApplet); |
1668 | + cairo_dock_remove_notification_func_on_object (myContainer, |
1669 | + NOTIFICATION_BUILD_ICON_MENU, |
1670 | + (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC, |
1671 | + myApplet); |
1672 | + cairo_dock_remove_notification_func_on_object (myDock, |
1673 | + NOTIFICATION_STOP_DOCK, |
1674 | + (CairoDockNotificationFunc) cd_on_dock_destroyed, |
1675 | + myApplet); |
1676 | penguin_remove_notfications(); |
1677 | |
1678 | if (myData.iSidRestartDelayed != 0) |
1679 | @@ -94,7 +118,7 @@ |
1680 | area.x = (myDock->container.iWidth - myDock->fFlatDockWidth) / 2 + myData.iCurrentPositionX; |
1681 | area.y = myDock->container.iHeight - myData.iCurrentPositionY - pAnimation->iFrameHeight; |
1682 | area.width = pAnimation->iFrameWidth; |
1683 | - area.height = pAnimation->iFrameHeight + myDock->container.bUseReflect * g_fReflectSize; |
1684 | + area.height = pAnimation->iFrameHeight + myDock->container.bUseReflect * myIconsParam.fReflectSize; |
1685 | gdk_window_invalidate_rect (myContainer->pWidget->window, &area, FALSE); |
1686 | } |
1687 | |
1688 | @@ -106,7 +130,7 @@ |
1689 | //\_______________ On libere le pingouin ou au contraire on le cloisonne. |
1690 | if (myConfig.bFree) |
1691 | { |
1692 | - cairo_dock_detach_icon_from_dock (myIcon, myDock, myIcons.iSeparateIcons); |
1693 | + cairo_dock_detach_icon_from_dock (myIcon, myDock, myIconsParam.iSeparateIcons); |
1694 | cairo_dock_update_dock_size (myDock); |
1695 | } |
1696 | else |
1697 | |
1698 | === modified file 'Cairo-Penguin/src/applet-notifications.c' |
1699 | --- Cairo-Penguin/src/applet-notifications.c 2010-09-07 00:39:20 +0000 |
1700 | +++ Cairo-Penguin/src/applet-notifications.c 2011-03-17 14:49:16 +0000 |
1701 | @@ -49,7 +49,7 @@ |
1702 | |
1703 | if ((myConfig.bFree && pClickedContainer == myContainer && myDock->container.iMouseX > (myDock->container.iWidth - myDock->fFlatDockWidth) / 2 + myData.iCurrentPositionX && myDock->container.iMouseX < (myDock->container.iWidth - myDock->fFlatDockWidth) / 2 + myData.iCurrentPositionX + pAnimation->iFrameWidth && myDock->container.iMouseY > myContainer->iHeight - myData.iCurrentPositionY - pAnimation->iFrameHeight && myDock->container.iMouseY < myContainer->iHeight - myData.iCurrentPositionY) || (! myConfig.bFree && pClickedIcon == myIcon)) |
1704 | { |
1705 | - myData.iCurrentPositionY = (myConfig.bFree ? g_iDockLineWidth : 0); |
1706 | + myData.iCurrentPositionY = (myConfig.bFree ? myDocksParam.iDockLineWidth : 0); |
1707 | PenguinAnimation *pAnimation = penguin_get_current_animation (); |
1708 | int iNewAnimation; |
1709 | int iRandom = g_random_int_range (0, 4); |
1710 | @@ -81,13 +81,13 @@ |
1711 | g_source_remove (myData.iSidRestartDelayed); |
1712 | myData.iSidRestartDelayed = 0; |
1713 | } |
1714 | - cairo_dock_remove_notification_func_on_container (myContainer, CAIRO_DOCK_UPDATE_DOCK_SLOW, (CairoDockNotificationFunc) penguin_update_container, myApplet); |
1715 | - cairo_dock_remove_notification_func_on_icon (myIcon, CAIRO_DOCK_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) penguin_update_icon, myApplet); |
1716 | + cairo_dock_remove_notification_func_on_object (myContainer, NOTIFICATION_UPDATE_DOCK_SLOW, (CairoDockNotificationFunc) penguin_update_container, myApplet); |
1717 | + cairo_dock_remove_notification_func_on_object (myIcon, NOTIFICATION_UPDATE_ICON_SLOW, (CairoDockNotificationFunc) penguin_update_icon, myApplet); |
1718 | |
1719 | //\_______________ On met l'animation de repos et on la dessine. |
1720 | int iNewAnimation = penguin_choose_resting_animation (myApplet); |
1721 | penguin_set_new_animation (myApplet, iNewAnimation); |
1722 | - myData.iCurrentPositionY = (myConfig.bFree ? g_iDockLineWidth : 0); |
1723 | + myData.iCurrentPositionY = (myConfig.bFree ? myDocksParam.iDockLineWidth : 0); |
1724 | if (myConfig.bFree) |
1725 | { |
1726 | penguin_move_in_dock (myApplet); |
1727 | @@ -112,7 +112,7 @@ |
1728 | if (pClickedIcon != myIcon && ! (CAIRO_DOCK_IS_APPLET (pClickedIcon) && pClickedIcon->pModuleInstance->pModule == myIcon->pModuleInstance->pModule)) |
1729 | { |
1730 | cd_debug ("%s\n", myApplet->cConfFilePath); |
1731 | - cairo_dock_notify (CAIRO_DOCK_BUILD_ICON_MENU, myIcon, myContainer, CD_APPLET_MY_MENU); |
1732 | + cairo_dock_notify_on_object (myContainer, NOTIFICATION_BUILD_ICON_MENU, myIcon, myContainer, CD_APPLET_MY_MENU); |
1733 | CD_APPLET_LEAVE (CAIRO_DOCK_INTERCEPT_NOTIFICATION); |
1734 | } |
1735 | |
1736 | @@ -184,3 +184,10 @@ |
1737 | } |
1738 | } |
1739 | CD_APPLET_ON_MIDDLE_CLICK_END |
1740 | + |
1741 | + |
1742 | +gboolean cd_on_dock_destroyed (CairoDockModuleInstance *myApplet, CairoDock *pDock) |
1743 | +{ |
1744 | + cairo_dock_deactivate_module_and_unload (myApplet->pModule->pVisitCard->cModuleName); |
1745 | + return CAIRO_DOCK_LET_PASS_NOTIFICATION; |
1746 | +} |
1747 | |
1748 | === modified file 'Cairo-Penguin/src/applet-notifications.h' |
1749 | --- Cairo-Penguin/src/applet-notifications.h 2009-08-26 21:07:39 +0000 |
1750 | +++ Cairo-Penguin/src/applet-notifications.h 2011-03-17 14:49:16 +0000 |
1751 | @@ -17,7 +17,6 @@ |
1752 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1753 | */ |
1754 | |
1755 | - |
1756 | #ifndef __APPLET_NOTIFICATIONS__ |
1757 | #define __APPLET_NOTIFICATIONS__ |
1758 | |
1759 | @@ -25,12 +24,13 @@ |
1760 | #include <cairo-dock.h> |
1761 | |
1762 | |
1763 | - |
1764 | CD_APPLET_ON_CLICK_H |
1765 | |
1766 | CD_APPLET_ON_BUILD_MENU_H |
1767 | |
1768 | CD_APPLET_ON_MIDDLE_CLICK_H |
1769 | |
1770 | +gboolean cd_on_dock_destroyed (CairoDockModuleInstance *myApplet, CairoDock *pDock); |
1771 | + |
1772 | |
1773 | #endif |
1774 | |
1775 | === modified file 'Clipper/data/Clipper.conf.in' |
1776 | --- Clipper/data/Clipper.conf.in 2010-09-07 00:39:20 +0000 |
1777 | +++ Clipper/data/Clipper.conf.in 2011-03-17 14:49:16 +0000 |
1778 | @@ -2,19 +2,26 @@ |
1779 | |
1780 | #[gtk-about] |
1781 | [Icon] |
1782 | -#j+[0;128] Desired icon size for this applet |
1783 | -#{Set to 0 to use the default applet size} |
1784 | -icon size = 0;0 |
1785 | + |
1786 | +#F[Applet] |
1787 | +frame_maininfo= |
1788 | + |
1789 | +#d Name of the dock it belongs to: |
1790 | +dock name = |
1791 | |
1792 | #s Name of the icon as it will appear in its caption in the dock: |
1793 | -name = Clipper |
1794 | +name = Clipboard |
1795 | + |
1796 | +#F[Display] |
1797 | +frame_display= |
1798 | |
1799 | #S+ Image filename: |
1800 | #{Leave empty to use the default one.} |
1801 | icon = |
1802 | |
1803 | -#d Name of the dock it belongs to: |
1804 | -dock name = |
1805 | +#j+[0;128] Desired icon size for this applet |
1806 | +#{Set to 0 to use the default applet size} |
1807 | +icon size = 0;0 |
1808 | |
1809 | order= |
1810 | |
1811 | @@ -136,7 +143,7 @@ |
1812 | #F[Actions;gtk-execute] |
1813 | frame_act = |
1814 | |
1815 | -#b Enable actions? |
1816 | +#B[2] Enable actions? |
1817 | #{If some actions are associated with an item, they will be proposed when the item is created.} |
1818 | enable actions = false |
1819 | |
1820 | |
1821 | === modified file 'Clipper/src/applet-clipboard.c' |
1822 | --- Clipper/src/applet-clipboard.c 2010-08-07 01:43:25 +0000 |
1823 | +++ Clipper/src/applet-clipboard.c 2011-03-17 14:49:16 +0000 |
1824 | @@ -23,7 +23,7 @@ |
1825 | #include "applet-struct.h" |
1826 | #include "applet-clipboard.h" |
1827 | |
1828 | -const gchar *cEnvName[4] = {NULL, "gnome", "kde", "xfce"}; |
1829 | +const gchar *cEnvName[4] = {"other", "gnome", "kde", "xfce"}; // "other" allows to handle all the other DE (put your own actions into the corresponding file). |
1830 | |
1831 | static int _cd_clipper_compare_item (CDClipperItem *pItem1, CDClipperItem *pItem2) |
1832 | { |
1833 | |
1834 | === modified file 'Clipper/src/applet-notifications.c' |
1835 | --- Clipper/src/applet-notifications.c 2010-09-07 00:39:20 +0000 |
1836 | +++ Clipper/src/applet-notifications.c 2011-03-17 14:49:16 +0000 |
1837 | @@ -35,7 +35,8 @@ |
1838 | else |
1839 | { |
1840 | GtkWidget *pMenu = cd_clipper_build_items_menu (); |
1841 | - cairo_dock_popup_menu_on_icon (pMenu, myIcon, myContainer); |
1842 | + CD_APPLET_POPUP_MENU_ON_MY_ICON (pMenu); |
1843 | + gtk_menu_shell_select_first (GTK_MENU_SHELL (pMenu), FALSE); // must be done here, after the menu has been realized. |
1844 | } |
1845 | CD_APPLET_ON_CLICK_END |
1846 | |
1847 | @@ -103,7 +104,7 @@ |
1848 | else |
1849 | { |
1850 | GtkWidget *pMenu = cd_clipper_build_persistent_items_menu (); |
1851 | - cairo_dock_popup_menu_on_icon (pMenu, myIcon, myContainer); |
1852 | + CD_APPLET_POPUP_MENU_ON_MY_ICON (pMenu); |
1853 | } |
1854 | CD_APPLET_ON_MIDDLE_CLICK_END |
1855 | |
1856 | |
1857 | === modified file 'Dbus/CMakeLists.txt' |
1858 | --- Dbus/CMakeLists.txt 2010-08-07 01:43:25 +0000 |
1859 | +++ Dbus/CMakeLists.txt 2011-03-17 14:49:16 +0000 |
1860 | @@ -1,15 +1,5 @@ |
1861 | |
1862 | add_subdirectory(src) |
1863 | add_subdirectory(data) |
1864 | - |
1865 | - |
1866 | -########### install files ############### |
1867 | - |
1868 | - |
1869 | - |
1870 | - |
1871 | -#original Makefile.am contents follow: |
1872 | - |
1873 | -##dnl Process this file with automake to produce Makefile.in |
1874 | -# |
1875 | -#SUBDIRS = . src data |
1876 | +add_subdirectory(interfaces) |
1877 | + |
1878 | |
1879 | === modified file 'Dbus/data/Dbus.conf.in' (properties changed: +x to -x) |
1880 | --- Dbus/data/Dbus.conf.in 2010-08-07 01:43:25 +0000 |
1881 | +++ Dbus/data/Dbus.conf.in 2011-03-17 14:49:16 +0000 |
1882 | @@ -35,8 +35,3 @@ |
1883 | |
1884 | #b Let extern applications animate icons? |
1885 | enable animate icon = true |
1886 | - |
1887 | -#b Let extern applications register new module? |
1888 | -enable new module = true |
1889 | - |
1890 | -modules= |
1891 | \ No newline at end of file |
1892 | |
1893 | === modified file 'Dbus/data/icon.svg' (properties changed: +x to -x) |
1894 | === modified file 'Dbus/demos/demo_bash/demo_bash' |
1895 | --- Dbus/demos/demo_bash/demo_bash 2010-08-07 01:43:25 +0000 |
1896 | +++ Dbus/demos/demo_bash/demo_bash 2011-03-17 14:49:16 +0000 |
1897 | @@ -1,12 +1,8 @@ |
1898 | #!/usr/bin/python |
1899 | |
1900 | # This is a part of the external demo applet for Cairo-Dock |
1901 | -# |
1902 | -# Copyright : (C) 2010 by Nochka85 |
1903 | -# modified by matttbe for the new API |
1904 | -# (based on the demo.py by Fabounet) |
1905 | -# E-mail : nochka85@glx-dock.org |
1906 | -# |
1907 | +# Copyright : (C) 2010-2011 by Nochka85, Fabounet and atttbe |
1908 | +# E-mail : fabounet@glx-dock.org |
1909 | # |
1910 | # This program is free software; you can redistribute it and/or |
1911 | # modify it under the terms of the GNU General Public License |
1912 | @@ -15,100 +11,21 @@ |
1913 | # |
1914 | # This program is distributed in the hope that it will be useful, |
1915 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1916 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1917 | +# ERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1918 | # GNU General Public License for more details. |
1919 | # http://www.gnu.org/licenses/licenses.html#GPL |
1920 | |
1921 | -### We assume the name of this applet is "demo_bash" |
1922 | -### This Python script (demo_bash) should be placed in a folder alongside with 3 files : |
1923 | -### demo_bash.conf (the default config file), "icon" (the default icon of the applet) , "preview" (a preview of this applet) and demo_bash.sh (the script in bash, where you will place your code) |
1924 | - |
1925 | -### REV : 21/01/2010 |
1926 | - |
1927 | -### import ### |
1928 | -import sys |
1929 | -import gobject |
1930 | -import glib |
1931 | -import gtk |
1932 | -import dbus |
1933 | -import os.path |
1934 | -from dbus.mainloop.glib import DBusGMainLoop |
1935 | - |
1936 | -# get our applet on the bus |
1937 | -app_folder = os.path.dirname(sys.argv[0]) |
1938 | -applet_name = os.path.basename(os.path.abspath(".")) |
1939 | -applet_path = "/org/cairodock/CairoDock/"+applet_name |
1940 | -DBusGMainLoop(set_as_default=True) |
1941 | -bus = dbus.SessionBus() |
1942 | -try: |
1943 | - applet_object = bus.get_object("org.cairodock.CairoDock", applet_path) |
1944 | -except dbus.DBusException: |
1945 | - print ">>> module '"+applet_name+"' can't be found on the bus, exit." |
1946 | - sys.exit(2) |
1947 | -myIcon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") |
1948 | - |
1949 | -### we'll have a sub-dock, so we also get the sub-icons object ### |
1950 | -#sub_icons_object = bus.get_object("org.cairodock.CairoDock", applet_path+"/sub_icons") |
1951 | -#mySubIcons = dbus.Interface(sub_icons_object, "org.cairodock.CairoDock.subapplet") |
1952 | - |
1953 | -### callbacks ### |
1954 | -def action_on_click(iState): |
1955 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_click").read().rstrip() |
1956 | - print return_from_bash |
1957 | - |
1958 | -def action_on_middle_click(): |
1959 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_middle_click").read().rstrip() |
1960 | - print return_from_bash |
1961 | - |
1962 | -def action_on_scroll_icon(bUpOrDown): |
1963 | - if bUpOrDown: |
1964 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_scroll_icon 0").read().rstrip() |
1965 | - print return_from_bash |
1966 | - else: |
1967 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_scroll_icon 1").read().rstrip() |
1968 | - print return_from_bash |
1969 | - |
1970 | -def action_on_drop_data(sDataName): |
1971 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_drop_data " + sDataName).read().rstrip() |
1972 | - print return_from_bash |
1973 | - |
1974 | -def action_on_init(): |
1975 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_init").read().rstrip() |
1976 | - print return_from_bash |
1977 | - |
1978 | -def action_on_stop(): |
1979 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_stop").read().rstrip() |
1980 | - print return_from_bash |
1981 | - |
1982 | -def action_on_reload(bConfigHasChanged): |
1983 | - if bConfigHasChanged: |
1984 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_reload").read().rstrip() |
1985 | - print return_from_bash |
1986 | - |
1987 | -def action_on_build_menu(): |
1988 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_build_menu").read().rstrip() |
1989 | - print return_from_bash |
1990 | - |
1991 | -def action_on_menu_select(iNumEntry): |
1992 | - return_from_bash = os.popen("cd " + app_folder + " && ./" + applet_name + ".sh " + " action_on_menu_select " + str(iNumEntry)).read().rstrip() |
1993 | - print return_from_bash |
1994 | - |
1995 | -### init ### |
1996 | -def init(): |
1997 | - # register to the notifications on our applet |
1998 | - myIcon.connect_to_signal("on_click", action_on_click) |
1999 | - myIcon.connect_to_signal("on_middle_click", action_on_middle_click) |
2000 | - myIcon.connect_to_signal("on_scroll", action_on_scroll_icon) |
2001 | - myIcon.connect_to_signal("on_drop_data", action_on_drop_data) |
2002 | - myIcon.connect_to_signal("on_init_module", action_on_init) |
2003 | - myIcon.connect_to_signal("on_stop_module", action_on_stop) |
2004 | - myIcon.connect_to_signal("on_reload_module", action_on_reload) |
2005 | - myIcon.connect_to_signal("on_build_menu", action_on_build_menu) |
2006 | - myIcon.connect_to_signal("on_menu_select", action_on_menu_select) |
2007 | - |
2008 | -### main ### |
2009 | +# The name of this applet is "demo_bash"; it is placed in a folder named "demo_bash", with a file named "auto-load.conf" which describes it. |
2010 | +# Copy this folder into ~/.config/cairo-dock/third-party to let the dock register it automatically. |
2011 | +# In the folder we have : |
2012 | +# - "demo_bash" : this python script, without extension |
2013 | +# - "demo_bash.sh" : the script in bash, where you actually place your code |
2014 | +# - "demo_bash.conf" : the config file of the applet |
2015 | +# - "auto-load.conf" : the file describing the applet |
2016 | +# - "icon" : the default icon of the applet (optionnal) |
2017 | +# - "preview" : a preview of this applet (optionnal) |
2018 | + |
2019 | +from CDBashApplet import CDBashApplet |
2020 | + |
2021 | if __name__ == '__main__': |
2022 | - init() |
2023 | - gtk.main() |
2024 | - stop() |
2025 | - sys.exit(0) |
2026 | + CDBashApplet().run() |
2027 | |
2028 | === modified file 'Dbus/demos/demo_bash/demo_bash.conf' (properties changed: +x to -x) |
2029 | === modified file 'Dbus/demos/demo_bash/demo_bash.sh' |
2030 | --- Dbus/demos/demo_bash/demo_bash.sh 2010-08-07 01:43:25 +0000 |
2031 | +++ Dbus/demos/demo_bash/demo_bash.sh 2011-03-17 14:49:16 +0000 |
2032 | @@ -1,10 +1,10 @@ |
2033 | #!/bin/bash |
2034 | |
2035 | -# This is a part of the external demo applet for Cairo-Dock |
2036 | +# This is a part of the external demo applets for Cairo-Dock |
2037 | # |
2038 | -# Copyright : (C) 2010 by Nochka85 |
2039 | +# Copyright : (C) 2010-2011 by Nochka85 |
2040 | # modified by matttbe for the new API |
2041 | -# (based on the demo.py by Fabounet) |
2042 | +# modified by Fabounet for the new interface |
2043 | # E-mail : nochka85@glx-dock.org |
2044 | # |
2045 | # |
2046 | @@ -15,168 +15,111 @@ |
2047 | # |
2048 | # This program is distributed in the hope that it will be useful, |
2049 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
2050 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2051 | +# ERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2052 | # GNU General Public License for more details. |
2053 | # http://www.gnu.org/licenses/licenses.html#GPL |
2054 | |
2055 | -### This is a part of the external applet demo_bash.py for cairo-dock |
2056 | +### This is a part of the external applet demo_bash for cairo-dock |
2057 | ### Author : Nochka85 |
2058 | ### Contact : nochka85@glx-dock.org |
2059 | -### Rev : 21/01/2010 |
2060 | - |
2061 | -DBUS_NAME="org.cairodock.CairoDock" |
2062 | -DBUS_PATH="/org/cairodock/CairoDock" |
2063 | -DBUS_INTERFACE="org.cairodock.CairoDock" |
2064 | -COMMAND=$0 |
2065 | -SCRIPT_NAME=`basename $COMMAND` |
2066 | -APP_NAME="`echo $SCRIPT_NAME | cut -f1 -d '.' `" |
2067 | -ACTION=$1 |
2068 | -DROP_DATA=$2 |
2069 | -MENU_SELECT=$2 |
2070 | -SCROLL_UP=$2 |
2071 | -CONF_FILE="/home/$USER/.config/cairo-dock/current_theme/plug-ins/$APP_NAME/$APP_NAME.conf" |
2072 | - |
2073 | -############################################################################################################# |
2074 | -get_conf_param() { |
2075 | -LIGNE=`cat $CONF_FILE | grep "$1"` |
2076 | -PARAM="`echo $LIGNE | cut -f2 -d '=' `" |
2077 | -} |
2078 | - |
2079 | -############################################################################################################# |
2080 | -get_ALL_conf_params() { |
2081 | - |
2082 | -get_conf_param "demo_text" |
2083 | -demo_text="$PARAM" |
2084 | - |
2085 | -get_conf_param "demo_truefalse" |
2086 | -demo_truefalse="$PARAM" |
2087 | - |
2088 | -get_conf_param "demo_value" |
2089 | -demo_value="$PARAM" |
2090 | - |
2091 | -} |
2092 | - |
2093 | -############################################################################################################# |
2094 | -action_on_click() { |
2095 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Left clic !" |
2096 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"Left clic !" int32:2 |
2097 | - |
2098 | -exit |
2099 | -} |
2100 | - |
2101 | -############################################################################################################# |
2102 | -action_on_middle_click() { |
2103 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Middle clic !" |
2104 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"Middle clic !" int32:2 |
2105 | - |
2106 | -exit |
2107 | -} |
2108 | - |
2109 | -############################################################################################################# |
2110 | -action_on_scroll_icon() { |
2111 | -if [ $SCROLL_UP -eq "0" ]; then |
2112 | - echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Scroll UP !" |
2113 | - dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"Scroll UP!" int32:1 |
2114 | -else |
2115 | - echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Scroll DOWN !" |
2116 | - dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"Scroll DOWN!" int32:1 |
2117 | -fi |
2118 | - |
2119 | -exit |
2120 | -} |
2121 | - |
2122 | -############################################################################################################# |
2123 | -action_on_drop_data() { |
2124 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> $DROP_DATA has been dropped on applet !" |
2125 | - |
2126 | - |
2127 | -if [ "`echo $DROP_DATA |grep 'file://'`" != "" ]; then # It's a file ! |
2128 | - DROP_DATA="`echo $DROP_DATA | cut -c 8-`" # we remove 'file://' before the location |
2129 | - dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"FILE : $DROP_DATA has been dropped on applet !" int32:4 |
2130 | -else # It's an URL ! |
2131 | - dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"URL : $DROP_DATA has been dropped on applet !" int32:4 # we keep the 'http://' in the name |
2132 | -fi |
2133 | - |
2134 | -exit |
2135 | -} |
2136 | - |
2137 | -############################################################################################################# |
2138 | -action_on_init() { |
2139 | -get_ALL_conf_params |
2140 | - |
2141 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> The demo_text in config is : $demo_text" |
2142 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> The demo_truefalse in config is : $demo_truefalse" |
2143 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> The demo_value in config is : $demo_value" |
2144 | - |
2145 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Our module is started" |
2146 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"I'm connected to Cairo-Dock !" int32:4 |
2147 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.SetQuickInfo string:"123" |
2148 | - |
2149 | -exit |
2150 | -} |
2151 | - |
2152 | -############################################################################################################# |
2153 | -action_on_stop() { |
2154 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Our module is stopped" |
2155 | - |
2156 | -exit |
2157 | -} |
2158 | - |
2159 | -############################################################################################################# |
2160 | -action_on_reload() { |
2161 | -get_ALL_conf_params |
2162 | - |
2163 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> The demo_text in config is : $demo_text" |
2164 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> The demo_truefalse in config is : $demo_truefalse" |
2165 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> The demo_value in config is : $demo_value" |
2166 | - |
2167 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Our module is reloaded" |
2168 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"Our module is reloaded" int32:2 |
2169 | - |
2170 | -exit |
2171 | -} |
2172 | - |
2173 | -############################################################################################################# |
2174 | -action_on_build_menu() { |
2175 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Build menu !" |
2176 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.PopulateMenu array:string:"choice 0","choice 1" |
2177 | - |
2178 | -exit |
2179 | -} |
2180 | - |
2181 | -############################################################################################################# |
2182 | -action_on_menu_select() { |
2183 | -echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Choice $MENU_SELECT has been selected !" |
2184 | -dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/$APP_NAME $DBUS_INTERFACE.applet.ShowDialog string:"Choice $MENU_SELECT has been selected !" int32:4 |
2185 | - |
2186 | -exit |
2187 | -} |
2188 | - |
2189 | -############################################################################################################# |
2190 | -# START ### DO NOT CHANGE THIS SECTION |
2191 | -############################################################################################################# |
2192 | - |
2193 | -if [ "`echo $ACTION |grep 'register_the_applet'`" != "" ]; then |
2194 | - register_the_applet |
2195 | -elif [ "`echo $ACTION |grep 'action_on_click'`" != "" ]; then |
2196 | - action_on_click |
2197 | -elif [ "`echo $ACTION |grep 'action_on_middle_click'`" != "" ]; then |
2198 | - action_on_middle_click |
2199 | -elif [ "`echo $ACTION |grep 'action_on_scroll_icon'`" != "" ]; then |
2200 | - action_on_scroll_icon |
2201 | -elif [ "`echo $ACTION |grep 'action_on_drop_data'`" != "" ]; then |
2202 | - action_on_drop_data |
2203 | -elif [ "`echo $ACTION |grep 'action_on_init'`" != "" ]; then |
2204 | - action_on_init |
2205 | -elif [ "`echo $ACTION |grep 'action_on_stop'`" != "" ]; then |
2206 | - action_on_stop |
2207 | -elif [ "`echo $ACTION |grep 'action_on_reload'`" != "" ]; then |
2208 | - action_on_reload |
2209 | -elif [ "`echo $ACTION |grep 'action_on_build_menu'`" != "" ]; then |
2210 | - action_on_build_menu |
2211 | -elif [ "`echo $ACTION |grep 'action_on_menu_select'`" != "" ]; then |
2212 | - action_on_menu_select |
2213 | -fi |
2214 | - |
2215 | -exit |
2216 | - |
2217 | +### Rev : 09/02/2011 |
2218 | + |
2219 | +. /usr/share/cairo-dock/plug-ins/Dbus/CDBashApplet.sh $* |
2220 | + |
2221 | +############################################################################################################# |
2222 | + |
2223 | +get_config() |
2224 | +{ |
2225 | + demo_text=`get_conf_param "demo_text"` |
2226 | + |
2227 | + demo_truefalse=`get_conf_param "demo_truefalse"` |
2228 | + |
2229 | + demo_value=`get_conf_param "demo_value"` |
2230 | +} |
2231 | + |
2232 | +############################################################################################################# |
2233 | + |
2234 | +on_click() |
2235 | +{ |
2236 | + call ShowDialog "string:\"Left clic\"" "int32:2" |
2237 | +} |
2238 | + |
2239 | +on_middle_click() |
2240 | +{ |
2241 | + call ShowDialog "string:\"Middle clic\"" "int32:2" |
2242 | +} |
2243 | + |
2244 | + |
2245 | +on_scroll_icon() |
2246 | +{ |
2247 | + i=0 |
2248 | + if [ -f store ]; then |
2249 | + i=`cat store` |
2250 | + fi |
2251 | + if [ $1 -eq 1 ]; then |
2252 | + let "i += 1" |
2253 | + else |
2254 | + let "i -= 1" |
2255 | + fi |
2256 | + call SetQuickInfo "string:$i" |
2257 | + echo "$i" > store |
2258 | +} |
2259 | + |
2260 | +on_drop_data() |
2261 | +{ |
2262 | + if [ "`echo $1 |grep file://`" ]; then # It's a file ! |
2263 | + file="`echo $1 | cut -c 8-`" # we remove 'file://' before the location |
2264 | + call ShowDialog "string:\"FILE : $file has been dropped on the applet\"" "int32:5" |
2265 | + else # It's an URL ! |
2266 | + call ShowDialog "string:\"URL : $1 has been dropped on the applet\"" "int32:5" # we keep the 'http://' in the name |
2267 | + fi |
2268 | +} |
2269 | + |
2270 | +on_build_menu() |
2271 | +{ |
2272 | + call PopulateMenu "array:string:\"choice 0\",\"choice 1\"" |
2273 | +} |
2274 | + |
2275 | +on_menu_select() |
2276 | +{ |
2277 | + call ShowDialog "string:\"Choice $1 has been selected\"" "int32:4" |
2278 | +} |
2279 | + |
2280 | +############################################################################################################# |
2281 | + |
2282 | +begin() |
2283 | +{ |
2284 | + get_config |
2285 | + |
2286 | + echo "from file $CONF_FILE:" |
2287 | + echo "Param 'demo_text' in config is : $demo_text" |
2288 | + echo "Param 'demo_truefalse' in config is : $demo_truefalse" |
2289 | + echo "Param 'demo_value' in config is : $demo_value" |
2290 | + |
2291 | + call ShowDialog "string:\"I'm connected to Cairo-Dock \!\"" "int32:4" |
2292 | + call SetQuickInfo "string:0" |
2293 | + |
2294 | + echo "0" > store |
2295 | +} |
2296 | + |
2297 | +end() |
2298 | +{ |
2299 | + rm -f store |
2300 | +} |
2301 | + |
2302 | +reload() |
2303 | +{ |
2304 | + get_config |
2305 | + |
2306 | + echo "Param 'demo_text' in config is now : $demo_text" |
2307 | + echo "Param 'demo_truefalse' in config is now : $demo_truefalse" |
2308 | + echo "Param 'demo_value' in config is now : $demo_value" |
2309 | + |
2310 | + call ShowDialog "string:\"Our module is reloaded\"" "int32:2" |
2311 | +} |
2312 | + |
2313 | +############################################################################################################# |
2314 | + |
2315 | +run $* |
2316 | + |
2317 | +exit 0 |
2318 | |
2319 | === modified file 'Dbus/demos/demo_bash/icon' (properties changed: +x to -x) |
2320 | === modified file 'Dbus/demos/demo_bash/preview' (properties changed: +x to -x) |
2321 | === removed file 'Dbus/demos/demo_mono/demo_mono' |
2322 | Binary files Dbus/demos/demo_mono/demo_mono 2010-08-07 01:43:25 +0000 and Dbus/demos/demo_mono/demo_mono 1970-01-01 00:00:00 +0000 differ |
2323 | === added file 'Dbus/demos/demo_mono/demo_mono.conf' |
2324 | --- Dbus/demos/demo_mono/demo_mono.conf 1970-01-01 00:00:00 +0000 |
2325 | +++ Dbus/demos/demo_mono/demo_mono.conf 2011-03-17 14:49:16 +0000 |
2326 | @@ -0,0 +1,101 @@ |
2327 | +#!en;0.0.2 |
2328 | + |
2329 | +#[gtk-about] |
2330 | +[Icon] |
2331 | +#j+[0;128] Desired icon size for this applet |
2332 | +#{Set to 0 to use the default applet size} |
2333 | +icon size = 0;0 |
2334 | + |
2335 | +#s Name of the icon as it will appear in its label in the dock : |
2336 | +name = Dbus Applet |
2337 | + |
2338 | +#S+ Image's filename : |
2339 | +#{Let empty to use the default one.} |
2340 | +icon = |
2341 | + |
2342 | +#d Name of the dock it belongs to: |
2343 | +dock name = |
2344 | + |
2345 | +order= |
2346 | + |
2347 | +#F[Applet's Handbook] |
2348 | +frame_hand= |
2349 | +#A |
2350 | +handbook=demo_mono |
2351 | + |
2352 | +#[gtk-convert] |
2353 | +[Desklet] |
2354 | + |
2355 | +#j+[48;512] Desklet's dimension (width x height) : |
2356 | +#{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.} |
2357 | +size = 164;96 |
2358 | + |
2359 | +#i[-2048;2048] Desklet's position (x ; y) : |
2360 | +#{Depending on your WindowManager, you can move it with ALT + left_click} |
2361 | +x position=0 |
2362 | +#i[-2048;2048] ... |
2363 | +y position=0 |
2364 | + |
2365 | +#b Is detached from the dock ? |
2366 | +initially detached=false |
2367 | +#l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Accessibility : |
2368 | +#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)} |
2369 | +accessibility=0 |
2370 | +#b Should be visible on all desktops ? |
2371 | +sticky=true |
2372 | + |
2373 | +#b Lock position ? |
2374 | +#{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.} |
2375 | +locked = false |
2376 | + |
2377 | +#I[-180;180] Rotation : |
2378 | +#{in degrees.} |
2379 | +rotation = 0 |
2380 | + |
2381 | +use size= |
2382 | + |
2383 | +#F[Decorations;gtk-orientation-portrait] |
2384 | +frame_deco= |
2385 | + |
2386 | +#o+ Choose a decoration theme for this desklet : |
2387 | +#{Choose the 'personnal' one to define your own decorations below.} |
2388 | +decorations = default |
2389 | + |
2390 | +#v |
2391 | +sep_deco = |
2392 | + |
2393 | +#S+ Background image : |
2394 | +#{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.} |
2395 | +bg desklet = |
2396 | +#e+[0;1] Background tansparency : |
2397 | +bg alpha = 1 |
2398 | +#i+[0;256] Left offset : |
2399 | +#{in pixels. Use this to adjust the left position of the drawings.} |
2400 | +left offset = 0 |
2401 | +#i+[0;256] Top offset : |
2402 | +#{in pixels. Use this to adjust the top position of the drawings.} |
2403 | +top offset = 0 |
2404 | +#i+[0;256] Right offset : |
2405 | +#{in pixels. Use this to adjust the right position of the drawings.} |
2406 | +right offset = 0 |
2407 | +#i+[0;256] Bottom offset : |
2408 | +#{in pixels. Use this to adjust the bottom position of the drawings.} |
2409 | +bottom offset = 0 |
2410 | +#S+ Foreground image : |
2411 | +#{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.} |
2412 | +fg desklet = |
2413 | +#e+[0;1] Foreground tansparency : |
2414 | +fg alpha = 1 |
2415 | + |
2416 | +#[gtk-preferences] |
2417 | +[Configuration] |
2418 | + |
2419 | +#h+[/usr/share/cairo-dock/gauges;gauges;gauges] Choose one of the available themes :/ |
2420 | +theme = Turbo-night |
2421 | + |
2422 | +#i[10;100] Max value : |
2423 | +max value = 100 |
2424 | + |
2425 | +#b Yes / No ? |
2426 | +yesno = false |
2427 | + |
2428 | |
2429 | === modified file 'Dbus/demos/demo_mono/demo_mono.cs' (properties changed: +x to -x) |
2430 | --- Dbus/demos/demo_mono/demo_mono.cs 2010-08-07 01:43:25 +0000 |
2431 | +++ Dbus/demos/demo_mono/demo_mono.cs 2011-03-17 14:49:16 +0000 |
2432 | @@ -2,7 +2,7 @@ |
2433 | // |
2434 | //This is a part of the external demo applet for Cairo-Dock |
2435 | // |
2436 | -//Copyright : (C) 2010 by Fabounet |
2437 | +//Copyright : (C) 2010-2011 by Fabounet |
2438 | //E-mail : fabounet@glx-dock.org |
2439 | // |
2440 | // |
2441 | @@ -30,125 +30,103 @@ |
2442 | //If you drop some text on the icon, it will be used as the icon's label. |
2443 | |
2444 | // Compile it with the following command, then rename 'demo_mono.exe' to 'demo_mono'. |
2445 | -//gmcs demo_mono.cs -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/cli/ndesk-dbus-glib-1.0/NDesk.DBus.GLib.dll -r:/usr/lib/cli/ndesk-dbus-1.0/NDesk.DBus.dll |
2446 | +// gmcs demo_mono.cs -r:/usr/lib/cli/CDApplet.dll |
2447 | +// ln -s demo_mono.exe demo_mono |
2448 | |
2449 | ////////////////////////// |
2450 | ////// dependancies ////// |
2451 | ////////////////////////// |
2452 | using System; |
2453 | -using GLib; |
2454 | -using NDesk.DBus; |
2455 | - |
2456 | - //////////////////////////// |
2457 | - ////// DBus Interface ////// |
2458 | -//////////////////////////// |
2459 | -public delegate void OnClickEvent (int i); |
2460 | -public delegate void OnMiddleClickEvent (); |
2461 | -public delegate void OnScrollEvent (bool b); |
2462 | -public delegate void OnBuildMenuEvent (); |
2463 | -public delegate void OnMenuSelectEvent (int i); |
2464 | -public delegate void OnDropDataEvent (string s); |
2465 | -public delegate void OnChangeFocusEvent (bool b); |
2466 | -public delegate void OnAnswerEvent (System.Object v); |
2467 | -public delegate void OnStopModuleEvent (); |
2468 | -public delegate void OnReloadModuleEvent (bool b); |
2469 | -[NDesk.DBus.Interface ("org.cairodock.CairoDock.applet")] |
2470 | -public interface IIcon |
2471 | -{ |
2472 | - System.Object Get (string s); |
2473 | - void GetAll (); |
2474 | - void SetLabel (string s); |
2475 | - void SetIcon (string s); |
2476 | - void SetEmblem (string s, int i); |
2477 | - void Animate (string s, int i); |
2478 | - void SetQuickInfo (string s); |
2479 | - void ShowDialog (string s, int i); |
2480 | - void AskQuestion (string s); |
2481 | - void AskValue (string s, double x, double y); |
2482 | - void AskText (string s, string t); |
2483 | - void AddDataRenderer (string s, int i, string t); |
2484 | - void RenderValues (double[] x); |
2485 | - void ControlAppli (string s); |
2486 | - void PopulateMenu (string[] s); |
2487 | - event OnClickEvent on_click; |
2488 | - event OnMiddleClickEvent on_middle_click; |
2489 | - event OnScrollEvent on_scroll; |
2490 | - event OnBuildMenuEvent on_build_menu; |
2491 | - event OnMenuSelectEvent on_menu_select; |
2492 | - event OnDropDataEvent on_drop_data; |
2493 | - event OnChangeFocusEvent on_change_focus; |
2494 | - event OnAnswerEvent on_answer; |
2495 | - event OnStopModuleEvent on_stop_module; |
2496 | - event OnReloadModuleEvent on_reload_module; |
2497 | -} |
2498 | +using System.Collections.Generic; |
2499 | +using CairoDock.Applet; |
2500 | |
2501 | public struct Config { |
2502 | + public string cTheme; |
2503 | + public int iMaxValue; |
2504 | public bool yesno; |
2505 | - public int iMaxValue; |
2506 | - public string cTheme; |
2507 | } |
2508 | |
2509 | -public class Applet |
2510 | +//////////////////// |
2511 | +/// Applet class /// |
2512 | +//////////////////// |
2513 | +public class Applet : CDApplet |
2514 | { |
2515 | - public static string applet_name = "demo_mono"; // the name of the applet must the same as the folder. |
2516 | - public static string applet_path = "/org/cairodock/CairoDock/"+applet_name; // path where our object is stored on the bus. |
2517 | - public static string conf_file = Environment.GetEnvironmentVariable("HOME")+"/.config/cairo-dock/current_theme/plug-ins/"+applet_name+"/"+applet_name+".conf"; // path to the conf file of our applet. |
2518 | - public IIcon myIcon = null; |
2519 | - public Config myConfig; |
2520 | - private GLib.MainLoop loop = null; |
2521 | + private Config config; |
2522 | private int count = 0; |
2523 | |
2524 | - public void begin() |
2525 | - { |
2526 | - connect_to_dock (); |
2527 | - get_config (); |
2528 | - myIcon.ShowDialog ("I'm connected to Cairo-Dock !", 4); |
2529 | - myIcon.AddDataRenderer("gauge", 1, myConfig.cTheme); |
2530 | + public Applet() |
2531 | + { |
2532 | + |
2533 | + } |
2534 | + |
2535 | + //////////////////////////// |
2536 | + ////// private methods ////// |
2537 | + //////////////////////////// |
2538 | + |
2539 | + private void set_counter(int n) |
2540 | + { |
2541 | + this.count = n; |
2542 | + this.icon.RenderValues(new double[] {(double)n/this.config.iMaxValue}); |
2543 | + this.icon.SetQuickInfo(String.Format(n.ToString())); |
2544 | + } |
2545 | + |
2546 | + /////////////////////////////// |
2547 | + ////// applet definition ////// |
2548 | + /////////////////////////////// |
2549 | + |
2550 | + public override void get_config (string cConfFilePath) |
2551 | + { |
2552 | + /// read cConfFilePath... |
2553 | + this.config.iMaxValue = 100; |
2554 | + this.config.cTheme = "Turbo-night"; |
2555 | + this.config.yesno = true; |
2556 | + } |
2557 | + |
2558 | + public override void end() |
2559 | + { |
2560 | + Console.WriteLine("*** Bye !"); |
2561 | + } |
2562 | + |
2563 | + public override void begin() |
2564 | + { |
2565 | + this.icon.ShowDialog ("I'm connected to Cairo-Dock !", 4); |
2566 | + this.icon.AddDataRenderer("gauge", 1, this.config.cTheme); |
2567 | this.set_counter (0); |
2568 | - loop = new GLib.MainLoop(); |
2569 | - loop.Run(); |
2570 | - } |
2571 | - public void end() |
2572 | - { |
2573 | - loop.Quit(); |
2574 | - } |
2575 | - public void connect_to_dock() |
2576 | - { |
2577 | - BusG.Init (); |
2578 | - Bus bus = Bus.Session; |
2579 | - myIcon = bus.GetObject<IIcon> ("org.cairodock.CairoDock", new ObjectPath (applet_path)); |
2580 | - myIcon.on_click += new OnClickEvent (action_on_click); |
2581 | - myIcon.on_middle_click += new OnMiddleClickEvent (action_on_middle_click); |
2582 | - myIcon.on_scroll += new OnScrollEvent (action_on_scroll); |
2583 | - myIcon.on_build_menu += new OnBuildMenuEvent (action_on_build_menu); |
2584 | - myIcon.on_menu_select += new OnMenuSelectEvent (action_on_menu_select); |
2585 | - myIcon.on_drop_data += new OnDropDataEvent (action_on_drop_data); |
2586 | - myIcon.on_answer += new OnAnswerEvent (action_on_answer); |
2587 | - myIcon.on_stop_module += new OnStopModuleEvent (action_on_stop_module); |
2588 | - myIcon.on_reload_module += new OnReloadModuleEvent (action_on_reload_module); |
2589 | - } |
2590 | - public void get_config () |
2591 | - { |
2592 | - /// read this.conf_file ... |
2593 | - myConfig.iMaxValue = 100; |
2594 | - myConfig.cTheme = "Turbo-night"; |
2595 | - myConfig.yesno = true; |
2596 | - } |
2597 | + } |
2598 | + |
2599 | + public override void reload() |
2600 | + { |
2601 | + this.icon.AddDataRenderer("gauge", 1, this.config.cTheme); |
2602 | + this.set_counter (Math.Min (this.count, this.config.iMaxValue)); |
2603 | + } |
2604 | + |
2605 | //////////////////////////////////////// |
2606 | ////// callbacks on the main icon ////// |
2607 | //////////////////////////////////////// |
2608 | - private void action_on_click (int iClickState) |
2609 | - { |
2610 | - Console.WriteLine(">>> click"); |
2611 | - } |
2612 | - private void action_on_middle_click () |
2613 | - { |
2614 | - Console.WriteLine(">>> middle click"); |
2615 | - myIcon.AskValue("Set the value you want", this.count, 100); |
2616 | - } |
2617 | - private void action_on_scroll (bool bScrollUp) |
2618 | - { |
2619 | - Console.WriteLine(">>> scroll up " + bScrollUp); |
2620 | + |
2621 | + public override void on_click (int iClickState) |
2622 | + { |
2623 | + Console.WriteLine("*** click"); |
2624 | + } |
2625 | + |
2626 | + public override void on_middle_click () |
2627 | + { |
2628 | + Console.WriteLine("*** middle click"); |
2629 | + Dictionary<string, object> dialog_attributes = new Dictionary<string, object> () { |
2630 | + {"icon" , "stock_properties"}, |
2631 | + {"message" , "Set the value you want"}, |
2632 | + {"buttons" , "ok;cancel"} }; |
2633 | + Dictionary<string, object> widget_attributes = new Dictionary<string, object> () { |
2634 | + {"widget-type" , "scale"}, |
2635 | + {"max-value" , this.config.iMaxValue}, |
2636 | + {"message" , "Set the value you want"} }; |
2637 | + |
2638 | + this.icon.PopupDialog(dialog_attributes, widget_attributes); |
2639 | + } |
2640 | + |
2641 | + public override void on_scroll (bool bScrollUp) |
2642 | + { |
2643 | + Console.WriteLine("*** scroll up " + bScrollUp); |
2644 | int n; |
2645 | if (bScrollUp) |
2646 | n = Math.Min(100, this.count+1); |
2647 | @@ -156,70 +134,68 @@ |
2648 | n = Math.Max(0, this.count-1); |
2649 | this.set_counter(n); |
2650 | } |
2651 | - private void action_on_build_menu () |
2652 | + |
2653 | + public override void on_build_menu () |
2654 | { |
2655 | - Console.WriteLine(">>> build menu"); |
2656 | - myIcon.PopulateMenu(new string [] {"set min value", "set medium value", "set max value"}); |
2657 | + Console.WriteLine("*** build menu"); |
2658 | + /// Warning : teh AddMenuItems fails with NDesk-DBus 0.6.0; until this is fixed, use the PopulateMenu method. |
2659 | + /**Dictionary<string, object>[] pItems = new Dictionary<string, object>[] { |
2660 | + new Dictionary<string, object>() |
2661 | + { |
2662 | + {"label", "set min value"}, |
2663 | + {"icon", "gtk-zoom-out"}, |
2664 | + {"id", 0} |
2665 | + }, |
2666 | + new Dictionary<string, object>() |
2667 | + { |
2668 | + {"label", "set medium value"}, |
2669 | + {"icon", "gtk-zoom-fit"}, |
2670 | + {"id", 1} |
2671 | + }, |
2672 | + new Dictionary<string, object>() |
2673 | + { |
2674 | + {"label", "set max value"}, |
2675 | + {"icon", "gtk-zoom-in"}, |
2676 | + {"id", 2} |
2677 | + } |
2678 | + }; |
2679 | + Console.WriteLine("*** item 1:"+pItems[0]["icon"]); |
2680 | + this.icon.AddMenuItems(pItems);*/ |
2681 | + this.icon.PopulateMenu(new string[] {"set min value", "set medium value", "set max value"}); |
2682 | } |
2683 | - private void action_on_menu_select (int iNumEntry) |
2684 | + |
2685 | + public override void on_menu_select (int iNumEntry) |
2686 | { |
2687 | - Console.WriteLine(">>> select entry : "+iNumEntry); |
2688 | + Console.WriteLine("*** select entry : "+iNumEntry); |
2689 | if (iNumEntry == 0) |
2690 | this.set_counter(0); |
2691 | else if (iNumEntry == 1) |
2692 | - this.set_counter(100/2); |
2693 | + this.set_counter(this.config.iMaxValue/2); |
2694 | else if (iNumEntry == 2) |
2695 | - this.set_counter(100); |
2696 | - } |
2697 | - private void action_on_drop_data (string cReceivedData) |
2698 | - { |
2699 | - Console.WriteLine(">>> drop : "+cReceivedData); |
2700 | - myIcon.SetLabel(cReceivedData); |
2701 | - } |
2702 | - private void action_on_answer (System.Object answer) |
2703 | - { |
2704 | - Console.WriteLine(">>> answer : "+(double)answer); |
2705 | - double x = (double)answer; |
2706 | - this.set_counter((int) x); |
2707 | - } |
2708 | - ///////////////////////////////////// |
2709 | - ////// callbacks on the applet ////// |
2710 | - ///////////////////////////////////// |
2711 | - private void action_on_stop_module () |
2712 | - { |
2713 | - Console.WriteLine(">>> stop"); |
2714 | - this.end(); |
2715 | - } |
2716 | - private void action_on_reload_module (bool bConfigHasChanged) |
2717 | - { |
2718 | - Console.WriteLine(">>> our module is reloaded"); |
2719 | - if (bConfigHasChanged) |
2720 | + this.set_counter(this.config.iMaxValue); |
2721 | + } |
2722 | + public override void on_drop_data (string cReceivedData) |
2723 | + { |
2724 | + Console.WriteLine("*** drop : "+cReceivedData); |
2725 | + this.icon.SetLabel(cReceivedData); |
2726 | + } |
2727 | + public override void on_answer_dialog (int iButton, System.Object answer) |
2728 | + { |
2729 | + Console.WriteLine("*** answer : "+(double)answer); |
2730 | + if (iButton == 0) |
2731 | { |
2732 | - Console.WriteLine (">>> and our config has changed"); |
2733 | - this.get_config(); |
2734 | - myIcon.AddDataRenderer("gauge", 1, this.myConfig.cTheme); |
2735 | - this.set_counter (Math.Min (this.count, this.myConfig.iMaxValue)); |
2736 | + double x = (double)answer; |
2737 | + this.set_counter((int) x); |
2738 | } |
2739 | } |
2740 | |
2741 | - //////////////////////////// |
2742 | - ////// applet methods ////// |
2743 | - //////////////////////////// |
2744 | - public void set_counter(int n) |
2745 | - { |
2746 | - this.count = n; |
2747 | - myIcon.RenderValues(new double[] {(double)n/myConfig.iMaxValue}); |
2748 | - myIcon.SetQuickInfo(String.Format(n.ToString())); |
2749 | - } |
2750 | - |
2751 | ////////////////// |
2752 | ////// main ////// |
2753 | ////////////////// |
2754 | - public static void Main () |
2755 | + public static void Main (string[] args) |
2756 | { |
2757 | - Applet myApplet = new Applet (); |
2758 | - myApplet.begin(); |
2759 | - Console.WriteLine(">>> bye"); |
2760 | + Applet myApplet = new Applet(); |
2761 | + myApplet.run(); |
2762 | } |
2763 | } |
2764 | |
2765 | |
2766 | === removed file 'Dbus/demos/demo_mono/demo_mono.exe' |
2767 | Binary files Dbus/demos/demo_mono/demo_mono.exe 2010-08-07 01:43:25 +0000 and Dbus/demos/demo_mono/demo_mono.exe 1970-01-01 00:00:00 +0000 differ |
2768 | === modified file 'Dbus/demos/demo_mono/icon' (properties changed: +x to -x) |
2769 | === modified file 'Dbus/demos/demo_mono/preview' (properties changed: +x to -x) |
2770 | === modified file 'Dbus/demos/demo_python/auto-load.conf' |
2771 | --- Dbus/demos/demo_python/auto-load.conf 2010-08-07 01:43:25 +0000 |
2772 | +++ Dbus/demos/demo_python/auto-load.conf 2011-03-17 14:49:16 +0000 |
2773 | @@ -11,3 +11,9 @@ |
2774 | |
2775 | # Version of the applet; change it everytime you change something in the config file. Don't forget to update the version both in this file and in the config file. |
2776 | version = 0.0.2 |
2777 | + |
2778 | +# Default icon to use if no icon has been defined by the user. If not specified, or if the file is not found, the "icon" file will be used. |
2779 | +icon = |
2780 | + |
2781 | +# Whether the applet can be instanciated several times or not. |
2782 | +multi-instance = true |
2783 | \ No newline at end of file |
2784 | |
2785 | === modified file 'Dbus/demos/demo_python/demo_python' (properties changed: +x to -x) |
2786 | --- Dbus/demos/demo_python/demo_python 2010-08-07 01:43:25 +0000 |
2787 | +++ Dbus/demos/demo_python/demo_python 2011-03-17 14:49:16 +0000 |
2788 | @@ -1,11 +1,9 @@ |
2789 | #!/usr/bin/python |
2790 | |
2791 | # This is a part of the external demo applet for Cairo-Dock |
2792 | -# |
2793 | -# Copyright : (C) 2010 by Fabounet |
2794 | +# Copyright : (C) 2010-2011 by Fabounet |
2795 | # E-mail : fabounet@glx-dock.org |
2796 | # |
2797 | -# |
2798 | # This program is free software; you can redistribute it and/or |
2799 | # modify it under the terms of the GNU General Public License |
2800 | # as published by the Free Software Foundation; either version 2 |
2801 | @@ -17,166 +15,143 @@ |
2802 | # GNU General Public License for more details. |
2803 | # http://www.gnu.org/licenses/licenses.html#GPL |
2804 | |
2805 | -### The name of this applet is "demo_python"; it is placed in a folder named "demo_python", with a file named "auto-load.conf" which describes it. |
2806 | -### Copy this folder into ~/.config/cairo-dock/third-party to let the dock register it automatically. |
2807 | -### In the folder we have : |
2808 | -### "demo_python" (the executable script), "demo_python.conf" (the default config file), "auto-load.conf" (the file describing our applet), "icon" (the default icon of the applet) and "preview" (a preview of this applet) |
2809 | +# The name of this applet is "demo_python"; it is placed in a folder named "demo_python", with a file named "auto-load.conf" which describes it. |
2810 | +# Copy this folder into ~/.config/cairo-dock/third-party to let the dock register it automatically. |
2811 | +# In the folder we have : |
2812 | +# - "demo_python" : the executable script, without extension |
2813 | +# - "demo_python.conf" : the default config file |
2814 | +# - "auto-load.conf" : the file describing our applet |
2815 | +# - "icon" : the default icon of the applet (optionnal) |
2816 | +# - "preview" : a preview of this applet (optionnal) |
2817 | |
2818 | ### This very simple applet features a counter from 0 to iMaxValue It displays the counter on the icon with a gauge and a quick info. |
2819 | ### Scroll on the icon increase or decrease the counter. |
2820 | ### The menu offers the possibility to set some default value. |
2821 | -### Left click on the icon will set a random value. |
2822 | -### Middle click on the icon will raise a dialog asking you to set the value you want. |
2823 | +### Left-click on the icon will set a random value. |
2824 | +### Middle-click on the icon will raise a dialog asking you to set the value you want. |
2825 | ### If you drop some text on the icon, it will be used as the icon's label. |
2826 | |
2827 | #################### |
2828 | ### dependancies ### |
2829 | #################### |
2830 | -import sys |
2831 | -import os.path |
2832 | -import ConfigParser |
2833 | import random |
2834 | -import gobject |
2835 | -import glib |
2836 | -import dbus |
2837 | -from dbus.mainloop.glib import DBusGMainLoop |
2838 | - |
2839 | -applet_name = os.path.basename(os.path.abspath(".")) # the name of the applet must the same as the folder. |
2840 | -DBusGMainLoop(set_as_default=True) |
2841 | - |
2842 | -################################## |
2843 | -### callbacks on the main icon ### |
2844 | -################################## |
2845 | -def action_on_click(iState): |
2846 | - print ">>> clic !" |
2847 | - set_counter(random.randint(0,myApplet.config['iMaxValue'])) |
2848 | - |
2849 | -def action_on_middle_click(): |
2850 | - print ">>> middle clic !" |
2851 | - myApplet.icon.AskValue("Set the value you want", myApplet.count, myApplet.config['iMaxValue']); |
2852 | - |
2853 | -def action_on_build_menu(): |
2854 | - print ">>> build menu !" |
2855 | - myApplet.icon.PopulateMenu(["set min value", "set medium value", "set max value"]) |
2856 | - |
2857 | -def action_on_menu_select(iNumEntry): |
2858 | - print ">>> choice",iNumEntry,"has been selected !" |
2859 | - if iNumEntry == 0: |
2860 | - myApplet.set_counter(0) |
2861 | - elif iNumEntry == 1: |
2862 | - myApplet.set_counter(myApplet.config['iMaxValue']/2) |
2863 | - elif iNumEntry == 2: |
2864 | - myApplet.set_counter(myApplet.config['iMaxValue']) |
2865 | - |
2866 | -def action_on_scroll(bScrollUp): |
2867 | - print ">>> scroll !" |
2868 | - if bScrollUp: |
2869 | - count = min(myApplet.config['iMaxValue'], myApplet.count+1) |
2870 | - else: |
2871 | - count = max(0, myApplet.count-1) |
2872 | - myApplet.set_counter(count) |
2873 | - |
2874 | -def action_on_drop_data(cReceivedData): |
2875 | - print ">>> received",cReceivedData |
2876 | - myApplet.icon.SetLabel(cReceivedData) |
2877 | - |
2878 | -def action_on_answer(answer): |
2879 | - print ">>> answer :",answer |
2880 | - myApplet.set_counter(int (answer)) |
2881 | - |
2882 | -################################## |
2883 | -### callbacks on the sub-icons ### |
2884 | -################################## |
2885 | -def on_click_sub_icon(iState, cIconID): |
2886 | - print "clic on the sub-icon '"+cIconID+"' !" |
2887 | - |
2888 | -############################### |
2889 | -### callbacks on the applet ### |
2890 | -############################### |
2891 | -def action_on_stop(): |
2892 | - print ">>> our module is stopped" |
2893 | - myApplet.end() |
2894 | - loop.quit() |
2895 | - |
2896 | -def action_on_reload(bConfigHasChanged): |
2897 | - print ">>> our module is reloaded" |
2898 | - if bConfigHasChanged: |
2899 | - print ">>> and our config has changed" |
2900 | - myApplet.get_config() |
2901 | - myApplet.icon.AddDataRenderer("gauge", 1, myApplet.config['cTheme']) |
2902 | - myApplet.icon.RenderValues([float(myApplet.count)/myApplet.config['iMaxValue']]) |
2903 | - myApplet.sub_icons.RemoveSubIcon("any") |
2904 | - myApplet.sub_icons.AddSubIcons(["icon 1", "firefox-3.0", "id1", "icon 2", "natilus", "id2", "icon 3", "thunderbird", "id3"]) |
2905 | +from CDApplet import CDApplet |
2906 | |
2907 | #################### |
2908 | ### Applet class ### |
2909 | #################### |
2910 | -class Applet: |
2911 | +class Applet(CDApplet): |
2912 | def __init__(self): |
2913 | - self.icon = None |
2914 | - self.sub_icons = None |
2915 | - self.config = {} |
2916 | - self.conf_file = os.path.expanduser("~/.config/cairo-dock/current_theme/plug-ins/"+applet_name+"/"+applet_name+".conf") # path to the conf file of our applet. |
2917 | + # define internal variables |
2918 | self.count = 0 |
2919 | - |
2920 | - def get_config(self): |
2921 | - keyfile = ConfigParser.RawConfigParser() |
2922 | - keyfile.read(self.conf_file) |
2923 | + # call high-level init |
2924 | + CDApplet.__init__(self) |
2925 | + |
2926 | + ##### private methods ##### |
2927 | + |
2928 | + def set_counter(self,count): |
2929 | + self.count = count |
2930 | + percent = float(self.count)/self.config['iMaxValue'] |
2931 | + self.icon.RenderValues([percent]) |
2932 | + self.icon.SetQuickInfo(format(self.count, "d")) |
2933 | + |
2934 | + ##### applet definition ##### |
2935 | + |
2936 | + def get_config(self,keyfile): |
2937 | + print "*** get config" |
2938 | self.config['cTheme'] = keyfile.get('Configuration', 'theme') |
2939 | self.config['iMaxValue'] = keyfile.getint('Configuration', 'max value') |
2940 | self.config['yesno'] = keyfile.getboolean('Configuration', 'yesno') |
2941 | |
2942 | + def end(self): |
2943 | + print "*** end of demo_python" |
2944 | + |
2945 | def begin(self): |
2946 | - self.connect_to_dock() |
2947 | + print "*** begin" |
2948 | self.icon.ShowDialog("I'm connected to Cairo-Dock !", 4) # show a dialog with this message for 4 seconds. |
2949 | - self.icon.SetQuickInfo(format(self.count, "d")) # write the counter value on the icon. |
2950 | self.icon.AddDataRenderer("gauge", 1, self.config['cTheme']) # set a gauge with the theme read in config to display the value of the counter. |
2951 | - self.icon.RenderValues([float(self.count)/self.config['iMaxValue']]) # draw the gauge with an initial value. |
2952 | + self.set_counter(0) # set the initial value of our counter. |
2953 | self.sub_icons.AddSubIcons(["icon 1", "firefox-3.0", "id1", "icon 2", "trash", "id2", "icon 3", "thunderbird", "id3", "icon 4", "nautilus", "id4"]) # add 4 icons in our sub-dock. The tab contains triplets of {label, image, ID}. |
2954 | self.sub_icons.RemoveSubIcon("id2") # remove the 2nd icon of our sub-dock. |
2955 | self.sub_icons.SetQuickInfo("1", "id1") # write the ID on each icon of the sub-dock. |
2956 | self.sub_icons.SetQuickInfo("3", "id3") |
2957 | self.sub_icons.SetQuickInfo("4", "id4") |
2958 | - |
2959 | - def end(self): |
2960 | - pass |
2961 | - |
2962 | - def connect_to_dock(self): |
2963 | - # get our applet on the bus. |
2964 | - applet_path = "/org/cairodock/CairoDock/"+applet_name # path where our object is stored on the bus. |
2965 | - bus = dbus.SessionBus() |
2966 | - applet_object = bus.get_object("org.cairodock.CairoDock", applet_path) |
2967 | - self.icon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") # this object represents our applet and also our icon inside the dock or a desklet. |
2968 | - # we'll have a sub-dock, so we also get the sub-icons object |
2969 | - sub_icons_object = bus.get_object("org.cairodock.CairoDock", applet_path+"/sub_icons") |
2970 | - 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. |
2971 | - # connect to signals. |
2972 | - self.icon.connect_to_signal("on_click", action_on_click) # when the user left-clicks on our icon. |
2973 | - self.icon.connect_to_signal("on_middle_click", action_on_middle_click) # when the user middle-clicks on our icon. |
2974 | - self.icon.connect_to_signal("on_build_menu", action_on_build_menu) # when the user right-clicks on our applet (which builds the menu) |
2975 | - self.icon.connect_to_signal("on_menu_select", action_on_menu_select) # when the user selects an entry of this menu. |
2976 | - self.icon.connect_to_signal("on_scroll", action_on_scroll) # when the user scroll up or down on our icon. |
2977 | - self.icon.connect_to_signal("on_drop_data", action_on_drop_data) # when the user drops something on our icon. |
2978 | - #myApplet.icon.connect_to_signal("on_init_module", action_on_init) |
2979 | - self.icon.connect_to_signal("on_answer", action_on_answer) # when the user answer a question. |
2980 | - self.icon.connect_to_signal("on_stop_module", action_on_stop) # when the user deactivate our applet (or the DBus plug-in, or when the Cairo-Dock is stopped). |
2981 | - self.icon.connect_to_signal("on_reload_module", action_on_reload) # when the user changes something in our config, or when the desklet is resized (with no change in the config). |
2982 | - self.sub_icons.connect_to_signal("on_click_sub_icon", on_click_sub_icon) # when the user left-clicks on a sub-icon. |
2983 | - |
2984 | - def set_counter(self,count): |
2985 | - self.count = count |
2986 | - percent = float(self.count)/self.config['iMaxValue'] |
2987 | - self.icon.RenderValues([percent]) |
2988 | - self.icon.SetQuickInfo(format(self.count, "d")) |
2989 | - |
2990 | + self.icon.BindShortkey(["<Control>F9"]) # bind to ctrl+F9 |
2991 | + |
2992 | + def reload(self): |
2993 | + print "*** reload" |
2994 | + self.icon.AddDataRenderer("gauge", 1, self.config['cTheme']) |
2995 | + self.icon.RenderValues([float(self.count)/self.config['iMaxValue']]) |
2996 | + self.sub_icons.RemoveSubIcon("any") |
2997 | + self.sub_icons.AddSubIcons(["icon 1", "firefox-3.0", "id1", "icon 2", "natilus", "id2", "icon 3", "thunderbird", "id3"]) |
2998 | + |
2999 | + ##### callbacks ##### |
3000 | + |
3001 | + def on_click(self,iState): |
3002 | + print "*** click" |
3003 | + self.set_counter(random.randint(0,self.config['iMaxValue'])) |
3004 | + |
3005 | + def on_middle_click(self): |
3006 | + print "*** middle click" |
3007 | + dialog_attributes = { |
3008 | + "icon" : "stock_properties", |
3009 | + "message" : "Set the value you want", |
3010 | + "buttons" : "ok;cancel"} |
3011 | + widget_attributes = { |
3012 | + "widget-type" : "scale", |
3013 | + "max-value" : self.config['iMaxValue'], |
3014 | + "message" : "Set the value you want"} |
3015 | + |
3016 | + self.icon.PopupDialog(dialog_attributes, widget_attributes) |
3017 | + |
3018 | + def on_build_menu(self): |
3019 | + print "*** build menu" |
3020 | + items = [ { |
3021 | + "label": "set min value", |
3022 | + "icon" : "gtk-zoom-out", |
3023 | + "id" : 1 |
3024 | + }, { |
3025 | + "label": "set medium value", |
3026 | + "icon" : "gtk-zoom-fit", |
3027 | + "id" : 2 |
3028 | + }, { |
3029 | + "label": "set max value", |
3030 | + "icon" : "gtk-zoom-in", |
3031 | + "id" : 3 |
3032 | + } ] |
3033 | + self.icon.AddMenuItems(items) |
3034 | + |
3035 | + def on_menu_select(self,iNumEntry): |
3036 | + print "*** choice",iNumEntry,"has been selected !" |
3037 | + if iNumEntry == 1: |
3038 | + self.set_counter(0) |
3039 | + elif iNumEntry == 2: |
3040 | + self.set_counter(self.config['iMaxValue']/2) |
3041 | + elif iNumEntry == 3: |
3042 | + self.set_counter(self.config['iMaxValue']) |
3043 | + |
3044 | + def on_scroll(self,bScrollUp): |
3045 | + print "*** scroll !" |
3046 | + if bScrollUp: |
3047 | + count = min(self.config['iMaxValue'], self.count+1) |
3048 | + else: |
3049 | + count = max(0, self.count-1) |
3050 | + self.set_counter(count) |
3051 | + |
3052 | + def on_drop_data(self,cReceivedData): |
3053 | + print "*** received",cReceivedData |
3054 | + self.icon.SetLabel(cReceivedData) |
3055 | + |
3056 | + def on_answer_dialog(self,button, answer): |
3057 | + print "*** answer dialog :",button, answer |
3058 | + self.set_counter(int (answer)) |
3059 | + |
3060 | + def on_shortkey(self,key): |
3061 | + print "*** shortkey :",key |
3062 | + |
3063 | + |
3064 | ############ |
3065 | ### main ### |
3066 | ############ |
3067 | if __name__ == '__main__': |
3068 | - myApplet = Applet() |
3069 | - myApplet.get_config() |
3070 | - myApplet.begin() |
3071 | - loop = gobject.MainLoop() |
3072 | - loop.run() |
3073 | - print ">>> bye" |
3074 | - sys.exit(0) |
3075 | + Applet().run() |
3076 | |
3077 | === modified file 'Dbus/demos/demo_python/demo_python.conf' (properties changed: +x to -x) |
3078 | === modified file 'Dbus/demos/demo_python/icon' (properties changed: +x to -x) |
3079 | === modified file 'Dbus/demos/demo_python/preview' (properties changed: +x to -x) |
3080 | === added directory 'Dbus/demos/demo_ruby' |
3081 | === added file 'Dbus/demos/demo_ruby/README' |
3082 | --- Dbus/demos/demo_ruby/README 1970-01-01 00:00:00 +0000 |
3083 | +++ Dbus/demos/demo_ruby/README 2011-03-17 14:49:16 +0000 |
3084 | @@ -0,0 +1,19 @@ |
3085 | +In order to use this applet, it is necessary to install Ruby, Rubygems and the gems dbus and parseconfig. |
3086 | + |
3087 | +# Installation process (Debian/Ubuntu) |
3088 | + |
3089 | +[+] Ruby 1.8: sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 |
3090 | +[+] Rubygems: (sudo) apt-get install rubygems |
3091 | +[+] Gem parseconfig: (sudo) gem install parseconfig |
3092 | +[+] Gem Dbus: (sudo) gem install ruby-dbus |
3093 | + |
3094 | +# Tips |
3095 | + |
3096 | +When running Cairo-Dock through terminal, for example, cairo-dock -c, check if any message regarding execution permission is being shown. If so, set execution permission to the applet, chmod a+x 755 demo_ruby |
3097 | + |
3098 | +# Contact me |
3099 | + |
3100 | +Any doubt, suggestion or anything else, except asking for some money, I would be pleased to received a message from you. |
3101 | + |
3102 | +Author: Eduardo Mucelli Rezende Oliveira |
3103 | +E-mail: edumucelli@gmail.com or eduardom@dcc.ufmg.br |
3104 | |
3105 | === added file 'Dbus/demos/demo_ruby/auto-load.conf' |
3106 | --- Dbus/demos/demo_ruby/auto-load.conf 1970-01-01 00:00:00 +0000 |
3107 | +++ Dbus/demos/demo_ruby/auto-load.conf 2011-03-17 14:49:16 +0000 |
3108 | @@ -0,0 +1,19 @@ |
3109 | +[Register] |
3110 | + |
3111 | +# Author of the applet |
3112 | +author = Eduardo Mucelli |
3113 | + |
3114 | +# A short description of the applet and how to use it. |
3115 | +description = This is a distant applet\nIt simulates a counter:\n Scroll up/down to increase/decrease the counter,\n Click/middle-click to increase/decrease the counter by 10\n Drop some text to set it as the label. |
3116 | + |
3117 | +# Category of the applet : 2 = files, 3 = internet, 4 = Desktop, 5 = accessory, 6 = fun |
3118 | +category = 5 |
3119 | + |
3120 | +# Version of the applet; change it everytime you change something in the config file. Don't forget to update the version both in this file and in the config file. |
3121 | +version = 0.0.1 |
3122 | + |
3123 | +# Default icon to use if no icon has been defined by the user. If not specified, or if the file is not found, the "icon" file will be used. |
3124 | +icon = |
3125 | + |
3126 | +# Whether the applet can be instanciated several times or not. |
3127 | +multi-instance = true |
3128 | |
3129 | === added file 'Dbus/demos/demo_ruby/demo_ruby' |
3130 | --- Dbus/demos/demo_ruby/demo_ruby 1970-01-01 00:00:00 +0000 |
3131 | +++ Dbus/demos/demo_ruby/demo_ruby 2011-03-17 14:49:16 +0000 |
3132 | @@ -0,0 +1,127 @@ |
3133 | +#!/usr/bin/ruby |
3134 | + |
3135 | +# This is a part of the external demo_ruby applet for Cairo-Dock |
3136 | +# |
3137 | +# Author: Eduardo Mucelli Rezende Oliveira |
3138 | +# E-mail: edumucelli@gmail.com or eduardom@dcc.ufmg.br |
3139 | +# |
3140 | +# This program is free software: you can redistribute it and/or modify |
3141 | +# it under the terms of the GNU General Public License as published by |
3142 | +# the Free Software Foundation, either version 3 of the License, or |
3143 | +# (at your option) any later version. |
3144 | + |
3145 | +# This program is distributed in the hope that it will be useful, |
3146 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3147 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3148 | +# GNU General Public License for more details. |
3149 | + |
3150 | +# This very simple applet features a counter from 0 to max_value. It displays the counter on the icon with a gauge and a quick info. |
3151 | +# Scroll on the icon increase or decrease the counter |
3152 | +# The menu offers the possibility to set some default value |
3153 | +# Left click on the icon will set a random value |
3154 | +# Middle click on the icon will raise a dialog asking you to set the value you want |
3155 | +# If you drop some text on the icon, it will be used as the icon's label |
3156 | +# Be aware to the messages, they are very wise :-) |
3157 | + |
3158 | +%w{rubygems dbus parseconfig CDApplet}.each { |x| require x } # requirements, do not forget CDApplet, it is not like Python |
3159 | + |
3160 | +class String |
3161 | + def to_b # string to boolean |
3162 | + ["true", "1", "T", "t"].include?(self.downcase) |
3163 | + end |
3164 | +end |
3165 | + |
3166 | +class Applet < CDApplet |
3167 | + attr_accessor :counter, :configuration |
3168 | + def initialize |
3169 | + self.counter = 0 |
3170 | + super |
3171 | + end |
3172 | + def start |
3173 | + self.icon.ShowDialog("I'm connected to Cairo-Dock !", 4) # show a dialog with this message for 4 seconds |
3174 | + self.icon.SetQuickInfo("#{self.counter}") # write the counter value on the icon |
3175 | + self.icon.AddDataRenderer("gauge", 1, self.configuration['theme']) # set 1 gauge with the theme read in config |
3176 | + self.icon.RenderValues([Float(self.counter)/self.configuration['max_value']]) # draw the gauge with an initial value |
3177 | + |
3178 | + self.sub_icons.AddSubIcons(["icon 1", "firefox-3.0", "id1", "icon 3", "thunderbird", "id3", "icon 4", "nautilus", "id4"]) |
3179 | + self.sub_icons.RemoveSubIcon("id2") # remove the 2nd icon of our sub-dock |
3180 | + self.sub_icons.SetQuickInfo("1", "id1") # write the ID on each icon of the sub-dock |
3181 | + self.sub_icons.SetQuickInfo("3", "id3") |
3182 | + self.sub_icons.SetQuickInfo("4", "id4") |
3183 | + end |
3184 | + |
3185 | + def get_config keyfile |
3186 | + self.configuration = {} |
3187 | + self.configuration['max_value'] = keyfile.params['Configuration']['max value'].to_i |
3188 | + self.configuration['theme'] = keyfile.params['Configuration']['theme'] |
3189 | + self.configuration['yes_no'] = keyfile.params['Configuration']['yesno'].to_b |
3190 | + end |
3191 | + |
3192 | + # callbacks on the main icon |
3193 | + def on_click iState |
3194 | + p "[+] roger, right-click" |
3195 | + render_counter (self.counter+10) |
3196 | + end |
3197 | + def on_middle_click |
3198 | + p "[+] yes sir, middle-click received" |
3199 | + self.icon.AskValue("Set the value you want", self.counter, self.configuration['max_value']) |
3200 | + end |
3201 | + def on_build_menu |
3202 | + p "[+] let's build the menu" |
3203 | + self.icon.PopulateMenu(["Reset the counter", "Set Medium Value", "Set Max Value"]) |
3204 | + end |
3205 | + def on_menu_select param |
3206 | + p "[+] let me guess, somebody chose the menu identified by the ID #{param}" |
3207 | + if param == 0 |
3208 | + render_counter 0 |
3209 | + elsif param == 1 |
3210 | + render_counter self.configuration['max_value']/2 |
3211 | + else |
3212 | + render_counter self.configuration['max_value'] |
3213 | + end |
3214 | + end |
3215 | + def on_scroll scroll_up |
3216 | + p "[+] is there anybody out there scrolling #{scroll_up ? "up" : "down"} on my icon ?" |
3217 | + if scroll_up |
3218 | + count = [self.configuration['max_value'], self.counter + 1].min |
3219 | + else |
3220 | + count = self.counter - 1 |
3221 | + end |
3222 | + render_counter count |
3223 | + end |
3224 | + def on_drop_data dropped_data |
3225 | + print "[+] ops, someone let #{dropped_data} fall into my icon" |
3226 | + self.icon.SetLabel(dropped_data) |
3227 | + end |
3228 | + def on_answer answer |
3229 | + p "[+] answer: #{answer}" |
3230 | + render_counter answer |
3231 | + end |
3232 | + |
3233 | + # callbacks on the applet |
3234 | + def stop |
3235 | + p "[+] bye bye" |
3236 | + exit |
3237 | + end |
3238 | + def reload |
3239 | + p "[+] our module was reloaded, welcome back!" |
3240 | + self.icon.AddDataRenderer("gauge", 1, myApplet.config['theme']) |
3241 | + self.icon.RenderValues([Float(self.counter)/self.configuration['max_value']]) |
3242 | + self.sub_icons.RemoveSubIcon("any") |
3243 | + self.sub_icons.AddSubIcons(["icon 1", "firefox-3.0", "id1", "icon 2", "natilus", "id2", "icon 3", "thunderbird", "id3"]) |
3244 | + end |
3245 | + |
3246 | + # callbacks on the sub-icons |
3247 | + def on_click_sub_icon state, icon_id |
3248 | + p "[+] something tells me that you clicked on the icon #{icon_id}" |
3249 | + end |
3250 | + |
3251 | + def render_counter cont |
3252 | + self.counter = cont # equivalent to the set_count method in demo_python |
3253 | + percent = Float(self.counter) / self.configuration['max_value'] |
3254 | + self.icon.RenderValues([percent]) |
3255 | + self.icon.SetQuickInfo("#{self.counter.to_i}") |
3256 | + end |
3257 | +end |
3258 | + |
3259 | +Applet.new.run |
3260 | |
3261 | === added file 'Dbus/demos/demo_ruby/demo_ruby.conf' |
3262 | --- Dbus/demos/demo_ruby/demo_ruby.conf 1970-01-01 00:00:00 +0000 |
3263 | +++ Dbus/demos/demo_ruby/demo_ruby.conf 2011-03-17 14:49:16 +0000 |
3264 | @@ -0,0 +1,101 @@ |
3265 | +#!en;0.0.1 |
3266 | + |
3267 | +#[gtk-about] |
3268 | +[Icon] |
3269 | +#j+[0;128] Desired icon size for this applet |
3270 | +#{Set to 0 to use the default applet size} |
3271 | +icon size = 0;0 |
3272 | + |
3273 | +#s Name of the icon as it will appear in its label in the dock : |
3274 | +name = Dbus Applet |
3275 | + |
3276 | +#S+ Image's filename : |
3277 | +#{Let empty to use the default one.} |
3278 | +icon = |
3279 | + |
3280 | +#d Name of the dock it belongs to: |
3281 | +dock name = |
3282 | + |
3283 | +order= |
3284 | + |
3285 | +#F[Applet's Handbook] |
3286 | +frame_hand= |
3287 | +#A |
3288 | +handbook=demo_ruby |
3289 | + |
3290 | +#[gtk-convert] |
3291 | +[Desklet] |
3292 | + |
3293 | +#j+[48;512] Desklet's dimension (width x height) : |
3294 | +#{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.} |
3295 | +size = 164;96 |
3296 | + |
3297 | +#i[-2048;2048] Desklet's position (x ; y) : |
3298 | +#{Depending on your WindowManager, you can move it with ALT + left_click} |
3299 | +x position=0 |
3300 | +#i[-2048;2048] ... |
3301 | +y position=0 |
3302 | + |
3303 | +#b Is detached from the dock ? |
3304 | +initially detached=false |
3305 | +#l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Accessibility : |
3306 | +#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)} |
3307 | +accessibility=0 |
3308 | +#b Should be visible on all desktops ? |
3309 | +sticky=true |
3310 | + |
3311 | +#b Lock position ? |
3312 | +#{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.} |
3313 | +locked = false |
3314 | + |
3315 | +#I[-180;180] Rotation : |
3316 | +#{in degrees.} |
3317 | +rotation = 0 |
3318 | + |
3319 | +use size= |
3320 | + |
3321 | +#F[Decorations;gtk-orientation-portrait] |
3322 | +frame_deco= |
3323 | + |
3324 | +#o+ Choose a decoration theme for this desklet : |
3325 | +#{Choose the 'personnal' one to define your own decorations below.} |
3326 | +decorations = default |
3327 | + |
3328 | +#v |
3329 | +sep_deco = |
3330 | + |
3331 | +#S+ Background image : |
3332 | +#{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.} |
3333 | +bg desklet = |
3334 | +#e+[0;1] Background tansparency : |
3335 | +bg alpha = 1 |
3336 | +#i+[0;256] Left offset : |
3337 | +#{in pixels. Use this to adjust the left position of the drawings.} |
3338 | +left offset = 0 |
3339 | +#i+[0;256] Top offset : |
3340 | +#{in pixels. Use this to adjust the top position of the drawings.} |
3341 | +top offset = 0 |
3342 | +#i+[0;256] Right offset : |
3343 | +#{in pixels. Use this to adjust the right position of the drawings.} |
3344 | +right offset = 0 |
3345 | +#i+[0;256] Bottom offset : |
3346 | +#{in pixels. Use this to adjust the bottom position of the drawings.} |
3347 | +bottom offset = 0 |
3348 | +#S+ Foreground image : |
3349 | +#{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.} |
3350 | +fg desklet = |
3351 | +#e+[0;1] Foreground tansparency : |
3352 | +fg alpha = 1 |
3353 | + |
3354 | +#[gtk-preferences] |
3355 | +[Configuration] |
3356 | + |
3357 | +#h+[/usr/share/cairo-dock/gauges;gauges;gauges] Choose one of the available themes :/ |
3358 | +theme = Turbo-night |
3359 | + |
3360 | +#i[10;100] Max value : |
3361 | +max value = 100 |
3362 | + |
3363 | +#b Yes / No ? |
3364 | +yesno = false |
3365 | + |
3366 | |
3367 | === added file 'Dbus/demos/demo_ruby/icon' |
3368 | Binary files Dbus/demos/demo_ruby/icon 1970-01-01 00:00:00 +0000 and Dbus/demos/demo_ruby/icon 2011-03-17 14:49:16 +0000 differ |
3369 | === added file 'Dbus/demos/demo_ruby/preview' |
3370 | Binary files Dbus/demos/demo_ruby/preview 1970-01-01 00:00:00 +0000 and Dbus/demos/demo_ruby/preview 2011-03-17 14:49:16 +0000 differ |
3371 | === modified file 'Dbus/demos/demo_vala/demo_vala.vala' (properties changed: +x to -x) |
3372 | --- Dbus/demos/demo_vala/demo_vala.vala 2010-08-07 01:43:25 +0000 |
3373 | +++ Dbus/demos/demo_vala/demo_vala.vala 2011-03-17 14:49:16 +0000 |
3374 | @@ -1,9 +1,8 @@ |
3375 | /* This is a part of the external demo applet for Cairo-Dock |
3376 | |
3377 | -Copyright : (C) 2010 by Fabounet |
3378 | +Copyright : (C) 2010-2011 by Fabounet |
3379 | E-mail : fabounet@glx-dock.org |
3380 | |
3381 | - |
3382 | This program is free software; you can redistribute it and/or |
3383 | modify it under the terms of the GNU General Public License |
3384 | as published by the Free Software Foundation; either version 2 |
3385 | @@ -28,12 +27,17 @@ |
3386 | /// If you drop some text on the icon, it will be used as the icon's label. |
3387 | |
3388 | /// Compile it with (you may have to install valac) : |
3389 | -/// valac --disable-dbus-transformation --pkg dbus-glib-1 -o demo_vala demo_vala.vala |
3390 | +/// valac --pkg CDApplet -o demo_vala demo_vala.vala |
3391 | +/// ou |
3392 | +/// valac -q -C --disable-warnings --pkg CDApplet demo_vala.vala |
3393 | +/// gcc -o demo_vala $(pkg-config --cflags --libs CDApplet) demo_vala.c |
3394 | + |
3395 | |
3396 | ///////////////////////// |
3397 | ///// dependancies ////// |
3398 | ///////////////////////// |
3399 | using GLib; |
3400 | +using CairoDock.Applet; |
3401 | |
3402 | struct Config { |
3403 | public string cTheme; |
3404 | @@ -41,57 +45,82 @@ |
3405 | public bool yesno; |
3406 | } |
3407 | |
3408 | -public class Applet : GLib.Object |
3409 | +public class MyApplet : CDApplet |
3410 | { |
3411 | - // internal data. |
3412 | - private dynamic DBus.Object icon; |
3413 | - private dynamic DBus.Object sub_icons; |
3414 | - private MainLoop loop; |
3415 | - private string applet_name; |
3416 | - private string conf_file; |
3417 | // my config. |
3418 | private Config config; |
3419 | // my data. |
3420 | private int count; |
3421 | |
3422 | - public Applet() |
3423 | + public MyApplet(string[] argv) |
3424 | { |
3425 | - this.applet_name = GLib.Path.get_basename(GLib.Environment.get_current_dir()); // the name of the applet must the same as the folder. |
3426 | - this.conf_file = GLib.Environment.get_home_dir()+"/.config/cairo-dock/current_theme/plug-ins/"+applet_name+"/"+applet_name+".conf"; // path to the conf file of our applet. |
3427 | - this.config = Config(); |
3428 | + //this.config = Config(); |
3429 | + base(argv); |
3430 | } |
3431 | |
3432 | - public void run() |
3433 | + /////////////////////// |
3434 | + /// private methods /// |
3435 | + /////////////////////// |
3436 | + |
3437 | + private void set_counter(int count) |
3438 | { |
3439 | - this.connect_to_bus(); |
3440 | - this.get_config(); |
3441 | - this.load(); |
3442 | - this.loop = new MainLoop(null, false); |
3443 | - this.loop.run(); |
3444 | + this.count = count; |
3445 | + double[] percent = {1.0*this.count/this.config.iMaxValue}; |
3446 | + base.icon.RenderValues(percent); |
3447 | + this.icon.SetQuickInfo("%d".printf(this.count)); |
3448 | } |
3449 | |
3450 | //////////////////////////////////////// |
3451 | ////// callbacks on the main icon ////// |
3452 | //////////////////////////////////////// |
3453 | - private void action_on_click(dynamic DBus.Object myIcon, int iState) |
3454 | + public override void on_click(int iState) |
3455 | { |
3456 | - print (">>> clic !\n"); |
3457 | + print ("*** clic !\n"); |
3458 | set_counter(GLib.Random.int_range(0,this.config.iMaxValue+1)); |
3459 | } |
3460 | - private void action_on_middle_click(dynamic DBus.Object myIcon) |
3461 | - { |
3462 | - print (">>> middle clic !\n"); |
3463 | - myIcon.AskValue("Set the value you want", (double)this.count, (double)this.config.iMaxValue); |
3464 | - } |
3465 | - private void action_on_build_menu(dynamic DBus.Object myIcon) |
3466 | - { |
3467 | - print (">>> build menu !\n"); |
3468 | - string[] entries = {"set min value", "set medium value", "set max value"}; |
3469 | - myIcon.PopulateMenu(entries); |
3470 | - } |
3471 | - private void action_on_menu_select(dynamic DBus.Object myIcon, int iNumEntry) |
3472 | - { |
3473 | - print (">>> choice %d has been selected !\n", iNumEntry); |
3474 | + public override void on_middle_click() |
3475 | + { |
3476 | + print ("*** middle clic !\n"); |
3477 | + //this.icon.AskValue("Set the value you want", (double)this.count, (double)this.config.iMaxValue); |
3478 | + HashTable<string,Variant>dialog_attributes = new HashTable<string,Variant>(str_hash, str_equal); |
3479 | + dialog_attributes.insert("icon", "stock_properties"); |
3480 | + dialog_attributes.insert("message", "Set the value you want"); |
3481 | + dialog_attributes.insert("buttons", "ok;cancel"); |
3482 | + HashTable<string,Variant> widget_attributes = new HashTable<string,Variant>(str_hash, str_equal); // even if you don't have widget attributes, you must fill the hash-table with at least 1 value, otherwise vala will crash :-/ |
3483 | + widget_attributes.insert("widget-type","scale"); |
3484 | + widget_attributes.insert("max-value",this.config.iMaxValue); |
3485 | + widget_attributes.insert("message","Set the value you want"); |
3486 | + this.icon.PopupDialog(dialog_attributes, widget_attributes); |
3487 | + } |
3488 | + public override void on_build_menu() |
3489 | + { |
3490 | + print ("*** build menu !\n"); |
3491 | + HashTable<string,Variant>[] pItems = {}; |
3492 | + HashTable<string,Variant> pItem; |
3493 | + |
3494 | + pItem = new HashTable<string,Variant?>(str_hash, str_equal); |
3495 | + pItem.insert("label", "set min value"); |
3496 | + pItem.insert("icon", "gtk-zoom-out"); |
3497 | + pItem.insert("id", 0); |
3498 | + pItems += pItem; |
3499 | + |
3500 | + pItem = new HashTable<string,Variant?>(str_hash, str_equal); |
3501 | + pItem.insert("label", "set medium value"); |
3502 | + pItem.insert("icon", "gtk-zoom-fit"); |
3503 | + pItem.insert("id", 1); |
3504 | + pItems += pItem; |
3505 | + |
3506 | + pItem = new HashTable<string,Variant?>(str_hash, str_equal); |
3507 | + pItem.insert("label", "set max value"); |
3508 | + pItem.insert("icon", "gtk-zoom-in"); |
3509 | + pItem.insert("id", 2); |
3510 | + pItems += pItem; |
3511 | + |
3512 | + this.icon.AddMenuItems(pItems); |
3513 | + } |
3514 | + public override void on_menu_select(int iNumEntry) |
3515 | + { |
3516 | + print ("*** choice %d has been selected !\n", iNumEntry); |
3517 | if (iNumEntry == 0) |
3518 | this.set_counter(0); |
3519 | else if (iNumEntry == 1) |
3520 | @@ -99,100 +128,63 @@ |
3521 | else if (iNumEntry == 2) |
3522 | this.set_counter(this.config.iMaxValue); |
3523 | } |
3524 | - private void action_on_scroll(dynamic DBus.Object myIcon, bool bScrollUp) |
3525 | + public override void on_scroll(bool bScrollUp) |
3526 | { |
3527 | - print (">>> scroll !\n"); |
3528 | + print ("*** scroll !\n"); |
3529 | + int count; |
3530 | if (bScrollUp) |
3531 | count = int.min(this.config.iMaxValue, this.count+1); |
3532 | else |
3533 | count = int.max(0, this.count-1); |
3534 | this.set_counter(count); |
3535 | } |
3536 | - private void action_on_drop_data(dynamic DBus.Object myIcon, string cReceivedData) |
3537 | + public override void on_drop_data(string cReceivedData) |
3538 | { |
3539 | - print (">>> received : %s\n",cReceivedData); |
3540 | + print ("*** received : %s\n",cReceivedData); |
3541 | this.icon.SetLabel(cReceivedData); |
3542 | } |
3543 | - private void action_on_answer(dynamic DBus.Object myIcon, Value answer) |
3544 | + public override void on_answer_dialog(int iButton, Variant answer) |
3545 | { |
3546 | - print (">>> answer : %d\n",(int)answer.get_double()); |
3547 | - this.set_counter((int)answer.get_double()); |
3548 | + print ("*** answer : %d\n",(int)answer.get_double()); |
3549 | + if (iButton == 0) // ok |
3550 | + this.set_counter((int)answer.get_double()); |
3551 | } |
3552 | + |
3553 | //////////////////////////////////////// |
3554 | ////// callbacks on the sub-icons ////// |
3555 | //////////////////////////////////////// |
3556 | - private void action_on_click_sub_icon(dynamic DBus.Object mySubIcons, int iState, string cIconID) |
3557 | + public override void on_click_sub_icon(int iState, string cIconID) |
3558 | { |
3559 | print ("clic on the sub-icon '%s' !\n", cIconID); |
3560 | } |
3561 | - ///////////////////////////////////// |
3562 | - ////// callbacks on the applet ////// |
3563 | - ///////////////////////////////////// |
3564 | - private void action_on_stop(dynamic DBus.Object myIcon) |
3565 | - { |
3566 | - print (">>> our module is stopped\n"); |
3567 | - loop.quit(); |
3568 | - } |
3569 | - |
3570 | - private void action_on_reload(dynamic DBus.Object myIcon, bool bConfigHasChanged) |
3571 | - { |
3572 | - print (">>> our module is reloaded"); |
3573 | - if (bConfigHasChanged) |
3574 | - { |
3575 | - print (">>> and our config has changed"); |
3576 | - this.get_config(); |
3577 | - this.icon.AddDataRenderer("gauge", 1, this.config.cTheme); |
3578 | - double[] percent = {1.0*this.count/this.config.iMaxValue}; |
3579 | - this.icon.RenderValues(percent); |
3580 | - this.sub_icons.RemoveSubIcon("any"); |
3581 | - string[] subicons = {"icon 1", "firefox-3.0", "id1", "icon 3", "thunderbird", "id3", "icon 4", "nautilus", "id4"}; |
3582 | - this.sub_icons.AddSubIcons(subicons); |
3583 | - } |
3584 | - } |
3585 | - ////////////////////////////////////// |
3586 | - ////// get our applet on the bus ///// |
3587 | - ////////////////////////////////////// |
3588 | - private void connect_to_bus() |
3589 | - { |
3590 | - string applet_path = "/org/cairodock/CairoDock/"+applet_name; // path where our object is stored on the bus. |
3591 | - DBus.Connection bus = DBus.Bus.get (DBus.BusType.SESSION); |
3592 | - if (bus == null) |
3593 | - { |
3594 | - GLib.error (">>> module '%s' can't be found on the bus, exit.", this.applet_name); |
3595 | - } |
3596 | - this.icon = bus.get_object ("org.cairodock.CairoDock", |
3597 | - applet_path, |
3598 | - "org.cairodock.CairoDock.applet"); // this object represents our applet and also our icon. It can be either in a dock or in a desklet, we don't have to care. |
3599 | - |
3600 | - ////// we'll have a sub-dock, so we also get the sub-icons object ////// |
3601 | - this.sub_icons = bus.get_object ("org.cairodock.CairoDock", |
3602 | - applet_path+"/sub_icons", |
3603 | - "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. |
3604 | - |
3605 | - this.icon.on_click += action_on_click; // when the user left-clicks on our icon. |
3606 | - this.icon.on_middle_click += action_on_middle_click; // when the user middle-clicks on our icon. |
3607 | - this.icon.on_build_menu += action_on_build_menu; // when the user right-clicks on our applet (which builds the menu) |
3608 | - this.icon.on_menu_select += action_on_menu_select; // when the user selects an entry of this menu. |
3609 | - this.icon.on_scroll += action_on_scroll; // when the user scroll up or down on our icon. |
3610 | - this.icon.on_drop_data += action_on_drop_data; // when the user drops something on our icon. |
3611 | - this.icon.on_answer += action_on_answer; // when the user answer a question. |
3612 | - this.icon.on_stop_module += action_on_stop; // when the user deactivate our applet (or the DBus plug-in, or when the Cairo-Dock is stopped). |
3613 | - this.icon.on_reload_module += action_on_reload; // when the user changes something in our config, or when the desklet is resized (with no change in the config). |
3614 | - this.sub_icons.on_click_sub_icon += action_on_click_sub_icon; // when the user left-clicks on a sub-icon. |
3615 | - } |
3616 | - private void get_config() |
3617 | - { |
3618 | - GLib.KeyFile keyfile = new GLib.KeyFile(); |
3619 | - keyfile.load_from_file(this.conf_file, GLib.KeyFileFlags.NONE); |
3620 | - |
3621 | + |
3622 | + /////////////////////////////// |
3623 | + ////// applet definition ////// |
3624 | + /////////////////////////////// |
3625 | + public override void end() |
3626 | + { |
3627 | + print ("*** our module is stopped\n"); |
3628 | + } |
3629 | + |
3630 | + public override void reload() |
3631 | + { |
3632 | + this.icon.AddDataRenderer("gauge", 1, this.config.cTheme); |
3633 | + double[] percent = {1.0*this.count/this.config.iMaxValue}; |
3634 | + this.icon.RenderValues(percent); |
3635 | + this.sub_icons.RemoveSubIcon("any"); |
3636 | + string[] subicons = {"icon 1", "firefox-3.0", "id1", "icon 3", "thunderbird", "id3", "icon 4", "nautilus", "id4"}; |
3637 | + this.sub_icons.AddSubIcons(subicons); |
3638 | + } |
3639 | + public override void get_config(GLib.KeyFile keyfile) |
3640 | + { |
3641 | this.config.cTheme = keyfile.get_string("Configuration", "theme"); |
3642 | + print ("cTheme: %s\n", this.config.cTheme); |
3643 | this.config.iMaxValue = keyfile.get_integer("Configuration", "max value"); |
3644 | this.config.yesno = keyfile.get_boolean("Configuration", "yesno"); |
3645 | } |
3646 | - private void load() |
3647 | + public override void begin() |
3648 | { |
3649 | this.icon.ShowDialog("I'm connected to Cairo-Dock !", 4); // show a dialog with this message for 4 seconds. |
3650 | - this.icon.SetQuickInfo("%d".printf(this.count)); // write the counter value on the icon. |
3651 | this.icon.AddDataRenderer("gauge", 1, this.config.cTheme); // set a gauge with the theme read in config to display the value of the counter. |
3652 | double[] percent = {1.0*this.count/this.config.iMaxValue}; |
3653 | this.icon.RenderValues(percent); // draw the gauge with an initial value. |
3654 | @@ -202,23 +194,16 @@ |
3655 | this.sub_icons.SetQuickInfo("1", "id1"); // write the ID on each icon of the sub-dock. |
3656 | this.sub_icons.SetQuickInfo("3", "id3"); |
3657 | this.sub_icons.SetQuickInfo("4", "id4"); |
3658 | - } |
3659 | - private void set_counter(int count) |
3660 | - { |
3661 | - this.count = count; |
3662 | - double[] percent = {1.0*this.count/this.config.iMaxValue}; |
3663 | - this.icon.RenderValues(percent); |
3664 | - this.icon.SetQuickInfo("%d".printf(this.count)); |
3665 | + print ("DEMO %s\n", this.config.cTheme); |
3666 | } |
3667 | } |
3668 | |
3669 | ////////////////// |
3670 | ////// main ////// |
3671 | ////////////////// |
3672 | -static int main (string[] args) |
3673 | +static int main (string[] argv) |
3674 | { |
3675 | - var myApplet = new Applet(); |
3676 | + var myApplet = new MyApplet(argv); |
3677 | myApplet.run(); |
3678 | - print("bye\n"); |
3679 | return 0; |
3680 | } |
3681 | |
3682 | === modified file 'Dbus/demos/demo_vala/icon' (properties changed: +x to -x) |
3683 | === modified file 'Dbus/demos/demo_vala/preview' (properties changed: +x to -x) |
3684 | === added directory 'Dbus/interfaces' |
3685 | === added file 'Dbus/interfaces/CMakeLists.txt' |
3686 | --- Dbus/interfaces/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3687 | +++ Dbus/interfaces/CMakeLists.txt 2011-03-17 14:49:16 +0000 |
3688 | @@ -0,0 +1,14 @@ |
3689 | + |
3690 | +if ("${PYTHON_FOUND}" STREQUAL "TRUE") |
3691 | + add_subdirectory(python) |
3692 | + add_subdirectory(bash) |
3693 | +endif() |
3694 | +if ("${RUBY_FOUND}" STREQUAL "TRUE") |
3695 | + add_subdirectory(ruby) |
3696 | +endif() |
3697 | +if ("${MONO_FOUND}" STREQUAL "TRUE") |
3698 | + add_subdirectory(mono) |
3699 | +endif() |
3700 | +if ("${with_vala}" STREQUAL "yes") |
3701 | + add_subdirectory(vala) |
3702 | +endif() |
3703 | |
3704 | === added directory 'Dbus/interfaces/bash' |
3705 | === added file 'Dbus/interfaces/bash/BashInstall.cmake.in' |
3706 | --- Dbus/interfaces/bash/BashInstall.cmake.in 1970-01-01 00:00:00 +0000 |
3707 | +++ Dbus/interfaces/bash/BashInstall.cmake.in 2011-03-17 14:49:16 +0000 |
3708 | @@ -0,0 +1,15 @@ |
3709 | +IF("@ROOT_PREFIX@" STREQUAL "") |
3710 | + EXEC_PROGRAM("@PYTHON_EXECUTABLE@" "${CMAKE_CURRENT_BINARY_DIR}" ARGS |
3711 | + "setup.py" "install" |
3712 | + "--prefix=${CMAKE_INSTALL_PREFIX}" |
3713 | + "@DEBIAN_INSTALL_LAYOUT@") |
3714 | +ELSEIF(NOT "@ROOT_PREFIX@" STREQUAL "" AND "@python_no_deb_layout@" STREQUAL "") |
3715 | + EXEC_PROGRAM("@PYTHON_EXECUTABLE@" "${CMAKE_CURRENT_BINARY_DIR}" ARGS |
3716 | + "setup.py" "install" |
3717 | + "--root=@ROOT_PREFIX@" |
3718 | + "@DEBIAN_INSTALL_LAYOUT@") |
3719 | +ELSE() |
3720 | + EXEC_PROGRAM("@PYTHON_EXECUTABLE@" "${CMAKE_CURRENT_BINARY_DIR}" ARGS |
3721 | + "setup.py" "install" |
3722 | + "--root=@ROOT_PREFIX@") |
3723 | +ENDIF() |
3724 | |
3725 | === added file 'Dbus/interfaces/bash/CDBashApplet.py' |
3726 | --- Dbus/interfaces/bash/CDBashApplet.py 1970-01-01 00:00:00 +0000 |
3727 | +++ Dbus/interfaces/bash/CDBashApplet.py 2011-03-17 14:49:16 +0000 |
3728 | @@ -0,0 +1,83 @@ |
3729 | +#!/usr/bin/python |
3730 | + |
3731 | +# This is a part of the external applets for Cairo-Dock |
3732 | +# Copyright : (C) 2010-2011 by Nochka85, Fabounet and Matttbe |
3733 | +# E-mail : fabounet@glx-dock.org |
3734 | +# |
3735 | +# This program is free software; you can redistribute it and/or |
3736 | +# modify it under the terms of the GNU General Public License |
3737 | +# as published by the Free Software Foundation; either version 2 |
3738 | +# of the License, or (at your option) any later version. |
3739 | +# |
3740 | +# This program is distributed in the hope that it will be useful, |
3741 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3742 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3743 | +# GNU General Public License for more details. |
3744 | +# http://www.gnu.org/licenses/licenses.html#GPL |
3745 | + |
3746 | +#################### |
3747 | +### dependancies ### |
3748 | +#################### |
3749 | +import os.path |
3750 | +from CDApplet import CDApplet |
3751 | + |
3752 | +#################### |
3753 | +### Applet class ### |
3754 | +#################### |
3755 | +class CDBashApplet(CDApplet): |
3756 | + def __init__(self): |
3757 | + # call high-level init |
3758 | + self.app_folder = os.path.abspath(".") |
3759 | + CDApplet.__init__(self) |
3760 | + |
3761 | + ##### private methods ##### |
3762 | + |
3763 | + def call(self,action): |
3764 | + os.popen("cd " + self.app_folder + " && ./" + self.cAppletName + ".sh " + self.cAppletName + " " + self.cBusPath + " " + self.cConfFile + " " + self.cParentAppName + " " + action).read().rstrip() |
3765 | + |
3766 | + ##### applet definition ##### |
3767 | + |
3768 | + def get_config(self,keyfile): |
3769 | + self.call("get_config") |
3770 | + |
3771 | + def end(self): |
3772 | + self.call("end") |
3773 | + |
3774 | + def begin(self): |
3775 | + self.call("begin") |
3776 | + |
3777 | + def reload(self): |
3778 | + self.call("reload") |
3779 | + |
3780 | + ##### callbacks ##### |
3781 | + |
3782 | + def on_click(self,iState): |
3783 | + self.call("on_click "+str(iState)) |
3784 | + |
3785 | + def on_middle_click(self): |
3786 | + self.call("on_middle_click") |
3787 | + |
3788 | + def on_build_menu(self): |
3789 | + self.call("on_build_menu") |
3790 | + |
3791 | + def on_menu_select(self,iNumEntry): |
3792 | + self.call("on_menu_select "+str(iNumEntry)) |
3793 | + |
3794 | + def on_scroll(self,bScrollUp): |
3795 | + self.call("on_scroll "+str(bScrollUp)) |
3796 | + |
3797 | + def on_drop_data(self,cReceivedData): |
3798 | + self.call("on_drop_data '"+cReceivedData+"'") |
3799 | + |
3800 | + def on_answer_dialog(self, button, answer): |
3801 | + self.call("on_answer_dialog "+str(button)+" '"+str(answer)+"'") |
3802 | + |
3803 | + def on_shortkey(self,key): |
3804 | + self.call("on_shortkey '"+key+"'") |
3805 | + |
3806 | + def on_change_focus(self,bIsActive): |
3807 | + self.call("on_change_focus '"+str(bIsActive)+"'") |
3808 | + |
3809 | + def on_click_sub_icon(self, iState, cIconID): |
3810 | + self.call("on_click_sub_icon '"+str(iState)+"' '"+cIconID+"'") |
3811 | + |
3812 | |
3813 | === added file 'Dbus/interfaces/bash/CDBashApplet.sh' |
3814 | --- Dbus/interfaces/bash/CDBashApplet.sh 1970-01-01 00:00:00 +0000 |
3815 | +++ Dbus/interfaces/bash/CDBashApplet.sh 2011-03-17 14:49:16 +0000 |
3816 | @@ -0,0 +1,178 @@ |
3817 | +#!/bin/bash |
3818 | + |
3819 | +# This is a part of the external applets for Cairo-Dock |
3820 | +# Copyright : (C) 2010-2011 by Nochka85 |
3821 | +# modified by matttbe for the new API |
3822 | +# (based on the demo.py by Fabounet) |
3823 | +# E-mail : fabounet@glx-dock.org, nochka85@glx-dock.org |
3824 | +# |
3825 | +# This program is free software; you can redistribute it and/or |
3826 | +# modify it under the terms of the GNU General Public License |
3827 | +# as published by the Free Software Foundation; either version 2 |
3828 | +# of the License, or (at your option) any later version. |
3829 | +# |
3830 | +# This program is distributed in the hope that it will be useful, |
3831 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3832 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3833 | +# GNU General Public License for more details. |
3834 | +# http://www.gnu.org/licenses/licenses.html#GPL |
3835 | + |
3836 | +## Rev : 09/02/2011 |
3837 | + |
3838 | +APP_NAME="$1" |
3839 | +shift 1 |
3840 | +DBUS_NAME="org.cairodock.CairoDock" |
3841 | +DBUS_PATH="$1" |
3842 | +shift 1 |
3843 | +DBUS_INTERFACE="org.cairodock.CairoDock" |
3844 | +CONF_FILE="$1" |
3845 | +shift 1 |
3846 | +PARENT_APP_NAME="$1" |
3847 | +shift 1 |
3848 | + |
3849 | +BOTTOM=0 |
3850 | +TOP=1 |
3851 | +RIGHT=2 |
3852 | +LEFT=3 |
3853 | +DOCK=0 |
3854 | +DESKLET=1 |
3855 | +UPPER_LEFT=0 |
3856 | +LOWER_RIGHT=1 |
3857 | +LOWER_LEFT=2 |
3858 | +UPPER_RIGHT=3 |
3859 | +MIDDLE=4 |
3860 | +MENU_ENTRY=0 |
3861 | +MENU_SUB_MENU=1 |
3862 | +MENU_SEPARATOR=2 |
3863 | +MENU_CHECKBOX=3 |
3864 | +MENU_RADIO_BUTTON=4 |
3865 | +MAIN_MENU_ID=0 |
3866 | +DIALOG_KEY_ENTER=-1 |
3867 | +DIALOG_KEY_ESCAPE=-2 |
3868 | + |
3869 | +call() { # method, args |
3870 | + method=$1 |
3871 | + shift 1 |
3872 | + command=`echo -e "dbus-send --session --dest=$DBUS_NAME $DBUS_PATH $DBUS_INTERFACE.applet.$method $*"` |
3873 | + eval $command |
3874 | +} |
3875 | + |
3876 | +call_sub_icon() { # method, args |
3877 | + method=$1 |
3878 | + shift |
3879 | + command=`echo "dbus-send --session --dest=$DBUS_NAME $DBUS_PATH/sub_icons $DBUS_INTERFACE.subapplet.$method $*"` |
3880 | + eval $command |
3881 | +} |
3882 | + |
3883 | +get_conf_param() { # group, key |
3884 | + LINE=`cat $CONF_FILE | grep "$1"` |
3885 | + echo $LINE | cut -f2 -d '=' |
3886 | +} |
3887 | + |
3888 | +############################################################################################################# |
3889 | + |
3890 | +on_click() |
3891 | +{ |
3892 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Left clic !" |
3893 | +} |
3894 | + |
3895 | +on_middle_click() |
3896 | +{ |
3897 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Middle clic !" |
3898 | +} |
3899 | + |
3900 | +on_scroll_icon() |
3901 | +{ |
3902 | + echo -n "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Scroll" |
3903 | + if [ $1 -eq 1 ]; then |
3904 | + echo " UP !" |
3905 | + else |
3906 | + echo " DOWN !" |
3907 | + fi |
3908 | +} |
3909 | + |
3910 | +on_drop_data() |
3911 | +{ |
3912 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> $1 has been dropped on applet !" |
3913 | +} |
3914 | + |
3915 | +on_build_menu() |
3916 | +{ |
3917 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Build menu !" |
3918 | +} |
3919 | + |
3920 | +on_menu_select() |
3921 | +{ |
3922 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> Choice $1 has been selected !" |
3923 | +} |
3924 | + |
3925 | +on_shortkey() |
3926 | +{ |
3927 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> key $1 has been pressed !" |
3928 | +} |
3929 | + |
3930 | +on_change_focus() |
3931 | +{ |
3932 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> focus has changed to $1 !" |
3933 | +} |
3934 | + |
3935 | +on_answer_dialog() |
3936 | +{ |
3937 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> $2 has been answered with button $1!" |
3938 | +} |
3939 | + |
3940 | +on_click_sub_icon() |
3941 | +{ |
3942 | + echo "$APP_NAME applet -> Script Name : $SCRIPT_NAME -> sub-icon $2 has been left-clicked !" |
3943 | +} |
3944 | + |
3945 | +############################################################################################################# |
3946 | + |
3947 | +begin() |
3948 | +{ |
3949 | + echo "start !" |
3950 | +} |
3951 | + |
3952 | +end() |
3953 | +{ |
3954 | + echo "stop !" |
3955 | +} |
3956 | + |
3957 | +reload() |
3958 | +{ |
3959 | + echo "reload !" |
3960 | +} |
3961 | + |
3962 | +############################################################################################################# |
3963 | + |
3964 | +run() |
3965 | +{ |
3966 | + shift 4 |
3967 | + if [ "$1" = "on_click" ]; then |
3968 | + on_click $2 |
3969 | + elif [ "$1" = "on_middle_click" ]; then |
3970 | + on_middle_click |
3971 | + elif [ "$1" = "on_scroll" ]; then |
3972 | + on_scroll_icon $2 |
3973 | + elif [ "$1" = "on_drop_data" ]; then |
3974 | + on_drop_data "$2" |
3975 | + elif [ "$1" = "on_build_menu" ]; then |
3976 | + on_build_menu |
3977 | + elif [ "$1" = "on_menu_select" ]; then |
3978 | + on_menu_select $2 |
3979 | + elif [ "$1" = "on_answer_dialog" ]; then |
3980 | + on_answer_dialog $2 "$3" |
3981 | + elif [ "$1" = "on_shortkey" ]; then |
3982 | + on_shortkey "$2" |
3983 | + elif [ "$1" = "on_change_focus" ]; then |
3984 | + on_change_focus $2 |
3985 | + elif [ "$1" = "on_click_sub_icon" ]; then |
3986 | + on_click_sub_icon $2 "$3" |
3987 | + elif [ "$1" = "begin" ]; then |
3988 | + begin |
3989 | + elif [ "$1" = "end" ]; then |
3990 | + end |
3991 | + elif [ "$1" = "reload" ]; then |
3992 | + reload |
3993 | + fi |
3994 | +} |
3995 | |
3996 | === added file 'Dbus/interfaces/bash/CMakeLists.txt' |
3997 | --- Dbus/interfaces/bash/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3998 | +++ Dbus/interfaces/bash/CMakeLists.txt 2011-03-17 14:49:16 +0000 |
3999 | @@ -0,0 +1,19 @@ |
4000 | + |
4001 | +########### install files ############### |
4002 | + |
4003 | +# the python script goes with other python scripts. |
4004 | +if (NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") |
4005 | + # copy *.py to current binary dir (cleaner) |
4006 | + execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/CDBashApplet.py" ${CMAKE_CURRENT_BINARY_DIR}) |
4007 | + exec_program("${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}" ARGS "setup.py" "-q" "build") |
4008 | +endif() |
4009 | +# Run a custom script with 'make install' |
4010 | +add_custom_target(bash_pyc ALL) |
4011 | +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/BashInstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/BashInstall.cmake) |
4012 | +set_target_properties(bash_pyc PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/BashInstall.cmake) |
4013 | + |
4014 | +# and the bash functions goes into the data dir of the applet (didn't find a better place). |
4015 | +install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/CDBashApplet.sh |
4016 | + DESTINATION ${dbusdatadir} |
4017 | + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE |
4018 | +WORLD_READ WORLD_EXECUTE) |
4019 | |
4020 | === added file 'Dbus/interfaces/bash/setup.py' |
4021 | --- Dbus/interfaces/bash/setup.py 1970-01-01 00:00:00 +0000 |
4022 | +++ Dbus/interfaces/bash/setup.py 2011-03-17 14:49:16 +0000 |
4023 | @@ -0,0 +1,25 @@ |
4024 | +# This is a part of the external demo applet for Cairo-Dock |
4025 | +# Copyright : (C) 2011 by matttbe |
4026 | +# E-mail : matttbe@glx-dock.org |
4027 | +# |
4028 | +# This program is free software; you can redistribute it and/or |
4029 | +# modify it under the terms of the GNU General Public License |
4030 | +# as published by the Free Software Foundation; either version 2 |
4031 | +# of the License, or (at your option) any later version. |
4032 | +# |
4033 | +# This program is distributed in the hope that it will be useful, |
4034 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4035 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4036 | +# GNU General Public License for more details. |
4037 | +# http://www.gnu.org/licenses/licenses.html#GPL |
4038 | + |
4039 | +from distutils.core import setup |
4040 | +setup(name='CDBashApplet', |
4041 | + version='1.0', |
4042 | + license='GPL-3', |
4043 | + author='Fabrice Rey', |
4044 | + author_email='fabounet@glx-dock.org', |
4045 | + description='Bash interface for Cairo-Dock', |
4046 | + url='https://launchpad.net/cairo-dock', |
4047 | + py_modules=['CDBashApplet'] |
4048 | + ) |
4049 | |
4050 | === added directory 'Dbus/interfaces/mono' |
4051 | === added file 'Dbus/interfaces/mono/CDApplet.cs' |
4052 | --- Dbus/interfaces/mono/CDApplet.cs 1970-01-01 00:00:00 +0000 |
4053 | +++ Dbus/interfaces/mono/CDApplet.cs 2011-03-17 14:49:16 +0000 |
4054 | @@ -0,0 +1,273 @@ |
4055 | +// |
4056 | +// |
4057 | +//This is a part of the external demo applet for Cairo-Dock |
4058 | +// |
4059 | +//Copyright : (C) 2010-2011 by Fabounet |
4060 | +//E-mail : fabounet@glx-dock.org |
4061 | +// |
4062 | +// |
4063 | +//This program is free software; you can redistribute it and/or |
4064 | +//modify it under the terms of the GNU General Public License |
4065 | +//as published by the Free Software Foundation; either version 2 |
4066 | +//of the License, or (at your option) any later version. |
4067 | +// |
4068 | +//This program is distributed in the hope that it will be useful, |
4069 | +//but WITHOUT ANY WARRANTY; without even the implied warranty of |
4070 | +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4071 | +//GNU General Public License for more details. |
4072 | +//http://www.gnu.org/licenses/licenses.html//GPL |
4073 | + |
4074 | +// Base class for Cairo-Dock's applets. |
4075 | +// Make your own class derive from a CDApplet, and override the functions you need (the ones which don't start with an underscore). |
4076 | + |
4077 | +// Compile it with the following command, then rename 'demo_mono.exe' to 'demo_mono'. |
4078 | +// gmcs /target:library CDApplet.cs ISubApplet.cs IApplet.cs -pkg:glib-sharp-2.0 -pkg:ndesk-dbus-1.0 -pkg:ndesk-dbus-glib-1.0 |
4079 | + ////////////////////////// |
4080 | + ////// dependancies ////// |
4081 | +////////////////////////// |
4082 | +using System; // Environment |
4083 | +using System.IO; // Path, Directory |
4084 | +using System.Reflection; |
4085 | +using GLib; |
4086 | +using NDesk.DBus; |
4087 | +using CairoDock.Applet; |
4088 | + |
4089 | +//namespace CairoDock.Applet |
4090 | +//{ |
4091 | +public class CDApplet |
4092 | +{ |
4093 | + public string cAppletName = null; |
4094 | + public string cParentAppName = null; |
4095 | + public string cBusPath = null; |
4096 | + public string cConfFile = null; |
4097 | + public IApplet icon = null; |
4098 | + public ISubApplet sub_icons= null; |
4099 | + private GLib.MainLoop loop = null; |
4100 | + private string cMenuIconId = null; |
4101 | + |
4102 | + public enum ScreenPosition { |
4103 | + BOTTOM = 0, |
4104 | + TOP, |
4105 | + RIGHT, |
4106 | + LEFT |
4107 | + } |
4108 | + public enum ContainerType { |
4109 | + DOCK = 0, |
4110 | + DESKLET |
4111 | + } |
4112 | + public enum EmblemPosition { |
4113 | + UPPER_LEFT = 0, |
4114 | + LOWER_RIGHT, |
4115 | + LOWER_LEFT, |
4116 | + UPPER_RIGHT, |
4117 | + MIDDLE |
4118 | + } |
4119 | + public enum MenuItemType { |
4120 | + MENU_ENTRY = 0, |
4121 | + MENU_SUB_MENU, |
4122 | + MENU_SEPARATOR, |
4123 | + MENU_CHECKBOX, |
4124 | + MENU_RADIO_BUTTON |
4125 | + } |
4126 | + |
4127 | + public enum MenuItemId { |
4128 | + MAIN_MENU_ID = 0 |
4129 | + } |
4130 | + |
4131 | + public enum DialogKey { |
4132 | + DIALOG_KEY_ENTER = -1, |
4133 | + DIALOG_KEY_ESCAPE = -2 |
4134 | + } |
4135 | + |
4136 | + public CDApplet() |
4137 | + { |
4138 | + String[] argv = Environment.GetCommandLineArgs(); |
4139 | + this.cAppletName = argv[0].Substring(2); |
4140 | + this.cBusPath = argv[2]; |
4141 | + this.cConfFile = argv[3]; |
4142 | + this.cParentAppName = argv[4]; |
4143 | + |
4144 | + this._get_config (); |
4145 | + this._connect_to_dock (); |
4146 | + } |
4147 | + |
4148 | + public void run() |
4149 | + { |
4150 | + this.begin(); |
4151 | + loop = new GLib.MainLoop(); |
4152 | + loop.Run(); |
4153 | + Console.WriteLine(">>> Applet " + this.cAppletName + " terminated"); |
4154 | + } |
4155 | + |
4156 | + ////////////////////////////////// |
4157 | + /// callbacks on the main icon /// |
4158 | + ////////////////////////////////// |
4159 | + |
4160 | + public virtual void on_click (int iClickState) |
4161 | + { |
4162 | + Console.WriteLine(">>> click"); |
4163 | + } |
4164 | + public virtual void on_middle_click () |
4165 | + { |
4166 | + Console.WriteLine(">>> middle click"); |
4167 | + } |
4168 | + public virtual void on_scroll (bool bScrollUp) |
4169 | + { |
4170 | + Console.WriteLine(">>> scroll up " + bScrollUp); |
4171 | + } |
4172 | + private void _on_build_menu () |
4173 | + { |
4174 | + this.cMenuIconId = null; |
4175 | + this.on_build_menu (); |
4176 | + } |
4177 | + public virtual void on_build_menu () |
4178 | + { |
4179 | + Console.WriteLine(">>> build menu"); |
4180 | + } |
4181 | + private void _on_menu_select (int iNumEntry) |
4182 | + { |
4183 | + if (this.cMenuIconId == null) |
4184 | + this.on_menu_select (iNumEntry); |
4185 | + else |
4186 | + this.on_menu_select_sub_icon (iNumEntry, this.cMenuIconId); |
4187 | + } |
4188 | + public virtual void on_menu_select (int iNumEntry) |
4189 | + { |
4190 | + Console.WriteLine(">>> select entry : "+iNumEntry); |
4191 | + } |
4192 | + public virtual void on_drop_data (string cReceivedData) |
4193 | + { |
4194 | + Console.WriteLine(">>> drop : "+cReceivedData); |
4195 | + } |
4196 | + public virtual void on_answer (System.Object answer) |
4197 | + { |
4198 | + Console.WriteLine(">>> answer : "+answer); |
4199 | + } |
4200 | + public virtual void on_answer_dialog (int iButton, System.Object answer) |
4201 | + { |
4202 | + Console.WriteLine(">>> answer : "+answer); |
4203 | + } |
4204 | + public virtual void on_shortkey (string cKey) |
4205 | + { |
4206 | + Console.WriteLine(">>> key : "+cKey); |
4207 | + } |
4208 | + public virtual void on_change_focus (bool bIsActive) |
4209 | + { |
4210 | + Console.WriteLine(">>> focus changed : "+bIsActive); |
4211 | + } |
4212 | + |
4213 | + ////////////////////////////////// |
4214 | + /// callbacks on the sub-icons /// |
4215 | + ////////////////////////////////// |
4216 | + |
4217 | + public virtual void on_click_sub_icon (int iClickState, string cIconID) |
4218 | + { |
4219 | + Console.WriteLine(">>> click on sub-icon "+cIconID); |
4220 | + } |
4221 | + |
4222 | + public virtual void on_middle_click_sub_icon (string cIconID) |
4223 | + { |
4224 | + Console.WriteLine(">>> middle-click on sub-icon "+cIconID); |
4225 | + } |
4226 | + |
4227 | + public virtual void on_scroll_sub_icon (bool bScrollUp, string cIconID) |
4228 | + { |
4229 | + Console.WriteLine(">>> scroll on sub-icon "+cIconID); |
4230 | + } |
4231 | + |
4232 | + private void _on_build_menu_sub_icon (string cIconID) |
4233 | + { |
4234 | + this.cMenuIconId = cIconID; |
4235 | + this.on_build_menu_sub_icon (cIconID); |
4236 | + } |
4237 | + public virtual void on_build_menu_sub_icon (string cIconID) |
4238 | + { |
4239 | + Console.WriteLine(">>> menu on sub-icon "+cIconID); |
4240 | + } |
4241 | + |
4242 | + public virtual void on_menu_select_sub_icon (int iNumEntry, string cIconID) |
4243 | + { |
4244 | + Console.WriteLine(">>> menu entry "+iNumEntry+" selected on sub-icon "+cIconID); |
4245 | + } |
4246 | + |
4247 | + public virtual void on_drop_data_sub_icon (string cReceivedData, string cIconID) |
4248 | + { |
4249 | + Console.WriteLine(">>> data "+cReceivedData+" dropped on sub-icon "+cIconID); |
4250 | + } |
4251 | + |
4252 | + public virtual void on_answer_sub_icon (System.Object answer, string cIconID) |
4253 | + { |
4254 | + Console.WriteLine(">>> answer "+answer+" from sub-icon "+cIconID); |
4255 | + } |
4256 | + |
4257 | + /////////////////////////////// |
4258 | + /// callbacks on the applet /// |
4259 | + /////////////////////////////// |
4260 | + |
4261 | + public virtual void begin () |
4262 | + { |
4263 | + |
4264 | + } |
4265 | + |
4266 | + public virtual void end () |
4267 | + { |
4268 | + |
4269 | + } |
4270 | + |
4271 | + private void _on_stop () |
4272 | + { |
4273 | + this.end(); |
4274 | + this.loop.Quit(); |
4275 | + } |
4276 | + |
4277 | + public virtual void reload () |
4278 | + { |
4279 | + |
4280 | + } |
4281 | + |
4282 | + private void _on_reload (bool bConfigHasChanged) |
4283 | + { |
4284 | + if (bConfigHasChanged) |
4285 | + { |
4286 | + this._get_config(); |
4287 | + this.reload(); |
4288 | + } |
4289 | + } |
4290 | + |
4291 | + public virtual void get_config (string cConfFile_path) |
4292 | + { |
4293 | + |
4294 | + } |
4295 | + |
4296 | + private void _get_config() |
4297 | + { |
4298 | + this.get_config(this.cConfFile); |
4299 | + } |
4300 | + |
4301 | + private void _connect_to_dock () |
4302 | + { |
4303 | + NDesk.DBus.BusG.Init(); |
4304 | + NDesk.DBus.Bus bus = NDesk.DBus.Bus.Session; |
4305 | + this.icon = bus.GetObject<IApplet> ("org.cairodock.CairoDock", new ObjectPath (this.cBusPath)); |
4306 | + this.icon.on_click += new OnClickEvent (on_click); |
4307 | + this.icon.on_middle_click += new OnMiddleClickEvent (on_middle_click); |
4308 | + this.icon.on_scroll += new OnScrollEvent (on_scroll); |
4309 | + this.icon.on_build_menu += new OnBuildMenuEvent (_on_build_menu); |
4310 | + this.icon.on_menu_select += new OnMenuSelectEvent (_on_menu_select); |
4311 | + this.icon.on_drop_data += new OnDropDataEvent (on_drop_data); |
4312 | + this.icon.on_answer += new OnAnswerEvent (on_answer); |
4313 | + this.icon.on_answer_dialog += new OnAnswerDialogEvent (on_answer_dialog); |
4314 | + this.icon._on_stop += new OnStopModuleEvent (_on_stop); |
4315 | + this.icon._on_reload += new OnReloadModuleEvent (_on_reload); |
4316 | + |
4317 | + this.sub_icons = bus.GetObject<ISubApplet>("org.cairodock.CairoDock", new ObjectPath(this.cBusPath + "/sub_icons")); |
4318 | + this.sub_icons.on_click_sub_icon += new OnClickSubIconEvent (on_click_sub_icon); |
4319 | + this.sub_icons.on_middle_click_sub_icon += new OnMiddleClickSubIconEvent (on_middle_click_sub_icon); |
4320 | + this.sub_icons.on_scroll_sub_icon += new OnScrollSubIconEvent (on_scroll_sub_icon); |
4321 | + this.sub_icons.on_build_menu_sub_icon += new OnBuildMenuSubIconEvent (_on_build_menu_sub_icon); |
4322 | + this.sub_icons.on_menu_select_sub_icon += new OnMenuSelectSubIconEvent (on_menu_select_sub_icon); |
4323 | + this.sub_icons.on_drop_data_sub_icon += new OnDropDataSubIconEvent (on_drop_data_sub_icon); |
4324 | + this.sub_icons.on_answer_sub_icon += new OnAnswerSubIconEvent (on_answer_sub_icon); |
4325 | + } |
4326 | +} |
4327 | +//} |
4328 | |
4329 | === added file 'Dbus/interfaces/mono/CMakeLists.txt' |
4330 | --- Dbus/interfaces/mono/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
4331 | +++ Dbus/interfaces/mono/CMakeLists.txt 2011-03-17 14:49:16 +0000 |
4332 | @@ -0,0 +1,13 @@ |
4333 | + |
4334 | +########### install files ############### |
4335 | + |
4336 | +execute_process(COMMAND ${GMCS_EXECUTABLE} |
4337 | + -target:library |
4338 | + -pkg:glib-sharp-2.0 -pkg:ndesk-dbus-1.0 -pkg:ndesk-dbus-glib-1.0 |
4339 | + -out:${CMAKE_CURRENT_BINARY_DIR}/CDApplet.dll |
4340 | + ${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.cs ${CMAKE_CURRENT_SOURCE_DIR}/ISubApplet.cs ${CMAKE_CURRENT_SOURCE_DIR}/IApplet.cs) |
4341 | +### find how to register to GAC ... |
4342 | +set (MONO_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/cli") |
4343 | +install (FILES ${CMAKE_CURRENT_BINARY_DIR}/CDApplet.dll |
4344 | + DESTINATION ${MONO_LIB_DIR}) |
4345 | + |
4346 | |
4347 | === added file 'Dbus/interfaces/mono/IApplet.cs' |
4348 | --- Dbus/interfaces/mono/IApplet.cs 1970-01-01 00:00:00 +0000 |
4349 | +++ Dbus/interfaces/mono/IApplet.cs 2011-03-17 14:49:16 +0000 |
4350 | @@ -0,0 +1,91 @@ |
4351 | +using System; |
4352 | +using System.Collections.Generic; // Dictionnary |
4353 | +using NDesk.DBus; |
4354 | + |
4355 | +namespace CairoDock.Applet |
4356 | +{ |
4357 | + public enum AppletEmblemPosition |
4358 | + { |
4359 | + UpperLeft, |
4360 | + LowerRight, |
4361 | + LowerLeft, |
4362 | + UpperRight, |
4363 | + Middle |
4364 | + } |
4365 | + |
4366 | + public enum AppletContainerType |
4367 | + { |
4368 | + Dock, |
4369 | + Desklet |
4370 | + } |
4371 | + |
4372 | + public enum AppletOrientationType |
4373 | + { |
4374 | + Bottom, |
4375 | + Top, |
4376 | + Right, |
4377 | + Left |
4378 | + } |
4379 | + |
4380 | + [NDesk.DBus.Interface("org.cairodock.CairoDock.applet")] |
4381 | + public interface IApplet |
4382 | + { |
4383 | + object Get(string cProperty); |
4384 | + Dictionary<string, object> GetAll(); |
4385 | + void SetQuickInfo(string cQuickInfo); |
4386 | + void SetLabel(string cLabel); |
4387 | + void SetIcon(string cImage); |
4388 | + void SetEmblem(string cImage, int iPosition); |
4389 | + void Animate(string cAnimation, int iNbRounds); |
4390 | + void DemandsAttention(bool bStart, string cAnimation); |
4391 | + void ShowDialog(string cMessage, int iDuration); |
4392 | + void AskQuestion(string cMessage); |
4393 | + void AskValue(string cMessage, double fInitialValue, double fMaxlValue); |
4394 | + void AskText(string cMessage, string cInitialText); |
4395 | + void PopupDialog(Dictionary<string, object> hDialogAttributes, Dictionary<string, object> hWidgetAttributes); |
4396 | + void AddDataRenderer(string cType, int iNbValues, string cTheme); |
4397 | + void RenderValues(double[] pValues); |
4398 | + void ControlAppli(string cApplicationClass); |
4399 | + void ShowAppli(bool bShow); |
4400 | + void PopulateMenu(string[] pLabels); |
4401 | + void AddMenuItems(Dictionary<string, object>[] pItems); |
4402 | + void BindShortkey(string[] cShortkeys); |
4403 | + event OnClickEvent on_click; |
4404 | + event OnMiddleClickEvent on_middle_click; |
4405 | + event OnScrollEvent on_scroll; |
4406 | + event OnBuildMenuEvent on_build_menu; |
4407 | + event OnMenuSelectEvent on_menu_select; |
4408 | + event OnDropDataEvent on_drop_data; |
4409 | + event OnChangeFocusEvent on_change_focus; |
4410 | + event OnAnswerEvent on_answer; |
4411 | + event OnAnswerDialogEvent on_answer_dialog; |
4412 | + event OnShortkeyEvent on_shortkey; |
4413 | + event OnStopModuleEvent _on_stop; |
4414 | + event OnReloadModuleEvent _on_reload; |
4415 | + } |
4416 | + |
4417 | + public delegate void OnClickEvent(int iButtonState); |
4418 | + |
4419 | + public delegate void OnMiddleClickEvent(); |
4420 | + |
4421 | + public delegate void OnScrollEvent(bool bDirectionUp); |
4422 | + |
4423 | + public delegate void OnBuildMenuEvent(); |
4424 | + |
4425 | + public delegate void OnMenuSelectEvent(int iNumEntry); |
4426 | + |
4427 | + public delegate void OnDropDataEvent(string cReceivedData); |
4428 | + |
4429 | + public delegate void OnChangeFocusEvent(bool is_active); |
4430 | + |
4431 | + public delegate void OnAnswerEvent(object answer); |
4432 | + |
4433 | + public delegate void OnAnswerDialogEvent(int iClickedButton, object answer); |
4434 | + |
4435 | + public delegate void OnShortkeyEvent(string cShortkey); |
4436 | + |
4437 | + public delegate void OnStopModuleEvent(); |
4438 | + |
4439 | + public delegate void OnReloadModuleEvent(bool bConfigHasChanged); |
4440 | + |
4441 | +} |
4442 | |
4443 | === added file 'Dbus/interfaces/mono/ISubApplet.cs' |
4444 | --- Dbus/interfaces/mono/ISubApplet.cs 1970-01-01 00:00:00 +0000 |
4445 | +++ Dbus/interfaces/mono/ISubApplet.cs 2011-03-17 14:49:16 +0000 |
4446 | @@ -0,0 +1,43 @@ |
4447 | +using System; |
4448 | +using System.Collections.Generic; // Dictionnary |
4449 | +using NDesk.DBus; |
4450 | + |
4451 | +namespace CairoDock.Applet |
4452 | +{ |
4453 | + [Interface("org.cairodock.CairoDock.subapplet")] |
4454 | + public interface ISubApplet |
4455 | + { |
4456 | + void SetQuickInfo(string cQuickInfo, string cIconID); |
4457 | + void SetLabel(string cLabel, string cIconID); |
4458 | + void SetIcon(string cImage, string cIconID); |
4459 | + void SetEmblem(string cImage, int iPosition, string cIconID); |
4460 | + void Animate(string cAnimation, int iNbRounds, string cIconID); |
4461 | + void ShowDialog(string message, int iDuration, string cIconID); |
4462 | + void AskQuestion(string cMessage, string cIconID); |
4463 | + void AskValue(string cMessage, double fInitialValue, double fMaxlValue, string cIconID); |
4464 | + void AskText(string cMessage, string cInitialText, string cIconID); |
4465 | + void AddSubIcons(string[] pIconFields); |
4466 | + void RemoveSubIcon(string cIconID); |
4467 | + event OnClickSubIconEvent on_click_sub_icon; |
4468 | + event OnMiddleClickSubIconEvent on_middle_click_sub_icon; |
4469 | + event OnScrollSubIconEvent on_scroll_sub_icon; |
4470 | + event OnBuildMenuSubIconEvent on_build_menu_sub_icon; |
4471 | + event OnMenuSelectSubIconEvent on_menu_select_sub_icon; |
4472 | + event OnDropDataSubIconEvent on_drop_data_sub_icon; |
4473 | + event OnAnswerSubIconEvent on_answer_sub_icon; |
4474 | + } |
4475 | + |
4476 | + public delegate void OnClickSubIconEvent(int iButtonState, string cIconID); |
4477 | + |
4478 | + public delegate void OnMiddleClickSubIconEvent(string cIconID); |
4479 | + |
4480 | + public delegate void OnScrollSubIconEvent(bool bDirectionUp, string cIconID); |
4481 | + |
4482 | + public delegate void OnBuildMenuSubIconEvent(string cIconID); |
4483 | + |
4484 | + public delegate void OnMenuSelectSubIconEvent(int iNumEntry, string cIconID); |
4485 | + |
4486 | + public delegate void OnDropDataSubIconEvent(string cReceivedData, string cIconID); |
4487 | + |
4488 | + public delegate void OnAnswerSubIconEvent(object answer, string cIconID); |
4489 | +} |
4490 | |
4491 | === added directory 'Dbus/interfaces/python' |
4492 | === added file 'Dbus/interfaces/python/CDApplet.py' |
4493 | --- Dbus/interfaces/python/CDApplet.py 1970-01-01 00:00:00 +0000 |
4494 | +++ Dbus/interfaces/python/CDApplet.py 2011-03-17 14:49:16 +0000 |
4495 | @@ -0,0 +1,246 @@ |
4496 | +# This is a part of the external demo applet for Cairo-Dock |
4497 | +# Copyright : (C) 2010-2011 by Fabounet |
4498 | +# E-mail : fabounet@glx-dock.org |
4499 | +# |
4500 | +# This program is free software; you can redistribute it and/or |
4501 | +# modify it under the terms of the GNU General Public License |
4502 | +# as published by the Free Software Foundation; either version 2 |
4503 | +# of the License, or (at your option) any later version. |
4504 | +# |
4505 | +# This program is distributed in the hope that it will be useful, |
4506 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4507 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4508 | +# GNU General Public License for more details. |
4509 | +# http://www.gnu.org/licenses/licenses.html#GPL |
4510 | + |
4511 | +# Base class for Cairo-Dock's applets. |
4512 | +# Make your own class derive from a CDApplet, and override the functions you need (the ones which don't start with an underscore). |
4513 | + |
4514 | +#################### |
4515 | +### dependancies ### |
4516 | +#################### |
4517 | +import sys |
4518 | +import os.path |
4519 | +import ConfigParser |
4520 | +import gobject |
4521 | +import glib |
4522 | +import dbus |
4523 | +from dbus.mainloop.glib import DBusGMainLoop |
4524 | + |
4525 | +DBusGMainLoop(set_as_default=True) |
4526 | + |
4527 | +#################### |
4528 | +### Applet class ### |
4529 | +#################### |
4530 | +class CDApplet: |
4531 | + |
4532 | + BOTTOM = 0 |
4533 | + TOP = 1 |
4534 | + RIGHT = 2 |
4535 | + LEFT = 3 |
4536 | + |
4537 | + DOCK = 0 |
4538 | + DESKLET = 1 |
4539 | + |
4540 | + UPPER_LEFT = 0 |
4541 | + LOWER_RIGHT = 1 |
4542 | + LOWER_LEFT = 2 |
4543 | + UPPER_RIGHT = 3 |
4544 | + MIDDLE = 4 |
4545 | + |
4546 | + MENU_ENTRY = 0 |
4547 | + MENU_SUB_MENU = 1 |
4548 | + MENU_SEPARATOR = 2 |
4549 | + MENU_CHECKBOX = 3 |
4550 | + MENU_RADIO_BUTTON = 4 |
4551 | + |
4552 | + MAIN_MENU_ID = 0 |
4553 | + |
4554 | + DIALOG_KEY_ENTER = -1 |
4555 | + DIALOG_KEY_ESCAPE = -2 |
4556 | + |
4557 | + def __init__(self): |
4558 | + """ initialize the applet. Must be called by any class that inheritates from it. |
4559 | + It defines the following: |
4560 | + - icon : our main icon |
4561 | + - sub_icons: our sub-icons |
4562 | + - config : a dictionnary where our configuration parameters are stored |
4563 | + - cAppletName : name of our applet (the same as the folder where files are stored) |
4564 | + - cConfFile : path to our config file (you will rarely need it) |
4565 | + """ |
4566 | + self.icon = None |
4567 | + self.sub_icons = None |
4568 | + self.config = {} |
4569 | + self.loop = None |
4570 | + self._bEnded = False |
4571 | + self._cMenuIconId = None |
4572 | + self.cAppletName = sys.argv[0][2:] |
4573 | + self.cBusPath = sys.argv[2] |
4574 | + self.cConfFile = sys.argv[3] |
4575 | + self.cParentAppName = sys.argv[4] |
4576 | + |
4577 | + self._get_config() |
4578 | + self._connect_to_dock() |
4579 | + |
4580 | + def run(self): |
4581 | + """ start the applet and enter the main loop; we never get out of this function """ |
4582 | + self.begin() |
4583 | + if not self._bEnded: # _bEnded can be true if the applet runs its own main loop, in which case we stay stuck in the 'begin' function until the end of the applet; in this case, we don't want to run a main loop again! |
4584 | + self.loop = gobject.MainLoop() |
4585 | + self.loop.run() |
4586 | + print ">>> applet '"+self.cAppletName+"' terminated." |
4587 | + sys.exit(0) |
4588 | + |
4589 | + ################################## |
4590 | + ### callbacks on the main icon ### |
4591 | + ################################## |
4592 | + def on_click(self,iState): |
4593 | + """ action on click """ |
4594 | + pass |
4595 | + |
4596 | + def on_middle_click(self): |
4597 | + """ action on middle-click """ |
4598 | + pass |
4599 | + |
4600 | + def _on_build_menu(self): |
4601 | + self._cMenuIconId = None |
4602 | + self.on_build_menu() |
4603 | + pass |
4604 | + |
4605 | + def on_build_menu(self): |
4606 | + """ build our menu """ |
4607 | + pass |
4608 | + |
4609 | + def _on_menu_select(self,iNumEntry): |
4610 | + if self._cMenuIconId == None: |
4611 | + self.on_menu_select(iNumEntry) |
4612 | + else: |
4613 | + self.on_menu_select_sub_icon(iNumEntry,self._cMenuIconId) |
4614 | + |
4615 | + def on_menu_select(self,iNumEntry): |
4616 | + """ action on selecting an entry of our menu """ |
4617 | + pass |
4618 | + |
4619 | + def on_scroll(self,bScrollUp): |
4620 | + """ action on scroll """ |
4621 | + pass |
4622 | + |
4623 | + def on_drop_data(self,cReceivedData): |
4624 | + """ action on dropping something on our applet """ |
4625 | + |
4626 | + def on_answer(self,answer): |
4627 | + """ action on answering ok to a dialog with ok/cancel buttons (deprecated) """ |
4628 | + pass |
4629 | + |
4630 | + def on_answer_dialog(self, button, answer): |
4631 | + """ action on answering a dialog """ |
4632 | + if button == -1 or button == 0: |
4633 | + self.on_answer(answer) |
4634 | + |
4635 | + def on_shortkey(self,cKey): |
4636 | + """ action on pressing one of the shortkeys we bound beforehand """ |
4637 | + pass |
4638 | + |
4639 | + def on_change_focus(self,bIsActive): |
4640 | + """ action when the window controlled by the applet takes or looses the focus """ |
4641 | + pass |
4642 | + |
4643 | + ################################## |
4644 | + ### callbacks on the sub-icons ### |
4645 | + ################################## |
4646 | + def on_click_sub_icon(self, iState, cIconID): |
4647 | + """ action on click on one of our sub-icons""" |
4648 | + pass |
4649 | + |
4650 | + def on_middle_click_sub_icon(self, cIconID): |
4651 | + """ action on middle-click on one of our sub-icons""" |
4652 | + pass |
4653 | + |
4654 | + def on_scroll_sub_icon(self, bScrollUp, cIconID): |
4655 | + """ action on scroll on one of our sub-icons""" |
4656 | + pass |
4657 | + |
4658 | + def _on_build_menu_sub_icon(self, cIconID): |
4659 | + self._cMenuIconId = cIconID |
4660 | + self.on_build_menu_sub_icon(cIconID) |
4661 | + |
4662 | + def on_build_menu_sub_icon(self, cIconID): |
4663 | + """ build our menu on one of our sub-icons""" |
4664 | + pass |
4665 | + |
4666 | + def on_menu_select_sub_icon(self, iNumEntry, cIconID): |
4667 | + """ action on selecting an entry of our menu on a sub-icon""" |
4668 | + pass |
4669 | + |
4670 | + def on_drop_data_sub_icon(self, cReceivedData, cIconID): |
4671 | + """ action on dropping something on one of our sub-icons""" |
4672 | + pass |
4673 | + |
4674 | + def on_answer_dialog_sub_icon(self, button, answer, cIconID): |
4675 | + """ action on answering a dialog about a sub-icon""" |
4676 | + pass |
4677 | + |
4678 | + ############################### |
4679 | + ### callbacks on the applet ### |
4680 | + ############################### |
4681 | + def begin(self): |
4682 | + """ action when the applet is started """ |
4683 | + pass |
4684 | + |
4685 | + def end(self): |
4686 | + """ action when the applet is terminated """ |
4687 | + pass |
4688 | + |
4689 | + def _on_stop(self): |
4690 | + self._bEnded = True |
4691 | + self.end() |
4692 | + if self.loop != None: |
4693 | + self.loop.quit() |
4694 | + |
4695 | + def reload(self): |
4696 | + """ called when our applet is reloaded (config parameters have changed) """ |
4697 | + pass |
4698 | + |
4699 | + def _on_reload(self,bConfigHasChanged): |
4700 | + if bConfigHasChanged: |
4701 | + self._get_config() |
4702 | + self.reload() |
4703 | + |
4704 | + def get_config(self,keyfile): |
4705 | + """ get our parameters from the key-file """ |
4706 | + pass |
4707 | + |
4708 | + def _get_config(self): |
4709 | + keyfile = ConfigParser.RawConfigParser() |
4710 | + keyfile.read(self.cConfFile) |
4711 | + self.get_config(keyfile) |
4712 | + |
4713 | + def _connect_to_dock(self): |
4714 | + # get our applet on the bus. |
4715 | + #~ applet_path = "/org/cairodock/CairoDock/"+self.cAppletName # path where our object is stored on the bus. |
4716 | + bus = dbus.SessionBus() |
4717 | + try: |
4718 | + applet_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath) |
4719 | + except: |
4720 | + print ">>> object '"+self.cBusPath+"' can't be found on the bus, exit.\nMake sure that the 'Dbus' plug-in is activated in Cairo-Dock" |
4721 | + sys.exit(2) |
4722 | + self.icon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") # this object represents our icon inside the dock or a desklet. |
4723 | + sub_icons_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath+"/sub_icons") |
4724 | + 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. |
4725 | + # connect to signals. |
4726 | + self.icon.connect_to_signal("on_click", self.on_click) # when the user left-clicks on our icon. |
4727 | + self.icon.connect_to_signal("on_middle_click", self.on_middle_click) # when the user middle-clicks on our icon. |
4728 | + self.icon.connect_to_signal("on_build_menu", self._on_build_menu) # when the user right-clicks on our applet (which builds the menu) |
4729 | + self.icon.connect_to_signal("on_menu_select", self._on_menu_select) # when the user selects an entry of this menu. |
4730 | + self.icon.connect_to_signal("on_scroll", self.on_scroll) # when the user scroll up or down on our icon. |
4731 | + self.icon.connect_to_signal("on_drop_data", self.on_drop_data) # when the user drops something on our icon. |
4732 | + self.icon.connect_to_signal("on_answer_dialog", self.on_answer_dialog) # when the user answer a question. |
4733 | + self.icon.connect_to_signal("on_shortkey", self.on_shortkey) # when the user press the shortkey. |
4734 | + self.icon.connect_to_signal("on_change_focus", self.on_change_focus) # when the window's focus changes. |
4735 | + 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). |
4736 | + 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). |
4737 | + self.sub_icons.connect_to_signal("on_click_sub_icon", self.on_click_sub_icon) # when the user left-clicks on a sub-icon. |
4738 | + self.sub_icons.connect_to_signal("on_middle_click_sub_icon", self.on_middle_click_sub_icon) |
4739 | + self.sub_icons.connect_to_signal("on_scroll_sub_icon", self.on_scroll_sub_icon) |
4740 | + self.sub_icons.connect_to_signal("on_build_menu_sub_icon", self._on_build_menu_sub_icon) |
4741 | + self.sub_icons.connect_to_signal("on_drop_data_sub_icon", self.on_drop_data_sub_icon) |
4742 | |
4743 | === added file 'Dbus/interfaces/python/CMakeLists.txt' |
4744 | --- Dbus/interfaces/python/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
4745 | +++ Dbus/interfaces/python/CMakeLists.txt 2011-03-17 14:49:16 +0000 |
4746 | @@ -0,0 +1,13 @@ |
4747 | + |
4748 | +########### install files ############### |
4749 | + |
4750 | +if (NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") |
4751 | + # copy *.py to current binary dir (cleaner) |
4752 | + execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.py" ${CMAKE_CURRENT_BINARY_DIR}) |
4753 | + exec_program("${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}" ARGS "setup.py" "-q" "build") |
4754 | +endif() |
4755 | +# Run a custom script with 'make install' |
4756 | +add_custom_target(python_pyc ALL) |
4757 | +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PythonInstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/PythonInstall.cmake) |
4758 | +set_target_properties(python_pyc PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/PythonInstall.cmake) |
4759 | +# execute_process(COMMAND python setup.py install ${DEBIAN_INSTALL_LAYOUT}) |
4760 | |
4761 | === added file 'Dbus/interfaces/python/PythonInstall.cmake.in' |
4762 | --- Dbus/interfaces/python/PythonInstall.cmake.in 1970-01-01 00:00:00 +0000 |
4763 | +++ Dbus/interfaces/python/PythonInstall.cmake.in 2011-03-17 14:49:16 +0000 |
4764 | @@ -0,0 +1,15 @@ |
4765 | +IF("@ROOT_PREFIX@" STREQUAL "") |
4766 | + EXEC_PROGRAM("@PYTHON_EXECUTABLE@" "${CMAKE_CURRENT_BINARY_DIR}" ARGS |
4767 | + "setup.py" "install" |
4768 | + "--prefix=${CMAKE_INSTALL_PREFIX}" |
4769 | + "@DEBIAN_INSTALL_LAYOUT@") |
4770 | +ELSEIF(NOT "@ROOT_PREFIX@" STREQUAL "" AND "@python_no_deb_layout@" STREQUAL "") |
4771 | + EXEC_PROGRAM("@PYTHON_EXECUTABLE@" "${CMAKE_CURRENT_BINARY_DIR}" ARGS |
4772 | + "setup.py" "install" |
4773 | + "--root=@ROOT_PREFIX@" |
4774 | + "@DEBIAN_INSTALL_LAYOUT@") |
4775 | +ELSE() |
4776 | + EXEC_PROGRAM("@PYTHON_EXECUTABLE@" "${CMAKE_CURRENT_BINARY_DIR}" ARGS |
4777 | + "setup.py" "install" |
4778 | + "--root=@ROOT_PREFIX@") |
4779 | +ENDIF() |
4780 | |
4781 | === added file 'Dbus/interfaces/python/setup.py' |
4782 | --- Dbus/interfaces/python/setup.py 1970-01-01 00:00:00 +0000 |
4783 | +++ Dbus/interfaces/python/setup.py 2011-03-17 14:49:16 +0000 |
4784 | @@ -0,0 +1,25 @@ |
4785 | +# This is a part of the external demo applet for Cairo-Dock |
4786 | +# Copyright : (C) 2011 by matttbe |
4787 | +# E-mail : matttbe@glx-dock.org |
4788 | +# |
4789 | +# This program is free software; you can redistribute it and/or |
4790 | +# modify it under the terms of the GNU General Public License |
4791 | +# as published by the Free Software Foundation; either version 2 |
4792 | +# of the License, or (at your option) any later version. |
4793 | +# |
4794 | +# This program is distributed in the hope that it will be useful, |
4795 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4796 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4797 | +# GNU General Public License for more details. |
4798 | +# http://www.gnu.org/licenses/licenses.html#GPL |
4799 | + |
4800 | +from distutils.core import setup |
4801 | +setup(name='CDApplet', |
4802 | + version='1.0', |
4803 | + license='GPL-3', |
4804 | + author='Fabrice Rey', |
4805 | + author_email='fabounet@glx-dock.org', |
4806 | + description='Python interface for Cairo-Dock', |
4807 | + url='https://launchpad.net/cairo-dock', |
4808 | + py_modules=['CDApplet'] |
4809 | + ) |
4810 | |
4811 | === added directory 'Dbus/interfaces/ruby' |
4812 | === added file 'Dbus/interfaces/ruby/CDApplet.rb' |
4813 | --- Dbus/interfaces/ruby/CDApplet.rb 1970-01-01 00:00:00 +0000 |
4814 | +++ Dbus/interfaces/ruby/CDApplet.rb 2011-03-17 14:49:16 +0000 |
4815 | @@ -0,0 +1,291 @@ |
4816 | +#!/usr/bin/ruby |
4817 | + |
4818 | +# This is a part of the external Ruby Interface for Cairo-Dock |
4819 | + |
4820 | +# Author: Fabounet and Eduardo Mucelli Rezende Oliveira |
4821 | +# E-mail: fabounet@glx-dock.org, edumucelli@gmail.com or eduardom@dcc.ufmg.br |
4822 | +# |
4823 | +# This program is free software: you can redistribute it and/or modify |
4824 | +# it under the terms of the GNU General Public License as published by |
4825 | +# the Free Software Foundation, either version 3 of the License, or |
4826 | +# (at your option) any later version. |
4827 | + |
4828 | +# This program is distributed in the hope that it will be useful, |
4829 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4830 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4831 | +# GNU General Public License for more details. |
4832 | + |
4833 | +# This applet monitors the battery through acpi module. It is possbile to show a dialog message |
4834 | +# containing the baterry status, charge, and temperature by left-clicking on the icon. |
4835 | +# Also, through the configuration panel it is possible to set the icon's label, |
4836 | +# show the % of carge as quick info, and activate an alert message to be shown when the charge is critically low. |
4837 | + |
4838 | +require 'rubygems' |
4839 | +require 'dbus' |
4840 | +require 'parseconfig' |
4841 | + |
4842 | +class CDApplet |
4843 | + attr_accessor :cConfFile, :cAppletName, :icon, :sub_icons, :config, :bus, :_cMenuIconId, :cParentAppName, :cBusPath |
4844 | + |
4845 | + BOTTOM = 0 |
4846 | + TOP = 1 |
4847 | + RIGHT = 2 |
4848 | + LEFT = 3 |
4849 | + |
4850 | + DOCK = 0 |
4851 | + DESKLET = 1 |
4852 | + |
4853 | + UPPER_LEFT = 0 |
4854 | + LOWER_RIGHT = 1 |
4855 | + LOWER_LEFT = 2 |
4856 | + UPPER_RIGHT = 3 |
4857 | + MIDDLE = 4 |
4858 | + |
4859 | + MENU_ENTRY = 0 |
4860 | + MENU_SUB_MENU = 1 |
4861 | + MENU_SEPARATOR = 2 |
4862 | + MENU_CHECKBOX = 3 |
4863 | + MENU_RADIO_BUTTON = 4 |
4864 | + |
4865 | + MAIN_MENU_ID = 0 |
4866 | + |
4867 | + DIALOG_KEY_ENTER = -1 |
4868 | + DIALOG_KEY_ESCAPE = -2 |
4869 | + |
4870 | + def initialize |
4871 | + #~ self.cAppletName = File.basename(Dir.getwd) |
4872 | + #~ self.cConfFile = File.expand_path("~/.config/cairo-dock/current_theme/plug-ins/#{self.cAppletName}/#{self.cAppletName}.conf") |
4873 | + self.config = {} |
4874 | + self.bus = nil |
4875 | + self.icon = nil |
4876 | + self.sub_icons = nil |
4877 | + self._cMenuIconId = nil |
4878 | + self.cAppletName = $0[2,999] |
4879 | + self.cBusPath = ARGV[1] |
4880 | + self.cConfFile = ARGV[2] |
4881 | + self.cParentAppName = ARGV[3] |
4882 | + |
4883 | + self._get_config() |
4884 | + self._connect_to_dock() |
4885 | + end |
4886 | + |
4887 | + def run |
4888 | + self.start() |
4889 | + loop = DBus::Main.new |
4890 | + loop << self.bus |
4891 | + loop.run |
4892 | + puts ">>> applet '#{self.cAppletName}' terminated." |
4893 | + exit |
4894 | + end |
4895 | + |
4896 | + ################################## |
4897 | + ### callbacks on the main icon ### |
4898 | + ################################## |
4899 | + |
4900 | + def on_click iState |
4901 | + ### action on click |
4902 | + end |
4903 | + |
4904 | + def on_middle_click |
4905 | + puts ">>> on_middle_click" |
4906 | + ### action on middle-click |
4907 | + end |
4908 | + |
4909 | + def _on_build_menu |
4910 | + self._cMenuIconId = nil |
4911 | + self.on_build_menu() |
4912 | + end |
4913 | + |
4914 | + def on_build_menu |
4915 | + ### build our menu |
4916 | + end |
4917 | + |
4918 | + def _on_menu_select(iNumEntry) |
4919 | + if self._cMenuIconId == nil |
4920 | + self.on_menu_select(iNumEntry) |
4921 | + else |
4922 | + self.on_menu_select_sub_icon(iNumEntry, self._cMenuIconId) |
4923 | + end |
4924 | + end |
4925 | + |
4926 | + def on_menu_select(iNumEntry) |
4927 | + ### action on selecting an entry of our menu """ |
4928 | + end |
4929 | + |
4930 | + def on_scroll(bScrollUp) |
4931 | + ### action on scroll |
4932 | + end |
4933 | + |
4934 | + def on_drop_data(cReceivedData) |
4935 | + ### action on dropping something on our applet |
4936 | + end |
4937 | + |
4938 | + def on_answer(answer) |
4939 | + ### action on answering a dialog |
4940 | + end |
4941 | + |
4942 | + def on_answer_dialog(button, answer) |
4943 | + ### action on answering a dialog |
4944 | + end |
4945 | + |
4946 | + def on_shortkey(cKey) |
4947 | + ### action on pressing one of the shortkeys we bound beforehand |
4948 | + end |
4949 | + |
4950 | + def on_change_focus(bIsActive) |
4951 | + ### action when the window controlled by the applet takes or looses the focus |
4952 | + end |
4953 | + |
4954 | + ################################## |
4955 | + ### callbacks on the sub-icons ### |
4956 | + ################################## |
4957 | + def on_click_sub_icon(iState, cIconID) |
4958 | + ### action on click on one of our sub-icons |
4959 | + end |
4960 | + |
4961 | + def on_middle_click_sub_icon(cIconID) |
4962 | + ### action on middle-click on one of our sub-icons |
4963 | + end |
4964 | + |
4965 | + def on_scroll_sub_icon(bScrollUp, cIconID) |
4966 | + ### action on scroll on one of our sub-icons |
4967 | + end |
4968 | + |
4969 | + def _on_build_menu_sub_icon(cIconID) |
4970 | + self._cMenuIconId = cIconID |
4971 | + self.on_build_menu_sub_icon(cIconID) |
4972 | + end |
4973 | + |
4974 | + def on_build_menu_sub_icon(cIconID) |
4975 | + ### action on build menu on one of our sub-icons |
4976 | + end |
4977 | + |
4978 | + def on_drop_data_sub_icon(cReceivedData, cIconID) |
4979 | + ### action on drop data on one of our sub-icons |
4980 | + end |
4981 | + |
4982 | + def on_menu_select_sub_icon(iNumEntry, cIconID) |
4983 | + ### action on select entry in the menu on one of our sub-icons |
4984 | + end |
4985 | + |
4986 | + |
4987 | + ############################### |
4988 | + ### callbacks on the applet ### |
4989 | + ############################### |
4990 | + |
4991 | + def start |
4992 | + ### action when the applet is started |
4993 | + end |
4994 | + |
4995 | + def stop |
4996 | + ### action when the applet is terminated |
4997 | + end |
4998 | + |
4999 | + def _on_stop |
5000 | + self.stop() |
There's no upstream tarball imported here. Please use bzr merge-upstream to import the upstream tarball and then add your debian dir changes on top of that. See https:/ /wiki.ubuntu. com/Distributed Development/ Documentation/ NewUpstreamVers ion for more information. I'll check back in about 9 hours.