Author Topic: Keybinder v2 notes/problems  (Read 58867 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #30 on: March 23, 2020, 06:06:45 am »
I've lost all my shortcuts again. I'm on 11979.
See the config file attached.

Does the plugin logs when it fails to set a shortcut? I don't see any error/warning messages.


rev 11979 is before the keybinder fixes. Update your keybinder plugin.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #31 on: March 23, 2020, 09:10:38 am »
If I see correctly
Code
    * Keybinder 2.0.11 2020/03/02 fix missing/conflicting shortcuts when using older .conf on newer build
      - Check for mismatched menu id's to global accelerators id's
        Cf.,This will allow a global to override an old menu item.This happends when a new build does not match the current .conf file
        The non-matching .conf menu item has an incorrect id anyway.
      - When a .conf menu id matches a default( current structure) menu id, also make sure the menu path (parentMenu) also matches.
        It can mismatch when using a keybinder .conf configured from a previously built version of CodeBlocks on a newer build.
      - Set the global accelerators table before calling Initilaize::Update() else globals are missed on the first invocation of KeyBinder/Configure.
   
   
    git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@11974 2a5c6006-c6dd-42ca-98ab-0921f2732cef

is the last commit for the keybinder and its revision is 11974... I'm talking about commits in trunk/master.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #32 on: March 24, 2020, 08:26:36 pm »
I've lost all my shortcuts again. I'm on 11979.
See the config file attached.

Does the plugin logs when it fails to set a shortcut? I don't see any error/warning messages.

Fixed At revision: 11993
KeyBinder 2.0.12 2020/03/23 Match .conf to menu structure (by menu titles) to replace old menu ids with newer.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #33 on: March 24, 2020, 09:31:16 pm »
Should I pick this for 20.xx?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #34 on: March 24, 2020, 09:54:00 pm »
Should I pick this for 20.xx?

Yes, please do. It compares by menu title as you had suggested.
It can now find the new menu id when the menu structure changes.
Thus preserving user defined accelerators even when the menu structure is radically changed by a new build.

 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #35 on: March 25, 2020, 01:37:16 am »
What happens if there are duplicate menu items? How does it handle it?

I'll test it myself a day or two and then it will go to 20.xx...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #36 on: March 25, 2020, 02:17:59 am »
What happens if there are duplicate menu items? How does it handle it?

I'll test it myself a day or two and then it will go to 20.xx...

There wont be duplicates. Keybinder compares with the full menu path not just the item title.
Eg., "&Build::Run" can't match "&MyPlugin::Run" (if there was such an item title);

Thanks for testing.
« Last Edit: March 25, 2020, 02:35:17 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #37 on: March 26, 2020, 08:44:45 pm »
BTW: Is this a regression relative to 17.12. I've never been able to preserve my keybinder settings for years. If this is not a regression, I'd rather prefer not to delay the release even further...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #38 on: March 27, 2020, 05:47:34 am »
BTW: Is this a regression relative to 17.12. I've never been able to preserve my keybinder settings for years. If this is not a regression, I'd rather prefer not to delay the release even further...

Sorry, I don't know what you mean by "Is this a regression..."

But this new KeyBinder version is the first time KeyBinder has attempted to save all the users bindings between re-builds that altered the menu tree ids.
« Last Edit: March 27, 2020, 05:54:16 am by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #39 on: March 27, 2020, 09:59:29 am »
If the problem existed in 17.12 then not fixing it in 20.xx is not a regression. If problem wasn't there and it exists now then it is a regression. The idea of this is if the software got worse and not better.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #40 on: March 27, 2020, 06:39:05 pm »
If the problem existed in 17.12 then not fixing it in 20.xx is not a regression. If problem wasn't there and it exists now then it is a regression. The idea of this is if the software got worse and not better.

In my view, the software has gotten better. It saves all the users' defined key bindings, even when CB gets re-built and/or wxWidgets changes the way it assigns menu ids.

Version 17.12 bailed out when there were more than three bindings that had no matching menu ids.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #41 on: March 27, 2020, 07:19:46 pm »
I don't deny this. I don't know if it is worth it to do rebuilds.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Keybinder v2 notes/problems
« Reply #42 on: March 27, 2020, 07:27:26 pm »
I don't deny this. I don't know if it is worth it to do rebuilds.

Since it was you that was annoyed about losing your bindings, it might suggest that others are as interested in saving them as you are.
I know I'd appreciate it, I'm tired of losing bindings everytime I have to do a major build.
But I understand that we all have limited contribution time.
« Last Edit: March 27, 2020, 07:32:19 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #43 on: March 30, 2020, 12:50:25 am »
Hm, now I've lost the keybindings for prev/next bookmark (alt-pgup/pgdown).
Any idea why this might have happened?
Currently using rev 12002. No idea how this has happened. I don't remember removing them manually. :(

Looking in the config the keys for these menu entries are empty.
Would it be possible to store only bindings different from the default? Or somehow manually set by the user?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Keybinder v2 notes/problems
« Reply #44 on: April 05, 2020, 06:50:25 pm »
I've lost my local bindings once more. Rev 12012 at the moment.

Would it be possible to implement storing only non-default bindings (the ones I've actually set (only 3 at the moment))?
It will make debugging this a bit easier.
When are keybindings applied? Can the plugin change bindings in the middle of the execution?
Would it be possible to print an error when reading the bindings fails?
My C::B is crashing a lot, so it might be corrupting the files, but I'm finding about this corrupting late.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]