aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2012-10-03 21:25:19 +0200
committerSebastien Bacher <seb128@ubuntu.com>2012-10-03 21:25:19 +0200
commit0fa9b264b7d79f9bb303b9383379635bb293cf3d (patch)
tree7d96d9ebf8662e55078d0d323a92ddae65b95ce8
parentc752cbea418bf5f85a0498fe3771439e1b70c394 (diff)
parent3a0758a29fdae434142e1a67329ff2b65fee3c6b (diff)
downloadayatana-indicator-power-0fa9b264b7d79f9bb303b9383379635bb293cf3d.tar.gz
ayatana-indicator-power-0fa9b264b7d79f9bb303b9383379635bb293cf3d.tar.bz2
ayatana-indicator-power-0fa9b264b7d79f9bb303b9383379635bb293cf3d.zip
Import upstream version 12.10.2
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog33
-rw-r--r--Makefile.in12
-rw-r--r--NEWS11
-rw-r--r--aclocal.m46
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--data/Makefile.in2
-rw-r--r--src/Makefile.in2
-rw-r--r--src/device.c5
-rw-r--r--src/indicator-power.c1
-rw-r--r--tests/Makefile.in2
-rw-r--r--tests/test-device.cc31
13 files changed, 93 insertions, 35 deletions
diff --git a/AUTHORS b/AUTHORS
index 46d365e..abbb7a4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -7,6 +7,7 @@
Javier Jardón
Ken VanDine
ken.vandine@canonical.com
+ Lars Uebernickel
Marco Trevisan (Treviño)
Michael Terry
Ted Gould
diff --git a/ChangeLog b/ChangeLog
index ab5e803..20338f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,38 @@
# Generated by Makefile. Do not edit.
+2012-10-03 Charles Kerr <charles.kerr@canonical.com>
+
+ 12.10.2
+
+2012-10-03 Charles Kerr <charles.kerr@canonical.com>
+
+ merge lp:~charlesk/indicator-power/lp-1054146 to give a more accurate view of discharging batteries
+
+2012-10-03 Charles Kerr <charles.kerr@canonical.com>
+
+ when discharging the battery, prefer the percent-charged icons over the full,good,low icons because the former show a more accurate view of the charge.
+
+2012-09-26 Lars Uebernickel <lars.uebernickel@canonical.com>
+
+ Merge lp:~/larsu/indicator-power/plug-get-icon-memory-leak
+
+ Plugs a small memory leak in indicator-power.c
+
+2012-09-25 Lars Uebernickel <lars.uebernickel@canonical.com>
+
+ get_icon: Plug memory leak
+
+2012-09-20 Lars Uebernickel <lars.uebernickel@canonical.com>
+
+ device.c: include gi18n-lib.h instead of gi18n.h
+
+ The former calls the 'd' variants of the gettext functions and passes the
+ libraries domain in each call.
+
+2012-09-05 Charles Kerr <charles.kerr@canonical.com>
+
+ copyediting: text formatting to make the icon list more readable
+
2012-08-21 Charles Kerr <charles.kerr@canonical.com>
12.10.1
diff --git a/Makefile.in b/Makefile.in
index 13bdccf..90d3a93 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -57,10 +57,10 @@ host_triplet = @host@
DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(top_srcdir)/Makefile.am.coverage \
- $(top_srcdir)/configure ABOUT-NLS COPYING build-aux/compile \
- build-aux/config.guess build-aux/config.rpath \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/ltmain.sh build-aux/missing
+ $(top_srcdir)/configure ABOUT-NLS COPYING NEWS \
+ build-aux/compile build-aux/config.guess \
+ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
+ build-aux/install-sh build-aux/ltmain.sh build-aux/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gtest.m4 \
@@ -656,7 +656,7 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
+ chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..ff89f0e
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,11 @@
+12.10.2
+ - Show a more accurate view of discharging batteries (LP: #1054146)
+ - Fix a GIcon memory leak
+ - In device.c, include gi18n-lib.h instead of gi18n.h
+
+12.10.1
+ - Update our glib version dependency (LP: #1023533)
+
+12.10.0
+ - Refactored the device icon/text code for better test coverage
+
diff --git a/aclocal.m4 b/aclocal.m4
index a50a555..04bbb89 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -13405,7 +13405,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.5], [],
+m4_if([$1], [1.11.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -13421,7 +13421,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.5])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/configure b/configure
index e3a1115..2c42ec3 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for indicator-power 12.10.1.
+# Generated by GNU Autoconf 2.69 for indicator-power 12.10.2.
#
# Report bugs to <http://bugs.launchpad.net/indicator-power>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='indicator-power'
PACKAGE_TARNAME='indicator-power'
-PACKAGE_VERSION='12.10.1'
-PACKAGE_STRING='indicator-power 12.10.1'
+PACKAGE_VERSION='12.10.2'
+PACKAGE_STRING='indicator-power 12.10.2'
PACKAGE_BUGREPORT='http://bugs.launchpad.net/indicator-power'
PACKAGE_URL='http://launchpad.net/indicator-power'
@@ -1442,7 +1442,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures indicator-power 12.10.1 to adapt to many kinds of systems.
+\`configure' configures indicator-power 12.10.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1512,7 +1512,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of indicator-power 12.10.1:";;
+ short | recursive ) echo "Configuration of indicator-power 12.10.2:";;
esac
cat <<\_ACEOF
@@ -1666,7 +1666,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-indicator-power configure 12.10.1
+indicator-power configure 12.10.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by indicator-power $as_me 12.10.1, which was
+It was created by indicator-power $as_me 12.10.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3026,7 +3026,7 @@ fi
# Define the identity of the package.
PACKAGE='indicator-power'
- VERSION='12.10.1'
+ VERSION='12.10.2'
cat >>confdefs.h <<_ACEOF
@@ -25191,7 +25191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by indicator-power $as_me 12.10.1, which was
+This file was extended by indicator-power $as_me 12.10.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25258,7 +25258,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-indicator-power config.status 12.10.1
+indicator-power config.status 12.10.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 94f5b83..5fbf2e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_INIT([indicator-power],
- [12.10.1],
+ [12.10.2],
[http://bugs.launchpad.net/indicator-power],
[indicator-power],
[http://launchpad.net/indicator-power])
diff --git a/data/Makefile.in b/data/Makefile.in
index 3e1adb9..00a792d 100644
--- a/data/Makefile.in
+++ b/data/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
diff --git a/src/Makefile.in b/src/Makefile.in
index a454e5b..baaf794 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
diff --git a/src/device.c b/src/device.c
index c22aae8..898e18f 100644
--- a/src/device.c
+++ b/src/device.c
@@ -25,7 +25,7 @@ License along with this library. If not, see
#include "config.h"
#endif
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include "device.h"
@@ -390,8 +390,9 @@ indicator_power_device_get_icon_names (const IndicatorPowerDevice * device)
suffix_str = get_device_icon_suffix (percentage);
index_str = get_device_icon_index (percentage);
- g_ptr_array_add (names, g_strdup_printf ("battery-%s-symbolic", suffix_str));
+ g_ptr_array_add (names, g_strdup_printf ("%s-%s", kind_str, index_str));
g_ptr_array_add (names, g_strdup_printf ("gpm-%s-%s", kind_str, index_str));
+ g_ptr_array_add (names, g_strdup_printf ("battery-%s-symbolic", suffix_str));
g_ptr_array_add (names, g_strdup_printf ("battery-%s", suffix_str));
break;
diff --git a/src/indicator-power.c b/src/indicator-power.c
index f3a7235..9829839 100644
--- a/src/indicator-power.c
+++ b/src/indicator-power.c
@@ -508,6 +508,7 @@ get_image (IndicatorObject *io)
gicon = g_themed_icon_new (DEFAULT_ICON);
priv->status_image = GTK_IMAGE (gtk_image_new_from_gicon (gicon,
GTK_ICON_SIZE_LARGE_TOOLBAR));
+ g_object_unref (gicon);
}
return priv->status_image;
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 4a20f80..6d5a918 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
diff --git a/tests/test-device.cc b/tests/test-device.cc
index 2c88ea1..eb087dc 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -252,9 +252,12 @@ TEST_F(DeviceTest, IconNames)
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_FULLY_CHARGED,
NULL);
- check_icon_names (device, "battery-full-charged-symbolic;battery-full-charging-symbolic;"
- "gpm-battery-full;gpm-battery-100;"
- "battery-full-charged;battery-full-charging");
+ check_icon_names (device, "battery-full-charged-symbolic;"
+ "battery-full-charging-symbolic;"
+ "gpm-battery-full;"
+ "gpm-battery-100;"
+ "battery-full-charged;"
+ "battery-full-charging");
// charging battery, 95%
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
@@ -307,8 +310,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 95.0,
NULL);
- check_icon_names (device, "battery-full-symbolic;"
+ check_icon_names (device, "battery-100;"
"gpm-battery-100;"
+ "battery-full-symbolic;"
"battery-full");
// discharging battery, 85%
@@ -316,8 +320,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_DISCHARGING,
INDICATOR_POWER_DEVICE_PERCENTAGE, 85.0,
NULL);
- check_icon_names (device, "battery-full-symbolic;"
+ check_icon_names (device, "battery-080;"
"gpm-battery-080;"
+ "battery-full-symbolic;"
"battery-full");
// discharging battery, 50% -- 1 hour left
@@ -326,8 +331,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 50.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
NULL);
- check_icon_names (device, "battery-good-symbolic;"
+ check_icon_names (device, "battery-060;"
"gpm-battery-060;"
+ "battery-good-symbolic;"
"battery-good");
// discharging battery, 25% -- 1 hour left
@@ -336,8 +342,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
NULL);
- check_icon_names (device, "battery-good-symbolic;"
+ check_icon_names (device, "battery-040;"
"gpm-battery-040;"
+ "battery-good-symbolic;"
"battery-good");
// discharging battery, 25% -- 15 minutes left
@@ -346,8 +353,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 25.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15),
NULL);
- check_icon_names (device, "battery-low-symbolic;"
+ check_icon_names (device, "battery-020;"
"gpm-battery-020;"
+ "battery-low-symbolic;"
"battery-low");
// discharging battery, 5% -- 1 hour left
@@ -356,8 +364,9 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*60),
NULL);
- check_icon_names (device, "battery-good-symbolic;"
+ check_icon_names (device, "battery-040;"
"gpm-battery-040;"
+ "battery-good-symbolic;"
"battery-good");
// discharging battery, 5% -- 15 minutes left
@@ -366,9 +375,11 @@ TEST_F(DeviceTest, IconNames)
INDICATOR_POWER_DEVICE_PERCENTAGE, 5.0,
INDICATOR_POWER_DEVICE_TIME, (guint64)(60*15),
NULL);
- check_icon_names (device, "battery-caution-symbolic;"
+ check_icon_names (device, "battery-000;"
"gpm-battery-000;"
+ "battery-caution-symbolic;"
"battery-caution");
+
// state unknown
g_object_set (o, INDICATOR_POWER_DEVICE_KIND, UP_DEVICE_KIND_BATTERY,
INDICATOR_POWER_DEVICE_STATE, UP_DEVICE_STATE_UNKNOWN,