|
@ -6,6 +6,7 @@ |
|
|
from __future__ import unicode_literals |
|
|
from __future__ import unicode_literals |
|
|
|
|
|
|
|
|
import gettext |
|
|
import gettext |
|
|
|
|
|
from os import name as os_name |
|
|
|
|
|
|
|
|
import wx |
|
|
import wx |
|
|
from wx.lib.pubsub import setuparg1 |
|
|
from wx.lib.pubsub import setuparg1 |
|
@ -218,6 +219,16 @@ class MainFrame(wx.Frame): |
|
|
textctrl.Bind(wx.EVT_TEXT_PASTE, event_handler) |
|
|
textctrl.Bind(wx.EVT_TEXT_PASTE, event_handler) |
|
|
textctrl.Bind(wx.EVT_MIDDLE_DOWN, event_handler) |
|
|
textctrl.Bind(wx.EVT_MIDDLE_DOWN, event_handler) |
|
|
|
|
|
|
|
|
|
|
|
if os_name == 'nt': |
|
|
|
|
|
# Enable CTRL+A on Windows |
|
|
|
|
|
def win_ctrla_eventhandler(event): |
|
|
|
|
|
if event.GetKeyCode() == wx.WXK_CONTROL_A: |
|
|
|
|
|
event.GetEventObject().SelectAll() |
|
|
|
|
|
|
|
|
|
|
|
event.Skip() |
|
|
|
|
|
|
|
|
|
|
|
textctrl.Bind(wx.EVT_CHAR, win_ctrla_eventhandler) |
|
|
|
|
|
|
|
|
return textctrl |
|
|
return textctrl |
|
|
|
|
|
|
|
|
def _create_button(self, label, event_handler=None): |
|
|
def _create_button(self, label, event_handler=None): |
|
|