Page 1 of 1

Command IDs in menu and for settings

Posted: 09 Dec 2014 10:32
by bdeshi
I'd enabled keyboard shortcut display in menus (KSinMenu ini key).
Wish the same could be done with cmdIDs.

And a trailing wish: possible to attach command ID lookalikes to config options? so that ::#<settingid>; opens config and yellow-hilites associated setting. Or maybe toggle togglable settings.
Confusion with command IDs may be avoided as: #-11=setting ID | #11=cmd ID

I think it can be rather easy. Some kind of association is already implemented as the "jump" button.

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 13:00
by admin
a)only as a tweak Hey, #703 was free so I just added it to the menu. Nice and useful.
b) what is <settingid>?

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 15:11
by bdeshi
a) thanks! b) #<settingid> is just a template where <settingid> is an integer.

[edit] explanation: say you associate #-1 (for example) to the first config option: Config->Tree and List -> Show desktop folders.
Now, ::#-1; will open config window and highlight that option, the same that is done with "jump to setting".

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 15:31
by TheQwerty
I like the idea of being able to do a Jump to from a script (though I'm not sure it's ultimately that useful. ;) ).

However, I dislike that syntax.

I was going to propose something like:

Code: Select all

JumpTo dialog, query, [flags=0];
Where dialog could allow this to be used for Configuration, CKS, Toolbar-Available, Toolbar-Current, etc.
Query is used to pre-populate the filter.
Flags:
1 = If query has only one match, automatically do default action. (This really only makes sense jumping within Configuration)

Then if there were IDs for specific items within those dialogs they could be used instead of the query string by using '#<id>' or something similar.


The roadblock I hit was dealing with translations - since most scripts would probably use English queries and that may not translate well. :?


In any event I like the idea, but I think it should be a named command not a new take on #<cid>;.

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 15:54
by bdeshi
SammaySarkar wrote:I'd enabled keyboard shortcut display in menus (KSinMenu ini key).
Wish the same could be done with cmdIDs.
admin wrote:a)only as a tweak Hey, #703 was free so I just added it to the menu. Nice and useful.
Oh, I hope I'd clearly expressed myself. To be clear, I wished for this:
CmdIDinMenu.png

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 20:28
by admin
SammaySarkar wrote:
SammaySarkar wrote:I'd enabled keyboard shortcut display in menus (KSinMenu ini key).
Wish the same could be done with cmdIDs.
admin wrote:a)only as a tweak Hey, #703 was free so I just added it to the menu. Nice and useful.
Oh, I hope I'd clearly expressed myself. To be clear, I wished for this:
CmdIDinMenu.png
Sure, man. :)

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 20:33
by admin
But the b) wish... no, I don't see how this could work. And JumpTo ... no, and I don't really see the use in it.

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 20:55
by admin
PS: Just after uploading I saw that it does not work well with changing the interface language yet. Fix tomorrow...

Re: Command IDs in menu and for settings

Posted: 10 Dec 2014 21:06
by TheQwerty
admin wrote:PS: Just after uploading I saw that it does not work well with changing the interface language yet. Fix tomorrow...
It breaks separators in the User menus, but it's technically correct since that's a hack that wastes a CID. ;)

It's also ugly, but I don't think there's much that can be done to fix that without creating custom menu controls. :whistle:
EDIT: It's still useful - just not something I'd want to leave enabled. /edit

Not sure there's any reason to show the option when the entire Scripting feature is disabled either (presumably that means it shows up in the Free edition).

Re: Command IDs in menu and for settings

Posted: 11 Dec 2014 10:22
by admin
Yep, all agreed. Fixes come...