aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-06-02 15:18:42 +0200
committerGuido Günther <agx@sigxcpu.org>2011-06-02 15:18:42 +0200
commitaf6275269b5096374a3ab63b6576e481a72a9d58 (patch)
tree7ddcc0805b75caffa9768bc67adbfad027e89a46
parent165458fa7ed213239f35ac25c3bc1d14d250094d (diff)
parentd74980da91745c15e643bd576783a0263275f240 (diff)
Merge commit 'v0.0.1.2' into debian
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/ppm/Makefile.am3
-rwxr-xr-xsrc/prepaid-manager-applet.py17
5 files changed, 21 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index d680d28..d435340 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,9 @@ NULL =
SUBDIRS = data src po
+EXTRA_DIST = \
+ autogen.sh
+
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
diff --git a/configure.ac b/configure.ac
index 39bcb9e..6725777 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
AC_PREREQ([2.67])
-AC_INIT([prepaid-manager-applet], [0.0.0],
+AC_INIT([prepaid-manager-applet], [0.0.1.2],
[http://honk.sigxcpu.org/projects/prepaid-manager.py])
AM_INIT_AUTOMAKE([-Wno-portability])
diff --git a/src/Makefile.am b/src/Makefile.am
index cdb887a..ada0251 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,7 +10,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
pythondir = $(pkgdatadir)
python_DATA = $(PACKAGE).py
-EXTRA_DIST = $(python_DATA) $(desktop_in_files) $(ui_DATA)
+EXTRA_DIST = $(python_DATA) $(desktop_in_files) $(ui_DATA) $(bin_SCRIPTS_IN)
@INTLTOOL_DESKTOP_RULE@
diff --git a/src/ppm/Makefile.am b/src/ppm/Makefile.am
index 7649cbb..8346110 100644
--- a/src/ppm/Makefile.am
+++ b/src/ppm/Makefile.am
@@ -4,6 +4,7 @@ pythondir = $(pkgdatadir)/ppm/
python_DATA_IN = __init__.py.in
python_DATA = \
__init__.py \
+ accountdb.py \
modemproxy.py \
provider.py \
providerdb.py \
@@ -12,7 +13,7 @@ python_DATA = \
EXTRA_DIST = $(python_DATA) $(python_DATA_IN)
-%.py: $(srcdir)/%.py.in
+%.py: $(srcdir)/%.py.in $(srcdir)/Makefile
sed -e "s,::PACKAGE::,$(PACKAGE)," \
-e "s,::PYLIBDIR::,$(pkgdatadir)," \
-e "s,::GETTEXTDIR::,$(datadir)/locale," \
diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py
index 66f3609..77de3ed 100755
--- a/src/prepaid-manager-applet.py
+++ b/src/prepaid-manager-applet.py
@@ -27,6 +27,7 @@ from gi.repository import Gtk
import locale
import logging
import os
+import sys
import time
import ppm
@@ -635,8 +636,18 @@ def setup_schemas():
os.environ["GSETTINGS_SCHEMA_DIR"] = "data"
-def main():
- logging.basicConfig(level=logging.DEBUG,
+def main(args):
+ parser = glib.option.OptionParser()
+ parser.add_option("--debug", "-d", action="store_true", dest="debug",
+ help="enable debugging", default=False)
+ options, args = parser.parse_args()
+
+ if options.debug:
+ log_level = logging.DEBUG
+ else:
+ log_level = logging.INFO
+
+ logging.basicConfig(level=log_level,
format='ppm: %(levelname)s: %(message)s')
setup_schemas()
@@ -651,7 +662,7 @@ def main():
if __name__ == "__main__":
try:
- main()
+ main(sys.argv)
except KeyboardInterrupt:
logging.debug("Received KeyboardInterrupt. Exiting application.")
except SystemExit: