Menu

3.6.5

2004-10-27
2013-04-26
  • Daniel Pozmanter

    some minor but important bugfixes, thought I'd release it today.  bluebottle is down again, I will get back to emails as soon as I can log in again.

     
    • Franz Steinhaeusler

      Hi Dan,

      is this stc.CmdKeyClearAll() in drShortcuts really need.
      I tried to comment this out, and saw not disadvantage.

      on the contrary:
      some "hidden" stc-shortcuts are working then.
      for example keyboard rectangular selection with
      alt-shift-cursor keys or the line-duplicate ctrl-d.

      Franz

       
    • Franz Steinhaeusler

      In my hurry:

      I meant:
      is this stc.CmdKeyClearAll() statement in drShortcuts really needed?
      I commented this out, and saw no disadvantage.
      (All the adjusted stc shortcuts work as expected).

       
    • Daniel Pozmanter

      I will take a look.

      The problem is the CmdKeyClearAll is very necessary if you want to change specific shortcuts.  For example, line transpose is ctrl+t by default.  At least on linux, if you do not clear the shortcuts, you cannot assign ctrl + t to anything else.

      The line duplicate bit will go in.  I will have to look at the rect. selection bit.  (I can always make this an option in prefs, or alternatively, if you can locate the stc command, I can code it in).

       
    • Franz Steinhaeusler

      I see.

      Hm, the rectancle selection.
      Because it constists of several key-kombination,
      this appears not so easy: alt-shift+(left,right,up,down).

      So I looked into scintilla source code and found
      the default bindings, and tried it after

      stc.CmdKeyClearAll()

          stc.CmdKeyAssign (wx.stc.STC_KEY_UP,    wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_LINEUPRECTEXTEND)
          stc.CmdKeyAssign (wx.stc.STC_KEY_DOWN,  wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_LINEDOWNRECTEXTEND)
          stc.CmdKeyAssign (wx.stc.STC_KEY_LEFT,  wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_CHARLEFTRECTEXTEND)
          stc.CmdKeyAssign (wx.stc.STC_KEY_RIGHT, wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_CHARRIGHTRECTEXTEND)

          stc.CmdKeyAssign (wx.stc.STC_KEY_HOME,  wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_VCHOMERECTEXTEND)
          stc.CmdKeyAssign (wx.stc.STC_KEY_END,   wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_LINEENDRECTEXTEND)
          stc.CmdKeyAssign (wx.stc.STC_KEY_PRIOR, wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_PAGEUPRECTEXTEND)
          stc.CmdKeyAssign (wx.stc.STC_KEY_NEXT,  wx.stc.STC_SCMOD_ALT| wx.stc.STC_SCMOD_SHIFT, wx.stc.STC_CMD_PAGEDOWNRECTEXTEND)

      it works:
      But there are 8 keybindings, so it would be perhaps easier to only have one option for example in Document
      Preferences enable rectangular selection with keys or so.

      BTW: I didn't see any way to get the current keybindings directly from stc.
      (there is no "CmdGetKeys" Command)

      Franz

       
    • Franz Steinhaeusler

      Would it be possible to insert into the filemenu
      also:
      Close All Tabs
      Close All Other Tabs

      Now they exist only in the pop-up menu in the notebook
      tabs.

      There is another thing:
      If you want to save a file, which is write proteced,
      the modified flag is resetted, whatever it is really saved or not.

      I patched drpython in def SaveFile:

                  if not os.access(self.txtDocumentArray[docPos].filename, os.W_OK):
                      if os.path.exists (self.txtDocumentArray[docPos].filename):
                          self.ShowMessage(("Error Write Access:\n" + self.txtDocumentArray[docPos].filename), "DrPython Error")
                          return
                  cfile = file(self.txtDocumentArray[docPos].filename, 'wb')

      and
              except IOError:
                  self.ShowMessage(("Error Writing: " + self.txtDocumentArray[docPos].filename), "DrPython Error")
                  return

      the access method for the reason, that you get no traceback, but simply a hint, the file is readonly.

      Franz

       
    • Daniel Pozmanter

      Close all Documents, etc is in the Documnents menu.

      Thanks for the write patch, its in.

      I added the rect stuff as separate entitys, but used the shortcuts you posted as the defaults.

      Cheers and Thanks,
      Dan

       

Log in to post a comment.