~psusi/ubuntu/natty/gnome-power-manager/sleep

« back to all changes in this revision

Viewing changes to .pc/02-notify-osd-support.patch/src/gpm-backlight.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-07-14 16:19:03 UTC
  • Revision ID: james.westby@ubuntu.com-20100714161903-ji5dlfcj32q854gc
Tags: 2.30.1-1ubuntu2
* Add 00git-port-to-libupower.patch: Port from libdevkit-power to
  libupower-glib, the former will go away soon.
* debian/control.in: Replace libdevkit-power-gobject-dev with
  libupower-glib-dev build dependency.
* 12-add-appindicators.patch: Update to upower port.
* Add 13-energy-star.patch: Change default timings to be Energy Star 5.0
  compliant, except for automatic suspend on AC (since that might be both
  inconvenient, and suspend might not work at all). (LP: #604635)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include <glib/gi18n.h>
41
41
#include <dbus/dbus-glib.h>
42
42
#include <gconf/gconf-client.h>
43
 
#include <devkit-power-gobject/devicekit-power.h>
 
43
#include <libupower-glib/upower.h>
44
44
 
45
45
#include "gpm-button.h"
46
46
#include "gpm-backlight.h"
60
60
 
61
61
struct GpmBacklightPrivate
62
62
{
63
 
        DkpClient               *client;
 
63
        UpClient                *client;
64
64
        GpmBrightness           *brightness;
65
65
        GpmButton               *button;
66
66
        GConfClient             *conf;
408
408
 
409
409
/**
410
410
 * gpm_backlight_client_changed_cb:
411
 
 * @client: The dkp_client class instance
 
411
 * @client: The up_client class instance
412
412
 * @backlight: This class instance
413
413
 *
414
414
 * Does the actions when the ac power source is inserted/removed.
415
415
 **/
416
416
static void
417
 
gpm_backlight_client_changed_cb (DkpClient *client, GpmBacklight *backlight)
 
417
gpm_backlight_client_changed_cb (UpClient *client, GpmBacklight *backlight)
418
418
{
419
419
        gpm_backlight_brightness_evaluate_and_set (backlight, FALSE);
420
420
}
737
737
        g_signal_connect (backlight->priv->brightness, "brightness-changed",
738
738
                          G_CALLBACK (brightness_changed_cb), backlight);
739
739
 
740
 
        /* we use dkp_client for the ac-adapter-changed signal */
741
 
        backlight->priv->client = dkp_client_new ();
 
740
        /* we use up_client for the ac-adapter-changed signal */
 
741
        backlight->priv->client = up_client_new ();
742
742
        g_signal_connect (backlight->priv->client, "changed",
743
743
                          G_CALLBACK (gpm_backlight_client_changed_cb), backlight);
744
744
 
746
746
        backlight->priv->can_dim = gpm_brightness_has_hw (backlight->priv->brightness);
747
747
 
748
748
        /* we use DeviceKit-power to see if we should show the lid UI */
749
 
#if DKP_CHECK_VERSION(0x009)
750
749
        g_object_get (backlight->priv->client,
751
750
                      "lid-is-present", &lid_is_present,
752
751
                      NULL);
753
 
#endif
754
752
 
755
753
        /* expose ui in prefs program */
756
754
        prefs_server = gpm_prefs_server_new ();