Mercurial > traipse_dev
diff orpg/chat/chatwnd.py @ 87:eb1b275699c4 alpha
Traipse Alpha 'OpenRPG' {090917-01}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary:
00:
Adds menu changes to draw attention to important updates, errors, or other events. (image info coming soon)
Traipse URL is not included in the repos tab and is set as default.
01:
Fixes Copy for Windows and Linux (finally!!) users.
Fixes incomplete update to Grid and List nodes.
Fixes incomplete update to Chat Commands.
author | sirebral |
---|---|
date | Thu, 17 Sep 2009 03:23:03 -0500 |
parents | 2fa8bd6785a5 |
children | 65c1604e7949 7ed4979cc1cf |
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py Thu Sep 17 01:14:48 2009 -0500 +++ b/orpg/chat/chatwnd.py Thu Sep 17 03:23:03 2009 -0500 @@ -72,7 +72,8 @@ from orpg.tools.orpg_settings import settings from orpg.orpgCore import component from orpg.tools.orpg_log import logger -from orpg.tools.decorators import debugging +from orpg.tools.decorators import debugging + NEWCHAT = False try: import wx.webview @@ -175,11 +176,11 @@ self.menu.AppendItem(item) @debugging - def OnM_EditCopy(self, evt): - wx.TheClipboard.Open() - wx.TheClipboard.Clear() - wx.TheClipboard.SetData(wx.TextDataObject(self.SelectionToText())) - wx.TheClipboard.Close() + def OnM_EditCopy(self, evt): + wx.TheClipboard.UsePrimarySelection(False) + wx.TheClipboard.Open() + wx.TheClipboard.SetData(wx.TextDataObject(self.SelectionToText())) + wx.TheClipboard.Close() @debugging def scroll_down(self): @@ -289,8 +290,11 @@ wx.CallAfter(self.parent.set_chat_text_focus, None) @debugging - def OnM_EditCopy(self, evt): - self.Copy() + def OnM_EditCopy(self, evt): + wx.TheClipboard.UsePrimarySelection(False) + wx.TheClipboard.Open() + wx.TheClipboard.SetData(wx.TextDataObject(self.SelectionToText())) + wx.TheClipboard.Close() #Cutom Methods @debugging @@ -874,15 +878,10 @@ self.Bind(wx.EVT_BUTTON, self.lock_scroll, self.scroll_lock) self.chattxt.Bind(wx.EVT_MOUSEWHEEL, self.chatwnd.mouse_wheel) self.chattxt.Bind(wx.EVT_CHAR, self.chattxt.OnChar) - self.chattxt.Bind(wx.EVT_TEXT_COPY, self.textCopy) + self.chattxt.Bind(wx.EVT_TEXT_COPY, self.chatwnd.OnM_EditCopy) # def build_ctrls - end @debugging - def textCopy(self, event): - if self.chattxt.GetStringSelection() == '': self.chatwnd.OnM_EditCopy(None) - else: self.chatwnd.Copy() - - @debugging def build_bar(self): self.toolbar_sizer = wx.BoxSizer(wx.HORIZONTAL) self.scroll_lock = None