From d982b5a9da04c53957c4a969d8f326f967451487 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sat, 7 Jul 2012 05:25:17 +0000 Subject: [PATCH] replace installation package dir to get theme from system. SVN revision: 73441 --- Makefile.am | 6 ++++++ econnman-bin => econnman-bin.in | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) rename econnman-bin => econnman-bin.in (99%) diff --git a/Makefile.am b/Makefile.am index 895948b..d1e2816 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,12 @@ EXTRA_DIST = \ dist_bin_SCRIPTS = econnman-bin +econnman-bin: $(top_srcdir)/econnman-bin.in $(top_builddir)/Makefile + rm -f $(top_builddir)/econnman-bin + sed -e 's:@PKGDATADIR@:$(pkgdatadir):g' \ + $(top_srcdir)/econnman-bin.in > $(top_builddir)/econnman-bin + chmod +x $(top_builddir)/econnman-bin + desktopdir = $(datadir)/applications desktop_DATA = data/desktop/econnman.desktop diff --git a/econnman-bin b/econnman-bin.in similarity index 99% rename from econnman-bin rename to econnman-bin.in index a73dabb..4896637 100755 --- a/econnman-bin +++ b/econnman-bin.in @@ -20,6 +20,7 @@ import dbus import dbus.service import logging import argparse +import os.path dbus_ml = e_dbus.DBusEcoreMainLoop() bus = dbus.SystemBus(mainloop=dbus_ml) @@ -1353,7 +1354,9 @@ if __name__ == "__main__": elm.init() elm.policy_set(elm.ELM_POLICY_QUIT, elm.ELM_POLICY_QUIT_LAST_WINDOW_CLOSED) - elm.theme_extension_add("./data/theme/default.edj") + for td in ("./data/theme/default.edj", "@PKGDATADIR@/theme/default.edj"): + if os.path.exists(td): + elm.theme_extension_add(td) win = elm.Window("econnman", elm.ELM_WIN_BASIC) win.title = "EConnMan"