cairo-dock-team team mailing list archive
-
cairo-dock-team team
-
Mailing list archive
-
Message #03258
lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2 into lp:ubuntu/cairo-dock-plug-ins
Matthieu Baerts has proposed merging lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2 into lp:ubuntu/cairo-dock-plug-ins.
Requested reviews:
Ubuntu Sponsors Team (ubuntu-sponsors)
Related bugs:
Bug #811579 in cairo-dock-plug-ins (Ubuntu): "dependancy issues (cairo-dock-plug-ins and libindicator3)"
https://bugs.launchpad.net/ubuntu/+source/cairo-dock-plug-ins/+bug/811579
Bug #823514 in cairo-dock-plug-ins (Ubuntu): "Please update Cairo-Dock Plug-Ins to 2.4.0~0beta2 version (before the FF)"
https://bugs.launchpad.net/ubuntu/+source/cairo-dock-plug-ins/+bug/823514
For more details, see:
https://code.launchpad.net/~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2/+merge/70953
Hello,
The Cairo-Dock team proposes a new version of its Cairo-Dock package.
This is the Upstream (short) ChangeLog:
* Upstream (short) ChangeLog:
- A new Help applet has been added to help our beloved user.
- Improved integration in the XFCE and LXDE desktop.
- Improved the classifying of our files in the source code
and in share/cairo-dock directory.
- Launchers and applications now uses the linked .desktop file.
- Fixed a few bugs as usual
Please note that this new version fixes also this bug #811579 (Cairo-Dock Plug-Ins needs to be recompiled to fix a dependency issues).
**We are currently not able to install cairo-dock-plug-ins packages due to this problem.**
This branch should be ready to be pushed on lp:ubuntu/cairo-dock-plug-ins (except the UNRELEASED version in debian/changelog)
Please upload this version before the FF.
Thank you for your help
PS: Don't forget to upload these plug-ins AND Cairo-Dock ( LP: #823513 )
PS²: is it possible to wait for 15-30 min in order to compile this cairo-dock-plug-ins package with the new cairo-dock (core) packages.
--
The attached diff has been truncated due to its size.
https://code.launchpad.net/~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2/+merge/70953
Your team Cairo-Dock Team is subscribed to branch lp:~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.4.0-0beta2.
=== modified file 'Animated-icons/data/Animated-icons.conf.in'
--- Animated-icons/data/Animated-icons.conf.in 2011-04-20 20:46:51 +0000
+++ Animated-icons/data/Animated-icons.conf.in 2011-08-09 20:07:46 +0000
@@ -1,4 +1,4 @@
-#!en;@VERSION_ANIMATED_ICONS@
+#@VERSION_ANIMATED_ICONS@
#[gtk-preferences]
[Global]
=== modified file 'Animated-icons/src/applet-wobbly.c'
--- Animated-icons/src/applet-wobbly.c 2011-04-20 20:46:51 +0000
+++ Animated-icons/src/applet-wobbly.c 2011-08-09 20:07:46 +0000
@@ -473,7 +473,7 @@
///glActiveTextureARB(GL_TEXTURE0_ARB); // Go pour le multitexturing 1ere passe
glBindTexture(GL_TEXTURE_2D, pIcon->iIconTexture);
- glColor4f(1.0f, 1.0f, 1.0f, myIconsParam.fAlbedo * pIcon->fAlpha); // transparence du reflet.
+ glColor4f(1.0f, 1.0f, 1.0f, myIconsParam.fAlbedo * pIcon->fAlpha / 2); // transparence du reflet.
glBlendFuncSeparate (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2011-07-05 13:45:43 +0000
+++ CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -10,7 +10,7 @@
########### project ###############
project ("cairo-dock-plugins")
-set (VERSION "2.3.0~3")
+set (VERSION "2.4.0~0beta2")
add_definitions (-std=c99 -Wstrict-prototypes -Wextra -Wwrite-strings -Wuninitialized -Werror-implicit-function-declaration) #-Wunreachable-code -Wno-unused-parameter -Wall
if (NOT ${CMAKE_BUILD_TYPE})
@@ -22,11 +22,11 @@
set (CPACK_SOURCE_GENERATOR "TGZ")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
-set (CPACK_SOURCE_IGNORE_FILES
+set (CPACK_SOURCE_IGNORE_FILES
"/build/;/.bzr/;bzrignore$;/misc/;~$;${CPACK_SOURCE_IGNORE_FILES}")
include (CPack)
-add_custom_target( dist
+add_custom_target(dist
COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
add_custom_target(dist-bzr
COMMAND bzr export ${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz
@@ -48,21 +48,25 @@
# get plug-ins install dir
execute_process(
- COMMAND pkg-config cairo-dock --variable=pluginsdir # /usr/lib/cairo-dock
+ COMMAND pkg-config gldi --variable=pluginsdir # /usr/lib/cairo-dock
OUTPUT_VARIABLE pluginsdir)
STRING (REGEX REPLACE "\n" "" pluginsdir ${pluginsdir}) # la commande rajoute un retour chariot ...
# get plug-ins data dir
execute_process(
- COMMAND pkg-config cairo-dock --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins
+ COMMAND pkg-config gldi --variable=pluginsdatadir # /usr/share/cairo-dock/plug-ins
OUTPUT_VARIABLE pluginsdatadir)
STRING (REGEX REPLACE "\n" "" pluginsdatadir ${pluginsdatadir})
# check that version matches with the core
execute_process(
- COMMAND pkg-config --modversion cairo-dock # 2.2.0-3
+ COMMAND pkg-config --modversion gldi # 2.2.0-3
OUTPUT_VARIABLE dock_version)
STRING (REGEX REPLACE "\n" "" dock_version ${dock_version})
if (NOT "${dock_version}" STREQUAL "${VERSION}") # Version
- MESSAGE (FATAL_ERROR "warning : version mismatch with the core : " ${VERSION} <> ${dock_version})
+ if ("${PACKAGEMENT}" STREQUAL "")
+ MESSAGE (FATAL_ERROR "Error : version mismatch with the core : " ${VERSION} <> ${dock_version})
+ else ()
+ MESSAGE (WARNING "Warning : version mismatch with the core : " ${VERSION} <> ${dock_version})
+ endif ()
endif()
#if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT "${FORCE_LIB64}" STREQUAL "") # 64bits and force install in lib64
@@ -76,7 +80,9 @@
GET_FILENAME_COMPONENT(libdir "${pluginsdir}/.." ABSOLUTE) # /usr/lib
GET_FILENAME_COMPONENT(prefix "${pluginsdir}/../.." ABSOLUTE) # /usr
if (NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "${prefix}")
- message (STATUS "Warning : plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}")
+ message (STATUS "It seems that the current CMAKE_INSTALL_PREFIX flag is not the same that you have used with the core.")
+ message (STATUS " It will be replaced by this value: ${prefix}")
+ message (WARNING "Plug-ins should be installed in the same directory as the core, that is to say in ${pluginsdir}")
set (CMAKE_INSTALL_PREFIX "${prefix}")
#set (libdir "${CMAKE_INSTALL_PREFIX}/${libname}/cairo-dock")
endif()
@@ -88,6 +94,10 @@
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/") # additionnal FindPackage files
+set (MODULES_MISSING "")
+set (MODULES_INTEGRATION_MISSING "")
+set (PROGRAMS_MISSING "")
+
########### dependancies ###############
message ("")
@@ -96,7 +106,10 @@
message (STATUS "=====================")
message ("")
-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")
+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")
+pkg_check_modules ("GLDI" REQUIRED "gldi") # we don't want to link with gldi
+set (PACKAGE_INCLUDE_DIRS "${GLDI_INCLUDE_DIRS}")
+#message (STATUS "PACKAGE: ${PACKAGE_INCLUDE_DIRS}")
############# GLIB #################
pkg_check_modules (GLIB glib-2.0)
@@ -107,14 +120,17 @@
STRING (REGEX REPLACE "-.*" "" GLIB_NANO "${GLIB_NANO}")
############# ALSA_MIXER #################
+message (STATUS "> AlsaMixer:")
set (with_alsa "no")
if (NOT "${enable-alsa-mixer}" STREQUAL "no")
pkg_check_modules (ALSA_MIXER_PACKAGE alsa)
if ("${ALSA_MIXER_PACKAGE_FOUND}" STREQUAL "")
message (STATUS "Could not find alsa; Cairo-Dock won't be built with AlsaMixer applet.")
+ message (WARNING "This module is required to compile AlsaMixer applet: alsa")
+ set (MODULES_MISSING "${MODULES_MISSING} alsa")
else()
set (GETTEXT_ALSA_MIXER ${GETTEXT_PLUGINS})
- set (VERSION_ALSA_MIXER "1.0.12")
+ set (VERSION_ALSA_MIXER "1.0.13")
set (PACKAGE_ALSA_MIXER "cd-AlsaMixer")
set (with_alsa "yes")
set (alsa_mixerdatadir "${pluginsdatadir}/AlsaMixer")
@@ -124,6 +140,7 @@
endif()
############# ANIMATED ICONS #################
+message (STATUS "> Animated Icons:")
set (GETTEXT_ANIMATED_ICONS ${GETTEXT_PLUGINS})
set (VERSION_ANIMATED_ICONS "1.0.10")
set (PACKAGE_ANIMATED_ICONS "cd-Animated-icons")
@@ -132,8 +149,9 @@
add_subdirectory (Animated-icons)
############# CAIRO_PENGUIN #################
+message (STATUS "> Cairo Penguin:")
set (GETTEXT_CAIRO_PENGUIN ${GETTEXT_PLUGINS})
-set (VERSION_CAIRO_PENGUIN "1.1.8")
+set (VERSION_CAIRO_PENGUIN "1.1.9")
set (PACKAGE_CAIRO_PENGUIN "cd-Cairo-Penguin")
set (cairo_penguinuserdirname "Cairo-Penguin")
set (cairo_penguindatadir "${pluginsdatadir}/Cairo-Penguin")
@@ -141,54 +159,64 @@
add_subdirectory (Cairo-Penguin)
############# CLIPPER #################
+message (STATUS "> Clipper:")
set (GETTEXT_CLIPPER ${GETTEXT_PLUGINS})
-set (VERSION_CLIPPER "1.1.4")
+set (VERSION_CLIPPER "1.1.5")
set (PACKAGE_CLIPPER "cd-Clipper")
set (Clipperdatadir "${pluginsdatadir}/Clipper")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Clipper/data/Clipper.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Clipper/data/Clipper.conf)
add_subdirectory (Clipper)
############# CLOCK #################
+message (STATUS "> Clock:")
set (with_ical "yes")
pkg_check_modules ("LIBICAL_PACKAGE" "libical")
if ("${LIBICAL_PACKAGE_FOUND}" STREQUAL "")
set (with_ical "no")
message (STATUS "Could not find libical; Clock plugin won't be built with iCal support.")
+ message (WARNING "This module is required to compile Clock applet with iCal support: libical")
+ set (MODULES_MISSING "${MODULES_MISSING} libical")
endif()
set (GETTEXT_CLOCK ${GETTEXT_PLUGINS})
-set (VERSION_CLOCK "2.1.2")
+set (VERSION_CLOCK "2.1.3")
set (PACKAGE_CLOCK "cd-clock")
set (clockuserdirname "clock")
set (clockdatadir "${pluginsdatadir}/clock")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/clock/data/clock.conf.in ${CMAKE_CURRENT_BINARY_DIR}/clock/data/clock.conf)
add_subdirectory (clock)
-############# COMPIZ_ICON #################
-set (GETTEXT_COMPIZ_ICON ${GETTEXT_PLUGINS})
-set (VERSION_COMPIZ_ICON "1.1.6")
-set (PACKAGE_COMPIZ_ICON "cd-compiz-icon")
-set (compiz_icondatadir "${pluginsdatadir}/compiz-icon")
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/compiz-icon/data/compiz-icon.conf.in ${CMAKE_CURRENT_BINARY_DIR}/compiz-icon/data/compiz-icon.conf)
-add_subdirectory (compiz-icon)
+############# COMPOSITE_MANAGER #################
+message (STATUS "> Coposite Manager:")
+set (GETTEXT_COMPOSITE_MANAGER ${GETTEXT_PLUGINS})
+set (VERSION_COMPOSITE_MANAGER "1.0.0")
+set (PACKAGE_COMPOSITE_MANAGER "cd-Composite-Manager")
+set (composite_managerdatadir "${pluginsdatadir}/Composite-Manager")
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Composite-Manager/data/Composite-Manager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Composite-Manager/data/Composite-Manager.conf)
+add_subdirectory (Composite-Manager)
############# DBUS #################
+message (STATUS "> DBus:")
+message (STATUS "* Python:")
find_program (PYTHON_EXECUTABLE python)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print sys.version" OUTPUT_VARIABLE PYTHON_VERSION)
-if ("${PYTHON_VERSION}" STREQUAL "")
- message (STATUS "Could not find Python, won't install Python interface.")
- set (with_python "no")
-else()
+if ("${PYTHON_VERSION}" STREQUAL "")
+ message (STATUS "Could not find Python, won't install Python interface.")
+ message (WARNING "This program is required to compile DBus applet with Python interface: python (version 2)")
+ set (PROGRAMS_MISSING "${PROGRAMS_MISSING} python")
+ set (with_python "no")
+else()
STRING (REGEX REPLACE "\n" "" PYTHON_VERSION ${PYTHON_VERSION})
- message (STATUS "Python Version: ${PYTHON_VERSION}")
- GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE)
- if (EXISTS ${DEBIAN_VERSION})
- message (STATUS " will use '--install-layout deb' with 'python setup.py install'")
+ message (STATUS "Python Version: ${PYTHON_VERSION}")
+ GET_FILENAME_COMPONENT(DEBIAN_VERSION /etc/debian_version ABSOLUTE)
+ if (EXISTS ${DEBIAN_VERSION})
+ message (STATUS " will use '--install-layout deb' with 'python setup.py install'")
set (DEBIAN_INSTALL_LAYOUT "--install-layout deb")
endif()
set (PYTHON_FOUND "TRUE")
- set (with_python "yes")
+ set (with_python "yes")
endif()
+message (STATUS "* Ruby:")
# find_package(Ruby) found libs of ruby-dev but we only need a directory where we can install ruby libs.
find_program (RUBY_EXECUTABLE ruby)
EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']"
@@ -196,6 +224,8 @@
message (STATUS "RUBY_LIBRARY: ${RUBY_LIB_DIR}")
if ("${RUBY_LIB_DIR}" STREQUAL "" OR "${RUBY_LIB_DIR}" STREQUAL "nil")
message (STATUS "Could not find ruby libs, won't install Ruby interface.")
+ message (WARNING "This program is required to compile DBus applet with Ruby interface: ruby")
+ set (PROGRAMS_MISSING "${PROGRAMS_MISSING} ruby")
set (with_ruby "no")
else()
string (REGEX REPLACE "lib/ruby/[0-9].[0-9]" "" RUBY_LIB_DIR_INSTALL "${RUBY_LIB_DIR}")
@@ -206,6 +236,7 @@
set (with_ruby "yes")
endif()
+message (STATUS "* Mono:")
#find_package (Mono)
find_program (GMCS_EXECUTABLE gmcs)
if ("${GMCS_EXECUTABLE}" STREQUAL "" OR NOT EXISTS ${GMCS_EXECUTABLE})
@@ -215,6 +246,8 @@
pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0)
if ("${MONO_PACKAGE_FOUND}" STREQUAL "")
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.")
+ message (WARNING "These modules are required to compile DBus applet with Mono interface: glib-sharp-2.0, ndesk-dbus-1.0 and ndesk-dbus-glib-1.0")
+ set (MODULES_MISSING "${MODULES_MISSING} glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0")
set (with_mono "no")
else()
set (MONO_FOUND "TRUE")
@@ -222,6 +255,7 @@
endif()
endif()
+message (STATUS "* Vala:")
# Valac is only riquired to convert vala files to C files.
# So we can directly use produced files (c, h, vapi) without using valac.
set (with_vala "yes")
@@ -243,7 +277,7 @@
STRING (REGEX REPLACE "\\..*" "" VALA_MAJOR "${VALA_VERSION}")
# message (STATUS "VALA_MAJOR : ${VALA_MAJOR}")
-
+
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" VALA_MINOR "${VALA_VERSION}") # 0.1.7 => 1.7
STRING (REGEX REPLACE "\\.[0-9]*" "" VALA_MINOR "${VALA_MINOR}")
# message (STATUS "VALA_MINOR : ${VALA_MINOR}")
@@ -252,13 +286,18 @@
STRING (REGEX REPLACE "-.*" "" VALA_NANO "${VALA_NANO}")
# message (STATUS "VALA_NANO : ${VALA_NANO}")
- if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala > 0.10
- message (STATUS " Vala compiler OK (>= 0.10).")
+ if (${VALA_MAJOR} GREATER 0 OR ${VALA_MINOR} GREATER 9) # vala >= 0.10
+ # AND (${VALA_MAJOR} LESS 1 AND ${VALA_MINOR} LESS 13)) # and <= 0.12
+ message (STATUS " Vala compiler OK (>= 0.10).")# and <= 0.12).")
set (VALAC_FOUND "TRUE")
set (with_valac "yes")
else()
- message (STATUS "Vala compiler is too old (0.10 required), won't build Vala interface.")
+ message (STATUS "Vala compiler is too old (0.10 required) or too new (> 0.12), won't build Vala interface.")
endif()
+else()
+ message (STATUS "Could not find ValaC, won't build Vala interface with the version of your distribution.")
+ message (WARNING "This program is required to compile DBus applet with Python interface: valac (version > 0.10)")
+ set (PROGRAMS_MISSING "${PROGRAMS_MISSING} valac")
endif()
@@ -270,6 +309,7 @@
add_subdirectory (Dbus)
############# DESKLET_RENDERING #################
+message (STATUS "> Desklet Rendering:")
set (GETTEXT_DESKLET_RENDERING ${GETTEXT_PLUGINS})
set (VERSION_DESKLET_RENDERING "1.5.6")
set (PACKAGE_DESKLET_RENDERING "cd-desklet-rendering")
@@ -278,6 +318,7 @@
add_subdirectory (desklet-rendering)
############# DIALOG_RENDERING #################
+message (STATUS "> Dialog Rendering:")
set (GETTEXT_DIALOG_RENDERING ${GETTEXT_PLUGINS})
set (VERSION_DIALOG_RENDERING "0.5.1")
set (PACKAGE_DIALOG_RENDERING "cd-dialog-rendering")
@@ -288,8 +329,9 @@
############# DISKS #################
set (with_disks "no")
if ("${enable-disks}" STREQUAL "yes")
+ message (STATUS "> Disks:")
set (GETTEXT_DISKS ${GETTEXT_PLUGINS})
- set (VERSION_DISKS "0.0.2")
+ set (VERSION_DISKS "0.0.3")
set (PACKAGE_DISKS "cd-disks")
set (with_disks "yes")
set (disksdatadir "${pluginsdatadir}/Disks")
@@ -298,6 +340,7 @@
endif()
############# DND2SHARE #################
+message (STATUS "> DND2Share:")
set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS})
set (VERSION_DND2SHARE "1.0.6")
set (PACKAGE_DND2SHARE "cd-dnd2share")
@@ -306,6 +349,7 @@
add_subdirectory (dnd2share)
############# DOCK RENDERING #################
+message (STATUS "> Dock Rendering:")
set (GETTEXT_RENDERING ${GETTEXT_PLUGINS})
set (VERSION_RENDERING "1.5.9")
set (PACKAGE_RENDERING "cd-rendering")
@@ -316,8 +360,9 @@
############# DONCKY #################
set (with_doncky "no")
if ("${enable-doncky}" STREQUAL "yes")
+ message (STATUS "> Doncky:")
set (GETTEXT_DONCKY ${GETTEXT_PLUGINS})
- set (VERSION_DONCKY "0.0.4")
+ set (VERSION_DONCKY "0.0.5")
set (PACKAGE_DONCKY "cd-doncky")
set (with_doncky "yes")
set (donckydatadir "${pluginsdatadir}/Doncky")
@@ -326,6 +371,7 @@
endif()
############# DROP INDICATOR #################
+message (STATUS "> Drop Indicator:")
set (GETTEXT_DROP_INDICATOR ${GETTEXT_PLUGINS})
set (VERSION_DROP_INDICATOR "1.1.4")
set (PACKAGE_DROP_INDICATOR "cd-drop_indicator")
@@ -334,8 +380,9 @@
add_subdirectory (drop-indicator)
############# DUSTBIN #################
+message (STATUS "> Dustbin:")
set (GETTEXT_DUSTBIN ${GETTEXT_PLUGINS})
-set (VERSION_DUSTBIN "2.3.1")
+set (VERSION_DUSTBIN "2.3.2")
set (PACKAGE_DUSTBIN "cd-dustbin")
set (dustbinuserdirname "dustbin")
set (dustbindatadir "${pluginsdatadir}/dustbin")
@@ -343,22 +390,26 @@
add_subdirectory (dustbin)
############# FOLDERS #################
+message (STATUS "> Folders:")
set (GETTEXT_FOLDERS ${GETTEXT_PLUGINS})
-set (VERSION_FOLDERS "0.2.1")
+set (VERSION_FOLDERS "0.2.2")
set (PACKAGE_FOLDERS "cd-Folders")
set (foldersdatadir "${pluginsdatadir}/Folders")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Folders/data/Folders.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Folders/data/Folders.conf)
add_subdirectory (Folders)
############# GMENU #################
+message (STATUS "> GMenu:")
set (with_gmenu "no")
if (NOT "${enable-gmenu}" STREQUAL "no")
pkg_check_modules (GMENU_PACKAGE libgnome-menu)
if ("${GMENU_PACKAGE_FOUND}" STREQUAL "")
message (STATUS "Could not find libgnome-menu; Cairo-Dock won't be built with GMenu applet.")
+ message (WARNING "This module is required to compile GMenu applet: libgnome-menu")
+ set (MODULES_MISSING "${MODULES_MISSING} libgnome-menu")
else()
set (GETTEXT_GMENU ${GETTEXT_PLUGINS})
- set (VERSION_GMENU "1.1.6")
+ set (VERSION_GMENU "1.1.8")
set (PACKAGE_GMENU "cd-GMenu")
set (with_gmenu "yes")
set (gmenudatadir "${pluginsdatadir}/GMenu")
@@ -368,15 +419,19 @@
endif()
############# GVFS-INTEGRATION #################
+message (STATUS "> GVFS-Integration:")
pkg_check_modules ("LIBGIO" "gio-2.0")
add_subdirectory (gvfs-integration)
############# GNOME-INTEGRATION #################
+message (STATUS "> Gnome-Integration:")
set (with_gnome_integration "no")
if (NOT "${enable-gnome-integration}" STREQUAL "no")
pkg_check_modules (GNOME_INTEGRATION gio-2.0)
if ("${GNOME_INTEGRATION_FOUND}" STREQUAL "")
message (STATUS "Could not find gio; Cairo-Dock won't be built with Gnome>=2.22 support.")
+ message (STATUS "This module is required to compile Gnome-Integration applet: gio-2.0")
+ set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
else()
set (VERSION_GNOME_INTEGRATION "1.0.3")
set (PACKAGE_GNOME_INTEGRATION "cd_gnome-integration")
@@ -389,9 +444,13 @@
############# GNOME-INTEGRATION-OLD #################
set (with_gnome_integration_old "no")
if ("${enable-old-gnome-integration}" STREQUAL "yes")
+ message (STATUS "> Gnome-Integration:")
+ message (WARNING "This applet is deprecated")
pkg_check_modules (OLD_GNOME_INTEGRATION gnome-vfs-2.0 libgnomeui-2.0)
if ("${OLD_GNOME_INTEGRATION_FOUND}" STREQUAL "")
message (STATUS "Could not find gnome-vfs and/or gnomeui; Cairo-Dock won't be built with Gnome<2.22 support.")
+ message (STATUS "These modules are required to compile Gnome-Integration-Old applet: gnome-vfs-2.0 libgnomeui-2.0")
+ set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gnome-vfs-2.0 libgnomeui-2.0")
else()
set (VERSION_GNOME_INTEGRATION_OLD "1.0.4")
set (PACKAGE_GNOME_INTEGRATION_OLD "cd_gnome-integration-old")
@@ -401,7 +460,8 @@
endif()
endif()
-############# ICON EFFECT #################
+############# ICON EFFECTS #################
+message (STATUS "> Icon Effects:")
set (GETTEXT_ICON_EFFECTS ${GETTEXT_PLUGINS})
set (VERSION_ICON_EFFECTS "1.2.4")
set (PACKAGE_ICON_EFFECTS "cd-icon-effect")
@@ -409,11 +469,32 @@
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icon-effect/data/icon-effect.conf.in ${CMAKE_CURRENT_BINARY_DIR}/icon-effect/data/icon-effect.conf)
add_subdirectory (icon-effect)
+############# IMPULSE #################
+set (with_impulse "no")
+if ("${enable-impulse}" STREQUAL "yes")
+ message (STATUS "> Impulse:")
+ pkg_check_modules (IMPULSE_PACKAGES libpulse fftw3)
+ if ("${IMPULSE_PACKAGES_FOUND}" STREQUAL "")
+ message (STATUS "Could not find libpulse; Cairo-Dock won't be built with Impulse applet.")
+ message (WARNING "These modules are required to compile Impulse applet: libpulse fftw3")
+ set (MODULES_MISSING "${MODULES_MISSING} libpulse fftw3")
+ else()
+ set (GETTEXT_IMPULSE ${GETTEXT_PLUGINS})
+ set (VERSION_IMPULSE "0.0.3")
+ set (PACKAGE_IMPULSE "cd-Impulse")
+ set (with_impulse "yes")
+ set (impulsedatadir "${pluginsdatadir}/Impulse")
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Impulse/data/Impulse.conf.in ${CMAKE_CURRENT_BINARY_DIR}/Impulse/data/Impulse.conf)
+ add_subdirectory (Impulse)
+ endif()
+endif()
+
############# INDICATOR-APPLET #################
-# Note: the names of dbusmenu-glib and dbusmenu-gtk have changed...
+message (STATUS "> Indicator-Applet:")
+# Note: the names of dbusmenu-glib, dbusmenu-gtk and indicator have changed...
pkg_check_modules (DBUSMENU_04 QUIET dbusmenu-glib-0.4)
pkg_check_modules (DBUSMENU_GTK_04 QUIET dbusmenu-gtk-0.4)
-pkg_check_modules (INDICATOR_APPLET indicator libido-0.1)
+pkg_check_modules (INDICATOR_04 QUIET indicator-0.4)
if ("${DBUSMENU_04_FOUND}" STREQUAL "1")
pkg_check_modules (DBUSMENU dbusmenu-glib-0.4)
else()
@@ -424,29 +505,45 @@
else()
pkg_check_modules (DBUSMENU_GTK dbusmenu-gtk)
endif()
+if ("${INDICATOR_04_FOUND}" STREQUAL "1")
+ pkg_check_modules (INDICATOR_APPLET indicator-0.4 libido-0.1)
+else()
+ pkg_check_modules (INDICATOR_APPLET indicator libido-0.1)
+endif()
+
if ("${INDICATOR_APPLET_FOUND}" STREQUAL "1" AND "${DBUSMENU_FOUND}" STREQUAL "1" AND "${DBUSMENU_GTK_FOUND}" STREQUAL "1")
- message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}")
-
+ #message (STATUS "DBUSMENU_VERSION : ${DBUSMENU_VERSION}")
+
STRING (REGEX REPLACE "\\..*" "" DBUSMENU_MAJOR "${DBUSMENU_VERSION}")
# message (STATUS "DBUSMENU_MAJOR : ${DBUSMENU_MAJOR}")
-
+
STRING (REGEX REPLACE "[0-9]*\\.([^ ]+)" "\\1" DBUSMENU_MINOR "${DBUSMENU_VERSION}") # 0.1.7 => 1.7
STRING (REGEX REPLACE "\\.[0-9]*" "" DBUSMENU_MINOR "${DBUSMENU_MINOR}")
# message (STATUS "DBUSMENU_MINOR : ${DBUSMENU_MINOR}")
-
+
STRING (REGEX REPLACE ".*\\." "" DBUSMENU_NANO "${DBUSMENU_VERSION}")
STRING (REGEX REPLACE "-.*" "" DBUSMENU_NANO "${DBUSMENU_NANO}")
# message (STATUS "DBUSMENU_NANO : ${DBUSMENU_NANO}")
-
- execute_process(
- COMMAND pkg-config --variable=iconsdir indicator
- OUTPUT_VARIABLE INDICATORICONSDIR)
+
+ if ("${INDICATOR_04_FOUND}" STREQUAL "1")
+ execute_process(
+ COMMAND pkg-config --variable=iconsdir indicator-0.4
+ OUTPUT_VARIABLE INDICATORICONSDIR)
+ else()
+ execute_process(
+ COMMAND pkg-config --variable=iconsdir indicator
+ OUTPUT_VARIABLE INDICATORICONSDIR)
+ endif()
STRING (REGEX REPLACE "\n" "" INDICATORICONSDIR ${INDICATORICONSDIR}) # la commande rajoute un retour chariot ...
add_subdirectory (Indicator-applet)
set (with_indicator "yes")
+else()
+ message (WARNING "These modules are required to compile Indicators applet (MeMenu and Messaging-Menu): indicator(-0.4), libido-0.1, dbusmenu-glib(-0.4), dbusmenu-gtk(-0.4)")
+ set (MODULES_MISSING "${MODULES_MISSING} indicator(-0.4) libido-0.1 dbusmenu-glib(-0.4) dbusmenu-gtk(-0.4)")
endif()
############# ILLUSION #################
+message (STATUS "> Illusion:")
set (GETTEXT_ILLUSION ${GETTEXT_PLUGINS})
set (VERSION_ILLUSION "1.0.7")
set (PACKAGE_ILLUSION "cd-illusion")
@@ -455,13 +552,75 @@
add_subdirectory (illusion)
############# KDE-INTEGRATION #################
+message (STATUS "> KDE-Integration:")
set (with_kde_integration "no")
-if (NOT "${enable-kde-integration}" STREQUAL "no")
+set (with_kde_integration2 "no")
+if ("${enable-kde-integration2}" STREQUAL "yes")
+ #find_package(KDE4)
+ find_package(Qt4)
+ if (QT4_FOUND)
+ message (STATUS " * Qt Includes: ${QT_INCLUDES}")
+ message (STATUS " * Qt Definitions: ${QT_DEFINITIONS}")
+ message (STATUS " * QtCore Library: ${QT_QTCORE_LIBRARY} / ${PACKAGE_LIBRARIES}")
+ else()
+ message (STATUS " * Qt unavailable")
+ endif()
+
+ find_path(KDECORE_INCLUDE_DIR "kdecore_export.h")
+ find_library(KDECORE_LIBRARY NAMES "kdecore")
+ GET_FILENAME_COMPONENT(KDECORE_LIBRARY ${KDECORE_LIBRARY} PATH)
+
+ find_path(KIO_INCLUDE_DIR "kio_export.h" PATH_SUFFIXES "kio")
+ find_library(KIO_LIBRARY NAMES "kio")
+ GET_FILENAME_COMPONENT(KIO_LIBRARY ${KIO_LIBRARY} PATH)
+
+ find_path(KDE_INCLUDE_DIR "KDirWatch" PATH_SUFFIXES "KDE")
+
+ if (NOT "${KDECORE_LIBRARY}" STREQUAL "")
+ message (STATUS " * KDECORE Dir: ${KDECORE_INCLUDE_DIR}")
+ message (STATUS " * KDECORE Library: ${KDECORE_LIBRARY}")
+ else()
+ message (STATUS " * KDECORE unavailable")
+ endif()
+ if (NOT "${KIO_LIBRARY}" STREQUAL "")
+ message (STATUS " * KIO Dir: ${KIO_INCLUDE_DIR}")
+ message (STATUS " * KIO Library: ${KIO_LIBRARY}")
+ else()
+ message (STATUS " * KIO unavailable")
+ endif()
+ if (NOT "${KDE_LIBRARY}" STREQUAL "") ## always empty?
+ message (STATUS " * KDE4 Dir: ${KDE_INCLUDE_DIR}")
+ message (STATUS " * KDE4 Library: ${KDE_LIBRARY}")
+ else()
+ message (STATUS " * KDE4 unavailable")
+ endif()
+
+ if (QT4_FOUND
+ AND KDECORE_INCLUDE_DIR
+ AND KDECORE_LIBRARY
+ AND KIO_INCLUDE_DIR
+ AND KIO_LIBRARY
+ AND KDE_INCLUDE_DIR)
+ message (STATUS "KDE: OK")
+ set (VERSION_KDE_INTEGRATION "0.0.3")
+ set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
+ set (with_kde_integration2 "yes")
+ set (kde_integrationdatadir "${pluginsdatadir}/kde-integration2")
+ add_subdirectory ("kde-integration2")
+ else()
+ message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.")
+ message (STATUS "These libraries are required to compile KDE experimental applet: kdecore, kio, kde4")
+ set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} kdecore, kio, kde4")
+ endif()
+elseif (NOT "${enable-kde-integration}" STREQUAL "no")
pkg_check_modules (KDE_INTEGRATION gio-2.0)
- if ("${KDE_INTEGRATION_FOUND}" STREQUAL "")
- message (STATUS "Could not find kde libs; Cairo-Dock won't be built with KDE support.")
+ message (STATUS "KDE_INTEGRATION_FOUND: ${KDE_INTEGRATION_FOUND}")
+ if (NOT KDE_INTEGRATION_FOUND)
+ message (STATUS "Could not find gio; Cairo-Dock won't be built with KDE support.")
+ message (STATUS "This module is required to compile KDE-Integration applet: gio-2.0")
+ set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
else()
- set (VERSION_KDE_INTEGRATION "0.0.2")
+ set (VERSION_KDE_INTEGRATION "1.0.3")
set (PACKAGE_KDE_INTEGRATION "cd_kde-integration")
set (with_kde_integration "yes")
set (kde_integrationdatadir "${pluginsdatadir}/kde-integration")
@@ -470,13 +629,16 @@
endif()
############# KEYBOARD_INDICATOR #################
+message (STATUS "> Keyboard-Indicator:")
set (with_keyboard_indicator "no")
pkg_check_modules (KEYBOARD_INDICATOR_PACKAGE libxklavier)
if ("${KEYBOARD_INDICATOR_PACKAGE_FOUND}" STREQUAL "")
message (STATUS "Could not find libxklavier; Cairo-Dock won't be built with keyboard-indicator applet.")
+ message (WARNING "This module is required to compile Keyboard-Indicator applet: libxklavier")
+ set (MODULES_MISSING "${MODULES_MISSING} libxklavier")
else()
set (GETTEXT_KEYBOARD_INDICATOR ${GETTEXT_PLUGINS})
- set (VERSION_KEYBOARD_INDICATOR "1.1.3")
+ set (VERSION_KEYBOARD_INDICATOR "1.1.4")
set (PACKAGE_KEYBOARD_INDICATOR "cd-keyboard-indicator")
set (with_keyboard_indicator "yes")
set (keyboard_indicatordatadir "${pluginsdatadir}/keyboard-indicator")
@@ -485,20 +647,32 @@
endif()
############# LOGOUT #################
+message (STATUS "> LogOut:")
+pkg_check_modules (UPOWER upower-glib) # useful for Powermanager too.
+if (${UPOWER_FOUND})
+ set (with_upower_support "yes")
+else()
+ set (with_upower_support "no")
+ message (STATUS "Could not find upower-glib; LogOut and PowerManager plugin won't be built with UPower support.")
+ message (WARNING "This module is required to compile LogOut and PowerManager applet with UPower support: upower-glib")
+ set (MODULES_MISSING "${MODULES_MISSING} upower-glib")
+endif()
set (GETTEXT_LOGOUT ${GETTEXT_PLUGINS})
-set (VERSION_LOGOUT "1.2.10")
+set (VERSION_LOGOUT "1.2.11")
set (PACKAGE_LOGOUT "cd-logout")
set (logoutdatadir "${pluginsdatadir}/logout")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/logout/data/logout.conf.in ${CMAKE_CURRENT_BINARY_DIR}/logout/data/logout.conf)
add_subdirectory (logout)
############# MAIL #################
+message (STATUS "> Mail:")
set (with_mail "no")
# find the compilation flags
+find_program (LIBETPAN_CONFIG_EXECUTABLE libetpan-config)
execute_process(
- COMMAND libetpan-config --cflags
+ COMMAND ${LIBETPAN_CONFIG_EXECUTABLE} --cflags
OUTPUT_VARIABLE MAIL_PACKAGE_CFLAGS)
-if (NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "") # if we don't want to use it, we don't want to have an error
+if (NOT "${MAIL_PACKAGE_CFLAGS}" STREQUAL "") # if there is a problem with the previous, we don't want to have a lot of errors
STRING (REGEX MATCHALL "-I[^ ]+ " TMP_VARIABLE "${MAIL_PACKAGE_CFLAGS}") # first extract the "-I" options
STRING (REGEX REPLACE ";" "" TMP_VARIABLE "${TMP_VARIABLE}")
STRING (REGEX REPLACE " $" "" TMP_VARIABLE "${TMP_VARIABLE}")
@@ -506,7 +680,7 @@
endif()
# find the link flags
execute_process(
- COMMAND libetpan-config --libs
+ COMMAND ${LIBETPAN_CONFIG_EXECUTABLE} --libs
OUTPUT_VARIABLE MAIL_PACKAGE_LIBS)
if (NOT "${MAIL_PACKAGE_LIBS}" STREQUAL "")
# find the link libraries
@@ -521,13 +695,15 @@
endif()
if ("${MAIL_PACKAGE_LIBS}" STREQUAL "")
message (STATUS "warning : Could not find libetpan; Cairo-Dock won't be built with Mail applet.")
+ message (WARNING "This module is required to compile Mail applet: libetpan")
+ set (PROGRAMS_MISSING "${PROGRAMS_MISSING} libetpan-config")
else()
message (STATUS "libetpan found. Using the following options:")
message (STATUS " Include directories: ${MAIL_PACKAGE_INCLUDE_DIRS}")
message (STATUS " Link directories: ${MAIL_PACKAGE_LIBRARY_DIRS}")
message (STATUS " Link libraries: ${MAIL_PACKAGE_LIBRARIES}")
set (GETTEXT_MAIL ${GETTEXT_PLUGINS})
- set (VERSION_MAIL "1.0.8")
+ set (VERSION_MAIL "1.0.9")
set (PACKAGE_MAIL "cd-mail")
set (maildatadir "${pluginsdatadir}/mail")
set (with_mail "yes")
@@ -535,7 +711,8 @@
add_subdirectory ("mail")
endif()
-############# MEMENU #################
+############# DISTRIBUTION #################
+message (STATUS "> Distribution:")
# We try to detect if the user is on Ubuntu to know which bus we have to use...
execute_process(
COMMAND lsb_release -i
@@ -573,11 +750,17 @@
endif()
endif()
-set (INDICATOR_OLD_NAMES 0)
if (NOT "${DISTRO_ID}" STREQUAL "")
message (STATUS "DISTRO_ID: ${DISTRO_ID}, DISTRO_RELEASE: ${DISTRO_RELEASE}")
endif()
-if ("${DISTRO_ID}" STREQUAL "Ubuntu")
+
+############# INDICATOR_NAME #################
+message (STATUS "> Indicator Names:")
+set (INDICATOR_OLD_NAMES 0)
+if ("${force_old_indicator_names}" STREQUAL "yes")
+ set (INDICATOR_OLD_NAMES 1)
+ message (STATUS "Indicators: use old Ayatana Dbus names (forced)")
+elseif ("${DISTRO_ID}" STREQUAL "Ubuntu")
STRING (REGEX REPLACE "\\..*" "" DISTRO_RELEASE_MAJOR ${DISTRO_RELEASE})
# message (STATUS "DISTRO_RELEASE_MAJOR: ${DISTRO_RELEASE_MAJOR}")
if (${DISTRO_RELEASE_MAJOR} LESS 11) # from 11.04, new names are used.
@@ -586,10 +769,12 @@
endif()
endif()
+############# MEMENU #################
set (with_me_menu "no")
if ("${with_indicator}" STREQUAL "yes")
+ message (STATUS "> MeMenu:")
set (GETTEXT_MEMENU ${GETTEXT_PLUGINS})
- set (VERSION_MEMENU "1.0.1")
+ set (VERSION_MEMENU "1.0.2")
set (PACKAGE_MEMENU "cd-MeMenu")
set (memenudatadir "${pluginsdatadir}/MeMenu")
set (with_me_menu "yes")
@@ -600,8 +785,9 @@
############# MESSAGING_MENU #################
set (with_messaging_menu "no")
if ("${with_indicator}" STREQUAL "yes")
+ message (STATUS "> Messaging-Menu:")
set (GETTEXT_MESSAGING_MENU ${GETTEXT_PLUGINS})
- set (VERSION_MESSAGING_MENU "1.0.1")
+ set (VERSION_MESSAGING_MENU "1.0.2")
set (PACKAGE_MESSAGING_MENU "cd-Messaging-Menu")
set (with_messaging_menu "yes")
set (messaging_menudatadir "${pluginsdatadir}/Messaging-Menu")
@@ -610,6 +796,7 @@
endif()
############# MOTION BLUR #################
+message (STATUS "> Motion Blur:")
set (GETTEXT_MOTION_BLUR ${GETTEXT_PLUGINS})
set (VERSION_MOTION_BLUR "1.0.4")
set (PACKAGE_MOTION_BLUR "cd-motion_blur")
@@ -618,16 +805,18 @@
add_subdirectory (motion-blur)
############# MUSICPLAYER #################
+message (STATUS "> MusicPlayer:")
set (GETTEXT_MUSICPLAYER ${GETTEXT_PLUGINS})
-set (VERSION_MUSICPLAYER "1.0.7")
+set (VERSION_MUSICPLAYER "1.0.8")
set (PACKAGE_MUSICPLAYER "cd-musicPlayer")
set (musicplayerdatadir "${pluginsdatadir}/musicPlayer")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/musicPlayer/data/musicPlayer.conf.in ${CMAKE_CURRENT_BINARY_DIR}/musicPlayer/data/musicPlayer.conf)
add_subdirectory (musicPlayer)
############# NETSPEED #################
+message (STATUS "> NetSpeed:")
set (GETTEXT_NETSPEED ${GETTEXT_PLUGINS})
-set (VERSION_NETSPEED "1.2.5")
+set (VERSION_NETSPEED "1.2.6")
set (PACKAGE_NETSPEED "cd-netspeed")
set (netspeeddatadir "${pluginsdatadir}/netspeed")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/netspeed/data/netspeed.conf.in ${CMAKE_CURRENT_BINARY_DIR}/netspeed/data/netspeed.conf)
@@ -636,8 +825,9 @@
############# NETWORK_MONITOR #################
set (with_network_monitor "no")
if ("${enable-network-monitor}" STREQUAL "yes")
+ message (STATUS "> Network Monitor:")
set (GETTEXT_NETWORK_MONITOR ${GETTEXT_PLUGINS})
- set (VERSION_NETWORK_MONITOR "0.2.3")
+ set (VERSION_NETWORK_MONITOR "0.2.4")
set (PACKAGE_NETWORK_MONITOR "cd-network-monitor")
set (with_network_monitor "yes")
set (network_monitordatadir "${pluginsdatadir}/Network-Monitor")
@@ -646,29 +836,34 @@
endif()
############# POWERMANAGER #################
+message (STATUS "> PowerManager:")
set (GETTEXT_POWERMANAGER ${GETTEXT_PLUGINS})
-set (VERSION_POWERMANAGER "1.3.4")
+set (VERSION_POWERMANAGER "1.3.5")
set (PACKAGE_POWERMANAGER "cd-powermanager")
set (powermanagerdatadir "${pluginsdatadir}/powermanager")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/powermanager/data/powermanager.conf.in ${CMAKE_CURRENT_BINARY_DIR}/powermanager/data/powermanager.conf)
add_subdirectory (powermanager)
############# QUICK BROWSER #################
+message (STATUS "> Quick Browser:")
set (GETTEXT_QUICK_BROWSER ${GETTEXT_PLUGINS})
-set (VERSION_QUICK_BROWSER "1.0.8")
+set (VERSION_QUICK_BROWSER "1.0.9")
set (PACKAGE_QUICK_BROWSER "cd-quick-browser")
set (quick_browserdatadir "${pluginsdatadir}/quick_browser")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/quick-browser/data/quick-browser.conf.in ${CMAKE_CURRENT_BINARY_DIR}/quick-browser/data/quick-browser.conf)
add_subdirectory (quick-browser)
############# RECENT-EVENTS #################
+message (STATUS "> Recent-Events:")
set (with_recent_events "no")
pkg_check_modules (RECENT_EVENTS zeitgeist-1.0)
if ("${RECENT_EVENTS_FOUND}" STREQUAL "")
message (STATUS "Could not find libzeitgeist; Cairo-Dock won't be built with Zeitgeist support.")
+ message (WARNING "This module is required to compile Recent-Events applet: zeitgeist-1.0")
+ set (MODULES_MISSING "${MODULES_MISSING} zeitgeist-1.0")
else()
set (GETTEXT_RECENT_EVENTS ${GETTEXT_PLUGINS})
- set (VERSION_RECENT_EVENTS "0.0.2")
+ set (VERSION_RECENT_EVENTS "1.0.0")
set (PACKAGE_RECENT_EVENTS "cd-Recent-Events")
set (with_recent_events "yes")
set (recent_eventsdatadir "${pluginsdatadir}/Recent-Events")
@@ -677,6 +872,7 @@
endif()
############# REMOTE_CONTROL #################
+message (STATUS "> Remote Control:")
set (GETTEXT_REMOTE_CONTROL ${GETTEXT_PLUGINS})
set (VERSION_REMOTE_CONTROL "0.0.2")
set (PACKAGE_REMOTE_CONTROL "cd-Remote-Control")
@@ -685,8 +881,9 @@
add_subdirectory (Remote-Control)
############# RSSREADER #################
+message (STATUS "> RSSreader:")
set (GETTEXT_RSS_READER ${GETTEXT_PLUGINS})
-set (VERSION_RSS_READER "1.0.3")
+set (VERSION_RSS_READER "1.0.4")
set (PACKAGE_RSS_READER "cd-rssreader")
set (rss_readerdatadir "${pluginsdatadir}/RSSreader")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/RSSreader/data/RSSreader.conf.in ${CMAKE_CURRENT_BINARY_DIR}/RSSreader/data/RSSreader.conf)
@@ -695,6 +892,7 @@
############# SCOOBY_DO #################
set (with_scooby_do "no")
if ("${enable-scooby-do}" STREQUAL "yes")
+ message (STATUS "> Scooby-Do:")
set (GETTEXT_SCOOBY_DO ${GETTEXT_PLUGINS})
set (VERSION_SCOOBY_DO "0.1.1")
set (PACKAGE_SCOOBY_DO "cd-scooby-do")
@@ -704,29 +902,38 @@
add_subdirectory (Scooby-Do)
endif()
+############# SHARED-IMAGES #################
+set (shared_imagesdatadir "${pluginsdatadir}/shared-images")
+add_subdirectory (shared-images)
+
############# SHORTCUTS #################
+message (STATUS "> Shortcuts:")
set (GETTEXT_SHORTCUTS ${GETTEXT_PLUGINS})
-set (VERSION_SHORTCUTS "1.3.1")
+set (VERSION_SHORTCUTS "1.3.2")
set (PACKAGE_SHORTCUTS "cd-shortcuts")
set (shortcutsdatadir "${pluginsdatadir}/shortcuts")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/shortcuts/data/shortcuts.conf.in ${CMAKE_CURRENT_BINARY_DIR}/shortcuts/data/shortcuts.conf)
add_subdirectory (shortcuts)
############# SHOW DESKTOP #################
+message (STATUS "> ShowDesktop:")
set (with_xrandr "yes")
pkg_check_modules (SHOW_DESKTOP_XRANDR xrandr)
if ("${SHOW_DESKTOP_XRANDR_FOUND}" STREQUAL "")
message (STATUS "Could not find xrandr; ShowDesktop won't be built with screen resolution abilities.")
+ message (WARNING "This module is required to compile ShowDesktop applet with xRandr support: xrandr")
+ set (MODULES_MISSING "${MODULES_MISSING} xrandr")
set (with_xrandr "no")
endif()
set (GETTEXT_SHOW_DESKTOP ${GETTEXT_PLUGINS})
-set (VERSION_SHOW_DESKTOP "1.2.4")
+set (VERSION_SHOW_DESKTOP "1.2.5")
set (PACKAGE_SHOW_DESKTOP "cd-showDesktop")
set (show_desktopdatadir "${pluginsdatadir}/showDesktop")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/showDesktop/data/showDesktop.conf.in ${CMAKE_CURRENT_BINARY_DIR}/showDesktop/data/showDesktop.conf)
add_subdirectory (showDesktop)
############# SHOW MOUSE #################
+message (STATUS "> Show Mouse:")
set (GETTEXT_SHOW_MOUSE ${GETTEXT_PLUGINS})
set (VERSION_SHOW_MOUSE "1.0.4")
set (PACKAGE_SHOW_MOUSE "cd-show_mouse")
@@ -735,33 +942,41 @@
add_subdirectory (show-mouse)
############# SLIDER #################
+message (STATUS "> Slider:")
set (with_exif "yes")
pkg_check_modules (EXIF libexif)
if ("${EXIF_FOUND}" STREQUAL "")
message (STATUS "Could not find libexif; Slider won't be able to rotate the images accordingly to their exif data.")
+ message (WARNING "This module is required to compile Slider applet with Exif support: libexif")
+ set (MODULES_MISSING "${MODULES_MISSING} libexif")
set (with_exif "no")
endif()
set (GETTEXT_SLIDER ${GETTEXT_PLUGINS})
-set (VERSION_SLIDER "2.0.8")
+set (VERSION_SLIDER "2.0.9")
set (PACKAGE_SLIDER "cd-slider")
set (sliderdatadir "${pluginsdatadir}/slider")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/slider/data/slider.conf.in ${CMAKE_CURRENT_BINARY_DIR}/slider/data/slider.conf)
add_subdirectory (slider)
############# STACK #################
+message (STATUS "> Stack:")
set (GETTEXT_STACK ${GETTEXT_PLUGINS})
-set (VERSION_STACK "0.3.1")
+set (VERSION_STACK "0.3.2")
set (PACKAGE_STACK "cd-stack")
set (stackdatadir "${pluginsdatadir}/stack")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/stack/data/stack.conf.in ${CMAKE_CURRENT_BINARY_DIR}/stack/data/stack.conf)
add_subdirectory (stack)
############# STATUS NOTIFIER #################
+message (STATUS "> Status Notifier:")
if ("${DBUSMENU_GTK_FOUND}" STREQUAL "")
message (STATUS "Could not find Status-Notifier libs; Cairo-Dock won't be built with Status-Notifier support.")
+ message (WARNING "This module is required to compile Status Notifier applet: dbusmenu-gtk(-0.4)")
+ # set (MODULES_MISSING "${MODULES_MISSING} dbusmenu-gtk(-0.4)") # it should already be in the list.
+ set (with_status_notifier "no")
else()
set (GETTEXT_STATUS_NOTIFIER ${GETTEXT_PLUGINS})
- set (VERSION_STATUS_NOTIFIER "0.1.3")
+ set (VERSION_STATUS_NOTIFIER "0.1.4")
set (PACKAGE_STATUS_NOTIFIER "cd-status-notifier")
set (with_status_notifier "yes")
set (status_notifierdatadir "${pluginsdatadir}/Status-Notifier")
@@ -770,43 +985,51 @@
endif()
############# SWITCHER #################
+message (STATUS "> Switcher:")
set (GETTEXT_SWITCHER ${GETTEXT_PLUGINS})
-set (VERSION_SWITCHER "2.1.6")
+set (VERSION_SWITCHER "2.1.7")
set (PACKAGE_SWITCHER "cd-switcher")
set (switcherdatadir "${pluginsdatadir}/switcher")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/switcher/data/switcher.conf.in ${CMAKE_CURRENT_BINARY_DIR}/switcher/data/switcher.conf)
add_subdirectory (switcher)
############# SYSTEM MONITOR #################
+message (STATUS "> System Monitor:")
set (with_sensors "yes")
find_package (Sensors)
if (NOT "${SENSORS_FOUND}" STREQUAL "TRUE")
message (STATUS "Could not find libsensors; System-Monitor won't be able to monitor fan speed and CPU temperature.")
+ message (WARNING "This package is required to compile System Monitor applet with Sensors support: sensors")
+ set (PROGRAMS_MISSING "${PROGRAMS_MISSING} sensors")
set (with_sensors "no")
endif()
set (GETTEXT_SYSTEM_MONITOR ${GETTEXT_PLUGINS})
-set (VERSION_SYSTEM_MONITOR "1.0.6")
+set (VERSION_SYSTEM_MONITOR "1.0.7")
set (PACKAGE_SYSTEM_MONITOR "cd-system-monitor")
set (system_monitordatadir "${pluginsdatadir}/System-monitor")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/System-Monitor/data/System-Monitor.conf.in ${CMAKE_CURRENT_BINARY_DIR}/System-Monitor/data/System-Monitor.conf)
add_subdirectory (System-Monitor)
############# SYSTRAY #################
+message (STATUS "> Systray:")
set (GETTEXT_SYSTRAY ${GETTEXT_PLUGINS})
-set (VERSION_SYSTRAY "0.2.2")
+set (VERSION_SYSTRAY "0.2.3")
set (PACKAGE_SYSTRAY "cd-systray")
set (systraydatadir "${pluginsdatadir}/systray")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/systray/data/systray.conf.in ${CMAKE_CURRENT_BINARY_DIR}/systray/data/systray.conf)
add_subdirectory (systray)
############# TERMINAL #################
+message (STATUS "> Terminal:")
pkg_check_modules (TERMINAL_PACKAGE vte)
if ("${TERMINAL_PACKAGE_FOUND}" STREQUAL "")
message (STATUS "Could not find libvte; Cairo-Dock won't be built with terminal applet.")
+ message (WARNING "This module is required to compile Terminal applet: vte")
+ set (MODULES_MISSING "${MODULES_MISSING} vte")
set (with_terminal "no")
else()
set (GETTEXT_TERMINAL ${GETTEXT_PLUGINS})
- set (VERSION_TERMINAL "1.0.10")
+ set (VERSION_TERMINAL "1.0.11")
set (PACKAGE_TERMINAL "cd-terminal")
set (with_terminal "yes")
set (terminaldatadir "${pluginsdatadir}/terminal")
@@ -815,16 +1038,18 @@
endif()
############# TOMBOY #################
+message (STATUS "> Tomboy:")
set (GETTEXT_TOMBOY ${GETTEXT_PLUGINS})
-set (VERSION_TOMBOY "1.3.1")
+set (VERSION_TOMBOY "1.3.2")
set (PACKAGE_TOMBOY "cd-tomboy")
set (tomboydatadir "${pluginsdatadir}/tomboy")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/tomboy/data/tomboy.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tomboy/data/tomboy.conf)
add_subdirectory (tomboy)
############# TOONS #################
+message (STATUS "> Toons:")
set (GETTEXT_TOONS ${GETTEXT_PLUGINS})
-set (VERSION_TOONS "1.0.8")
+set (VERSION_TOONS "1.0.9")
set (PACKAGE_TOONS "cd-Toons")
set (toonsdatadir "${pluginsdatadir}/Toons")
set (toonsuserdirname "Toons")
@@ -832,8 +1057,9 @@
add_subdirectory (Toons)
############# WEATHER #################
+message (STATUS "> Weather:")
set (GETTEXT_WEATHER ${GETTEXT_PLUGINS})
-set (VERSION_WEATHER "1.2.10")
+set (VERSION_WEATHER "1.2.11")
set (PACKAGE_WEATHER "cd-weather")
set (weatherdatadir "${pluginsdatadir}/weather")
set (weatheruserdirname "weather")
@@ -841,14 +1067,17 @@
add_subdirectory (weather)
############# WEBLETS #################
+message (STATUS "> Weblets:")
set (with_weblets "no")
if (NOT "${enable-weblets}" STREQUAL "no")
pkg_check_modules (WEBKIT webkit-1.0)
if ("${WEBKIT_FOUND}" STREQUAL "")
message (STATUS "Could not find webkit-1.0; Cairo-Dock won't be built with Weblets applet.")
+ message (WARNING "This module is required to compile Weblets applet: webkit-1.0")
+ set (MODULES_MISSING "${MODULES_MISSING} webkit-1.0")
else()
set (GETTEXT_WEBLETS ${GETTEXT_PLUGINS})
- set (VERSION_WEBLETS "0.0.10")
+ set (VERSION_WEBLETS "0.0.11")
set (PACKAGE_WEBLETS "cd-weblets")
set (webletsdatadir "${pluginsdatadir}/weblets")
set (with_weblets "yes")
@@ -858,20 +1087,24 @@
endif()
############# WIFI #################
+message (STATUS "> WiFi:")
set (GETTEXT_WIFI ${GETTEXT_PLUGINS})
-set (VERSION_WIFI "1.2.6")
+set (VERSION_WIFI "1.2.7")
set (PACKAGE_WIFI "cd-wifi")
set (wifidatadir "${pluginsdatadir}/wifi")
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/wifi/data/wifi.conf.in ${CMAKE_CURRENT_BINARY_DIR}/wifi/data/wifi.conf)
add_subdirectory (wifi)
############# XFCE-INTEGRATION #################
+message (STATUS "> XFCE-Integration:")
set (with_xfce_integration "no")
if (NOT "${enable-xfce-integration}" STREQUAL "no")
pkg_check_modules (XFCE_INTEGRATION_THUNAR thunar-vfs-1)
pkg_check_modules (XFCE_INTEGRATION_GVFS gio-2.0)
if ("${XFCE_INTEGRATION_THUNAR_FOUND}" STREQUAL "" AND "${XFCE_INTEGRATION_GVFS_FOUND}" STREQUAL "")
message (STATUS "Could find neither thunar-vfs or libgio-2.0; Cairo-Dock won't be built with XFCE support.")
+ message (STATUS "This module is required to compile XFCE-Integration applet: gio-2.0 (or thunar-vfs-1)")
+ set (MODULES_INTEGRATION_MISSING "${MODULES_INTEGRATION_MISSING} gio-2.0")
else()
set (VERSION_XFCE_INTEGRATION "1.0.3")
set (PACKAGE_XFCE_INTEGRATION "cd_xfce-integration")
@@ -882,13 +1115,16 @@
endif()
############# XGAMMA #################
+message (STATUS "> XGamma:")
pkg_check_modules (XGAMMA_PACKAGE x11 xxf86vm)
if ("${XGAMMA_PACKAGE_FOUND}" STREQUAL "")
message (STATUS "Could not find xxf86vm; Cairo-Dock won't be built with Xgamma applet.")
+ message (WARNING "These modules are required to compile XGamma applet: x11 and xxf86vm")
+ set (MODULES_MISSING "${MODULES_MISSING} x11 xxf86vm")
set (with_xgamma "no")
else()
set (GETTEXT_XGAMMA ${GETTEXT_PLUGINS})
- set (VERSION_XGAMMA "1.2.0")
+ set (VERSION_XGAMMA "1.2.1")
set (PACKAGE_XGAMMA "cd-Xgamma")
set (with_xgamma "yes")
set (xgammadatadir "${pluginsdatadir}/Xgamma")
@@ -926,16 +1162,37 @@
message (STATUS " - with Weblets applet: ${with_weblets}")
message (STATUS " - with Xgamma applet: ${with_xgamma}")
message (STATUS " - with Recent-Events applet: ${with_recent_events}")
+message (STATUS " - with UPower support: ${with_upower_support}")
message (STATUS " - with Python interface: ${with_python}")
message (STATUS " - with Ruby interface: ${with_ruby}")
message (STATUS " - with Mono interface: ${with_mono}")
message (STATUS " - with Vala interface: ${with_vala}")
-message (STATUS " - with Vala Translator (valac) : ${with_valac}")
+message (STATUS " - with Vala Translator (valac): ${with_valac}")
message (STATUS "Unstable:")
message (STATUS " - with Disks applet: ${with_disks}")
message (STATUS " - with Doncky applet: ${with_doncky}")
+message (STATUS " - with Impulse applet: ${with_impulse}")
+message (STATUS " - with KDE experimental support: ${with_kde_integration2}")
message (STATUS " - with Network-Monitor applet: ${with_network_monitor}")
message (STATUS " - with Scooby-Do applet: ${with_scooby_do}")
-message (STATUS "Unsupported:")
+message (STATUS "Deprecated:")
message (STATUS " - with old Gnome support: ${with_gnome_integration_old}")
+
+if (NOT "${MODULES_MISSING}" STREQUAL "")
+ message ("")
+ message (STATUS "WARNING: It seems that one (or more) module(s) is (are) missing:${MODULES_MISSING}")
+ message (STATUS "It can be interesting to install them (even more if you're a maintainer of Cairo-Dock's packages).")
+endif ()
+
+if (NOT "${PROGRAMS_MISSING}" STREQUAL "")
+ message ("")
+ message (STATUS "WARNING: It seems that one (or more) program(s) or package(s) is (are) missing:${PROGRAMS_MISSING}")
+ message (STATUS "It can be interesting to install them (even more if you're a maintainer of Cairo-Dock's packages).")
+endif ()
+
+if (NOT "${MODULES_INTEGRATION_MISSING}" STREQUAL "")
+ message ("")
+ message (STATUS "WARNING: It seems that one (or more) module(s) for the integration with the system is (are) missing:${MODULES_INTEGRATION_MISSING}")
+ message (STATUS "It's maybe not required for the user but it's recommended to install them if you're a maintainer of Cairo-Dock's packages.")
+endif ()
message ("")
=== modified file 'Cairo-Penguin/data/Cairo-Penguin.conf.in'
--- Cairo-Penguin/data/Cairo-Penguin.conf.in 2011-04-20 20:46:51 +0000
+++ Cairo-Penguin/data/Cairo-Penguin.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_CAIRO_PENGUIN@
+#@VERSION_CAIRO_PENGUIN@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -11,13 +11,12 @@
#s Name of the icon as it will appear in its caption in the dock:
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
icon =
-#j+[0;128] Icon size for busy penguin:
+#j+[0;128] Desired icon size for this applet
#{Set to 0 to use the default applet size}
icon size = 0;0
=== modified file 'Clipper/data/Clipper.conf.in'
--- Clipper/data/Clipper.conf.in 2011-04-20 20:46:51 +0000
+++ Clipper/data/Clipper.conf.in 2011-08-09 20:07:46 +0000
@@ -1,23 +1,22 @@
-#!en;@VERSION_CLIPPER@
+#@VERSION_CLIPPER@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = Clipboard
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
#S+ Image filename:
#{Leave empty to use the default one.}
-icon =
+icon=accessories-text-editor.svg
#j+[0;128] Desired icon size for this applet
#{Set to 0 to use the default applet size}
=== modified file 'Clipper/src/applet-clipboard.c'
--- Clipper/src/applet-clipboard.c 2011-04-20 20:46:51 +0000
+++ Clipper/src/applet-clipboard.c 2011-08-09 20:07:46 +0000
@@ -451,6 +451,9 @@
pImage = gtk_image_new_from_pixbuf (pixbuf);
g_free (cIconFilePath);
g_object_unref (pixbuf);
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE);
+#endif
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), pImage);
}
gtk_menu_shell_append (GTK_MENU_SHELL (pMenu), pMenuItem);
=== added directory 'Composite-Manager'
=== added file 'Composite-Manager/CMakeLists.txt'
--- Composite-Manager/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Composite-Manager/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,2 @@
+add_subdirectory(src)
+add_subdirectory(data)
=== added directory 'Composite-Manager/data'
=== added file 'Composite-Manager/data/CMakeLists.txt'
--- Composite-Manager/data/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Composite-Manager/data/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,10 @@
+
+########### install files ###############
+
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Composite-Manager.conf
+ preview.jpg
+ icon.png
+ composite-on.png
+ composite-off.png
+ DESTINATION ${composite_managerdatadir})
+
=== added file 'Composite-Manager/data/Composite-Manager.conf.in'
--- Composite-Manager/data/Composite-Manager.conf.in 1970-01-01 00:00:00 +0000
+++ Composite-Manager/data/Composite-Manager.conf.in 2011-08-09 20:07:46 +0000
@@ -0,0 +1,137 @@
+#@VERSION_COMPOSITE_MANAGER@
+
+#[gtk-about]
+[Icon]
+
+#F[Icon]
+frame_maininfo=
+
+#d Name of the dock it belongs to:
+dock name =
+
+#s Name of the icon as it will appear in its caption in the dock:
+name =
+ #v
+sep_display=
+
+icon =
+
+#j[0;128] Desired icon size for this applet
+#{Set to 0 to use the default applet size}
+icon size = 0;0
+
+order=
+
+#F[Applet's Handbook]
+frame_hand=
+#A
+handbook=Composite-Manager
+
+
+#[gtk-convert]
+[Desklet]
+
+#X[Position]
+frame_pos =
+
+#b Lock position?
+#{If locked, the desklet cannot be moved by simply dragging it with the left mouse button. It can still be moved with ALT + left-click.}
+locked = false
+
+#j+[24;512] Desklet dimensions (width x height):
+#{Depending on your WindowManager, you may be able to resize this with ALT + middle-click or ALT + left-click.}
+size = 96;96
+
+#i[-2048;2048] Desklet position (x, y):
+#{Depending on your WindowManager, you may be able to move this with ALT + left-click.. Negative values are counted from the right/bottom of the screen}
+x position=0
+#i[-2048;2048] ...
+y position=0
+
+#I[-180;180] Rotation:
+#{You can quickly rotate the desklet with the mouse, by dragging the little buttons on its left and top sides.}
+rotation = 0
+
+#X[Visibility]
+frame_visi =
+
+#b Is detached from the dock
+initially detached=false
+#l[Normal;Keep above;Keep below;Keep on widget layer;Reserve space] Visibility:
+#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)}
+accessibility=0
+#b Should be visible on all desktops?
+sticky=true
+
+
+#F[Decorations;gtk-orientation-portrait]
+frame_deco=
+
+#o+ Choose a decoration theme for this desklet:
+#{Choose 'Custom decorations' to define your own decorations below.}
+decorations = default
+
+#v
+sep_deco =
+
+#S+ Background image:
+#{Image to be displayed below drawings, e.g. a frame. Leave empty for no image.}
+bg desklet =
+#e+[0;1] Background transparency:
+bg alpha = 1
+#i+[0;256] Left offset:
+#{in pixels. Use this to adjust the left position of drawings.}
+left offset = 0
+#i+[0;256] Top offset:
+#{in pixels. Use this to adjust the top position of drawings.}
+top offset = 0
+#i+[0;256] Right offset:
+#{in pixels. Use this to adjust the right position of drawings.}
+right offset = 0
+#i+[0;256] Bottom offset:
+#{in pixels. Use this to adjust the bottom position of drawings.}
+bottom offset = 0
+#S+ Foreground image:
+#{Image to be displayed above the drawings, e.g. a reflection. Leave empty for no image.}
+fg desklet =
+#e+[0;1] Foreground tansparency:
+fg alpha = 1
+
+
+#[gtk-preferences]
+[Configuration]
+
+#F[Style;gtk-color-picker]
+frame_style =
+
+#S+ Image when composite is active:
+#{Leave empty to use the default one.}
+icon on =
+
+#S+ Image when composite is inactive:
+#{Leave empty to use the default one.}
+icon off =
+
+
+#F[Behaviour;gtk-execute]
+frame_behav =
+
+#E[;Compiz;KWin;Xfwm;Metacity] Composite window-manager:
+#{Let empty to use the default one. Alternatively, you can set any command you want.}
+compositor =
+
+#E[;Compiz;KWin;Xfwm;Metacity] Fallback window-manager:
+#{Let empty to use the default one. Alternatively, you can set any command you want.}
+fallback =
+
+#b Ask before switching:
+ask = true
+
+#v
+sep_act=
+
+#l[Edit Window-Manager settings;Reload Window-Manager;Show desktop;Expose all the desktops;Expose all the windows;Show the Widget Layer] Action on middle-click:
+action on click = 0
+
+#k Shortkey to toggle the composite ON/OFF:
+shortkey = <Control>F12
=== added file 'Composite-Manager/data/composite-off.png'
Binary files Composite-Manager/data/composite-off.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/composite-off.png 2011-08-09 20:07:46 +0000 differ
=== added file 'Composite-Manager/data/composite-on.png'
Binary files Composite-Manager/data/composite-on.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/composite-on.png 2011-08-09 20:07:46 +0000 differ
=== added file 'Composite-Manager/data/icon.png'
Binary files Composite-Manager/data/icon.png 1970-01-01 00:00:00 +0000 and Composite-Manager/data/icon.png 2011-08-09 20:07:46 +0000 differ
=== added file 'Composite-Manager/data/preview.jpg'
Binary files Composite-Manager/data/preview.jpg 1970-01-01 00:00:00 +0000 and Composite-Manager/data/preview.jpg 2011-08-09 20:07:46 +0000 differ
=== added directory 'Composite-Manager/src'
=== added file 'Composite-Manager/src/CMakeLists.txt'
--- Composite-Manager/src/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,39 @@
+
+########### sources ###############
+
+SET(MODULE_SRCS
+ applet-struct.h
+ applet-init.c applet-init.h
+ applet-config.c applet-config.h
+ applet-composite-manager.c applet-composite-manager.h
+ applet-notifications.c applet-notifications.h
+)
+
+add_library(${PACKAGE_COMPOSITE_MANAGER} SHARED ${MODULE_SRCS})
+
+########### compil ###############
+add_definitions (-DMY_APPLET_SHARE_DATA_DIR="${composite_managerdatadir}")
+add_definitions (-DMY_APPLET_PREVIEW_FILE="preview.jpg")
+add_definitions (-DMY_APPLET_CONF_FILE="Composite-Manager.conf")
+add_definitions (-DMY_APPLET_USER_DATA_DIR="Composite-Manager")
+add_definitions (-DMY_APPLET_VERSION="${VERSION_COMPOSITE_MANAGER}")
+add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_COMPOSITE_MANAGER}")
+add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")
+add_definitions (-DMY_APPLET_ICON_FILE="icon.png")
+### uncomment the following line to allow multi-instance applet.
+#add_definitions (-DCD_APPLET_MULTI_INSTANCE="1")
+### uncomment the following line to allow extended OpenGL drawing.
+#add_definitions (-DGL_GLEXT_PROTOTYPES="1")
+
+include_directories (
+ ${PACKAGE_INCLUDE_DIRS})
+
+link_directories (
+ ${PACKAGE_LIBRARY_DIRS})
+
+target_link_libraries (${PACKAGE_COMPOSITE_MANAGER}
+ ${PACKAGE_LIBRARIES})
+
+########### install files ###############
+
+install(TARGETS ${PACKAGE_COMPOSITE_MANAGER} DESTINATION ${pluginsdir})
=== added file 'Composite-Manager/src/applet-composite-manager.c'
--- Composite-Manager/src/applet-composite-manager.c 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-composite-manager.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,535 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define _BSD_SOURCE
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <glib/gstdio.h>
+#include <cairo-dock.h>
+
+#include "applet-struct.h"
+#include "applet-composite-manager.h"
+
+
+ ///////////////////
+ /// WM BACKENDS ///
+///////////////////
+
+static CDWM *_get_wm_by_name (const gchar *cName)
+{
+ int i;
+ for (i = 0; i < NB_WM; i ++)
+ {
+ if (strcmp (cName, myData.pWmList[i].cName) == 0)
+ return &myData.pWmList[i];
+ }
+ return NULL;
+}
+static CDWM *_get_wm_by_index (CDWMIndex n)
+{
+ if (n < NB_WM)
+ return &myData.pWmList[n];
+ else
+ return NULL;
+}
+
+static void _set_metacity_composite (gboolean bActive)
+{
+ int r;
+ if (bActive)
+ r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true");
+ else
+ r = system ("gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false");
+}
+static void _set_xfwm_composite (gboolean bActive)
+{
+ int r;
+ if (bActive)
+ r = system ("xfconf-query -c xfwm4 -p '/general/use_compositing' -t 'bool' -s 'true'");
+ else
+ r = system ("xfconf-query -c xfwm4 -p '/general/use_compositing' -t 'bool' -s 'false'");
+}
+static void _set_kwin_composite (gboolean bActive)
+{
+ int r;
+ if (bActive)
+ r = system ("if test \"`qdbus org.kde.kwin /KWin compositingActive`\" = \"false\";then qdbus org.kde.kwin /KWin toggleCompositing; fi"); // not active, so activating
+ else
+ r = system ("if test \"`qdbus org.kde.kwin /KWin compositingActive`\" = \"true\"; then qdbus org.kde.kwin /KWin toggleCompositing; fi"); // active, so deactivating
+}
+static void _define_known_wms (void)
+{
+ myData.pWmList[CD_COMPIZ].cName = "Compiz";
+ myData.pWmList[CD_COMPIZ].cCommand = "compiz --replace";
+ myData.pWmList[CD_COMPIZ].activate_composite = NULL;
+ myData.pWmList[CD_COMPIZ].cConfigTool = "ccsm";
+
+ myData.pWmList[CD_KWIN].cName = "KWin";
+ myData.pWmList[CD_KWIN].cCommand = "kwin --replace";
+ myData.pWmList[CD_KWIN].activate_composite = _set_kwin_composite;
+ myData.pWmList[CD_KWIN].cConfigTool = NULL; /// TODO: find the config tool...
+
+ myData.pWmList[CD_XFWM].cName = "Xfwm";
+ myData.pWmList[CD_XFWM].cCommand = "xfwm4 --replace";
+ myData.pWmList[CD_XFWM].activate_composite = _set_xfwm_composite;
+ myData.pWmList[CD_XFWM].cConfigTool = "xfwm4-settings"; // there is also xfwm4-tweaks-settings, wish they merge both ...
+
+ myData.pWmList[CD_METACITY].cName = "Metacity";
+ myData.pWmList[CD_METACITY].cCommand = "metacity --replace";
+ myData.pWmList[CD_METACITY].activate_composite = _set_metacity_composite;
+ myData.pWmList[CD_METACITY].cConfigTool = "gconf-editor /apps/metacity";
+
+ myData.pWmList[CD_CUSTOM_WMFB].cName = "Fallback";
+ myData.pWmList[CD_CUSTOM_WMFB].cCommand = NULL;
+ myData.pWmList[CD_CUSTOM_WMFB].activate_composite = NULL;
+ myData.pWmList[CD_CUSTOM_WMFB].bIsAvailable = TRUE;
+
+ myData.pWmList[CD_CUSTOM_WMC].cName = "Composite";
+ myData.pWmList[CD_CUSTOM_WMC].cCommand = NULL;
+ myData.pWmList[CD_CUSTOM_WMC].activate_composite = NULL;
+ myData.pWmList[CD_CUSTOM_WMC].bIsAvailable = TRUE;
+}
+
+static void _check_available_wms (gchar *cWhich)
+{
+ if (cWhich == NULL) // no known WM is present, skip the check.
+ return;
+
+ CDWM *wm;
+ wm = _get_wm_by_index (CD_COMPIZ);
+ wm->bIsAvailable = (strstr (cWhich, "compiz") != NULL);
+ wm = _get_wm_by_index (CD_KWIN);
+ wm->bIsAvailable = (strstr (cWhich, "kwin") != NULL);
+ wm = _get_wm_by_index (CD_XFWM);
+ wm->bIsAvailable = (strstr (cWhich, "xfwm4") != NULL);
+ wm = _get_wm_by_index (CD_METACITY);
+ wm->bIsAvailable = (strstr (cWhich, "metacity") != NULL);
+}
+
+static CDWMIndex _check_current_wm (gchar *cPs)
+{
+ if (cPs == NULL) // no known WM is present, skip the check.
+ return -1;
+
+ if (strstr (cPs, "compiz") != NULL)
+ return CD_COMPIZ;
+ if (strstr (cPs, "kwin") != NULL)
+ return CD_KWIN;
+ if (strstr (cPs, "xfwm4") != NULL)
+ return CD_XFWM;
+ if (strstr (cPs, "metacity") != NULL)
+ return CD_METACITY;
+
+ return -1;
+}
+
+
+ ////////////////////////
+ /// COMPOSITE SIGNAL ///
+////////////////////////
+
+static void _on_composited_changed (GdkScreen *pScreen, gpointer data)
+{
+ myData.bIsComposited = gdk_screen_is_composited (pScreen);
+ cd_draw_current_state ();
+}
+static void _start_watching_composite_state (void)
+{
+ // get the current state.
+ GdkScreen *pScreen = gdk_screen_get_default ();
+ myData.bIsComposited = gdk_screen_is_composited (pScreen);
+
+ // draw it.
+ cd_draw_current_state ();
+
+ // listen for future changes.
+ g_signal_connect (G_OBJECT (pScreen), "composited-changed", G_CALLBACK(_on_composited_changed), NULL);
+}
+
+
+ ///////////////////
+ /// PREFERED WM ///
+///////////////////
+
+static CDWM *_get_prefered_wmc (CDWMIndex iCurrentWm)
+{
+ g_print ("%s (%s, %d)\n", __func__, myConfig.cWmCompositor, iCurrentWm);
+ CDWM *wm;
+ if (myConfig.cWmCompositor != NULL) // a composite WM is defined.
+ {
+ wm = _get_wm_by_name (myConfig.cWmCompositor);
+ if (wm == NULL) // not one of the known WM -> define and take the custom one.
+ {
+ wm = _get_wm_by_index (CD_CUSTOM_WMC);
+ g_free ((gchar*)wm->cCommand);
+ wm->cCommand = g_strdup (myConfig.cWmCompositor);
+ return wm;
+ }
+ else if (wm->bIsAvailable)
+ return wm;
+ }
+
+ // no WM defined, or the one defined is not available -> check if a suitable one is running.
+ if (iCurrentWm < NB_WM) // one of the know WM is running
+ {
+ if (myData.bIsComposited) // and it provides composite => let's take it!
+ {
+ wm = _get_wm_by_index (iCurrentWm);
+ if (wm->bIsAvailable) // just to be sure.
+ return wm;
+ }
+ }
+
+ // no succes so far, take the most suitable one.
+ int index[NB_COMPOSITE_WM] = {CD_COMPIZ, CD_KWIN, CD_XFWM, CD_METACITY}; // in this order by default.
+ switch (g_iDesktopEnv)
+ {
+ case CAIRO_DOCK_GNOME:
+ index[1] = CD_METACITY;
+ index[3] = CD_KWIN;
+ break;
+ case CAIRO_DOCK_XFCE:
+ index[1] = CD_XFWM;
+ index[2] = CD_KWIN;
+ break;
+ case CAIRO_DOCK_KDE:
+ default:
+ break;
+ }
+ int i;
+ for (i = 0; i < NB_COMPOSITE_WM; i ++)
+ {
+ wm = _get_wm_by_index (index[i]);
+ g_print (" %d) %s, %d\n", index[i], wm->cName, wm->bIsAvailable);
+ if (wm->bIsAvailable)
+ return wm;
+ }
+ return NULL;
+}
+
+static CDWM *_get_prefered_wmfb (CDWMIndex iCurrentWm)
+{
+ g_print ("%s (%s, %d)\n", __func__, myConfig.cWmFallback, iCurrentWm);
+ CDWM *wm;
+ if (myConfig.cWmFallback != NULL) // a fallback WM is defined.
+ {
+ wm = _get_wm_by_name (myConfig.cWmFallback);
+ if (wm == NULL) // not one of the known WM -> define and take the custom one.
+ {
+ wm = _get_wm_by_index (CD_CUSTOM_WMFB);
+ g_free ((gchar*)wm->cCommand);
+ wm->cCommand = g_strdup (myConfig.cWmFallback);
+ return wm;
+ }
+ else if (wm->bIsAvailable)
+ return wm;
+ }
+
+ // no WM defined, or the one defined is not available -> check if a suitable one is running.
+ if (iCurrentWm < NB_WM) // one of the know WM is running
+ {
+ if (!myData.bIsComposited) // and it is a fallback => let's take it!
+ {
+ wm = _get_wm_by_index (iCurrentWm);
+ g_print ("current wm: %d, %d\n", iCurrentWm, wm->bIsAvailable);
+ if (wm->bIsAvailable) // just to be sure.
+ return wm;
+ }
+ }
+
+ // no succes so far, take the most suitable one.
+ int index[NB_FALLBACK_WM] = {CD_METACITY, CD_XFWM, CD_KWIN}; // in this order by default.
+ switch (g_iDesktopEnv)
+ {
+ case CAIRO_DOCK_GNOME:
+ index[0] = CD_METACITY;
+ index[1] = CD_XFWM;
+ break;
+ case CAIRO_DOCK_XFCE:
+ index[0] = CD_XFWM;
+ index[1] = CD_METACITY;
+ break;
+ case CAIRO_DOCK_KDE:
+ index[0] = CD_KWIN;
+ index[1] = CD_METACITY;
+ index[2] = CD_XFWM;
+ break;
+ }
+ int i;
+ for (i = 0; i < NB_FALLBACK_WM; i ++)
+ {
+ wm = _get_wm_by_index (index[i]);
+ g_print (" %s (%d)\n", wm->cName, wm->bIsAvailable);
+ if (wm->bIsAvailable)
+ return wm;
+ }
+ return NULL;
+}
+
+static inline gchar *_get_running_wm (void)
+{
+ return cairo_dock_launch_command_sync ("pgrep -l \"kwin$|compiz$|xfwm4$|metacity$\""); // -l = write the name of the program (not the command next to the PID in 'ps -ef'. we add a '$' after the names to avoid listing things like compiz-decorator or xfwm4-settings
+}
+static void _define_prefered_wms (gchar *cPs)
+{
+ // get the compositor and fallback WMs
+ CDWMIndex iCurrentWm = _check_current_wm (cPs);
+ myData.wmc = _get_prefered_wmc (iCurrentWm);
+ myData.wmfb = _get_prefered_wmfb (iCurrentWm);
+ g_print ("***** WM: %s / %s\n", myData.wmc?myData.wmc->cName:NULL, myData.wmfb?myData.wmfb->cName:NULL);
+}
+void cd_define_prefered_wms (void)
+{
+ gchar *ps = _get_running_wm ();
+ _define_prefered_wms (ps);
+ g_free (ps);
+}
+
+ /////////////////
+ /// INIT/STOP ///
+/////////////////
+
+static void _check_wms (CDSharedMemory *pSharedMemory)
+{
+ pSharedMemory->which = cairo_dock_launch_command_sync ("which compiz kwin xfwm4 metacity");
+
+ pSharedMemory->ps = _get_running_wm ();
+}
+static void _update_from_data (CDSharedMemory *pSharedMemory)
+{
+ _check_available_wms (pSharedMemory->which);
+
+ _define_prefered_wms (pSharedMemory->ps); // we do it once we know the current state.
+
+ cairo_dock_discard_task (myData.pTask);
+ myData.pTask = NULL;
+}
+
+static void _free_shared_memory (CDSharedMemory *pSharedMemory)
+{
+ g_free (pSharedMemory->which);
+ g_free (pSharedMemory->ps);
+ g_free (pSharedMemory);
+}
+void cd_init_wms (void)
+{
+ _define_known_wms ();
+
+ _start_watching_composite_state ();
+
+ CDSharedMemory *pSharedMemory = g_new0 (CDSharedMemory, 1);
+ myData.pTask = cairo_dock_new_task_full (0, // one-shot
+ (CairoDockGetDataAsyncFunc) _check_wms,
+ (CairoDockUpdateSyncFunc) _update_from_data,
+ (GFreeFunc) _free_shared_memory,
+ pSharedMemory);
+ cairo_dock_launch_task_delayed (myData.pTask, 3000); // 3s delay, since we don't need these info right away.
+}
+
+
+void cd_stop_wms (void)
+{
+ // discard task.
+ cairo_dock_discard_task (myData.pTask);
+
+ // stop listening
+ GdkScreen *pScreen = gdk_screen_get_default ();
+ g_signal_handlers_disconnect_by_func (G_OBJECT(pScreen), _on_composited_changed, NULL);
+
+ // reset custom WMs.
+ CDWM *wm;
+ wm = _get_wm_by_index (CD_CUSTOM_WMC);
+ g_free ((gchar*)wm->cCommand);
+ wm = _get_wm_by_index (CD_CUSTOM_WMFB);
+ g_free ((gchar*)wm->cCommand);
+}
+
+
+ ////////////
+ /// DRAW ///
+////////////
+
+void cd_draw_current_state (void)
+{
+ g_print ("%s (%d)\n", __func__, myData.bIsComposited);
+ if (myData.bIsComposited)
+ CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconCompositeON, "composite-on.png");
+ else
+ CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconCompositeOFF, "composite-off.png");
+}
+
+
+ /////////////////////
+ /// TOGGLE ON/OFF ///
+/////////////////////
+
+static gboolean _activate_composite_delayed (gpointer data)
+{
+ if (data)
+ {
+ if (myData.wmc->activate_composite != NULL)
+ myData.wmc->activate_composite (TRUE);
+ }
+ else
+ {
+ if (myData.wmfb->activate_composite != NULL)
+ myData.wmfb->activate_composite (FALSE);
+ }
+ return FALSE;
+}
+
+static gboolean _wm_is_running (CDWM *wm)
+{
+ const gchar *cCommand = wm->cCommand;
+ gchar *cWhich = g_strdup_printf ("pgrep %s$", cCommand); // see above for the '$' character.
+ gchar *str = strchr (cWhich+6, ' '); // remove any parameter to the command, we just want the program name.
+ if (str) // a space is found.
+ {
+ *str = '$';
+ *(str+1) = '\0';
+ }
+ gchar *cResult = cairo_dock_launch_command_sync (cWhich);
+ gboolean bIsRunning = (cResult != NULL && *cResult != '\0');
+
+ g_free (cWhich);
+ g_free (cResult);
+ return bIsRunning;
+}
+
+static void cd_turn_composite_on (void)
+{
+ if (myData.wmc == NULL) // no compositor.
+ {
+ cairo_dock_show_temporary_dialog_with_icon (D_("No compositor is available."), myIcon, myContainer, 6000, "same icon");
+ return;
+ }
+
+ // if not already launched, launch it.
+ if (! _wm_is_running (myData.wmc)) // not running
+ {
+ cairo_dock_launch_command (myData.wmc->cCommand);
+ g_timeout_add_seconds (2, _activate_composite_delayed, GINT_TO_POINTER (1)); // let the WM start for 2s.
+ }
+ else // already running, just toggle composite ON.
+ {
+ if (myData.wmc->activate_composite != NULL)
+ myData.wmc->activate_composite (TRUE);
+ else
+ cairo_dock_show_temporary_dialog_with_icon (D_("No compositor is available."), myIcon, myContainer, 6000, "same icon");
+ }
+}
+
+static void cd_turn_composite_off (void)
+{
+ if (myData.wmfb == NULL) // no fallback.
+ {
+ cairo_dock_show_temporary_dialog_with_icon (D_("No fallback is available."), myIcon, myContainer, 6000, "same icon");
+ return;
+ }
+
+ // if not already launched, launch it.
+ if (! _wm_is_running (myData.wmfb)) // not running
+ {
+ cairo_dock_launch_command (myData.wmfb->cCommand);
+ g_timeout_add_seconds (2, _activate_composite_delayed, 0); // let the WM start for 2s.
+ }
+ else // already running, just toggle composite OFF.
+ {
+ if (myData.wmfb->activate_composite != NULL)
+ myData.wmfb->activate_composite (FALSE);
+ else
+ cairo_dock_show_temporary_dialog_with_icon (D_("No fallback is available."), myIcon, myContainer, 6000, "same icon");
+ }
+}
+
+void cd_toggle_composite (void)
+{
+ if (myData.bIsComposited)
+ cd_turn_composite_off ();
+ else
+ cd_turn_composite_on ();
+}
+
+
+ ///////////////////
+ /// CONFIG TOOL ///
+///////////////////
+
+static const gchar *_get_config_tool (void)
+{
+ if (myData.bIsComposited && myData.wmc)
+ {
+ return myData.wmc->cConfigTool;
+ }
+ else if (!myData.bIsComposited && myData.wmfb)
+ {
+ return myData.wmfb->cConfigTool;
+ }
+ return NULL;
+}
+void cd_open_wm_config (void)
+{
+ const gchar *cConfigTool = _get_config_tool ();
+
+ if (cConfigTool != NULL)
+ {
+ gchar *cmd = g_strdup_printf ("which %s", cConfigTool);
+ gchar *cResult = cairo_dock_launch_command_sync (cmd);
+ g_free (cmd);
+ if (cResult == NULL || *cResult != '/')
+ {
+ gchar *msg = g_strdup_printf (D_("You need to install '%s'"), cConfigTool);
+ cairo_dock_show_temporary_dialog_with_icon (msg, myIcon, myContainer, 6000, "same icon");
+ g_free (msg);
+ }
+ else
+ {
+ cairo_dock_launch_command (cConfigTool);
+ }
+ }
+ else
+ {
+ cairo_dock_show_temporary_dialog_with_icon (D_("No configuration tool is available."), myIcon, myContainer, 6000, "same icon");
+ }
+}
+
+
+static const gchar *_get_command (void)
+{
+ if (myData.bIsComposited && myData.wmc)
+ {
+ return myData.wmc->cCommand;
+ }
+ else if (!myData.bIsComposited && myData.wmfb)
+ {
+ return myData.wmfb->cCommand;
+ }
+ return NULL;
+}
+
+void cd_reload_wm (void)
+{
+ const gchar *cCommand = _get_command ();
+ if (cCommand != NULL)
+ {
+ cairo_dock_launch_command (cCommand);
+ }
+}
=== added file 'Composite-Manager/src/applet-composite-manager.h'
--- Composite-Manager/src/applet-composite-manager.h 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-composite-manager.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,46 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __APPLET_COMPOSITE_MANAGER__
+#define __APPLET_COMPOSITE_MANAGER__
+
+#include <cairo-dock.h>
+
+
+void cd_init_wms (void);
+
+void cd_stop_wms (void);
+
+
+void cd_define_prefered_wms (void);
+
+
+void cd_draw_current_state (void);
+
+
+void cd_toggle_composite (void);
+
+
+void cd_open_wm_config (void);
+
+
+void cd_reload_wm (void);
+
+
+#endif
=== added file 'Composite-Manager/src/applet-config.c'
--- Composite-Manager/src/applet-config.c 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,63 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <cairo-dock.h>
+
+#include "applet-struct.h"
+#include "applet-composite-manager.h"
+#include "applet-config.h"
+
+
+static void _cd_on_keybinding_pull (const char *keystring, gpointer user_data)
+{
+ cd_toggle_composite ();
+}
+
+CD_APPLET_GET_CONFIG_BEGIN
+ myConfig.cWmCompositor = CD_CONFIG_GET_STRING ("Configuration", "compositor");
+ myConfig.cWmFallback = CD_CONFIG_GET_STRING ("Configuration", "fallback");
+
+ myConfig.cIconCompositeON = CD_CONFIG_GET_STRING ("Configuration", "icon on");
+ myConfig.cIconCompositeOFF = CD_CONFIG_GET_STRING ("Configuration", "icon off");
+
+ myConfig.bAskBeforeSwitching = CD_CONFIG_GET_BOOLEAN ("Configuration", "ask");
+
+ myConfig.iActionOnMiddleClick = CD_CONFIG_GET_INTEGER ("Configuration", "action on click");
+
+ myConfig.cShortCut = CD_CONFIG_GET_STRING ("Configuration", "shortkey");
+ cd_keybinder_bind (myConfig.cShortCut, (CDBindkeyHandler)_cd_on_keybinding_pull, (gpointer)NULL);
+CD_APPLET_GET_CONFIG_END
+
+
+CD_APPLET_RESET_CONFIG_BEGIN
+ g_free (myConfig.cWmCompositor);
+ g_free (myConfig.cWmFallback);
+ g_free (myConfig.cIconCompositeON);
+ g_free (myConfig.cIconCompositeOFF);
+ if (myConfig.cShortCut)
+ {
+ cd_keybinder_unbind(myConfig.cShortCut, (CDBindkeyHandler)_cd_on_keybinding_pull);
+ g_free (myConfig.cShortCut);
+ }
+CD_APPLET_RESET_CONFIG_END
+
+
+CD_APPLET_RESET_DATA_BEGIN
+
+CD_APPLET_RESET_DATA_END
=== added file 'Composite-Manager/src/applet-config.h'
--- Composite-Manager/src/applet-config.h 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-config.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,30 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __APPLET_CONFIG__
+#define __APPLET_CONFIG__
+
+#include <cairo-dock.h>
+
+
+CD_APPLET_CONFIG_H
+
+
+#endif
=== added file 'Composite-Manager/src/applet-init.c'
--- Composite-Manager/src/applet-init.c 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,73 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "applet-config.h"
+#include "applet-notifications.h"
+#include "applet-struct.h"
+#include "applet-composite-manager.h"
+#include "applet-init.h"
+
+
+CD_APPLET_DEFINITION (N_("Composite-Manager"),
+ 2, 3, 0,
+ CAIRO_DOCK_CATEGORY_APPLET_DESKTOP,
+ N_("This applet allows you to <b>toggle the composite ON/OFF</b>.\n"
+ "The composite is what allows transparency on the desktop, but it can slow down your PC, especially during games.\n"
+ "<b>Click</b> on the icon to switch the composite ON/OFF. You can define a <b>shortcut</b> for this action.\n"
+ "The applet also lets you acces to some actions of the Window-Manager, from <b>middle-click and the menu</b>.\n"
+ "You can define in the configuration a Window-Manager that will provide the composite, and another as a fallback."),
+ "Fabounet")
+
+
+CD_APPLET_INIT_BEGIN
+ if (myDesklet)
+ {
+ CD_APPLET_SET_DESKLET_RENDERER ("Simple");
+ }
+
+ cd_init_wms ();
+
+ CD_APPLET_REGISTER_FOR_CLICK_EVENT;
+ CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT;
+ CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT;
+CD_APPLET_INIT_END
+
+
+CD_APPLET_STOP_BEGIN
+ cd_stop_wms ();
+
+ CD_APPLET_UNREGISTER_FOR_CLICK_EVENT;
+ CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT;
+ CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT;
+CD_APPLET_STOP_END
+
+
+CD_APPLET_RELOAD_BEGIN
+ if (CD_APPLET_MY_CONFIG_CHANGED)
+ {
+ if (myDesklet && CD_APPLET_MY_CONTAINER_TYPE_CHANGED) // we are now in a desklet, set a renderer.
+ {
+ CD_APPLET_SET_DESKLET_RENDERER ("Simple");
+ }
+
+ cd_define_prefered_wms ();
+
+ cd_draw_current_state ();
+ }
+CD_APPLET_RELOAD_END
=== added file 'Composite-Manager/src/applet-init.h'
--- Composite-Manager/src/applet-init.h 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-init.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,31 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __APPLET_INIT__
+#define __APPLET_INIT__
+
+
+#include <cairo-dock.h>
+
+
+CD_APPLET_H
+
+
+#endif
=== added file 'Composite-Manager/src/applet-notifications.c'
--- Composite-Manager/src/applet-notifications.c 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-notifications.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,170 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define _BSD_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <glib/gi18n.h>
+#include <glib/gstdio.h>
+
+#include "applet-struct.h"
+#include "applet-notifications.h"
+#include "applet-composite-manager.h"
+
+static void _on_answer (int iClickedButton, GtkWidget *pInteractiveWidget, gpointer data, CairoDialog *pDialog)
+{
+ if (iClickedButton == 0 || iClickedButton == -1) // ok or Enter
+ {
+ cd_toggle_composite ();
+ }
+}
+
+CD_APPLET_ON_CLICK_BEGIN
+ if (myConfig.bAskBeforeSwitching)
+ {
+ cairo_dock_show_dialog_full (D_("Toggle composite?"), myIcon, myContainer, 0, "same icon", NULL, (CairoDockActionOnAnswerFunc)_on_answer, NULL, NULL);
+ }
+ else
+ {
+ cd_toggle_composite ();
+ }
+CD_APPLET_ON_CLICK_END
+
+
+static void _cd_show_desktop (void)
+{
+ gboolean bDesktopIsVisible = cairo_dock_desktop_is_visible ();
+ cairo_dock_show_hide_desktop (! bDesktopIsVisible);
+}
+static void _cd_expose_windows (void)
+{
+ cairo_dock_wm_present_windows ();
+}
+static gboolean _cd_expose_windows_idle (gpointer data)
+{
+ _cd_expose_windows ();
+ return FALSE;
+}
+static void _cd_expose_desktops (void)
+{
+ cairo_dock_wm_present_desktops ();
+}
+static void _cd_show_widget_layer (void)
+{
+ cairo_dock_wm_show_widget_layer ();
+}
+
+CD_APPLET_ON_MIDDLE_CLICK_BEGIN
+ switch (myConfig.iActionOnMiddleClick)
+ {
+
+ case CD_EDIT_CONFIG:
+ {
+ cd_open_wm_config();
+ }
+ break;
+ case CD_RELOAD_WM:
+ {
+ cd_reload_wm();
+ }
+ break;
+ case CD_SHOW_DESKTOP:
+ {
+ _cd_show_desktop ();
+ }
+ break;
+ case CD_EXPOSE_DESKTOPS:
+ {
+ _cd_expose_desktops ();
+ }
+ break;
+ case CD_EXPOSE_WINDOWS:
+ {
+ // ok this is just crazy: if you call the Scale dbus method of Compiz before the middle button is released, it doesn't work.
+ g_timeout_add (300, _cd_expose_windows_idle, NULL);
+ }
+ break;
+ case CD_SHOW_WIDGET_LAYER:
+ {
+ _cd_show_widget_layer ();
+ }
+ break;
+ default: // shouldn't happen.
+ cd_warning ("problem in the config!");
+ break;
+ }
+CD_APPLET_ON_MIDDLE_CLICK_END
+
+
+CD_APPLET_ON_BUILD_MENU_BEGIN
+ gchar *cLabel;
+
+ cLabel = (myConfig.iActionOnMiddleClick == CD_EDIT_CONFIG ? g_strdup_printf ("%s (%s)", D_("Edit Window-Manager settings"), D_("middle-click")) : g_strdup (D_("Edit Window-Manager settings")));
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel,
+ GTK_STOCK_EDIT,
+ cd_open_wm_config,
+ CD_APPLET_MY_MENU);
+ g_free (cLabel);
+
+ cLabel = (myConfig.iActionOnMiddleClick == CD_RELOAD_WM ? g_strdup_printf ("%s (%s)", D_("Reload Window-Manager"), D_("middle-click")) : g_strdup (D_("Reload Window-Manager")));
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel,
+ GTK_STOCK_REFRESH,
+ cd_reload_wm,
+ CD_APPLET_MY_MENU);
+ g_free (cLabel);
+
+ CD_APPLET_ADD_SEPARATOR_IN_MENU (CD_APPLET_MY_MENU);
+
+ cLabel = (myConfig.iActionOnMiddleClick == CD_SHOW_DESKTOP ? g_strdup_printf ("%s (%s)", D_("Show desktop"), D_("middle-click")) : g_strdup (D_("Show desktop")));
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel,
+ MY_APPLET_SHARE_DATA_DIR"/../shared-images/show-desktop.svg",
+ _cd_show_desktop,
+ CD_APPLET_MY_MENU);
+ g_free (cLabel);
+
+ if (cairo_dock_wm_can_present_desktops ())
+ {
+ cLabel = (myConfig.iActionOnMiddleClick == CD_EXPOSE_DESKTOPS ? g_strdup_printf ("%s (%s)", D_("Expose all the desktops"), D_("middle-click")) : g_strdup (D_("Expose all the desktops")));
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel,
+ MY_APPLET_SHARE_DATA_DIR"/../shared-images/expose-desktops.svg",
+ _cd_expose_desktops,
+ CD_APPLET_MY_MENU);
+ g_free (cLabel);
+ }
+ if (cairo_dock_wm_can_present_windows ())
+ {
+ cLabel = (myConfig.iActionOnMiddleClick == CD_EXPOSE_WINDOWS ? g_strdup_printf ("%s (%s)", D_("Expose all the windows"), D_("middle-click")) : g_strdup (D_("Expose all the windows")));
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel,
+ MY_APPLET_SHARE_DATA_DIR"/../shared-images/expose-windows.svg",
+ _cd_expose_windows,
+ CD_APPLET_MY_MENU);
+ g_free (cLabel);
+ }
+ if (cairo_dock_wm_can_show_widget_layer ())
+ {
+ cLabel = (myConfig.iActionOnMiddleClick == CD_SHOW_WIDGET_LAYER ? g_strdup_printf ("%s (%s)", D_("Show the Widget Layer"), D_("middle-click")) : g_strdup (D_("Show the Widget Layer")));
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (cLabel,
+ GTK_STOCK_LEAVE_FULLSCREEN,
+ _cd_show_widget_layer,
+ CD_APPLET_MY_MENU);
+ g_free (cLabel);
+ }
+CD_APPLET_ON_BUILD_MENU_END
=== added file 'Composite-Manager/src/applet-notifications.h'
--- Composite-Manager/src/applet-notifications.h 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-notifications.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,35 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __APPLET_NOTIFICATIONS__
+#define __APPLET_NOTIFICATIONS__
+
+
+#include <cairo-dock.h>
+
+
+
+CD_APPLET_ON_CLICK_H
+
+CD_APPLET_ON_BUILD_MENU_H
+
+CD_APPLET_ON_MIDDLE_CLICK_H
+
+#endif
=== added file 'Composite-Manager/src/applet-struct.h'
--- Composite-Manager/src/applet-struct.h 1970-01-01 00:00:00 +0000
+++ Composite-Manager/src/applet-struct.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,83 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __CD_APPLET_STRUCT__
+#define __CD_APPLET_STRUCT__
+
+#include <cairo-dock.h>
+
+typedef struct _CDWM {
+ const gchar *cName;
+ const gchar *cCommand;
+ const gchar *cConfigTool;
+ gboolean bIsAvailable;
+ void (*activate_composite) (gboolean bActive);
+} CDWM;
+
+typedef enum {
+ CD_COMPIZ,
+ CD_KWIN,
+ CD_XFWM,
+ CD_METACITY,
+ CD_CUSTOM_WMFB,
+ CD_CUSTOM_WMC,
+ NB_WM
+} CDWMIndex;
+
+#define NB_COMPOSITE_WM 4 // 4 of them can do composite
+#define NB_FALLBACK_WM 3 // 3 of them can do without
+
+typedef enum {
+ CD_EDIT_CONFIG,
+ CD_RELOAD_WM,
+ CD_SHOW_DESKTOP,
+ CD_EXPOSE_DESKTOPS,
+ CD_EXPOSE_WINDOWS,
+ CD_SHOW_WIDGET_LAYER,
+ CD_NB_ACTIONS
+ } CDWMAction;
+
+//\___________ structure containing the applet's configuration parameters.
+struct _AppletConfig {
+ gchar *cWmCompositor;
+ gchar *cWmFallback;
+ gchar *cIconCompositeON;
+ gchar *cIconCompositeOFF;
+ gboolean bAskBeforeSwitching;
+ CDWMAction iActionOnMiddleClick;
+ gchar *cShortCut;
+} ;
+
+typedef struct {
+ gchar *which;
+ gchar *ps;
+ } CDSharedMemory;
+
+//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
+struct _AppletData {
+ CairoDockTask *pTask;
+ CDWM pWmList[NB_WM];
+ gboolean bIsComposited;
+ CDWM *wmc;
+ CDWM *wmfb;
+} ;
+
+
+#endif
=== modified file 'Dbus/data/Dbus.conf.in'
--- Dbus/data/Dbus.conf.in 2011-04-20 20:46:51 +0000
+++ Dbus/data/Dbus.conf.in 2011-08-09 20:07:46 +0000
@@ -1,4 +1,4 @@
-#!en;@VERSION_DBUS@
+#@VERSION_DBUS@
#[gtk-preferences]
[Configuration]
=== added file 'Dbus/demos/demo_vala/demo_vala.conf'
--- Dbus/demos/demo_vala/demo_vala.conf 1970-01-01 00:00:00 +0000
+++ Dbus/demos/demo_vala/demo_vala.conf 2011-08-09 20:07:46 +0000
@@ -0,0 +1,101 @@
+#!en;0.0.2
+
+#[gtk-about]
+[Icon]
+#j+[0;128] Desired icon size for this applet
+#{Set to 0 to use the default applet size}
+icon size = 0;0
+
+#s Name of the icon as it will appear in its label in the dock :
+name = Dbus Applet
+
+#S+ Image's filename :
+#{Let empty to use the default one.}
+icon =
+
+#d Name of the dock it belongs to:
+dock name =
+
+order=
+
+#F[Applet's Handbook]
+frame_hand=
+#A
+handbook=demo_vala
+
+#[gtk-convert]
+[Desklet]
+
+#j+[48;512] Desklet's dimension (width x height) :
+#{Depending on your WindowManager, you can resize it with ALT + middle_click or ALT + left_click for exemple.}
+size = 164;96
+
+#i[-2048;2048] Desklet's position (x ; y) :
+#{Depending on your WindowManager, you can move it with ALT + left_click}
+x position=0
+#i[-2048;2048] ...
+y position=0
+
+#b Is detached from the dock ?
+initially detached=false
+#l[Normal;Keep above;Keep below;On Widget Layer;Reserve space] Accessibility :
+#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)}
+accessibility=0
+#b Should be visible on all desktops ?
+sticky=true
+
+#b Lock position ?
+#{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.}
+locked = false
+
+#I[-180;180] Rotation :
+#{in degrees.}
+rotation = 0
+
+use size=
+
+#F[Decorations;gtk-orientation-portrait]
+frame_deco=
+
+#o+ Choose a decoration theme for this desklet :
+#{Choose the 'personnal' one to define your own decorations below.}
+decorations = default
+
+#v
+sep_deco =
+
+#S+ Background image :
+#{It's an image that will be displayed below the drawings, like a frame for exemple. Let empty to not use any.}
+bg desklet =
+#e+[0;1] Background tansparency :
+bg alpha = 1
+#i+[0;256] Left offset :
+#{in pixels. Use this to adjust the left position of the drawings.}
+left offset = 0
+#i+[0;256] Top offset :
+#{in pixels. Use this to adjust the top position of the drawings.}
+top offset = 0
+#i+[0;256] Right offset :
+#{in pixels. Use this to adjust the right position of the drawings.}
+right offset = 0
+#i+[0;256] Bottom offset :
+#{in pixels. Use this to adjust the bottom position of the drawings.}
+bottom offset = 0
+#S+ Foreground image :
+#{It's an image that will be displayed above the drawings, like a reflect for exemple. Let empty to not use any.}
+fg desklet =
+#e+[0;1] Foreground tansparency :
+fg alpha = 1
+
+#[gtk-preferences]
+[Configuration]
+
+#h+[/usr/share/cairo-dock/gauges;gauges;gauges] Choose one of the available themes :/
+theme = Turbo-night
+
+#i[10;100] Max value :
+max value = 100
+
+#b Yes / No ?
+yesno = false
+
=== modified file 'Dbus/interfaces/python/CDApplet.py'
--- Dbus/interfaces/python/CDApplet.py 2011-04-20 20:46:51 +0000
+++ Dbus/interfaces/python/CDApplet.py 2011-08-09 20:07:46 +0000
@@ -1,4 +1,4 @@
-# This is a part of the external demo applet for Cairo-Dock
+# This is a part of the external applets for Cairo-Dock
# Copyright : (C) 2010-2011 by Fabounet
# E-mail : fabounet@xxxxxxxxxxxx
#
@@ -24,41 +24,59 @@
import ConfigParser
import gobject
import glib
+import gettext
import dbus
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
+INSTALL_PREFIX = os.path.abspath("..") # applets are launched from their install directory, so ".." is the folder containing all applets.
+
+GETTEXT_NAME = 'cairo-dock-plugins-extra'
+LOCALE_DIR = INSTALL_PREFIX + '/locale' # user version of /usr/share/locale
+gettext.textdomain(GETTEXT_NAME)
+gettext.bind_textdomain_codeset (GETTEXT_NAME, 'UTF-8');
+gettext.bindtextdomain(GETTEXT_NAME, LOCALE_DIR)
+_ = lambda x: gettext.dgettext(GETTEXT_NAME,x)
+
####################
### Applet class ###
####################
class CDApplet:
+ #############
+ ### Enums ###
+ #############
+ # orientation
BOTTOM = 0
TOP = 1
RIGHT = 2
LEFT = 3
-
+ # container type
DOCK = 0
DESKLET = 1
-
+ # emblem position
UPPER_LEFT = 0
LOWER_RIGHT = 1
LOWER_LEFT = 2
UPPER_RIGHT = 3
MIDDLE = 4
-
+ # menu item types
MENU_ENTRY = 0
MENU_SUB_MENU = 1
MENU_SEPARATOR = 2
MENU_CHECKBOX = 3
MENU_RADIO_BUTTON = 4
-
+ # main menu ID
MAIN_MENU_ID = 0
-
+ # dialog key pressed
DIALOG_KEY_ENTER = -1
DIALOG_KEY_ESCAPE = -2
+ #####################
+ ### INIT AND DBUS ###
+ #####################
+
def __init__(self):
""" initialize the applet. Must be called by any class that inheritates from it.
It defines the following:
@@ -74,14 +92,44 @@
self.loop = None
self._bEnded = False
self._cMenuIconId = None
- self.cAppletName = sys.argv[0][2:]
+ self.cAppletName = sys.argv[0][2:] # the command is ./applet_name
self.cBusPath = sys.argv[2]
self.cConfFile = sys.argv[3]
self.cParentAppName = sys.argv[4]
+ self.cShareDataDir = INSTALL_PREFIX + '/' + self.cAppletName
self._get_config()
self._connect_to_dock()
+ def _connect_to_dock(self):
+ # get our applet on the bus.
+ bus = dbus.SessionBus()
+ try:
+ applet_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath)
+ except:
+ print ">>> object '"+self.cBusPath+"' can't be found on the bus, exit.\nMake sure that Cairo-Dock is running"
+ sys.exit(2)
+ self.icon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") # this object represents our icon inside the dock or a desklet.
+ sub_icons_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath+"/sub_icons")
+ 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.
+ # connect to signals.
+ self.icon.connect_to_signal("on_click", self.on_click) # when the user left-clicks on our icon.
+ self.icon.connect_to_signal("on_middle_click", self.on_middle_click) # when the user middle-clicks on our icon.
+ self.icon.connect_to_signal("on_build_menu", self._on_build_menu) # when the user right-clicks on our applet (which builds the menu)
+ self.icon.connect_to_signal("on_menu_select", self._on_menu_select) # when the user selects an entry of this menu.
+ self.icon.connect_to_signal("on_scroll", self.on_scroll) # when the user scroll up or down on our icon.
+ self.icon.connect_to_signal("on_drop_data", self.on_drop_data) # when the user drops something on our icon.
+ self.icon.connect_to_signal("on_answer_dialog", self.on_answer_dialog) # when the user answer a question.
+ self.icon.connect_to_signal("on_shortkey", self.on_shortkey) # when the user press the shortkey.
+ self.icon.connect_to_signal("on_change_focus", self.on_change_focus) # when the window's focus changes.
+ 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).
+ 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).
+ self.sub_icons.connect_to_signal("on_click_sub_icon", self.on_click_sub_icon) # when the user left-clicks on a sub-icon.
+ self.sub_icons.connect_to_signal("on_middle_click_sub_icon", self.on_middle_click_sub_icon)
+ self.sub_icons.connect_to_signal("on_scroll_sub_icon", self.on_scroll_sub_icon)
+ self.sub_icons.connect_to_signal("on_build_menu_sub_icon", self._on_build_menu_sub_icon)
+ self.sub_icons.connect_to_signal("on_drop_data_sub_icon", self.on_drop_data_sub_icon)
+
def run(self):
""" start the applet and enter the main loop; we never get out of this function """
self.begin()
@@ -94,6 +142,7 @@
##################################
### callbacks on the main icon ###
##################################
+
def on_click(self,iState):
""" action on click """
pass
@@ -148,6 +197,7 @@
##################################
### callbacks on the sub-icons ###
##################################
+
def on_click_sub_icon(self, iState, cIconID):
""" action on click on one of our sub-icons"""
pass
@@ -183,6 +233,7 @@
###############################
### callbacks on the applet ###
###############################
+
def begin(self):
""" action when the applet is started """
pass
@@ -215,32 +266,3 @@
keyfile.read(self.cConfFile)
self.get_config(keyfile)
- def _connect_to_dock(self):
- # get our applet on the bus.
- #~ applet_path = "/org/cairodock/CairoDock/"+self.cAppletName # path where our object is stored on the bus.
- bus = dbus.SessionBus()
- try:
- applet_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath)
- except:
- print ">>> object '"+self.cBusPath+"' can't be found on the bus, exit.\nMake sure that the 'Dbus' plug-in is activated in Cairo-Dock"
- sys.exit(2)
- self.icon = dbus.Interface(applet_object, "org.cairodock.CairoDock.applet") # this object represents our icon inside the dock or a desklet.
- sub_icons_object = bus.get_object("org.cairodock.CairoDock", self.cBusPath+"/sub_icons")
- 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.
- # connect to signals.
- self.icon.connect_to_signal("on_click", self.on_click) # when the user left-clicks on our icon.
- self.icon.connect_to_signal("on_middle_click", self.on_middle_click) # when the user middle-clicks on our icon.
- self.icon.connect_to_signal("on_build_menu", self._on_build_menu) # when the user right-clicks on our applet (which builds the menu)
- self.icon.connect_to_signal("on_menu_select", self._on_menu_select) # when the user selects an entry of this menu.
- self.icon.connect_to_signal("on_scroll", self.on_scroll) # when the user scroll up or down on our icon.
- self.icon.connect_to_signal("on_drop_data", self.on_drop_data) # when the user drops something on our icon.
- self.icon.connect_to_signal("on_answer_dialog", self.on_answer_dialog) # when the user answer a question.
- self.icon.connect_to_signal("on_shortkey", self.on_shortkey) # when the user press the shortkey.
- self.icon.connect_to_signal("on_change_focus", self.on_change_focus) # when the window's focus changes.
- 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).
- 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).
- self.sub_icons.connect_to_signal("on_click_sub_icon", self.on_click_sub_icon) # when the user left-clicks on a sub-icon.
- self.sub_icons.connect_to_signal("on_middle_click_sub_icon", self.on_middle_click_sub_icon)
- self.sub_icons.connect_to_signal("on_scroll_sub_icon", self.on_scroll_sub_icon)
- self.sub_icons.connect_to_signal("on_build_menu_sub_icon", self._on_build_menu_sub_icon)
- self.sub_icons.connect_to_signal("on_drop_data_sub_icon", self.on_drop_data_sub_icon)
=== modified file 'Dbus/interfaces/python/CMakeLists.txt'
--- Dbus/interfaces/python/CMakeLists.txt 2011-04-20 20:46:51 +0000
+++ Dbus/interfaces/python/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -3,7 +3,7 @@
if (NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
# copy *.py to current binary dir (cleaner)
- execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.py" ${CMAKE_CURRENT_BINARY_DIR})
+ execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.py" "${CMAKE_CURRENT_SOURCE_DIR}/CairoDock.py" ${CMAKE_CURRENT_BINARY_DIR})
exec_program("${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}" ARGS "setup.py" "-q" "build")
endif()
# Run a custom script with 'make install'
=== added file 'Dbus/interfaces/python/CairoDock.py'
--- Dbus/interfaces/python/CairoDock.py 1970-01-01 00:00:00 +0000
+++ Dbus/interfaces/python/CairoDock.py 2011-08-09 20:07:46 +0000
@@ -0,0 +1,111 @@
+# This is a part of the Cairo-Dock plug-ins.
+# Copyright : (C) 2010-2011 by Fabounet
+# E-mail : fabounet@xxxxxxxxxxxx
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# http://www.gnu.org/licenses/licenses.html#GPL
+
+# Base class for Cairo-Dock's main interface.
+
+####################
+### dependancies ###
+####################
+import os.path
+import dbus
+import re
+
+USER_CONFIG_DIR = os.path.abspath("~/.config")
+
+
+##################
+### Main class ###
+##################
+class CairoDock:
+
+ #############
+ ### Enums ###
+ #############
+ # orientation
+ BOTTOM = 0
+ TOP = 1
+ RIGHT = 2
+ LEFT = 3
+ # container type
+ DOCK = "Dock"
+ DESKLET = "Desklet"
+ # emblem position
+ UPPER_LEFT = 0
+ LOWER_RIGHT = 1
+ LOWER_LEFT = 2
+ UPPER_RIGHT = 3
+ MIDDLE = 4
+ # module category
+ CATEGORY_BEHAVIOR = 0
+ CATEGORY_THEME = 1
+ CATEGORY_APPLET_FILES = 2
+ CATEGORY_APPLET_INTERNET = 3
+ CATEGORY_APPLET_DESKTOP = 4
+ CATEGORY_APPLET_ACCESSORY = 5
+ CATEGORY_APPLET_SYSTEM = 6
+ CATEGORY_APPLET_FUN = 7
+ # module type
+ CAN_DOCK = 1
+ CAN_DESKLET = 2
+ # icon type
+ TYPE_LAUNCHER = "Launcher"
+ TYPE_APPLICATION = "Application"
+ TYPE_APPLET = "Applet"
+ TYPE_SEPARATOR = "Separator"
+ TYPE_CONTAINER = "Container"
+ TYPE_CLASS_CONTAINER = "Class-Container"
+ TYPE_OTHER = "Other"
+ # toggle dock visibility
+ HIDE_DOCK = 0
+ SHOW_DOCK = 1
+ TOGGLE_DOCK = 2
+
+ #####################
+ ### INIT AND DBUS ###
+ #####################
+
+ def __init__(self, app_name="cairo-dock"):
+ """ Initialize the interface.
+ It defines the following:
+ - cDataDir: main dir
+ - cCurrentThemeDir: current theme dir
+ - cConfFile : path to the global config file
+ """
+ self.dock = None
+ self.cAppName = app_name
+ self.cDataDir = USER_CONFIG_DIR + '/' + app_name
+ self.cCurrentThemeDir = self.cDataDir + '/current_theme'
+ self.cLaunchersDir = self.cCurrentThemeDir + '/launchers'
+ self.cPluginsDir = self.cCurrentThemeDir + '/plug-ins'
+ self.cConfFile = self.cCurrentThemeDir + '/' + app_name + '.conf'
+
+ self._connect()
+
+ def _connect(self):
+ # get gldi on the bus.
+ bus = dbus.SessionBus()
+
+ name1 = self.cAppName.replace('-','') # -> cairodock
+ name2 = re.sub('-[a-z]', lambda x: x.group(0).upper(), self.cAppName)
+ name2 = re.sub('^[a-z]', lambda x: x.group(0).upper(), name2) # -> CairoDock
+ name2 = name2.replace('-','') # -> CairoDock
+ cBusPath = '/org/'+name1+'/'+name2
+ try:
+ dbus_object = bus.get_object("org.cairodock.CairoDock", cBusPath)
+ except:
+ print ">>> object '"+cBusPath+"' can't be found on the bus, exit.\nMake sure that Cairo-Dock is running"
+ return
+ self.iface = dbus.Interface(dbus_object, "org.cairodock.CairoDock") # this object represents gldi.
+
=== modified file 'Dbus/interfaces/python/setup.py'
--- Dbus/interfaces/python/setup.py 2011-04-20 20:46:51 +0000
+++ Dbus/interfaces/python/setup.py 2011-08-09 20:07:46 +0000
@@ -21,5 +21,5 @@
author_email='fabounet@xxxxxxxxxxxx',
description='Python interface for Cairo-Dock',
url='https://launchpad.net/cairo-dock',
- py_modules=['CDApplet']
+ py_modules=['CDApplet', 'CairoDock']
)
=== modified file 'Dbus/interfaces/vala/CMakeLists.txt'
--- Dbus/interfaces/vala/CMakeLists.txt 2011-04-20 20:46:51 +0000
+++ Dbus/interfaces/vala/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -13,9 +13,13 @@
else()
set (VALA_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
+ if (${VALA_MAJOR} LESS 1 AND ${VALA_MINOR} LESS 13)
+ set (DISABLE_DBUS_TRANSFORMATION "--disable-dbus-transformation")
+ endif()
# first, precompile the Vala code into C code.
execute_process(COMMAND
- ${VALAC_EXE} -q -C --disable-warnings --disable-dbus-transformation
+ ${VALAC_EXE} -q -C
+ --disable-warnings ${DISABLE_DBUS_TRANSFORMATION}
--pkg gio-2.0
--vapi=${VALA_DIR}/src/${CDAPPLET}.vapi
--header=${VALA_DIR}/src/${CDAPPLET}.h
=== modified file 'Dbus/src/applet-dbus.c'
--- Dbus/src/applet-dbus.c 2011-04-20 20:46:51 +0000
+++ Dbus/src/applet-dbus.c 2011-08-09 20:07:46 +0000
@@ -38,6 +38,7 @@
#define __USE_POSIX
#include <signal.h> // kill
#include <glib.h>
+#include <glib/gstdio.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
@@ -47,6 +48,9 @@
#include "interface-applet-signals.h"
#include "applet-dbus.h"
+#define DISTANT_DIR "2.4.0"
+#define GETTEXT_NAME_EXTRAS "cairo-dock-plugins-extra"
+#define LOCALE_DIR_NAME "locale"
///////////////////
/// MAIN OBJECT ///
@@ -82,7 +86,6 @@
//\_____________ On initialise l'icone.
cd_dbus_action_on_init_module (pModuleInstance);
-
//\_____________ On cree l'objet sur le bus.
dbusApplet *pDbusApplet = cd_dbus_create_remote_applet_object (pModuleInstance);
g_return_if_fail (pDbusApplet != NULL);
@@ -91,7 +94,12 @@
if (pKeyFile != NULL)
{
if (cairo_dock_conf_file_needs_update (pKeyFile, pModuleInstance->pModule->pVisitCard->cModuleVersion))
- cairo_dock_flush_conf_file (pKeyFile, pModuleInstance->cConfFilePath, pModuleInstance->pModule->pVisitCard->cShareDataDir, pModuleInstance->pModule->pVisitCard->cConfFileName);
+ {
+ ///cairo_dock_flush_conf_file (pKeyFile, pModuleInstance->cConfFilePath, pModuleInstance->pModule->pVisitCard->cShareDataDir, pModuleInstance->pModule->pVisitCard->cConfFileName);
+ gchar *cTemplate = g_strdup_printf ("%s/%s", pModuleInstance->pModule->pVisitCard->cShareDataDir, pModuleInstance->pModule->pVisitCard->cConfFileName);
+ cairo_dock_upgrade_conf_file (pModuleInstance->cConfFilePath, pKeyFile, cTemplate);
+ g_free (cTemplate);
+ }
}
//\_____________ On (re)lance l'executable de l'applet.
@@ -122,7 +130,7 @@
pVisitCard->iMinorVersionNeeded = 1;
pVisitCard->iMicroVersionNeeded = 1;
pVisitCard->cPreviewFilePath = cShareDataDir ? g_strdup_printf ("%s/preview", cShareDataDir) : NULL;
- pVisitCard->cGettextDomain = g_strdup_printf ("cd-%s", cModuleName);
+ pVisitCard->cGettextDomain = g_strdup (GETTEXT_NAME_EXTRAS);
pVisitCard->cUserDataDir = g_strdup (cModuleName);
pVisitCard->cShareDataDir = g_strdup (cShareDataDir);
pVisitCard->cConfFileName = g_strdup_printf ("%s.conf", cModuleName);
@@ -219,16 +227,17 @@
return bActivationOk;
}
-static void _cd_dbus_register_all_applets_in_dir (const gchar *cDirPath)
+static gboolean _cd_dbus_register_all_applets_in_dir (const gchar *cDirPath)
{
+ gboolean bAppletRegistered = FALSE;
const gchar *cFileName;
gchar *cThirdPartyPath = g_strdup_printf ("%s/%s", cDirPath, CD_DBUS_APPLETS_FOLDER);
- GDir *dir = g_dir_open (cThirdPartyPath, 0, NULL); // si le repertoire n'existe pas, on ne veut de warning.
+ GDir *dir = g_dir_open (cThirdPartyPath, 0, NULL); // si le repertoire n'existe pas, on ne veut pas de warning.
if (dir == NULL)
{
g_free (cThirdPartyPath);
- return ;
+ return bAppletRegistered;
}
do
@@ -236,12 +245,14 @@
cFileName = g_dir_read_name (dir);
if (cFileName == NULL)
break ;
-
- cd_dbus_register_module_in_dir (cFileName, cThirdPartyPath);
+
+ if (strcmp (cFileName, LOCALE_DIR_NAME) != 0)
+ bAppletRegistered |= cd_dbus_register_module_in_dir (cFileName, cThirdPartyPath);
}
while (1);
g_dir_close (dir);
g_free (cThirdPartyPath);
+ return bAppletRegistered;
}
@@ -253,19 +264,23 @@
{
const gchar *cSharePackagesDir = MY_APPLET_SHARE_DATA_DIR"/"CD_DBUS_APPLETS_FOLDER;
gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER);
- gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion);
- gchar *cPath = cairo_dock_get_package_path (cModuleName, cSharePackagesDir, cUserPackagesDir, cDistantPackagesDir, CAIRO_DOCK_UPDATED_PACKAGE);
+ ///gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion);
+ const gchar *cDistantPackagesDir = CD_DBUS_APPLETS_FOLDER"/"DISTANT_DIR;
+ gchar *cPath = cairo_dock_get_package_path (cModuleName,
+ cSharePackagesDir,
+ cUserPackagesDir,
+ cDistantPackagesDir,
+ CAIRO_DOCK_UPDATED_PACKAGE);
cd_debug ("*** update of the applet '%s' -> got '%s'\n", cModuleName, cPath);
g_free (cPath);
g_free (cUserPackagesDir);
- g_free (cDistantPackagesDir);
+ //g_free (cDistantPackagesDir);
}
static gboolean _apply_package_update (gchar *cModuleName)
{
CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName);
- g_return_val_if_fail (pModule != NULL, TRUE);
- if (pModule->pInstancesList != NULL) // applet active => on la recharge.
+ if (pModule && pModule->pInstancesList != NULL) // applet active => reload it (pModule can be NULL in case of "locale").
{
cd_debug ("*** applet '%s' is active, reload it", cModuleName);
CairoDockModuleInstance *pModuleInstance = pModule->pInstancesList->data;
@@ -424,8 +439,8 @@
const gchar *cProgName = g_get_prgname ();
g_return_if_fail (cProgName != NULL);
int n = strlen (cProgName);
- gchar *cName1 = g_new0 (gchar, n+1);
- gchar *cName2 = g_new0 (gchar, n+1);
+ gchar *cName1 = g_new0 (gchar, n+1); // prog name without '-' and '_'
+ gchar *cName2 = g_new0 (gchar, n+1); // same but with upper char after the '-' and '_'
int i, k=0;
for (i = 0; i < n; i ++)
{
@@ -450,25 +465,47 @@
cairo_dock_register_service_name ("org.cairodock.CairoDock"); /// what happens if the gldi instance that had registered the name quits while a 2nd instance remains ? do we need to queue ?...
//\____________ create the main object on the bus.
- myData.pMainObject = g_object_new (cd_dbus_main_get_type(), NULL); // appelle cd_dbus_main_class_init() et cd_dbus_main_init().
+ myData.pMainObject = g_object_new (cd_dbus_main_get_type(), NULL); // call cd_dbus_main_class_init() and cd_dbus_main_init().
//\____________ register the applets installed in the default folders.
- _cd_dbus_register_all_applets_in_dir (MY_APPLET_SHARE_DATA_DIR);
-
- _cd_dbus_register_all_applets_in_dir (g_cCairoDockDataDir);
+ gboolean bAppletRegistered = FALSE;
+ bAppletRegistered |= _cd_dbus_register_all_applets_in_dir (MY_APPLET_SHARE_DATA_DIR);
+
+ bAppletRegistered |= _cd_dbus_register_all_applets_in_dir (g_cCairoDockDataDir);
+
+ //\____________ internationalize the applets.
+ gchar *cLocaleDir = g_strdup_printf ("%s/"CD_DBUS_APPLETS_FOLDER"/"LOCALE_DIR_NAME, g_cCairoDockDataDir); // user version of /usr/share/locale
+ if (! g_file_test (cLocaleDir, G_FILE_TEST_EXISTS)) // translations not downloaded yet.
+ {
+ gchar *cUserAppletsFolder = g_strdup_printf ("%s/"CD_DBUS_APPLETS_FOLDER, g_cCairoDockDataDir);
+ if (! g_file_test (cUserAppletsFolder, G_FILE_TEST_EXISTS))
+ {
+ if (g_mkdir (cUserAppletsFolder, 7*8*8+7*8+5) != 0) // create an empty folder; since there is no date file, the "locale" package will be seen as "to be updated" by the package manager, and will therefore download it.
+ cd_warning ("couldn't create '%s'; third-party applets can't be added", cUserAppletsFolder);
+ }
+ g_free (cUserAppletsFolder);
+
+ if (g_mkdir (cLocaleDir, 7*8*8+7*8+5) != 0) // create an empty folder; since there is no date file, the "locale" package will be seen as "to be updated" by the package manager, and will therefore download it.
+ cd_warning ("couldn't create '%s'; applets won't be translated", cLocaleDir);
+ }
+ bindtextdomain (GETTEXT_NAME_EXTRAS, cLocaleDir); // bind the applets' domain to the user locale folder.
+ bind_textdomain_codeset (GETTEXT_NAME_EXTRAS, "UTF-8");
+ g_free (cLocaleDir);
//\____________ download in background the list of existing applets.
- const gchar *cSharePackagesDir = NULL; // MY_APPLET_SHARE_DATA_DIR"/"CD_DBUS_APPLETS_FOLDER;
- gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER);
- gchar *cDistantPackagesDir = g_strdup_printf ("%s/%d.%d.%d", CD_DBUS_APPLETS_FOLDER, g_iMajorVersion, g_iMinorVersion, g_iMicroVersion);
- myData.pGetListTask = cairo_dock_list_packages_async (cSharePackagesDir,
- cUserPackagesDir,
- cDistantPackagesDir,
- (CairoDockGetPackagesFunc) _on_got_list,
- NULL, // data
- NULL); // table
- g_free (cUserPackagesDir);
- g_free (cDistantPackagesDir);
+ if (bAppletRegistered) // only if some third-party applets are present on the disk.
+ {
+ const gchar *cSharePackagesDir = NULL; // no share data dir, since we can't write in /usr
+ gchar *cUserPackagesDir = g_strdup_printf ("%s/%s", g_cCairoDockDataDir, CD_DBUS_APPLETS_FOLDER);
+ const gchar *cDistantPackagesDir = CD_DBUS_APPLETS_FOLDER"/"DISTANT_DIR;
+ myData.pGetListTask = cairo_dock_list_packages_async (cSharePackagesDir,
+ cUserPackagesDir,
+ cDistantPackagesDir,
+ (CairoDockGetPackagesFunc) _on_got_list,
+ NULL, // data
+ NULL); // table
+ g_free (cUserPackagesDir);
+ }
}
=== modified file 'Dbus/src/dbus-main-spec.h'
--- Dbus/src/dbus-main-spec.h 2011-04-20 20:46:51 +0000
+++ Dbus/src/dbus-main-spec.h 2011-08-09 20:07:46 +0000
@@ -55,105 +55,193 @@
#endif /* !G_ENABLE_DEBUG */
-/* BOOLEAN:STRING,INT,STRING,STRING,STRING,POINTER */
-extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-void
-dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER) (gpointer data1,
- gpointer arg_1,
- gint arg_2,
- gpointer arg_3,
- gpointer arg_4,
- gpointer arg_5,
- gpointer arg_6,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
- gboolean v_return;
-
- g_return_if_fail (return_value != NULL);
- g_return_if_fail (n_param_values == 7);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
-
- v_return = callback (data1,
- g_marshal_value_peek_string (param_values + 1),
- g_marshal_value_peek_int (param_values + 2),
+/* BOOLEAN:INT,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__INT_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__INT_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__INT_POINTER) (gpointer data1,
+ gint arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__INT_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__INT_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_int (param_values + 1),
+ g_marshal_value_peek_pointer (param_values + 2),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:BOXED,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOXED_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOXED_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__BOXED_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__BOXED_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__BOXED_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_boxed (param_values + 1),
+ g_marshal_value_peek_pointer (param_values + 2),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:BOOLEAN,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (gpointer data1,
+ gboolean arg_1,
+ gpointer arg_2,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__BOOLEAN_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 3);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_boolean (param_values + 1),
+ g_marshal_value_peek_pointer (param_values + 2),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:BOOLEAN,STRING,STRING,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_STRING_STRING_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_STRING_STRING_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN_STRING_STRING_POINTER) (gpointer data1,
+ gboolean arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer arg_4,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__BOOLEAN_STRING_STRING_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 5);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__BOOLEAN_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_boolean (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
g_marshal_value_peek_string (param_values + 3),
- g_marshal_value_peek_string (param_values + 4),
- g_marshal_value_peek_string (param_values + 5),
- g_marshal_value_peek_pointer (param_values + 6),
- data2);
-
- g_value_set_boolean (return_value, v_return);
-}
-
-/* BOOLEAN:STRING,BOOLEAN,POINTER */
-extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-void
-dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (gpointer data1,
- gpointer arg_1,
- gboolean arg_2,
- gpointer arg_3,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
- gboolean v_return;
-
- g_return_if_fail (return_value != NULL);
- g_return_if_fail (n_param_values == 4);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback);
-
- v_return = callback (data1,
- g_marshal_value_peek_string (param_values + 1),
- g_marshal_value_peek_boolean (param_values + 2),
- g_marshal_value_peek_pointer (param_values + 3),
+ g_marshal_value_peek_pointer (param_values + 4),
data2);
g_value_set_boolean (return_value, v_return);
@@ -204,48 +292,203 @@
g_value_set_boolean (return_value, v_return);
}
-/* BOOLEAN:BOOLEAN,POINTER */
-extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-void
-dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef gboolean (*GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (gpointer data1,
- gboolean arg_1,
- gpointer arg_2,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__BOOLEAN_POINTER callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
- gboolean v_return;
-
- g_return_if_fail (return_value != NULL);
- g_return_if_fail (n_param_values == 3);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_BOOLEAN__BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback);
-
- v_return = callback (data1,
- g_marshal_value_peek_boolean (param_values + 1),
+/* BOOLEAN:STRING,STRING,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_STRING_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__STRING_STRING_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_string (param_values + 2),
+ g_marshal_value_peek_pointer (param_values + 3),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:STRING,POINTER,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_POINTER_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gpointer arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__STRING_POINTER_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 4);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__STRING_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
g_marshal_value_peek_pointer (param_values + 2),
+ g_marshal_value_peek_pointer (param_values + 3),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:STRING,INT,STRING,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_INT_STRING_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gint arg_2,
+ gpointer arg_3,
+ gpointer arg_4,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__STRING_INT_STRING_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 5);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__STRING_INT_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_int (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ g_marshal_value_peek_pointer (param_values + 4),
+ data2);
+
+ g_value_set_boolean (return_value, v_return);
+}
+
+/* BOOLEAN:STRING,DOUBLE,STRING,POINTER,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
+void
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gdouble arg_2,
+ gpointer arg_3,
+ gpointer arg_4,
+ gpointer arg_5,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ gboolean v_return;
+
+ g_return_if_fail (return_value != NULL);
+ g_return_if_fail (n_param_values == 6);
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER) (marshal_data ? marshal_data : cc->callback);
+
+ v_return = callback (data1,
+ g_marshal_value_peek_string (param_values + 1),
+ g_marshal_value_peek_double (param_values + 2),
+ g_marshal_value_peek_string (param_values + 3),
+ g_marshal_value_peek_pointer (param_values + 4),
+ g_marshal_value_peek_pointer (param_values + 5),
data2);
g_value_set_boolean (return_value, v_return);
@@ -298,35 +541,33 @@
g_value_set_boolean (return_value, v_return);
}
-/* BOOLEAN:STRING,STRING,STRING,STRING,POINTER */
-extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
+/* BOOLEAN:STRING,BOOLEAN,POINTER */
+extern void dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
void
-dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
+dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_STRING_STRING_STRING_POINTER) (gpointer data1,
- gpointer arg_1,
- gpointer arg_2,
- gpointer arg_3,
- gpointer arg_4,
- gpointer arg_5,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__STRING_STRING_STRING_STRING_POINTER callback;
+ typedef gboolean (*GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (gpointer data1,
+ gpointer arg_1,
+ gboolean arg_2,
+ gpointer arg_3,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gboolean v_return;
g_return_if_fail (return_value != NULL);
- g_return_if_fail (n_param_values == 6);
+ g_return_if_fail (n_param_values == 4);
if (G_CCLOSURE_SWAP_DATA (closure))
{
@@ -338,14 +579,12 @@
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
- callback = (GMarshalFunc_BOOLEAN__STRING_STRING_STRING_STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
+ callback = (GMarshalFunc_BOOLEAN__STRING_BOOLEAN_POINTER) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
g_marshal_value_peek_string (param_values + 1),
- g_marshal_value_peek_string (param_values + 2),
- g_marshal_value_peek_string (param_values + 3),
- g_marshal_value_peek_string (param_values + 4),
- g_marshal_value_peek_pointer (param_values + 5),
+ g_marshal_value_peek_boolean (param_values + 2),
+ g_marshal_value_peek_pointer (param_values + 3),
data2);
g_value_set_boolean (return_value, v_return);
@@ -359,26 +598,30 @@
static const DBusGMethodInfo dbus_glib_cd_dbus_main_methods[] = {
{ (GCallback) cd_dbus_main_reboot, dbus_glib_marshal_cd_dbus_main_BOOLEAN__POINTER, 0 },
{ (GCallback) cd_dbus_main_quit, dbus_glib_marshal_cd_dbus_main_BOOLEAN__POINTER, 34 },
- { (GCallback) cd_dbus_main_show_desklet, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER, 66 },
- { (GCallback) cd_dbus_main_reload_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 121 },
- { (GCallback) cd_dbus_main_activate_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER, 177 },
- { (GCallback) cd_dbus_main_show_dock, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER, 249 },
- { (GCallback) cd_dbus_main_create_launcher_from_scratch, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 294 },
- { (GCallback) cd_dbus_main_load_launcher_from_file, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 405 },
- { (GCallback) cd_dbus_main_reload_launcher, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 470 },
- { (GCallback) cd_dbus_main_remove_launcher, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 529 },
- { (GCallback) cd_dbus_main_set_quick_info, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 588 },
- { (GCallback) cd_dbus_main_set_label, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 690 },
- { (GCallback) cd_dbus_main_set_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_STRING_STRING_POINTER, 784 },
- { (GCallback) cd_dbus_main_set_emblem, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER, 877 },
- { (GCallback) cd_dbus_main_animate, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER, 986 },
- { (GCallback) cd_dbus_main_show_dialog, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_STRING_STRING_POINTER, 1097 },
+ { (GCallback) cd_dbus_main_show_dock, dbus_glib_marshal_cd_dbus_main_BOOLEAN__INT_POINTER, 66 },
+ { (GCallback) cd_dbus_main_show_desklet, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_POINTER, 118 },
+ { (GCallback) cd_dbus_main_reload_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 173 },
+ { (GCallback) cd_dbus_main_activate_module, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_BOOLEAN_POINTER, 229 },
+ { (GCallback) cd_dbus_main_get_icon_properties, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER, 301 },
+ { (GCallback) cd_dbus_main_get_container_properties, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER, 390 },
+ { (GCallback) cd_dbus_main_get_module_properties, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER_POINTER, 484 },
+ { (GCallback) cd_dbus_main_add_launcher, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_DOUBLE_STRING_POINTER_POINTER, 572 },
+ { (GCallback) cd_dbus_main_add_temporary_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOXED_POINTER, 679 },
+ { (GCallback) cd_dbus_main_reload_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 747 },
+ { (GCallback) cd_dbus_main_remove_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_POINTER, 800 },
+ { (GCallback) cd_dbus_main_set_quick_info, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER, 853 },
+ { (GCallback) cd_dbus_main_set_label, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER, 923 },
+ { (GCallback) cd_dbus_main_set_icon, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_STRING_POINTER, 985 },
+ { (GCallback) cd_dbus_main_set_emblem, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER, 1046 },
+ { (GCallback) cd_dbus_main_animate, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER, 1123 },
+ { (GCallback) cd_dbus_main_demands_attention, dbus_glib_marshal_cd_dbus_main_BOOLEAN__BOOLEAN_STRING_STRING_POINTER, 1202 },
+ { (GCallback) cd_dbus_main_show_dialog, dbus_glib_marshal_cd_dbus_main_BOOLEAN__STRING_INT_STRING_POINTER, 1287 },
};
const DBusGObjectInfo dbus_glib_cd_dbus_main_object_info = { 1,
dbus_glib_cd_dbus_main_methods,
- 16,
-"org.cairodock.CairoDock\0Reboot\0S\0\0org.cairodock.CairoDock\0Quit\0S\0\0org.cairodock.CairoDock\0ShowDesklet\0S\0widgetLayer\0I\0b\0\0org.cairodock.CairoDock\0ReloadModule\0S\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0ActivateModule\0S\0cModuleName\0I\0s\0bActivate\0I\0b\0\0org.cairodock.CairoDock\0ShowDock\0S\0show\0I\0b\0\0org.cairodock.CairoDock\0CreateLauncherFromScratch\0S\0cIconFile\0I\0s\0cLabel\0I\0s\0cCommand\0I\0s\0cParentDockName\0I\0s\0\0org.cairodock.CairoDock\0LoadLauncherFromFile\0S\0cDesktopFile\0I\0s\0\0org.cairodock.CairoDock\0ReloadLauncher\0S\0cDesktopFile\0I\0s\0\0org.cairodock.CairoDock\0RemoveLauncher\0S\0cDesktopFile\0I\0s\0\0org.cairodock.CairoDock\0SetQuickInfo\0S\0cQuickInfo\0I\0s\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0SetLabel\0S\0cLabel\0I\0s\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0SetIcon\0S\0cImage\0I\0s\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0SetEmblem\0S\0cImage\0I\0s\0iPosition\0I\0i\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0Animate\0S\0cAnimation\0I\0s\0iNbRounds\0I\0i\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0ShowDialog\0S\0message\0I\0s\0iDuration\0I\0i\0cIconName\0I\0s\0cIconCommand\0I\0s\0cModuleName\0I\0s\0\0\0",
+ 20,
+"org.cairodock.CairoDock\0Reboot\0S\0\0org.cairodock.CairoDock\0Quit\0S\0\0org.cairodock.CairoDock\0ShowDock\0S\0iVisibility\0I\0i\0\0org.cairodock.CairoDock\0ShowDesklet\0S\0widgetLayer\0I\0b\0\0org.cairodock.CairoDock\0ReloadModule\0S\0cModuleName\0I\0s\0\0org.cairodock.CairoDock\0ActivateModule\0S\0cModuleName\0I\0s\0bActivate\0I\0b\0\0org.cairodock.CairoDock\0GetIconProperties\0S\0cIconQuery\0I\0s\0pIconProperties\0O\0F\0N\0aa{sv}\0\0org.cairodock.CairoDock\0GetContainerProperties\0S\0cName\0I\0s\0pContainerProperties\0O\0F\0N\0aa{sv}\0\0org.cairodock.CairoDock\0GetModuleProperties\0S\0cName\0I\0s\0pModuleProperties\0O\0F\0N\0aa{sv}\0\0org.cairodock.CairoDock\0AddLauncher\0S\0cDesktopFilePath\0I\0s\0fOrder\0I\0d\0cDockName\0I\0s\0cLauncherFile\0O\0F\0N\0s\0\0org.cairodock.CairoDock\0AddTemporaryIcon\0S\0hIconProperties\0I\0a{sv}\0\0org.cairodock.CairoDock\0ReloadIcon\0S\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0RemoveIcon\0S\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetQuickInfo\0S\0cQuickInfo\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetLabel\0S\0cLabel\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetIcon\0S\0cImage\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0SetEmblem\0S\0cImage\0I\0s\0iPosition\0I\0i\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0Animate\0S\0cAnimation\0I\0s\0iNbRounds\0I\0i\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0DemandsAttention\0S\0bStart\0I\0b\0cAnimation\0I\0s\0cIconQuery\0I\0s\0\0org.cairodock.CairoDock\0ShowDialog\0S\0message\0I\0s\0iDuration\0I\0i\0cIconQuery\0I\0s\0\0\0",
"\0",
"\0"
};
=== modified file 'Dbus/src/dbus_introspectable.xml'
--- Dbus/src/dbus_introspectable.xml 2011-04-20 20:46:51 +0000
+++ Dbus/src/dbus_introspectable.xml 2011-08-09 20:07:46 +0000
@@ -6,6 +6,9 @@
</method>
<method name="Quit">
</method>
+ <method name="ShowDock">
+ <arg name="iVisibility" type="i" direction="in"/>
+ </method>
<method name="ShowDesklet">
<arg name="widgetLayer" type="b" direction="in"/>
</method>
@@ -16,62 +19,67 @@
<arg name="cModuleName" type="s" direction="in"/>
<arg name="bActivate" type="b" direction="in"/>
</method>
- <method name="ShowDock">
- <arg name="show" type="b" direction="in"/>
- </method>
- <method name="CreateLauncherFromScratch">
- <arg name="cIconFile" type="s" direction="in"/>
- <arg name="cLabel" type="s" direction="in"/>
- <arg name="cCommand" type="s" direction="in"/>
- <arg name="cParentDockName" type="s" direction="in"/>
- </method>
- <method name="LoadLauncherFromFile">
- <arg name="cDesktopFile" type="s" direction="in"/>
- </method>
- <method name="ReloadLauncher">
- <arg name="cDesktopFile" type="s" direction="in"/>
- </method>
- <method name="RemoveLauncher">
- <arg name="cDesktopFile" type="s" direction="in"/>
- </method>
+
+ <method name="GetIconProperties">
+ <arg name="cIconQuery" type="s" direction="in"/>
+ <arg name="pIconProperties" direction="out" type="aa{sv}"/>
+ </method>
+ <method name="GetContainerProperties">
+ <arg name="cName" type="s" direction="in"/>
+ <arg name="pContainerProperties" direction="out" type="aa{sv}"/>
+ </method>
+ <method name="GetModuleProperties">
+ <arg name="cName" type="s" direction="in"/>
+ <arg name="pModuleProperties" direction="out" type="aa{sv}"/>
+ </method>
+
+ <method name="AddLauncher">
+ <arg name="cDesktopFilePath" type="s" direction="in"/>
+ <arg name="fOrder" type="d" direction="in"/>
+ <arg name="cDockName" type="s" direction="in"/>
+ <arg name="cLauncherFile" type="s" direction="out"/>
+ </method>
+ <method name="AddTemporaryIcon">
+ <arg name="hIconProperties" direction="in" type="a{sv}"/>
+ </method>
+ <method name="ReloadIcon">
+ <arg name="cIconQuery" type="s" direction="in"/>
+ </method>
+ <method name="RemoveIcon">
+ <arg name="cIconQuery" type="s" direction="in"/>
+ </method>
+
<method name="SetQuickInfo">
<arg name="cQuickInfo" type="s" direction="in"/>
- <arg name="cIconName" type="s" direction="in"/>
- <arg name="cIconCommand" type="s" direction="in"/>
- <arg name="cModuleName" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
</method>
<method name="SetLabel">
<arg name="cLabel" type="s" direction="in"/>
- <arg name="cIconName" type="s" direction="in"/>
- <arg name="cIconCommand" type="s" direction="in"/>
- <arg name="cModuleName" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
</method>
<method name="SetIcon">
<arg name="cImage" type="s" direction="in"/>
- <arg name="cIconName" type="s" direction="in"/>
- <arg name="cIconCommand" type="s" direction="in"/>
- <arg name="cModuleName" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
</method>
<method name="SetEmblem">
<arg name="cImage" type="s" direction="in"/>
<arg name="iPosition" type="i" direction="in"/>
- <arg name="cIconName" type="s" direction="in"/>
- <arg name="cIconCommand" type="s" direction="in"/>
- <arg name="cModuleName" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
</method>
<method name="Animate">
<arg name="cAnimation" type="s" direction="in"/>
<arg name="iNbRounds" type="i" direction="in"/>
- <arg name="cIconName" type="s" direction="in"/>
- <arg name="cIconCommand" type="s" direction="in"/>
- <arg name="cModuleName" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
+ </method>
+ <method name="DemandsAttention">
+ <arg name="bStart" type="b" direction="in"/>
+ <arg name="cAnimation" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
</method>
<method name="ShowDialog">
<arg name="message" type="s" direction="in"/>
<arg name="iDuration" type="i" direction="in"/>
- <arg name="cIconName" type="s" direction="in"/>
- <arg name="cIconCommand" type="s" direction="in"/>
- <arg name="cModuleName" type="s" direction="in"/>
+ <arg name="cIconQuery" type="s" direction="in"/>
</method>
</interface>
</node>
=== modified file 'Dbus/src/interface-applet-methods.c'
--- Dbus/src/interface-applet-methods.c 2011-04-20 20:46:51 +0000
+++ Dbus/src/interface-applet-methods.c 2011-08-09 20:07:46 +0000
@@ -435,6 +435,7 @@
gtk_range_set_value (GTK_RANGE (pScale), fInitialValue);
gtk_widget_set (pScale, "width-request", 150, NULL);
+ cairo_dock_set_dialog_widget_text_color (pScale);
if (cMinLabel || cMaxLabel)
{
@@ -669,8 +670,8 @@
pIcon->pSubDock = NULL;
}
pInstance->pDesklet->icons = g_list_concat (pInstance->pDesklet->icons, pIconsList);
- gpointer data[2] = {GINT_TO_POINTER (TRUE), GINT_TO_POINTER (FALSE)};
- cairo_dock_set_desklet_renderer_by_name (pInstance->pDesklet, "Caroussel", (CairoDeskletRendererConfigPtr) data);
+ gpointer data[3] = {GINT_TO_POINTER (0), GINT_TO_POINTER (TRUE), NULL};
+ cairo_dock_set_desklet_renderer_by_name (pInstance->pDesklet, "Panel", (CairoDeskletRendererConfigPtr) data);
}
return TRUE;
@@ -844,15 +845,15 @@
pRenderAttr->iMemorySize = (pIcon->fWidth > 1 ? pIcon->fWidth : 32); // fWidht peut etre <= 1 en mode desklet au chargement.
// Line;Plain;Bar;Circle;Plain Circle
if (cTheme == NULL || strcmp (cTheme, "Line") == 0)
- attr.iType = CAIRO_DOCK_GRAPH2_LINE;
+ attr.iType = CAIRO_DOCK_GRAPH_LINE;
else if (strcmp (cTheme, "Plain") == 0)
- attr.iType = CAIRO_DOCK_GRAPH2_PLAIN;
+ attr.iType = CAIRO_DOCK_GRAPH_PLAIN;
else if (strcmp (cTheme, "Bar") == 0)
- attr.iType = CAIRO_DOCK_GRAPH2_BAR;
+ attr.iType = CAIRO_DOCK_GRAPH_BAR;
else if (strcmp (cTheme, "Circle") == 0)
- attr.iType = CAIRO_DOCK_GRAPH2_CIRCLE;
+ attr.iType = CAIRO_DOCK_GRAPH_CIRCLE;
else if (strcmp (cTheme, "Plain Circle") == 0)
- attr.iType = CAIRO_DOCK_GRAPH2_CIRCLE_PLAIN;
+ attr.iType = CAIRO_DOCK_GRAPH_CIRCLE_PLAIN;
attr.iRadius = 10;
attr.bMixGraphs = FALSE;
double *fHighColor = g_new (double, iNbValues*3);
@@ -929,7 +930,9 @@
if (pIcon->cClass != NULL)
cairo_dock_deinhibite_class (pIcon->cClass, pIcon);
if (cClass != NULL)
- cairo_dock_inhibite_class (cClass, pIcon);
+ {
+ cairo_dock_inhibite_class (cClass, pIcon); /// useful to use cairo_dock_register_class ?...
+ }
if (! cairo_dock_is_loading ())
{
CairoContainer *pContainer = pInstance->pContainer;
@@ -1124,6 +1127,9 @@
{
image = gtk_image_new_from_stock (cIcon, GTK_ICON_SIZE_MENU);
}
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE);
+#endif
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), image);
}
}
@@ -1268,7 +1274,7 @@
}
else if (strcmp (cProperty, "orientation") == 0)
{
- CairoDockPositionType iScreenBorder = (g_pMainDock ? ((! g_pMainDock->container.bIsHorizontal) << 1) | (! g_pMainDock->container.bDirectionUp) : 0);
+ CairoDockPositionType iScreenBorder = ((! pContainer->bIsHorizontal) << 1) | (! pContainer->bDirectionUp);
g_value_init (v, G_TYPE_UINT);
g_value_set_uint (v, iScreenBorder);
}
=== modified file 'Dbus/src/interface-applet-signals.c'
--- Dbus/src/interface-applet-signals.c 2011-04-20 20:46:51 +0000
+++ Dbus/src/interface-applet-signals.c 2011-08-09 20:07:46 +0000
@@ -734,7 +734,7 @@
void cd_dbus_emit_on_stop_module (CairoDockModuleInstance *pModuleInstance)
{
- //g_print ("%s (%s, %d)\n", __func__, pModuleInstance->pModule->pVisitCard->cModuleName, myData.bKeepObjectAlive);
+ //g_print ("%s (%s)\n", __func__, pModuleInstance->pModule->pVisitCard->cModuleName);
dbusApplet *pDbusApplet = cd_dbus_get_dbus_applet_from_instance (pModuleInstance);
if (pDbusApplet != NULL)
g_signal_emit (pDbusApplet,
=== modified file 'Dbus/src/interface-main-methods.c'
--- Dbus/src/interface-main-methods.c 2011-04-20 20:46:51 +0000
+++ Dbus/src/interface-main-methods.c 2011-08-09 20:07:46 +0000
@@ -21,21 +21,16 @@
exemples :
----------
-dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.CreateLauncherFromScratch string:gimp.png string:"fake gimp" string:gimp string:none
-
-dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetLabel string:new_label string:icon_name string:any string:none
-
-dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetQuickInfo string:123 string:none string:none string:dustbin
-
-dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:default int32:2 string:any string:firefox string:none
-
-dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetIcon string:firefox-3.0 string:any string:nautilus string:none
+dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.SetQuickInfo string:123 string:"class=firefox"
+
+dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Animate string:default int32:2 string:"class=firefox"
******************************************************************************/
#include <unistd.h>
#include <glib.h>
+#include "cairo-dock.h"
#include "interface-main-methods.h"
#define nullify_argument(string) do {\
@@ -61,6 +56,77 @@
return TRUE;
}
+static void _show_hide_one_dock (const gchar *cDockName, CairoDock *pDock, gpointer data)
+{
+ if (pDock->iRefCount != 0)
+ return ;
+ gboolean bShow = GPOINTER_TO_INT (data);
+ if (bShow)
+ {
+ ///cairo_dock_pop_up (pDock);
+ ///if (pDock->bAutoHide)
+ cairo_dock_emit_enter_signal (CAIRO_CONTAINER (pDock));
+ }
+ else
+ {
+ ///cairo_dock_pop_down (pDock); // ne fait rien s'il n'etait pas "popped".
+ ///if (pDock->bAutoHide)
+ cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock));
+ }
+}
+gboolean cd_dbus_main_show_dock (dbusMainObject *pDbusCallback, gint iVisibiliy, GError **error)
+{
+ if (! myConfig.bEnableShowDock)
+ return FALSE;
+
+ if (g_pMainDock == NULL)
+ return FALSE;
+
+ gboolean bShow;
+ switch (iVisibiliy)
+ {
+ case 0: // hide
+ bShow = FALSE;
+ break;
+ case 1: // show
+ bShow = TRUE;
+ break;
+ case 2: // toggle
+ default:
+ bShow = (g_pMainDock->bIsBelow || (g_pMainDock->bAutoHide && g_pMainDock->fHideOffset == 1));
+ break;
+ }
+
+ if (bShow)
+ cairo_dock_stop_quick_hide ();
+
+ cairo_dock_foreach_docks ((GHFunc) _show_hide_one_dock, GINT_TO_POINTER (bShow));
+
+ if (! bShow)
+ cairo_dock_quick_hide_all_docks ();
+
+ return TRUE;
+}
+
+gboolean cd_dbus_main_show_desklet (dbusMainObject *pDbusCallback, gboolean *widgetLayer, GError **error)
+{
+ if (! myConfig.bEnableDesklets)
+ return FALSE;
+ if (dbus_deskletVisible)
+ {
+ cairo_dock_set_desklets_visibility_to_default ();
+ cairo_dock_show_xwindow (dbus_xLastActiveWindow);
+ }
+ else
+ {
+ dbus_xLastActiveWindow = cairo_dock_get_current_active_window ();
+ cairo_dock_set_all_desklets_visible (widgetLayer != NULL ? *widgetLayer : FALSE);
+ }
+ dbus_deskletVisible = !dbus_deskletVisible;
+ return TRUE;
+}
+
+
gboolean cd_dbus_main_reload_module (dbusMainObject *pDbusCallback, const gchar *cModuleName, GError **error)
{
if (! myConfig.bEnableReloadModule)
@@ -72,11 +138,9 @@
}
else
{
- //CairoDockInternalModule *pInternalModule = cairo_dock_find_internal_module_from_name (cModuleName);
GldiManager *pManager = gldi_get_manager (cModuleName);
if (pManager != NULL)
{
- //cairo_dock_reload_internal_module (pInternalModule, g_cConfFile);
gldi_reload_manager (pManager, g_cConfFile);
}
else
@@ -96,9 +160,9 @@
CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName);
if (pModule == NULL)
{
- /*if (cairo_dock_find_internal_module_from_name (cModuleName) != NULL)
+ if (gldi_get_manager (cModuleName) != NULL)
cd_warning ("Internal modules can't be (de)activated.");
- else*/
+ else
cd_warning ("no such module (%s)", cModuleName);
return FALSE;
}
@@ -110,86 +174,864 @@
return TRUE;
}
-gboolean cd_dbus_main_show_desklet(dbusMainObject *pDbusCallback, gboolean *widgetLayer, GError **error)
-{
- if (! myConfig.bEnableDesklets)
- return FALSE;
- if (dbus_deskletVisible)
- {
- cairo_dock_set_desklets_visibility_to_default ();
- cairo_dock_show_xwindow (dbus_xLastActiveWindow);
- }
- else
- {
- dbus_xLastActiveWindow = cairo_dock_get_current_active_window ();
- cairo_dock_set_all_desklets_visible (widgetLayer != NULL ? *widgetLayer : FALSE);
- }
- dbus_deskletVisible = !dbus_deskletVisible;
- return TRUE;
-}
-
-static void _show_hide_one_dock (const gchar *cDockName, CairoDock *pDock, gpointer data)
-{
- if (pDock->iRefCount != 0)
- return ;
- gboolean bShow = GPOINTER_TO_INT (data);
- if (bShow)
- {
- ///cairo_dock_pop_up (pDock);
- if (pDock->bAutoHide)
- cairo_dock_emit_enter_signal (CAIRO_CONTAINER (pDock));
- }
- else
- {
- ///cairo_dock_pop_down (pDock); // ne fait rien s'il n'etait pas "popped".
- if (pDock->bAutoHide)
- cairo_dock_emit_leave_signal (CAIRO_CONTAINER (pDock));
- }
-}
-gboolean cd_dbus_main_show_dock (dbusMainObject *pDbusCallback, gboolean bShow, GError **error)
-{
- if (! myConfig.bEnableShowDock)
- return FALSE;
-
- if (bShow)
- cairo_dock_stop_quick_hide ();
-
- cairo_dock_foreach_docks ((GHFunc) _show_hide_one_dock, GINT_TO_POINTER (bShow));
-
- if (! bShow)
- cairo_dock_quick_hide_all_docks ();
-
- return TRUE;
-}
-
-gboolean cd_dbus_main_create_launcher_from_scratch (dbusMainObject *pDbusCallback, const gchar *cIconFile, const gchar *cLabel, const gchar *cCommand, const gchar *cParentDockName, GError **error)
-{
- if (! myConfig.bEnableCreateLauncher)
- return FALSE;
-
- nullify_argument (cParentDockName);
- if (cParentDockName == NULL)
- cParentDockName = CAIRO_DOCK_MAIN_DOCK_NAME;
+
+ //////////////////
+ /// ICON QUERY ///
+//////////////////
+
+typedef struct {
+ const gchar *cType;
+ const gchar *cName;
+ const gchar *cCommand;
+ const gchar *cClass;
+ const gchar *cContainerName;
+ Window Xid;
+ const gchar *cDesktopFile;
+ const gchar *cModuleName;
+ gint iPosition;
+ gboolean bMatchAll;
+ GList *pMatchingIcons;
+} CDIconQueryBuffer;
+static inline gboolean _strings_match (const gchar *q, const gchar *p) // query, parameter
+{
+ if (!p)
+ return (strcmp (q, "none") == 0);
+ int n = strlen(q);
+ if (n != 0 && q[n-1] == '*') // ok with UTF-8 too.
+ return (strncmp (q, p, n-1) == 0);
+ return (strcmp (q, p) == 0);
+}
+static inline gboolean _strings_match_case (const gchar *q, const gchar *p) // query, parameter
+{
+ if (!p)
+ return (strcmp (q, "none") == 0);
+ int n = strlen(q);
+ if (n != 0 && q[n-1] == '*')
+ return (g_ascii_strncasecmp (q, p, n-1) == 0);
+ return (g_ascii_strcasecmp (q, p) == 0);
+}
+static gboolean _icon_is_matching (Icon *pIcon, CairoContainer *pContainer, CDIconQueryBuffer *pQuery)
+{
+ gboolean bOr = FALSE;
+ gboolean bAnd = TRUE; // at least 1 of the fields is not nul.
+ gboolean r;
+ if (pQuery->cType)
+ {
+ const gchar *cType;
+ if (CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (pIcon))
+ cType = "Launcher";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_APPLI (pIcon))
+ cType = "Application";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_APPLET (pIcon))
+ cType = "Applet";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon))
+ cType = "Separator";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_CONTAINER (pIcon))
+ cType = "Container";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER (pIcon))
+ cType = "Class-Container";
+ else
+ cType = "Other";
+ r = (strcmp (pQuery->cType, cType) == 0);
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->cName)
+ {
+ r = _strings_match (pQuery->cName, pIcon->cName);
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->cCommand)
+ {
+ r = _strings_match (pQuery->cCommand, pIcon->cCommand);
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->cClass)
+ {
+ r = _strings_match_case (pQuery->cClass, pIcon->cClass);
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->cContainerName)
+ {
+ const gchar *cContainerName = NULL;
+ if (CAIRO_DOCK_IS_DOCK (pContainer))
+ cContainerName = pIcon->cParentDockName;
+ else if (CAIRO_DOCK_IS_DESKLET (pContainer))
+ {
+ Icon *pMainIcon = CAIRO_DESKLET (pContainer)->pIcon;
+ if (CAIRO_DOCK_IS_APPLET (pMainIcon))
+ cContainerName = pMainIcon->pModuleInstance->pModule->pVisitCard->cModuleName;
+ }
+ r = _strings_match (pQuery->cContainerName, cContainerName);
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->Xid != 0)
+ {
+ r = (pIcon->Xid == pQuery->Xid);
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->cDesktopFile)
+ {
+ r = _strings_match (pQuery->cDesktopFile, pIcon->cDesktopFileName);
+ if (!r && CAIRO_DOCK_IS_APPLET (pIcon) && pIcon->pModuleInstance->cConfFilePath)
+ {
+ if (*pQuery->cDesktopFile == '/') // query the complete path.
+ {
+ r = _strings_match (pQuery->cDesktopFile, pIcon->pModuleInstance->cConfFilePath);
+ }
+ else // query the file name only.
+ {
+ gchar *str = strrchr (pIcon->pModuleInstance->cConfFilePath, '/');
+ if (str)
+ r = _strings_match (pQuery->cDesktopFile, str+1);
+ }
+ }
+ bOr |= r;
+ bAnd &= r;
+ }
+ if (pQuery->cModuleName)
+ {
+ r = (CAIRO_DOCK_IS_APPLET (pIcon) && _strings_match (pQuery->cModuleName, pIcon->pModuleInstance->pModule->pVisitCard->cModuleName));
+ bOr |= r;
+ bAnd &= r;
+ }
+
+ return ((pQuery->bMatchAll && bAnd) || (!pQuery->bMatchAll && bOr));
+}
+static void _check_icon_matching (Icon *pIcon, CairoContainer *pContainer, CDIconQueryBuffer *pQuery)
+{
+ if (_icon_is_matching (pIcon, pContainer, pQuery))
+ pQuery->pMatchingIcons = g_list_prepend (pQuery->pMatchingIcons, pIcon);
+}
+static void _get_icon_at_position_in_dock (const gchar *cDockName, CairoDock *pDock, CDIconQueryBuffer *pQuery)
+{
+ Icon *pIcon = g_list_nth_data (pDock->icons, pQuery->iPosition);
+ if (pIcon != NULL)
+ pQuery->pMatchingIcons = g_list_prepend (pQuery->pMatchingIcons, pIcon);
+}
+static gboolean _get_icon_at_position_in_desklet (CairoDesklet *pDesklet, CDIconQueryBuffer *pQuery)
+{
+ Icon *pIcon = g_list_nth_data (pDesklet->icons, pQuery->iPosition);
+ if (pIcon != NULL)
+ pQuery->pMatchingIcons = g_list_prepend (pQuery->pMatchingIcons, pIcon);
+ return FALSE; // don't stop.
+}
+static gboolean _prepare_query (CDIconQueryBuffer *pQuery, const gchar *cKey, const gchar *cValue)
+{
+ g_return_val_if_fail (cKey != NULL, FALSE);
+ if (cValue == NULL) // use "none" keyword to look for "icons that don't have key".
+ return FALSE;
+
+ if (strcmp (cKey, "name") == 0 || strcmp (cKey, "label") == 0)
+ pQuery->cName = cValue;
+ else if (strcmp (cKey, "command") == 0)
+ pQuery->cCommand = cValue;
+ else if (strcmp (cKey, "class") == 0)
+ pQuery->cClass = cValue;
+ else if (strcmp (cKey, "container") == 0)
+ pQuery->cContainerName = cValue;
+ else if (strcmp (cKey, "Xid") == 0)
+ pQuery->Xid = strtol(cValue, NULL, 0); // can read hexa, decimal or octal.
+ else if (strcmp (cKey, "config-file") == 0)
+ pQuery->cDesktopFile = cValue;
+ else if (strcmp (cKey, "module") == 0)
+ pQuery->cModuleName = cValue;
+ else if (strcmp (cKey, "position") == 0)
+ pQuery->iPosition = atoi (cValue);
+ else if (strcmp (cKey, "type") == 0)
+ pQuery->cType = cValue;
+ else
+ {
+ cd_warning ("wrong key (%s)", cKey);
+ return FALSE;
+ }
+ return TRUE;
+}
+static GList *_find_matching_icons_for_key (const gchar *cKey, const gchar *cValue)
+{
+ //g_print (" %s (%s, %s)\n", __func__, cKey, cValue);
+ CDIconQueryBuffer query;
+ memset (&query, 0, sizeof (CDIconQueryBuffer));
+ query.iPosition = -1;
+ query.bMatchAll = TRUE;
+
+ gboolean bValidQuery = _prepare_query (&query, cKey, cValue);
+ g_return_val_if_fail (bValidQuery, NULL);
+
+ if (query.iPosition >= 0)
+ {
+ cairo_dock_foreach_docks ((GHFunc) _get_icon_at_position_in_dock, &query);
+ cairo_dock_foreach_desklet ((CairoDockForeachDeskletFunc) _get_icon_at_position_in_desklet, &query);
+ }
+ else
+ {
+ cairo_dock_foreach_icons ((CairoDockForeachIconFunc) _check_icon_matching, &query);
+ }
+ return query.pMatchingIcons;
+}
+static GList *_find_matching_icons_for_test (gchar *cTest)
+{
+ g_return_val_if_fail (cTest != NULL, NULL);
+ //g_print (" %s (%s)\n", __func__, cTest);
+
+ gchar *str = strchr (cTest, '=');
+ g_return_val_if_fail (str != NULL, NULL);
+
+ *str = '\0';
+ gchar *cKey = g_strstrip ((gchar*)cTest); // g_strstrip modifies the string in place (by moving the rest of the characters forward and cutting the trailing spaces)
+ gchar *cValue = g_strstrip (str+1);
+
+ return _find_matching_icons_for_key (cKey, cValue);
+}
+static GList *_merge (GList *pList1, GList *pList2)
+{
+ //g_print ("%s ()\n", __func__);
+ GList *pList = NULL;
+ GList *ic;
+ Icon *pIcon;
+ for (ic = pList1; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ if (g_list_find (pList2, pIcon) != NULL)
+ pList = g_list_prepend (pList, pIcon);
+ }
+ g_list_free (pList1);
+ g_list_free (pList2);
+ return pList;
+}
+static GList *_concat (GList *pList1, GList *pList2)
+{
+ //g_print ("%s ()\n", __func__);
+ GList *pList = g_list_copy (pList2);
+ GList *ic;
+ Icon *pIcon;
+ for (ic = pList1; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ if (!g_list_find (pList2, pIcon))
+ pList = g_list_prepend (pList, pIcon);
+ }
+ g_list_free (pList1);
+ g_list_free (pList2);
+ return pList;
+}
+GList *cd_dbus_find_matching_icons (gchar *cQuery)
+{
+ g_return_val_if_fail (cQuery != NULL, NULL);
+ //g_print ("%s (%s)\n", __func__, cQuery);
+
+ gchar *str;
+ str = strchr (cQuery, '|'); // a && b || c && d <=> (a && b) || (c && d)
+ if (str)
+ {
+ *str = '\0';
+ GList *pList1 = cd_dbus_find_matching_icons (cQuery);
+ GList *pList2 = cd_dbus_find_matching_icons (str+1);
+ return _concat (pList1, pList2);
+ }
+ str = strchr (cQuery, '&');
+ if (str)
+ {
+ *str = '\0';
+ GList *pList1 = cd_dbus_find_matching_icons (cQuery);
+ GList *pList2 = cd_dbus_find_matching_icons (str+1);
+ return _merge (pList1, pList2);
+ }
+ return _find_matching_icons_for_test (cQuery);
+}
+
+
+gboolean cd_dbus_main_get_icon_properties (dbusMainObject *pDbusCallback, gchar *cIconQuery, GPtrArray **pIconAttributes, GError **error)
+{
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery); // if NULL, will just return an empty array.
+
+ GPtrArray *pTab = g_ptr_array_new ();
+ *pIconAttributes = pTab;
+
+ GHashTable *h;
+ GValue *v;
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ int iPosition;
+ const gchar *cType;
+ const gchar *cContainerName;
+ const gchar *cDesktopFile;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+
+ h = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free, /// can we use const char here instead of duplicating each string ?...
+ g_free);
+ g_ptr_array_add (pTab, h);
+
+ if (CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (pIcon))
+ cType = "Launcher";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_APPLI (pIcon))
+ cType = "Application";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_APPLET (pIcon))
+ cType = "Applet";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon))
+ cType = "Separator";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_CONTAINER (pIcon))
+ cType = "Container";
+ else if (CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER (pIcon))
+ cType = "Class-Container";
+ else
+ cType = "Other";
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, cType);
+ g_hash_table_insert (h, g_strdup ("type"), v);
+
+ cDesktopFile = NULL;
+ if (pIcon->cDesktopFileName != NULL)
+ cDesktopFile = pIcon->cDesktopFileName;
+ else if (CAIRO_DOCK_IS_APPLET (pIcon))
+ cDesktopFile = pIcon->pModuleInstance->cConfFilePath;
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, cDesktopFile);
+ g_hash_table_insert (h, g_strdup ("config-file"), v);
+
+ if (CAIRO_DOCK_IS_APPLET (pIcon))
+ {
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pIcon->pModuleInstance->pModule->pVisitCard->cModuleName);
+ g_hash_table_insert (h, g_strdup ("module"), v);
+ }
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pIcon->cName); /// g_value_set_static_string ?...
+ g_hash_table_insert (h, g_strdup ("name"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pIcon->cCommand);
+ g_hash_table_insert (h, g_strdup ("command"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pIcon->cClass);
+ g_hash_table_insert (h, g_strdup ("class"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pIcon->cFileName);
+ g_hash_table_insert (h, g_strdup ("icon"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pIcon->cQuickInfo);
+ g_hash_table_insert (h, g_strdup ("quick-info"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_UINT);
+ g_value_set_uint (v, pIcon->Xid);
+ g_hash_table_insert (h, g_strdup ("Xid"), v);
+
+ iPosition = -1;
+ cContainerName = NULL;
+ if (CAIRO_DOCK_IS_DOCK (pContainer))
+ {
+ CairoDock *pDock = CAIRO_DOCK (pContainer);
+ iPosition = g_list_index (pDock->icons, pIcon);
+ cContainerName = pIcon->cParentDockName;
+ }
+ else if (CAIRO_DOCK_IS_DESKLET (pContainer))
+ {
+ CairoDesklet *pDesklet = CAIRO_DESKLET (pContainer);
+ if (pDesklet->pIcon == pIcon)
+ iPosition = 0;
+ else
+ iPosition = g_list_index (pDesklet->icons, pIcon);
+ if (CAIRO_DOCK_IS_APPLET (pDesklet->pIcon))
+ cContainerName = pDesklet->pIcon->pModuleInstance->pModule->pVisitCard->cModuleName;
+ }
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, iPosition);
+ g_hash_table_insert (h, g_strdup ("position"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, cContainerName);
+ g_hash_table_insert (h, g_strdup ("container"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_DOUBLE);
+ g_value_set_double (v, pIcon->fOrder);
+ g_hash_table_insert (h, g_strdup ("order"), v);
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+static void _set_container_props (CairoContainer *pContainer, GHashTable *h)
+{
+ GValue *v;
+ int x, y, w, ht;
+ if (pContainer->bIsHorizontal)
+ {
+ x = pContainer->iWindowPositionX;
+ y = pContainer->iWindowPositionY;
+ w = pContainer->iWidth;
+ ht = pContainer->iHeight;
+ }
+ else
+ {
+ y = pContainer->iWindowPositionX;
+ x = pContainer->iWindowPositionY;
+ ht = pContainer->iWidth;
+ w = pContainer->iHeight;
+ }
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, pContainer->iWindowPositionX);
+ g_hash_table_insert (h, g_strdup ("x"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, y);
+ g_hash_table_insert (h, g_strdup ("y"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, w);
+ g_hash_table_insert (h, g_strdup ("width"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, ht);
+ g_hash_table_insert (h, g_strdup ("height"), v);
+
+ CairoDockPositionType iScreenBorder = ((! pContainer->bIsHorizontal) << 1) | (! pContainer->bDirectionUp);
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_UINT);
+ g_value_set_uint (v, iScreenBorder);
+ g_hash_table_insert (h, g_strdup ("orientation"), v);
+}
+static void _insert_dock_props (const gchar *cDockName, CairoDock *pDock, GPtrArray *pTab)
+{
+ GHashTable *h = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free, /// can we use const char here instead of duplicating each string ?...
+ g_free);
+ g_ptr_array_add (pTab, h);
+
+ GValue *v;
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, "Dock");
+ g_hash_table_insert (h, g_strdup ("type"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, cDockName);
+ g_hash_table_insert (h, g_strdup ("name"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_BOOLEAN);
+ g_value_set_boolean (v, (pDock->iRefCount > 0));
+ g_hash_table_insert (h, g_strdup ("is-sub-dock"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, g_list_length (pDock->icons));
+ g_hash_table_insert (h, g_strdup ("nb-icons"), v);
+
+ _set_container_props (CAIRO_CONTAINER (pDock), h);
+}
+static gboolean _insert_desklet_props (CairoDesklet *pDesklet, GPtrArray *pTab)
+{
+ GHashTable *h = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free, /// can we use const char here instead of duplicating each string ?...
+ g_free);
+ g_ptr_array_add (pTab, h);
+
+ GValue *v;
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, "Desklet");
+ g_hash_table_insert (h, g_strdup ("type"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, CAIRO_DOCK_IS_APPLET (pDesklet->pIcon) ? pDesklet->pIcon->pModuleInstance->pModule->pVisitCard->cModuleName : "");
+ g_hash_table_insert (h, g_strdup ("name"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, 1 + g_list_length (pDesklet->icons));
+ g_hash_table_insert (h, g_strdup ("nb-icons"), v);
+
+ _set_container_props (CAIRO_CONTAINER (pDesklet), h);
+ return FALSE;
+}
+static gboolean _check_desklet_name (CairoDesklet *pDesklet, const gchar *cName)
+{
+ if (CAIRO_DOCK_IS_APPLET (pDesklet->pIcon))
+ {
+ return (strcmp (cName, pDesklet->pIcon->pModuleInstance->pModule->pVisitCard->cModuleName) == 0);
+ }
+ return FALSE;
+}
+gboolean cd_dbus_main_get_container_properties (dbusMainObject *pDbusCallback, const gchar *cName, GPtrArray **pAttributes, GError **error)
+{
+ nullify_argument (cName);
+
+ GPtrArray *pTab = g_ptr_array_new ();
+ *pAttributes = pTab;
+
+ if (cName == NULL)
+ {
+ cairo_dock_foreach_docks ((GHFunc)_insert_dock_props, pTab);
+ cairo_dock_foreach_desklet ((CairoDockForeachDeskletFunc) _insert_desklet_props, pTab);
+ }
+ else
+ {
+ CairoDock *pDock = cairo_dock_search_dock_from_name (cName);
+ if (pDock != NULL)
+ {
+ _insert_dock_props (cName, pDock, pTab);
+ }
+ else
+ {
+ CairoDesklet *pDesklet = cairo_dock_foreach_desklet ((CairoDockForeachDeskletFunc) _check_desklet_name, (gpointer)cName);
+ if (pDesklet != NULL)
+ {
+ _insert_desklet_props (pDesklet, pTab);
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean _insert_module_props (CairoDockModule *pModule, GPtrArray *pTab)
+{
+ GHashTable *h = g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free, /// can we use const char here instead of duplicating each string ?...
+ g_free);
+ g_ptr_array_add (pTab, h);
+
+ GValue *v;
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pModule->pVisitCard->cModuleName);
+ g_hash_table_insert (h, g_strdup ("name"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_UINT);
+ g_value_set_uint (v, pModule->pVisitCard->iContainerType);
+ g_hash_table_insert (h, g_strdup ("type"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_UINT);
+ g_value_set_uint (v, pModule->pVisitCard->iCategory);
+ g_hash_table_insert (h, g_strdup ("category"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pModule->pVisitCard->cTitle);
+ g_hash_table_insert (h, g_strdup ("title"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pModule->pVisitCard->cIconFilePath);
+ g_hash_table_insert (h, g_strdup ("icon"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pModule->pVisitCard->cPreviewFilePath);
+ g_hash_table_insert (h, g_strdup ("preview"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, dgettext (pModule->pVisitCard->cGettextDomain, pModule->pVisitCard->cDescription));
+ g_hash_table_insert (h, g_strdup ("description"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRING);
+ g_value_set_string (v, pModule->pVisitCard->cAuthor);
+ g_hash_table_insert (h, g_strdup ("author"), v);
+
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_BOOLEAN);
+ g_value_set_boolean (v, pModule->pVisitCard->bMultiInstance);
+ g_hash_table_insert (h, g_strdup ("is-multi-instance"), v);
+
+ g_print ("list instances ...\n");
+ gchar **pInstances = g_new0 (gchar*, g_list_length (pModule->pInstancesList)+1);
+ CairoDockModuleInstance *pInstance;
+ int i = 0;
+ GList *mi;
+ for (mi = pModule->pInstancesList; mi != NULL; mi = mi->next)
+ {
+ pInstance = mi->data;
+ pInstances[i++] = g_strdup (pInstance->cConfFilePath);
+ }
+ g_print ("write instances ...\n");
+ v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_STRV);
+ g_value_set_boxed (v, pInstances);
+ g_hash_table_insert (h, g_strdup ("instances"), v);
+ g_print ("done.\n");
+ return TRUE; // continue
+}
+gboolean cd_dbus_main_get_module_properties (dbusMainObject *pDbusCallback, const gchar *cName, GPtrArray **pAttributes, GError **error)
+{
+ nullify_argument (cName);
+
+ GPtrArray *pTab = g_ptr_array_new ();
+ *pAttributes = pTab;
+
+ if (cName == NULL)
+ {
+ cairo_dock_foreach_module_in_alphabetical_order ((GCompareFunc) _insert_module_props, pTab);
+ }
+ else
+ {
+ CairoDockModule *pModule = cairo_dock_find_module_from_name (cName);
+ if (pModule != NULL)
+ {
+ _insert_module_props (pModule, pTab);
+ }
+ }
+ return TRUE;
+}
+
+gboolean cd_dbus_main_add_launcher (dbusMainObject *pDbusCallback, const gchar *cDesktopFilePath, gdouble fOrder, const gchar *cDockName, gchar **cLauncherFile, GError **error)
+{
+ *cLauncherFile = NULL;
+ if (! myConfig.bEnableCreateLauncher)
+ return FALSE;
+ g_return_val_if_fail (cDesktopFilePath != NULL, FALSE);
+
+ //\_______________ get the dock where to insert the icon.
+ nullify_argument (cDockName);
+ if (cDockName == NULL)
+ cDockName = CAIRO_DOCK_MAIN_DOCK_NAME;
+
+ CairoDock * pParentDock = cairo_dock_search_dock_from_name (cDockName);
+ if (pParentDock == NULL)
+ {
+ cd_warning ("dock %s does not exist", cDockName);
+ pParentDock = g_pMainDock;
+ }
+
+ //\_______________ add a new icon in the current theme.
+ int iLauncherType = -1;
+ if (strcmp (cDesktopFilePath, "separator.desktop") == 0)
+ iLauncherType = CAIRO_DOCK_DESKTOP_FILE_FOR_SEPARATOR;
+ else if (strcmp (cDesktopFilePath, "container.desktop") == 0)
+ iLauncherType = CAIRO_DOCK_DESKTOP_FILE_FOR_CONTAINER;
+ else if (strcmp (cDesktopFilePath, "launcher.desktop") == 0)
+ iLauncherType = CAIRO_DOCK_DESKTOP_FILE_FOR_LAUNCHER;
+
+ if (fOrder < 0)
+ fOrder = CAIRO_DOCK_LAST_ORDER;
+ Icon *pNewIcon;
+ if (iLauncherType != -1)
+ pNewIcon = cairo_dock_add_new_launcher_by_type (iLauncherType, pParentDock, fOrder, CAIRO_DOCK_LAUNCHER);
+ else
+ pNewIcon = cairo_dock_add_new_launcher_by_uri (cDesktopFilePath, pParentDock, fOrder);
+ if (pNewIcon != NULL)
+ {
+ *cLauncherFile = g_strdup (pNewIcon->cDesktopFileName);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+gboolean cd_dbus_main_add_temporary_icon (dbusMainObject *pDbusCallback, GHashTable *hIconAttributes, GError **error)
+{
+ if (! myConfig.bEnableCreateLauncher)
+ return FALSE;
+
+ g_return_val_if_fail (hIconAttributes != NULL, FALSE);
+
+ //\_______________ get the attributes.
+ GValue *v;
+ const gchar *cType = "Launcher";
+ v = g_hash_table_lookup (hIconAttributes, "type");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cType = g_value_get_string (v);
+ }
+
+ const gchar *cIcon = NULL;
+ v = g_hash_table_lookup (hIconAttributes, "icon");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cIcon = g_value_get_string (v);
+ }
+
+ const gchar *cName = NULL;
+ v = g_hash_table_lookup (hIconAttributes, "name");
+ if (!v)
+ v = g_hash_table_lookup (hIconAttributes, "label");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cName = g_value_get_string (v);
+ }
+
+ const gchar *cParentDockName = CAIRO_DOCK_MAIN_DOCK_NAME;
+ v = g_hash_table_lookup (hIconAttributes, "container");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cParentDockName = g_value_get_string (v);
+ }
+
+ const gchar *cQuickInfo = NULL;
+ v = g_hash_table_lookup (hIconAttributes, "quick-info");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cQuickInfo = g_value_get_string (v);
+ }
+
+ double fOrder = CAIRO_DOCK_LAST_ORDER;
+ v = g_hash_table_lookup (hIconAttributes, "order");
+ if (v && G_VALUE_HOLDS_DOUBLE (v))
+ {
+ fOrder = g_value_get_double (v);
+ }
+
+ int iPosition = -1;
+ v = g_hash_table_lookup (hIconAttributes, "position");
+ if (v && G_VALUE_HOLDS_INT (v))
+ {
+ iPosition = g_value_get_int (v);
+ }
+
+ const gchar *cCommand = NULL;
+ v = g_hash_table_lookup (hIconAttributes, "command");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cCommand = g_value_get_string (v);
+ }
+
+ const gchar *cClass = NULL;
+ v = g_hash_table_lookup (hIconAttributes, "class");
+ if (v && G_VALUE_HOLDS_STRING (v))
+ {
+ cClass = g_value_get_string (v); // "none" to skip taskbar
+ }
CairoDock *pParentDock = cairo_dock_search_dock_from_name (cParentDockName);
if (pParentDock == NULL)
{
- cd_message ("le dock parent (%s) n'existe pas, on le cree", cParentDockName);
- pParentDock = cairo_dock_create_dock (cParentDockName, NULL);
- }
-
- Icon *pIcon = cairo_dock_create_dummy_launcher (g_strdup (cLabel),
- g_strdup (cIconFile),
- g_strdup (cCommand),
- NULL,
- CAIRO_DOCK_LAST_ORDER);
+ cd_warning ("dock %s does not exist", cParentDockName);
+ pParentDock = g_pMainDock;
+ }
+
+ if (iPosition > -1) // the position will overwrite the order if ever both are defined.
+ {
+ fOrder = 0;
+ Icon *nth_icon;
+ double nth_order = -1;
+ int i;
+ GList *ic;
+ for (i = 0, ic = pParentDock->icons; i < iPosition && ic != NULL; i ++, ic = ic->next)
+ {
+ nth_icon = ic->data;
+ nth_order = nth_icon->fOrder;
+ }
+ if (ic == NULL) // not enough icons, place the new one just after the last one.
+ {
+ fOrder = nth_order + 1;
+ }
+ else
+ {
+ nth_icon = ic->data;
+ fOrder = (nth_order + nth_icon->fOrder) / 2;
+ }
+ }
+
+ //\_______________ create a corresponding icon.
+ Icon *pIcon;
+ if (cType == NULL || strcmp (cType, "Launcher") == 0)
+ {
+ pIcon = cairo_dock_create_dummy_launcher (g_strdup (cName),
+ g_strdup (cIcon),
+ g_strdup (cCommand),
+ g_strdup (cQuickInfo),
+ fOrder);
+ pIcon->iTrueType = CAIRO_DOCK_ICON_TYPE_LAUNCHER; // make it a launcher, since we have no control on it, so that the dock handles it as any launcher.
+ if (cClass == NULL)
+ {
+ gchar *cGuessedClass = cairo_dock_guess_class (cCommand, NULL);
+ pIcon->cClass = cairo_dock_register_class (cGuessedClass);
+ g_free (cGuessedClass);
+ }
+ else if (strcmp (cClass, "none") != 0)
+ {
+ pIcon->cClass = cairo_dock_register_class (cClass);
+ if (pIcon->cClass == NULL) // if we couldn't find the class desktop file, set the class anyway, since it was explicitely specified; the method caller probably knows more than us what he's doing.
+ pIcon->cClass = g_strdup (cClass);
+ }
+ }
+ else if (strcmp (cType, "Container") == 0)
+ {
+ int iSubdockViewType = 0;
+ if (!cIcon || strcmp (cIcon, "Box") == 0)
+ {
+ iSubdockViewType = 3;
+ cIcon = NULL;
+ }
+ else if (strcmp (cIcon, "Stack") == 0)
+ {
+ iSubdockViewType = 2;
+ cIcon = NULL;
+ }
+ else if (strcmp (cIcon, "Emblems") == 0)
+ {
+ iSubdockViewType = 1;
+ cIcon = NULL;
+ }
+ gchar *cUniqueName = cairo_dock_get_unique_dock_name (cName);
+ pIcon = cairo_dock_create_dummy_launcher (cUniqueName,
+ g_strdup (cIcon),
+ NULL,
+ NULL,
+ fOrder);
+ pIcon->iTrueType = CAIRO_DOCK_ICON_TYPE_CONTAINER;
+ pIcon->iSubdockViewType = iSubdockViewType;
+ pIcon->pSubDock = cairo_dock_create_subdock_from_scratch (NULL, pIcon->cName, pParentDock); // NULL <=> default sub-docks view.
+ }
+ else if (strcmp (cType, "Separator") == 0)
+ {
+ pIcon = cairo_dock_create_separator_icon (CAIRO_DOCK_LAUNCHER, NULL); // NULL because we'll load the icon ourselves later.
+ }
+ else
+ {
+ cd_warning ("type '%s' invalid", cType);
+ return FALSE;
+ }
pIcon->cParentDockName = g_strdup (cParentDockName);
- cairo_dock_set_launcher_class (pIcon, NULL);
+ //\_______________ load it inside the dock.
cairo_dock_load_icon_buffers (pIcon, CAIRO_CONTAINER (pParentDock));
cairo_dock_insert_icon_in_dock (pIcon, pParentDock, CAIRO_DOCK_UPDATE_DOCK_SIZE, CAIRO_DOCK_ANIMATE_ICON);
- cairo_dock_launch_animation (CAIRO_CONTAINER (pParentDock));
+ cairo_dock_start_icon_animation (pIcon, pParentDock);
if (pIcon->cClass != NULL)
{
@@ -199,41 +1041,17 @@
return TRUE;
}
-gboolean cd_dbus_main_load_launcher_from_file (dbusMainObject *pDbusCallback, const gchar *cDesktopFile, GError **error) // pris de cairo_dock_add_new_launcher_by_uri().
-{
- if (! myConfig.bEnableTweakingLauncher)
- return FALSE;
- g_return_val_if_fail (cDesktopFile != NULL, FALSE);
-
- Icon *pIcon = cairo_dock_create_icon_from_desktop_file (cDesktopFile);
-
- if (pIcon == NULL)
- {
- cd_warning ("the icon couldn't be created, check that the file '%s' exists and is a valid and readable .desktop file\n", cDesktopFile);
- return FALSE;
- }
-
- CairoDock * pParentDock = cairo_dock_search_dock_from_name (pIcon->cParentDockName);
- if (pParentDock != NULL) // a priori toujours vrai puisqu'il est cree au besoin. En fait c'est probablement le main dock pour un .desktop de base.
- {
- cairo_dock_insert_icon_in_dock (pIcon, pParentDock, CAIRO_DOCK_UPDATE_DOCK_SIZE, CAIRO_DOCK_ANIMATE_ICON);
- cairo_dock_start_icon_animation (pIcon, pParentDock);
- }
- cd_debug (" => cDesktopFileName : %s\n", pIcon->cDesktopFileName);
-
- return TRUE;
-}
-
static void _find_launcher_in_dock (Icon *pIcon, CairoDock *pDock, gpointer *data)
{
gchar *cDesktopFile = data[0];
Icon **pFoundIcon = data[1];
- if (pIcon->cDesktopFileName && g_ascii_strncasecmp (cDesktopFile, pIcon->cDesktopFileName, strlen (cDesktopFile)) == 0)
+ if ((pIcon->cDesktopFileName && g_ascii_strncasecmp (cDesktopFile, pIcon->cDesktopFileName, strlen (cDesktopFile)) == 0)
+ || (pIcon->cCommand && g_ascii_strncasecmp (cDesktopFile, pIcon->cCommand, strlen (cDesktopFile)) == 0))
{
*pFoundIcon = pIcon;
}
}
-Icon *cd_dbus_find_launcher (const gchar *cDesktopFile)
+static Icon *cd_dbus_find_launcher (const gchar *cDesktopFile)
{
Icon *pIcon = NULL;
gpointer data[2];
@@ -243,264 +1061,323 @@
return pIcon;
}
-gboolean cd_dbus_main_reload_launcher (dbusMainObject *pDbusCallback, const gchar *cDesktopFile, GError **error)
-{
- if (! myConfig.bEnableTweakingLauncher)
- return FALSE;
-
- nullify_argument (cDesktopFile);
- g_return_val_if_fail (cDesktopFile != NULL, FALSE);
-
- Icon *pIcon = cd_dbus_find_launcher (cDesktopFile);
- if (pIcon == NULL)
- return FALSE;
-
- cairo_dock_reload_launcher (pIcon);
-
- return TRUE;
-}
-
-gboolean cd_dbus_main_remove_launcher (dbusMainObject *pDbusCallback, const gchar *cDesktopFile, GError **error)
-{
- if (! myConfig.bEnableTweakingLauncher)
- return FALSE;
-
- nullify_argument (cDesktopFile);
- g_return_val_if_fail (cDesktopFile != NULL, FALSE);
-
- Icon *pIcon = cd_dbus_find_launcher (cDesktopFile);
- if (pIcon == NULL)
- return FALSE;
-
- if (pIcon->pSubDock != NULL) // on detruit le sous-dock et ce qu'il contient.
- {
- cairo_dock_destroy_dock (pIcon->pSubDock, (pIcon->cClass != NULL ? pIcon->cClass : pIcon->cName));
- pIcon->pSubDock = NULL;
- }
-
- cairo_dock_trigger_icon_removal_from_dock (pIcon);
-
- return TRUE;
-}
-
-
-
-
-static void _find_icon_in_dock (Icon *pIcon, CairoDock *pDock, gpointer *data)
-{
- gchar *cIconName = data[0];
- gchar *cIconCommand = data[1];
- Icon **pFoundIcon = data[2];
- gchar *cName = (pIcon->cInitialName != NULL ? pIcon->cInitialName : pIcon->cName);
- //g_print ("%s (%s/%s, %s/%s)\n", __func__, cName, cIconName, pIcon->cCommand, cIconCommand);
- if ((cIconName == NULL || (cName && g_ascii_strncasecmp (cIconName, cName, strlen (cIconName)) == 0)) &&
- (cIconCommand == NULL || (pIcon->cCommand && g_ascii_strncasecmp (cIconCommand, pIcon->cCommand, strlen (cIconCommand)) == 0) || (pIcon->cClass && g_ascii_strncasecmp (cIconCommand, pIcon->cClass, strlen (cIconCommand)) == 0))) // si un des parametre est non nul, alors on exige qu'il corresponde. 'cIconCommand' peut correspondre soit avec la commande, soit avec la classe.
- {
- Icon *icon = *pFoundIcon;
- if (icon != NULL) // on avait deja trouve une icone avant.
- {
- cName = (pIcon->cInitialName != NULL ? pIcon->cInitialName : pIcon->cName);
- if ((cIconName && cName && g_ascii_strcasecmp (cIconName, cName) == 0) ||
- (cIconCommand && pIcon->cCommand && g_ascii_strcasecmp (cIconCommand, pIcon->cCommand))) // elle satisfait entierement aux criteres, donc on la garde.
- return ;
- }
- *pFoundIcon = pIcon;
- }
-}
-Icon *cd_dbus_find_icon (const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName)
-{
- Icon *pIcon = NULL;
- if (cModuleName != NULL) // c'est une icone d'un des modules.
- {
- CairoDockModule *pModule = cairo_dock_find_module_from_name (cModuleName);
- g_return_val_if_fail (pModule != NULL, FALSE);
-
- if (pModule->pInstancesList != NULL)
- {
- CairoDockModuleInstance *pModuleInstance = pModule->pInstancesList->data;
- if (pModuleInstance != NULL)
- pIcon = pModuleInstance->pIcon;
- }
- }
- else if (cIconName || cIconCommand) // on cherche une icone de lanceur.
- {
- gpointer data[3];
- data[0] = (gpointer) cIconName;
- data[1] = (gpointer) cIconCommand;
- data[2] = &pIcon;
- cairo_dock_foreach_icons_in_docks ((CairoDockForeachIconFunc) _find_icon_in_dock, data);
- }
- return pIcon;
-}
-gboolean cd_dbus_main_set_quick_info (dbusMainObject *pDbusCallback, const gchar *cQuickInfo, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error)
+gboolean cd_dbus_main_reload_icon (dbusMainObject *pDbusCallback, gchar *cIconQuery, GError **error)
+{
+ if (! myConfig.bEnableTweakingLauncher)
+ return FALSE;
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+
+ if ((CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (pIcon)
+ || CAIRO_DOCK_ICON_TYPE_IS_CONTAINER (pIcon)
+ || CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon))
+ && pIcon->cDesktopFileName != NULL) // user icon.
+ {
+ cairo_dock_reload_launcher (pIcon);
+ }
+ else if (CAIRO_DOCK_IS_APPLET (pIcon))
+ {
+ cairo_dock_reload_module_instance (pIcon->pModuleInstance, TRUE); // TRUE <=> reload config.
+ }
+ else // for appli icons, reload their image (custom image for instance).
+ {
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (pContainer == NULL)
+ continue;
+
+ cairo_dock_reload_icon_image (pIcon, pContainer);
+ cairo_dock_redraw_icon (pIcon, pContainer);
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean _on_icon_deleted (GList *ic, Icon *pIcon)
+{
+ ic->data = NULL;
+}
+gboolean cd_dbus_main_remove_icon (dbusMainObject *pDbusCallback, gchar *cIconQuery, GError **error)
+{
+ if (! myConfig.bEnableTweakingLauncher)
+ return FALSE;
+
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
+ // first connect to the "delete" signal, to not destroy 2 times an icon (case of an icon in a sub-dock that is destroyed just before).
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ cairo_dock_register_notification_on_object (pIcon,
+ NOTIFICATION_STOP_ICON,
+ (CairoDockNotificationFunc) _on_icon_deleted,
+ CAIRO_DOCK_RUN_FIRST, ic);
+ }
+
+ // delete all the matching icons, including their sub-icons.
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ if (pIcon == NULL) // icon has been destroyed just before.
+ continue;
+
+ cairo_dock_remove_notification_func_on_object (pIcon,
+ NOTIFICATION_STOP_ICON,
+ (CairoDockNotificationFunc) _on_icon_deleted,
+ ic); // remove it now, since maybe this icon won't be deleted.
+
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (pContainer == NULL)
+ continue;
+
+ if (CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER (pIcon)
+ || CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon)
+ || CAIRO_DOCK_ICON_TYPE_IS_CONTAINER (pIcon)) // case of a launcher/separator/sub-dock inside a dock.
+ {
+ if (pIcon->pSubDock != NULL) // on detruit le sous-dock et ce qu'il contient.
+ {
+ cairo_dock_destroy_dock (pIcon->pSubDock, (pIcon->cClass != NULL ? pIcon->cClass : pIcon->cName));
+ pIcon->pSubDock = NULL;
+ }
+
+ cairo_dock_trigger_icon_removal_from_dock (pIcon);
+ }
+ else if (CAIRO_DOCK_IS_APPLET (pIcon)) // case of an applet inside a dock or a desklet.
+ {
+ cairo_dock_remove_module_instance (pIcon->pModuleInstance);
+ } // don't remove appli icons, as they would anyway be re-created automatically by the applications-manager.
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+
+ ///////////////////
+ /// SET ON ICON ///
+///////////////////
+
+gboolean cd_dbus_main_set_quick_info (dbusMainObject *pDbusCallback, const gchar *cQuickInfo, gchar *cIconQuery, GError **error)
{
if (! myConfig.bEnableSetQuickInfo)
return FALSE;
- nullify_argument (cIconName);
- nullify_argument (cIconCommand);
- nullify_argument (cModuleName);
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
nullify_argument (cQuickInfo);
- Icon *pIcon = cd_dbus_find_icon (cIconName, cIconCommand, cModuleName);
- if (pIcon == NULL)
- return FALSE;
-
- CairoContainer *pContainer = cairo_dock_search_container_from_icon (pIcon);
- g_return_val_if_fail (pContainer != NULL, FALSE);
-
- cairo_dock_set_quick_info (pIcon, pContainer, cQuickInfo);
- cairo_dock_redraw_icon (pIcon, pContainer);
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (pContainer == NULL)
+ continue;
+
+ cairo_dock_set_quick_info (pIcon, pContainer, cQuickInfo);
+ cairo_dock_redraw_icon (pIcon, pContainer);
+ }
+
+ g_list_free (pList);
return TRUE;
}
-gboolean cd_dbus_main_set_label (dbusMainObject *pDbusCallback, const gchar *cLabel, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error)
+gboolean cd_dbus_main_set_label (dbusMainObject *pDbusCallback, const gchar *cLabel, gchar *cIconQuery, GError **error)
{
if (! myConfig.bEnableSetLabel)
return FALSE;
- nullify_argument (cIconName);
- nullify_argument (cIconCommand);
- nullify_argument (cModuleName);
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
nullify_argument (cLabel);
- Icon *pIcon = cd_dbus_find_icon (cIconName, cIconCommand, cModuleName);
- if (pIcon == NULL)
- return FALSE;
-
- CairoContainer *pContainer = cairo_dock_search_container_from_icon (pIcon);
- g_return_val_if_fail (pContainer != NULL, FALSE);
- cairo_dock_set_icon_name (cLabel, pIcon, pContainer);
- return TRUE;
-}
-
-gboolean cd_dbus_main_set_icon (dbusMainObject *pDbusCallback, const gchar *cImage, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error)
-{
- if (! myConfig.bEnableSetIcon)
- return FALSE;
-
- nullify_argument (cIconName);
- nullify_argument (cIconCommand);
- nullify_argument (cModuleName);
-
- Icon *pIcon = cd_dbus_find_icon (cIconName, cIconCommand, cModuleName);
- if (pIcon == NULL)
- return FALSE;
-
- CairoContainer *pContainer = cairo_dock_search_container_from_icon (pIcon);
- g_return_val_if_fail (pContainer != NULL, FALSE);
- g_return_val_if_fail (pIcon->pIconBuffer != NULL, FALSE);
- cairo_t *pIconContext = cairo_create (pIcon->pIconBuffer);
- cairo_dock_set_image_on_icon (pIconContext, cImage, pIcon, pContainer);
- cairo_destroy (pIconContext);
- cairo_dock_redraw_icon (pIcon, pContainer);
- return TRUE;
-}
-
-gboolean cd_dbus_main_set_emblem (dbusMainObject *pDbusCallback, const gchar *cImage, gint iPosition, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error)
-{
- if (! myConfig.bEnableSetIcon)
- return FALSE;
-
- nullify_argument (cIconName);
- nullify_argument (cIconCommand);
- nullify_argument (cModuleName);
-
- Icon *pIcon = cd_dbus_find_icon (cIconName, cIconCommand, cModuleName);
- if (pIcon == NULL)
- return FALSE;
-
- CairoContainer *pContainer = cairo_dock_search_container_from_icon (pIcon);
- g_return_val_if_fail (pContainer != NULL, FALSE);
- g_return_val_if_fail (pIcon->pIconBuffer != NULL, FALSE);
- cairo_t *pIconContext = cairo_create (pIcon->pIconBuffer);
-
- CairoEmblem *pEmblem = cairo_dock_make_emblem (cImage, pIcon, pContainer);
- pEmblem->iPosition = iPosition;
- cairo_dock_draw_emblem_on_icon (pEmblem, pIcon, pContainer);
- cairo_dock_free_emblem (pEmblem);
-
- cairo_destroy (pIconContext);
- cairo_dock_redraw_icon (pIcon, pContainer);
- return TRUE;
-}
-
-gboolean cd_dbus_main_animate (dbusMainObject *pDbusCallback, const gchar *cAnimation, gint iNbRounds, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error)
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (pContainer == NULL)
+ continue;
+
+ cairo_dock_set_icon_name (cLabel, pIcon, pContainer);
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+gboolean cd_dbus_main_set_icon (dbusMainObject *pDbusCallback, const gchar *cImage, gchar *cIconQuery, GError **error)
+{
+ if (! myConfig.bEnableSetIcon)
+ return FALSE;
+
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ if (pIcon->pIconBuffer == NULL)
+ continue;
+
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (pContainer == NULL)
+ continue;
+
+ cairo_t *pIconContext = cairo_create (pIcon->pIconBuffer);
+ cairo_dock_set_image_on_icon (pIconContext, cImage, pIcon, pContainer);
+ cairo_destroy (pIconContext);
+ cairo_dock_redraw_icon (pIcon, pContainer);
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+gboolean cd_dbus_main_set_emblem (dbusMainObject *pDbusCallback, const gchar *cImage, gint iPosition, gchar *cIconQuery, GError **error)
+{
+ if (! myConfig.bEnableSetIcon)
+ return FALSE;
+
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ if (pIcon->pIconBuffer == NULL)
+ continue;
+
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (pContainer == NULL)
+ continue;
+
+ cairo_t *pIconContext = cairo_create (pIcon->pIconBuffer);
+
+ CairoEmblem *pEmblem = cairo_dock_make_emblem (cImage, pIcon, pContainer);
+ pEmblem->iPosition = iPosition;
+ cairo_dock_draw_emblem_on_icon (pEmblem, pIcon, pContainer);
+ cairo_dock_free_emblem (pEmblem);
+
+ cairo_destroy (pIconContext);
+ cairo_dock_redraw_icon (pIcon, pContainer);
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+gboolean cd_dbus_main_animate (dbusMainObject *pDbusCallback, const gchar *cAnimation, gint iNbRounds, gchar *cIconQuery, GError **error)
{
if (! myConfig.bEnableAnimateIcon || cAnimation == NULL)
return FALSE;
- nullify_argument (cIconName);
- nullify_argument (cIconCommand);
- nullify_argument (cModuleName);
-
- Icon *pIcon = cd_dbus_find_icon (cIconName, cIconCommand, cModuleName);
- if (pIcon == NULL)
- return FALSE;
-
- CairoContainer *pContainer = cairo_dock_search_container_from_icon (pIcon);
- g_return_val_if_fail (pContainer != NULL, FALSE);
-
- if (! CAIRO_DOCK_IS_DOCK (pContainer))
- return FALSE;
-
- cairo_dock_request_icon_animation (pIcon, CAIRO_DOCK (pContainer), cAnimation, iNbRounds);
- return TRUE;
-}
-
-gboolean cd_dbus_main_show_dialog (dbusMainObject *pDbusCallback, const gchar *message, gint iDuration, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error)
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (! CAIRO_DOCK_IS_DOCK (pContainer))
+ continue;
+ cairo_dock_request_icon_animation (pIcon, CAIRO_DOCK (pContainer), cAnimation, iNbRounds);
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+gboolean cd_dbus_main_demands_attention (dbusMainObject *pDbusCallback, gboolean bStart, const gchar *cAnimation, gchar *cIconQuery, GError **error)
+{
+ if (! myConfig.bEnableAnimateIcon)
+ return FALSE;
+
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
+ if (pList == NULL)
+ return FALSE;
+
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (! CAIRO_DOCK_IS_DOCK (pContainer))
+ continue;
+
+ if (bStart)
+ {
+ cairo_dock_request_icon_attention (pIcon, CAIRO_DOCK (pContainer), cAnimation, 0); // 0 <=> non-stop.
+ }
+ else if (pIcon->bIsDemandingAttention)
+ {
+ cairo_dock_stop_icon_attention (pIcon, CAIRO_DOCK (pContainer));
+ }
+ }
+
+ g_list_free (pList);
+ return TRUE;
+}
+
+gboolean cd_dbus_main_show_dialog (dbusMainObject *pDbusCallback, const gchar *message, gint iDuration, gchar *cIconQuery, GError **error)
{
if (! myConfig.bEnablePopUp)
return FALSE;
g_return_val_if_fail (message != NULL, FALSE);
- nullify_argument (cIconName);
- nullify_argument (cIconCommand);
- nullify_argument (cModuleName);
+ GList *pList = cd_dbus_find_matching_icons (cIconQuery);
- Icon *pIcon = cd_dbus_find_icon (cIconName, cIconCommand, cModuleName);
- if (pIcon != NULL)
+ Icon *pIcon;
+ CairoContainer *pContainer;
+ GList *ic;
+ for (ic = pList; ic != NULL; ic = ic->next)
{
- CairoContainer *pContainer = cairo_dock_search_container_from_icon (pIcon);
- if (pContainer != NULL)
- {
- cairo_dock_show_temporary_dialog_with_icon (message, pIcon, pContainer, 1000 * iDuration, "same icon");
- return TRUE;
- }
+ pIcon = ic->data;
+ pContainer = cairo_dock_search_container_from_icon (pIcon);
+ if (! CAIRO_DOCK_IS_DOCK (pContainer))
+ continue;
+ cairo_dock_show_temporary_dialog_with_icon (message, pIcon, pContainer, 1000 * iDuration, "same icon");
+ break; // only show 1 dialog.
}
- cairo_dock_show_general_message (message, 1000 * iDuration);
- return TRUE;
-}
-
-/*gboolean cd_dbus_get_appet_context (dbusMainObject *pDbusCallback, const gchar *cAppletName, GPtrArray **pContext, GError **error)
-{
- g_return_val_if_fail (cAppletName != NULL, FALSE);
-
- // get the applet's object on the bus.
-
-
- // fill the context.
- GPtrArray *ctx = g_ptr_array_sized_new (4);
- GValue *v;
-
- v = g_new0 (GValue, 1);
- g_value_init (v, G_TYPE_STRING);
- g_value_set_string (v, g_get_prgname());
- g_ptr_array_add (ctx, v);
-
- v = g_new0 (GValue, 1);
- g_value_init (v, G_TYPE_STRING);
- g_value_set_string (v, g_get_application_name());
- g_ptr_array_add (ctx, v);
-
- v = g_new0 (GValue, 1);
- g_value_init (v, G_TYPE_STRING);
- g_value_set_string (v, g_strdup_printf ("%s/%s/%s", ));
- g_ptr_array_add (ctx, v);
-
-
-
- return TRUE;
-}
-*/
\ No newline at end of file
+ if (ic == NULL) // empty list, or didn't find a valid icon.
+ cairo_dock_show_general_message (message, 1000 * iDuration);
+
+ g_list_free (pList);
+ return TRUE;
+}
=== modified file 'Dbus/src/interface-main-methods.h'
--- Dbus/src/interface-main-methods.h 2011-04-20 20:46:51 +0000
+++ Dbus/src/interface-main-methods.h 2011-08-09 20:07:46 +0000
@@ -25,43 +25,53 @@
#include "applet-struct.h"
-gboolean cd_dbus_main_show_desklet(dbusMainObject *dbusMainObject, gboolean *widgetLayer, GError **error);
-
gboolean cd_dbus_main_reboot(dbusMainObject *dbusMainObject, GError **error);
gboolean cd_dbus_main_quit (dbusMainObject *dbusMainObject, GError **error);
-gboolean cd_dbus_main_show_dock (dbusMainObject *dbusMainObject, gboolean bShow, GError **error);
+gboolean cd_dbus_main_show_dock (dbusMainObject *dbusMainObject, gint iVisibiliy, GError **error);
+
+gboolean cd_dbus_main_show_desklet (dbusMainObject *dbusMainObject, gboolean *widgetLayer, GError **error);
+
gboolean cd_dbus_main_reload_module (dbusMainObject *dbusMainObject, const gchar *cModuleName, GError **error);
gboolean cd_dbus_main_activate_module (dbusMainObject *dbusMainObject, const gchar *cModuleName, gboolean bActivate, GError **error);
+
+gboolean cd_dbus_main_get_icon_properties (dbusMainObject *pDbusCallback, gchar *cIconQuery, GPtrArray **pIconAttributes, GError **error);
+
+gboolean cd_dbus_main_get_container_properties (dbusMainObject *pDbusCallback, const gchar *cName, GPtrArray **pAttributes, GError **error);
+
+gboolean cd_dbus_main_get_module_properties (dbusMainObject *pDbusCallback, const gchar *cName, GPtrArray **pAttributes, GError **error);
+
+
+gboolean cd_dbus_main_add_launcher (dbusMainObject *pDbusCallback, const gchar *cDesktopFilePath, gdouble fOrder, const gchar *cDockName, gchar **cLauncherFile, GError **error);
+
+gboolean cd_dbus_main_add_temporary_icon (dbusMainObject *pDbusCallback, GHashTable *hIconAttributes, GError **error);
+
+gboolean cd_dbus_main_reload_icon (dbusMainObject *dbusMainObject, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_remove_icon (dbusMainObject *pDbusCallback, gchar *cIconQuery, GError **error);
+
+
+gboolean cd_dbus_main_set_quick_info (dbusMainObject *dbusMainObject, const gchar *cQuickInfo, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_set_label (dbusMainObject *dbusMainObject, const gchar *cLabel, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_set_icon (dbusMainObject *dbusMainObject, const gchar *cImage, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_set_emblem (dbusMainObject *pDbusCallback, const gchar *cImage, gint iPosition, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_animate (dbusMainObject *dbusMainObject, const gchar *cAnimation, gint iNbRounds, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_demands_attention (dbusMainObject *pDbusCallback, gboolean bStart, const gchar *cAnimation, gchar *cIconQuery, GError **error);
+
+gboolean cd_dbus_main_show_dialog (dbusMainObject *dbusMainObject, const gchar *message, gint iDuration, gchar *cIconQuery, GError **error);
+
+
gboolean cd_dbus_main_load_launcher_from_file (dbusMainObject *dbusMainObject, const gchar *cDesktopFile, GError **error);
gboolean cd_dbus_main_create_launcher_from_scratch (dbusMainObject *dbusMainObject, const gchar *cIconFile, const gchar *cLabel, const gchar *cCommand, const gchar *cParentDockName, GError **error);
-gboolean cd_dbus_main_reload_launcher (dbusMainObject *dbusMainObject, const gchar *cDesktopFile, GError **error);
-
-gboolean cd_dbus_main_remove_launcher (dbusMainObject *dbusMainObject, const gchar *cDesktopFile, GError **error);
-
-
-gboolean cd_dbus_main_set_quick_info (dbusMainObject *dbusMainObject, const gchar *cQuickInfo, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error);
-
-gboolean cd_dbus_main_set_label (dbusMainObject *dbusMainObject, const gchar *cLabel, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error);
-
-gboolean cd_dbus_main_set_icon (dbusMainObject *dbusMainObject, const gchar *cImage, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error);
-
-gboolean cd_dbus_main_set_emblem (dbusMainObject *pDbusCallback, const gchar *cImage, gint iPosition, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error);
-
-gboolean cd_dbus_main_animate (dbusMainObject *dbusMainObject, const gchar *cAnimation, gint iNbRounds, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error);
-
-gboolean cd_dbus_main_show_dialog (dbusMainObject *dbusMainObject, const gchar *message, gint iDuration, const gchar *cIconName, const gchar *cIconCommand, const gchar *cModuleName, GError **error);
-
-
-gboolean cd_dbus_main_register_new_module (dbusMainObject *pDbusCallback, const gchar *cModuleName, const gchar *cDescription, const gchar *cAuthor, const gchar *cVersion, gint iCategory, const gchar *cShareDataDir, GError **error);
-
-gboolean cd_dbus_main_unregister_module (dbusMainObject *dbusMainObject, const gchar *cModuleName, GError **error);
-
-
#endif
=== modified file 'Disks/data/Disks.conf.in'
--- Disks/data/Disks.conf.in 2011-04-20 20:46:51 +0000
+++ Disks/data/Disks.conf.in 2011-08-09 20:07:46 +0000
@@ -1,22 +1,19 @@
-#!en;@VERSION_DISKS@
+#@VERSION_DISKS@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the container it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = Disks
-
-#F[Display]
-frame_display =
-
-#S Image's name or path :
-#{Leave empty to use the default one.}
+name =
+ #v
+sep_display=
+
icon =
#j+[0;128] Desired icon size for this applet
@@ -44,9 +41,6 @@
#{Depending on your WindowManager, you may be able to resize this with ALT + middle-click or ALT + left-click.}
size = 96;96
-#F[Visibility;gtk-find]
-frame_visi =
-
#l[Normal;Keep above;Keep below;Keep on widget layer;Reserve space] Visibility:
#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)}
accessibility=0
@@ -82,9 +76,6 @@
#{Choose 'Custom decorations' to define your own decorations below.}
decorations = default
-#X[Custom decorations;gtk-orientation-portrait]
-frame_custom=
-
#v
sep_deco =
#S Background image:
@@ -98,8 +89,8 @@
#e[0;1] Foreground tansparency:
fg alpha = 1
-#X[Custom margins;gtk-leave-fullscreen]
-frame_offset=
+#v
+sep_offset=
#i[0;256] Left offset:
#{in pixels. Use this to adjust the left position of drawings.}
@@ -164,6 +155,12 @@
#{You need OpenGL for this option. Set it to 0 to disable it, 1 means the transition is continue.}
smooth = .33
+#F[Partitions monitored : Size;gtk-preferences]
+frame_parts =
+
+#U
+#{E.g. sda1, sdb5...}/
+partitions =
#F[Disks monitored : Speed;gtk-preferences]
frame_disks =
@@ -172,13 +169,6 @@
#{E.g. sda, sdb... Up to 5 values allowed}/
disks = sda
-#F[Partitions monitored : Size;gtk-preferences]
-frame_parts =
-
-#U
-#{E.g. sda1, sdb5...}/
-partitions =
-
#F[Preferences;gtk-preferences]
frame_prefs =
=== modified file 'Disks/src/applet-config.c'
--- Disks/src/applet-config.c 2011-04-20 20:46:51 +0000
+++ Disks/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -23,6 +23,7 @@
#include "applet-struct.h"
#include "applet-config.h"
+#include "applet-disks.h"
CD_APPLET_GET_CONFIG_BEGIN
@@ -49,6 +50,7 @@
///\_________________ Parameters
myConfig.cDisks = CD_CONFIG_GET_STRING_LIST ("Configuration", "disks", &myConfig.iNumberDisks);
+ myConfig.cParts = CD_CONFIG_GET_STRING_LIST ("Configuration", "partitions", &myConfig.iNumberParts);
myConfig.cSystemMonitorCommand = CD_CONFIG_GET_STRING ("Configuration", "sys monitor");
CD_APPLET_GET_CONFIG_END
@@ -72,27 +74,6 @@
g_timer_destroy (myData.pClock);
- reset_disks_list (myApplet);
+ cd_disks_reset_parts_list (myApplet);
+ cd_disks_reset_disks_list (myApplet);
CD_APPLET_RESET_DATA_END
-
-
-void reset_disks_list (CairoDockModuleInstance *myApplet)
-{
- if (myData.iNumberDisks > 0)
- {
- gsize i;
- CDDiskSpeedData *pSpeed;
- for (i = 0; i < myData.iNumberDisks; i++)
- {
- pSpeed = g_list_nth_data (myData.lDisks, i); /// maladroit
- if (pSpeed != NULL)
- {
- if (pSpeed->cName != NULL)
- g_free (pSpeed->cName);
- g_free (pSpeed);
- }
- }
- g_list_free (myData.lDisks);
- myData.lDisks = NULL;
- }
-}
=== modified file 'Disks/src/applet-config.h'
--- Disks/src/applet-config.h 2011-04-20 20:46:51 +0000
+++ Disks/src/applet-config.h 2011-08-09 20:07:46 +0000
@@ -26,6 +26,4 @@
CD_APPLET_CONFIG_H
-void reset_disks_list (CairoDockModuleInstance *myApplet);
-
#endif
=== modified file 'Disks/src/applet-disks.c'
--- Disks/src/applet-disks.c 2011-04-20 20:46:51 +0000
+++ Disks/src/applet-disks.c 2011-08-09 20:07:46 +0000
@@ -24,6 +24,8 @@
#include <glib.h>
#include <glib/gprintf.h>
+#include <sys/statvfs.h>
+
#include "applet-struct.h"
#include "applet-notifications.h"
#include "applet-disks.h"
@@ -88,17 +90,28 @@
void cd_disks_format_value_on_icon (CairoDataRenderer *pRenderer, int iNumValue, gchar *cFormatBuffer, int iBufferLength, CairoDockModuleInstance *myApplet)
{
- static gchar s_upRateFormatted[11];
- double fValue = cairo_data_renderer_get_normalized_current_value_with_latency (pRenderer, iNumValue);
- int i = iNumValue / 2;
- CDDiskSpeedData *pSpeed = g_list_nth_data (myData.lDisks, i);
- fValue *= (iNumValue == i * 2 ? pSpeed->uMaxReadRate : pSpeed->uMaxWriteRate);
-
- _cd_speed_formatRate (fValue, s_upRateFormatted, 11, FALSE);
- snprintf (cFormatBuffer, iBufferLength,
- "%s%s",
- cairo_data_renderer_can_write_values (pRenderer) ? (iNumValue == i * 2 ?"â" : "â") : "",
- s_upRateFormatted);
+ if (iNumValue < (int) myConfig.iNumberParts)
+ {
+ double *pSize;
+ pSize = g_list_nth_data (myData.lParts, iNumValue);
+ snprintf (cFormatBuffer, iBufferLength,
+ "%.f%%",
+ *pSize * 100);
+ }
+ else
+ {
+ static gchar s_upRateFormatted[11];
+ double fValue = cairo_data_renderer_get_normalized_current_value_with_latency (pRenderer, iNumValue);
+ int i = iNumValue / 2;
+ CDDiskSpeedData *pSpeed = g_list_nth_data (myData.lDisks, i);
+ fValue *= (iNumValue == i * 2 ? pSpeed->uMaxReadRate : pSpeed->uMaxWriteRate);
+
+ _cd_speed_formatRate (fValue, s_upRateFormatted, 11, FALSE);
+ snprintf (cFormatBuffer, iBufferLength,
+ "%s%s",
+ cairo_data_renderer_can_write_values (pRenderer) ? (iNumValue == i * 2 ?"â" : "â") : "",
+ s_upRateFormatted);
+ }
}
@@ -107,13 +120,33 @@
static gchar s_readRateFormatted[11], s_writeRateFormatted[11];
static double s_fValues[CD_DISKS_NB_MAX_VALUES];
//~ memset (s_fValues, 0, sizeof (s_fValues));
- CDDiskSpeedData *pSpeed;
GString *sLabel = g_string_new ("");
gsize i;
CD_APPLET_ENTER;
+ if (myConfig.iNumberParts > 0)
+ {
+ double *pSize;
+ for (i = 0; i < myConfig.iNumberParts; i++)
+ {
+ pSize = g_list_nth_data (myData.lParts, i);
+ s_fValues[i] = *pSize;
+ //cd_warning("Partition %d = %s : %.1f%%", i, myConfig.cParts[i], *pSize * 100);
+
+ if (myConfig.iInfoDisplay == CAIRO_DOCK_INFO_ON_LABEL)
+ {
+ if (i > 0)
+ g_string_append (sLabel, " - ");
+
+ g_string_append_printf (sLabel, "%s : %.1f%%", myConfig.cParts[i], *pSize * 100);
+
+ }
+ }
+ }
+
if (myData.iNumberDisks > 0)
{
+ CDDiskSpeedData *pSpeed;
for (i = 0; i < myData.iNumberDisks; i++)
{
pSpeed = g_list_nth_data (myData.lDisks, i);
@@ -144,14 +177,17 @@
}
}
-
+ }
+
+ if (myConfig.iNumberParts + myData.iNumberDisks > 0)
+ {
/// Display data
CD_APPLET_RENDER_NEW_DATA_ON_MY_ICON (s_fValues);
if (myConfig.iInfoDisplay == CAIRO_DOCK_INFO_ON_LABEL)
CD_APPLET_SET_NAME_FOR_MY_ICON (sLabel->str);
- g_string_free (sLabel, TRUE);
}
+ g_string_free (sLabel, TRUE);
CD_APPLET_LEAVE (TRUE);
}
@@ -183,82 +219,139 @@
double fTimeElapsed = g_timer_elapsed (myData.pClock, NULL);
g_timer_start (myData.pClock);
- if (!(myData.iNumberDisks > 0))
+ if (!(myConfig.iNumberParts + myData.iNumberDisks > 0))
{
cairo_dock_downgrade_task_frequency (myData.pPeriodicTask);
cd_warning("Disks : No disk defined");
}
- g_return_if_fail ((fTimeElapsed > 0.1) || (myData.iNumberDisks > 0));
+ g_return_if_fail ((fTimeElapsed > 0.1) || (myConfig.iNumberParts + myData.iNumberDisks > 0));
- char disk_name [16];
- //~ int disk_major;
-
- FILE* fd;
- buff[BUFFSIZE-1] = 0;
- fd = fopen (DISKS_SPEED_DATA_PIPE, "rb");
- if (!fd)
- {
- cairo_dock_downgrade_task_frequency (myData.pPeriodicTask);
- cd_warning("Disks : Your kernel doesn't support diskstat. (2.5.70 or above required)");
- }
- else
- {
- //~ cairo_dock_set_normal_task_frequency (myData.pPeriodicTask);
+ if (myConfig.iNumberParts > 0)
+ {
gsize i;
- CDDiskSpeedData* pSpeed;
- long long unsigned uReadBlocks, uWriteBlocks;
- gboolean bFound;
- for (;;)
- {
- if (!fgets(buff,BUFFSIZE-1,fd))
+ struct statvfs buffer;
+ int status;
+ double *pSize;
+ for (i = 0; i < myConfig.iNumberParts; i++)
+ {
+ pSize = g_list_nth_data (myData.lParts, i);
+ status = statvfs(myConfig.cParts[i], &buffer);
+ *pSize = 1. - (double) buffer.f_bfree / (double) buffer.f_blocks;
+ }
+ }
+
+ if (myData.iNumberDisks > 0)
+ {
+ char disk_name [16];
+ //~ int disk_major;
+
+ FILE* fd;
+ buff[BUFFSIZE-1] = 0;
+ fd = fopen (DISKS_SPEED_DATA_PIPE, "rb");
+ if (!fd)
+ {
+ cairo_dock_downgrade_task_frequency (myData.pPeriodicTask);
+ cd_warning("Disks : Your kernel doesn't support diskstat. (2.5.70 or above required)");
+ }
+ else
+ {
+ //~ cairo_dock_set_normal_task_frequency (myData.pPeriodicTask);
+ gsize i;
+ CDDiskSpeedData* pSpeed;
+ long long unsigned uReadBlocks, uWriteBlocks;
+ gboolean bFound;
+ for (;;)
{
- fclose(fd);
- break;
- }
-
- /// Using Linux iostat : http://www.kernel.org/doc/Documentation/iostats.txt
- /// gathering fields 3, 6 and 10
- sscanf(buff, " %*d %*d %15s %*u %*u %llu %*u %*u %*u %llu %*u %*u %*u %*u",
- //&disk_major, // field 1
- disk_name,
- &uReadBlocks,
- &uWriteBlocks
- );
-
- bFound = FALSE;
- if (strlen (disk_name) == 3)
- for (i = 0; i < myData.iNumberDisks; i++)
+ if (!fgets(buff,BUFFSIZE-1,fd))
{
- pSpeed = g_list_nth_data (myData.lDisks, i);
- if (strcmp (pSpeed->cName, disk_name) == 0)
+ fclose(fd);
+ break;
+ }
+
+ /// Using Linux iostat : http://www.kernel.org/doc/Documentation/iostats.txt
+ /// gathering fields 3, 6 and 10
+ sscanf(buff, " %*d %*d %15s %*u %*u %llu %*u %*u %*u %llu %*u %*u %*u %*u",
+ //&disk_major, // field 1
+ disk_name,
+ &uReadBlocks,
+ &uWriteBlocks
+ );
+
+ bFound = FALSE;
+ if (strlen (disk_name) == 3)
+ for (i = 0; i < myData.iNumberDisks; i++)
{
- if (pSpeed->bInitialized) // la 1ere iteration on ne peut pas calculer le debit.
+ pSpeed = g_list_nth_data (myData.lDisks, i);
+ if (strcmp (pSpeed->cName, disk_name) == 0)
{
- pSpeed->uReadSpeed = (uReadBlocks - pSpeed->uReadBlocks) * DISK_BLOCK_SIZE / fTimeElapsed;
- pSpeed->uWriteSpeed = (uWriteBlocks - pSpeed->uWriteBlocks) * DISK_BLOCK_SIZE / fTimeElapsed;
+ if (pSpeed->bInitialized) // la 1ere iteration on ne peut pas calculer le debit.
+ {
+ pSpeed->uReadSpeed = (uReadBlocks - pSpeed->uReadBlocks) * DISK_BLOCK_SIZE / fTimeElapsed;
+ pSpeed->uWriteSpeed = (uWriteBlocks - pSpeed->uWriteBlocks) * DISK_BLOCK_SIZE / fTimeElapsed;
+ }
+ else
+ pSpeed->bInitialized = TRUE;
+
+ pSpeed->uReadBlocks = uReadBlocks;
+ pSpeed->uWriteBlocks = uWriteBlocks;
+ //~ cd_warning("%s %u %u", pSpeed->cName, pSpeed->uReadSpeed, pSpeed->uWriteSpeed);
+
+ pSpeed->bAcquisitionOK = TRUE;
+ bFound = TRUE;
+ break;
}
- else
- pSpeed->bInitialized = TRUE;
-
- pSpeed->uReadBlocks = uReadBlocks;
- pSpeed->uWriteBlocks = uWriteBlocks;
- //~ cd_warning("%s %u %u", pSpeed->cName, pSpeed->uReadSpeed, pSpeed->uWriteSpeed);
-
- pSpeed->bAcquisitionOK = TRUE;
- bFound = TRUE;
- break;
}
- }
- // if (myConfig.bListAll && !bFound) // need monitor
- /// create new
- //~ cd_warning("creation");
- //~ pSpeed = g_new0 (CDDiskSpeedData, 1);
- //~ pSpeed->cName = g_strdup (disk_name);
- //~ myData.lDisks = g_list_append (myData.lDisks, pSpeed);
- // speed_set_data (pDisk, new_reads, new_writes);
- //~ }
+ // if (myConfig.bListAll && !bFound) // need monitor
+ /// create new
+ //~ cd_warning("creation");
+ //~ pSpeed = g_new0 (CDDiskSpeedData, 1);
+ //~ pSpeed->cName = g_strdup (disk_name);
+ //~ myData.lDisks = g_list_append (myData.lDisks, pSpeed);
+ // speed_set_data (pDisk, new_reads, new_writes);
+ //~ }
+ }
}
}
-}
+
+}
+
+#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28)
+void _reset_parts_list (double *pSize)
+{
+ g_free (pSize);
+}
+#endif
+
+void cd_disks_reset_parts_list (CairoDockModuleInstance *myApplet)
+{
+ if (myConfig.iNumberParts > 0)
+ {
+#if (GLIB_MAJOR_VERSION > 2) || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 28)
+ g_list_free_full (myData.lParts, g_free);
+#else
+ g_list_foreach (myData.lParts, (GFunc) _reset_parts_list, NULL);
+#endif
+ myData.lParts = NULL;
+ }
+}
+
+
+void _reset_one_disk (CDDiskSpeedData *pSpeed)
+{
+ if (pSpeed->cName != NULL)
+ g_free (pSpeed->cName);
+ g_free (pSpeed);
+}
+
+void cd_disks_reset_disks_list (CairoDockModuleInstance *myApplet)
+{
+ if (myData.iNumberDisks > 0)
+ {
+ g_list_foreach (myData.lDisks, (GFunc) _reset_one_disk, NULL);
+ g_list_free (myData.lDisks);
+ myData.lDisks = NULL;
+ }
+}
+
=== modified file 'Disks/src/applet-disks.h'
--- Disks/src/applet-disks.h 2011-04-20 20:46:51 +0000
+++ Disks/src/applet-disks.h 2011-08-09 20:07:46 +0000
@@ -26,4 +26,7 @@
void cd_disks_format_value_on_icon (CairoDataRenderer *pRenderer, int iNumValue, gchar *cFormatBuffer, int iBufferLength, CairoDockModuleInstance *myApplet);
gboolean cd_disks_update_from_data (CairoDockModuleInstance *myApplet);
+void cd_disks_reset_parts_list (CairoDockModuleInstance *myApplet);
+void cd_disks_reset_disks_list (CairoDockModuleInstance *myApplet);
+
#endif
=== modified file 'Disks/src/applet-init.c'
--- Disks/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ Disks/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -29,14 +29,31 @@
CD_APPLET_DEFINITION (N_("Disks"),
2, 0, 5,
CAIRO_DOCK_CATEGORY_APPLET_SYSTEM,
- N_("<b><i>monitors disks activity</i></b>.\n\n"
- "Initial release, a lot more need to be done :\n"
- " - All disks option\n"
- " - Pop up showing disks info to know what to add in the list\n"
- " - Free space\n"
- " - Find actions : left, middle click, drop and wheel\n"
- " - Fill menu with actions\n"
- " - Editable labels ?\n"
+ N_("<b><i>Monitors disks speed and space</i></b>.\n"
+ "\n"
+ "This applet show your disks informations. You can activate both options at once, but they're better separated in 2 or more instances of the applet.\n"
+ "Using both in the same applet can cause problems with the speed display not scaling down.\n"
+ "\n"
+ "<b>Disk space</b> : Show disk transfer rates. Up to 10 partitions\n"
+ " You need to configure the mount point of each monitored partition like / or /home\n"
+ " Better seen in a gauge, with 30 or 60s refresh rate and really short or no transition delay.\n"
+ "\n"
+ "<b>Disk speed</b> : Show disk transfer rates. Up to 5 disks\n"
+ " You need to configure the name of each monitored disk with his device name like sda or sdb\n"
+ " Better seen in a graph, with 2 or 3s refresh rate and no delay between transitions.\n"
+ "\n"
+ "Second release, a lot more need to be done :\n"
+ " <u>Free space :</u>\n"
+ " - Popup with detailed informations.\n"
+ " - Editable labels ?\n"
+ " <u>Speed :</u>\n"
+ " - All disks option.\n"
+ " - Pop up showing disks info to know what to add in the list.\n"
+ " - Editable labels ?\n"
+ " - Get real block size for disks\n"
+ " <u>Global</u>\n"
+ " - Find actions : left, middle click, drop and wheel.\n"
+ " - Fill menu with actions.\n"
),
"SQP");
@@ -80,6 +97,20 @@
if (pRenderAttr != NULL) // attributs generiques.
{
const gchar *labels[CD_DISKS_NB_MAX_VALUES] = {};
+
+ if (myConfig.iNumberParts > 0)
+ {
+ gsize i;
+ for (i = 0; i < myConfig.iNumberParts; i++)
+ {
+ /// Ca non plus je suppose :)
+ double *pSize;
+ pSize = g_new0 (double, 1);
+ myData.lParts = g_list_append (myData.lParts, pSize);
+ labels[i] = myConfig.cParts[i];
+ }
+ }
+
if (myData.iNumberDisks > 0)
{
gsize i;
@@ -97,8 +128,13 @@
pRenderAttr->cLabels = (gchar **)labels;
pRenderAttr->iLatencyTime = myConfig.iCheckInterval * 1000 * myConfig.fSmoothFactor;
- pRenderAttr->iNbValues = 2 * myData.iNumberDisks;
- pRenderAttr->bUpdateMinMax = TRUE;
+ pRenderAttr->iNbValues = myConfig.iNumberParts + 2 * myData.iNumberDisks;
+
+ /// Problem here : should be FALSE for size and TRUE for speed.
+ /// This version force FALSE when size is monitored, so applets using both monitors
+ /// could have some display problems on speed display.
+ pRenderAttr->bUpdateMinMax = !(myConfig.iNumberParts > 0);
+
if (myConfig.iInfoDisplay == CAIRO_DOCK_INFO_ON_ICON)
{
pRenderAttr->bWriteValues = TRUE;
@@ -155,7 +191,8 @@
CD_APPLET_ALLOW_NO_CLICKABLE_DESKLET;
}
- reset_disks_list (myApplet);
+ cd_disks_reset_parts_list (myApplet);
+ cd_disks_reset_disks_list (myApplet);
_set_data_renderer (myApplet, TRUE);
=== modified file 'Disks/src/applet-struct.h'
--- Disks/src/applet-struct.h 2011-04-20 20:46:51 +0000
+++ Disks/src/applet-struct.h 2011-08-09 20:07:46 +0000
@@ -66,6 +66,9 @@
gchar **cDisks;
gsize iNumberDisks;
+ gchar **cParts;
+ gsize iNumberParts;
+
gchar *cSystemMonitorCommand;
} ;
@@ -74,6 +77,7 @@
// shared memory
gsize iNumberDisks;
GList *lDisks;
+ GList *lParts;
// end of shared memory
CairoDockTask *pPeriodicTask;
=== modified file 'Doncky/data/Doncky.conf.in'
--- Doncky/data/Doncky.conf.in 2011-04-20 20:46:51 +0000
+++ Doncky/data/Doncky.conf.in 2011-08-09 20:07:46 +0000
@@ -1,19 +1,18 @@
-#!en;@VERSION_DONCKY@
+#@VERSION_DONCKY@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = Doncky
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
#S+ Image filename:
#{Leave empty to use the default one.}
=== modified file 'Folders/data/Folders.conf.in'
--- Folders/data/Folders.conf.in 2011-04-20 20:46:51 +0000
+++ Folders/data/Folders.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_FOLDERS@
+#@VERSION_FOLDERS@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -12,16 +12,15 @@
#s Name of the icon as it will appear in its caption in the dock:
#{Let empty to use the name of the folder.}
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
#Y[Use an image;1;1;Draw sub-dock's content as emblems;0;0;Draw sub-dock's content as stack;0;0;Draw sub-dock's content inside a box;0;0] How to render the icon :
view type = 3
#S+ Image filename:
#{Leave empty to use the default one.}
-image file =
+image file=folder
icon =
=== modified file 'Folders/src/applet-config.c'
--- Folders/src/applet-config.c 2011-04-20 20:46:51 +0000
+++ Folders/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -28,7 +28,7 @@
//\_________________ Here you have to get all your parameters from the conf file. Use the macros CD_CONFIG_GET_BOOLEAN, CD_CONFIG_GET_INTEGER, CD_CONFIG_GET_STRING, etc. myConfig has been reseted to 0 at this point. This function is called at the beginning of init and reload.
CD_APPLET_GET_CONFIG_BEGIN
myConfig.cDefaultTitle = CD_CONFIG_GET_STRING ("Icon", "name");
- myConfig.cImageFile = CD_CONFIG_GET_STRING ("Icon", "image file");
+ ///myConfig.cImageFile = CD_CONFIG_GET_STRING ("Icon", "image file");
myConfig.cDirPath = CD_CONFIG_GET_STRING ("Configuration", "dir path");
if (myConfig.cDirPath)
{
@@ -60,7 +60,7 @@
//\_________________ Here you have to free all ressources allocated for myConfig. This one will be reseted to 0 at the end of this function. This function is called right before you get the applet's config, and when your applet is stopped, in the end.
CD_APPLET_RESET_CONFIG_BEGIN
- g_free (myConfig.cImageFile);
+ ///g_free (myConfig.cImageFile);
g_free (myConfig.cDefaultTitle);
if (myConfig.cDirPath)
=== modified file 'Folders/src/applet-init.c'
--- Folders/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ Folders/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -37,6 +37,7 @@
"Middle-click on the main icon opens the folder.\n"),
"Fabounet")
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
cairo_dock_register_notification_on_object (&myContainersMgr,
NOTIFICATION_DROP_DATA,
(CairoDockNotificationFunc) cd_folders_on_drop_data,
@@ -85,7 +86,8 @@
myIcon->iSubdockViewType = myConfig.iSubdockViewType;
if (myDock && myConfig.iSubdockViewType == 0)
- CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cImageFile, MY_APPLET_ICON_FILE);
+ CD_APPLET_SET_DEFAULT_IMAGE_ON_MY_ICON_IF_NONE;
+ ///CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cImageFile, MY_APPLET_ICON_FILE);
//\_______________ On lance la tache recuperation des fichiers.
_set_comparaison_func (myApplet);
@@ -129,7 +131,8 @@
myIcon->iSubdockViewType = myConfig.iSubdockViewType;
if (myDock && myConfig.iSubdockViewType == 0)
- CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cImageFile, MY_APPLET_ICON_FILE);
+ CD_APPLET_SET_DEFAULT_IMAGE_ON_MY_ICON_IF_NONE;
+ ///CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cImageFile, MY_APPLET_ICON_FILE);
//\_______________ On charge les icones dans un sous-dock.
_set_comparaison_func (myApplet);
=== modified file 'Folders/src/applet-notifications.c'
--- Folders/src/applet-notifications.c 2011-04-20 20:46:51 +0000
+++ Folders/src/applet-notifications.c 2011-08-09 20:07:46 +0000
@@ -414,22 +414,56 @@
CD_APPLET_ADD_IN_MENU_WITH_STOCK_AND_DATA (D_("Create a new folder"), GTK_STOCK_NEW, _cd_folders_new_folder, CD_APPLET_MY_MENU, myApplet);
}
- GtkWidget *pSubMenu = CD_APPLET_ADD_SUB_MENU_WITH_IMAGE (D_("Sort by"), CD_APPLET_MY_MENU, GTK_STOCK_SORT_DESCENDING);
- pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By name"), _cd_folders_sort_by_name, pSubMenu, myApplet);
- pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By date"), _cd_folders_sort_by_date, pSubMenu, myApplet);
- pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By size"), _cd_folders_sort_by_size, pSubMenu, myApplet);
- pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By type"), _cd_folders_sort_by_type, pSubMenu, myApplet);
+ if (myConfig.bShowFiles)
+ {
+ GtkWidget *pSubMenu = CD_APPLET_ADD_SUB_MENU_WITH_IMAGE (D_("Sort by"), CD_APPLET_MY_MENU, GTK_STOCK_SORT_DESCENDING);
+ pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By name"), _cd_folders_sort_by_name, pSubMenu, myApplet);
+ pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By date"), _cd_folders_sort_by_date, pSubMenu, myApplet);
+ pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By size"), _cd_folders_sort_by_size, pSubMenu, myApplet);
+ pMenuItem = CD_APPLET_ADD_IN_MENU_WITH_DATA (D_("By type"), _cd_folders_sort_by_type, pSubMenu, myApplet);
+ }
if (CD_APPLET_CLICKED_ICON != NULL && CD_APPLET_CLICKED_ICON != myIcon)
CD_APPLET_LEAVE (CAIRO_DOCK_INTERCEPT_NOTIFICATION);
CD_APPLET_ON_BUILD_MENU_END
+static void _on_answer_import (int iClickedButton, GtkWidget *pInteractiveWidget, const gchar *cReceivedData, CairoDialog *pDialog)
+{
+ cd_debug ("%s (%d)", __func__, iClickedButton);
+ gboolean bImportFiles = (iClickedButton == 0 || iClickedButton == -1); // ok or Enter.
+
+ CairoDockModule *pModule = cairo_dock_find_module_from_name ("Folders");
+ g_return_if_fail (pModule != NULL);
+
+ gchar *cConfFilePath = cairo_dock_add_module_conf_file (pModule); // we want to update the conf file before we instanciate the applet, so don't use high-level functions.
+ cairo_dock_update_conf_file (cConfFilePath,
+ G_TYPE_STRING, "Configuration", "dir path", cReceivedData,
+ G_TYPE_BOOLEAN, "Configuration", "show files", bImportFiles,
+ G_TYPE_INVALID);
+
+ CairoDockModuleInstance *pNewInstance = cairo_dock_instanciate_module (pModule, cConfFilePath); // prend le 'cConfFilePath'.
+ if (pNewInstance != NULL && pNewInstance->pDock)
+ {
+ cairo_dock_update_dock_size (pNewInstance->pDock);
+ }
+
+ if (pNewInstance != NULL)
+ cairo_dock_show_temporary_dialog_with_icon (D_("The folder has been imported."),
+ pNewInstance->pIcon, pNewInstance->pContainer,
+ 5000,
+ MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE); // not "same icon" because the icon may not be loaded yet (eg. stack or emblem icon).
+
+ if (pModule->pInstancesList && pModule->pInstancesList->next == NULL) // module nouvellement active.
+ {
+ cairo_dock_write_active_modules ();
+ }
+}
gboolean cd_folders_on_drop_data (gpointer data, const gchar *cReceivedData, Icon *icon, double fOrder, CairoContainer *pContainer)
{
//g_print ("Folders received '%s'\n", cReceivedData);
- if (fOrder == CAIRO_DOCK_LAST_ORDER) // lachage sur une icone.
+ if (icon != NULL || fOrder == CAIRO_DOCK_LAST_ORDER) // drop on an icon or outside of icons.
return CAIRO_DOCK_LET_PASS_NOTIFICATION;
gchar *cPath = NULL;
@@ -441,30 +475,21 @@
if (g_file_test (cPath, G_FILE_TEST_IS_DIR)) // it's a folder, let's add a new instance of the applet that will handle it.
{
//g_print (" ajout d'un repertoire...\n");
- CairoDockModule *pModule = cairo_dock_find_module_from_name ("Folders");
- g_return_val_if_fail (pModule != NULL, CAIRO_DOCK_LET_PASS_NOTIFICATION);
-
- gchar *cConfFilePath = cairo_dock_add_module_conf_file (pModule); // we want to update the conf file before we instanciate the applet, so don't use high-level functions.
- cairo_dock_update_conf_file (cConfFilePath,
- G_TYPE_STRING, "Configuration", "dir path", cReceivedData,
- G_TYPE_INVALID);
-
- CairoDockModuleInstance *pNewInstance = cairo_dock_instanciate_module (pModule, cConfFilePath); // prend le 'cConfFilePath'.
- if (pNewInstance != NULL && pNewInstance->pDock)
- {
- cairo_dock_update_dock_size (pNewInstance->pDock);
- }
-
- if (pNewInstance != NULL)
- cairo_dock_show_temporary_dialog_with_icon (D_("The folder has been imported."),
- pNewInstance->pIcon, pNewInstance->pContainer,
- 5000,
- MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE); // not "same icon" because the icon may not be loaded yet (eg. stack or emblem icon).
-
- if (pModule->pInstancesList && pModule->pInstancesList->next == NULL) // module nouvellement active.
- {
- cairo_dock_write_active_modules ();
- }
+ if (icon == NULL)
+ {
+ if (CAIRO_DOCK_IS_DOCK (pContainer))
+ icon = cairo_dock_get_dialogless_icon_full (CAIRO_DOCK (pContainer));
+ else
+ icon = cairo_dock_get_dialogless_icon ();
+ }
+ cairo_dock_show_dialog_full (D_("Do you want to import the content of the folder too?"),
+ icon, pContainer,
+ 0,
+ MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE,
+ NULL,
+ (CairoDockActionOnAnswerFunc) _on_answer_import,
+ g_strdup (cReceivedData),
+ (GFreeFunc)g_free);
return CAIRO_DOCK_INTERCEPT_NOTIFICATION;
}
=== modified file 'Folders/src/applet-struct.h'
--- Folders/src/applet-struct.h 2011-04-20 20:46:51 +0000
+++ Folders/src/applet-struct.h 2011-08-09 20:07:46 +0000
@@ -25,7 +25,7 @@
//\___________ structure containing the applet's configuration parameters.
struct _AppletConfig {
- gchar *cImageFile;
+ ///gchar *cImageFile;
gchar *cDefaultTitle;
gchar *cDirPath;
gboolean bShowFiles;
=== modified file 'GMenu/data/CMakeLists.txt'
--- GMenu/data/CMakeLists.txt 2010-08-10 00:05:57 +0000
+++ GMenu/data/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -4,5 +4,6 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GMenu.conf
preview.jpg
icon.svg
- icon-recent.png
+ system-log-out.svg
+ system-shutdown.svg
DESTINATION ${gmenudatadir})
=== modified file 'GMenu/data/GMenu.conf.in'
--- GMenu/data/GMenu.conf.in 2011-04-20 20:46:51 +0000
+++ GMenu/data/GMenu.conf.in 2011-08-09 20:07:46 +0000
@@ -1,23 +1,22 @@
-#!en;@VERSION_GMENU@
+#@VERSION_GMENU@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = Applications Menu
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
#S+ Image filename:
#{Leave empty to use the default one.}
-icon =
+icon=start-here
#j+[0;128] Desired icon size for this applet
#{Set to 0 to use the default applet size}
@@ -131,3 +130,8 @@
#{in days. Set 0 if unsued.}
recent age = 0
+#F[Session management buttons]
+quit=
+
+#l+[None;Logout;Shutdown;Both] Show Logout and/or Shutdown :
+show quit = 0
=== added file 'GMenu/data/system-log-out.svg'
--- GMenu/data/system-log-out.svg 1970-01-01 00:00:00 +0000
+++ GMenu/data/system-log-out.svg 2011-08-09 20:07:46 +0000
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg3899" xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs id="defs3901">
+ <linearGradient id="linearGradient2910" y2="26.023" xlink:href="#linearGradient3341" gradientUnits="userSpaceOnUse" x2="-8.7979" gradientTransform="matrix(.62721 0 0 .58770 18.881 20.802)" y1="26.023" x1="3.8878"/>
+ <linearGradient id="linearGradient3341">
+ <stop id="stop3343" style="stop-color:#fff" offset="0"/>
+ <stop id="stop3345" style="stop-color:#fff;stop-opacity:0" offset="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient2913" y2="28.281" gradientUnits="userSpaceOnUse" x2="62.4" gradientTransform="matrix(-.55728 0 0 .55176 47.47 23.318)" y1="28.281" x1="3.8738">
+ <stop id="stop4170-6-1" style="stop-color:#ecb56c" offset="0"/>
+ <stop id="stop4172-1-1" style="stop-color:#e86225" offset=".74264"/>
+ <stop id="stop4174-5-5" style="stop-color:#b07c0b;stop-opacity:0" offset="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient2915" y2="26.598" gradientUnits="userSpaceOnUse" x2="41.817" gradientTransform="matrix(0 -1.0959 1.1068 0 -16.555 81.22)" y1="45.61" x1="41.817">
+ <stop id="stop4178-6-4" style="stop-color:#cc7032" offset="0"/>
+ <stop id="stop3223-8" style="stop-color:#bb2d13" offset=".73855"/>
+ <stop id="stop4180-1-1" style="stop-color:#a87300;stop-opacity:0" offset="1"/>
+ </linearGradient>
+ <radialGradient id="radialGradient2876" xlink:href="#linearGradient5060" gradientUnits="userSpaceOnUse" cy="41.5" cx="32" gradientTransform="matrix(1 0 0 .35714 0 26.679)" r="21"/>
+ <linearGradient id="linearGradient5060">
+ <stop id="stop5062" offset="0"/>
+ <stop id="stop5064" style="stop-opacity:0" offset="1"/>
+ </linearGradient>
+ <radialGradient id="radialGradient2878" xlink:href="#linearGradient6954" gradientUnits="userSpaceOnUse" cy="28.66" cx="25" gradientTransform="matrix(1.3125 0 0 .37327 -7.8125 20.302)" r="16"/>
+ <linearGradient id="linearGradient6954">
+ <stop id="stop6960" style="stop-color:#f5f5f5" offset="0"/>
+ <stop id="stop6962" style="stop-color:#d2d2d2" offset="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient2880" y2="45" xlink:href="#linearGradient3785" gradientUnits="userSpaceOnUse" x2="30" y1="25.085" x1="30"/>
+ <linearGradient id="linearGradient3785">
+ <stop id="stop3787" style="stop-color:#bdbdbd" offset="0"/>
+ <stop id="stop3789" style="stop-color:#8c8c8c" offset="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient2882" y2="83.5" xlink:href="#linearGradient3341" gradientUnits="userSpaceOnUse" x2="24.875" y1="53.869" x1="24.787"/>
+ <radialGradient id="radialGradient2884" xlink:href="#linearGradient6954" gradientUnits="userSpaceOnUse" cy="12.313" cx="26.376" gradientTransform="matrix(1.6402 -.13258 .12811 1.5849 -18.396 -5.2274)" r="8"/>
+ <linearGradient id="linearGradient2887" y2="44.679" xlink:href="#linearGradient3785" gradientUnits="userSpaceOnUse" x2="30" y1="5" x1="30"/>
+ <linearGradient id="linearGradient2889" y2="37.438" xlink:href="#linearGradient5060" gradientUnits="userSpaceOnUse" x2="17" y1="39" x1="22"/>
+ <linearGradient id="linearGradient2891" y2="38.6" xlink:href="#linearGradient5060" gradientUnits="userSpaceOnUse" x2="43" y1="39" x1="38"/>
+ <radialGradient id="radialGradient2893" xlink:href="#linearGradient5060" gradientUnits="userSpaceOnUse" cy="33.188" cx="30" gradientTransform="matrix(1.528 -7.0647e-7 2.1309e-7 .46087 -15.839 14.705)" r="4.6875"/>
+ <linearGradient id="linearGradient3887" y2="27.957" xlink:href="#linearGradient3341" gradientUnits="userSpaceOnUse" x2="30" y1="3.0411" x1="30"/>
+ </defs>
+ <g id="layer1">
+ <g id="g3912" transform="translate(-9,-2)">
+ <path id="path3823" style="opacity:.7;fill:url(#radialGradient2876)" d="m53 41.5a21 7.5 0 1 1 -42 0 21 7.5 0 1 1 42 0z" transform="matrix(.85714 0 0 .8 2.5714 7.8)"/>
+ <path id="path3766" style="stroke:url(#linearGradient2880);fill:url(#radialGradient2878)" d="m25.5 20.5c0.46022 2.1767 0.71709 3.8233 0.34375 6-2.911 2.415-10.355 3.5-10.344 6l-1 7.5c0 2.4853 6.9396 4.5 15.5 4.5s15.5-2.0147 15.5-4.5l-1-7.5c-0.012-2.14-7.5-3.5-10.375-6-0.246-2.02-0.05-3.98 0.375-6h-9z"/>
+ <path id="path3894" style="stroke:url(#linearGradient2882);fill:none" d="m22.531 61c0.30464 1.6903 0.51076 3.2715 0.1875 5.1562a1.0027 1.0027 0 0 1 -0.375 0.625c-1.7218 1.4285-4.3454 2.2543-6.5312 3.125-1.0929 0.43533-2.0659 0.86976-2.6875 1.2812-0.62165 0.41149-0.75057 0.6854-0.75 0.8125a1.0027 1.0027 0 0 1 0 0.125l-1 7.375c0 0.003-0.00011 0.02807 0 0.03125 0.0055 0.15834 0.15008 0.47302 0.78125 0.90625 0.64383 0.44193 1.6943 0.89312 3.0312 1.2812 2.675 0.776 6.487 1.281 10.689 1.281 4.2015 0 8.0137-0.50498 10.688-1.2812 1.3369-0.38813 2.3874-0.83932 3.0312-1.2812 0.63117-0.43323 0.77575-0.74791 0.78125-0.90625v-0.03125l-1-7.375a1.0027 1.0027 0 0 1 0 -0.125c0.000137 0.02464 0.01573 0.0028-0.09375-0.125-0.10948-0.12777-0.33441-0.29902-0.65625-0.5-0.64368-0.40196-1.6457-0.85747-2.75-1.3125-2.209-0.91-4.836-1.838-6.531-3.312a1.0027 1.0027 0 0 1 -0.344 -0.625c-0.212-1.743-0.057-3.441 0.219-5.125h-6.6875z" transform="translate(4.125 -39.5)"/>
+ <path id="path3764" style="stroke:url(#linearGradient2887);fill:url(#radialGradient2884)" d="m30 5.5c-4.1421 0-7.5 3.134-7.5 7 0.03246 1.4307 0.15457 3.1304 1 7 0.5 1.5 4.9598 5.5 5 6 0.96967 0.5 2.5 0.5 3.5 0 0-0.5 4-4.5 4.5-6 0.95138-4.0217 0.94897-5.5 1-7 0-3.866-3.3579-7-7.5-7z"/>
+ <path id="path3848" style="opacity:.3;fill:url(#linearGradient2889)" d="m21 43.2c-2.3623-1.9822-1.2359-6.3829-1-9.2-1 2-1 8-3 8 1.3626 0.45855 2.7496 0.96579 4 1.2z"/>
+ <path id="path3850" style="opacity:.3;fill:url(#linearGradient2891)" d="m39 43.2c2.35-1.7437 1.1567-6.4859 1-9.2 1 2 1 8 3 8-1.3626 0.45855-2.7496 0.96579-4 1.2z"/>
+ <path id="path3833" style="opacity:.2;fill:url(#radialGradient2893)" d="m25.312 27c0.6863 1.7448 2.5189 3 4.6875 3s4.0012-1.2552 4.6875-3h-9.375z"/>
+ <path id="path3906" style="opacity:.7;stroke:url(#linearGradient3887);fill:none" d="m30 6.5312c-3.6136 0-6.4504 2.679-6.4688 5.9375 0.000142 0.0063-0.000145 0.02499 0 0.03125 0.03183 1.3739 0.15643 2.9814 0.96875 6.7188 0.04059 0.09664 0.33476 0.58291 0.78125 1.125 0.46068 0.55932 1.0398 1.1939 1.625 1.8125 0.58521 0.61863 1.1773 1.2325 1.625 1.7188 0.22386 0.24314 0.40533 0.4577 0.5625 0.65625 0.01424 0.01799 0.01751 0.04473 0.03125 0.0625 0.57991 0.22794 1.5899 0.23044 2.2188 0 0.14029-0.2036 0.3001-0.44272 0.5-0.6875 0.3998-0.48956 0.91074-1.0678 1.4375-1.6875 0.52676-0.61971 1.0788-1.2822 1.5-1.8438 0.40031-0.53374 0.65761-0.97666 0.71875-1.125 0.0033-0.01388-0.0033-0.01744 0-0.03125 0.92253-3.9093 0.91824-5.2123 0.96875-6.7188 0-0.01056 0.000059-0.0207 0-0.03125-0.019-3.2587-2.855-5.9378-6.469-5.9378z" transform="matrix(1.0045 0 0 1.0034 -.13560 -.051359)"/>
+ </g>
+ <path id="path3801" style="stroke-linejoin:round;stroke:url(#linearGradient2915);stroke-linecap:round;fill:url(#linearGradient2913)" d="m33.575 24.5 12.875 11.5-12.875 11.5v-6h-20.875v-11h20.875v-6z"/>
+ <path id="path3803" style="opacity:0.354;stroke:url(#linearGradient2910);fill:none" d="m34.575 26.867 10.336 9.133l-10.336 9.2424v-4.7424h-20.839l-0.06052-9h20.9v-4.6327z"/>
+ </g>
+</svg>
=== added file 'GMenu/data/system-shutdown.svg'
--- GMenu/data/system-shutdown.svg 1970-01-01 00:00:00 +0000
+++ GMenu/data/system-shutdown.svg 2011-08-09 20:07:46 +0000
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg id="svg3334" xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs id="defs3336">
+ <linearGradient id="linearGradient2877" y2="39.999" gradientUnits="userSpaceOnUse" x2="25.058" y1="47.028" x1="25.058">
+ <stop id="stop3704" style="stop-opacity:0" offset="0"/>
+ <stop id="stop3710" offset=".5"/>
+ <stop id="stop3706" style="stop-opacity:0" offset="1"/>
+ </linearGradient>
+ <radialGradient id="radialGradient2875" xlink:href="#linearGradient3688" gradientUnits="userSpaceOnUse" cy="43.5" cx="4.993" gradientTransform="matrix(2.0038 0 0 1.4 -20.012 -104.4)" r="2.5"/>
+ <linearGradient id="linearGradient3688">
+ <stop id="stop3690" offset="0"/>
+ <stop id="stop3692" style="stop-opacity:0" offset="1"/>
+ </linearGradient>
+ <radialGradient id="radialGradient2873" xlink:href="#linearGradient3688" gradientUnits="userSpaceOnUse" cy="43.5" cx="4.993" gradientTransform="matrix(2.0038 0 0 1.4 27.988 -17.4)" r="2.5"/>
+ <linearGradient id="linearGradient2865" y2="3.899" gradientUnits="userSpaceOnUse" x2="24" gradientTransform="translate(0 .96744)" y1="44" x1="24">
+ <stop id="stop2492" style="stop-color:#791235" offset="0"/>
+ <stop id="stop2494" style="stop-color:#dd3b27" offset="1"/>
+ </linearGradient>
+ <radialGradient id="radialGradient2863" gradientUnits="userSpaceOnUse" cy="10.424" cx="12.011" gradientTransform="matrix(5.6342e-8 1.6801 -2.4235 1.0381e-8 44.478 -5.9267)" r="20">
+ <stop id="stop3244" style="stop-color:#f89b7e" offset="0"/>
+ <stop id="stop3246" style="stop-color:#e35d4f" offset=".26238"/>
+ <stop id="stop3248" style="stop-color:#c6262e" offset=".66094"/>
+ <stop id="stop3250" style="stop-color:#690b2c" offset="1"/>
+ </radialGradient>
+ <linearGradient id="linearGradient2855" y2="43" gradientUnits="userSpaceOnUse" x2="24" gradientTransform="translate(0 .96744)" y1="5" x1="24">
+ <stop id="stop3310-1-4" style="stop-color:#fff" offset="0"/>
+ <stop id="stop3312-5-3" style="stop-color:#fff;stop-opacity:0" offset="1"/>
+ </linearGradient>
+ </defs>
+ <g id="layer1">
+ <g id="g2036" transform="matrix(1.1 0 0 .44444 -2.4 25.111)">
+ <g id="g3712" style="opacity:.4" transform="matrix(1.0526 0 0 1.2857 -1.2632 -13.429)">
+ <rect id="rect2801" style="fill:url(#radialGradient2873)" height="7" width="5" y="40" x="38"/>
+ <rect id="rect3696" style="fill:url(#radialGradient2875)" transform="scale(-1)" height="7" width="5" y="-47" x="-10"/>
+ <rect id="rect3700" style="fill:url(#linearGradient2877)" height="7" width="28" y="40" x="10"/>
+ </g>
+ </g>
+ <rect id="rect5505" style="stroke-linejoin:round;stroke:url(#linearGradient2865);stroke-linecap:round;fill:url(#radialGradient2863)" rx="2.2322" ry="2.2322" height="39" width="39" y="5.4674" x="4.5"/>
+ <rect id="rect6741" style="opacity:.4;stroke-linejoin:round;stroke:url(#linearGradient2855);stroke-linecap:round;fill:none" rx="1.3652" ry="1.3652" height="37" width="37" y="6.4674" x="5.5"/>
+ <g id="g2558" style="opacity:.4;stroke:#000;stroke-linecap:round;stroke-miterlimit:0;stroke-width:2.2099;fill:none" transform="matrix(1.305 0 0 1.3227 -6.6686 -4.8529)">
+ <path id="path2560" style="stroke:#000;stroke-linecap:round;stroke-miterlimit:0;stroke-width:2.2099;fill:none" d="m19.282 15.806c-6.9924 3.8128-3.8304 14.739 4.1635 14.739 7.9107 0 11.456-10.358 4.1635-14.739"/>
+ <path id="path2562" style="stroke:#000;stroke-linecap:round;stroke-miterlimit:0;stroke-width:2.2099;fill:none" d="m23.5 20.496v-7.4131"/>
+ </g>
+ <g id="g2419" style="stroke:#fff;stroke-linecap:round;stroke-miterlimit:0;stroke-width:2.2099;fill:none" transform="matrix(1.305 0 0 1.3227 -6.6686 -3.8529)">
+ <path id="path3339" style="stroke:#fff;stroke-linecap:round;stroke-miterlimit:0;stroke-width:2.2099;fill:none" d="m19.282 15.806c-6.9924 3.8128-3.8304 14.739 4.1635 14.739 7.9107 0 11.456-10.358 4.1635-14.739"/>
+ <path id="path3341" style="stroke:#fff;stroke-linecap:round;stroke-miterlimit:0;stroke-width:2.2099;fill:none" d="m23.5 20.496v-7.4131"/>
+ </g>
+ </g>
+</svg>
=== modified file 'GMenu/src/applet-config.c'
--- GMenu/src/applet-config.c 2009-10-05 19:27:17 +0000
+++ GMenu/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -40,6 +40,7 @@
g_free (tmp);
}
myConfig.iRecentAge = CD_CONFIG_GET_INTEGER ("Configuration", "recent age");
+ myConfig.iShowQuit = CD_CONFIG_GET_INTEGER ("Configuration", "show quit");
CD_APPLET_GET_CONFIG_END
=== modified file 'GMenu/src/applet-init.c'
--- GMenu/src/applet-init.c 2010-08-10 00:05:57 +0000
+++ GMenu/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -54,6 +54,7 @@
cd_menu_init_recent (myApplet);
}
myData.pMenu = create_main_menu (myApplet);
+ myData.iShowQuit = myConfig.iShowQuit;
CD_APPLET_REGISTER_FOR_CLICK_EVENT;
CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT;
@@ -96,11 +97,14 @@
// on reset ce qu'il faut.
cd_menu_reset_recent (myApplet); // le fitre peut avoir change.
if (myData.pMenu != NULL &&
- (myConfig.bHasIcons != myData.bIconsLoaded) || (myConfig.bShowRecent && myData.pRecentMenuItem == NULL))
+ (myConfig.bHasIcons != myData.bIconsLoaded) ||
+ (myConfig.bShowRecent && myData.pRecentMenuItem == NULL) ||
+ (myConfig.iShowQuit != myData.iShowQuit))
{
gtk_widget_destroy (myData.pMenu); // detruit le sous-menu des recent items ?
myData.pMenu = NULL;
myData.pRecentMenuItem = NULL;
+ myData.iShowQuit = myConfig.iShowQuit;
}
// on reconstruit ce qu'il faut.
=== modified file 'GMenu/src/applet-menu-callbacks.c'
--- GMenu/src/applet-menu-callbacks.c 2009-10-05 19:27:17 +0000
+++ GMenu/src/applet-menu-callbacks.c 2011-08-09 20:07:46 +0000
@@ -171,35 +171,66 @@
}
-void panel_desktop_menu_item_append_menu (GtkWidget *menu,
- gpointer data)
-{
- //g_print ("%s ()\n", __func__);
- CairoDockModuleInstance *myApplet;
- gboolean add_separator;
- GList *children;
- GList *last;
-
- myApplet = (CairoDockModuleInstance *) data;
-
- add_separator = FALSE;
- children = gtk_container_get_children (GTK_CONTAINER (menu));
- last = g_list_last (children);
-
- ///if (last != NULL)
- /// add_separator = !GTK_IS_SEPARATOR (GTK_WIDGET (last->data));
-
- g_list_free (children);
-
- if (add_separator)
- add_menu_separator (menu);
-
- //panel_menu_items_append_from_desktop (menu, "yelp.desktop", NULL);
- //panel_menu_items_append_from_desktop (menu, "gnome-about.desktop", NULL);
-
- //if (parent->priv->append_lock_logout)
- // panel_menu_items_append_lock_logout (menu);
-}
+// == cairo_dock_add_in_menu_with_stock_and_data with icon size 24
+GtkWidget *cd_menu_append_one_item_to_menu (const gchar *cLabel, const gchar *gtkStock, GFunc pFunction, GtkWidget *pMenu, gpointer pData)
+{
+ GtkWidget *pMenuItem = gtk_image_menu_item_new_with_label (cLabel);
+ if (gtkStock)
+ {
+ GtkWidget *image = NULL;
+ if (*gtkStock == '/')
+ {
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size (gtkStock, 24, 24, NULL);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
+ }
+ else
+ {
+ const gchar *cIconPath = cairo_dock_search_icon_s_path (gtkStock);
+ if (cIconPath == NULL)
+ {
+ cIconPath = g_strconcat (MY_APPLET_SHARE_DATA_DIR"/", gtkStock, NULL);
+ cIconPath = g_strconcat (cIconPath, ".svg", NULL);
+ }
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size (cIconPath, 24, 24, NULL);
+ image = gtk_image_new_from_pixbuf (pixbuf);
+ g_object_unref (pixbuf);
+ }
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE);
+#endif
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), image);
+ }
+ gtk_menu_shell_append (GTK_MENU_SHELL (pMenu), pMenuItem);
+ if (pFunction)
+ g_signal_connect (G_OBJECT (pMenuItem), "activate", G_CALLBACK (pFunction), pData);
+ return pMenuItem;
+}
+
+void cd_menu_append_poweroff_to_menu (GtkWidget *menu, CairoDockModuleInstance *myApplet)
+{
+ add_menu_separator (menu);
+
+ if (myConfig.iShowQuit == CD_GMENU_SHOW_QUIT_LOGOUT || myConfig.iShowQuit == CD_GMENU_SHOW_QUIT_BOTH)
+ cd_menu_append_one_item_to_menu (D_("Logout"), "system-log-out", (GFunc) cairo_dock_fm_logout, menu, NULL);
+
+ if (myConfig.iShowQuit == CD_GMENU_SHOW_QUIT_SHUTDOWN || myConfig.iShowQuit == CD_GMENU_SHOW_QUIT_BOTH)
+ cd_menu_append_one_item_to_menu (D_("Shutdown"), "system-shutdown", (GFunc) cairo_dock_fm_shutdown, menu, NULL);
+}
+
+
+
+void panel_desktop_menu_item_append_menu (GtkWidget *menu, gpointer data)
+{
+ CairoDockModuleInstance *myApplet = (CairoDockModuleInstance *) data;
+
+ //panel_menu_items_append_from_desktop (menu, "yelp.desktop", NULL);
+ //panel_menu_items_append_from_desktop (menu, "gnome-about.desktop", NULL);
+
+ if (myConfig.iShowQuit != CD_GMENU_SHOW_QUIT_NONE)
+ cd_menu_append_poweroff_to_menu (menu, myApplet);
+}
+
void main_menu_append (GtkWidget *main_menu,
gpointer data)
{
@@ -242,6 +273,8 @@
{
cd_menu_append_recent_to_menu (main_menu, myApplet);
}
+
+
/*item = panel_place_menu_item_new (TRUE);
panel_place_menu_item_set_panel (item, panel);
gtk_menu_shell_append (GTK_MENU_SHELL (main_menu), item);
=== modified file 'GMenu/src/applet-menu.c'
--- GMenu/src/applet-menu.c 2010-09-07 02:38:17 +0000
+++ GMenu/src/applet-menu.c 2011-08-09 20:07:46 +0000
@@ -273,8 +273,14 @@
(GDestroyNotify) g_object_unref);
if (myConfig.bHasIcons)
+ {
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (
+ GTK_IMAGE_MENU_ITEM (image_menu_item), TRUE);
+#endif
gtk_image_menu_item_set_image (
GTK_IMAGE_MENU_ITEM (image_menu_item), image);
+ }
g_signal_connect_data (image, "map",
G_CALLBACK (image_menu_shown), icon,
@@ -514,8 +520,14 @@
(GDestroyNotify) g_object_unref);
gtk_widget_show (image);
if (myConfig.bHasIcons)
+ {
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (
+ GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
+#endif
gtk_image_menu_item_set_image (
GTK_IMAGE_MENU_ITEM (menuitem), image);
+ }
} else if (icon_size != GTK_ICON_SIZE_INVALID)
g_signal_connect (menuitem, "size_request",
G_CALLBACK (image_menuitem_size_request),
=== modified file 'GMenu/src/applet-recent.c'
--- GMenu/src/applet-recent.c 2010-08-10 00:05:57 +0000
+++ GMenu/src/applet-recent.c 2011-08-09 20:07:46 +0000
@@ -54,10 +54,17 @@
gtk_menu_shell_append (GTK_MENU_SHELL (top_menu), pSeparator);
GtkWidget *pMenuItem = gtk_image_menu_item_new_with_label (D_("Recent Documents"));
- const gchar *cIconPath = MY_APPLET_SHARE_DATA_DIR"/icon-recent.png";
+
+ const gchar *cIconPath = cairo_dock_search_icon_s_path ("document-open-recent");
+ if (cIconPath == NULL)
+ cIconPath = MY_APPLET_SHARE_DATA_DIR"/icon-recent.png";
+
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size (cIconPath, 24, 24, NULL);
GtkWidget *image = gtk_image_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (pMenuItem), TRUE);
+#endif
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (pMenuItem), image);
gtk_menu_shell_append (GTK_MENU_SHELL (top_menu), pMenuItem);
gtk_widget_show_all (pMenuItem);
=== modified file 'GMenu/src/applet-struct.h'
--- GMenu/src/applet-struct.h 2009-08-26 21:07:39 +0000
+++ GMenu/src/applet-struct.h 2011-08-09 20:07:46 +0000
@@ -45,6 +45,14 @@
GtkIconSize icon_size;
} IconToAdd;
+typedef enum _CDGMenuShowQuit {
+ CD_GMENU_SHOW_QUIT_NONE=0,
+ CD_GMENU_SHOW_QUIT_LOGOUT,
+ CD_GMENU_SHOW_QUIT_SHUTDOWN,
+ CD_GMENU_SHOW_QUIT_BOTH,
+ CD_GMENU_NB_SHOW_QUIT
+ } CDGMenuShowQuit;
+
//\___________ structure containing the applet's configuration parameters.
struct _AppletConfig {
@@ -55,6 +63,7 @@
gchar *cConfigureMenuCommand;
gchar *cRecentRootDirFilter;
gint iRecentAge;
+ CDGMenuShowQuit iShowQuit;
} ;
//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
@@ -62,6 +71,7 @@
GtkWidget *pMenu;
CairoDialog *pQuickLaunchDialog;
gboolean bIconsLoaded;
+ CDGMenuShowQuit iShowQuit;
guint iSidFakeMenuIdle;
guint iSidCreateMenuIdle;
guint iSidTreeChangeIdle;
=== added directory 'Impulse'
=== added file 'Impulse/CMakeLists.txt'
--- Impulse/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Impulse/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,2 @@
+add_subdirectory(src)
+add_subdirectory(data)
=== added directory 'Impulse/data'
=== added file 'Impulse/data/CMakeLists.txt'
--- Impulse/data/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Impulse/data/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,11 @@
+
+########### install files ###############
+
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Impulse.conf
+ preview.jpg
+ icon.png
+ impulse-error.svg
+ impulse-running.svg
+ impulse-stopped.svg
+ DESTINATION ${impulsedatadir})
+
=== added file 'Impulse/data/Impulse.conf.in'
--- Impulse/data/Impulse.conf.in 1970-01-01 00:00:00 +0000
+++ Impulse/data/Impulse.conf.in 2011-08-09 20:07:46 +0000
@@ -0,0 +1,158 @@
+#@VERSION_IMPULSE@
+
+#[gtk-about]
+[Icon]
+
+#F[Icon]
+frame_maininfo=
+
+#d Name of the dock it belongs to:
+dock name =
+
+#v
+sep_display=
+
+#S+ Image filename:
+#{Leave empty to use the default one.}
+icon =
+
+#j[0;128] Desired icon size for this applet
+#{Set to 0 to use the default applet size}
+icon size = 0;0
+
+order=
+
+#F[Applet's Handbook]
+frame_hand=
+#A
+handbook=Impulse
+
+
+#[gtk-convert]
+[Desklet]
+
+#X[Position]
+frame_pos =
+
+#b Lock position?
+#{If locked, the desklet cannot be moved by simply dragging it with the left mouse button. It can still be moved with ALT + left-click.}
+locked = false
+
+#j+[24;512] Desklet dimensions (width x height):
+#{Depending on your WindowManager, you may be able to resize this with ALT + middle-click or ALT + left-click.}
+size = 96;96
+
+#i[-2048;2048] Desklet position (x, y):
+#{Depending on your WindowManager, you may be able to move this with ALT + left-click.. Negative values are counted from the right/bottom of the screen}
+x position=0
+#i[-2048;2048] ...
+y position=0
+
+#I[-180;180] Rotation:
+#{You can quickly rotate the desklet with the mouse, by dragging the little buttons on its left and top sides.}
+rotation = 0
+
+#X[Visibility]
+frame_visi =
+
+#b Is detached from the dock
+initially detached=false
+#l[Normal;Keep above;Keep below;Keep on widget layer;Reserve space] Visibility:
+#{for CompizFusion's "widget layer", set behaviour in Compiz to: (class=Cairo-dock & type=utility)}
+accessibility=0
+#b Should be visible on all desktops?
+sticky=true
+
+
+#F[Decorations;gtk-orientation-portrait]
+frame_deco=
+
+#o+ Choose a decoration theme for this desklet:
+#{Choose 'Custom decorations' to define your own decorations below.}
+decorations = default
+
+#v
+sep_deco =
+
+#S+ Background image:
+#{Image to be displayed below drawings, e.g. a frame. Leave empty for no image.}
+bg desklet =
+#e+[0;1] Background transparency:
+bg alpha = 1
+#i+[0;256] Left offset:
+#{in pixels. Use this to adjust the left position of drawings.}
+left offset = 0
+#i+[0;256] Top offset:
+#{in pixels. Use this to adjust the top position of drawings.}
+top offset = 0
+#i+[0;256] Right offset:
+#{in pixels. Use this to adjust the right position of drawings.}
+right offset = 0
+#i+[0;256] Bottom offset:
+#{in pixels. Use this to adjust the bottom position of drawings.}
+bottom offset = 0
+#S+ Foreground image:
+#{Image to be displayed above the drawings, e.g. a reflection. Leave empty for no image.}
+fg desklet =
+#e+[0;1] Foreground tansparency:
+fg alpha = 1
+
+
+#[gtk-preferences]
+[Configuration]
+
+#F[Display;gtk-dialog-info]
+frame_disp =
+
+#a Animation of the icons:
+animation=bounce
+
+#b Stop animations sooner?
+#{Do we have to stop the animation on a icon which doesn't have to be animated each refresh?}
+stop animations = false
+
+#F[Control;gtk-execute]
+frame_ctrl =
+
+#e[0;1;More;Less] Sensitivity of the animation:
+#{It's the sensitivity in order to know if the animation is played or not.}
+sensitivity = 0.25
+
+#I[10;3000;Less;More] Time between two animations:
+#{in ms.}
+refresh = 250
+
+#F[Action at Startup;gtk-preferences]
+frame_info=
+
+#B- Launch automatically at startup?
+startup = false
+
+#b- Hide the icon?
+free = false
+
+#X[Style;gtk-color-picker]
+frame_style =
+
+#S+ Image when the applet is active:
+#{Leave empty to use the default one.}
+icon on =
+
+#S+ Image when the applet is inactive:
+#{Leave empty to use the default one.}
+icon off =
+
+#S+ 'Broken' icon image name:
+#{Leave empty to use the default one.}
+icon error =
+
+#X[PulseAudio;gtk-preferences]
+frame_pulse=
+
+#i[0;10] Index of the source:
+#{0 in most cases}
+source_index = 0
+
+nb animations=1
+
+dock name = _MainDock_
=== added file 'Impulse/data/icon.png'
Binary files Impulse/data/icon.png 1970-01-01 00:00:00 +0000 and Impulse/data/icon.png 2011-08-09 20:07:46 +0000 differ
=== added file 'Impulse/data/impulse-error.svg'
--- Impulse/data/impulse-error.svg 1970-01-01 00:00:00 +0000
+++ Impulse/data/impulse-error.svg 2011-08-09 20:07:46 +0000
@@ -0,0 +1,713 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="48"
+ height="48"
+ id="svg2579"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="impulse-error.svg">
+ <metadata
+ id="metadata66">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="640"
+ inkscape:window-height="480"
+ id="namedview64"
+ showgrid="false"
+ inkscape:zoom="4.3457604"
+ inkscape:cx="5.4093835"
+ inkscape:cy="34.221018"
+ inkscape:window-x="38"
+ inkscape:window-y="29"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2579" />
+ <defs
+ id="defs2581">
+ <linearGradient
+ id="linearGradient6117">
+ <stop
+ id="stop6119"
+ style="stop-color:black;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6121"
+ style="stop-color:black;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6091">
+ <stop
+ id="stop6093"
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6095"
+ style="stop-color:#81837e;stop-opacity:0.98648649"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6105">
+ <stop
+ id="stop6107"
+ style="stop-color:white;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop6113"
+ style="stop-color:white;stop-opacity:1"
+ offset="0.45209709" />
+ <stop
+ id="stop6109"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6041">
+ <stop
+ id="stop6043"
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6045"
+ style="stop-color:#2e3436;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6296">
+ <stop
+ id="stop6298"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6300"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6304">
+ <stop
+ id="stop6306"
+ style="stop-color:#eeeeec;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6308"
+ style="stop-color:#80827d;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6117"
+ id="radialGradient3062"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0959323,0,0,0.8089025,-8.2651612,11.473831)"
+ cx="26.927441"
+ cy="25.766438"
+ fx="26.927441"
+ fy="25.766438"
+ r="19.161766" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6091"
+ id="linearGradient3064"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5479662,0,0,0.3392172,6.4901656,29.075948)"
+ x1="10.602306"
+ y1="35.894798"
+ x2="47.001671"
+ y2="35.690231" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6105"
+ id="linearGradient3066"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.7545076,-0.1836338)"
+ x1="15.551565"
+ y1="41"
+ x2="23.73423"
+ y2="41" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6041"
+ id="radialGradient3068"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.94560281,0,0,0.8204423,-3.8927993,3.5285007)"
+ cx="29.922518"
+ cy="32.704834"
+ fx="29.922518"
+ fy="32.704834"
+ r="19.736389" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6296"
+ id="linearGradient3070"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.7545076,-0.1836338)"
+ x1="34.825703"
+ y1="42.345951"
+ x2="28.763092"
+ y2="32.737347" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6304"
+ id="radialGradient3072"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4228001,0,0,0.3113668,9.6432324,19.361684)"
+ cx="17.831682"
+ cy="18.914896"
+ fx="17.831682"
+ fy="18.914896"
+ r="19.736389" />
+ <linearGradient
+ gradientTransform="matrix(0.5384199,0,0,0.5384199,-0.922077,-1.4604985)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3781"
+ id="linearGradient2494"
+ y2="45.074459"
+ x2="24.481066"
+ y1="5.0808945"
+ x1="24.481066" />
+ <linearGradient
+ id="linearGradient3781">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop3783" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0"
+ id="stop3785" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(1.0862728,0,0,1.0862481,-55.56661,15.813638)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient4873"
+ id="linearGradient2497"
+ y2="5.4675598"
+ x2="63.397362"
+ y1="-12.489107"
+ x1="63.397362" />
+ <linearGradient
+ id="linearGradient4873">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop4875" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0"
+ id="stop4877" />
+ </linearGradient>
+ <radialGradient
+ gradientTransform="matrix(0,1.2316137,-1.6257082,0,18.486581,-28.720783)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3242"
+ id="radialGradient2500"
+ fy="3.9900031"
+ fx="23.895569"
+ r="20.397499"
+ cy="3.9900031"
+ cx="23.895569" />
+ <linearGradient
+ id="linearGradient3242">
+ <stop
+ offset="0"
+ style="stop-color:#f8b17e;stop-opacity:1"
+ id="stop3244" />
+ <stop
+ offset="0.26238"
+ style="stop-color:#e35d4f;stop-opacity:1"
+ id="stop3246" />
+ <stop
+ offset="0.66093999"
+ style="stop-color:#c6262e;stop-opacity:1"
+ id="stop3248" />
+ <stop
+ offset="1"
+ style="stop-color:#690b54;stop-opacity:1"
+ id="stop3250" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(0.5160413,0,0,0.5160413,-0.384991,-0.3849911)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient2490"
+ id="linearGradient2502"
+ y2="3.0816143"
+ x2="18.379412"
+ y1="44.980297"
+ x1="18.379412" />
+ <linearGradient
+ id="linearGradient2490">
+ <stop
+ offset="0"
+ style="stop-color:#791235;stop-opacity:1"
+ id="stop2492" />
+ <stop
+ offset="1"
+ style="stop-color:#dd3b27;stop-opacity:1"
+ id="stop2494" />
+ </linearGradient>
+ <radialGradient
+ gradientTransform="matrix(1.1294118,0,0,0.2823525,-58.729414,19.694118)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient8838"
+ id="radialGradient2478"
+ fy="4.625"
+ fx="62.625"
+ r="10.625"
+ cy="4.625"
+ cx="62.625" />
+ <linearGradient
+ id="linearGradient8838">
+ <stop
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1"
+ id="stop8840" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop8842" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3781"
+ id="linearGradient3098"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5384199,0,0,0.5384199,43.376229,-4.8486132)"
+ x1="24.481066"
+ y1="5.0808945"
+ x2="24.481066"
+ y2="45.074459" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4873"
+ id="linearGradient3101"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0862728,0,0,1.0862481,-11.268304,12.425523)"
+ x1="63.397362"
+ y1="-12.489107"
+ x2="63.397362"
+ y2="5.4675598" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3242"
+ id="radialGradient3104"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,1.2316137,-1.6257082,0,62.784887,-32.108898)"
+ cx="23.895569"
+ cy="3.9900031"
+ fx="23.895569"
+ fy="3.9900031"
+ r="20.397499" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2490"
+ id="linearGradient3106"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5160413,0,0,0.5160413,43.913315,-3.7731058)"
+ x1="18.379412"
+ y1="44.980297"
+ x2="18.379412"
+ y2="3.0816143" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8838"
+ id="radialGradient3109"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1294118,0,0,0.2823525,-14.431108,16.306003)"
+ cx="62.625"
+ cy="4.625"
+ fx="62.625"
+ fy="4.625"
+ r="10.625" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3242"
+ id="radialGradient3116"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,1.2316137,-1.6257082,0,62.784887,-32.108898)"
+ cx="23.895569"
+ cy="3.9900031"
+ fx="23.895569"
+ fy="3.9900031"
+ r="20.397499" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2490"
+ id="linearGradient3118"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5160413,0,0,0.5160413,43.913315,-3.7731058)"
+ x1="18.379412"
+ y1="44.980297"
+ x2="18.379412"
+ y2="3.0816143" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4873"
+ id="linearGradient3120"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0862728,0,0,1.0862481,-11.268304,12.425523)"
+ x1="63.397362"
+ y1="-12.489107"
+ x2="63.397362"
+ y2="5.4675598" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3781"
+ id="linearGradient3122"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5384199,0,0,0.5384199,43.376229,-4.8486132)"
+ x1="24.481066"
+ y1="5.0808945"
+ x2="24.481066"
+ y2="45.074459" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8838-8"
+ id="radialGradient3262"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.1647059,0,0,0.7529402,-111.56471,36.517647)"
+ cx="62.625"
+ cy="4.625"
+ fx="62.625"
+ fy="4.625"
+ r="10.625" />
+ <linearGradient
+ id="linearGradient8838-8">
+ <stop
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1"
+ id="stop8840-5" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop8842-6" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2490-6">
+ <stop
+ id="stop2492-1"
+ style="stop-color:#791235;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2494-0"
+ style="stop-color:#dd3b27;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ y2="3.0816143"
+ x2="18.379412"
+ y1="44.980297"
+ x1="18.379412"
+ gradientTransform="matrix(0.9584364,0,0,0.9584366,0.997525,1.9975255)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3222"
+ xlink:href="#linearGradient2490-6"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3242-6">
+ <stop
+ id="stop3244-3"
+ style="stop-color:#f8b17e;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3246-2"
+ style="stop-color:#e35d4f;stop-opacity:1"
+ offset="0.26238" />
+ <stop
+ id="stop3248-0"
+ style="stop-color:#c6262e;stop-opacity:1"
+ offset="0.66093999" />
+ <stop
+ id="stop3250-6"
+ style="stop-color:#690b54;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ r="20.397499"
+ fy="3.9900031"
+ fx="23.895569"
+ cy="3.9900031"
+ cx="23.895569"
+ gradientTransform="matrix(0,2.2874593,-3.0194057,0,36.047437,-50.630156)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient3220"
+ xlink:href="#linearGradient3242-6"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3781-1">
+ <stop
+ id="stop3783-5"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3785-5"
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ y2="45.074459"
+ x2="24.481066"
+ y1="5.0808945"
+ x1="24.481066"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3217"
+ xlink:href="#linearGradient3781-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient4011">
+ <stop
+ id="stop4013"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0" />
+ <stop
+ offset="0.507761"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ id="stop4015" />
+ <stop
+ id="stop4017"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ offset="0.83456558" />
+ <stop
+ id="stop4019"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4011"
+ id="linearGradient3403"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-47.733515,-0.3572398)"
+ x1="71.204407"
+ y1="6.2375584"
+ x2="71.204407"
+ y2="44.340794" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4011"
+ id="linearGradient3187"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-161.47614,-7.3907873)"
+ x1="71.204407"
+ y1="6.2375584"
+ x2="71.204407"
+ y2="44.340794" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3781-1"
+ id="linearGradient3190"
+ gradientUnits="userSpaceOnUse"
+ x1="24.481066"
+ y1="5.0808945"
+ x2="24.481066"
+ y2="45.074459"
+ gradientTransform="translate(-113.74263,-7.0335475)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3242-6"
+ id="radialGradient3193"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,2.2874593,-3.0194057,0,-77.695193,-57.663703)"
+ cx="23.895569"
+ cy="3.9900031"
+ fx="23.895569"
+ fy="3.9900031"
+ r="20.397499" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2490-6"
+ id="linearGradient3195"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9584364,0,0,0.9584366,-112.74511,-5.036022)"
+ x1="18.379412"
+ y1="44.980297"
+ x2="18.379412"
+ y2="3.0816143" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8838-8"
+ id="radialGradient3198"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.1647059,0,0,0.7529402,-225.30734,29.484099)"
+ cx="62.625"
+ cy="4.625"
+ fx="62.625"
+ fy="4.625"
+ r="10.625" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3242-6"
+ id="radialGradient3205"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,2.2874593,-3.0194057,0,-77.695193,-57.663703)"
+ cx="23.895569"
+ cy="3.9900031"
+ fx="23.895569"
+ fy="3.9900031"
+ r="20.397499" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2490-6"
+ id="linearGradient3207"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9584364,0,0,0.9584366,-112.74511,-5.036022)"
+ x1="18.379412"
+ y1="44.980297"
+ x2="18.379412"
+ y2="3.0816143" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3781-1"
+ id="linearGradient3209"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-113.74263,-7.0335475)"
+ x1="24.481066"
+ y1="5.0808945"
+ x2="24.481066"
+ y2="45.074459" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4011"
+ id="linearGradient3211"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-161.47614,-7.3907873)"
+ x1="71.204407"
+ y1="6.2375584"
+ x2="71.204407"
+ y2="44.340794" />
+ </defs>
+ <g
+ id="g3043"
+ transform="translate(2.9288136,-0.440678)">
+ <path
+ style="opacity:0.78165935;fill:url(#radialGradient3062);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.06208694;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6115"
+ d="m 42.245489,32.316367 a 20.999999,15.500001 0 0 1 -41.99999657,0 20.999999,15.500001 0 1 1 41.99999657,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#linearGradient3064);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6051"
+ d="m 31.745493,37.816367 a 10.5,6.5000007 0 0 1 -21,0 10.5,6.5000007 0 1 1 21,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.35585584;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6099"
+ d="m 30.745492,37.816365 a 9.4999995,5.4999999 0 0 1 -18.999999,0 9.4999995,5.4999999 0 1 1 18.999999,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.56768559;fill:url(#linearGradient3066);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+ id="path6103"
+ d="m 11.813706,39.816366 c 0,0 2.431786,4 9.431786,4 l 0,-6 -9.409006,0 -0.02278,2 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6216"
+ d="m 40.745492,24.316367 a 19.5,17.000001 0 0 1 -39,0 19.5,17.000001 0 1 1 39,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6011"
+ d="m 40.745492,23.316368 a 19.5,17.000001 0 0 1 -39,0 19.5,17.000001 0 1 1 39,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#radialGradient3068);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6013"
+ d="m 39.120493,23.816367 a 17.6875,15.500001 0 0 1 -35.3750008,0 17.6875,15.500001 0 1 1 35.3750008,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.37387384;fill-rule:evenodd;stroke:none;stroke-width:0.57255107;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6089"
+ d="m 22.739342,34.816366 a 1.000001,1.0000011 0 1 1 -2.000002,0 1.000001,1.0000011 0 1 1 2.000002,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.27477477;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6015"
+ d="m 39.66216,23.316366 a 18.458334,16 0 0 1 -36.9166679,0 18.458334,16 0 1 1 36.9166679,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#linearGradient3070);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+ id="path6039"
+ d="m 14.279663,38.815551 c 4.370294,2.255137 21.03988,1.981742 24.965829,-10.999185 0,0 -5.636347,14.203426 -24.965829,10.999185 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.26576574;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6055"
+ d="m 28.469316,28.468733 c 0,2.484 -3.29488,4.847635 -6.882881,4.847635 -3.588,0 -5.840945,-2.016001 -5.840945,-4.500001 0,-2.484001 2.912001,-5.500001 6.500001,-5.500001 3.588001,0 6.223825,2.668366 6.223825,5.152367 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.37387384;fill-rule:evenodd;stroke:none;stroke-width:0.57255107;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6087"
+ d="m 19.739342,34.816366 a 1.000001,1.0000011 0 1 1 -2.000002,0 1.000001,1.0000011 0 1 1 2.000002,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80970943;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6083"
+ d="m 19.739342,35.816366 a 0.50000043,1.0000009 0 1 1 -1,0 0.50000043,1.0000009 0 1 1 1,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80970943;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6085"
+ d="m 22.739342,35.816366 a 0.50000043,1.0000009 0 1 1 -1,0 0.50000043,1.0000009 0 1 1 1,0 z"
+ inkscape:connector-curvature="0" />
+ <g
+ style="display:inline"
+ id="g2589">
+ <path
+ style="fill:url(#radialGradient3072);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6047"
+ d="m 27.745492,27.816367 c 0,2.484 -2.912,4.500001 -6.500001,4.500001 -3.588,0 -6.500001,-2.016001 -6.500001,-4.500001 0,-2.484001 2.912001,-5.500001 6.500001,-5.500001 3.588001,0 6.500001,3.016 6.500001,5.500001 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#eeeeee;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:11.06305599;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6208"
+ transform="matrix(0.1043744,0,0,0.07828089,16.434954,25.299346)"
+ d="m 46.089207,25.766438 a 19.161766,19.161766 0 1 1 -38.3235324,0 19.161766,19.161766 0 1 1 38.3235324,0 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ id="g3200"
+ transform="matrix(0.6893527,0,0,0.6893527,95.690407,1.4392623)">
+ <path
+ style="fill:url(#radialGradient3205);fill-opacity:1;stroke:url(#linearGradient3207);stroke-width:1.003654;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="path2555-6"
+ d="m -89.742628,-1.5317385 c -10.758432,0 -19.498192,8.739761 -19.498192,19.4981905 0,10.758431 8.73976,19.498195 19.498192,19.498193 10.758425,0 19.498199,-8.739762 19.498189,-19.498192 0,-10.7584305 -8.739764,-19.4981915 -19.498189,-19.4981915 z m 0,6.259788 c 7.31428,0 13.2384,5.9241215 13.2384,13.2384025 0,3.069743 -1.063615,5.871916 -2.815408,8.116759 L -96.092269,6.3454105 c 1.884452,-1.031095 4.049031,-1.617361 6.349641,-1.617361 z M -100.34533,10.059351 -83.632595,29.7073 c -1.827916,0.952311 -3.905343,1.497556 -6.110033,1.497556 -7.314281,-2e-6 -13.238402,-5.924123 -13.238402,-13.238404 0,-2.971425 0.98426,-5.698523 2.6357,-7.907101 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.4;fill:none;stroke:url(#linearGradient3209);stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+ id="path3270"
+ d="M -96.692716,7.2056955 -79.990479,26.892442"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -71.242628,17.965796 c 0,10.217599 -8.283342,18.500657 -18.499767,18.500657 -10.21736,0 -18.500235,-8.283153 -18.500235,-18.500657 0,-10.2171245 8.282875,-18.4993433 18.500235,-18.4993433 10.216425,0 18.499767,8.2822188 18.499767,18.4993433 l 0,0 z"
+ id="path8655"
+ style="opacity:0.5;color:#000000;fill:none;stroke:url(#linearGradient3211);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
=== added file 'Impulse/data/impulse-running.svg'
--- Impulse/data/impulse-running.svg 1970-01-01 00:00:00 +0000
+++ Impulse/data/impulse-running.svg 2011-08-09 20:07:46 +0000
@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="48"
+ height="48"
+ id="svg2579"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="icon.svg">
+ <metadata
+ id="metadata66">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="640"
+ inkscape:window-height="480"
+ id="namedview64"
+ showgrid="false"
+ inkscape:zoom="6.1458333"
+ inkscape:cx="24"
+ inkscape:cy="25.708475"
+ inkscape:window-x="38"
+ inkscape:window-y="29"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2579" />
+ <defs
+ id="defs2581">
+ <linearGradient
+ id="linearGradient6117">
+ <stop
+ id="stop6119"
+ style="stop-color:black;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6121"
+ style="stop-color:black;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6091">
+ <stop
+ id="stop6093"
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6095"
+ style="stop-color:#81837e;stop-opacity:0.98648649"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6105">
+ <stop
+ id="stop6107"
+ style="stop-color:white;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop6113"
+ style="stop-color:white;stop-opacity:1"
+ offset="0.45209709" />
+ <stop
+ id="stop6109"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6041">
+ <stop
+ id="stop6043"
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6045"
+ style="stop-color:#2e3436;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6296">
+ <stop
+ id="stop6298"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6300"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6304">
+ <stop
+ id="stop6306"
+ style="stop-color:#eeeeec;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6308"
+ style="stop-color:#80827d;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6117"
+ id="radialGradient3062"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0959323,0,0,0.8089025,-8.2651612,11.473831)"
+ cx="26.927441"
+ cy="25.766438"
+ fx="26.927441"
+ fy="25.766438"
+ r="19.161766" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6091"
+ id="linearGradient3064"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5479662,0,0,0.3392172,6.4901656,29.075948)"
+ x1="10.602306"
+ y1="35.894798"
+ x2="47.001671"
+ y2="35.690231" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6105"
+ id="linearGradient3066"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.7545076,-0.1836338)"
+ x1="15.551565"
+ y1="41"
+ x2="23.73423"
+ y2="41" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6041"
+ id="radialGradient3068"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.94560281,0,0,0.8204423,-3.8927993,3.5285007)"
+ cx="29.922518"
+ cy="32.704834"
+ fx="29.922518"
+ fy="32.704834"
+ r="19.736389" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6296"
+ id="linearGradient3070"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.7545076,-0.1836338)"
+ x1="34.825703"
+ y1="42.345951"
+ x2="28.763092"
+ y2="32.737347" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6304"
+ id="radialGradient3072"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4228001,0,0,0.3113668,9.6432324,19.361684)"
+ cx="17.831682"
+ cy="18.914896"
+ fx="17.831682"
+ fy="18.914896"
+ r="19.736389" />
+ <radialGradient
+ cx="17.058823"
+ cy="41.058823"
+ r="5.7384715"
+ fx="14.68769"
+ fy="37.45607"
+ id="radialGradient3198-9"
+ xlink:href="#linearGradient7067-5-6"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.68315419,-0.12185712,0.02398557,0.64784268,16.537607,-0.2005913)" />
+ <linearGradient
+ id="linearGradient7067-5-6">
+ <stop
+ id="stop7069-9-4"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop7071-3-3"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="28.503141"
+ y1="137.53885"
+ x2="26.256771"
+ y2="125.39074"
+ id="linearGradient3201-3"
+ xlink:href="#linearGradient2372-9-3"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.23013199,0,0,0.23039255,26.420462,-25.009524)" />
+ <linearGradient
+ id="linearGradient2372-9-3">
+ <stop
+ id="stop2374-9-8"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2376-4-6"
+ style="stop-color:white;stop-opacity:0.34482759"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="17.058823"
+ cy="41.058823"
+ r="5.7384715"
+ fx="14.757765"
+ fy="37.841019"
+ id="radialGradient3204-0"
+ xlink:href="#linearGradient3668-5-4"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.7193066,-0.11623586,0.01570024,0.6700801,28.786465,-3.1666868)" />
+ <linearGradient
+ id="linearGradient3668-5-4">
+ <stop
+ id="stop3670-7-8"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3672-4-8"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="28.739122"
+ y1="144.11652"
+ x2="26.256771"
+ y2="125.39074"
+ id="linearGradient3207-8"
+ xlink:href="#linearGradient2372-9-3"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.31763863,0,0,0.23039255,37.064825,-26.912905)" />
+ </defs>
+ <g
+ id="g3043"
+ transform="translate(2.9288136,-0.440678)">
+ <path
+ style="opacity:0.78165935;fill:url(#radialGradient3062);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.06208694;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6115"
+ d="m 42.245489,32.316367 a 20.999999,15.500001 0 0 1 -41.99999657,0 20.999999,15.500001 0 1 1 41.99999657,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#linearGradient3064);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6051"
+ d="m 31.745493,37.816367 a 10.5,6.5000007 0 0 1 -21,0 10.5,6.5000007 0 1 1 21,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.35585584;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6099"
+ d="m 30.745492,37.816365 a 9.4999995,5.4999999 0 0 1 -18.999999,0 9.4999995,5.4999999 0 1 1 18.999999,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.56768559;fill:url(#linearGradient3066);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+ id="path6103"
+ d="m 11.813706,39.816366 c 0,0 2.431786,4 9.431786,4 l 0,-6 -9.409006,0 -0.02278,2 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6216"
+ d="m 40.745492,24.316367 a 19.5,17.000001 0 0 1 -39,0 19.5,17.000001 0 1 1 39,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6011"
+ d="m 40.745492,23.316368 a 19.5,17.000001 0 0 1 -39,0 19.5,17.000001 0 1 1 39,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#radialGradient3068);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6013"
+ d="m 39.120493,23.816367 a 17.6875,15.500001 0 0 1 -35.3750008,0 17.6875,15.500001 0 1 1 35.3750008,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.37387384;fill-rule:evenodd;stroke:none;stroke-width:0.57255107;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6089"
+ d="m 22.739342,34.816366 a 1.000001,1.0000011 0 1 1 -2.000002,0 1.000001,1.0000011 0 1 1 2.000002,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.27477477;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6015"
+ d="m 39.66216,23.316366 a 18.458334,16 0 0 1 -36.9166679,0 18.458334,16 0 1 1 36.9166679,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#linearGradient3070);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+ id="path6039"
+ d="m 14.279663,38.815551 c 4.370294,2.255137 21.03988,1.981742 24.965829,-10.999185 0,0 -5.636347,14.203426 -24.965829,10.999185 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.26576574;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6055"
+ d="m 28.469316,28.468733 c 0,2.484 -3.29488,4.847635 -6.882881,4.847635 -3.588,0 -5.840945,-2.016001 -5.840945,-4.500001 0,-2.484001 2.912001,-5.500001 6.500001,-5.500001 3.588001,0 6.223825,2.668366 6.223825,5.152367 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.37387384;fill-rule:evenodd;stroke:none;stroke-width:0.57255107;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6087"
+ d="m 19.739342,34.816366 a 1.000001,1.0000011 0 1 1 -2.000002,0 1.000001,1.0000011 0 1 1 2.000002,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80970943;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6083"
+ d="m 19.739342,35.816366 a 0.50000043,1.0000009 0 1 1 -1,0 0.50000043,1.0000009 0 1 1 1,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80970943;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6085"
+ d="m 22.739342,35.816366 a 0.50000043,1.0000009 0 1 1 -1,0 0.50000043,1.0000009 0 1 1 1,0 z"
+ inkscape:connector-curvature="0" />
+ <g
+ style="display:inline"
+ id="g2589">
+ <path
+ style="fill:url(#radialGradient3072);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6047"
+ d="m 27.745492,27.816367 c 0,2.484 -2.912,4.500001 -6.500001,4.500001 -3.588,0 -6.500001,-2.016001 -6.500001,-4.500001 0,-2.484001 2.912001,-5.500001 6.500001,-5.500001 3.588001,0 6.500001,3.016 6.500001,5.500001 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#eeeeee;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:11.06305599;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6208"
+ transform="matrix(0.1043744,0,0,0.07828089,16.434954,25.299346)"
+ d="m 46.089207,25.766438 a 19.161766,19.161766 0 1 1 -38.3235324,0 19.161766,19.161766 0 1 1 38.3235324,0 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ id="g3155"
+ transform="matrix(0.84764242,0,0,0.84764242,7.1251737,0.14770955)">
+ <path
+ style="fill:#6a9ab8;fill-opacity:1;stroke:#2f5371;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="path3406"
+ d="m 44.988466,1.470611 c -4.281846,0.682425 -8.575548,1.2952791 -12.854035,1.9951361 -1.164518,0.582411 -0.747806,2.061595 -0.822837,3.105017 -1e-6,4.5144259 0,9.0288539 0,13.5432809 -2.989902,-0.664117 -6.440524,1.660678 -6.466088,4.818689 -0.134616,2.028017 1.828741,3.708429 3.803895,3.5227 2.677392,-0.136845 4.876234,-2.72166 4.589556,-5.481694 -10e-7,-4.514918 0,-9.733437 0,-14.2483529 3.531124,-0.507439 7.469018,-1.065543 11,-1.573941 -2e-6,3.4804009 0,7.6644049 0,11.1448089 -2.865041,-0.822601 -6.474407,1.063113 -6.949161,4.077642 -0.396968,1.7765 0.848645,3.562052 2.550074,4.069766 3.184888,1.040469 6.774713,-2.028268 6.399087,-5.309882 -0.0087,-6.155364 0.02682,-12.3107429 0,-18.466088 C 46.164117,2.05586 45.657131,1.4396746 44.988466,1.470611 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.4;fill:url(#linearGradient3207-8);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path3996-9"
+ d="m 44.446579,18.617507 0.04234,-11.7365379 c 0.44614,-0.0578 0.0685,-0.0093 0.670099,-0.09587 0.0081,2.192268 0.01129,3.6688349 0.01129,11.9484439 0,0.06161 -0.259835,-0.03092 -0.723739,-0.116032 l 3e-6,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.6;fill:url(#radialGradient3204-0);fill-opacity:1;stroke:none"
+ id="path2716-1"
+ d="m 45.829343,21.662952 c 0,2.091875 -1.848044,4.101181 -4.127723,4.487912 -2.279675,0.38673 -4.127719,-0.995562 -4.127719,-3.087436 0,-2.091875 1.848044,-4.101183 4.127719,-4.487914 2.279679,-0.38673 4.127723,0.995563 4.127723,3.087438 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.4;fill:url(#linearGradient3201-3);fill-opacity:1;fill-rule:evenodd;stroke:none"
+ id="path2720-9"
+ d="m 31.670941,20.627225 0,-15.9625759 c 0,0 0.08338,-0.8857 0.837768,-0.888753 0.06556,0.113136 12.727381,-2.0473481 12.727381,-2.0473481 0,0 0.484543,0.783694 -4.991113,1.5675571 -7.793798,1.115713 -7.861261,1.160176 -7.861261,1.961935 0,2.364917 0,7.1339979 0,15.7450079 -0.167574,-0.142514 -0.376677,-0.290712 -0.712775,-0.375823 l 0,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.6;fill:url(#radialGradient3198-9);fill-opacity:1;stroke:none"
+ id="path2712-6"
+ d="m 33.096492,23.643063 c 0,2.0233 -1.75516,3.96674 -3.92026,4.340793 -2.165102,0.374054 -3.920262,-0.962926 -3.920262,-2.986227 0,-2.023301 1.75516,-3.966741 3.920262,-4.340795 2.1651,-0.374053 3.92026,0.962927 3.92026,2.986229 z"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
=== added file 'Impulse/data/impulse-stopped.svg'
--- Impulse/data/impulse-stopped.svg 1970-01-01 00:00:00 +0000
+++ Impulse/data/impulse-stopped.svg 2011-08-09 20:07:46 +0000
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ width="48"
+ height="48"
+ id="svg2579"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="icon.svg">
+ <metadata
+ id="metadata66">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="640"
+ inkscape:window-height="480"
+ id="namedview64"
+ showgrid="false"
+ inkscape:zoom="6.1458333"
+ inkscape:cx="24"
+ inkscape:cy="25.708475"
+ inkscape:window-x="38"
+ inkscape:window-y="29"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2579" />
+ <defs
+ id="defs2581">
+ <linearGradient
+ id="linearGradient6117">
+ <stop
+ id="stop6119"
+ style="stop-color:black;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6121"
+ style="stop-color:black;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6091">
+ <stop
+ id="stop6093"
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6095"
+ style="stop-color:#81837e;stop-opacity:0.98648649"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6105">
+ <stop
+ id="stop6107"
+ style="stop-color:white;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop6113"
+ style="stop-color:white;stop-opacity:1"
+ offset="0.45209709" />
+ <stop
+ id="stop6109"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6041">
+ <stop
+ id="stop6043"
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6045"
+ style="stop-color:#2e3436;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6296">
+ <stop
+ id="stop6298"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6300"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6304">
+ <stop
+ id="stop6306"
+ style="stop-color:#eeeeec;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6308"
+ style="stop-color:#80827d;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6117"
+ id="radialGradient3062"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.0959323,0,0,0.8089025,-8.2651612,11.473831)"
+ cx="26.927441"
+ cy="25.766438"
+ fx="26.927441"
+ fy="25.766438"
+ r="19.161766" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6091"
+ id="linearGradient3064"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5479662,0,0,0.3392172,6.4901656,29.075948)"
+ x1="10.602306"
+ y1="35.894798"
+ x2="47.001671"
+ y2="35.690231" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6105"
+ id="linearGradient3066"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.7545076,-0.1836338)"
+ x1="15.551565"
+ y1="41"
+ x2="23.73423"
+ y2="41" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6041"
+ id="radialGradient3068"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.94560281,0,0,0.8204423,-3.8927993,3.5285007)"
+ cx="29.922518"
+ cy="32.704834"
+ fx="29.922518"
+ fy="32.704834"
+ r="19.736389" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6296"
+ id="linearGradient3070"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.7545076,-0.1836338)"
+ x1="34.825703"
+ y1="42.345951"
+ x2="28.763092"
+ y2="32.737347" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6304"
+ id="radialGradient3072"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4228001,0,0,0.3113668,9.6432324,19.361684)"
+ cx="17.831682"
+ cy="18.914896"
+ fx="17.831682"
+ fy="18.914896"
+ r="19.736389" />
+ <radialGradient
+ cx="17.058823"
+ cy="41.058823"
+ r="5.7384715"
+ fx="14.68769"
+ fy="37.45607"
+ id="radialGradient3198-9"
+ xlink:href="#linearGradient7067-5-6"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.68315419,-0.12185712,0.02398557,0.64784268,16.537607,-0.2005913)" />
+ <linearGradient
+ id="linearGradient7067-5-6">
+ <stop
+ id="stop7069-9-4"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop7071-3-3"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="28.503141"
+ y1="137.53885"
+ x2="26.256771"
+ y2="125.39074"
+ id="linearGradient3201-3"
+ xlink:href="#linearGradient2372-9-3"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.23013199,0,0,0.23039255,26.420462,-25.009524)" />
+ <linearGradient
+ id="linearGradient2372-9-3">
+ <stop
+ id="stop2374-9-8"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2376-4-6"
+ style="stop-color:white;stop-opacity:0.34482759"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="17.058823"
+ cy="41.058823"
+ r="5.7384715"
+ fx="14.757765"
+ fy="37.841019"
+ id="radialGradient3204-0"
+ xlink:href="#linearGradient3668-5-4"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.7193066,-0.11623586,0.01570024,0.6700801,28.786465,-3.1666868)" />
+ <linearGradient
+ id="linearGradient3668-5-4">
+ <stop
+ id="stop3670-7-8"
+ style="stop-color:white;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3672-4-8"
+ style="stop-color:white;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="28.739122"
+ y1="144.11652"
+ x2="26.256771"
+ y2="125.39074"
+ id="linearGradient3207-8"
+ xlink:href="#linearGradient2372-9-3"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.31763863,0,0,0.23039255,37.064825,-26.912905)" />
+ </defs>
+ <g
+ id="g3043"
+ transform="translate(2.9288136,-0.440678)">
+ <path
+ style="opacity:0.78165935;fill:url(#radialGradient3062);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.06208694;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6115"
+ d="m 42.245489,32.316367 a 20.999999,15.500001 0 0 1 -41.99999657,0 20.999999,15.500001 0 1 1 41.99999657,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#linearGradient3064);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6051"
+ d="m 31.745493,37.816367 a 10.5,6.5000007 0 0 1 -21,0 10.5,6.5000007 0 1 1 21,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.35585584;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6099"
+ d="m 30.745492,37.816365 a 9.4999995,5.4999999 0 0 1 -18.999999,0 9.4999995,5.4999999 0 1 1 18.999999,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="opacity:0.56768559;fill:url(#linearGradient3066);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+ id="path6103"
+ d="m 11.813706,39.816366 c 0,0 2.431786,4 9.431786,4 l 0,-6 -9.409006,0 -0.02278,2 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6216"
+ d="m 40.745492,24.316367 a 19.5,17.000001 0 0 1 -39,0 19.5,17.000001 0 1 1 39,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#555753;fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6011"
+ d="m 40.745492,23.316368 a 19.5,17.000001 0 0 1 -39,0 19.5,17.000001 0 1 1 39,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#radialGradient3068);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6013"
+ d="m 39.120493,23.816367 a 17.6875,15.500001 0 0 1 -35.3750008,0 17.6875,15.500001 0 1 1 35.3750008,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.37387384;fill-rule:evenodd;stroke:none;stroke-width:0.57255107;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6089"
+ d="m 22.739342,34.816366 a 1.000001,1.0000011 0 1 1 -2.000002,0 1.000001,1.0000011 0 1 1 2.000002,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.27477477;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6015"
+ d="m 39.66216,23.316366 a 18.458334,16 0 0 1 -36.9166679,0 18.458334,16 0 1 1 36.9166679,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:url(#linearGradient3070);fill-opacity:1;fill-rule:evenodd;stroke:none;display:inline"
+ id="path6039"
+ d="m 14.279663,38.815551 c 4.370294,2.255137 21.03988,1.981742 24.965829,-10.999185 0,0 -5.636347,14.203426 -24.965829,10.999185 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.26576574;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6055"
+ d="m 28.469316,28.468733 c 0,2.484 -3.29488,4.847635 -6.882881,4.847635 -3.588,0 -5.840945,-2.016001 -5.840945,-4.500001 0,-2.484001 2.912001,-5.500001 6.500001,-5.500001 3.588001,0 6.223825,2.668366 6.223825,5.152367 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.37387384;fill-rule:evenodd;stroke:none;stroke-width:0.57255107;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6087"
+ d="m 19.739342,34.816366 a 1.000001,1.0000011 0 1 1 -2.000002,0 1.000001,1.0000011 0 1 1 2.000002,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80970943;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6083"
+ d="m 19.739342,35.816366 a 0.50000043,1.0000009 0 1 1 -1,0 0.50000043,1.0000009 0 1 1 1,0 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#2e3436;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80970943;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6085"
+ d="m 22.739342,35.816366 a 0.50000043,1.0000009 0 1 1 -1,0 0.50000043,1.0000009 0 1 1 1,0 z"
+ inkscape:connector-curvature="0" />
+ <g
+ style="display:inline"
+ id="g2589">
+ <path
+ style="fill:url(#radialGradient3072);fill-opacity:1;fill-rule:evenodd;stroke:#2e3436;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6047"
+ d="m 27.745492,27.816367 c 0,2.484 -2.912,4.500001 -6.500001,4.500001 -3.588,0 -6.500001,-2.016001 -6.500001,-4.500001 0,-2.484001 2.912001,-5.500001 6.500001,-5.500001 3.588001,0 6.500001,3.016 6.500001,5.500001 z"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#eeeeee;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:11.06305599;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6208"
+ transform="matrix(0.1043744,0,0,0.07828089,16.434954,25.299346)"
+ d="m 46.089207,25.766438 a 19.161766,19.161766 0 1 1 -38.3235324,0 19.161766,19.161766 0 1 1 38.3235324,0 z"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+</svg>
=== added file 'Impulse/data/preview.jpg'
Binary files Impulse/data/preview.jpg 1970-01-01 00:00:00 +0000 and Impulse/data/preview.jpg 2011-08-09 20:07:46 +0000 differ
=== added directory 'Impulse/src'
=== added file 'Impulse/src/CMakeLists.txt'
--- Impulse/src/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Impulse/src/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,43 @@
+
+########### sources ###############
+
+SET(MODULE_SRCS
+ applet-struct.h
+ applet-init.c applet-init.h
+ applet-config.c applet-config.h
+ applet-notifications.c applet-notifications.h
+ Impulse.c Impulse.h
+ applet-impulse.c applet-impulse.h
+)
+
+add_library(${PACKAGE_IMPULSE} SHARED ${MODULE_SRCS})
+
+########### compil ###############
+add_definitions (-DMY_APPLET_SHARE_DATA_DIR="${impulsedatadir}")
+add_definitions (-DMY_APPLET_PREVIEW_FILE="preview.jpg")
+add_definitions (-DMY_APPLET_CONF_FILE="Impulse.conf")
+add_definitions (-DMY_APPLET_USER_DATA_DIR="Impulse")
+add_definitions (-DMY_APPLET_VERSION="${VERSION_IMPULSE}")
+add_definitions (-DMY_APPLET_GETTEXT_DOMAIN="${GETTEXT_IMPULSE}")
+add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")
+add_definitions (-DMY_APPLET_ICON_FILE="icon.png")
+### uncomment the following line to allow multi-instance applet.
+#add_definitions (-DCD_APPLET_MULTI_INSTANCE="1")
+### uncomment the following line to allow extended OpenGL drawing.
+#add_definitions (-DGL_GLEXT_PROTOTYPES="1")
+
+include_directories (
+ ${PACKAGE_INCLUDE_DIRS}
+ ${IMPULSE_PACKAGES_INCLUDE_DIRS})
+
+link_directories (
+ ${PACKAGE_LIBRARY_DIRS}
+ ${IMPULSE_PACKAGES_LIBRARY_DIRS})
+
+target_link_libraries (${PACKAGE_IMPULSE}
+ ${PACKAGE_LIBRARIES}
+ ${IMPULSE_PACKAGES_LIBRARIES})
+
+########### install files ###############
+
+install(TARGETS ${PACKAGE_IMPULSE} DESTINATION ${pluginsdir})
=== added file 'Impulse/src/Impulse.c'
--- Impulse/src/Impulse.c 1970-01-01 00:00:00 +0000
+++ Impulse/src/Impulse.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,305 @@
+/*
+ *
+ *+ Copyright (c) 2009 Ian Halpern
+ *@ http://impulse.ian-halpern.com
+ *
+ * This file is part of Impulse.
+ *
+ * Impulse is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Impulse is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Impulse. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <pulse/pulseaudio.h>
+#include <assert.h>
+#include <string.h>
+#include <stdint.h>
+#include <fftw3.h>
+#include <math.h>
+
+#include "Impulse.h"
+
+#define CHUNK 1024
+
+static const long fft_max[] = { 12317168L, 7693595L, 5863615L, 4082974L, 5836037L, 4550263L, 3377914L, 3085778L, 3636534L, 3751823L, 2660548L, 3313252L, 2698853L, 2186441L, 1697466L, 1960070L, 1286950L, 1252382L, 1313726L, 1140443L, 1345589L, 1269153L, 897605L, 900408L, 892528L, 587972L, 662925L, 668177L, 686784L, 656330L, 1580286L, 785491L, 761213L, 730185L, 851753L, 927848L, 891221L, 634291L, 833909L, 646617L, 804409L, 1015627L, 671714L, 813811L, 689614L, 727079L, 853936L, 819333L, 679111L, 730295L, 836287L, 1602396L, 990827L, 773609L, 733606L, 638993L, 604530L, 573002L, 634570L, 1015040L, 679452L, 672091L, 880370L, 1140558L, 1593324L, 686787L, 781368L, 605261L, 1190262L, 525205L, 393080L, 409546L, 436431L, 723744L, 765299L, 393927L, 322105L, 478074L, 458596L, 512763L, 381303L, 671156L, 1177206L, 476813L, 366285L, 436008L, 361763L, 252316L, 204433L, 291331L, 296950L, 329226L, 319209L, 258334L, 388701L, 543025L, 396709L, 296099L, 190213L, 167976L, 138928L, 116720L, 163538L, 331761L, 133932L, 187456L, 530630L, 131474L, 84888L, 82081L, 122379L, 82914L, 75510L, 62669L, 73492L, 68775L, 57121L, 94098L, 68262L, 68307L, 48801L, 46864L, 61480L, 46607L, 45974L, 45819L, 45306L, 45110L, 45175L, 44969L, 44615L, 44440L, 44066L, 43600L, 57117L, 43332L, 59980L, 55319L, 54385L, 81768L, 51165L, 54785L, 73248L, 52494L, 57252L, 61869L, 65900L, 75893L, 65152L, 108009L, 421578L, 152611L, 135307L, 254745L, 132834L, 169101L, 137571L, 141159L, 142151L, 211389L, 267869L, 367730L, 256726L, 185238L, 251197L, 204304L, 284443L, 258223L, 158730L, 228565L, 375950L, 294535L, 288708L, 351054L, 694353L, 477275L, 270576L, 426544L, 362456L, 441219L, 313264L, 300050L, 421051L, 414769L, 244296L, 292822L, 262203L, 418025L, 579471L, 418584L, 419449L, 405345L, 739170L, 488163L, 376361L, 339649L, 313814L, 430849L, 275287L, 382918L, 297214L, 286238L, 367684L, 303578L, 516246L, 654782L, 353370L, 417745L, 392892L, 418934L, 475608L, 284765L, 260639L, 288961L, 301438L, 301305L, 329190L, 252484L, 272364L, 261562L, 208419L, 203045L, 229716L, 191240L, 328251L, 267655L, 322116L, 509542L, 498288L, 341654L, 346341L, 451042L, 452194L, 467716L, 447635L, 644331L, 1231811L, 1181923L, 1043922L, 681166L, 1078456L, 1088757L, 1221378L, 1358397L, 1817252L, 1255182L, 1410357L, 2264454L, 1880361L, 1630934L, 1147988L, 1919954L, 1624734L, 1373554L, 1865118L, 2431931L };
+
+static uint32_t source_index = 0;
+static int context_ready = 0;
+static int16_t buffer[ CHUNK / 2 ], snapshot[ CHUNK / 2 ];
+static size_t buffer_index = 0;
+
+static pa_context *context = NULL;
+static pa_stream *stream = NULL;
+static pa_threaded_mainloop* mainloop = NULL;
+static pa_io_event* stdio_event = NULL;
+static pa_mainloop_api *mainloop_api = NULL;
+static char *stream_name = NULL, *client_name = NULL, *device = NULL;
+
+static pa_sample_spec sample_spec = {
+ .format = PA_SAMPLE_S16LE,
+ .rate = 44100,
+ .channels = 2
+};
+
+static pa_stream_flags_t flags = 0;
+
+static pa_channel_map channel_map;
+static int channel_map_set = 0;
+
+/* A shortcut for terminating the application */
+static void quit( int ret ) {
+ assert( mainloop_api );
+ mainloop_api->quit( mainloop_api, ret );
+}
+
+static void unmute_source_success_cb( pa_context *c, int success, void *userdata ) {
+ // printf("unmute: %d\n", success);
+}
+
+static void get_source_info_callback( pa_context *c, const pa_source_info *i, int is_last, void *userdata ) {
+
+ if ( !i )
+ return;
+
+ // printf("source index: %u\n", i->index );
+
+ // snprintf(t, sizeof(t), "%u", i->monitor_of_sink);
+
+// if ( i->monitor_of_sink != PA_INVALID_INDEX ) {
+ puts( i->name );
+ // if ( device && strcmp( device, i->name ) == 0 ) return;
+
+ device = pa_xstrdup( i->name );
+
+ if ( ( pa_stream_connect_record( stream, device, NULL, flags ) ) < 0 ) {
+ fprintf(stderr, "pa_stream_connect_record() failed: %s\n", pa_strerror(pa_context_errno(c)));
+ quit(1);
+ }
+// }
+}
+
+/* This is called whenever new data is available */
+static void stream_read_callback(pa_stream *s, size_t length, void *userdata) {
+ const void *data;
+ assert(s);
+ assert(length > 0);
+// printf("stream index: %d\n", pa_stream_get_index( s ) );
+ if (stdio_event)
+ mainloop_api->io_enable(stdio_event, PA_IO_EVENT_OUTPUT);
+
+ if (pa_stream_peek(s, &data, &length) < 0) {
+ fprintf(stderr, "pa_stream_peek() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ quit(1);
+ return;
+ }
+
+ assert(data);
+ assert(length > 0);
+
+ int excess = buffer_index * 2 + length - ( CHUNK );
+
+ if ( excess < 0 ) excess = 0;
+
+ memcpy( buffer + buffer_index, data, length - excess );
+ buffer_index += ( length - excess ) / 2;
+
+ if ( excess ) {
+ memcpy( snapshot, buffer, buffer_index * 2 );
+ buffer_index = 0;
+ }
+
+ pa_stream_drop(s);
+}
+
+static void stream_state_callback( pa_stream *s, void* userdata );
+
+static void init_source_stream_for_recording(void) {
+
+ if (!(stream = pa_stream_new( context, stream_name, &sample_spec, channel_map_set ? &channel_map : NULL))) {
+ fprintf(stderr, "pa_stream_new() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ quit(1);
+ }
+
+ pa_stream_set_read_callback(stream, stream_read_callback, NULL);
+ pa_stream_set_state_callback( stream, stream_state_callback, NULL );
+ pa_operation_unref( pa_context_set_source_mute_by_index( context, source_index, 0, unmute_source_success_cb, NULL ) );
+ pa_operation_unref( pa_context_get_source_info_by_index( context, source_index, get_source_info_callback, NULL ) );
+}
+
+static void stream_state_callback( pa_stream *s, void* userdata ) {
+ if ( pa_stream_get_state( s ) == PA_STREAM_TERMINATED ) {
+ pa_stream_unref( stream );
+ init_source_stream_for_recording();
+ }
+}
+
+static void context_state_callback( pa_context *c, void *userdata ) {
+
+ switch (pa_context_get_state(c)) {
+ case PA_CONTEXT_CONNECTING:
+ case PA_CONTEXT_AUTHORIZING:
+ case PA_CONTEXT_SETTING_NAME:
+ break;
+ case PA_CONTEXT_READY:
+ assert(c);
+ assert(!stream);
+
+ /*if (!(stream = pa_stream_new(c, stream_name, &sample_spec, channel_map_set ? &channel_map : NULL))) {
+ fprintf(stderr, "pa_stream_new() failed: %s\n", pa_strerror(pa_context_errno(c)));
+ quit(1);
+ }
+
+ pa_stream_set_read_callback(stream, stream_read_callback, NULL);*/
+ init_source_stream_for_recording();
+
+ break;
+ case PA_CONTEXT_TERMINATED:
+ quit(0);
+ break;
+
+ case PA_CONTEXT_FAILED:
+ default:
+ fprintf(stderr, "Connection failure: %s\n", pa_strerror(pa_context_errno(c)));
+ quit(1);
+ }
+}
+
+int im_context_state (void)
+{
+ if (context == NULL)
+ return IM_FAILED;
+
+ switch (pa_context_get_state (context))
+ {
+ case PA_CONTEXT_CONNECTING:
+ case PA_CONTEXT_AUTHORIZING:
+ case PA_CONTEXT_SETTING_NAME:
+ return IM_SUCCESS;
+ case PA_CONTEXT_TERMINATED:
+ case PA_CONTEXT_FAILED:
+ default:
+ return IM_FAILED;
+ }
+}
+
+void im_stop (void) {
+
+ pa_threaded_mainloop_stop( mainloop );
+
+ printf( "exit\n" );
+}
+
+void im_setSourceIndex( uint32_t index ) {
+ source_index = index;
+ if ( !stream ) return;
+
+ if ( pa_stream_get_state( stream ) != PA_STREAM_UNCONNECTED )
+ pa_stream_disconnect( stream );
+ else
+ init_source_stream_for_recording();
+}
+
+double *im_getSnapshot( int fft ) {
+
+ static double magnitude[ CHUNK / 4 ];
+
+ if ( ! fft ) {
+ int i;
+ for ( i = 0; i < CHUNK / 2; i += sample_spec.channels ) {
+ magnitude[ i / sample_spec.channels ] = 0;
+ int j;
+ for ( j = 0; j < sample_spec.channels; j++ )
+ magnitude[ i / sample_spec.channels ] += fabs( ( (double) snapshot[ i + j ] / ( pow( 2, 16 ) / 2 ) ) / sample_spec.channels );
+ }
+ } else {
+
+ double *in;
+ fftw_complex *out;
+ fftw_plan p;
+
+ in = (double*) malloc( sizeof( double ) * ( CHUNK / 2 ) );
+ out = (fftw_complex*) fftw_malloc( sizeof( fftw_complex ) * ( CHUNK / 2 ) );
+
+ if ( snapshot != NULL ) {
+ int i;
+ for ( i = 0; i < CHUNK / 2; i++ ) {
+ in[ i ] = (double) snapshot[ i ];
+ }
+ }
+
+ p = fftw_plan_dft_r2c_1d( CHUNK / 2, in, out, 0 );
+
+ fftw_execute( p );
+
+ fftw_destroy_plan( p );
+
+ if ( out != NULL ) {
+ int i;
+ for ( i = 0; i < CHUNK / 2 / sample_spec.channels; i++ ) {
+ magnitude[ i ] = (double) sqrt( pow( out[ i ][ 0 ], 2 ) + pow( out[ i ][ 1 ], 2 ) ) / (double) fft_max[ i ];
+ if ( magnitude[ i ] > 1.0 ) magnitude[ i ] = 1.0;
+ }
+ }
+
+ free( in );
+ fftw_free(out);
+ }
+
+ return magnitude; // PyString_FromStringAndSize( (char *) snapshot, CHUNK );
+}
+
+
+void im_start ( void ) {
+
+ // Pulseaudio
+ int r;
+ char *server = NULL;
+
+ client_name = pa_xstrdup( "impulse" );
+ stream_name = pa_xstrdup( "impulse" );
+
+ // Set up a new main loop
+
+ if ( ! ( mainloop = pa_threaded_mainloop_new( ) ) ) {
+ fprintf( stderr, "pa_mainloop_new() failed.\n" );
+ return; // IM_FAILED;
+ }
+
+ mainloop_api = pa_threaded_mainloop_get_api( mainloop );
+
+ r = pa_signal_init( mainloop_api );
+ assert( r == 0 );
+
+ /*if (!(stdio_event = mainloop_api->io_new(mainloop_api,
+ STDOUT_FILENO,
+ PA_IO_EVENT_OUTPUT,
+ stdout_callback, NULL))) {
+ fprintf(stderr, "io_new() failed.\n");
+ goto quit;
+ }*/
+
+ // create a new connection context
+ if ( ! ( context = pa_context_new( mainloop_api, client_name ) ) ) {
+ fprintf( stderr, "pa_context_new() failed.\n" );
+ return; // IM_FAILED;
+ }
+
+ pa_context_set_state_callback( context, context_state_callback, NULL );
+
+ /* Connect the context */
+ pa_context_connect( context, server, 0, NULL );
+
+ // pulseaudio thread
+ pa_threaded_mainloop_start( mainloop );
+
+ return; // context_state (context);
+}
=== added file 'Impulse/src/Impulse.h'
--- Impulse/src/Impulse.h 1970-01-01 00:00:00 +0000
+++ Impulse/src/Impulse.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,36 @@
+/*
+ *
+ *+ Copyright (c) 2009 Ian Halpern
+ *@ http://impulse.ian-halpern.com
+ *
+ * This file is part of Impulse.
+ *
+ * Impulse is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Impulse is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Impulse. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#define IM_NOFFT 0
+#define IM_FFT 1
+#define IM_FAILED 0
+#define IM_SUCCESS 1
+
+double *im_getSnapshot( int fft );
+
+void im_setSourceIndex( uint32_t index );
+
+void im_start( void );
+
+void im_stop( void );
+
+int im_context_state (void);
=== added file 'Impulse/src/applet-config.c'
--- Impulse/src/applet-config.c 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,58 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <string.h>
+#include <cairo-dock.h>
+
+#include "applet-struct.h"
+#include "applet-config.h"
+#include "applet-impulse.h"
+
+//\_________________ Here you have to get all your parameters from the conf file. Use the macros CD_CONFIG_GET_BOOLEAN, CD_CONFIG_GET_INTEGER, CD_CONFIG_GET_STRING, etc. myConfig has been reseted to 0 at this point. This function is called at the beginning of init and reload.
+CD_APPLET_GET_CONFIG_BEGIN
+ myConfig.cIconAnimation = CD_CONFIG_GET_STRING ("Configuration", "animation");
+ myConfig.fMinValueToAnim = CD_CONFIG_GET_DOUBLE_WITH_DEFAULT ("Configuration", "sensitivity", 0.25) / 3; // PER 3
+ myConfig.iNbAnimations = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "nb animations", 1);
+ myConfig.iLoopTime = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "refresh", 250);
+ myConfig.pDock = cairo_dock_search_dock_from_name (CD_CONFIG_GET_STRING_WITH_DEFAULT ("Configuration", "dock", "_MainDock_"));
+ myConfig.bStopAnimations = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "stop animations", FALSE);
+ myConfig.bLaunchAtStartup = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "startup", FALSE);
+ myConfig.bFree = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "free", FALSE);
+ myConfig.iSourceIndex = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "source_index", 0);
+
+ myConfig.cIconImpulseON = CD_CONFIG_GET_STRING ("Configuration", "icon on");
+ myConfig.cIconImpulseOFF = CD_CONFIG_GET_STRING ("Configuration", "icon off");
+ myConfig.cIconImpulseERROR = CD_CONFIG_GET_STRING ("Configuration", "icon error");
+CD_APPLET_GET_CONFIG_END
+
+
+//\_________________ Here you have to free all ressources allocated for myConfig. This one will be reseted to 0 at the end of this function. This function is called right before you get the applet's config, and when your applet is stopped, in the end.
+CD_APPLET_RESET_CONFIG_BEGIN
+ g_free (myConfig.cIconAnimation);
+ g_free (myConfig.cIconImpulseON);
+ g_free (myConfig.cIconImpulseOFF);
+ g_free (myConfig.cIconImpulseERROR);
+CD_APPLET_RESET_CONFIG_END
+
+
+//\_________________ Here you have to free all ressources allocated for myData. This one will be reseted to 0 at the end of this function. This function is called when your applet is stopped, in the very end.
+CD_APPLET_RESET_DATA_BEGIN
+ // cairo_dock_discard_task (myData.pTask);
+ cd_impulse_stop_animations ();
+CD_APPLET_RESET_DATA_END
=== added file 'Impulse/src/applet-config.h'
--- Impulse/src/applet-config.h 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-config.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,30 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __APPLET_CONFIG__
+#define __APPLET_CONFIG__
+
+#include <cairo-dock.h>
+
+
+CD_APPLET_CONFIG_H
+
+
+#endif
=== added file 'Impulse/src/applet-impulse.c'
--- Impulse/src/applet-impulse.c 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-impulse.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,328 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdint.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <glib.h>
+
+#include "applet-impulse.h"
+#include "Impulse.h"
+
+#define IM_TAB_SIZE 256
+
+extern CairoDockHidingEffect *g_pHidingBackend; // cairo_dock_is_hidden
+
+////////////////// IMPULSE \\\\\\\\\\\\\\\\\\\\
+
+void _im_start (void)
+{
+ cd_debug ("Impulse: start im");
+ im_start ();
+}
+
+void _im_stop (void)
+{
+ cd_debug ("Impulse: stop im");
+ //im_stop(); // FIXME => if stopped, the client is not stopped and im_getSnapshot(IM_FFT) give always the same thing...
+}
+
+void cd_impulse_im_setSourceIndex (gint iSourceIndex)
+{
+ cd_debug ("Impulse: iSourceIndex = %d", iSourceIndex);
+ im_setSourceIndex (iSourceIndex);
+}
+
+////////////////// USEFUL FUNCTIONS \\\\\\\\\\\\\\\\\\\\
+
+static void _get_icons_list_without_separators (CDSharedMemory *pSharedMemory)
+{
+ if (pSharedMemory->pDock == NULL)
+ {
+ pSharedMemory->pIconsList = NULL;
+ return;
+ }
+
+ pSharedMemory->bIsUpdatingIconsList = TRUE;
+
+ pSharedMemory->pIconsList = NULL;
+ GList *ic;
+ Icon *pIcon;
+ for (ic = pSharedMemory->pDock->icons; ic != NULL; ic = ic->next)
+ {
+ pIcon = ic->data;
+ // cd_debug ("Impulse: icon name=%s", pIcon->cName);
+ if (! CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR (pIcon))
+ pSharedMemory->pIconsList = g_list_append (pSharedMemory->pIconsList, pIcon);
+ }
+ g_list_free (ic);
+ pSharedMemory->bIsUpdatingIconsList = FALSE;
+ cd_debug ("Impulse: updated icons list: %d", g_list_length(pSharedMemory->pIconsList));
+}
+
+//static gboolean _animate_the_dock (CDSharedMemory *pSharedMemory)
+static gboolean _animate_the_dock (gpointer data)
+{
+ CD_APPLET_ENTER;
+ // cd_debug ("Impulse: in");
+ if (myData.pSharedMemory->bIsUpdatingIconsList
+ || cairo_dock_is_hidden (myData.pSharedMemory->pDock)) // not needed for the animations but not for pulse.
+ CD_APPLET_LEAVE (TRUE);
+
+ if (myData.pSharedMemory->pIconsList == NULL)
+ {
+ cd_impulse_stop_animations ();
+ CD_APPLET_LEAVE (FALSE);
+ }
+
+ guint iIcons = IM_TAB_SIZE / g_list_length (myData.pSharedMemory->pIconsList); // number of icons (without separators)
+
+ double *array = im_getSnapshot(IM_FFT);
+
+ // we check if there is a signal (most of the time, all values are > 0)
+ if (array[0] == 0.0)
+ { // is it really null?
+ int j;
+ for (j = 1; j < IM_TAB_SIZE; j++)
+ {
+ if (array[j] != 0)
+ break; // there is a signal
+ }
+
+ cd_debug ("Impulse: No Signal? %d", j);
+ if (j == IM_TAB_SIZE)
+ CD_APPLET_LEAVE (TRUE);
+ /* TODO?
+ * if null, increase the time of the loop?
+ * Maybe use: PA_SUBSCRIPTION_EVENT_CLIENT?
+ * or something else in pulse?
+ */
+ }
+
+ // Computing and animations
+ int i;
+ double l = 0.0;
+ GList *ic = myData.pSharedMemory->pIconsList;
+ Icon *pIcon;
+ gboolean bHasNotBeenAnimated = TRUE;
+ for (i = 0; ic != NULL; i++) // i < 256
+ {
+ l += array[i]; // a sum for the average
+ if (i != 0 && (i % iIcons) == 0)
+ {
+ pIcon = ic->data;
+ // cd_debug ("Impulse: Average: i=%d, l=%f ; I=%d ; l/I=%f ; %s", i, l, iIcons, l/iIcons, pIcon->cName);
+ if ((l/iIcons) > myData.pSharedMemory->fMinValueToAnim) // animation
+ {
+ //cd_debug ("Impulse: animation on this icon=%s", pIcon->cName);
+ cairo_dock_request_icon_animation (pIcon,
+ myData.pSharedMemory->pDock,
+ myData.pSharedMemory->cIconAnimation,
+ myData.pSharedMemory->iNbAnimations);
+ bHasNotBeenAnimated = FALSE;
+ myData.pSharedMemory->bNeedRefreshIfNotAnimated = TRUE;
+ }
+ else if (myData.pSharedMemory->bStopAnimations)
+ cairo_dock_stop_icon_animation (pIcon);
+ l = 0.0;
+ ic = ic->next;
+ }
+ }
+ if (bHasNotBeenAnimated && myData.pSharedMemory->bStopAnimations && myData.pSharedMemory->bNeedRefreshIfNotAnimated)
+ {
+ cd_debug ("Impulse: refresh container");
+ cairo_dock_redraw_container (CAIRO_CONTAINER (myData.pSharedMemory->pDock));
+ myData.pSharedMemory->bNeedRefreshIfNotAnimated = FALSE; // no need of refresh until the next animation and if bHasNotBeenAnimated
+ }
+
+ //cd_debug ("Impulse: out");
+ g_list_free (ic);
+ CD_APPLET_LEAVE (TRUE);
+}
+
+static gboolean _impulse_check_pulse_status (void)
+{
+ myData.iSidCheckStatus = 0;
+
+ cd_debug ("Impulse: checking PulseAudio Context status");
+
+ if (! myData.bHasBeenStarted && im_context_state () == IM_FAILED)
+ {
+ cd_impulse_stop_animations ();
+ cd_debug ("Impulse: starting failed");
+ cairo_dock_remove_dialog_if_any (myIcon);
+ cairo_dock_show_temporary_dialog_with_icon (D_("There is something wrong with PulseAudio.\nCan you check its status (installed? running? version?) and report this bug (if any) to forum.glx-dock.org"),
+ myIcon,
+ myContainer,
+ 5000,
+ MY_APPLET_SHARE_DATA_DIR"/"MY_APPLET_ICON_FILE);
+ CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconImpulseERROR, "impulse-error.svg");
+ }
+
+ return FALSE;
+}
+
+////////////////// NOTIFICATIONS \\\\\\\\\\\\\\\\\\\\
+
+/*void cd_impulse_start_animations (void)
+{
+ myData.iSidAnimate = g_timeout_add (myConfig.iLoopTime, (GSourceFunc) _animate_the_dock, NULL);
+}*/
+
+void _remove_notifications (void)
+{
+ cairo_dock_remove_notification_func_on_object (&myDocksMgr,
+ NOTIFICATION_ICON_MOVED,
+ (CairoDockNotificationFunc) cd_impulse_on_icon_changed, NULL);
+ cairo_dock_remove_notification_func_on_object (&myDocksMgr,
+ NOTIFICATION_INSERT_ICON,
+ (CairoDockNotificationFunc) cd_impulse_on_icon_changed, NULL);
+ cairo_dock_remove_notification_func_on_object (&myDocksMgr,
+ NOTIFICATION_REMOVE_ICON,
+ (CairoDockNotificationFunc) cd_impulse_on_icon_changed, NULL);
+}
+
+void _register_notifications (void)
+{
+ cairo_dock_register_notification_on_object (&myDocksMgr,
+ NOTIFICATION_ICON_MOVED,
+ (CairoDockNotificationFunc) cd_impulse_on_icon_changed,
+ CAIRO_DOCK_RUN_FIRST, NULL);
+ cairo_dock_register_notification_on_object (&myDocksMgr,
+ NOTIFICATION_INSERT_ICON,
+ (CairoDockNotificationFunc) cd_impulse_on_icon_changed,
+ CAIRO_DOCK_RUN_FIRST, NULL);
+ cairo_dock_register_notification_on_object (&myDocksMgr,
+ NOTIFICATION_REMOVE_ICON,
+ (CairoDockNotificationFunc) cd_impulse_on_icon_changed,
+ CAIRO_DOCK_RUN_FIRST, NULL);
+}
+
+////////////////// GENERAL FUNCTIONS \\\\\\\\\\\\\\\\\\\\
+
+void cd_impulse_stop_animations (void)
+{
+ //if (myData.pTask != NULL)
+ if (myData.iSidAnimate != 0)
+ {
+ /*cairo_dock_discard_task (myData.pTask);
+ myData.pTask = NULL;*/
+ g_source_remove (myData.iSidAnimate);
+ myData.iSidAnimate = 0;
+ // _free_shared_memory (myData.pSharedMemory);
+ _remove_notifications ();
+ }
+ if (myData.bPulseLaunched)
+ _im_stop();
+ cd_impulse_draw_current_state ();
+ // myData.bPulseLaunched = FALSE; //FIXME => if already started and stopped, it will crash... because not correctly stopped...
+}
+
+void cd_impulse_launch_task (void) //(CairoDockModuleInstance *myApplet)
+{
+ // if a task is already launching
+ /*if (myData.pTask != NULL)
+ {
+ cairo_dock_discard_task (myData.pTask);
+ myData.pTask = NULL;
+ }*/
+ if (myData.iSidAnimate != 0)
+ cd_impulse_stop_animations ();
+
+ // PulseAudio Server
+ if (! myData.bPulseLaunched)
+ {
+ _im_start (); // FIXME => if already started and stopped, it will crash... because not correctly stopped...
+ myData.bPulseLaunched = TRUE;
+ }
+
+ /*myData.pTask = cairo_dock_new_task_full (1,// (SECOND) myConfig.iLoopTime,
+ // (CairoDockGetDataAsyncFunc) _get_icons_list_without_separators,
+ NULL,
+ (CairoDockUpdateSyncFunc) _animate_the_dock,
+ (GFreeFunc) _free_shared_memory,
+ myData.pSharedMemory);
+ _get_icons_list_without_separators (myData.pSharedMemory);
+ cairo_dock_launch_task (myData.pTask);*/
+
+ _get_icons_list_without_separators (myData.pSharedMemory);
+ _register_notifications();
+
+ myData.iSidAnimate = g_timeout_add (myConfig.iLoopTime, (GSourceFunc) _animate_the_dock, NULL); // or into a thread + time?
+ cd_debug ("Impulse: animations started (checking status: %d)", myData.iSidCheckStatus);
+ cd_impulse_draw_current_state ();
+
+ if (myData.iSidCheckStatus == 0)
+ myData.iSidCheckStatus = g_timeout_add_seconds (1, (GSourceFunc) _impulse_check_pulse_status, NULL);
+}
+
+gboolean cd_impulse_on_icon_changed (gpointer pUserData, Icon *pIcon, CairoDock *pDock)
+{
+ // launched and something has changed in the right dock
+ //cd_debug ("Impulse: update needed? %d | %d", pDock, myConfig.pDock);
+ if (myData.iSidAnimate != 0 && pDock == myConfig.pDock)
+ {
+ _get_icons_list_without_separators (myData.pSharedMemory);
+ }
+ return CAIRO_DOCK_LET_PASS_NOTIFICATION;
+}
+
+void cd_impulse_draw_current_state (void)
+{
+ if (myData.iSidAnimate != 0)
+ CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconImpulseON, "impulse-running.svg");
+ else
+ CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconImpulseOFF, "impulse-stopped.svg");
+}
+
+////////////////// DELAY \\\\\\\\\\\\\\\\\\\\
+
+static gboolean _impulse_restart_delayed (void)
+{
+ myData.iSidRestartDelayed = 0;
+
+ if (! myData.bHasBeenStarted)
+ {
+ myData.bHasBeenStarted = TRUE;
+ cd_message ("Impulse has been started");
+
+ if (myConfig.bFree) // It's maybe a hack but Cairo-Penguin does that :)
+ {
+ cairo_dock_detach_icon_from_dock (myIcon, myDock, myIconsParam.iSeparateIcons);
+ cairo_dock_update_dock_size (myDock);
+ }
+ else
+ cairo_dock_insert_icon_in_dock (myIcon, myDock, CAIRO_DOCK_UPDATE_DOCK_SIZE, CAIRO_DOCK_ANIMATE_ICON);
+
+ cd_impulse_launch_task (); // launched the animations
+ }
+
+ return FALSE;
+}
+
+void cd_impulse_start_animating_with_delay (void)
+{
+ if (myData.iSidRestartDelayed != 0)
+ return ;
+
+ if (cairo_dock_is_loading ())
+ myData.iSidRestartDelayed = g_timeout_add_seconds (2, (GSourceFunc) _impulse_restart_delayed, NULL); // priority to the loading of the dock
+ else
+ myData.iSidRestartDelayed = g_timeout_add_seconds (1, (GSourceFunc) _impulse_restart_delayed, NULL); // if we have to detach the icon
+}
=== added file 'Impulse/src/applet-impulse.h'
--- Impulse/src/applet-impulse.h 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-impulse.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,33 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __APPLET_IMPULSE__
+#define __APPLET_IMPULSE__
+
+#include <cairo-dock.h>
+#include "applet-struct.h"
+
+void cd_impulse_im_setSourceIndex (gint iSourceIndex);
+void cd_impulse_stop_animations (void);
+void cd_impulse_launch_task (void); //(CairoDockModuleInstance *myApplet);
+gboolean cd_impulse_on_icon_changed (gpointer pUserData, Icon *pIcon, CairoDock *pDock);
+void cd_impulse_draw_current_state (void);
+void cd_impulse_start_animating_with_delay (void);
+
+#endif
=== added file 'Impulse/src/applet-init.c'
--- Impulse/src/applet-init.c 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,138 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "stdlib.h"
+
+#include "applet-config.h"
+#include "applet-notifications.h"
+#include "applet-struct.h"
+#include "applet-init.h"
+#include "applet-impulse.h"
+
+
+CD_APPLET_DEFINE_BEGIN ("Impulse",
+ 2, 4, 0,
+ CAIRO_DOCK_CATEGORY_APPLET_FUN,
+ N_("Did you know that your dock can dance? :)\n"
+ "If you click on this icon, the dock will dance!\n"
+ "In fact, you will have a graphical equalizer into the dock\n"
+ "It will analyse the signal given by PulseAudio."),
+ "Matthieu Baerts (matttbe)")
+ CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ // CD_APPLET_REDEFINE_TITLE (N_("Impulse")); do we have to translate it?
+ CD_APPLET_SET_CONTAINER_TYPE (CAIRO_DOCK_MODULE_CAN_DOCK);
+CD_APPLET_DEFINE_END
+
+void _init_shared_memory (void)
+{
+ myData.pSharedMemory = g_new0 (CDSharedMemory, 1);
+ myData.pSharedMemory->pIconsList = NULL; // without separators
+ myData.pSharedMemory->bIsUpdatingIconsList = TRUE; // without separators
+ myData.pSharedMemory->cIconAnimation = g_strdup (myConfig.cIconAnimation);
+ myData.pSharedMemory->iNbAnimations = myConfig.iNbAnimations;
+ myData.pSharedMemory->fMinValueToAnim = myConfig.fMinValueToAnim;
+ myData.pSharedMemory->bStopAnimations = myConfig.bStopAnimations;
+ myData.pSharedMemory->bNeedRefreshIfNotAnimated = FALSE; // will be TRUE when animated for the first time
+ myData.pSharedMemory->pDock = myConfig.pDock;
+ // myData.pSharedMemory->pApplet = myApplet;
+}
+
+void _free_shared_memory (void)
+{
+ g_free (myData.pSharedMemory->cIconAnimation);
+ g_list_free (myData.pSharedMemory->pIconsList);
+ g_free (myData.pSharedMemory);
+}
+
+//\___________ Here is where you initiate your applet. myConfig is already set at this point, and also myIcon, myContainer, myDock, myDesklet (and myDrawContext if you're in dock mode). The macro CD_APPLET_MY_CONF_FILE and CD_APPLET_MY_KEY_FILE can give you access to the applet's conf-file and its corresponding key-file (also available during reload). If you're in desklet mode, myDrawContext is still NULL, and myIcon's buffers has not been filled, because you may not need them then (idem when reloading).
+CD_APPLET_INIT_BEGIN
+ if (myDesklet)
+ {
+ CD_APPLET_SET_DESKLET_RENDERER ("Simple"); // set a desklet renderer.
+ }
+
+ // CD_APPLET_SET_DEFAULT_IMAGE_ON_MY_ICON_IF_NONE; // set the default icon if none is specified in conf.
+ CD_APPLET_SET_USER_IMAGE_ON_MY_ICON (myConfig.cIconImpulseOFF, "impulse-stopped.svg");
+
+ myData.iSidAnimate = 0;
+ myData.bPulseLaunched = FALSE;
+
+ _init_shared_memory ();
+
+ cd_impulse_im_setSourceIndex (myConfig.iSourceIndex);
+
+ if (myConfig.bLaunchAtStartup)
+ cd_impulse_start_animating_with_delay ();
+
+ CD_APPLET_REGISTER_FOR_CLICK_EVENT;
+ CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT;
+CD_APPLET_INIT_END
+
+
+//\___________ 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.
+CD_APPLET_STOP_BEGIN
+ CD_APPLET_UNREGISTER_FOR_CLICK_EVENT;
+ CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT;
+
+ if (myData.iSidAnimate != 0)
+ cd_impulse_stop_animations ();
+
+ _free_shared_memory ();
+CD_APPLET_STOP_END
+
+
+//\___________ The reload occurs in 2 occasions : when the user changes the applet's config, and when the user reload the cairo-dock's config or modify the desklet's size. The macro CD_APPLET_MY_CONFIG_CHANGED can tell you this. myConfig has already been reloaded at this point if you're in the first case, myData is untouched. You also have the macro CD_APPLET_MY_CONTAINER_TYPE_CHANGED that can tell you if you switched from dock/desklet to desklet/dock mode.
+CD_APPLET_RELOAD_BEGIN
+ if (myDesklet && CD_APPLET_MY_CONTAINER_TYPE_CHANGED) // we are now in a desklet, set a renderer.
+ {
+ CD_APPLET_SET_DESKLET_RENDERER ("Simple");
+ }
+
+ if (CD_APPLET_MY_CONFIG_CHANGED)
+ {
+ gboolean bWasLaunched;
+ if (myData.iSidAnimate != 0)
+ {
+ cd_impulse_stop_animations();
+ bWasLaunched = TRUE;
+ }
+ else
+ bWasLaunched = FALSE;
+
+ cd_impulse_draw_current_state (); // if the user has specified other icons.
+
+ // Shared Memory (cleaning)
+ _free_shared_memory ();
+ _init_shared_memory ();
+
+ cd_impulse_im_setSourceIndex (myConfig.iSourceIndex);
+
+ // if the icon has to be destroyed
+ if (myConfig.bLaunchAtStartup && myConfig.bFree)
+ {
+ cairo_dock_detach_icon_from_dock (myIcon, myDock, myIconsParam.iSeparateIcons);
+ cairo_dock_update_dock_size (myDock);
+ }
+ else
+ cairo_dock_insert_icon_in_dock (myIcon, myDock, CAIRO_DOCK_UPDATE_DOCK_SIZE, CAIRO_DOCK_ANIMATE_ICON);
+
+ if (bWasLaunched || (myConfig.bLaunchAtStartup && myConfig.bFree)) // maybe the time has changed... or if it's automatically launched
+ cd_impulse_launch_task ();
+ }
+CD_APPLET_RELOAD_END
=== added file 'Impulse/src/applet-init.h'
--- Impulse/src/applet-init.h 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-init.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,31 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __APPLET_INIT__
+#define __APPLET_INIT__
+
+
+#include <cairo-dock.h>
+
+
+CD_APPLET_H
+
+
+#endif
=== added file 'Impulse/src/applet-notifications.c'
--- Impulse/src/applet-notifications.c 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-notifications.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,58 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "applet-struct.h"
+#include "applet-notifications.h"
+#include "applet-impulse.h"
+
+
+//\___________ Define here the action to be taken when the user left-clicks on your icon or on its subdock or your desklet. The icon and the container that were clicked are available through the macros CD_APPLET_CLICKED_ICON and CD_APPLET_CLICKED_CONTAINER. CD_APPLET_CLICKED_ICON may be NULL if the user clicked in the container but out of icons.
+CD_APPLET_ON_CLICK_BEGIN
+ //if (myData.pTask != NULL)
+ cd_debug ("Impulse animation state: %d", myData.iSidAnimate);
+ if (myData.iSidAnimate != 0)
+ cd_impulse_stop_animations();
+ else
+ cd_impulse_launch_task();// (myApplet);
+
+CD_APPLET_ON_CLICK_END
+
+/*
+//\___________ Same as ON_CLICK, but with middle-click.
+CD_APPLET_ON_MIDDLE_CLICK_BEGIN
+
+
+CD_APPLET_ON_MIDDLE_CLICK_END
+
+
+//\___________ Same as ON_CLICK, but with scroll. Moreover, CD_APPLET_SCROLL_UP tels you is the user scrolled up, CD_APPLET_SCROLL_DOWN the opposite.
+CD_APPLET_ON_SCROLL_BEGIN
+
+
+CD_APPLET_ON_SCROLL_END
+*/
+
+//\___________ Define here the entries you want to add to the menu when the user right-clicks on your icon or on its subdock or your desklet. The icon and the container that were clicked are available through the macros CD_APPLET_CLICKED_ICON and CD_APPLET_CLICKED_CONTAINER. CD_APPLET_CLICKED_ICON may be NULL if the user clicked in the container but out of icons. The menu where you can add your entries is available throught the macro CD_APPLET_MY_MENU; you can add sub-menu to it if you want.
+CD_APPLET_ON_BUILD_MENU_BEGIN
+ GtkWidget *pSubMenu = CD_APPLET_CREATE_MY_SUB_MENU ();
+ CD_APPLET_ADD_ABOUT_IN_MENU (pSubMenu);
+CD_APPLET_ON_BUILD_MENU_END
=== added file 'Impulse/src/applet-notifications.h'
--- Impulse/src/applet-notifications.h 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-notifications.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,40 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __APPLET_NOTIFICATIONS__
+#define __APPLET_NOTIFICATIONS__
+
+
+#include <cairo-dock.h>
+
+
+CD_APPLET_ON_CLICK_H
+
+
+CD_APPLET_ON_MIDDLE_CLICK_H
+
+
+CD_APPLET_ON_SCROLL_H
+
+
+CD_APPLET_ON_BUILD_MENU_H
+
+
+#endif
=== added file 'Impulse/src/applet-struct.h'
--- Impulse/src/applet-struct.h 1970-01-01 00:00:00 +0000
+++ Impulse/src/applet-struct.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,67 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef __CD_APPLET_STRUCT__
+#define __CD_APPLET_STRUCT__
+
+#include <cairo-dock.h>
+
+//\___________ structure containing the applet's configuration parameters.
+struct _AppletConfig {
+ gchar *cIconAnimation;
+ gint iNbAnimations;
+ double fMinValueToAnim;
+ gint iLoopTime;
+ CairoDock *pDock;
+ gboolean bStopAnimations;
+ gboolean bLaunchAtStartup;
+ gboolean bFree;
+ gchar *cIconImpulseON;
+ gchar *cIconImpulseOFF;
+ gchar *cIconImpulseERROR;
+ gint iSourceIndex;
+ } ;
+
+typedef struct {
+ GList *pIconsList; // without separators
+ gboolean bIsUpdatingIconsList;
+ gchar *cIconAnimation;
+ gint iNbAnimations;
+ double fMinValueToAnim;
+ gboolean bStopAnimations;
+ gboolean bNeedRefreshIfNotAnimated; // if bStopAnimations and there is no animation after, the icon is not refreshed
+ CairoDock *pDock;
+ //CairoDockModuleInstance *pApplet;
+ } CDSharedMemory;
+
+//\___________ structure containing the applet's data, like surfaces, dialogs, results of calculus, etc.
+struct _AppletData {
+ // CairoDockTask *pTask; // task for the animation
+ CDSharedMemory *pSharedMemory;
+ // gboolean isRunning;
+ gboolean bPulseLaunched; // can we stop the pulseaudio client/server?
+ guint iSidAnimate;
+ guint iSidRestartDelayed;
+ guint iSidCheckStatus;
+ gboolean bHasBeenStarted;
+ } ;
+
+
+#endif
=== modified file 'MeMenu/data/MeMenu.conf.in'
--- MeMenu/data/MeMenu.conf.in 2011-04-20 20:46:51 +0000
+++ MeMenu/data/MeMenu.conf.in 2011-08-09 20:07:46 +0000
@@ -1,18 +1,17 @@
-#!en;@VERSION_MEMENU@
+#@VERSION_MEMENU@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
icon=
=== modified file 'MeMenu/src/applet-init.c'
--- MeMenu/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ MeMenu/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -27,11 +27,14 @@
#include "applet-init.h"
-CD_APPLET_DEFINITION (N_("Me Menu"),
+CD_APPLET_DEFINE_BEGIN (N_("Me Menu"),
2, 2, 0,
CAIRO_DOCK_CATEGORY_APPLET_INTERNET,
N_("A menu that lets you access quickly to your information, your online status, your friends."),
"Fabounet")
+ CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
+CD_APPLET_DEFINE_END
//\___________ Here is where you initiate your applet. myConfig is already set at this point, and also myIcon, myContainer, myDock, myDesklet (and myDrawContext if you're in dock mode). The macro CD_APPLET_MY_CONF_FILE and CD_APPLET_MY_KEY_FILE can give you access to the applet's conf-file and its corresponding key-file (also available during reload). If you're in desklet mode, myDrawContext is still NULL, and myIcon's buffers has not been filled, because you may not need them then (idem when reloading).
=== modified file 'Messaging-Menu/data/Messaging-Menu.conf.in'
--- Messaging-Menu/data/Messaging-Menu.conf.in 2011-04-20 20:46:51 +0000
+++ Messaging-Menu/data/Messaging-Menu.conf.in 2011-08-09 20:07:46 +0000
@@ -1,19 +1,18 @@
-#!en;@VERSION_MESSAGING_MENU@
+#@VERSION_MESSAGING_MENU@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = Messages
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
icon =
=== modified file 'Messaging-Menu/src/applet-init.c'
--- Messaging-Menu/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ Messaging-Menu/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -27,12 +27,15 @@
#include "applet-init.h"
-CD_APPLET_DEFINITION (N_("Messaging Menu"),
+CD_APPLET_DEFINE_BEGIN (N_("Messaging Menu"),
2, 2, 0,
CAIRO_DOCK_CATEGORY_APPLET_INTERNET,
N_("A menu that notices you about new messages from Mail or Chat applications.\n"
"It handles Evolution, Pidgin, Empathy, etc"),
"Fabounet")
+ CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
+CD_APPLET_DEFINE_END
//\___________ Here is where you initiate your applet. myConfig is already set at this point, and also myIcon, myContainer, myDock, myDesklet (and myDrawContext if you're in dock mode). The macro CD_APPLET_MY_CONF_FILE and CD_APPLET_MY_KEY_FILE can give you access to the applet's conf-file and its corresponding key-file (also available during reload). If you're in desklet mode, myDrawContext is still NULL, and myIcon's buffers has not been filled, because you may not need them then (idem when reloading).
=== modified file 'Messaging-Menu/src/applet-menu.c'
--- Messaging-Menu/src/applet-menu.c 2011-04-20 20:46:51 +0000
+++ Messaging-Menu/src/applet-menu.c 2011-08-09 20:07:46 +0000
@@ -194,7 +194,9 @@
g_debug ("%s (\"%s\")", __func__, dbusmenu_menuitem_property_get(newitem, APPLICATION_MENUITEM_PROP_NAME));
GtkMenuItem * gmi = GTK_MENU_ITEM(gtk_image_menu_item_new());
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(gmi), TRUE);
+#endif
gint padding = 4;
gtk_widget_style_get(GTK_WIDGET(gmi), "horizontal-padding", &padding, NULL);
@@ -211,6 +213,9 @@
+ 2 /* padding */,
height);
gtk_misc_set_alignment(GTK_MISC(icon), 1.0 /* right aligned */, 0.5);
+#if (GTK_MAJOR_VERSION > 2 || GTK_MINOR_VERSION >= 16)
+ gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (gmi), TRUE);
+#endif
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(gmi), icon);
gtk_widget_show(icon);
=== modified file 'Network-Monitor/data/Network-Monitor.conf.in'
--- Network-Monitor/data/Network-Monitor.conf.in 2011-04-20 20:46:51 +0000
+++ Network-Monitor/data/Network-Monitor.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_NETWORK_MONITOR@
+#@VERSION_NETWORK_MONITOR@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -12,9 +12,8 @@
#s Name of the icon as it will appear in its caption in the dock:
#{Leave empty to use the connection name.}
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
icon=
=== modified file 'RSSreader/data/RSSreader.conf.in'
--- RSSreader/data/RSSreader.conf.in 2011-04-20 20:46:51 +0000
+++ RSSreader/data/RSSreader.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_RSS_READER@
+#@VERSION_RSS_READER@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -12,9 +12,8 @@
#s Name of the icon as it will appear in its caption in the dock:
#{Leave empty to use the title of the RSS feed.}
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
#S+ Image filename:
#{Leave empty to use the default one.}
=== modified file 'RSSreader/src/applet-config.c'
--- RSSreader/src/applet-config.c 2011-04-20 20:46:51 +0000
+++ RSSreader/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -44,6 +44,8 @@
myConfig.iNotificationType = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "notifications", -1);
myConfig.cNotificationAnimation = CD_CONFIG_GET_STRING ("Configuration", "animation_feed_changed");
myConfig.iNotificationDuration = CD_CONFIG_GET_INTEGER ("Configuration", "dialogs_duration");
+ if (myConfig.iNotificationDuration == 0) // prevent for blocking dialogs.
+ myConfig.iNotificationDuration = 1e5;
if (myConfig.iNotificationType == -1) // anciens parametres.
{
gboolean bShowDialog = CD_CONFIG_GET_BOOLEAN ("Configuration", "dialog_feed_changed");
=== modified file 'RSSreader/src/applet-init.c'
--- RSSreader/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ RSSreader/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -28,7 +28,7 @@
#include "applet-draw.h"
#include "applet-init.h"
-CD_APPLET_DEFINITION (N_("RSSreader"),
+CD_APPLET_DEFINE_BEGIN (N_("RSSreader"),
2, 0, 0,
CAIRO_DOCK_CATEGORY_APPLET_INTERNET,
N_("This applet is an RSS/Atom feed reader.\n"
@@ -41,6 +41,9 @@
" or copy it and use \"Paste a new RSS Url\" in the menu.\n"
" or edit the Configuration Panel."),
"Yann Dulieu (Nochka85)")
+ CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
+CD_APPLET_DEFINE_END
//\___________ Here is where you initiate your applet. myConfig is already set at this point, and also myIcon, myContainer, myDock, myDesklet (and myDrawContext if you're in dock mode). The macro CD_APPLET_MY_CONF_FILE and CD_APPLET_MY_KEY_FILE can give you access to the applet's conf-file and its corresponding key-file (also available during reload). If you're in desklet mode, myDrawContext is still NULL, and myIcon's buffers has not been filled, because you may not need them then (idem when reloading).
=== modified file 'Recent-Events/data/Recent-Events.conf.in'
--- Recent-Events/data/Recent-Events.conf.in 2011-04-20 20:46:51 +0000
+++ Recent-Events/data/Recent-Events.conf.in 2011-08-09 20:07:46 +0000
@@ -1,23 +1,22 @@
-#!en;@VERSION_RECENT_EVENTS@
+#@VERSION_RECENT_EVENTS@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = Recent-Events
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
#S+ Image filename:
#{Leave empty to use the default one.}
-icon =
+icon=folder-recent
#j[0;128] Desired icon size for this applet
#{Set to 0 to use the default applet size}
=== modified file 'Recent-Events/src/applet-dialog.c'
--- Recent-Events/src/applet-dialog.c 2011-04-20 20:46:51 +0000
+++ Recent-Events/src/applet-dialog.c 2011-08-09 20:07:46 +0000
@@ -354,7 +354,7 @@
gtk_box_pack_start (GTK_BOX (pMainBox), pToolBar, TRUE, TRUE, MARGIN);
int i = 0;
- GtkToolItem *group = _add_category_button (pToolBar, D_("All"), "stock_all", i++, NULL);
+ GtkToolItem *group = _add_category_button (pToolBar, D_("All"), "stock_search", i++, NULL);
_add_category_button (pToolBar, D_("Document"), "document", i++, group);
///_add_category_button (pToolBar, D_("Folder"), "folder", i++, group);
_add_category_button (pToolBar, D_("Image"), "image", i++, group);
@@ -369,6 +369,7 @@
gtk_box_pack_start (GTK_BOX (pMainBox), pFilterBox, FALSE, FALSE, MARGIN);
GtkWidget *pFilterLabel = gtk_label_new (D_("Look for events"));
+ cairo_dock_set_dialog_widget_text_color (GTK_WIDGET (pFilterLabel));
gtk_box_pack_start (GTK_BOX (pFilterBox), pFilterLabel, FALSE, FALSE, MARGIN);
GtkWidget *pEntry = gtk_entry_new ();
@@ -442,13 +443,6 @@
return pMainBox;
}
-/**static gboolean on_button_press_dialog (GtkWidget *widget, GdkEventButton *pButton, CairoDockModuleInstance *myApplet)
-{
- CD_APPLET_ENTER;
- cairo_dock_dialog_unreference (myData.pDialog);
- myData.pDialog = NULL;
- CD_APPLET_LEAVE(FALSE);
-}*/
static void _on_dialog_destroyed (CairoDockModuleInstance *myApplet)
{
myData.pDialog = NULL;
@@ -456,15 +450,40 @@
myData.iCurrentCaterogy = CD_EVENT_ALL;
myData.pModel = NULL;
}
+static gboolean _show_dialog_delayed (gpointer data)
+{
+ cd_toggle_dialog ();
+ return FALSE;
+}
void cd_toggle_dialog (void)
{
- if (myData.pDialog != NULL)
+ if (myData.pDialog != NULL) // the dialog can be opened in the case it was called from the shortkey.
{
cairo_dock_dialog_unreference (myData.pDialog);
myData.pDialog = NULL;
}
else
{
+ // establish the connection to Zeitgesit.
+ if (myData.pLog == NULL) // first search.
+ {
+ g_print ("first search\n");
+ myData.pLog = zeitgeist_log_new (); // may launch the Zeitgeist daemon if it's not yet running.
+ if (! zeitgeist_log_is_connected (myData.pLog)) // the connection may not be immediate (even if the daemon is already running), in this case come back in 1s.
+ {
+ g_print ("come back in 1s...\n");
+ g_timeout_add_seconds (1, _show_dialog_delayed, NULL);
+ return;
+ }
+ }
+ else if (! zeitgeist_log_is_connected (myData.pLog))
+ {
+ cairo_dock_remove_dialog_if_any (myIcon);
+ cairo_dock_show_temporary_dialog_with_icon (D_("You need to install the Zeitgeist data engine."), myIcon, myContainer, 6000, "same icon");
+ return;
+ }
+
+ // build the dialog and the tree model.
GtkWidget *pInteractiveWidget = cd_build_events_widget ();
myData.pDialog = cairo_dock_show_dialog_full (D_("Browse and search in recent events"),
myIcon,
@@ -476,11 +495,8 @@
myApplet,
(GFreeFunc) _on_dialog_destroyed);
gtk_widget_grab_focus (myData.pEntry);
- /**g_signal_connect (G_OBJECT (myData.pDialog->container.pWidget),
- "button-press-event",
- G_CALLBACK (on_button_press_dialog),
- myApplet);*/
+ // trigger the search that will fill the model.
cd_trigger_search ();
}
}
=== modified file 'Recent-Events/src/applet-search.c'
--- Recent-Events/src/applet-search.c 2011-04-20 20:46:51 +0000
+++ Recent-Events/src/applet-search.c 2011-08-09 20:07:46 +0000
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <zeitgeist.h>
@@ -255,7 +256,7 @@
events = zeitgeist_log_find_events_finish (log, res, &error);
if (error)
{
- g_warning ("Error reading results: %s", error->message);
+ cd_warning ("Error reading results: %s", error->message);
g_error_free (error);
return;
}
=== modified file 'Remote-Control/data/Remote-Control.conf.in'
--- Remote-Control/data/Remote-Control.conf.in 2010-09-18 14:20:27 +0000
+++ Remote-Control/data/Remote-Control.conf.in 2011-08-09 20:07:46 +0000
@@ -1,4 +1,4 @@
-#!en;@VERSION_REMOTE_CONTROL@
+#@VERSION_REMOTE_CONTROL@
#[gtk-preferences]
[Configuration]
=== modified file 'Scooby-Do/data/Scooby-Do.conf.in'
--- Scooby-Do/data/Scooby-Do.conf.in 2010-09-18 14:20:27 +0000
+++ Scooby-Do/data/Scooby-Do.conf.in 2011-08-09 20:07:46 +0000
@@ -1,4 +1,4 @@
-#!en;@VERSION_SCOOBY_DO@
+#@VERSION_SCOOBY_DO@
#[gtk-preferences]
[Configuration]
=== modified file 'Status-Notifier/CMakeLists.txt'
--- Status-Notifier/CMakeLists.txt 2010-09-07 02:38:17 +0000
+++ Status-Notifier/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -1,3 +1,7 @@
add_subdirectory(src)
add_subdirectory(data)
+
+if ("${PYTHON_FOUND}" STREQUAL "TRUE")
+ add_subdirectory(watcher)
+endif()
=== modified file 'Status-Notifier/data/Status-Notifier.conf.in'
--- Status-Notifier/data/Status-Notifier.conf.in 2011-04-20 20:46:51 +0000
+++ Status-Notifier/data/Status-Notifier.conf.in 2011-08-09 20:07:46 +0000
@@ -1,19 +1,18 @@
-#!en;@VERSION_STATUSNOTIFIER@
+#@VERSION_STATUSNOTIFIER@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its label in the dock :
-name = Status Notifier
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
#S+ Image's filename :
#{Let empty to use the default one.}
@@ -103,6 +102,9 @@
#[gtk-preferences]
[Configuration]
+#b Left click pops up the items' menu
+left click menu = false
+
#Y[Compact;1;2;Sub-dock;0;0] How to display items:
mode = 0
=== modified file 'Status-Notifier/src/CMakeLists.txt'
--- Status-Notifier/src/CMakeLists.txt 2011-06-19 16:22:58 +0000
+++ Status-Notifier/src/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -5,6 +5,8 @@
applet-init.c applet-init.h
applet-config.c applet-config.h
applet-host.c applet-host.h
+ applet-host-kde.c applet-host-kde.h
+ applet-host-ias.c applet-host-ias.h
applet-item.c applet-item.h
applet-draw.c applet-draw.h
applet-notifications.c applet-notifications.h
@@ -23,6 +25,7 @@
add_definitions (-DMY_APPLET_DOCK_VERSION="${dock_version}")
add_definitions (-DMY_APPLET_ICON_FILE="icon.png")
add_definitions (-DINDICATOR_OLD_NAMES=${INDICATOR_OLD_NAMES})
+add_definitions (-DCD_PLUGINS_DIR="${pluginsdir}")
include_directories (
${PACKAGE_INCLUDE_DIRS}
=== modified file 'Status-Notifier/src/applet-config.c'
--- Status-Notifier/src/applet-config.c 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-config.c 2011-08-09 20:07:46 +0000
@@ -30,6 +30,7 @@
myConfig.bCompactMode = (iDisplaymode == CD_MODE_COMPACT);
myConfig.bResizeIcon = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "auto-resize", TRUE);
myConfig.iNbLines = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "nb lines", 2);
+ myConfig.bMenuOnLeftClick = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "left click menu", FALSE);
CD_APPLET_GET_CONFIG_END
=== modified file 'Status-Notifier/src/applet-draw.c'
--- Status-Notifier/src/applet-draw.c 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-draw.c 2011-08-09 20:07:46 +0000
@@ -95,10 +95,21 @@
}
// compute the required width and the grid.
- myData.iNbLines = myConfig.iNbLines;
- myData.iItemSize = MAX (1, iHeight / myConfig.iNbLines);
- myData.iNbColumns = ceil ((float)iNbItems / myConfig.iNbLines); // nb items by line.
- int w = MAX (w0, myData.iItemSize * myData.iNbColumns);
+ int w;
+ if (myContainer->bIsHorizontal)
+ {
+ myData.iNbLines = myConfig.iNbLines;
+ myData.iItemSize = MAX (1, iHeight / myConfig.iNbLines);
+ myData.iNbColumns = ceil ((float)iNbItems / myConfig.iNbLines); // nb items by line.
+ w = MAX (w0, myData.iItemSize * myData.iNbColumns);
+ }
+ else
+ {
+ myData.iNbColumns = myConfig.iNbLines;
+ myData.iItemSize = MAX (1, iHeight / myConfig.iNbLines);
+ myData.iNbLines = ceil ((float)iNbItems / myConfig.iNbLines); // nb items by line.
+ w = MAX (w0, myData.iItemSize * myData.iNbLines);
+ }
cd_debug ("=== required width: %d (now: %d)", w, iWidth);
// if width has changed, update the icon size.
@@ -232,8 +243,17 @@
iMouseX = myContainer->iMouseX - myIcon->fDrawX;
iMouseY = myContainer->iMouseY - myIcon->fDrawY;
- iMouseX = iMouseX / fSizeX * iWidth; // transform to the grid.
- iMouseY = iMouseY / fSizeY * iHeight;
+ if (myContainer->bIsHorizontal)
+ {
+ iMouseX = iMouseX / fSizeX * iWidth; // transform to the grid.
+ iMouseY = iMouseY / fSizeY * iHeight;
+ }
+ else
+ {
+ int tmp = iMouseX;
+ iMouseX = iMouseY / fSizeX * iWidth; // transform to the grid.
+ iMouseY = tmp / fSizeY * iHeight;
+ }
// get index on the grid.
int x_pad = (iWidth - myData.iItemSize * myData.iNbColumns) / 2;
=== added file 'Status-Notifier/src/applet-host-ias.c'
--- Status-Notifier/src/applet-host-ias.c 1970-01-01 00:00:00 +0000
+++ Status-Notifier/src/applet-host-ias.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,523 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "applet-struct.h"
+#include "applet-item.h"
+#include "applet-draw.h"
+#include "applet-host.h"
+#include "applet-host-ias.h"
+
+// Ubuntu sort-of-high-level-Watcher (new or old address)
+#if (INDICATOR_OLD_NAMES == 0) // Natty
+#define CD_INDICATOR_APPLICATION_ADDR "com.canonical.indicator.application"
+#define CD_INDICATOR_APPLICATION_OBJ "/com/canonical/indicator/application/service"
+#define CD_INDICATOR_APPLICATION_IFACE "com.canonical.indicator.application.service"
+#else
+#define CD_INDICATOR_APPLICATION_ADDR "org.ayatana.indicator.application"
+#define CD_INDICATOR_APPLICATION_OBJ "/org/ayatana/indicator/application/service"
+#define CD_INDICATOR_APPLICATION_IFACE "org.ayatana.indicator.application.service"
+#endif
+
+// Ubuntu Indicator Service
+#define CD_INDICATOR_SERVICE_INTERFACE "org.ayatana.indicator.service"
+#define CD_INDICATOR_SERVICE_OBJECT "/org/ayatana/indicator/service"
+
+#define CD_INDICATOR_APPLICATION_ITEM_OBJ "/org/ayatana/NotificationItem"
+
+static DBusGProxyCall *s_pDetectIASCall = NULL;
+
+#if (INDICATOR_OLD_NAMES != 0) // Maverick
+static void _cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ //cd_debug ("=== %s ()\n", __func__);
+ typedef void (*GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING) (
+ gpointer data1,
+ gchar *arg_1,
+ gint arg_2,
+ gchar *arg_3,
+ gchar *arg_4,
+ gchar *arg_5,
+ gchar *arg_6,
+ gchar *arg_7,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ g_return_if_fail (n_param_values == 8); // return_value est NULL ici, car la callback ne renvoit rien.
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ (char*) g_value_get_string (param_values + 1),
+ g_value_get_int (param_values + 2),
+ (char*) g_value_get_string (param_values + 3),
+ (char*) g_value_get_string (param_values + 4),
+ (char*) g_value_get_string (param_values + 5),
+ (char*) g_value_get_string (param_values + 6),
+ (char*) g_value_get_string (param_values + 7),
+ data2);
+}
+#else // Natty
+static void _cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING (GClosure *closure,
+ GValue *return_value G_GNUC_UNUSED,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint G_GNUC_UNUSED,
+ gpointer marshal_data)
+{
+ //cd_debug ("=== %s ()\n", __func__);
+ typedef void (*GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING) (
+ gpointer data1,
+ gchar *arg_1,
+ gint arg_2,
+ gchar *arg_3,
+ gchar *arg_4,
+ gchar *arg_5,
+ gchar *arg_6,
+ gchar *arg_7,
+ gchar *arg_8,
+ gpointer data2);
+ register GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING callback;
+ register GCClosure *cc = (GCClosure*) closure;
+ register gpointer data1, data2;
+ g_return_if_fail (n_param_values == 9); // return_value est NULL ici, car la callback ne renvoit rien.
+
+ if (G_CCLOSURE_SWAP_DATA (closure))
+ {
+ data1 = closure->data;
+ data2 = g_value_peek_pointer (param_values + 0);
+ }
+ else
+ {
+ data1 = g_value_peek_pointer (param_values + 0);
+ data2 = closure->data;
+ }
+ callback = (GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
+
+ callback (data1,
+ (char*) g_value_get_string (param_values + 1),
+ g_value_get_int (param_values + 2),
+ (char*) g_value_get_string (param_values + 3),
+ (char*) g_value_get_boxed (param_values + 4),
+ (char*) g_value_get_string (param_values + 5),
+ (char*) g_value_get_string (param_values + 6),
+ (char*) g_value_get_string (param_values + 7),
+ (char*) g_value_get_string (param_values + 8),
+ data2);
+}
+#endif
+
+ ///////////////
+ /// Signals ///
+///////////////
+
+static void on_new_application (DBusGProxy *proxy_watcher, const gchar *cIconName, gint iPosition, const gchar *cAdress, const gchar *cObjectPath, const gchar *cIconThemePath, const gchar *cLabel, const gchar *cLabelGuide,
+#if (INDICATOR_OLD_NAMES == 0) // Natty
+const gchar *cAccessbleDesc, // WTF is this new param ??
+#endif
+CairoDockModuleInstance *myApplet)
+{
+ CD_APPLET_ENTER;
+ cd_debug ("=== %s (%s, %s, %s, %s, %d)", __func__, cAdress, cObjectPath, cIconName, cIconThemePath, iPosition);
+ #if (INDICATOR_OLD_NAMES == 0) // Natty
+ cd_debug (" %s", cAccessbleDesc);
+ #endif
+
+ // position +1 for items placed after this one.
+ CDStatusNotifierItem *pItem;
+ GList *it;
+ for (it = myData.pItems; it != NULL; it = it->next)
+ {
+ pItem = it->data;
+ if (pItem->iPosition >= iPosition)
+ {
+ pItem->iPosition ++;
+ cd_debug ("=== %s -> %d -> %d", pItem->cId, pItem->iPosition-1, pItem->iPosition);
+ }
+ }
+
+ cd_satus_notifier_add_new_item (cAdress, cObjectPath, iPosition);
+
+ CD_APPLET_LEAVE ();
+}
+
+static void on_removed_application (DBusGProxy *proxy_watcher, gint iPosition, CairoDockModuleInstance *myApplet)
+{
+ CD_APPLET_ENTER;
+ cd_debug ("=== %s (%d)", __func__, iPosition);
+
+ cd_satus_notifier_remove_item (NULL, iPosition);
+
+ // position -1 for items placed after this one.
+ CDStatusNotifierItem *pItem;
+ GList *it;
+ for (it = myData.pItems; it != NULL; it = it->next)
+ {
+ pItem = it->data;
+ if (pItem->iPosition >= iPosition)
+ {
+ pItem->iPosition --;
+ cd_debug ("=== %s -> %d -> %d", pItem->cId, pItem->iPosition+1, pItem->iPosition);
+ }
+ }
+
+ CD_APPLET_LEAVE ();
+}
+
+
+ /////////////////
+ /// Get Items ///
+/////////////////
+
+static void _on_get_applications_from_service (DBusGProxy *proxy, DBusGProxyCall *call_id, CairoDockModuleInstance *myApplet)
+{
+ cd_debug ("=== %s ()", __func__);
+ CD_APPLET_ENTER;
+
+ //\______________________ get the applications list from the service.
+ GPtrArray *pApplications = NULL;
+ GError *erreur = NULL;
+ GType g_type_ptrarray = g_type_ptrarray = dbus_g_type_get_collection ("GPtrArray",
+ dbus_g_type_get_struct("GValueArray",
+ G_TYPE_STRING, // iconname
+ G_TYPE_INT, // position
+ G_TYPE_STRING, // dbusaddress
+ DBUS_TYPE_G_OBJECT_PATH, // dbusobject
+ G_TYPE_STRING, // iconpath
+ G_TYPE_STRING, // label
+ G_TYPE_STRING, // labelguide
+ G_TYPE_INVALID));
+ gboolean bSuccess = dbus_g_proxy_end_call (proxy,
+ call_id,
+ &erreur,
+ g_type_ptrarray, &pApplications,
+ G_TYPE_INVALID);
+ if (erreur != NULL)
+ {
+ cd_debug ("=== couldn't get applications in the systray (%s)", erreur->message);
+ g_error_free (erreur);
+ erreur = NULL;
+ }
+ if (pApplications == NULL)
+ CD_APPLET_LEAVE ();
+
+ //\______________________ build each items.
+ cd_debug ("=== got %d aplications", pApplications->len);
+ guint i, j;
+ GValueArray *va;
+ GValue *v;
+ CDStatusNotifierItem *pItem=NULL;
+ //cd_debug ("=== %d apps in the systray", pApplications->len);
+ for (i = 0; i < pApplications->len; i ++)
+ {
+ cd_debug ("=== %d) %p", i, pApplications->pdata[i]);
+ va = pApplications->pdata[i];
+ if (! va)
+ continue;
+
+ const gchar *cIconName = NULL;
+ gint iPosition = -1;
+ const gchar *cAdress = NULL;
+ const gchar *cObjectPath = NULL;
+ const gchar *cIconThemePath = NULL;
+ const gchar *cLabel = NULL;
+ const gchar *cLabelGuide = NULL;
+
+ v = g_value_array_get_nth (va, 0);
+ if (v && G_VALUE_HOLDS_STRING (v))
+ cIconName = g_value_get_string (v);
+
+ v = g_value_array_get_nth (va, 1);
+ if (v && G_VALUE_HOLDS_INT (v))
+ iPosition = g_value_get_int (v);
+
+ v = g_value_array_get_nth (va, 2);
+ if (v && G_VALUE_HOLDS_STRING (v))
+ cAdress = g_value_get_string (v);
+
+ v = g_value_array_get_nth (va, 3);
+ if (v && G_VALUE_HOLDS_BOXED (v))
+ cObjectPath = (gchar*)g_value_get_boxed (v);
+
+ /*g_print ("=== cObjectPath : %s\n", cObjectPath);
+ if (cObjectPath != NULL && strncmp (cObjectPath, CD_INDICATOR_APPLICATION_ITEM_OBJ, strlen (CD_INDICATOR_APPLICATION_ITEM_OBJ)) == 0)
+ {
+ gchar *str = strrchr (cObjectPath, '/'); // I think this is because this path is actually the menu path, and fortunately it's just under the item object's path.
+ if (str)
+ *str = '\0';
+ }*/ // => we will do that in cd_satus_notifier_create_item because this function is also called when a new application is added => host.c
+
+ v = g_value_array_get_nth (va, 4);
+ if (v && G_VALUE_HOLDS_STRING (v))
+ cIconThemePath = g_value_get_string (v);
+
+ v = g_value_array_get_nth (va, 5);
+ if (v && G_VALUE_HOLDS_STRING (v))
+ cLabel = g_value_get_string (v);
+
+ v = g_value_array_get_nth (va, 6);
+ if (v && G_VALUE_HOLDS_STRING (v))
+ cLabelGuide = g_value_get_string (v);
+
+ cd_debug ("=== + item {%s ; %d ; %s ; %s ; %s ; %s ; %s}",
+ cIconName,
+ iPosition,
+ cAdress,
+ cObjectPath,
+ cIconThemePath,
+ cLabel,
+ cLabelGuide);
+
+ pItem = cd_satus_notifier_create_item (cAdress, cObjectPath);
+ if (! pItem)
+ continue;
+ if (pItem->iPosition == -1)
+ pItem->iPosition = iPosition;
+ if (pItem->cTitle == NULL && pItem->cLabel == NULL)
+ pItem->cLabel = g_strdup (cLabel && *cLabel != '\0' ? cLabel : pItem->cId);
+ myData.pItems = g_list_prepend (myData.pItems, pItem);
+ }
+
+ if (myConfig.bCompactMode)
+ {
+ cd_satus_notifier_reload_compact_mode ();
+ }
+ else
+ {
+ cd_satus_notifier_load_icons_from_items ();
+ }
+
+ g_ptr_array_free (pApplications, TRUE);
+ CD_APPLET_LEAVE ();
+}
+
+void cd_satus_notifier_get_items_from_ias (void)
+{
+ if (! myData.bIASWatched)
+ return;
+ cd_debug ("=== %s ()", __func__);
+
+ g_return_if_fail (myData.pProxyIndicatorApplicationService == NULL);
+
+ myData.pProxyIndicatorApplicationService = cairo_dock_create_new_session_proxy (
+ CD_INDICATOR_APPLICATION_ADDR,
+ CD_INDICATOR_APPLICATION_OBJ,
+ CD_INDICATOR_APPLICATION_IFACE);
+
+ // get the current items
+ dbus_g_proxy_begin_call (myData.pProxyIndicatorApplicationService,
+ "GetApplications",
+ (DBusGProxyCallNotify)_on_get_applications_from_service,
+ myApplet,
+ (GDestroyNotify) NULL,
+ G_TYPE_INVALID);
+
+ // connect to the signals to keep the list of items up-to-date.
+ #if (INDICATOR_OLD_NAMES != 0) // Maverick
+ dbus_g_object_register_marshaller(_cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING,
+ G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+ #else // Natty
+ dbus_g_object_register_marshaller(_cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING,
+ G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING,
+ #if (INDICATOR_OLD_NAMES != 0) // Maverick
+ G_TYPE_STRING, // dbusobject
+ #else // Natty
+ DBUS_TYPE_G_OBJECT_PATH, // dbusobject
+ #endif
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+ #endif
+ dbus_g_proxy_add_signal(myData.pProxyIndicatorApplicationService, "ApplicationAdded",
+ G_TYPE_STRING, // iconname
+ G_TYPE_INT, // position
+ G_TYPE_STRING, // dbusaddress
+ #if (INDICATOR_OLD_NAMES != 0) // Maverick
+ G_TYPE_STRING, // dbusobject
+ #else // Natty
+ DBUS_TYPE_G_OBJECT_PATH, // dbusobject
+ #endif
+ G_TYPE_STRING, // iconpath
+ G_TYPE_STRING, // label
+ G_TYPE_STRING, // labelguide
+ #if (INDICATOR_OLD_NAMES == 0) // Natty
+ G_TYPE_STRING, // accessibledesc
+ #endif
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(myData.pProxyIndicatorApplicationService, "ApplicationAdded",
+ G_CALLBACK(on_new_application), myApplet, NULL);
+
+ dbus_g_proxy_add_signal(myData.pProxyIndicatorApplicationService, "ApplicationRemoved",
+ G_TYPE_INT, // position
+ G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(myData.pProxyIndicatorApplicationService, "ApplicationRemoved",
+ G_CALLBACK(on_removed_application), myApplet, NULL);
+}
+
+ //////////////////
+ /// Connection ///
+//////////////////
+
+static void _on_start_service (DBusGProxy *proxy, guint status, GError *error, gpointer data)
+{
+ // if service has not started, then we'll assume we don't need it (eg.: KDE)
+ if (status != DBUS_START_REPLY_SUCCESS && status != DBUS_START_REPLY_ALREADY_RUNNING) // service is not started.
+ {
+ if (error != NULL) // couldn't start the service
+ cd_debug ("=== Unable to start the indicator service (%s), assuming we don't need it", error->message);
+ else
+ cd_debug ("=== Unable to start the indicator service (got status %d), assuming we don't need it", status);
+ myData.bNoIAS = TRUE;
+ cd_satus_notifier_launch_our_watcher ();
+ return;
+ }
+ cd_debug ("=== Indicator Service has started");
+}
+static void _on_watch_service (DBusGProxy *proxy, DBusGProxyCall *call, gpointer data)
+{
+ CD_APPLET_ENTER;
+ GError *error = NULL;
+ guint service_api_version=0, this_service_version=0;
+ dbus_g_proxy_end_call (proxy, call, &error,
+ G_TYPE_UINT, &service_api_version,
+ G_TYPE_UINT, &this_service_version,
+ G_TYPE_INVALID);
+ cd_debug ("=== got indicator service (API: %d, service: %d, broken watcher: %d)", service_api_version, this_service_version, myData.bBrokenWatcher);
+
+ if (service_api_version > 0) /// shouldn't the 2 versions be equal ?...
+ {
+ myData.bIASWatched = TRUE; // now we're friend with the IAS
+
+ if (myData.bBrokenWatcher) // if the watcher is not our friend, let's ask the IAS the current items.
+ {
+ cd_satus_notifier_get_items_from_ias ();
+ }
+ }
+ CD_APPLET_LEAVE ();
+}
+static void _on_ias_owner_changed (gboolean bOwned, gpointer data)
+{
+ CD_APPLET_ENTER;
+ cd_debug ("=== Indicator Applications Service is on the bus (%d)", bOwned);
+
+ if (bOwned)
+ {
+ myData.bNoIAS = FALSE;
+ // set up a proxy to the Service
+ myData.pProxyIndicatorService = cairo_dock_create_new_session_proxy (
+ CD_INDICATOR_APPLICATION_ADDR,
+ CD_INDICATOR_SERVICE_OBJECT,
+ CD_INDICATOR_SERVICE_INTERFACE);
+
+ // and watch it.
+ cd_debug ("=== watch it");
+ dbus_g_proxy_begin_call (myData.pProxyIndicatorService,
+ "Watch",
+ (DBusGProxyCallNotify)_on_watch_service,
+ myApplet,
+ (GDestroyNotify) NULL,
+ G_TYPE_INVALID);
+ }
+ else // no more IAS on the bus.
+ {
+ g_object_unref (myData.pProxyIndicatorService);
+ myData.pProxyIndicatorService = NULL;
+
+ g_object_unref (myData.pProxyIndicatorApplicationService);
+ myData.pProxyIndicatorApplicationService = NULL;
+
+ myData.bIASWatched = FALSE;
+
+ myData.bNoIAS = TRUE;
+ cd_satus_notifier_launch_our_watcher ();
+ }
+ CD_APPLET_LEAVE ();
+}
+static void _on_detect_ias (gboolean bPresent, gpointer data)
+{
+ CD_APPLET_ENTER;
+ cd_debug ("=== Indicator Applications Service is present: %d", bPresent);
+ s_pDetectIASCall = NULL;
+ // if present, set up proxy, else try to start the service.
+ if (bPresent)
+ {
+ _on_ias_owner_changed (TRUE, NULL);
+ }
+ else // not present, maybe the service is not started => try starting it.
+ {
+ cd_debug ("=== try to start the Indicator Service...");
+ DBusGProxy *dbus_proxy = cairo_dock_get_main_proxy ();
+ org_freedesktop_DBus_start_service_by_name_async (dbus_proxy,
+ CD_INDICATOR_APPLICATION_ADDR,
+ 0,
+ _on_start_service,
+ myApplet);
+ }
+ // watch whenever the Service goes up or down.
+ cairo_dock_watch_dbus_name_owner (CD_INDICATOR_APPLICATION_ADDR,
+ (CairoDockDbusNameOwnerChangedFunc) _on_ias_owner_changed,
+ NULL);
+ CD_APPLET_LEAVE ();
+}
+
+
+void cd_satus_notifier_detect_ias (void)
+{
+ s_pDetectIASCall = cairo_dock_dbus_detect_application_async (CD_INDICATOR_APPLICATION_ADDR,
+ (CairoDockOnAppliPresentOnDbus) _on_detect_ias,
+ NULL);
+}
+
+
+void cd_satus_notifier_unregister_from_ias (void)
+{
+ if (myData.pProxyIndicatorApplicationService != NULL)
+ {
+ g_object_unref (myData.pProxyIndicatorApplicationService);
+ g_object_unref (myData.pProxyIndicatorService);
+ }
+
+ if (s_pDetectIASCall != NULL)
+ {
+ DBusGProxy *pProxy = cairo_dock_get_main_proxy ();
+ dbus_g_proxy_cancel_call (pProxy, s_pDetectIASCall);
+ s_pDetectIASCall = NULL;
+ }
+
+ cairo_dock_stop_watching_dbus_name_owner (CD_INDICATOR_APPLICATION_ADDR,
+ (CairoDockOnAppliPresentOnDbus) _on_detect_ias);
+}
=== added file 'Status-Notifier/src/applet-host-ias.h'
--- Status-Notifier/src/applet-host-ias.h 1970-01-01 00:00:00 +0000
+++ Status-Notifier/src/applet-host-ias.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,33 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __APPLET_HOST_IAS__
+#define __APPLET_HOST_IAS__
+
+
+void cd_satus_notifier_get_items_from_ias (void);
+
+
+void cd_satus_notifier_detect_ias (void);
+
+
+void cd_satus_notifier_unregister_from_ias (void);
+
+
+#endif
=== added file 'Status-Notifier/src/applet-host-kde.c'
--- Status-Notifier/src/applet-host-kde.c 1970-01-01 00:00:00 +0000
+++ Status-Notifier/src/applet-host-kde.c 2011-08-09 20:07:46 +0000
@@ -0,0 +1,325 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "applet-struct.h"
+#include "applet-item.h"
+#include "applet-draw.h"
+#include "applet-host.h"
+#include "applet-host-ias.h" // for fallback
+#include "applet-host-kde.h"
+
+// KDE watcher
+#define CD_STATUS_NOTIFIER_WATCHER_ADDR "org.kde.StatusNotifierWatcher"
+#define CD_STATUS_NOTIFIER_WATCHER_OBJ "/StatusNotifierWatcher"
+#define CD_STATUS_NOTIFIER_WATCHER_IFACE "org.kde.StatusNotifierWatcher"
+
+static DBusGProxyCall *s_pDetectWatcherCall = NULL;
+
+
+ ///////////////
+ /// Signals ///
+///////////////
+
+static void on_new_item (DBusGProxy *proxy_watcher, const gchar *cNotifierItemId, CairoDockModuleInstance *myApplet)
+{
+ CD_APPLET_ENTER;
+ cd_debug ("=== %s (%s)", __func__, cNotifierItemId);
+
+ gchar *cService = NULL, *cObjectPath = NULL;
+ gchar *str = strchr (cNotifierItemId, '/');
+ if (str != NULL) // service + path
+ {
+ cService = g_strndup (cNotifierItemId, str - cNotifierItemId);
+ cObjectPath = str;
+ }
+ else // we handle this case too, by supposing the path is the default /StatusNotifierItem
+ {
+ cService = g_strdup (cNotifierItemId);
+ cObjectPath = NULL;
+ }
+
+ cd_satus_notifier_add_new_item (cService, cObjectPath, -1); // indicator-application's positions start from 0, so it will never be -1.
+
+ g_free (cService);
+ CD_APPLET_LEAVE ();
+}
+
+static void on_removed_item (DBusGProxy *proxy_watcher, const gchar *cNotifierItemId, CairoDockModuleInstance *myApplet)
+{
+ CD_APPLET_ENTER;
+ cd_debug ("=== %s (%s)", __func__, cNotifierItemId);
+
+ gchar *str = strchr (cNotifierItemId, '/');
+ if (str != NULL) // service + path, remove the path, we only need the service.
+ *str = '\0';
+
+ cd_satus_notifier_remove_item (cNotifierItemId, -1);
+
+ CD_APPLET_LEAVE ();
+}
+
+
+ /////////////////
+ /// Get Items ///
+/////////////////
+
+static void _on_get_applications_from_watcher (DBusGProxy *proxy, DBusGProxyCall *call_id, CairoDockModuleInstance *myApplet)
+{
+ cd_debug ("=== %s ()", __func__);
+ CD_APPLET_ENTER;
+
+ GError *erreur = NULL;
+ GValue *v = g_new0 (GValue, 1);
+ gboolean bSuccess = dbus_g_proxy_end_call (proxy,
+ call_id,
+ &erreur,
+ G_TYPE_VALUE, v,
+ G_TYPE_INVALID);
+ if (erreur != NULL)
+ {
+ cd_debug ("=== couldn't get applications from the watcher (%s)", erreur->message);
+ g_error_free (erreur);
+ erreur = NULL;
+ bSuccess = FALSE;
+ }
+
+ if (bSuccess)
+ {
+ if (!G_VALUE_HOLDS_BOXED (v))
+ CD_APPLET_LEAVE ();
+ gchar **pApplications = g_value_get_boxed (v);
+ if (pApplications == NULL)
+ CD_APPLET_LEAVE ();
+
+ guint i;
+ gchar *cService = NULL, *cObjectPath = NULL;
+ CDStatusNotifierItem *pItem;
+ for (i = 0; pApplications[i] != NULL; i ++)
+ {
+ g_print (" + '%s'\n", pApplications[i]); // service + path
+ if (*pApplications[i] == '\0')
+ continue;
+
+ gchar *str = strchr (pApplications[i], '/');
+ if (str != NULL) // service + path
+ {
+ cService = g_strndup (pApplications[i], str - pApplications[i]);
+ cObjectPath = str;
+ }
+ else // we handle this case too, by supposing the path is the default /StatusNotifierItem
+ {
+ cService = g_strdup (pApplications[i]);
+ cObjectPath = NULL;
+ }
+ pItem = cd_satus_notifier_create_item (cService, cObjectPath);
+ g_free (cService);
+ if (! pItem)
+ continue;
+ cd_debug ("=== => + %s", pItem->cTitle);
+ myData.pItems = g_list_prepend (myData.pItems, pItem);
+ }
+
+ g_free (v);
+
+ if (myConfig.bCompactMode)
+ {
+ cd_satus_notifier_reload_compact_mode ();
+ }
+ else
+ {
+ cd_satus_notifier_load_icons_from_items ();
+ }
+ }
+ else // un watcher asocial comme celui d'Ubuntu, on essaye avec l'"indicator-application".
+ {
+ cd_debug ("=== this watcher is not so friendly, let's try the 'application indicator'");
+ myData.bBrokenWatcher = TRUE;
+ if (myData.bIASWatched)
+ cd_satus_notifier_get_items_from_ias ();
+ }
+ CD_APPLET_LEAVE ();
+}
+
+
+ //////////////////
+ /// Connection ///
+//////////////////
+
+static void _on_register_host (DBusGProxy *proxy, DBusGProxyCall *call_id, CairoDockModuleInstance *myApplet)
+{
+ cd_debug ("=== %s ()", __func__);
+ CD_APPLET_ENTER;
+ GError *erreur = NULL;
+ gboolean bSuccess = dbus_g_proxy_end_call (proxy,
+ call_id,
+ &erreur,
+ G_TYPE_INVALID);
+ if (erreur != NULL)
+ {
+ cd_debug ("couldn't register to the Notification Watcher (%s)", erreur->message);
+ g_error_free (erreur);
+ erreur = NULL;
+ bSuccess = FALSE;
+ }
+
+ if (bSuccess) // we are friend now, let's ask him the current items.
+ {
+ cd_debug ("=== found a friendly watcher, now ask for the items...");
+ // get the current items
+ myData.pProxyWatcherProps = cairo_dock_create_new_session_proxy (
+ CD_STATUS_NOTIFIER_WATCHER_ADDR,
+ CD_STATUS_NOTIFIER_WATCHER_OBJ,
+ DBUS_INTERFACE_PROPERTIES);
+ dbus_g_proxy_begin_call (myData.pProxyWatcherProps,
+ "Get",
+ (DBusGProxyCallNotify)_on_get_applications_from_watcher,
+ myApplet,
+ (GDestroyNotify) NULL,
+ G_TYPE_STRING, CD_STATUS_NOTIFIER_WATCHER_IFACE,
+ G_TYPE_STRING, "RegisteredStatusNotifierItems",
+ G_TYPE_INVALID);
+
+ // connect to the signals to keep the list of items up-to-date.
+ dbus_g_proxy_add_signal(myData.pProxyWatcher, "StatusNotifierItemRegistered",
+ G_TYPE_STRING, G_TYPE_INVALID); // ServiceRegistered
+ dbus_g_proxy_connect_signal(myData.pProxyWatcher, "StatusNotifierItemRegistered",
+ G_CALLBACK(on_new_item), myApplet, NULL);
+
+ dbus_g_proxy_add_signal(myData.pProxyWatcher, "StatusNotifierItemUnregistered",
+ G_TYPE_STRING, G_TYPE_INVALID); // ServiceUnregistered
+ dbus_g_proxy_connect_signal(myData.pProxyWatcher, "StatusNotifierItemUnregistered",
+ G_CALLBACK(on_removed_item), myApplet, NULL);
+ }
+ else // an asocial watcher like the Ubuntu's one, let's try with the IAS if availeble.
+ {
+ cd_debug ("=== no friendy watcher, let's try the 'application indicator'");
+ myData.bBrokenWatcher = TRUE;
+ if (myData.bIASWatched)
+ cd_satus_notifier_get_items_from_ias ();
+ }
+ CD_APPLET_LEAVE ();
+}
+static void _on_watcher_owner_changed (gboolean bOwned, gpointer data)
+{
+ cd_debug ("=== Watcher is on the bus (%d)", bOwned);
+ CD_APPLET_ENTER;
+
+ if (bOwned)
+ {
+ myData.bNoWatcher = FALSE;
+ // set up a proxy to the Watcher
+ myData.pProxyWatcher = cairo_dock_create_new_session_proxy (
+ CD_STATUS_NOTIFIER_WATCHER_ADDR,
+ CD_STATUS_NOTIFIER_WATCHER_OBJ,
+ CD_STATUS_NOTIFIER_WATCHER_IFACE); // whenever it appears on the bus, we'll get it.
+
+ // and register to it.
+ cd_debug ("=== register to the it");
+ dbus_g_proxy_begin_call (myData.pProxyWatcher, "RegisterStatusNotifierHost", // RegisterNotificationHost
+ (DBusGProxyCallNotify)_on_register_host,
+ myApplet,
+ (GDestroyNotify) NULL,
+ G_TYPE_STRING, myData.cHostName,
+ G_TYPE_INVALID);
+ CD_APPLET_SET_IMAGE_ON_MY_ICON (NULL); // remove the broken image if it was set beforehand, to get the default icon in the items GUI.
+ }
+ else // no more watcher on the bus.
+ {
+ g_object_unref (myData.pProxyWatcher);
+ myData.pProxyWatcher = NULL;
+
+ g_object_unref (myData.pProxyWatcherProps);
+ myData.pProxyWatcherProps = NULL;
+
+ g_list_foreach (myData.pItems, (GFunc) cd_free_item, NULL);
+ g_list_free (myData.pItems);
+ myData.pItems = NULL;
+
+ g_hash_table_remove_all (myData.pThemePaths);
+
+ // empty the list of items and redraw.
+ if (! myConfig.bCompactMode)
+ {
+ CD_APPLET_DELETE_MY_ICONS_LIST;
+ }
+ else
+ {
+ // draw an 'failed' image to not have an empty icon.
+ CD_APPLET_SET_IMAGE_ON_MY_ICON (MY_APPLET_SHARE_DATA_DIR"/icon-broken.svg");
+ }
+ myData.bBrokenWatcher = FALSE;
+
+ myData.bNoWatcher = TRUE;
+ cd_satus_notifier_launch_our_watcher ();
+ }
+ CD_APPLET_LEAVE ();
+}
+static void _on_detect_watcher (gboolean bPresent, gpointer data)
+{
+ cd_debug ("=== Watcher is present: %d", bPresent);
+ CD_APPLET_ENTER;
+ s_pDetectWatcherCall = NULL;
+ // if present, set up proxy.
+ if (bPresent)
+ {
+ _on_watcher_owner_changed (TRUE, NULL);
+ }
+ else if (myConfig.bCompactMode) // in compact mode, draw a 'failed' image to not have an empty icon.
+ {
+ myData.bNoWatcher = TRUE;
+ cd_satus_notifier_launch_our_watcher ();
+ CD_APPLET_SET_IMAGE_ON_MY_ICON (MY_APPLET_SHARE_DATA_DIR"/icon-broken.svg");
+ }
+
+ // watch whenever the Watcher goes up or down.
+ cairo_dock_watch_dbus_name_owner (CD_STATUS_NOTIFIER_WATCHER_ADDR,
+ (CairoDockDbusNameOwnerChangedFunc) _on_watcher_owner_changed,
+ NULL);
+ CD_APPLET_LEAVE ();
+}
+
+void cd_satus_notifier_detect_watcher (void)
+{
+ s_pDetectWatcherCall = cairo_dock_dbus_detect_application_async (CD_STATUS_NOTIFIER_WATCHER_ADDR,
+ (CairoDockOnAppliPresentOnDbus) _on_detect_watcher,
+ NULL);
+}
+
+void cd_satus_notifier_unregister_from_watcher (void)
+{
+ if (myData.pProxyWatcher != NULL)
+ {
+ g_object_unref (myData.pProxyWatcher);
+ g_object_unref (myData.pProxyWatcherProps);
+ }
+
+ if (s_pDetectWatcherCall != NULL)
+ {
+ DBusGProxy *pProxy = cairo_dock_get_main_proxy ();
+ dbus_g_proxy_cancel_call (pProxy, s_pDetectWatcherCall);
+ s_pDetectWatcherCall = NULL;
+ }
+ cairo_dock_stop_watching_dbus_name_owner (CD_STATUS_NOTIFIER_WATCHER_ADDR,
+ (CairoDockOnAppliPresentOnDbus) _on_detect_watcher);
+}
=== added file 'Status-Notifier/src/applet-host-kde.h'
--- Status-Notifier/src/applet-host-kde.h 1970-01-01 00:00:00 +0000
+++ Status-Notifier/src/applet-host-kde.h 2011-08-09 20:07:46 +0000
@@ -0,0 +1,30 @@
+/**
+* This file is a part of the Cairo-Dock project
+*
+* Copyright : (C) see the 'copyright' file.
+* E-mail : see the 'copyright' file.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 3
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef __APPLET_HOST_KDE__
+#define __APPLET_HOST_KDE__
+
+
+void cd_satus_notifier_detect_watcher (void);
+
+
+void cd_satus_notifier_unregister_from_watcher (void);
+
+
+#endif
=== modified file 'Status-Notifier/src/applet-host.c'
--- Status-Notifier/src/applet-host.c 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-host.c 2011-08-09 20:07:46 +0000
@@ -26,133 +26,12 @@
#include "applet-item.h"
#include "applet-draw.h"
#include "applet-host.h"
+#include "applet-host-kde.h"
+#include "applet-host-ias.h"
// our address basename
#define CD_STATUS_NOTIFIER_HOST_ADDR "org.kde.StatusNotifierHost"
-// KDE watcher (old names)
-//~ #define CD_STATUS_NOTIFIER_WATCHER_ADDR2 "org.kde.NotificationItemWatcher"
-//~ #define CD_STATUS_NOTIFIER_WATCHER_OBJ2 "/NotificationItemWatcher"
-//~ #define CD_STATUS_NOTIFIER_WATCHER_IFACE2 "org.kde.NotificationItemWatcher"
-
-// KDE watcher
-#define CD_STATUS_NOTIFIER_WATCHER_ADDR "org.kde.StatusNotifierWatcher"
-#define CD_STATUS_NOTIFIER_WATCHER_OBJ "/StatusNotifierWatcher"
-#define CD_STATUS_NOTIFIER_WATCHER_IFACE "org.kde.StatusNotifierWatcher"
-
-// Ubuntu sort-of-high-level-Watcher (new or old address)
-#if (INDICATOR_OLD_NAMES == 0) // Natty
-#define CD_INDICATOR_APPLICATION_ADDR "com.canonical.indicator.application"
-#define CD_INDICATOR_APPLICATION_OBJ "/com/canonical/indicator/application/service"
-#define CD_INDICATOR_APPLICATION_IFACE "com.canonical.indicator.application.service"
-#else
-#define CD_INDICATOR_APPLICATION_ADDR "org.ayatana.indicator.application"
-#define CD_INDICATOR_APPLICATION_OBJ "/org/ayatana/indicator/application/service"
-#define CD_INDICATOR_APPLICATION_IFACE "org.ayatana.indicator.application.service"
-#endif
-
-// Ubuntu Indicator Service
-#define CD_INDICATOR_SERVICE_INTERFACE "org.ayatana.indicator.service"
-#define CD_INDICATOR_SERVICE_OBJECT "/org/ayatana/indicator/service"
-
-static DBusGProxyCall *s_pDetectWatcherCall = NULL;
-static DBusGProxyCall *s_pDetectIASCall = NULL;
-
-#if (INDICATOR_OLD_NAMES != 0) // Maverick
-static void _cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- //cd_debug ("=== %s ()\n", __func__);
- typedef void (*GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING) (
- gpointer data1,
- gchar *arg_1,
- gint arg_2,
- gchar *arg_3,
- gchar *arg_4,
- gchar *arg_5,
- gchar *arg_6,
- gchar *arg_7,
- gpointer data2);
- register GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
- g_return_if_fail (n_param_values == 8); // return_value est NULL ici, car la callback ne renvoit rien.
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- (char*) g_value_get_string (param_values + 1),
- g_value_get_int (param_values + 2),
- (char*) g_value_get_string (param_values + 3),
- (char*) g_value_get_string (param_values + 4),
- (char*) g_value_get_string (param_values + 5),
- (char*) g_value_get_string (param_values + 6),
- (char*) g_value_get_string (param_values + 7),
- data2);
-}
-#else // Natty
-static void _cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- //cd_debug ("=== %s ()\n", __func__);
- typedef void (*GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING) (
- gpointer data1,
- gchar *arg_1,
- gint arg_2,
- gchar *arg_3,
- gchar *arg_4,
- gchar *arg_5,
- gchar *arg_6,
- gchar *arg_7,
- gchar *arg_8,
- gpointer data2);
- register GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
- g_return_if_fail (n_param_values == 9); // return_value est NULL ici, car la callback ne renvoit rien.
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- (char*) g_value_get_string (param_values + 1),
- g_value_get_int (param_values + 2),
- (char*) g_value_get_string (param_values + 3),
- (char*) g_value_get_boxed (param_values + 4),
- (char*) g_value_get_string (param_values + 5),
- (char*) g_value_get_string (param_values + 6),
- (char*) g_value_get_string (param_values + 7),
- (char*) g_value_get_string (param_values + 8),
- data2);
-}
-#endif
static CDStatusNotifierItem * _cd_satus_notifier_find_item_from_service (const gchar *cService)
{
@@ -182,11 +61,11 @@
}
- ///////////////////////////////
- /// Signals add/remove item ///
-///////////////////////////////
+ ///////////////////////
+ /// Add/remove item ///
+///////////////////////
-static inline void _add_new_item (const gchar *cService, const gchar *cObjectPath, int iPosition)
+void cd_satus_notifier_add_new_item (const gchar *cService, const gchar *cObjectPath, int iPosition)
{
CDStatusNotifierItem *pItem = _cd_satus_notifier_find_item_from_service (cService);
g_return_if_fail (pItem == NULL); // on evite d'ajouter 2 fois le meme service.
@@ -213,7 +92,7 @@
}
}
-static inline void _remove_item (const gchar *cService, int iPosition)
+void cd_satus_notifier_remove_item (const gchar *cService, int iPosition)
{
CDStatusNotifierItem *pItem = (cService ? _cd_satus_notifier_find_item_from_service (cService) : _cd_satus_notifier_find_item_from_position (iPosition));
g_return_if_fail (pItem != NULL);
@@ -236,540 +115,10 @@
cd_free_item (pItem);
}
-static void on_new_item (DBusGProxy *proxy_watcher, const gchar *cService, CairoDockModuleInstance *myApplet)
-{
- CD_APPLET_ENTER;
- cd_debug ("=== %s (%s)", __func__, cService);
-
- _add_new_item (cService, NULL, -1); // on suppose que leur indicator-application ne mettra jamais -1 comme position.
-
- CD_APPLET_LEAVE ();
-}
-
-static void on_removed_item (DBusGProxy *proxy_watcher, const gchar *cService, CairoDockModuleInstance *myApplet)
-{
- CD_APPLET_ENTER;
- cd_debug ("=== %s (%s)", __func__, cService);
-
- gchar *str = strchr (cService, '/');
- if (str)
- *str = '\0';
-
- _remove_item (cService, -1);
-
- CD_APPLET_LEAVE ();
-}
-
-static void on_new_application (DBusGProxy *proxy_watcher, const gchar *cIconName, gint iPosition, const gchar *cAdress, const gchar *cObjectPath, const gchar *cIconThemePath, const gchar *cLabel, const gchar *cLabelGuide,
-#if (INDICATOR_OLD_NAMES == 0) // Natty
-const gchar *cAccessbleDesc, // WTF is this new param ??
-#endif
-CairoDockModuleInstance *myApplet)
-{
- CD_APPLET_ENTER;
- cd_debug ("=== %s (%s, %s, %s, %s, %d)", __func__, cAdress, cObjectPath, cIconName, cIconThemePath, iPosition);
- #if (INDICATOR_OLD_NAMES == 0) // Natty
- cd_debug (" %s", cAccessbleDesc);
- #endif
- /// position +1 for items placed after this one...
- CDStatusNotifierItem *pItem;
- GList *it;
- for (it = myData.pItems; it != NULL; it = it->next)
- {
- pItem = it->data;
- if (pItem->iPosition >= iPosition)
- {
- pItem->iPosition ++;
- cd_debug ("=== %s -> %d -> %d", pItem->cId, pItem->iPosition-1, pItem->iPosition);
- }
- }
-
- _add_new_item (cAdress, cObjectPath, iPosition);
-
- CD_APPLET_LEAVE ();
-}
-
-static void on_removed_application (DBusGProxy *proxy_watcher, gint iPosition, CairoDockModuleInstance *myApplet)
-{
- CD_APPLET_ENTER;
- cd_debug ("=== %s (%d)", __func__, iPosition);
-
- _remove_item (NULL, iPosition);
-
- /// position -1 for items placed after this one...
- CDStatusNotifierItem *pItem;
- GList *it;
- for (it = myData.pItems; it != NULL; it = it->next)
- {
- pItem = it->data;
- if (pItem->iPosition >= iPosition)
- {
- pItem->iPosition --;
- cd_debug ("=== %s -> %d -> %d", pItem->cId, pItem->iPosition+1, pItem->iPosition);
- }
- }
-
- CD_APPLET_LEAVE ();
-}
-
-
- /////////////////
- /// Get Items ///
-/////////////////
-
-static void _on_get_applications_from_service (DBusGProxy *proxy, DBusGProxyCall *call_id, CairoDockModuleInstance *myApplet)
-{
- cd_debug ("=== %s ()", __func__);
- CD_APPLET_ENTER;
-
- //\______________________ get the applications list from the service.
- GPtrArray *pApplications = NULL;
- GError *erreur = NULL;
- GType g_type_ptrarray = g_type_ptrarray = dbus_g_type_get_collection ("GPtrArray",
- dbus_g_type_get_struct("GValueArray",
- G_TYPE_STRING, // iconname
- G_TYPE_INT, // position
- G_TYPE_STRING, // dbusaddress
- DBUS_TYPE_G_OBJECT_PATH, // dbusobject
- G_TYPE_STRING, // iconpath
- G_TYPE_STRING, // label
- G_TYPE_STRING, // labelguide
- G_TYPE_INVALID));
- gboolean bSuccess = dbus_g_proxy_end_call (proxy,
- call_id,
- &erreur,
- g_type_ptrarray, &pApplications,
- G_TYPE_INVALID);
- if (erreur != NULL)
- {
- cd_debug ("=== couldn't get applications in the systray (%s)", erreur->message);
- g_error_free (erreur);
- erreur = NULL;
- }
- if (pApplications == NULL)
- CD_APPLET_LEAVE ();
-
- //\______________________ build each items.
- cd_debug ("=== got %d aplications", pApplications->len);
- guint i, j;
- GValueArray *va;
- GValue *v;
- CDStatusNotifierItem *pItem=NULL;
- //cd_debug ("=== %d apps in the systray", pApplications->len);
- for (i = 0; i < pApplications->len; i ++)
- {
- cd_debug ("=== %d) %p", i, pApplications->pdata[i]);
- va = pApplications->pdata[i];
- if (! va)
- continue;
-
- const gchar *cIconName = NULL;
- gint iPosition = -1;
- const gchar *cAdress = NULL;
- const gchar *cObjectPath = NULL;
- const gchar *cIconThemePath = NULL;
- const gchar *cLabel = NULL;
- const gchar *cLabelGuide = NULL;
-
- v = g_value_array_get_nth (va, 0);
- if (v && G_VALUE_HOLDS_STRING (v))
- cIconName = g_value_get_string (v);
-
- v = g_value_array_get_nth (va, 1);
- if (v && G_VALUE_HOLDS_INT (v))
- iPosition = g_value_get_int (v);
-
- v = g_value_array_get_nth (va, 2);
- if (v && G_VALUE_HOLDS_STRING (v))
- cAdress = g_value_get_string (v);
-
- v = g_value_array_get_nth (va, 3);
- if (v && G_VALUE_HOLDS_BOXED (v))
- cObjectPath = (gchar*)g_value_get_boxed (v);
-
- v = g_value_array_get_nth (va, 4);
- if (v && G_VALUE_HOLDS_STRING (v))
- cIconThemePath = g_value_get_string (v);
-
- v = g_value_array_get_nth (va, 5);
- if (v && G_VALUE_HOLDS_STRING (v))
- cLabel = g_value_get_string (v);
-
- v = g_value_array_get_nth (va, 6);
- if (v && G_VALUE_HOLDS_STRING (v))
- cLabelGuide = g_value_get_string (v);
-
- cd_debug ("=== + item {%s ; %d ; %s ; %s ; %s ; %s ; %s}",
- cIconName,
- iPosition,
- cAdress,
- cObjectPath,
- cIconThemePath,
- cLabel,
- cLabelGuide);
-
- pItem = cd_satus_notifier_create_item (cAdress, cObjectPath);
- if (! pItem)
- continue;
- if (pItem->iPosition == -1)
- pItem->iPosition = iPosition;
- if (pItem->cTitle == NULL && pItem->cLabel == NULL)
- pItem->cLabel = g_strdup (cLabel && *cLabel != '\0' ? cLabel : pItem->cId);
- myData.pItems = g_list_prepend (myData.pItems, pItem);
- }
-
- if (myConfig.bCompactMode)
- {
- cd_satus_notifier_reload_compact_mode ();
- }
- else
- {
- cd_satus_notifier_load_icons_from_items ();
- }
-
- g_ptr_array_free (pApplications, TRUE);
- CD_APPLET_LEAVE ();
-}
-
-static void _cd_satus_notifier_get_items_from_ias (void)
-{
- if (! myData.bIASWatched)
- return;
- cd_debug ("=== %s ()", __func__);
-
- g_return_if_fail (myData.pProxyIndicatorApplicationService == NULL);
-
- myData.pProxyIndicatorApplicationService = cairo_dock_create_new_session_proxy (
- CD_INDICATOR_APPLICATION_ADDR,
- CD_INDICATOR_APPLICATION_OBJ,
- CD_INDICATOR_APPLICATION_IFACE);
-
- // get the current items
- dbus_g_proxy_begin_call (myData.pProxyIndicatorApplicationService,
- "GetApplications",
- (DBusGProxyCallNotify)_on_get_applications_from_service,
- myApplet,
- (GDestroyNotify) NULL,
- G_TYPE_INVALID);
-
- // connect to the signals to keep the list of items up-to-date.
- #if (INDICATOR_OLD_NAMES != 0) // Maverick
- dbus_g_object_register_marshaller(_cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING,
- G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
- #else // Natty
- dbus_g_object_register_marshaller(_cd_cclosure_marshal_VOID__STRING_INT_STRING_STRING_STRING_STRING_STRING_STRING,
- G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INT, G_TYPE_STRING,
- #if (INDICATOR_OLD_NAMES != 0) // Maverick
- G_TYPE_STRING, // dbusobject
- #else // Natty
- DBUS_TYPE_G_OBJECT_PATH, // dbusobject
- #endif
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
- #endif
- dbus_g_proxy_add_signal(myData.pProxyIndicatorApplicationService, "ApplicationAdded",
- G_TYPE_STRING, // iconname
- G_TYPE_INT, // position
- G_TYPE_STRING, // dbusaddress
- #if (INDICATOR_OLD_NAMES != 0) // Maverick
- G_TYPE_STRING, // dbusobject
- #else // Natty
- DBUS_TYPE_G_OBJECT_PATH, // dbusobject
- #endif
- G_TYPE_STRING, // iconpath
- G_TYPE_STRING, // label
- G_TYPE_STRING, // labelguide
- #if (INDICATOR_OLD_NAMES == 0) // Natty
- G_TYPE_STRING, // accessibledesc
- #endif
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal(myData.pProxyIndicatorApplicationService, "ApplicationAdded",
- G_CALLBACK(on_new_application), myApplet, NULL);
-
- dbus_g_proxy_add_signal(myData.pProxyIndicatorApplicationService, "ApplicationRemoved",
- G_TYPE_INT, // position
- G_TYPE_INVALID);
- dbus_g_proxy_connect_signal(myData.pProxyIndicatorApplicationService, "ApplicationRemoved",
- G_CALLBACK(on_removed_application), myApplet, NULL);
-}
-
-static void _on_get_applications_from_watcher (DBusGProxy *proxy, DBusGProxyCall *call_id, CairoDockModuleInstance *myApplet)
-{
- cd_debug ("=== %s ()", __func__);
- CD_APPLET_ENTER;
-
- gchar **pApplications = NULL;
- GError *erreur = NULL;
- gboolean bSuccess = dbus_g_proxy_end_call (proxy,
- call_id,
- &erreur,
- G_TYPE_STRV, &pApplications,
- G_TYPE_INVALID);
- if (erreur != NULL)
- {
- cd_debug ("=== couldn't get applications from the watcher (%s)", erreur->message);
- g_error_free (erreur);
- erreur = NULL;
- bSuccess = FALSE;
- }
-
- if (bSuccess)
- {
- if (pApplications == NULL)
- CD_APPLET_LEAVE ();
- guint i;
- CDStatusNotifierItem *pItem;
- for (i = 0; pApplications[i] != NULL; i ++)
- {
- pItem = cd_satus_notifier_create_item (pApplications[i], NULL);
- if (! pItem)
- continue;
- cd_debug ("=== => + %s", pItem->cTitle);
- myData.pItems = g_list_prepend (myData.pItems, pItem);
- }
-
- g_strfreev (pApplications);
-
- if (myConfig.bCompactMode)
- {
- cd_satus_notifier_reload_compact_mode ();
- }
- else
- {
- cd_satus_notifier_load_icons_from_items ();
- }
- }
- else // un watcher asocial comme celui d'Ubuntu, on essaye avec l'"indicator-application".
- {
- cd_debug ("=== this watcher is not so friendly, let's try the 'application indicator'");
- myData.bBrokenWatcher = TRUE;
- if (myData.bIASWatched)
- _cd_satus_notifier_get_items_from_ias ();
- }
- CD_APPLET_LEAVE ();
-}
-
-
- /////////////////////////////////
- /// connection to the Watcher ///
-/////////////////////////////////
-
-static void _on_register_host (DBusGProxy *proxy, DBusGProxyCall *call_id, CairoDockModuleInstance *myApplet)
-{
- cd_debug ("=== %s ()", __func__);
- CD_APPLET_ENTER;
- GError *erreur = NULL;
- gboolean bSuccess = dbus_g_proxy_end_call (proxy,
- call_id,
- &erreur,
- G_TYPE_INVALID);
- if (erreur != NULL)
- {
- cd_debug ("couldn't register to the Notification Watcher (%s)", erreur->message);
- g_error_free (erreur);
- erreur = NULL;
- bSuccess = FALSE;
- }
-
- if (bSuccess) // we are friend now, let's ask him the current items.
- {
- cd_debug ("=== found a friendly watcher, now ask for the items...");
- // get the current items
- myData.pProxyWatcherProps = cairo_dock_create_new_session_proxy (
- CD_STATUS_NOTIFIER_WATCHER_ADDR,
- CD_STATUS_NOTIFIER_WATCHER_OBJ,
- DBUS_INTERFACE_PROPERTIES);
- dbus_g_proxy_begin_call (myData.pProxyWatcherProps,
- "Get",
- (DBusGProxyCallNotify)_on_get_applications_from_watcher,
- myApplet,
- (GDestroyNotify) NULL,
- G_TYPE_STRING, CD_STATUS_NOTIFIER_WATCHER_IFACE,
- G_TYPE_STRING, "RegisteredStatusNotifierItems",
- G_TYPE_INVALID);
-
- // connect to the signals to keep the list of items up-to-date.
- dbus_g_proxy_add_signal(myData.pProxyWatcher, "ServiceRegistered",
- G_TYPE_STRING, G_TYPE_INVALID); // StatusNotifierItemRegistered
- dbus_g_proxy_connect_signal(myData.pProxyWatcher, "ServiceRegistered",
- G_CALLBACK(on_new_item), myApplet, NULL);
-
- dbus_g_proxy_add_signal(myData.pProxyWatcher, "ServiceUnregistered",
- G_TYPE_STRING, G_TYPE_INVALID); // StatusNotifierItemUnregistered
- dbus_g_proxy_connect_signal(myData.pProxyWatcher, "ServiceUnregistered",
- G_CALLBACK(on_removed_item), myApplet, NULL);
- }
- else // an asocial watcher like the Ubuntu's one, let's try with the IAS if availeble.
- {
- cd_debug ("=== no friendy watcher, let's try the 'application indicator'");
- myData.bBrokenWatcher = TRUE;
- if (myData.bIASWatched)
- _cd_satus_notifier_get_items_from_ias ();
- }
- CD_APPLET_LEAVE ();
-}
-static void _on_watcher_owner_changed (gboolean bOwned, gpointer data)
-{
- cd_debug ("=== Watcher is on the bus (%d)", bOwned);
-
- if (bOwned)
- {
- // set up a proxy to the Watcher
- myData.pProxyWatcher = cairo_dock_create_new_session_proxy (
- CD_STATUS_NOTIFIER_WATCHER_ADDR,
- CD_STATUS_NOTIFIER_WATCHER_OBJ,
- CD_STATUS_NOTIFIER_WATCHER_IFACE); // whenever it appears on the bus, we'll get it.
-
- // and register to it.
- cd_debug ("=== register to the it");
- dbus_g_proxy_begin_call (myData.pProxyWatcher, "RegisterNotificationHost",
- (DBusGProxyCallNotify)_on_register_host,
- myApplet,
- (GDestroyNotify) NULL,
- G_TYPE_STRING, myData.cHostName,
- G_TYPE_INVALID);
- }
- else // no more watcher on the bus.
- {
- g_object_unref (myData.pProxyWatcher);
- myData.pProxyWatcher = NULL;
-
- g_object_unref (myData.pProxyWatcherProps);
- myData.pProxyWatcherProps = NULL;
-
- g_list_foreach (myData.pItems, (GFunc) cd_free_item, NULL);
- g_list_free (myData.pItems);
- myData.pItems = NULL;
-
- g_hash_table_remove_all (myData.pThemePaths);
-
- // empty the list of items and redraw.
- if (! myConfig.bCompactMode)
- {
- CD_APPLET_DELETE_MY_ICONS_LIST;
- }
- else
- {
- // draw an 'failed' image to not have an empty icon.
- CD_APPLET_SET_IMAGE_ON_MY_ICON (MY_APPLET_SHARE_DATA_DIR"/icon-broken.svg");
- }
- myData.bBrokenWatcher = FALSE;
- }
-}
-static void _on_detect_watcher (gboolean bPresent, gpointer data)
-{
- cd_debug ("=== Watcher is present: %d", bPresent);
- s_pDetectWatcherCall = NULL;
- // if present, set up proxy.
- if (bPresent)
- {
- _on_watcher_owner_changed (TRUE, NULL);
- }
- else if (myConfig.bCompactMode) // in compact mode, draw an 'failed' image to not have an empty icon.
- {
- CD_APPLET_SET_IMAGE_ON_MY_ICON (MY_APPLET_SHARE_DATA_DIR"/icon-broken.svg");
- }
-
- // watch whenever the Watcher goes up or down.
- cairo_dock_watch_dbus_name_owner (CD_STATUS_NOTIFIER_WATCHER_ADDR,
- (CairoDockDbusNameOwnerChangedFunc) _on_watcher_owner_changed,
- NULL);
-}
-
- /////////////////////////////
- /// connection to the IAS ///
-/////////////////////////////
-
-static void _on_start_service (DBusGProxy *proxy, guint status, GError *error, gpointer user_data)
-{
- // if service has not started, then we'll assume we don't need it (eg.: KDE)
- if (error != NULL) // couldn't start the service.
- {
- cd_debug ("=== Unable to start the indicator service (%s), assuming we don't need it", error->message);
- return;
- }
- if (status != DBUS_START_REPLY_SUCCESS && status != DBUS_START_REPLY_ALREADY_RUNNING) // started but wrong status.
- {
- cd_debug ("=== Unable to start the indicator service (got status %d), assuming we don't need it", status);
- return;
- }
- cd_debug ("=== Indicator Service has started");
-}
-static void _on_watch_service (DBusGProxy *proxy, DBusGProxyCall *call, gpointer data)
-{
- GError *error = NULL;
- guint service_api_version=0, this_service_version=0;
- dbus_g_proxy_end_call (proxy, call, &error,
- G_TYPE_UINT, &service_api_version,
- G_TYPE_UINT, &this_service_version,
- G_TYPE_INVALID);
- cd_debug ("=== got indicator service (API: %d, service: %d, broken watcher: %d)", service_api_version, this_service_version, myData.bBrokenWatcher);
-
- if (service_api_version > 0) /// shouldn't the 2 versions be equal ?...
- {
- myData.bIASWatched = TRUE; // now we're friend with the IAS
-
- if (myData.bBrokenWatcher) // if the watcher is not our friend, let's ask the IAS the current items.
- {
- _cd_satus_notifier_get_items_from_ias ();
- }
- }
-}
-static void _on_ias_owner_changed (gboolean bOwned, gpointer data)
-{
- cd_debug ("=== Indicator Applications Service is on the bus (%d)", bOwned);
-
- if (bOwned)
- {
- // set up a proxy to the Service
- myData.pProxyIndicatorService = cairo_dock_create_new_session_proxy (
- CD_INDICATOR_APPLICATION_ADDR,
- CD_INDICATOR_SERVICE_OBJECT,
- CD_INDICATOR_SERVICE_INTERFACE);
-
- // and watch it.
- cd_debug ("=== watch it");
- dbus_g_proxy_begin_call (myData.pProxyIndicatorService,
- "Watch",
- (DBusGProxyCallNotify)_on_watch_service,
- myApplet,
- (GDestroyNotify) NULL,
- G_TYPE_INVALID);
- }
- else // no more IAS on the bus.
- {
- g_object_unref (myData.pProxyIndicatorService);
- myData.pProxyIndicatorService = NULL;
-
- g_object_unref (myData.pProxyIndicatorApplicationService);
- myData.pProxyIndicatorApplicationService = NULL;
-
- myData.bIASWatched = FALSE;
- }
-}
-static void _on_detect_ias (gboolean bPresent, gpointer data)
-{
- cd_debug ("=== Indicator Applications Service is present: %d", bPresent);
- s_pDetectIASCall = NULL;
- // if present, set up proxy, else try to start the service.
- if (bPresent)
- {
- _on_ias_owner_changed (TRUE, NULL);
- }
- else // not present, maybe the service is not started => try starting it.
- {
- cd_debug ("=== try to start the Indicator Service...");
- DBusGProxy *dbus_proxy = cairo_dock_get_main_proxy ();
- org_freedesktop_DBus_start_service_by_name_async (dbus_proxy,
- CD_INDICATOR_APPLICATION_ADDR,
- 0,
- _on_start_service,
- myApplet);
- }
- // watch whenever the Service goes up or down.
- cairo_dock_watch_dbus_name_owner (CD_STATUS_NOTIFIER_WATCHER_ADDR,
- (CairoDockDbusNameOwnerChangedFunc) _on_ias_owner_changed,
- NULL);
-}
+
+ //////////////////////////
+ /// Start/stop service ///
+//////////////////////////
/* watch Watcher + IAS ->
Watcher ON -> make proxy -> register -> ok => Get items -> ok => load items
@@ -791,49 +140,38 @@
cairo_dock_register_service_name (myData.cHostName);
// see if a Watcher and/or an Indicator Application Service (IAS) is on the bus.
- s_pDetectWatcherCall = cairo_dock_dbus_detect_application_async (CD_STATUS_NOTIFIER_WATCHER_ADDR,
- (CairoDockOnAppliPresentOnDbus) _on_detect_watcher,
- NULL);
- s_pDetectIASCall = cairo_dock_dbus_detect_application_async (CD_INDICATOR_APPLICATION_ADDR,
- (CairoDockOnAppliPresentOnDbus) _on_detect_ias,
- NULL);
+ cd_satus_notifier_detect_watcher ();
+ cd_satus_notifier_detect_ias ();
}
void cd_satus_notifier_stop_service (void)
{
- if (myData.pProxyWatcher != NULL)
- {
- g_object_unref (myData.pProxyWatcher);
- g_object_unref (myData.pProxyWatcherProps);
- }
- if (myData.pProxyIndicatorApplicationService != NULL)
- {
- g_object_unref (myData.pProxyIndicatorApplicationService);
- g_object_unref (myData.pProxyIndicatorService);
- }
-
- if (s_pDetectWatcherCall != NULL)
- {
- DBusGProxy *pProxy = cairo_dock_get_main_proxy ();
- dbus_g_proxy_cancel_call (pProxy, s_pDetectWatcherCall);
- }
- if (s_pDetectIASCall != NULL)
- {
- DBusGProxy *pProxy = cairo_dock_get_main_proxy ();
- dbus_g_proxy_cancel_call (pProxy, s_pDetectIASCall);
- }
-
+ // disconnect from the watcher
+ cd_satus_notifier_unregister_from_watcher ();
+ cd_satus_notifier_unregister_from_ias ();
+
+ // free all the items.
g_list_foreach (myData.pItems, (GFunc) cd_free_item, NULL);
g_list_free (myData.pItems);
if (! myConfig.bCompactMode)
CD_APPLET_DELETE_MY_ICONS_LIST;
+ // free the themes table.
g_hash_table_destroy (myData.pThemePaths);
}
+void cd_satus_notifier_launch_our_watcher (void)
+{
+ if (myData.bNoIAS && myData.bNoWatcher)
+ {
+ cd_message ("starting our own watcher...\n");
+ cairo_dock_launch_command (CD_PLUGINS_DIR"/status-notifier-watcher");
+ }
+}
+
///////////////////
/// THEMES PATH ///
///////////////////
=== modified file 'Status-Notifier/src/applet-host.h'
--- Status-Notifier/src/applet-host.h 2010-09-07 02:38:17 +0000
+++ Status-Notifier/src/applet-host.h 2011-08-09 20:07:46 +0000
@@ -23,11 +23,17 @@
#include <cairo-dock.h>
+void cd_satus_notifier_add_new_item (const gchar *cService, const gchar *cObjectPath, int iPosition);
+
+void cd_satus_notifier_remove_item (const gchar *cService, int iPosition);
+
+
void cd_satus_notifier_launch_service (void);
-
void cd_satus_notifier_stop_service (void);
+void cd_satus_notifier_launch_our_watcher (void);
+
void cd_satus_notifier_add_theme_path (const gchar * cThemePath);
=== modified file 'Status-Notifier/src/applet-init.c'
--- Status-Notifier/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -32,7 +32,7 @@
CAIRO_DOCK_CATEGORY_APPLET_DESKTOP,
N_("A <b>notification area</b> for your dock\n"
"Programs can use it to display their current status.\n"
- "If a program doesn't appear inside when it should, it's probably because it doesn't support the this feature yet. Please fill a bug report to the devs."),
+ "If a program doesn't appear inside when it should, it's probably because it doesn't support this feature yet. Please fill a bug report to the devs."),
"Fabounet (Fabrice Rey)")
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
CD_APPLET_REDEFINE_TITLE (N_("Notification Area"))
=== modified file 'Status-Notifier/src/applet-item.c'
--- Status-Notifier/src/applet-item.c 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-item.c 2011-08-09 20:07:46 +0000
@@ -353,23 +353,27 @@
CDStatusNotifierItem *cd_satus_notifier_create_item (const gchar *cService, const gchar *cObjectPath)
{
g_return_val_if_fail (cService != NULL, NULL);
- gchar *str = strchr (cService, '/');
+ //g_print ("=== %s (%s)\n", __func__, cService);
+
+ gchar *str = strchr (cService, '/'); // just to be sure.
if (str)
*str = '\0';
- //g_print ("=== %s (%s)\n", __func__, cService);
// special case for Ubuntu indicators: we don't know their object path.
if (cObjectPath != NULL && strncmp (cObjectPath, CD_INDICATOR_APPLICATION_ITEM_OBJ, strlen (CD_INDICATOR_APPLICATION_ITEM_OBJ)) == 0)
{
+ // I think this is because this path is actually the menu path, and fortunately it's just under the item object's path.
gchar *str = strrchr (cObjectPath, '/');
if (str)
*str = '\0';
}
- else
+ else if (cObjectPath == NULL || *cObjectPath == '\0') // no path, let's assume it's the common one.
{
cObjectPath = CD_STATUS_NOTIFIER_ITEM_OBJ;
}
+ //g_print ("=== %s (cObjectPath: %s)\n", __func__, cObjectPath);
+
//\_________________ get the properties of the item.
DBusGProxy *pProxyItemProp = cairo_dock_create_new_session_proxy (
cService,
@@ -378,7 +382,9 @@
if (pProxyItemProp == NULL)
return NULL;
//g_print ("=== owner : %s\n", dbus_g_proxy_get_bus_name (pProxyItemProp));
-
+
+ cd_debug ("%s, %s, %s", cService, cObjectPath, dbus_g_proxy_get_bus_name (pProxyItemProp));
+
//g_print ("=== getting properties ...\n");
GHashTable *hProps = cairo_dock_dbus_get_all_properties (pProxyItemProp, CD_STATUS_NOTIFIER_ITEM_IFACE);
if (hProps == NULL)
=== modified file 'Status-Notifier/src/applet-notifications.c'
--- Status-Notifier/src/applet-notifications.c 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-notifications.c 2011-08-09 20:07:46 +0000
@@ -83,17 +83,51 @@
return pItem;
}
+
+static inline gboolean _popup_menu (CDStatusNotifierItem *pItem, Icon *pIcon, CairoContainer *pContainer)
+{
+ gboolean r = FALSE;
+ if (pItem->cMenuPath != NULL)
+ {
+ if (pItem->pMenu == NULL)
+ pItem->pMenu = dbusmenu_gtkmenu_new ((gchar *)pItem->cService, (gchar *)pItem->cMenuPath);
+ if (pItem->pMenu != NULL)
+ {
+ cairo_dock_popup_menu_on_icon (GTK_WIDGET (pItem->pMenu), pIcon, pContainer);
+ r = TRUE;
+ }
+ }
+
+ if (!r)
+ {
+ r = _emit_click (pItem, pIcon, pContainer, "ContextMenu");
+ }
+
+ if (!r)
+ {
+ r = _emit_click (pItem, pIcon, pContainer, "Activate");
+ }
+}
+
CD_APPLET_ON_CLICK_BEGIN
CDStatusNotifierItem *pItem = _get_item (CD_APPLET_CLICKED_ICON, CD_APPLET_CLICKED_CONTAINER);
//g_print ("click on item '%s'\n", pItem?pItem->cService:"none");
if (pItem != NULL)
{
- gboolean r = _emit_click (pItem, CD_APPLET_CLICKED_ICON, CD_APPLET_CLICKED_CONTAINER, "Activate");
- if (!r)
- {
- if (pItem->cId != NULL)
+ if (myConfig.bMenuOnLeftClick)
+ {
+ _popup_menu (pItem, CD_APPLET_CLICKED_ICON, CD_APPLET_CLICKED_CONTAINER);
+ }
+ else
+ {
+ gboolean r = _emit_click (pItem, CD_APPLET_CLICKED_ICON, CD_APPLET_CLICKED_CONTAINER, "Activate");
+ if (!r)
{
- cairo_dock_launch_command (pItem->cId); // lancer une nouvelle fois l'appli montre sa fenetre (enfin, generalement).
+ if (pItem->cId != NULL)
+ {
+ /// TODO: try to get the icon in the taskbar, because launch the command doesn't raise the window if it was already visible (but it does pop up it if it was hidden, usually).
+ cairo_dock_launch_command (pItem->cId); // lancer une nouvelle fois l'appli montre sa fenetre (enfin, generalement).
+ }
}
}
}
@@ -137,29 +171,15 @@
gboolean cd_status_notifier_on_right_click (CairoDockModuleInstance *myApplet, Icon *pClickedIcon, CairoContainer *pClickedContainer, GtkWidget *pAppletMenu, gboolean *bDiscardMenu)
{
- if (pClickedIcon == NULL)
+ if (pClickedIcon == NULL || myConfig.bMenuOnLeftClick)
return CAIRO_DOCK_LET_PASS_NOTIFICATION;
CD_APPLET_ENTER;
- CDStatusNotifierItem *pItem = _get_item (CD_APPLET_CLICKED_ICON, CD_APPLET_CLICKED_CONTAINER);
+ CDStatusNotifierItem *pItem = _get_item (pClickedIcon, pClickedContainer);
if (pItem != NULL)
{
- gboolean r = FALSE;
- if (pItem->cMenuPath != NULL)
- {
- if (pItem->pMenu == NULL)
- pItem->pMenu = dbusmenu_gtkmenu_new ((gchar *)pItem->cService, (gchar *)pItem->cMenuPath);
- if (pItem->pMenu != NULL)
- {
- cairo_dock_popup_menu_on_icon (GTK_WIDGET (pItem->pMenu), pClickedIcon, pClickedContainer);
- r = TRUE;
- }
- }
-
- if (!r)
- {
- _emit_click (pItem, pClickedIcon, pClickedContainer, "ContextMenu");
- }
+ _popup_menu (pItem, pClickedIcon, pClickedContainer);
+
*bDiscardMenu = TRUE;
CD_APPLET_LEAVE (CAIRO_DOCK_INTERCEPT_NOTIFICATION);
}
=== modified file 'Status-Notifier/src/applet-struct.h'
--- Status-Notifier/src/applet-struct.h 2011-04-20 20:46:51 +0000
+++ Status-Notifier/src/applet-struct.h 2011-08-09 20:07:46 +0000
@@ -38,6 +38,7 @@
gboolean bCompactMode; // les items sur l'icone principale ou dans un sous-dock.
gboolean bResizeIcon; // si compact, redimensionner l'icone principale automatiquement.
gint iNbLines; // si compact et redimensionnement auto, nbre de lignes (colonnes en mode vertical).
+ gboolean bMenuOnLeftClick;
} ;
@@ -105,6 +106,8 @@
DBusGProxy *pProxyIndicatorApplicationService;
gboolean bIASWatched;
gboolean bBrokenWatcher;
+ gboolean bNoIAS;
+ gboolean bNoWatcher;
GList *pItems; // list of all items.
GHashTable *pThemePaths;
gint iNbLines, iNbColumns, iItemSize; // agencement compact.
=== added directory 'Status-Notifier/watcher'
=== added file 'Status-Notifier/watcher/CMakeLists.txt'
--- Status-Notifier/watcher/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ Status-Notifier/watcher/CMakeLists.txt 2011-08-09 20:07:46 +0000
@@ -0,0 +1,18 @@
+
+########### install files ###############
+
+#if (NOT "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+ # copy *.py to current binary dir (cleaner)
+# execute_process(COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/setup.py" "${CMAKE_CURRENT_SOURCE_DIR}/status-notifier-watcher.py" ${CMAKE_CURRENT_BINARY_DIR})
+# exec_program("${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}" ARGS "setup.py" "-q" "build")
+#endif()
+# Run a custom script with 'make install'
+#add_custom_target(watcher_pyc ALL)
+#configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PythonInstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/PythonInstall.cmake)
+#set_target_properties(watcher_pyc PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/PythonInstall.cmake)
+# execute_process(COMMAND python setup.py install ${DEBIAN_INSTALL_LAYOUT})
+
+install(FILES status-notifier-watcher.py
+ DESTINATION ${pluginsdir}
+ RENAME status-notifier-watcher
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
=== added file 'Status-Notifier/watcher/org.kde.StatusNotifierWatcher.xml'
--- Status-Notifier/watcher/org.kde.StatusNotifierWatcher.xml 1970-01-01 00:00:00 +0000
+++ Status-Notifier/watcher/org.kde.StatusNotifierWatcher.xml 2011-08-09 20:07:46 +0000
@@ -0,0 +1,42 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="org.kde.StatusNotifierWatcher">
+
+ <!-- methods -->
+ <method name="RegisterStatusNotifierItem">
+ <arg name="service" type="s" direction="in"/>
+ </method>
+
+ <method name="RegisterStatusNotifierHost">
+ <arg name="service" type="s" direction="in"/>
+ </method>
+
+
+ <!-- properties -->
+
+ <property name="RegisteredStatusNotifierItems" type="as" access="read">
+ <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QStringList"/>
+ </property>
+
+ <property name="IsStatusNotifierHostRegistered" type="b" access="read"/>
+
+ <property name="ProtocolVersion" type="i" access="read"/>
+
+
+ <!-- signals -->
+
+ <signal name="StatusNotifierItemRegistered">
+ <arg type="s"/>
+ </signal>
+
+ <signal name="StatusNotifierItemUnregistered">
+ <arg type="s"/>
+ </signal>
+
+ <signal name="StatusNotifierHostRegistered">
+ </signal>
+
+ <signal name="StatusNotifierHostUnregistered">
+ </signal>
+ </interface>
+</node>
=== added file 'Status-Notifier/watcher/status-notifier-watcher.py'
--- Status-Notifier/watcher/status-notifier-watcher.py 1970-01-01 00:00:00 +0000
+++ Status-Notifier/watcher/status-notifier-watcher.py 2011-08-09 20:07:46 +0000
@@ -0,0 +1,131 @@
+#!/usr/bin/python
+#
+# Author: Fabrice Rey
+# License: GPL-3
+#
+# Developped as a part of Cairo-Dock, but usable as a stand-alone systray daemon.
+# The code follows the same logic as the KDE watcher, to ensure a complete compatibility.
+
+import sys
+import glib
+import gobject
+import dbus, dbus.service
+from dbus.mainloop.glib import DBusGMainLoop
+
+class SNWatcher(dbus.service.Object):
+ bus_name_str = 'org.kde.StatusNotifierWatcher'
+ bus_obj_str = '/StatusNotifierWatcher'
+ bus_iface_str = 'org.kde.StatusNotifierWatcher'
+ items_list = [] # array of service+path
+ hosts_list = [] # array of services
+
+ def __init__(self):
+ DBusGMainLoop(set_as_default=True)
+ try:
+ self.bus = dbus.SessionBus()
+ bus_name = dbus.service.BusName (self.bus_name_str, self.bus)
+ print "registered a watcher:",bus_name
+ dbus.service.Object.__init__(self, bus_name, self.bus_obj_str)
+ except Exception, exception:
+ print 'Could not open dbus. Uncaught exception.'
+ return
+
+ bus_object = self.bus.get_object(dbus.BUS_DAEMON_NAME, dbus.BUS_DAEMON_PATH)
+ self.main = dbus.Interface(bus_object, dbus.BUS_DAEMON_IFACE)
+ self.main.connect_to_signal("NameOwnerChanged", self.on_name_owner_changed)
+
+ self.loop = gobject.MainLoop()
+ self.loop.run()
+
+ def on_name_owner_changed(self, service, prev_owner, new_owner):
+ print "name_owner_changed: %s; %s; %s" % (service, prev_owner, new_owner)
+ if (new_owner == '' and not service.startswith(':')): # a service has disappear from the bus, check if it was an item or a host.
+ # search amongst the items.
+ match = service+'/'
+ print " search for ",match
+ to_be_removed=[]
+ for it in self.items_list:
+ print " check for ",it
+ if (it.startswith(match)): # it[0:len(match)] == match
+ print " match!"
+ to_be_removed.append(it)
+ for it in to_be_removed:
+ self.items_list.remove (it)
+ self.StatusNotifierItemUnregistered(it)
+
+ # search amongst the hosts.
+ to_be_removed=[]
+ for it in self.hosts_list:
+ if (it == service):
+ to_be_removed.append(it)
+ for it in to_be_removed:
+ self.hosts_list.remove (it)
+ self.StatusNotifierHostUnregistered()
+
+ ### methods ###
+
+ @dbus.service.method(dbus_interface = bus_iface_str, in_signature = 's', out_signature = None)
+ def RegisterStatusNotifierHost(self, service):
+ if (self.hosts_list.count (service) == 0): # if not already listed
+ self.hosts_list.append (service)
+ self.StatusNotifierHostRegistered()
+ print 'hosts:',self.hosts_list
+ sys.stdout.flush()
+
+ @dbus.service.method(dbus_interface = bus_iface_str, in_signature = 's', out_signature = None, sender_keyword='sender')
+ def RegisterStatusNotifierItem(self, serviceOrPath, sender=None):
+ # build the item id: service + path
+ if (serviceOrPath[0] == '/'):
+ service = sender
+ path = serviceOrPath
+ else:
+ service = serviceOrPath
+ path = "/StatusNotifierItem"
+
+ itemId = service + path
+ # keep track of this new item, and emit the 'new' signal.
+ if (self.items_list.count (itemId) == 0): # if not already listed
+ self.items_list.append (itemId)
+ self.StatusNotifierItemRegistered (itemId)
+
+ ### Properties ###
+
+ @dbus.service.method(dbus_interface = dbus.PROPERTIES_IFACE, in_signature = 'ss', out_signature = 'v')
+ def Get(self, interface, property):
+ if interface == 'org.kde.StatusNotifierWatcher':
+ if property == 'RegisteredStatusNotifierItems':
+ print "items: ",self.items_list
+ if (len (self.items_list) != 0):
+ return self.items_list
+ else: # too bad! dbus-python can't encode the GValue if 'items_list' is None or [].
+ return [''] # so we return a empty string; hopefuly the host will skip this invalid value.
+ elif property == 'HasStatusNotifierHostRegistered':
+ return (len (self.hosts_list) != 0)
+ elif property == 'ProtocolVersion':
+ return 0
+
+ ### Signals ###
+
+ @dbus.service.signal(dbus_interface=bus_name_str, signature='s')
+ def StatusNotifierItemRegistered(self, service):
+ print "%s registered" % (service)
+ sys.stdout.flush()
+
+ @dbus.service.signal(dbus_interface=bus_name_str, signature='s')
+ def StatusNotifierItemUnregistered(self, service):
+ print "%s unregistered" % (service)
+ sys.stdout.flush()
+
+ @dbus.service.signal(dbus_interface=bus_name_str, signature=None)
+ def StatusNotifierHostRegistered(self):
+ print "a host has been registered"
+ sys.stdout.flush()
+
+ @dbus.service.signal(dbus_interface=bus_name_str, signature=None)
+ def StatusNotifierHostUnregistered(self):
+ print "a host has been unregistered"
+ sys.stdout.flush()
+
+
+if __name__ == '__main__':
+ SNWatcher()
=== modified file 'System-Monitor/data/System-Monitor.conf.in'
--- System-Monitor/data/System-Monitor.conf.in 2011-04-20 20:46:51 +0000
+++ System-Monitor/data/System-Monitor.conf.in 2011-08-09 20:07:46 +0000
@@ -1,19 +1,18 @@
-#!en;@VERSION_SYSTEM_MONITOR@
+#@VERSION_SYSTEM_MONITOR@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
dock name =
#s Name of the icon as it will appear in its caption in the dock:
-name = System monitor
-
-#F[Display]
-frame_display=
+name =
+ #v
+sep_display=
icon=
=== modified file 'System-Monitor/src/applet-monitor.c'
--- System-Monitor/src/applet-monitor.c 2011-04-20 20:46:51 +0000
+++ System-Monitor/src/applet-monitor.c 2011-08-09 20:07:46 +0000
@@ -102,42 +102,42 @@
if (myConfig.bShowCpu)
{
g_string_printf (sInfo, (myData.fCpuPercent < 10 ? "%s%.1f%%%s" : "%s%.0f%%%s"),
- (myDesklet ? "CPU:" : ""),
+ (myDesklet || bOneLine ? "CPU:" : ""),
myData.fCpuPercent,
(bOneLine ? " - " : "\n"));
}
if (myConfig.bShowRam)
{
g_string_append_printf (sInfo, (myData.fRamPercent < 10 ? "%s%.1f%%%s" : "%s%.0f%%%s"),
- (myDesklet ? "RAM:" : ""),
+ (myDesklet || bOneLine ? "RAM:" : ""),
myData.fRamPercent,
(bOneLine ? " - " : "\n"));
}
if (myConfig.bShowSwap)
{
g_string_append_printf (sInfo, (myData.fSwapPercent < 10 ? "%s%.1f%%%s" : "%s%.0f%%%s"),
- (myDesklet ? "SWAP:" : ""),
+ (myDesklet || bOneLine ? "SWAP:" : ""),
myData.fSwapPercent,
(bOneLine ? " - " : "\n"));
}
if (myConfig.bShowNvidia)
{
g_string_append_printf (sInfo, "%s%d°C%s",
- (myDesklet ? "GPU:" : ""),
+ (myDesklet || bOneLine ? "GPU:" : ""),
myData.iGPUTemp,
(bOneLine ? " - " : "\n"));
}
if (myConfig.bShowCpuTemp)
{
g_string_append_printf (sInfo, "%s%d°C%s",
- (myDesklet ? "CPU:" : ""),
+ (myDesklet || bOneLine ? "CPU:" : ""),
myData.iCPUTemp,
(bOneLine ? " - " : "\n"));
}
if (myConfig.bShowFanSpeed)
{
g_string_append_printf (sInfo, "%s%drpm%s",
- (myDesklet ? "FAN:" : ""),
+ (myDesklet || bOneLine ? "FAN:" : ""),
myData.iFanSpeed,
(bOneLine ? " - " : "\n"));
}
=== modified file 'System-Monitor/src/applet-top.c'
--- System-Monitor/src/applet-top.c 2011-04-20 20:46:51 +0000
+++ System-Monitor/src/applet-top.c 2011-08-09 20:07:46 +0000
@@ -400,6 +400,7 @@
void cd_sysmonitor_start_top_dialog (CairoDockModuleInstance *myApplet)
{
g_return_if_fail (myData.pTopDialog == NULL);
+ cairo_dock_remove_dialog_if_any (myIcon);
// build an interactive widget that will be used to display the top list.
gchar *cTitle = g_strdup_printf (" [ Top %d ] :", myConfig.iNbDisplayedProcesses);
GtkWidget *pInteractiveWidget = gtk_vbox_new (FALSE, 0);
=== modified file 'Toons/data/Toons.conf.in'
--- Toons/data/Toons.conf.in 2011-04-20 20:46:51 +0000
+++ Toons/data/Toons.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_TOONS@
+#@VERSION_TOONS@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -11,9 +11,8 @@
#s Name of the icon as it will appear in its caption in the dock:
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
icon =
=== modified file 'Toons/src/applet-init.c'
--- Toons/src/applet-init.c 2010-08-10 00:05:57 +0000
+++ Toons/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -26,11 +26,15 @@
#include "applet-init.h"
-CD_APPLET_DEFINITION (N_("Toons"),
+CD_APPLET_DEFINE_BEGIN (N_("Toons"),
2, 0, 0,
CAIRO_DOCK_CATEGORY_APPLET_FUN,
N_("This applet displays a toon that will look at your mouse."),
"Fabounet (Fabrice Rey)")
+ CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
+CD_APPLET_DEFINE_END
+
//\___________ Here is where you initiate your applet. myConfig is already set at this point, and also myIcon, myContainer, myDock, myDesklet (and myDrawContext if you're in dock mode). The macro CD_APPLET_MY_CONF_FILE and CD_APPLET_MY_KEY_FILE can give you access to the applet's conf-file and its corresponding key-file (also available during reload). If you're in desklet mode, myDrawContext is still NULL, and myIcon's buffers has not been filled, because you may not need them then (idem when reloading).
=== modified file 'Xgamma/data/Xgamma.conf.in'
--- Xgamma/data/Xgamma.conf.in 2011-04-20 20:46:51 +0000
+++ Xgamma/data/Xgamma.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_XGAMMA@
+#@VERSION_XGAMMA@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -12,9 +12,8 @@
#s Name of the icon as it will appear in its caption in the dock:
#{Leave empty to display the current luminosity.}
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
#S+ Image filename:
#{Leave empty to use the default one.}
=== modified file 'Xgamma/src/applet-init.c'
--- Xgamma/src/applet-init.c 2011-04-20 20:46:51 +0000
+++ Xgamma/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -47,6 +47,7 @@
"You can also define a luminosity value that will be applied automatically on startup."),
"Fabounet (Fabrice Rey)")
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
CD_APPLET_REDEFINE_TITLE (N_("Screen Luminosity"))
CD_APPLET_DEFINE_END
=== modified file 'alsaMixer/data/AlsaMixer.conf.in'
--- alsaMixer/data/AlsaMixer.conf.in 2011-04-20 20:46:51 +0000
+++ alsaMixer/data/AlsaMixer.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_ALSA_MIXER@
+#@VERSION_ALSA_MIXER@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -12,9 +12,8 @@
#s Name of the icon as it will appear in its caption in the dock:
#{Leave empty to use the default sound card.}
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
icon=
=== modified file 'alsaMixer/src/applet-init.c'
--- alsaMixer/src/applet-init.c 2010-08-10 00:05:57 +0000
+++ alsaMixer/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -39,6 +39,7 @@
"This applet works with the Alsa sound driver."),
"Fabounet (Fabrice Rey)")
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
CD_APPLET_REDEFINE_TITLE (N_("Sound Control"))
pInterface->load_custom_widget = cd_mixer_load_custom_widget;
CD_APPLET_DEFINE_END
=== modified file 'alsaMixer/src/applet-mixer.c'
--- alsaMixer/src/applet-mixer.c 2011-04-20 20:46:51 +0000
+++ alsaMixer/src/applet-mixer.c 2011-08-09 20:07:46 +0000
@@ -246,6 +246,8 @@
G_CALLBACK (on_change_volume),
NULL);
+ cairo_dock_set_dialog_widget_text_color (pScale);
+
return pScale;
}
=== modified file 'alsaMixer/src/applet-notifications.c'
--- alsaMixer/src/applet-notifications.c 2011-04-20 20:46:51 +0000
+++ alsaMixer/src/applet-notifications.c 2011-08-09 20:07:46 +0000
@@ -42,7 +42,16 @@
}
else
{
- g_spawn_command_line_async ("gnome-volume-control -p applications", &erreur);
+ gchar *cResult = cairo_dock_launch_command_sync ("which gnome-volume-control");
+ if (cResult != NULL && *cResult == '/')
+ g_spawn_command_line_async ("gnome-volume-control -p applications", &erreur); // gnome 2
+ else
+ {
+ /*cResult = cairo_dock_launch_command_sync ("which gnome-control-center");
+ if (cResult != NULL && *cResult == '/')*/
+ g_spawn_command_line_async ("gnome-control-center sound", &erreur); // Gnome 3
+ }
+ g_free (cResult);
}
if (erreur != NULL)
=== modified file 'clock/data/clock.conf.in'
--- clock/data/clock.conf.in 2011-04-20 20:46:51 +0000
+++ clock/data/clock.conf.in 2011-08-09 20:07:46 +0000
@@ -1,9 +1,9 @@
-#!en;@VERSION_CLOCK@
+#@VERSION_CLOCK@
#[gtk-about]
[Icon]
-#F[Applet]
+#F[Icon]
frame_maininfo=
#d Name of the dock it belongs to:
@@ -12,9 +12,8 @@
#s Name of the icon as it will appear in its caption in the dock:
#{Leave empty to use the location name if available.}
name =
-
-#F[Display]
-frame_display=
+ #v
+sep_display=
icon=
@@ -32,6 +31,7 @@
#A
handbook=clock
+
#[gtk-convert]
[Desklet]
@@ -101,6 +101,7 @@
#e+[0;1] Foreground tansparency:
fg alpha = 1
+
#[gtk-preferences]
[Configuration]
=== modified file 'clock/src/applet-init.c'
--- clock/src/applet-init.c 2010-09-18 14:20:27 +0000
+++ clock/src/applet-init.c 2011-08-09 20:07:46 +0000
@@ -44,6 +44,7 @@
"Double-click on a day to edit the tasks for this day."),
"Fabounet (Fabrice Rey)")
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
+ CD_APPLET_ALLOW_EMPTY_TITLE
pInterface->load_custom_widget = cd_clock_load_custom_widget;
pInterface->save_custom_widget = cd_clock_save_custom_widget;
CD_APPLET_DEFINE_END
=== modified file 'clock/src/applet-notifications.c'
--- clock/src/applet-notifications.c 2011-04-20 20:46:51 +0000
+++ clock/src/applet-notifications.c 2011-08-09 20:07:46 +0000
@@ -93,8 +93,11 @@
CD_APPLET_ADD_IN_MENU (D_("Show this week's tasks"), _cd_clock_show_tasks_week, CD_APPLET_MY_MENU);
// Sub-Menu
- CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Set up time and date"), GTK_STOCK_PREFERENCES, _cd_clock_launch_time_admin, pSubMenu);
- CD_APPLET_ADD_SEPARATOR_IN_MENU (pSubMenu);
+ if (cairo_dock_fm_can_setup_time ())
+ {
+ CD_APPLET_ADD_IN_MENU_WITH_STOCK (D_("Set up time and date"), GTK_STOCK_PREFERENCES, _cd_clock_launch_time_admin, pSubMenu);
+ CD_APPLET_ADD_SEPARATOR_IN_MENU (pSubMenu);
+ }
CD_APPLET_ADD_ABOUT_IN_MENU (pSubMenu);
CD_APPLET_ON_BUILD_MENU_END
=== removed directory 'compiz-icon'
=== removed file 'compiz-icon/CMakeLists.txt'
--- compiz-icon/CMakeLists.txt 2010-08-10 00:05:57 +0000
+++ compiz-icon/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-add_subdirectory(src)
-add_subdirectory(data)
-
-
-########### install files ###############
-
-
-
-
-#original Makefile.am contents follow:
-
-##dnl Process this file with automake to produce Makefile.in
-#
-#SUBDIRS = . src data
=== removed directory 'compiz-icon/data'
=== removed file 'compiz-icon/data/0.svg'
--- compiz-icon/data/0.svg 2009-10-05 19:27:17 +0000
+++ compiz-icon/data/0.svg 1970-01-01 00:00:00 +0000
@@ -1,264 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="217"
- height="203"
- id="svg2579"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="dessin.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs
- id="defs2581">
- <linearGradient
- id="linearGradient5599-514-74-23">
- <stop
- id="stop3848"
- offset="0"
- style="stop-color:#242424;stop-opacity:1;" />
- <stop
- id="stop3850"
- offset="1"
- style="stop-color:#242424;stop-opacity:0;" />
- </linearGradient>
- <radialGradient
- r="4.6508918"
- fy="105.28044"
- fx="46.428719"
- cy="105.28044"
- cx="46.428719"
- gradientTransform="matrix(0.7822236,0.6229978,-1.7451182,2.1911355,193.8379,-154.32826)"
- gradientUnits="userSpaceOnUse"
- id="radialGradient3298-289-779-472"
- xlink:href="#linearGradient5599-514-74-23"
- inkscape:collect="always" />
- <linearGradient
- id="linearGradient5825-956-735-67"
- inkscape:collect="always">
- <stop
- id="stop3842"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3844"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <radialGradient
- r="44.271034"
- fy="117.776"
- fx="126.4184"
- cy="117.776"
- cx="126.4184"
- gradientTransform="matrix(0.9993796,-3.5220425e-2,8.8888887e-2,2.5222222,-10.390544,-174.82874)"
- gradientUnits="userSpaceOnUse"
- id="radialGradient3296-782-961-50"
- xlink:href="#linearGradient5825-956-735-67"
- inkscape:collect="always" />
- <linearGradient
- id="linearGradient6423-802-41-653">
- <stop
- id="stop3836"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3838"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- y2="234.84828"
- x2="182.49374"
- y1="13.493117"
- x1="98.380074"
- gradientTransform="matrix(-0.7321061,0,0,-1.0886946,322.53878,268.04839)"
- gradientUnits="userSpaceOnUse"
- id="linearGradient3294-213-498-264"
- xlink:href="#linearGradient6423-802-41-653"
- inkscape:collect="always" />
- <linearGradient
- id="linearGradient5825-657-108-749"
- inkscape:collect="always">
- <stop
- id="stop3830"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3832"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- y2="199.92337"
- x2="94.44487"
- y1="4.1470113"
- x1="130.8455"
- gradientUnits="userSpaceOnUse"
- id="linearGradient3292-784-136-489"
- xlink:href="#linearGradient5825-657-108-749"
- inkscape:collect="always" />
- <filter
- id="filter9715"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur9717"
- stdDeviation="5.1445312"
- inkscape:collect="always" />
- </filter>
- <filter
- id="filter10611"
- height="1.0334942"
- y="-0.016747089"
- width="1.2875712"
- x="-0.1437856"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur10613"
- stdDeviation="1.5777183"
- inkscape:collect="always" />
- </filter>
- <filter
- id="filter6401"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur6403"
- stdDeviation="3.3265654"
- inkscape:collect="always" />
- </filter>
- <linearGradient
- id="linearGradient6434-370-979-910">
- <stop
- id="stop3820"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- style="stop-color:#fdffdc;stop-opacity:1;"
- offset="0.25"
- id="stop3822" />
- <stop
- style="stop-color:#5fff32;stop-opacity:1;"
- offset="0.5"
- id="stop3824" />
- <stop
- id="stop3826"
- offset="1"
- style="stop-color:#52d800;stop-opacity:1;" />
- </linearGradient>
- <radialGradient
- r="99.226646"
- fy="151.77838"
- fx="100.84565"
- cy="151.77838"
- cx="100.84565"
- gradientTransform="matrix(2.3695062,5.5428452e-2,-3.8432415e-2,1.6429701,-137.19916,-150.68542)"
- gradientUnits="userSpaceOnUse"
- id="radialGradient3290-538-362-42"
- xlink:href="#linearGradient6434-370-979-910"
- inkscape:collect="always" />
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective2587" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.35"
- inkscape:cx="375"
- inkscape:cy="520"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1015"
- inkscape:window-height="716"
- inkscape:window-x="649"
- inkscape:window-y="308" />
- <metadata
- id="metadata2584">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Calque 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- transform="matrix(0.9999988,0,0,1,-20.264974,-6.2580632)"
- id="g3278">
- <path
- sodipodi:nodetypes="ccccccc"
- id="path3262"
- d="M 181.28188,18.948615 L 224.14866,42.654942 L 224.14866,181.34242 L 181.28188,200.59462 L 29.69536,177.79655 L 31.05774,41.292562 L 181.28188,18.948615 z"
- style="fill:url(#radialGradient3290-538-362-42);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter6401)"
- transform="matrix(1.0794992,0,0,1.0109241,-7.9637963,-6.7996806)" />
- <path
- style="opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter10611)"
- d="M 181.91309,17.172788 L 170.04663,19.017358 C 170.04663,19.017358 179.78028,19.595168 179.89884,22.130641 L 182.24246,205.58979 L 183.4781,197.49245 L 184.64864,25.896281 C 184.64864,23.452371 191.99206,21.63064 191.99206,21.63064 L 181.91309,17.172788 z"
- id="path5671"
- sodipodi:nodetypes="cccccccc"
- transform="matrix(1.0886946,0,0,1.0886946,-10.024937,-10.657431)" />
- <path
- id="path8744"
- d="M 188.65625,15.46875 L 28.625,38.875 L 29.1875,183.6875 L 187.5625,207.625 L 230.03125,186.40625 L 230.03125,40.53125 L 188.65625,15.46875 z M 154.25,30.59375 L 170.34375,62.59375 L 80.6875,168.53125 L 43.125,112.875 L 51.65625,99.90625 L 80.6875,136.53125 L 154.25,30.59375 z"
- style="fill:#5fa72e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter9715)"
- sodipodi:nodetypes="cccccccccccccc" />
- <path
- style="fill:#171717;fill-opacity:1;fill-rule:evenodd;stroke:#171717;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 188.65625,9.46875 L 22.625,32.875 L 23.1875,183.6875 L 187.5625,207.625 L 236.03125,186.40625 L 236.03125,34.53125 L 188.65625,9.46875 z M 154.25,30.59375 L 170.34375,62.59375 L 80.6875,168.53125 L 43.125,112.875 L 51.65625,99.90625 L 80.6875,136.53125 L 154.25,30.59375 z"
- id="path4724" />
- <path
- style="opacity:0.3;fill:url(#linearGradient3292-784-136-489);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 188.9375,9.625 L 130.875,17.625 L 22.625,32.875 L 22.90625,109.78125 C 30.019952,110.25751 36.786468,115.20328 44.28125,111.09375 L 51.65625,99.90625 L 64.78935,116.2772 C 61.33193,103.33266 86.393039,118.18722 99.456601,109.4375 L 154.25,30.59375 L 170.34375,62.59375 L 126.8125,114.03125 C 141.01794,114.17252 155.24389,114.13408 169.40625,113.8125 C 187.47267,113.43887 188.93749,98.218747 188.9375,98.21875 L 188.9375,10.46875 L 188.9375,9.625 z"
- id="path5812"
- sodipodi:nodetypes="ccccccccccccccc" />
- <path
- sodipodi:nodetypes="cccsccc"
- id="path5801"
- d="M 188.934,9.61951 L 188.934,10.47005 L 188.934,124.20461 C 188.934,124.20461 192.29477,115.23419 200.09312,108.92887 C 207.85155,102.65581 227.76998,111.12529 236.02004,113.75995 L 236.02004,34.52339 L 188.934,9.61951 z"
- style="opacity:0.3;fill:url(#linearGradient3294-213-498-264);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter10611)"
- d="M 181.91309,17.172788 L 170.04663,19.017358 C 170.04663,19.017358 179.78028,19.595168 179.89884,22.130641 L 182.24246,205.58979 L 183.4781,197.49245 L 184.64864,25.896281 C 184.64864,23.452371 191.99206,21.63064 191.99206,21.63064 L 181.91309,17.172788 z"
- id="path5835"
- sodipodi:nodetypes="cccccccc"
- transform="matrix(1.0886946,0,0,1.0886946,-10.024848,-10.657494)" />
- <path
- style="opacity:0.3;fill:url(#radialGradient3296-782-961-50);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 81.655462,169.42554 L 170.19753,65.142657 C 170.19753,65.142657 146.09441,97.543279 123.95889,123.614 C 101.82337,149.68472 81.655462,169.42554 81.655462,169.42554 z"
- id="path10688"
- sodipodi:nodetypes="ccsc" />
- <path
- sodipodi:nodetypes="ccsc"
- id="path11667"
- d="M 150.19753,31.142657 L 80.147362,132.93364 C 80.147362,132.93364 92.381558,110.40194 109.8941,84.954197 C 127.40664,59.506451 150.19753,31.142657 150.19753,31.142657 z"
- style="opacity:0.3;fill:#171717;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:url(#radialGradient3298-289-779-472);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 51.079609,98.287057 L 41.779133,112.27382 C 41.779133,112.27382 41.649402,108.65351 43.974521,105.15682 C 46.29964,101.66013 51.079609,98.287057 51.079609,98.287057 z"
- id="path11671"
- sodipodi:nodetypes="ccsc" />
- </g>
- </g>
-</svg>
=== removed file 'compiz-icon/data/1.svg'
--- compiz-icon/data/1.svg 2009-10-05 19:27:17 +0000
+++ compiz-icon/data/1.svg 1970-01-01 00:00:00 +0000
@@ -1,325 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="245"
- height="220"
- id="svg2723"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="1.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs
- id="defs2725">
- <linearGradient
- id="linearGradient15954-266-701-968"
- inkscape:collect="always">
- <stop
- id="stop3522"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3524"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15954-266-701-968"
- id="radialGradient2604"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2604849,0,0,0.4207682,-31.559399,75.618273)"
- cx="76.61348"
- cy="126.63648"
- fx="76.61348"
- fy="126.63648"
- r="60.380772" />
- <linearGradient
- id="linearGradient15928-126-426-510"
- inkscape:collect="always">
- <stop
- id="stop3516"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3518"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15928-126-426-510"
- id="radialGradient2607"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(4.9103216e-7,2.4070413,-1.5242771,2.8984927e-7,117.79774,-191.89673)"
- cx="108.14778"
- cy="70.44455"
- fx="108.14778"
- fy="70.44455"
- r="17" />
- <linearGradient
- id="linearGradient15928-55-393-152"
- inkscape:collect="always">
- <stop
- id="stop3510"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3512"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15928-55-393-152"
- id="radialGradient2610"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.6305342e-2,2.5649215,-1.8396156,-1.0891473e-2,182.17831,-211.24056)"
- cx="108.24894"
- cy="70.452545"
- fx="108.24894"
- fy="70.452545"
- r="17" />
- <linearGradient
- id="linearGradient15928-832-778-511"
- inkscape:collect="always">
- <stop
- id="stop3504"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3506"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient15928-832-778-511"
- id="radialGradient2613"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(2.7823819e-2,2.6247364,-2.2064105,2.1783171e-2,252.92038,-223.64007)"
- cx="108.7826"
- cy="70.452553"
- fx="108.7826"
- fy="70.452553"
- r="17" />
- <linearGradient
- id="linearGradient9289-655-235-204">
- <stop
- id="stop3498"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3500"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient9289-655-235-204"
- id="linearGradient2619"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.1032051,0,0,1.0646531,-19.509651,-282.73088)"
- x1="130.08696"
- y1="260.86957"
- x2="99.478264"
- y2="482.78262" />
- <linearGradient
- id="linearGradient6423-895-153-676">
- <stop
- id="stop3492"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3494"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient6423-895-153-676"
- id="linearGradient2622"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.8076632,0,0,-1.1590821,336.31679,279.45749)"
- x1="98.380074"
- y1="13.493117"
- x2="182.49374"
- y2="234.84828" />
- <filter
- id="filter10611"
- height="1.0334942"
- y="-0.016747089"
- width="1.2875712"
- x="-0.1437856"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur10613"
- stdDeviation="1.5777183"
- inkscape:collect="always" />
- </filter>
- <filter
- id="filter16933"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur16935"
- stdDeviation="5.1445312"
- inkscape:collect="always" />
- </filter>
- <filter
- id="filter3280"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur3282"
- stdDeviation="1.1222407"
- inkscape:collect="always" />
- </filter>
- <linearGradient
- id="linearGradient6434-226-700-874">
- <stop
- id="stop3482"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- style="stop-color:#ffffdc;stop-opacity:1;"
- offset="0.25"
- id="stop3484" />
- <stop
- style="stop-color:#fff532;stop-opacity:1;"
- offset="0.5"
- id="stop3486" />
- <stop
- id="stop3488"
- offset="1"
- style="stop-color:#ffb432;stop-opacity:1;" />
- </linearGradient>
- <radialGradient
- r="99.226646"
- fy="151.77838"
- fx="100.84565"
- cy="151.77838"
- cx="100.84565"
- gradientTransform="matrix(2.3695062,5.5428452e-2,-3.8432415e-2,1.6429701,-137.19916,-150.68542)"
- gradientUnits="userSpaceOnUse"
- id="radialGradient3264-487-601-500"
- xlink:href="#linearGradient6434-226-700-874"
- inkscape:collect="always" />
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective2731" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.35"
- inkscape:cx="375"
- inkscape:cy="520"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1076"
- inkscape:window-height="716"
- inkscape:window-x="588"
- inkscape:window-y="308" />
- <metadata
- id="metadata2728">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Calque 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g2628"
- transform="matrix(1,0,0,1.000001,-4.8702093e-4,-1.4190264e-4)">
- <path
- sodipodi:nodetypes="ccccccc"
- id="path3262"
- d="M 181.28188,18.948615 L 224.14866,42.654942 L 224.14866,181.34242 L 181.28188,200.59462 L 29.69536,177.79655 L 31.05774,41.292562 L 181.28188,18.948615 z"
- style="fill:url(#radialGradient3264-487-601-500);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3280)"
- transform="matrix(1.2010534,0,0,1.1475497,-30.569212,-17.04901)" />
- <path
- id="path15962"
- d="M 171.43974,8.0578459 L 9.4084871,31.464096 L 9.5022371,52.339096 L 144.87724,37.714096 L 144.87724,198.49535 L 170.34599,202.2141 L 214.81474,180.99535 L 214.81474,33.120346 L 171.43974,8.0578459 z M 126.84599,54.276596 L 90.252237,57.089096 L 90.252237,104.0891 L 126.84599,103.9016 L 126.84599,54.276596 z M 76.095987,58.182846 L 45.377237,60.526596 L 45.377237,104.2766 L 76.095987,104.1516 L 76.095987,58.182846 z M 34.252237,61.370346 L 9.1584871,63.307846 L 9.1584871,104.4641 L 34.252237,104.3391 L 34.252237,61.370346 z M 9.7522371,119.2141 L 9.9709871,178.2766 L 128.18974,196.0891 L 128.18974,120.49535 L 9.7522371,119.2141 z"
- style="fill:#fe9b13;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter16933)"
- sodipodi:nodetypes="ccccccccccccccccccccccccccccc"
- transform="matrix(1.1032051,0,0,1.0089155,-0.5163047,0.2887958)" />
- <path
- style="fill:#262726;fill-opacity:1;fill-rule:evenodd;stroke:#171717;stroke-width:1.08375776px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 188.6169,4.159869 L 5.4503659,29.079407 L 5.5537914,55.562653 L 159.31301,39.992101 L 159.31301,211.16836 L 187.41026,215.12755 L 240.88124,192.53694 L 240.88124,30.842738 L 188.6169,4.159869 z M 139.42085,57.625418 L 99.050426,60.619756 L 99.050426,110.65846 L 139.42085,110.45883 L 139.42085,57.625418 z M 83.433178,61.78422 L 49.544096,64.2795 L 49.544096,110.85808 L 83.433178,110.725 L 83.433178,61.78422 z M 37.270939,65.177802 L 9.5873852,67.240567 L 9.5873852,111.0577 L 37.270939,110.92462 L 37.270939,65.177802 z M 5.8295927,126.76133 L 6.0709189,189.64241 L 140.90328,208.60654 L 140.90328,128.12543 L 5.8295927,126.76133 z"
- id="path4724" />
- <path
- style="opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter10611)"
- d="M 181.91309,17.172788 L 170.04663,19.017358 C 170.04663,19.017358 179.78028,19.595168 179.89884,22.130641 L 182.24246,205.58979 L 183.4781,197.49245 L 184.64864,25.896281 C 184.64864,23.452371 191.99206,21.63064 191.99206,21.63064 L 181.91309,17.172788 z"
- id="path5671"
- sodipodi:nodetypes="cccccccc"
- transform="matrix(1.2010534,0,0,1.1590821,-30.569212,-17.267532)" />
- <path
- style="opacity:0.3;fill:url(#linearGradient2622);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 188.92332,4.3203717 L 188.92332,5.2259051 L 188.92332,126.31376 C 188.92332,126.31376 192.63093,116.76338 201.23411,110.0504 C 209.79325,103.37177 231.76737,112.38883 240.86888,115.19383 L 240.86888,30.834376 L 188.92332,4.3203717 z"
- id="path9728"
- sodipodi:nodetypes="cccsccc" />
- <path
- style="opacity:0.3;fill:url(#linearGradient2619);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 188.92718,4.326221 L 124.87232,12.843446 L 5.4503659,29.079407 L 5.5537914,55.562653 L 159.31301,39.992101 L 159.31301,115.38286 C 162.00279,115.33957 164.69269,115.30867 167.3802,115.24978 C 187.31116,114.85199 188.92717,98.647823 188.92718,98.647833 L 188.92718,5.2245221 L 188.92718,4.326221 z M 139.42085,57.625418 L 99.050426,60.619756 L 99.050426,110.65846 L 139.42085,110.45883 L 139.42085,57.625418 z M 83.433178,61.78422 L 49.544096,64.2795 L 49.544096,110.85808 L 83.433178,110.725 L 83.433178,61.78422 z M 37.270939,65.177802 L 9.5873852,67.240567 L 9.5873852,111.0577 L 37.270939,110.92462 L 37.270939,65.177802 z"
- id="path14930" />
- <path
- style="opacity:0.3;fill:#171717;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 100.78767,109.06146 L 135.035,106.37669 L 138.00885,59.809693 L 137.72106,108.9689 L 100.78767,109.06146 z"
- id="path15908"
- sodipodi:nodetypes="ccccc" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path15914"
- d="M 51.766985,109.8021 L 79.586942,107.30247 L 82.368936,63.697992 L 81.697415,109.3392 L 51.766985,109.8021 z"
- style="opacity:0.3;fill:#171717;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:#171717;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 11.571945,109.8021 L 33.348257,107.48763 L 35.938388,66.93824 L 35.266867,109.3392 L 11.571945,109.8021 z"
- id="path15916"
- sodipodi:nodetypes="ccccc" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path15918"
- d="M 138.00885,59.254222 L 102.80221,64.068307 L 100.78767,109.06146 L 100.49988,61.846418 L 138.00885,59.254222 z"
- style="opacity:0.3;fill:url(#radialGradient2613);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:url(#radialGradient2610);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 82.081143,62.772206 L 52.534425,67.03082 L 51.09547,109.24662 L 50.807676,65.364403 L 82.081143,62.772206 z"
- id="path15936"
- sodipodi:nodetypes="ccccc" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path15940"
- d="M 36.322113,66.105034 L 11.955663,69.993333 L 10.708568,109.33918 L 10.420775,68.512073 L 36.322113,66.105034 z"
- style="opacity:0.3;fill:url(#radialGradient2607);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:url(#radialGradient2604);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 7.0810333,127.58692 C 7.0810333,127.58692 30.95473,130.00905 64.260919,130.20543 C 97.567112,130.40182 140.30579,128.37247 140.30579,128.37247 L 7.0810333,127.58692 z"
- id="path15944"
- sodipodi:nodetypes="cscc" />
- </g>
- </g>
-</svg>
=== removed file 'compiz-icon/data/2.svg'
--- compiz-icon/data/2.svg 2009-10-05 19:27:17 +0000
+++ compiz-icon/data/2.svg 1970-01-01 00:00:00 +0000
@@ -1,396 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="217"
- height="203"
- id="svg4424"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- version="1.0"
- sodipodi:docname="2.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape">
- <defs
- id="defs4426">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient3884">
- <stop
- style="stop-color:#f8fefd;stop-opacity:1;"
- offset="0"
- id="stop3886" />
- <stop
- style="stop-color:#f8fefd;stop-opacity:0;"
- offset="1"
- id="stop3888" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3884"
- id="linearGradient3890"
- x1="37.395267"
- y1="106.34793"
- x2="73.228287"
- y2="143.09486"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2797"
- id="linearGradient2509"
- gradientUnits="userSpaceOnUse"
- x1="5.9649176"
- y1="26.048164"
- x2="52.854097"
- y2="26.048164" />
- <linearGradient
- inkscape:collect="always"
- id="linearGradient2797">
- <stop
- style="stop-color:#ffffff;stop-opacity:1;"
- offset="0"
- id="stop2799" />
- <stop
- style="stop-color:#ffffff;stop-opacity:0;"
- offset="1"
- id="stop2801" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2797"
- id="linearGradient2507"
- gradientUnits="userSpaceOnUse"
- x1="5.9649176"
- y1="26.048164"
- x2="52.854097"
- y2="26.048164" />
- <linearGradient
- id="linearGradient2682">
- <stop
- style="stop-color:#3977c3;stop-opacity:1;"
- offset="0"
- id="stop2684" />
- <stop
- style="stop-color:#89aedc;stop-opacity:0;"
- offset="1"
- id="stop2686" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2682"
- id="linearGradient2522"
- gradientUnits="userSpaceOnUse"
- x1="36.713837"
- y1="31.455952"
- x2="37.124462"
- y2="24.842253"
- gradientTransform="matrix(1.1129548,0,0,1.1129548,-2.7671001,-2.4797732)" />
- <linearGradient
- inkscape:collect="always"
- id="linearGradient3319">
- <stop
- style="stop-color:#000000;stop-opacity:1;"
- offset="0"
- id="stop3321" />
- <stop
- style="stop-color:#000000;stop-opacity:0;"
- offset="1"
- id="stop3323" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3319"
- id="linearGradient3325"
- x1="28.256515"
- y1="29.38137"
- x2="44.910089"
- y2="29.38137"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- id="linearGradient2847">
- <stop
- style="stop-color:#3465a4;stop-opacity:1;"
- offset="0"
- id="stop2849" />
- <stop
- style="stop-color:#3465a4;stop-opacity:0;"
- offset="1"
- id="stop2851" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2847"
- id="linearGradient2529"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-1.1129548,0,0,-1.1129548,50.129315,48.546322)"
- x1="37.128052"
- y1="29.729605"
- x2="37.065414"
- y2="26.194071" />
- <linearGradient
- inkscape:collect="always"
- id="linearGradient8662">
- <stop
- style="stop-color:#000000;stop-opacity:1;"
- offset="0"
- id="stop8664" />
- <stop
- style="stop-color:#000000;stop-opacity:0;"
- offset="1"
- id="stop8666" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient8662"
- id="radialGradient1503"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1,0,0,0.536723,0,16.87306)"
- cx="24.837126"
- cy="36.421127"
- fx="24.837126"
- fy="36.421127"
- r="15.644737" />
- <linearGradient
- id="linearGradient5825-657-108-749"
- inkscape:collect="always">
- <stop
- id="stop3830"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3832"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5825-657-108-749"
- id="linearGradient3092"
- gradientUnits="userSpaceOnUse"
- x1="130.8455"
- y1="4.1470113"
- x2="94.44487"
- y2="199.92337"
- gradientTransform="matrix(1.0069047,0,0,1,-24.022448,-9.2354855)" />
- <linearGradient
- id="linearGradient6423-802-41-653">
- <stop
- id="stop3836"
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1;" />
- <stop
- id="stop3838"
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0;" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient6423-802-41-653"
- id="linearGradient2772"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.7321061,0,0,-1.0886946,302.27388,261.79011)"
- x1="98.380074"
- y1="13.493117"
- x2="182.49374"
- y2="234.84828" />
- <filter
- id="filter10611"
- height="1.0334942"
- y="-0.016747089"
- width="1.2875712"
- x="-0.1437856"
- inkscape:collect="always">
- <feGaussianBlur
- id="feGaussianBlur10613"
- stdDeviation="1.5777183"
- inkscape:collect="always" />
- </filter>
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective4432" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.35"
- inkscape:cx="375"
- inkscape:cy="520"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="982"
- inkscape:window-height="716"
- inkscape:window-x="0"
- inkscape:window-y="308" />
- <metadata
- id="metadata4429">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Calque 1"
- inkscape:groupmode="layer"
- id="layer1">
- <g
- id="g4400"
- transform="translate(2.291e-4,2.1481187e-4)">
- <path
- style="opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter10611)"
- d="M 181.91309,17.172788 L 170.04663,19.017358 C 170.04663,19.017358 179.78028,19.595168 179.89884,22.130641 L 182.24246,205.58979 L 183.4781,197.49245 L 184.64864,25.896281 C 184.64864,23.452371 191.99206,21.63064 191.99206,21.63064 L 181.91309,17.172788 z"
- id="path5671"
- sodipodi:nodetypes="cccccccc"
- transform="matrix(1.0886946,0,0,1.0886946,-30.289838,-16.915709)" />
- <path
- style="fill:#171717;fill-opacity:1;fill-rule:evenodd;stroke:#171717;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 167.57935,0.23313833 L 1.5480967,23.639388 L 2.1105967,174.45188 L 166.4856,198.38938 L 214.95435,177.17063 L 214.95435,25.295638 L 167.57935,0.23313833 z M 133.1731,21.358138 L 149.26685,53.358138 L 59.610597,159.29563 L 22.048097,103.63938 L 30.579347,90.670643 L 59.610597,127.29563 L 133.1731,21.358138 z"
- id="path4724" />
- <path
- sodipodi:nodetypes="cccsccc"
- id="path5801"
- d="M 168.6691,3.3612319 L 168.6691,4.2117719 L 168.6691,117.94633 C 168.6691,117.94633 172.02987,108.97591 179.82822,102.67059 C 187.58665,96.397532 207.50508,104.86701 215.75514,107.50167 L 215.75514,28.265112 L 168.6691,3.3612319 z"
- style="opacity:0.3;fill:url(#linearGradient2772);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter10611)"
- d="M 181.91309,17.172788 L 170.04663,19.017358 C 170.04663,19.017358 179.78028,19.595168 179.89884,22.130641 L 182.24246,205.58979 L 183.4781,197.49245 L 184.64864,25.896281 C 184.64864,23.452371 191.99206,21.63064 191.99206,21.63064 L 181.91309,17.172788 z"
- id="path5835"
- sodipodi:nodetypes="cccccccc"
- transform="matrix(1.0886946,0,0,1.0886946,-30.289749,-16.915772)" />
- <path
- id="path2781"
- d="M 119.13415,13.347366 L 15.203657,31.833147 L 15.555764,150.9418 L 118.4495,169.84716 L 148.78946,153.08902 L 148.78946,33.14122 L 119.13415,13.347366 z M 97.596884,30.031463 L 107.67108,55.304415 L 51.549009,138.97172 L 28.036031,95.015524 L 33.376334,84.773077 L 51.549009,113.69875 L 97.596884,30.031463 z"
- style="fill:#171717;fill-opacity:1;fill-rule:evenodd;stroke:#171717;stroke-width:0.70312017px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="fill:#171717;fill-opacity:1;fill-rule:evenodd;stroke:#171717;stroke-width:0.33799341px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 53.534646,72.440802 L 15.021093,83.968022 L 15.151574,158.24087 L 53.280936,170.02973 L 64.524024,159.57982 L 64.524024,84.783699 L 53.534646,72.440802 z M 45.553576,82.844542 L 49.286773,98.604052 L 28.489602,150.77666 L 19.77639,123.3668 L 21.755347,116.97989 L 28.489602,135.01714 L 45.553576,82.844542 z"
- id="path2783" />
- <path
- id="path2785"
- d="M 54.617313,42.667469 L 16.10376,54.194689 L 16.234241,128.46754 L 54.363603,140.2564 L 65.606691,129.80649 L 65.606691,55.010366 L 54.617313,42.667469 z M 46.636243,53.071209 L 50.36944,68.830719 L 29.572269,121.00333 L 20.859057,93.593467 L 22.838014,87.206557 L 29.572269,105.24381 L 46.636243,53.071209 z"
- style="fill:#171717;fill-opacity:1;fill-rule:evenodd;stroke:#171717;stroke-width:0.33799341px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="opacity:0.3;fill:url(#linearGradient3092);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 166.21961,0.38951448 L 107.75621,8.3895145 L -1.2412291,23.639514 L -0.95803717,100.54576 C 6.204781,101.02202 9.5729977,102.52277 20.564551,103.77216 L 26.063357,103.6853 L 41.214254,107.04171 C 29.253645,102.90113 52.998961,104.74114 73.808331,103.64703 L 85.424567,104.42163 L 94.309037,104.26807 L 103.66566,104.79576 C 117.96918,104.93703 132.29336,104.89859 146.5535,104.57701 C 164.74467,104.20338 166.2196,88.983264 166.21961,88.983264 L 166.21961,1.2332645 L 166.21961,0.38951448 z"
- id="path5812"
- sodipodi:nodetypes="ccccccccccccccc" />
- <g
- transform="matrix(2.8407146,0,0,2.8407146,14.462295,32.151427)"
- id="g2787">
- <path
- transform="matrix(-1.489736,0,0,-1.001252,61.20865,75.2819)"
- d="M 40.481863,36.421127 A 15.644737,8.3968935 0 1 1 9.1923885,36.421127 A 15.644737,8.3968935 0 1 1 40.481863,36.421127 z"
- sodipodi:ry="8.3968935"
- sodipodi:rx="15.644737"
- sodipodi:cy="36.421127"
- sodipodi:cx="24.837126"
- id="path8660"
- style="opacity:0.38333333;fill:url(#radialGradient1503);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
- sodipodi:type="arc"
- inkscape:r_cx="true"
- inkscape:r_cy="true" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2529);stroke-width:1.11295438;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
- d="M 19.662181,9.1059794 C 19.662181,9.1059794 9.7151476,8.4103827 12.775773,20.096408 L 4.2199335,20.096408 C 4.2199335,20.096408 4.7764109,6.8800698 19.662181,9.1059794 z"
- id="path2865"
- inkscape:r_cx="true"
- inkscape:r_cy="true"
- sodipodi:nodetypes="cccc" />
- <g
- id="g1878"
- transform="matrix(-0.6444576,-0.5444887,-0.5444887,0.6444576,60.577668,12.401957)"
- inkscape:r_cx="true"
- inkscape:r_cy="true"
- style="fill:#000000;fill-opacity:1;stroke:#f9978e;stroke-opacity:1">
- <path
- sodipodi:nodetypes="ccccccc"
- id="path1880"
- d="M 44.306783,50.229694 C 62.821497,35.818859 49.664587,13.411704 22.462411,12.49765 L 22.113843,3.1515478 L 7.6245439,20.496754 L 22.714328,33.219189 C 22.714328,33.219189 22.462411,23.337969 22.462411,23.337969 C 41.292171,24.336946 55.444038,37.409698 44.306783,50.229694 z"
- style="opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#f9978e;stroke-width:
Follow ups