diff Generic/openwith.py @ 6:2fc6b47dbe70

rename module globals to globalVars
author Miguel Ángel Bárcena Rodríguez <miguelangel@obraencurso.es>
date Sat, 06 Nov 2010 22:33:32 +0100
parents 2ac1551ad2ab
children a7b9f7e7dfa4
line wrap: on
line diff
--- a/Generic/openwith.py	Sat Nov 06 21:30:33 2010 +0100
+++ b/Generic/openwith.py	Sat Nov 06 22:33:32 2010 +0100
@@ -37,23 +37,23 @@
 import os
 
 # pyArq-Presupuestos modules
-import globals
+import globalVars
 
 # from gtkgui_helpers.py 
 def autodetect_desktop():
-    # recognize the environment and sets it in globals
+    # recognize the environment and sets it in globalVars
     if os.name == 'nt':
-        globals.desktop["desktop"] = "windows"
+        globalVars.desktop["desktop"] = "windows"
     else:
         _processes = get_running_processes()
         if 'gnome-session' in _processes:
-            globals.desktop["desktop"] = "gnome"
+            globalVars.desktop["desktop"] = "gnome"
         elif 'startkde' in _processes:
-            globals.desktop["desktop"] = "kde"
+            globalVars.desktop["desktop"] = "kde"
         elif 'startxfce4' in _processes or 'xfce4-session' in _processes:
-            globals.desktop["desktop"] = "xfce"
+            globalVars.desktop["desktop"] = "xfce"
         else:
-            globals.desktop["desktop"] = ""
+            globalVars.desktop["desktop"] = ""
 
 def get_running_processes():
     '''returns running processes or None (if not /proc exists)'''
@@ -104,7 +104,7 @@
 
 def launch_file(kind, uri):
     # kind = "url" ,"mail", "image", "dxf"
-    _desktop = globals.desktop["desktop"]
+    _desktop = globalVars.desktop["desktop"]
     if _desktop == "windows":
         try:
             os.startfile(uri) # if pywin32 is installed we open
@@ -121,13 +121,13 @@
             command = 'exo-open'
         else:
             if kind == 'url':
-                command = globals.desktop["browser"]
+                command = globalVars.desktop["browser"]
             elif kind == 'mail':
-                command = globals.desktop["mailapp"]
+                command = globalVars.desktop["mailapp"]
             elif kind == 'image':
-                command = globals.desktop["imageapp"]
+                command = globalVars.desktop["imageapp"]
             elif kind == 'dxf':
-                command = globals.desktop["cadapp"]
+                command = globalVars.desktop["cadapp"]
             else:  # if no app is configured
                 return
         command = build_command(command, uri)