[nanny/win32: 24/75] Add win32 paths to nanny.client.gnome.systray
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny/win32: 24/75] Add win32 paths to nanny.client.gnome.systray
- Date: Tue, 2 Nov 2010 18:52:58 +0000 (UTC)
commit f5ee315a72319b80dc4e5b7380b3a66e2a75ae83
Author: Roberto Majadas <roberto majadas openshine com>
Date: Sat Sep 18 12:33:00 2010 +0200
Add win32 paths to nanny.client.gnome.systray
client/gnome/systray/src/__init__.py.in | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/client/gnome/systray/src/__init__.py.in b/client/gnome/systray/src/__init__.py.in
index 15d1dbe..0f4cbfc 100644
--- a/client/gnome/systray/src/__init__.py.in
+++ b/client/gnome/systray/src/__init__.py.in
@@ -23,14 +23,24 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA
-import os.path
+import os
import gettext
from SystrayNanny import SystrayNanny
-icons_files_dir= os.path.join("@prefix@","share/icons/hicolor")
+if os.name == "posix":
+ icons_files_dir= os.path.join("@prefix@","share/icons/hicolor")
+ locale_dir = os.path.join("@prefix@", "share/" ,"locale/")
+elif os.name == "nt":
+ file_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ for x in range(8):
+ file_dir = os.path.dirname(file_dir)
+
+ root_path = file_dir
+ icons_files_dir = os.path.join(root_path, "share" , "icons", "hicolor" )
+ locale_dir = os.path.join(root_path, "share" ,"locale")
GETTEXT_DOMAIN = 'nanny'
-locale_dir = os.path.join("@prefix@", "share/" ,"locale/")
+
gettext.bindtextdomain(GETTEXT_DOMAIN, locale_dir)
gettext.textdomain(GETTEXT_DOMAIN)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]