upower-1.0 changes
plugins: screensaver-proxy: Fix a segfault when uninhibiting

When an application requests that the screensaver be inhibited a cookie
is created for it and put into a hash table. The function
(csd-screensaver-proxy-manager.c::handle_method_call) that does this
also handles the uninhibiting case and would remove the cookie from the
hash table.

After this the name_vanished_cb callback function is called, it looks
through the cookie hash table for the relevant cookie and gets the
associated sender value. Unfortunately due to the above removal of the
cookie entry this never finds anything and then when it tries to use the
still uninitialised sender variable to remove an entry from the watch
hash table, you get a segfault.

Seeing as the above loop (in name_vanished_cb) removes the cookie entry
itself we can simply remove the call to g_hash_table_remove in
handle_method_call that removes the cookie entry.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
plugins: screensaver-proxy: Allow /ScreenSaver interface path

This is essentially a port of Bastien Nocera's patch to
g-s-d/screensaver-proxy[0].

The problem was that under cinnamon 2.x, the current version of the
vlc[1] media player is using the /ScreenSaver path to
org.freedesktop.ScreenSaver which c-s-d screensaver-proxy didn't
recognise

    method call sender=:1.118 -> dest=org.freedesktop.ScreenSaver
     serial=3 path=/ScreenSaver; interface=org.freedesktop.ScreenSaver;
     member=Inhibit
       string "vlc"
       string "Playing some media."
    error sender=:1.24 -> dest=:1.118
     error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=3
       string "No such interface 'org.freedesktop.ScreenSaver' on object
       at path /ScreenSaver"

and the screensaver would kick in after a time while watching a video.

This adds the definition for the /ScreenSaver freedesktop.org interface
path and allows vlc to properly inhibit the screensaver.

[0] -
https://git.gnome.org/browse/gnome-settings-daemon/commit/?h=gnome-3-10&id=fd0e2b107cdf5e82a034fc9a30753259ecc3d267
[1] -
http://git.videolan.org/?p=vlc.git;a=commitdiff;h=5fe4b004e254b6091f997b394190ad1609c67aa8

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
power and media-keys: Add support for logind

Opt out of logind handling the sleep and power keys, and also inhibiting for lid close auto-suspend.

Also use a delay inihibit for logind so that we can do actions on suspend like blanking the screen using the screensaver and also poking the screensaver on resume.

This patch is based on the following gnome-settings-daemon patch, but keeps ConsoleKit and upower supported.
https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=6defe42c31b18ad8dbb2fff3869b0fccbd821e97
Update csd-xrandr-manager.c

gnome patch (https://mail.gnome.org/archives/commits-list/2012-June/msg01582.html) applied
Merge pull request #23 from leigh123linux/upower

upower-1.0 changes
Merge pull request #30 from ac000/screensaver-proxy

Screensaver proxy
Merge pull request #37 from nalim/patch-1

Update csd-xrandr-manager.c
Merge branch 'systemd-support' of https://github.com/City-busz/cinnamon-settings-daemon into City-busz-systemd-support

Conflicts:
	plugins/media-keys/csd-media-keys-manager.c
	plugins/power/csd-power-manager.c
Fixed error with merge
Add --backlight-preference command line option

The "--backlight-preference" option can be specificed multiple times
to control which types of backlight control interface are prioritized by
the csd-backlight-helper application.

This patch is needed for the user-control of the backlight selection to
work from CSD.
Power plugin: add backlight troubleshooting settings

Adds the "backlight-helper-preference-order" and
"backlight-helper-force" dconf
settings to the CSD power plugin.

backlight-helper-force causes CSD to always use the csd-backlight-helper
plugin. backlight-helper-preference-order determines the list and order
of backlight interfaces passed to csd-backlight-helper.

Together these two settings allow a user to bypass a buggy xbacklight
implementation that will prevent backlight control working on a laptop,
when the /sys interface will frequently work fine.

This allows users to resolve persistent issues on many laptops.