[nanny/win32: 23/75] Add win32 paths to nanny.gnome.admin module



commit c3b12624285f5cea027f8f0119be28e802822b36
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Sat Sep 18 12:32:30 2010 +0200

    Add win32 paths to nanny.gnome.admin module

 client/gnome/admin/src/__init__.py.in |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/client/gnome/admin/src/__init__.py.in b/client/gnome/admin/src/__init__.py.in
index 4f46831..a8937ec 100644
--- a/client/gnome/admin/src/__init__.py.in
+++ b/client/gnome/admin/src/__init__.py.in
@@ -27,9 +27,18 @@
 import os
 import gtk
 
-share_files_dir= os.path.join("@prefix@","share/","nanny/client/gnome/admin/")
-ui_files_dir= os.path.join(share_files_dir,"ui/")
-icons_files_dir= os.path.join(share_files_dir,"icons/")
+if os.name == "posix" :
+    share_files_dir= os.path.join("@prefix@","share/","nanny/client/gnome/admin/")
+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
+    share_files_dir = os.path.join(root_path, "share" , "nanny", "client", "gnome", "admin")
+
+ui_files_dir= os.path.join(share_files_dir,"ui")
+icons_files_dir= os.path.join(share_files_dir,"icons")
 
 from AdminConsole import AdminConsole
 from ConfigureProxyDialog import ConfigureProxyDialog



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]