[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/forms/src/uidrivers/win32 UIdriver.py
From: |
Bajusz Tamás |
Subject: |
gnue/forms/src/uidrivers/win32 UIdriver.py |
Date: |
Sat, 03 May 2003 18:06:13 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Bajusz Tamás <address@hidden> 03/05/03 18:06:13
Modified files:
forms/src/uidrivers/win32: UIdriver.py
Log message:
Clipboard routines
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/win32/UIdriver.py.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: gnue/forms/src/uidrivers/win32/UIdriver.py
diff -c gnue/forms/src/uidrivers/win32/UIdriver.py:1.10
gnue/forms/src/uidrivers/win32/UIdriver.py:1.11
*** gnue/forms/src/uidrivers/win32/UIdriver.py:1.10 Sun Apr 27 17:04:30 2003
--- gnue/forms/src/uidrivers/win32/UIdriver.py Sat May 3 18:06:13 2003
***************
*** 29,35 ****
import sys
import string
! import win32gui, win32con, afxres, commctrl
from gnue.common import events
from gnue.common.apps import GDebug
--- 29,35 ----
import sys
import string
! import win32gui, win32con, afxres, commctrl, win32clipboard
from gnue.common import events
from gnue.common.apps import GDebug
***************
*** 241,250 ****
# clipboard.
#
def getClipboardContents(self, event):
! pass
def setClipboardContents(self, event):
! pass
#############################################################################
#
--- 241,273 ----
# clipboard.
#
def getClipboardContents(self, event):
! if None == win32clipboard.OpenClipboard():
! success = win32clipboard.GetClipboardData(win32con.CF_TEXT)
! win32clipboard.CloseClipboard()
! else:
! success = 0
! GDebug.printMesg(5,'Unable to open clipboard for read')
!
! if success:
! value = success
! else:
! GDebug.printMesg(5,'Unable to obtain clipboard contents. Defaulting to
Empty.')
! value = None
!
! GDebug.printMesg(5, "Getting clipboard value '%s'" % value)
! event.__result__ = value
def setClipboardContents(self, event):
! GDebug.printMesg(5,"Setting clipboard '%s'" % event.text)
!
! if None == win32clipboard.OpenClipboard():
! win32clipboard.EmptyClipboard()
! handle = win32clipboard.SetClipboardText(event.text)
! GDebug.printMesg(10,"Set Clipboard Data Handle: %s" % handle)
! win32clipboard.CloseClipboard()
! else:
! GDebug.printMesg(5,'Unable to open clipboard for write')
!
#############################################################################
#
- gnue/forms/src/uidrivers/win32 UIdriver.py,
Bajusz Tamás <=