~ubuntu-branches/ubuntu/saucy/xfce4-power-manager/saucy-updates

« back to all changes in this revision

Viewing changes to .pc/09_fix_insert_battery.patch/src/xfpm-power.c

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2012-04-03 22:15:05 UTC
  • mfrom: (2.3.8)
  • Revision ID: package-import@ubuntu.com-20120403221505-2dvza7w2d97zb7qn
Tags: 1.0.11-0ubuntu1
* New upstream bugfix release.
* debian/patches:
  - 0001-Solaris-specific-code-for-determining-the-start-time.patch,
    02_fix-notify-detect.patch,
    07_fix_broken_empty_icon_battery.patch: dropped, included upstream.
  - xubuntu_fix-status-icon-other-devices.patch: refreshed to apply cleanly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
337
337
    }
338
338
    
339
339
    g_signal_emit (G_OBJECT (power), signals [SLEEPING], 0);
340
 
    xfpm_send_message_to_network_manager ("sleep");
 
340
    xfpm_network_manager_sleep (TRUE);
341
341
        
342
342
    g_object_get (G_OBJECT (power->priv->conf),
343
343
                  LOCK_SCREEN_ON_SLEEP, &lock_screen,
373
373
    }
374
374
    
375
375
    g_signal_emit (G_OBJECT (power), signals [WAKING_UP], 0);
376
 
    xfpm_send_message_to_network_manager ("wake");
 
376
    xfpm_network_manager_sleep (FALSE);
377
377
}
378
378
 
379
379
static void
981
981
xfpm_power_add_device (XfpmPower *power, const gchar *object_path)
982
982
{
983
983
    DBusGProxy *proxy_prop;
984
 
    guint device_type;
 
984
    guint device_type = XFPM_DEVICE_TYPE_UNKNOWN;
985
985
    GValue value;
986
986
    
987
987
    proxy_prop = dbus_g_proxy_new_for_name (power->priv->bus, 
999
999
    
1000
1000
    device_type = g_value_get_uint (&value);
1001
1001
    
 
1002
    XFPM_DEBUG_ENUM (device_type, XFPM_TYPE_DEVICE_TYPE, " device added");
 
1003
    
1002
1004
    if ( device_type == XFPM_DEVICE_TYPE_BATTERY || 
1003
1005
         device_type == XFPM_DEVICE_TYPE_UPS     ||
1004
1006
         device_type == XFPM_DEVICE_TYPE_MOUSE   ||
1075
1077
xfpm_power_changed_cb (DBusGProxy *proxy, XfpmPower *power)
1076
1078
{
1077
1079
    xfpm_power_get_properties (power);
 
1080
    xfpm_power_refresh_adaptor_visible (power);
1078
1081
}
1079
1082
 
1080
1083
static void
1092
1095
static void
1093
1096
xfpm_power_device_changed_cb (DBusGProxy *proxy, const gchar *object_path, XfpmPower *power)
1094
1097
{
1095
 
    XfpmBattery *battery;
1096
 
    
1097
 
    battery = g_hash_table_lookup (power->priv->hash, object_path);
1098
 
    
1099
 
    if ( battery )
1100
 
    {
1101
 
        
1102
 
    }
 
1098
    xfpm_power_refresh_adaptor_visible (power);
1103
1099
}
1104
1100
 
1105
1101
#ifdef ENABLE_POLKIT