[POS-commit] r85 - in Stoq2: interface interface/components interface/pos lib

Evandro Vale Miquelito evandro at async.com.br
Tue Mar 8 20:03:03 BRT 2005


Author: evandro
Date: 2005-03-08 20:03:03 -0300 (Tue, 08 Mar 2005)
New Revision: 85

Modified:
   Stoq2/interface/__init__.py
   Stoq2/interface/components/__init__.py
   Stoq2/interface/pos/__init__.py
   Stoq2/lib/config.py
Log:
Some small adjustments


Modified: Stoq2/interface/__init__.py
===================================================================
--- Stoq2/interface/__init__.py	2005-03-08 22:57:11 UTC (rev 84)
+++ Stoq2/interface/__init__.py	2005-03-08 23:03:03 UTC (rev 85)
@@ -30,7 +30,10 @@
 from Kiwi2 import initgtk
 
 from database.catalog import helper
+
+# TODO To be implemented
 # from components.registry import About
+
 from stoqlib.interface.services import BaseAppWindow, BaseApp
 from stoqlib.interface.reload import reload_world
 from config import hide_splash
@@ -40,10 +43,15 @@
 # Make sure gtk is imported and do global setup
 import Kiwi2
 from Kiwi2.initgtk import gtk
-Kiwi2.Views.set_decimal_separator(",")
-Kiwi2.Views.enable_sane_editables()
 
 
+# TODO we need to find a better way(the right way) about how to this
+# Kiwi2.Views.set_decimal_separator(",")
+
+# TODO waiting for kiwi suport
+# Kiwi2.Views.enable_sane_editables()
+
+
 #TODO: To be implemented
 # Kiwi2.Basic.set_autocombo_min_chars(5)
 

Modified: Stoq2/interface/components/__init__.py
===================================================================
--- Stoq2/interface/components/__init__.py	2005-03-08 22:57:11 UTC (rev 84)
+++ Stoq2/interface/components/__init__.py	2005-03-08 23:03:03 UTC (rev 85)
@@ -30,7 +30,7 @@
 import string
 # import sys
 
-from Kiwi2 import Views
+from Kiwi2 import set_gladepath, gladepath
 
 # Find out the base directory of components,
 # use the trick by looking at the path of the current file
@@ -41,8 +41,8 @@
 new = os.path.join(current, 'components', 'glade')
 
 # If it doesn't already exists in the gladepath, add it
-if new not in Views.gladepath:
-    Views.set_gladepath(Views.gladepath + [new])
+if new not in gladepath:
+    set_gladepath(gladepath + [new])
 
 
 # __all__ = ['registry']

Modified: Stoq2/interface/pos/__init__.py
===================================================================
--- Stoq2/interface/pos/__init__.py	2005-03-08 22:57:11 UTC (rev 84)
+++ Stoq2/interface/pos/__init__.py	2005-03-08 23:03:03 UTC (rev 85)
@@ -26,9 +26,9 @@
     Construtor for POS application    
 """
 import os
-from Kiwi2 import Views
+# from Kiwi2 import set_gladepath, gladepath
+# 
+# set_gladepath(gladepath +
+#               [os.path.join(os.getcwd(),"interface", "pos", "glade")])
 
-Views.set_gladepath(Views.gladepath +
-                    [os.path.join(os.getcwd(),"interface", "pos", "glade")])
-
 app_name = "Point of Sales"

Modified: Stoq2/lib/config.py
===================================================================
--- Stoq2/lib/config.py	2005-03-08 22:57:11 UTC (rev 84)
+++ Stoq2/lib/config.py	2005-03-08 23:03:03 UTC (rev 85)
@@ -277,6 +277,7 @@
     def setup_app(self, appname, splash=0):
         # Here we need the stoqlib path to get the pixmaps directory
         import stoqlib
+        from Kiwi2 import set_gladepath, gladepath
         self.appname = appname
         self.splash = splash
 
@@ -303,7 +304,8 @@
         else:
             prefix = os.getcwd()
 
-        gladepath = os.path.join(prefix, "interface", appname, 'glade')
+        set_gladepath(gladepath +
+                      [os.path.join(prefix,"interface", appname, "glade")])
         pixmaps_path = os.path.join(stoqlib.__path__[0], 'interface', 'pixmaps')
 
         self.prefix = prefix
@@ -313,8 +315,6 @@
         os.environ['EVENT_LOG_SEVERITY'] = '0'
 
         #XXX: pixmap_path could have Kiwi support
-        #XXX: GLADEPATH -> GLADE_PATH
-        os.environ['GLADEPATH'] = gladepath + ':' + pixmaps_path
         os.environ['GLADE_PIXMAP_PATH'] = pixmaps_path
 
         if self.splash:



More information about the POS-commit mailing list