Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[do not merge yet] Port to newer upower api, dh porting, deprecate old glib api #5

Merged
merged 14 commits into from
Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Empty file added AUTHORS
Empty file.
Empty file added ChangeLog
Empty file.
29 changes: 0 additions & 29 deletions Makefile

This file was deleted.

24 changes: 24 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
hildondesktoplib_LTLIBRARIES = status-area-applet-battery.la

status_area_applet_battery_la_SOURCES = status-area-applet-battery.c \
batmon.c

status_area_applet_battery_la_CFLAGS = \
$(LIBHILDON_CFLAGS) $(LIBCANBERRA_CFLAGS) $(LIBHILDONDESKTOP_CFLAGS) \
$(PROFILE_CFLAGS) $(DBUS_CFLAGS) $(GCONF_CFLAGS) $(UPOWER_GLIB_CFLAGS)

status_area_applet_battery_la_LIBADD = \
$(LIBHILDON_LIBS) $(LIBCANBERRA_LIBS) $(LIBHILDONDESKTOP_LIBS) \
$(PROFILE_LIBS) $(DBUS_LIBS) $(GCONF_LIBS) $(UPOWER_GLIB_LIBS)

status_area_applet_battery_la_LDFLAGS = -Wl,--as-needed -module -avoid-version

gconfschemasdir = $(sysconfdir)/gconf/schemas
dist_gconfschemas_DATA = status-area-applet-battery.schemas

hildonstatusmenudesktopentry_DATA = status-area-applet-battery.desktop
EXTRA_DIST = $(hildonstatusmenudesktopentry_DATA)

install-data-hook:
@(cd $(DESTDIR)$(hildondesktoplibdir) && $(RM) \
$(hildondesktoplib_LTLIBRARIES))
Empty file added NEWS
Empty file.
8 changes: 7 additions & 1 deletion batmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ check_device(UpDevice *dev)
technology != UP_DEVICE_TECHNOLOGY_UNKNOWN)
{
private.battery = dev;
g_object_ref(private.battery);
}

return;
Expand All @@ -95,6 +96,7 @@ check_device(UpDevice *dev)
private.charger == NULL)
{
private.charger = dev;
g_object_ref(private.charger);
}
}

Expand All @@ -105,7 +107,7 @@ find_upower_devices()
GPtrArray *devices;
guint i;

devices = up_client_get_devices(private.client);
devices = up_client_get_devices2(private.client);

for (i = 0; i < devices->len; i++)
{
Expand Down Expand Up @@ -307,6 +309,10 @@ free_batt(void)
{
if (private.client)
g_object_unref(private.client);
if (private.battery)
g_object_unref(private.battery);
if (private.charger)
g_object_unref(private.charger);

memset(&private, 0, sizeof(private));
}
49 changes: 49 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
AC_INIT([Status area battery applet],
[1.5.0],
[merlijn@wizzup.org], [status-area-applet-battery])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can/will change maintainer to you here @spinal84 - just let me know.


#[patsubst(esyscmd([dpkg-parsechangelog | sed -n '/^Version: \(.*\)$/ {s//\1/;p}']),],
AM_INIT_AUTOMAKE
LT_INIT([shared disable-static])
AC_CONFIG_FILES([Makefile])

AC_PROG_CC
AC_PROG_LIBTOOL

PKG_CHECK_MODULES(LIBHILDON, hildon-1)
AC_SUBST(LIBHILDON_CFLAGS)
AC_SUBST(LIBHILDON_LIBS)

PKG_CHECK_MODULES(LIBCANBERRA, libcanberra)
AC_SUBST(LIBCANBERRA_CFLAGS)
AC_SUBST(LIBCANBERRA_LIBS)

PKG_CHECK_MODULES(LIBHILDONDESKTOP, libhildondesktop-1)
AC_SUBST(LIBHILDONDESKTOP_CFLAGS)
AC_SUBST(LIBHILDONDESKTOP_LIBS)

PKG_CHECK_MODULES(PROFILE, profile)
AC_SUBST(PROFILE_CFLAGS)
AC_SUBST(PROFILE_LIBS)

PKG_CHECK_MODULES(DBUS, dbus-1)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

PKG_CHECK_MODULES(GCONF, gconf-2.0)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)

PKG_CHECK_MODULES(UPOWER_GLIB, upower-glib)
AC_SUBST(UPOWER_GLIB_CFLAGS)
AC_SUBST(UPOWER_GLIB_LIBS)

AC_CONFIG_FILES(status-area-applet-battery.schemas)

hildonstatusmenudesktopentrydir="`$PKG_CONFIG --variable=hildonstatusmenudesktopentrydir libhildondesktop-1`"
AC_SUBST(hildonstatusmenudesktopentrydir)

hildondesktoplibdir="`$PKG_CONFIG --variable=hildondesktoplibdir osso-af-settings`"
AC_SUBST(hildondesktoplibdir)

AC_OUTPUT
26 changes: 26 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
status-area-applet-battery (1.5.3-1) unstable; urgency=medium

* Fix port Upower port done by me
* Revert g_type_class_add_private deprecation.

-- Merlijn Wajer <merlijn@wizzup.org> Mon, 23 Mar 2020 13:25:15 +0100

status-area-applet-battery (1.5.2-1) unstable; urgency=medium

* Fix autotools and wrong macro

-- Merlijn Wajer <merlijn@wizzup.org> Sun, 26 Jan 2020 20:13:34 +0100

status-area-applet-battery (1.5.1-1) unstable; urgency=medium

* Port to autotools (fixes install paths)

-- Merlijn Wajer <merlijn@wizzup.org> Sat, 25 Jan 2020 13:46:51 +0100

status-area-applet-battery (1.5.0-1) unstable; urgency=medium

* Port to newer UPower API
* Deprecate g_type_class_add_private

-- Merlijn Wajer <merlijn@wizzup.org> Thu, 23 Jan 2020 13:16:01 +0100

status-area-applet-battery (1.4.1-1) unstable; urgency=medium

* Fix Droid4 wall charger detection
Expand Down
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Build-Depends:
libdbus-1-dev,
libdbus-glib-1-dev,
libglib2.0-dev,
libupower-glib-dev (>=1:0.99.7.5)
libupower-glib-dev (>=1:0.99.7.5),
osso-af-settings
Standards-Version: 3.7.3

Package: status-area-applet-battery
Expand Down
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/make -f

override_dh_autoreconf:
dh_autoreconf --as-needed

%:
dh $@