~ps-jenkins/indicator-power/ubuntu-vivid-proposed

« back to all changes in this revision

Viewing changes to src/service.c

Add mock battery support to make QA testing easier. Fixes: 1373511
Approved by: Antti Kaijanmäki, PS Jenkins bot, Ted Gould

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
enum
52
52
{
53
53
  PROP_0,
 
54
  PROP_BUS,
54
55
  PROP_DEVICE_PROVIDER,
55
56
  LAST_PROP
56
57
};
839
840
  g_debug ("bus acquired: %s", name);
840
841
 
841
842
  p->conn = g_object_ref (G_OBJECT (connection));
 
843
  g_object_notify_by_pspec (G_OBJECT(self), properties[PROP_BUS]);
842
844
 
843
845
  /* export the battery properties */
844
846
  indicator_power_notifier_set_bus (p->notifier, connection);
977
979
 
978
980
  switch (property_id)
979
981
    {
 
982
      case PROP_BUS:
 
983
        g_value_set_object (value, p->conn);
 
984
        break;
 
985
 
980
986
      case PROP_DEVICE_PROVIDER:
981
987
        g_value_set_object (value, p->device_provider);
982
988
        break;
1113
1119
 
1114
1120
  properties[PROP_0] = NULL;
1115
1121
 
 
1122
  properties[PROP_BUS] = g_param_spec_object (
 
1123
    "bus",
 
1124
    "Bus",
 
1125
    "GDBusConnection for exporting menus/actions",
 
1126
    G_TYPE_OBJECT,
 
1127
    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
 
1128
 
1116
1129
  properties[PROP_DEVICE_PROVIDER] = g_param_spec_object (
1117
1130
    "device-provider",
1118
1131
    "Device Provider",