Skip to content

Commit

Permalink
fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
amagura committed Mar 1, 2015
1 parent ce3d438 commit 08fb040
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ test-empty:
echo 0 > 'test/BAT0/capacity'
echo 0 > 'test/BAT0/capacity'

test-nosup:
rm -rf 'test/'

SUBDIRS = src img
2 changes: 1 addition & 1 deletion img/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/
17. "./empty.png"
18. "./full.png"
19. "./bork.png"

20. "./nobat.png"

--
Alexej Magura
2 changes: 1 addition & 1 deletion img/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pngdir = $(iconsdir)/16x16/apps

if GTK2
#dist_scale_DATA = full.svg empty.svg qempty.svg qfull.svg half.svg bork.svg
dist_png_DATA = full.png empty.png qempty.png qfull.png half.png bork.png
dist_png_DATA = full.png empty.png qempty.png qfull.png half.png bork.png nobat.png
endif

all-local: #local-license
Expand Down
3 changes: 3 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,6 @@ test-lowbat:

test-empty:
cd "$(top_srcdir)"; make $@

test-nosup:
cd "$(top_srcdir)"; make $@
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ limitations under the License.

/** ^^ Macros ^^ **/
# ifndef ZB_DEBUG
# define ZB_DEBUG 1 // XXX change this to turn debug messages on/off
# define ZB_DEBUG 0 // XXX change this to turn debug messages on/off
# endif

# ifndef ZB_USE_KCAT
Expand Down
3 changes: 2 additions & 1 deletion src/main_gui.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ def getPixbuf(charge):

def sync_icon(tcon):
pwr = py_getpwr()
print pwr.err
tcon.set_from_pixbuf(getPixbuf(pwr.tr if pwr.err is 0 else pwr.err))
ttip = 'A/C: %s\n' % 'online' if pwr.acline is 1 else 'offline'
if pwr.err is 0:
ttip += 'Battery: %s' % str(pwr.raw)
elif pwr.err is -2:
ttip += 'No battery!'
elif pwr.err is -5:
ttip = 'No power supply!'
tcon.set_tooltip(ttip);
return True

Expand Down
2 changes: 1 addition & 1 deletion src/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct py_power py_getpwr()
ZB_DBG("pwr.charge.raw: %d\n", pwr.charge.raw);
zb_ping;
ZB_DBG("*pwr.err.last: %d\n", *pwr.err.last);
pyp.err = *pwr.err.vp;
pyp.err = *pwr.err.last;
pyp.tr = pwr.charge.tr;
pyp.raw = pwr.charge.raw;
zb_pong;
Expand Down
1 change: 0 additions & 1 deletion test/ACAD/online

This file was deleted.

1 change: 0 additions & 1 deletion test/ACAD/type

This file was deleted.

1 change: 0 additions & 1 deletion test/BAT0/capacity

This file was deleted.

1 change: 0 additions & 1 deletion test/BAT0/type

This file was deleted.

0 comments on commit 08fb040

Please sign in to comment.