[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7581 - trunk/gnue-navigator/src
From: |
btami |
Subject: |
[gnue] r7581 - trunk/gnue-navigator/src |
Date: |
Tue, 7 Jun 2005 05:48:09 -0500 (CDT) |
Author: btami
Date: 2005-06-07 05:48:08 -0500 (Tue, 07 Jun 2005)
New Revision: 7581
Modified:
trunk/gnue-navigator/src/UIwin32.py
trunk/gnue-navigator/src/UIwx.py
Log:
win32 driver fix to work with latest pywin32,unifying path handling
Modified: trunk/gnue-navigator/src/UIwin32.py
===================================================================
--- trunk/gnue-navigator/src/UIwin32.py 2005-06-06 17:49:35 UTC (rev 7580)
+++ trunk/gnue-navigator/src/UIwin32.py 2005-06-07 10:48:08 UTC (rev 7581)
@@ -29,7 +29,24 @@
# reuse GNUe Form's UI* classes if at all possible.
-import os, sys
+import os
+import sys
+import struct
+import array
+import tempfile
+
+import win32api
+import win32gui
+import win32ui
+import win32con
+import commctrl
+from pywin.mfc import window, activex
+from win32com.client import gencache
+
+WebBrowserModule =
gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
+if WebBrowserModule is None:
+ raise ImportError, "IE4 does not appear to be installed."
+
from gnue.common.datasources import Exceptions, GConnections
from gnue.common.utils.FileUtils import dyn_import, openResource
from gnue.common.apps import GConfig
@@ -47,15 +64,7 @@
FORMS_SUPPORT=1
print 'GNUe Forms is not installed on your system'
-import struct, array, tempfile
-import win32api, win32gui, win32ui, win32con, commctrl
-from pywin.mfc import window, activex
-from win32com.client import gencache
-WebBrowserModule =
gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
-if WebBrowserModule is None:
- raise ImportError, "IE4 does not appear to be installed."
-
ID_EXIT = getNextId()
ID_FAV_ORG = getNextId()
ID_FAV_ADD = getNextId()
@@ -182,7 +191,7 @@
parent=win32ui.CreateWindowFromHandle(self.hMainWindow))
- def OnWMNotify(self, hwnd, msg, wParam, lParam):
+ def OnWMNotify(self, hwnd, msg, wParam, lParam):
# NMTREEVIEW struct: NMHDR, action, old TVIEW, new TVIEW, POINT
format = "iiiIIiIIPiiiiiIiIIPiiiiiii"
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lParam)
@@ -191,9 +200,9 @@
nmask, nhItem, nstate, nstateMask, npszText, ncchTextMax, niImage,
niSelectedImage, ncChildren, nlParam,\
x,y \
= struct.unpack(format, buf)
- code += 0x4f0000 # hrm - wtf - commctrl uses this, and it works with mfc.
*sigh*
+ code += commctrl.PY_0U
- if code == commctrl.TVN_SELCHANGED:
+ if code == commctrl.TVN_SELCHANGED:
object = self._mapping[nhItem]
win32gui.SetWindowText(self.browser.GetSafeHwnd(), "")
for item in object._children:
@@ -207,7 +216,7 @@
self.browser.ocx.Refresh()
break
- elif code == commctrl.NM_DBLCLK or code == commctrl.NM_RETURN:
+ elif code == commctrl.NM_DBLCLK or code == commctrl.NM_RETURN:
curSelected = win32gui.SendMessage(self.hTree, commctrl.TVM_GETNEXTITEM,
commctrl.TVGN_CARET, 0)
object = self._mapping[curSelected]
if object._type != 'GNStep':
@@ -292,7 +301,6 @@
# peek at the abort variable
# TODO: Pass parameters
-
if os.path.basename(step.location) == step.location:
try:
formdir = gConfigNav('FormDir')
@@ -301,7 +309,6 @@
formfile = formdir+"/"+step.location
else:
formfile = step.location
-
self._runForm(formfile, step._params)
Modified: trunk/gnue-navigator/src/UIwx.py
===================================================================
--- trunk/gnue-navigator/src/UIwx.py 2005-06-06 17:49:35 UTC (rev 7580)
+++ trunk/gnue-navigator/src/UIwx.py 2005-06-07 10:48:08 UTC (rev 7581)
@@ -234,7 +234,7 @@
formdir = gConfigNav('FormDir')
except KeyError:
formdir = ""
- formfile = formdir+"/"+step.location
+ formfile = os.path.join (formdir, step.location)
else:
formfile = step.location
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7581 - trunk/gnue-navigator/src,
btami <=