~charlesk/indicator-power/lp-880881

« back to all changes in this revision

Viewing changes to src/device.c

  • Committer: Charles Kerr
  • Date: 2014-03-05 04:57:52 UTC
  • Revision ID: charles.kerr@canonical.com-20140305045752-njq86d83mbdyv33i
update the header / menuitem text / accessible text to reflect the changes in https://wiki.ubuntu.com/Power?action=diff&rev2=44&rev1=43#Title

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  gchar * object_path;
38
38
  gdouble percentage;
39
39
  time_t time;
 
40
 
 
41
  /* Timestamp of when when we first noticed that upower couldn't estimate
 
42
     the time-remaining field for this device, or 0 if not applicable.
 
43
     This is used when generating the time-remaining string. */
 
44
  GTimer * inestimable;
40
45
};
41
46
 
42
47
#define INDICATOR_POWER_DEVICE_GET_PRIVATE(o) (INDICATOR_POWER_DEVICE(o)->priv)
136
141
static void
137
142
indicator_power_device_dispose (GObject *object)
138
143
{
 
144
  IndicatorPowerDevice * self = INDICATOR_POWER_DEVICE(object);
 
145
  IndicatorPowerDevicePrivate * p = self->priv;
 
146
 
 
147
  g_clear_pointer (&p->inestimable, g_timer_destroy);
 
148
 
139
149
  G_OBJECT_CLASS (indicator_power_device_parent_class)->dispose (object);
140
150
}
141
151
 
192
202
set_property (GObject * o, guint prop_id, const GValue * value, GParamSpec * pspec)
193
203
{
194
204
  IndicatorPowerDevice * self = INDICATOR_POWER_DEVICE(o);
195
 
  IndicatorPowerDevicePrivate * priv = self->priv;
 
205
  IndicatorPowerDevicePrivate * p = self->priv;
196
206
 
197
207
  switch (prop_id)
198
208
    {
199
209
      case PROP_KIND:
200
 
        priv->kind = g_value_get_int (value);
 
210
        p->kind = g_value_get_int (value);
201
211
        break;
202
212
 
203
213
      case PROP_STATE:
204
 
        priv->state = g_value_get_int (value);
 
214
        p->state = g_value_get_int (value);
205
215
        break;
206
216
 
207
217
      case PROP_OBJECT_PATH:
208
 
        g_free (priv->object_path);
209
 
        priv->object_path = g_value_dup_string (value);
 
218
        g_free (p->object_path);
 
219
        p->object_path = g_value_dup_string (value);
210
220
        break;
211
221
 
212
222
      case PROP_PERCENTAGE:
213
 
        priv->percentage = g_value_get_double (value);
 
223
        p->percentage = g_value_get_double (value);
214
224
        break;
215
225
 
216
226
      case PROP_TIME:
217
 
        priv->time = g_value_get_uint64(value);
 
227
        p->time = g_value_get_uint64(value);
218
228
        break;
219
229
 
220
230
      default:
221
231
        G_OBJECT_WARN_INVALID_PROPERTY_ID(o, prop_id, pspec);
222
232
        break;
223
233
    }
 
234
 
 
235
  /* update inestimable_at */
 
236
 
 
237
  const gboolean is_inestimable = (p->time == 0)
 
238
                               && (p->state != UP_DEVICE_STATE_FULLY_CHARGED)
 
239
                               && (p->percentage > 0);
 
240
 
 
241
  if (!is_inestimable)
 
242
    {
 
243
      g_clear_pointer (&p->inestimable, g_timer_destroy);
 
244
    }
 
245
  else if (p->inestimable == NULL)
 
246
    {
 
247
      p->inestimable = g_timer_new ();
 
248
    }
224
249
}
225
250
 
226
251
/***
442
467
****
443
468
***/
444
469
 
445
 
/* Format time remaining for reading ("H:MM") and speech ("H hours, MM minutes") */
446
 
static void
447
 
get_timestring (guint64   time_secs,
448
 
                gchar   **readable_timestring,
449
 
                gchar   **accessible_timestring)
450
 
{
451
 
  gint  hours;
452
 
  gint  minutes;
453
 
 
454
 
  /* Add 0.5 to do rounding */
455
 
  minutes = (int) ( ( time_secs / 60.0 ) + 0.5 );
456
 
 
457
 
  if (minutes == 0)
458
 
    {
459
 
      *readable_timestring = g_strdup (_("Unknown time"));
460
 
      *accessible_timestring = g_strdup (_("Unknown time"));
461
 
 
462
 
      return;
463
 
    }
464
 
 
465
 
  if (minutes < 60)
466
 
    {
467
 
      *readable_timestring = g_strdup_printf ("0:%.2i", minutes);
468
 
      *accessible_timestring = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, "%i minute",
469
 
                                              "%i minutes",
470
 
                                              minutes), minutes);
471
 
      return;
472
 
    }
473
 
 
474
 
  hours = minutes / 60;
475
 
  minutes = minutes % 60;
476
 
 
477
 
  *readable_timestring = g_strdup_printf ("%i:%.2i", hours, minutes);
478
 
 
479
 
  if (minutes == 0)
480
 
    {
481
 
      *accessible_timestring = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
482
 
                                              "%i hour",
483
 
                                              "%i hours",
484
 
                                              hours), hours);
485
 
    }
486
 
  else
487
 
    {
488
 
      /* TRANSLATOR: "%i %s %i %s" are "%i hours %i minutes"
489
 
       * Swap order with "%2$s %2$i %1$s %1$i if needed */
490
 
      *accessible_timestring = g_strdup_printf (_("%i %s %i %s"),
491
 
                                              hours, g_dngettext (GETTEXT_PACKAGE, "hour", "hours", hours),
492
 
                                              minutes, g_dngettext (GETTEXT_PACKAGE, "minute", "minutes", minutes));
493
 
    }
494
 
}
495
 
 
496
470
static const gchar *
497
471
device_kind_to_localised_string (UpDeviceKind kind)
498
472
{
555
529
  return text;
556
530
}
557
531
 
558
 
static char *
559
 
join_strings (const char * name, const char * time, const char * percent)
560
 
{
561
 
  char * str;
562
 
  const gboolean have_name = name && *name;
563
 
  const gboolean have_time = time && *time;
564
 
  const gboolean have_percent = percent && *percent;
565
 
 
566
 
  if (have_name && have_time && have_percent)
567
 
    str = g_strdup_printf (_("%s (%s, %s)"), name, time, percent);
568
 
  else if (have_name && have_time)
569
 
    str = g_strdup_printf (_("%s (%s)"), name, time);
570
 
  else if (have_name && have_percent)
571
 
    str = g_strdup_printf (_("%s (%s)"), name, percent);
572
 
  else if (have_name)
573
 
    str = g_strdup (name);
574
 
  else if (have_time && have_percent)
575
 
    str = g_strdup_printf (_("(%s, %s)"), time, percent);
576
 
  else if (have_time)
577
 
    str = g_strdup_printf (_("(%s)"), time);
578
 
  else if (have_percent)
579
 
    str = g_strdup_printf (_("(%s)"), percent);
580
 
  else
581
 
    str = g_strdup ("");
582
 
 
583
 
  return str;
584
 
}
585
 
 
586
 
static void
587
 
indicator_power_device_get_text (const IndicatorPowerDevice * device,
588
 
                                 gboolean show_time_in_header,
589
 
                                 gboolean show_percentage_in_header,
590
 
                                 gchar ** header,
591
 
                                 gchar ** label,
592
 
                                 gchar ** a11y)
593
 
{
594
 
  if (!INDICATOR_IS_POWER_DEVICE(device))
595
 
    {
596
 
      if (a11y != NULL) *a11y = NULL;
597
 
      if (label != NULL) *label = NULL;
598
 
      if (header != NULL) *header = NULL;
599
 
      g_warning ("%s: %p is not an IndicatorPowerDevice", G_STRFUNC, device);
600
 
      return;
601
 
    }
602
 
 
603
 
  const time_t time = indicator_power_device_get_time (device);
604
 
  const UpDeviceState state = indicator_power_device_get_state (device);
605
 
  const UpDeviceKind kind = indicator_power_device_get_kind (device);
606
 
  const gchar * device_name = device_kind_to_localised_string (kind);
607
 
  const gdouble percentage = indicator_power_device_get_percentage (device);
608
 
  char pctstr[32] = { '\0' };
609
 
  g_snprintf (pctstr, sizeof(pctstr), "%.0lf%%", percentage);
610
 
 
611
 
  GString * terse_time = g_string_new (NULL);
612
 
  GString * verbose_time = g_string_new (NULL);
613
 
  GString * accessible_time = g_string_new (NULL);
614
 
 
615
 
  if (time > 0)
616
 
    {
617
 
      char * readable_timestr = NULL;
618
 
      char * accessible_timestr = NULL;
619
 
      get_timestring (time, &readable_timestr, &accessible_timestr);
620
 
 
621
 
      if (state == UP_DEVICE_STATE_CHARGING)
622
 
        {
623
 
          g_string_assign (terse_time, readable_timestr);
624
 
          g_string_printf (verbose_time, _("%s to charge"), readable_timestr);
625
 
          g_string_printf (accessible_time, _("%s to charge"), accessible_timestr);
626
 
        }
627
 
      else if ((state == UP_DEVICE_STATE_DISCHARGING) && (time <= (60*60*24)))
628
 
        {
629
 
          g_string_assign (terse_time, readable_timestr);
630
 
          g_string_printf (verbose_time, _("%s left"), readable_timestr);
631
 
          g_string_printf (accessible_time, _("%s left"), accessible_timestr);
632
 
        }
633
 
      else
634
 
        {
635
 
          /* if there's more than 24 hours remaining, we don't show it */
636
 
        }
637
 
 
638
 
      g_free (readable_timestr);
639
 
      g_free (accessible_timestr);
640
 
    }
641
 
  else if (state == UP_DEVICE_STATE_FULLY_CHARGED)
642
 
    {
643
 
      g_string_assign (verbose_time,    _("charged"));
644
 
      g_string_assign (accessible_time, _("charged"));
645
 
    }
646
 
  else if (percentage > 0)
647
 
    {
648
 
      g_string_assign (terse_time,      _("estimating…"));
649
 
      g_string_assign (verbose_time,    _("estimating…"));
650
 
      g_string_assign (accessible_time, _("estimating…"));
651
 
    }
652
 
  else
653
 
    {
654
 
      *pctstr = '\0';
655
 
 
656
 
      if (kind != UP_DEVICE_KIND_LINE_POWER)
657
 
        {
658
 
          g_string_assign (verbose_time,    _("not present"));
659
 
          g_string_assign (accessible_time, _("not present"));
660
 
        }
661
 
    }
662
 
 
663
 
  if (header != NULL)
664
 
    *header = join_strings (NULL,
665
 
                            show_time_in_header ? terse_time->str : "",
666
 
                            show_percentage_in_header ? pctstr : "");
667
 
 
668
 
  if (label != NULL)
669
 
    *label  = join_strings (device_name,
670
 
                            verbose_time->str,
671
 
                            NULL);
672
 
 
673
 
  if (a11y != NULL)
674
 
    *a11y   = join_strings (device_name,
675
 
                            accessible_time->str,
676
 
                            pctstr);
677
 
 
678
 
  g_string_free (terse_time, TRUE);
679
 
  g_string_free (verbose_time, TRUE);
680
 
  g_string_free (accessible_time, TRUE);
681
 
}
682
 
 
683
 
gchar *
684
 
indicator_power_device_get_label (const IndicatorPowerDevice * device)
685
 
{
686
 
  gchar * label = NULL;
687
 
  indicator_power_device_get_text (device, FALSE, FALSE,
688
 
                                   NULL, &label, NULL);
689
 
  return label;
690
 
}
691
 
 
692
 
void
693
 
indicator_power_device_get_header (const IndicatorPowerDevice * device,
694
 
                                   gboolean                     show_time,
695
 
                                   gboolean                     show_percentage,
696
 
                                   gchar                     ** header,
697
 
                                   gchar                     ** a11y)
698
 
{
699
 
  indicator_power_device_get_text (device, show_time, show_percentage,
700
 
                                   header, NULL, a11y);
 
532
/**
 
533
 * The '''brief time-remaining string''' for a component should be:
 
534
 *  * the time remaining for it to empty or fully charge,
 
535
 *    if estimable, in H:MM format; otherwise
 
536
 *  * “estimating…” if the time remaining has been inestimable for
 
537
 *    less than 30 seconds; otherwise
 
538
 *  * “unknown” if the time remaining has been inestimable for
 
539
 *    between 30 seconds and one minute; otherwise
 
540
 *  * the empty string.
 
541
 */
 
542
static void
 
543
get_brief_time_remaining (const IndicatorPowerDevice * device,
 
544
                          char                       * str,
 
545
                          gulong                       size)
 
546
{
 
547
  const IndicatorPowerDevicePrivate * p = device->priv;
 
548
 
 
549
  if (p->time > 0)
 
550
    {
 
551
      int minutes = p->time / 60;
 
552
      int hours = minutes / 60;
 
553
      minutes %= 60;
 
554
 
 
555
      g_snprintf (str, size, "%0d:%02d", hours, minutes);
 
556
    }
 
557
  else if (p->inestimable != NULL)
 
558
    {
 
559
      const double elapsed = g_timer_elapsed (p->inestimable, NULL);
 
560
 
 
561
      if (elapsed < 30)
 
562
        {
 
563
          g_snprintf (str, size, _("estimating…"));
 
564
        }
 
565
      else if (elapsed < 60)
 
566
        {
 
567
          g_snprintf (str, size, _("unknown"));
 
568
        }
 
569
      else
 
570
        {
 
571
          *str = '\0';
 
572
        }
 
573
    }
 
574
  else
 
575
    {
 
576
      *str = '\0';
 
577
    }
 
578
}
 
579
 
 
580
/**
 
581
 * The '''expanded time-remaining string''' for a component should
 
582
 * be the same as the brief time-remaining string, except that if
 
583
 * the time is estimable:
 
584
 *  * if the component is charging, it should be “H:MM to charge”
 
585
 *  * if the component is discharging, it should be “H:MM left”.
 
586
 */
 
587
static void
 
588
get_expanded_time_remaining (const IndicatorPowerDevice * device,
 
589
                             char                       * str,
 
590
                             gulong                       size)
 
591
{
 
592
  const IndicatorPowerDevicePrivate * p;
 
593
 
 
594
  g_return_if_fail (str != NULL);
 
595
  g_return_if_fail (size > 0);
 
596
  *str = '\0';
 
597
  g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
 
598
 
 
599
  p = device->priv;
 
600
 
 
601
  if (p->time && ((p->state == UP_DEVICE_STATE_CHARGING) || (p->state == UP_DEVICE_STATE_DISCHARGING)))
 
602
    {
 
603
      int minutes = p->time / 60;
 
604
      int hours = minutes / 60;
 
605
      minutes %= 60;
 
606
 
 
607
      if (p->state == UP_DEVICE_STATE_CHARGING)
 
608
        {
 
609
          g_snprintf (str, size, _("%0d:%02d to charge"), hours, minutes);
 
610
        }
 
611
      else // discharging
 
612
        {
 
613
          g_snprintf (str, size, _("%0d:%02d left"), hours, minutes);
 
614
        }
 
615
    }
 
616
  else
 
617
    {
 
618
        get_brief_time_remaining (device, str, size);
 
619
    }
 
620
}
 
621
 
 
622
/**
 
623
 * The '''accessible time-remaining string''' for a component
 
624
 * should be the same as the expanded time-remaining string,
 
625
 * except the H:MM time should be rendered as “''H'' hours ''M'' minutes”,
 
626
 * or just as “''M'' * minutes” if the time is less than one hour.
 
627
 */
 
628
static void
 
629
get_accessible_time_remaining (const IndicatorPowerDevice * device,
 
630
                               char                       * str,
 
631
                               gulong                       size)
 
632
{
 
633
  const IndicatorPowerDevicePrivate * p;
 
634
 
 
635
  g_return_if_fail (str != NULL);
 
636
  g_return_if_fail (size > 0);
 
637
  *str = '\0';
 
638
  g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
 
639
 
 
640
  p = device->priv;
 
641
 
 
642
  if (p->time && ((p->state == UP_DEVICE_STATE_CHARGING) || (p->state == UP_DEVICE_STATE_DISCHARGING)))
 
643
    {
 
644
      int minutes = p->time / 60;
 
645
      int hours = minutes / 60;
 
646
      minutes %= 60;
 
647
 
 
648
      if (p->state == UP_DEVICE_STATE_CHARGING)
 
649
        {
 
650
          if (hours)
 
651
            g_snprintf (str, size, _("%d %s %d %s to charge"),
 
652
                        hours, g_dngettext (NULL, "hour", "hours", hours),
 
653
                        minutes, g_dngettext (NULL, "minute", "minutes", minutes));
 
654
         else
 
655
            g_snprintf (str, size, _("%d %s to charge"),
 
656
                        minutes, g_dngettext (NULL, "minute", "minutes", minutes));
 
657
        }
 
658
      else // discharging
 
659
        {
 
660
          if (hours)
 
661
            g_snprintf (str, size, _("%d %s %d %s left"),
 
662
                        hours, g_dngettext (NULL, "hour", "hours", hours),
 
663
                        minutes, g_dngettext (NULL, "minute", "minutes", minutes));
 
664
         else
 
665
            g_snprintf (str, size, _("%d %s left"),
 
666
                        minutes, g_dngettext (NULL, "minute", "minutes", minutes));
 
667
        }
 
668
    }
 
669
  else
 
670
    {
 
671
        get_brief_time_remaining (device, str, size);
 
672
    }
 
673
}
 
674
 
 
675
/**
 
676
 * The time is relevant for a device if either (a) the component is charging,
 
677
 * or (b) the component is discharging and the estimated time is less than
 
678
 * 24 hours. (A time greater than 24 hours is probably a mistaken calculation.)
 
679
 */
 
680
static gboolean
 
681
time_is_relevant (const IndicatorPowerDevice * device)
 
682
{
 
683
  const IndicatorPowerDevicePrivate * p = device->priv;
 
684
 
 
685
  if (p->state == UP_DEVICE_STATE_CHARGING)
 
686
    return TRUE;
 
687
 
 
688
  if ((p->state == UP_DEVICE_STATE_DISCHARGING) && (p->time<(24*60*60)))
 
689
    return TRUE;
 
690
 
 
691
  return FALSE;
 
692
}
 
693
 
 
694
/**
 
695
 * The menu item for each chargeable component should consist of ...
 
696
 * Text representing the name of the component (“Battery”, “Mouse”,
 
697
 * “UPS”, “Alejandra’s iPod”, etc) and the charge status in brackets:
 
698
 *
 
699
 *  * “X (charged)” if it is fully charged and not discharging;
 
700
 *  * “X (expanded time-remaining string)” if it is charging,
 
701
 *    or discharging with less than 24 hours left;
 
702
 *  * “X” if it is discharging with 24 hours or more left. 
 
703
 *
 
704
 * The accessible label for the menu item should be the same as the
 
705
 * visible label, except with the accessible time-remaining string
 
706
 * instead of the expanded time-remaining string. 
 
707
 */
 
708
static void
 
709
get_menuitem_text (const IndicatorPowerDevice * device,
 
710
                   gchar                      * str,
 
711
                   gulong                       size,
 
712
                   gboolean                     accessible)
 
713
{
 
714
  const IndicatorPowerDevicePrivate * p = device->priv;
 
715
  const char * kind_str = device_kind_to_localised_string (p->kind);
 
716
 
 
717
  if (p->state == UP_DEVICE_STATE_FULLY_CHARGED)
 
718
    {
 
719
      g_snprintf (str, size, _("%s (charged)"), kind_str);
 
720
    }
 
721
  else
 
722
    {
 
723
      char buf[64];
 
724
 
 
725
      if (time_is_relevant (device))
 
726
        {
 
727
          if (accessible)
 
728
            get_accessible_time_remaining (device, buf, sizeof(buf));
 
729
          else
 
730
            get_expanded_time_remaining (device, buf, sizeof(buf));
 
731
        }
 
732
      else
 
733
        {
 
734
          *buf = '\0';
 
735
        }
 
736
 
 
737
      if (*buf)
 
738
        g_snprintf (str, size, _("%s (%s)"), kind_str, buf);
 
739
      else
 
740
        g_strlcpy (str, kind_str, size);
 
741
    }
 
742
}
 
743
 
 
744
void
 
745
indicator_power_device_get_readable_text (const IndicatorPowerDevice * device,
 
746
                                          gchar                      * str,
 
747
                                          gulong                       size)
 
748
{
 
749
  g_return_if_fail (str != NULL);
 
750
  g_return_if_fail (size > 0);
 
751
  *str = '\0';
 
752
  g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
 
753
 
 
754
  get_menuitem_text (device, str, size, FALSE);
 
755
}
 
756
 
 
757
void
 
758
indicator_power_device_get_accessible_text (const IndicatorPowerDevice * device,
 
759
                                            gchar                      * str,
 
760
                                            gulong                       size)
 
761
{
 
762
  g_return_if_fail (str != NULL);
 
763
  g_return_if_fail (size > 0);
 
764
  *str = '\0';
 
765
  g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
 
766
 
 
767
  get_menuitem_text (device, str, size, TRUE);
 
768
}
 
769
 
 
770
#if 0
 
771
- If the time is relevant, the brackets should contain the time-remaining string for that component.
 
772
+ If the time is relevant, the brackets should contain the brief time-remaining string for that component.
 
773
 
 
774
- Regardless, the accessible name for the whole menu title should be the same as the accessible name for that thing’s component inside the menu itself. 
 
775
+ The accessible name for the whole menu title should be the same as the except using the accessible time-remaining string instead of the brief time-remaining string.
 
776
#endif
 
777
 
 
778
/**
 
779
 * If the time is relevant and/or “Show Percentage in Menu Bar” is checked,
 
780
 * the icon should be followed by brackets.
 
781
 *
 
782
 * If the time is relevant, the brackets should contain the time-remaining
 
783
 * string for that component.
 
784
 *
 
785
 * If “Show Percentage in Menu Bar” is checked (as it should not be by default),
 
786
 * the brackets should contain the percentage charge for that device.
 
787
 *
 
788
 * If both conditions are true, the time and percentage should be separated by a space. 
 
789
 */
 
790
void
 
791
indicator_power_device_get_readable_title (const IndicatorPowerDevice * device,
 
792
                                           gchar                      * str,
 
793
                                           gulong                       size,
 
794
                                           gboolean                     want_time,
 
795
                                           gboolean                     want_percent)
 
796
{
 
797
  char tr[64];
 
798
  const IndicatorPowerDevicePrivate * p;
 
799
 
 
800
  g_return_if_fail (str != NULL);
 
801
  g_return_if_fail (size > 0);
 
802
  *str = '\0';
 
803
  g_return_if_fail (INDICATOR_IS_POWER_DEVICE(device));
 
804
 
 
805
  p = device->priv;
 
806
 
 
807
  if (want_time && !time_is_relevant (device))
 
808
    want_time = FALSE;
 
809
 
 
810
  if (p->percentage < 0.01)
 
811
    want_percent = FALSE;
 
812
 
 
813
  if (want_time)
 
814
    {
 
815
      get_brief_time_remaining (device, tr, sizeof(tr));
 
816
 
 
817
      if (!*tr)
 
818
        want_time = FALSE;
 
819
    }
 
820
 
 
821
  if (want_time && want_percent)
 
822
    {
 
823
      g_snprintf (str, size, _("(%s, %.0lf%%)"), tr, p->percentage);
 
824
    }
 
825
  else if (want_time)
 
826
    {
 
827
      g_snprintf (str, size, _("(%s)"), tr);
 
828
    }
 
829
  else if (want_percent)
 
830
    {
 
831
      g_snprintf (str, size, _("(%.0lf%%)"), p->percentage);
 
832
    }
 
833
  else
 
834
    {
 
835
      *str = '\0';
 
836
    }
 
837
}
 
838
 
 
839
/**
 
840
 * Regardless, the accessible name for the whole menu title should be the same
 
841
 * as the accessible name for that thing’s component inside the menu itself. 
 
842
 */
 
843
void
 
844
indicator_power_device_get_accessible_title (const IndicatorPowerDevice * device,
 
845
                                             gchar                      * str,
 
846
                                             gulong                       size,
 
847
                                             gboolean                     want_time G_GNUC_UNUSED,
 
848
                                             gboolean                     want_percent G_GNUC_UNUSED)
 
849
{
 
850
  indicator_power_device_get_accessible_text (device, str, size);
701
851
}
702
852
 
703
853
/***