Hi,
'shiftcolumn' is one of the orphaned plugin which I have decided to work on. shiftcolumn's default shortcut key to move the selected text to right is <Primary>0 which conflicts with "Zoom reset", making the plugin useless to move the text right unless for every move the user clicks Tools->Shift Right. Shift left is done by <Primary>9 key which is working fine.
Also, this plugin doesnt have its plugin preferences dialog box.
I was planning to change the default shortcut key for the aforementioned behavior of the plugin to <Primary>8 which AFAIK doesnt conflict with anything.
Do you guys think its a good idea? What should I do to prevent such problems to arise in future?
Thanks, Shankhoneer Chakrovarty
On 26 March 2014 09:33, Shankhoneer Chakrovarty shankhoneer@gmail.com wrote:
Hi,
'shiftcolumn' is one of the orphaned plugin which I have decided to work on. shiftcolumn's default shortcut key to move the selected text to right is <Primary>0 which conflicts with "Zoom reset", making the plugin useless to move the text right unless for every move the user clicks Tools->Shift Right. Shift left is done by <Primary>9 key which is working fine.
Also, this plugin doesnt have its plugin preferences dialog box.
I was planning to change the default shortcut key for the aforementioned behavior of the plugin to <Primary>8 which AFAIK doesnt conflict with anything.
Do you guys think its a good idea? What should I do to prevent such problems to arise in future?
It is actually preferable that plugins do not have default keybindings.
It is not known what combination plugins will be loaded and so it is not known what combination of keybindings might clash, and it is not known what keybindings a user might define themselves that can clash.
So I would recommend that default keybindings be removed from plugins.
Cheers Lex
Thanks, Shankhoneer Chakrovarty
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Thanks Lex.
It is actually preferable that plugins do not have default keybindings.
It is not known what combination plugins will be loaded and so it is not known what combination of keybindings might clash, and it is not known what keybindings a user might define themselves that can clash.
So I would recommend that default keybindings be removed from plugins.
I understand, I would remove the default keybindings. The problem is this plugin doesnt have its own preference page in the Plugin Manager window. Activating this plugin will mean the user has to go to Edit->Preference (not the Plugin preferences)->Keybindings to set the keybindings for this plugin which is a lot of clicks. What I would suggest is that plugin should have its own preference page and a way to tell the user how to set the keybindings and the recommended keys. One of the ways could be putting all those things in plugin description. What do you think?
Thanks, Shankhoneer Chakrovarty
Actually, you could just add a button to the plugin preferences that points directly to the Edit -> Prefernces -> Keybindings by calling:
keybindings_dialog_show_prefs_scroll("Plugin Section");
I do so here: https://github.com/sblatnick/geany-plugins/blob/external-tools/external-tool...
I hope this helps,
Steve
On 03/25/2014 05:19 PM, Shankhoneer Chakrovarty wrote:
Thanks Lex.
It is actually preferable that plugins do not have default keybindings. It is not known what combination plugins will be loaded and so it is not known what combination of keybindings might clash, and it is not known what keybindings a user might define themselves that can clash. So I would recommend that default keybindings be removed from plugins.
I understand, I would remove the default keybindings. The problem is this plugin doesnt have its own preference page in the Plugin Manager window. Activating this plugin will mean the user has to go to Edit->Preference (not the Plugin preferences)->Keybindings to set the keybindings for this plugin which is a lot of clicks. What I would suggest is that plugin should have its own preference page and a way to tell the user how to set the keybindings and the recommended keys. One of the ways could be putting all those things in plugin description. What do you think?
Thanks, Shankhoneer Chakrovarty
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 26.03.2014 00:32, schrieb Steven Blatnick:
Actually, you could just add a button to the plugin preferences that points directly to the Edit -> Prefernces -> Keybindings by calling:
keybindings_dialog_show_prefs_scroll("Plugin Section");
Please don't do that. This is adding another way configuration dialog could look like with adding no extra value (-> 1.24 will have a keybindings button on plugin manager).
Cheers, Frank
Sorry, I didn't realize the feature was being added anyway.
On 03/26/2014 04:13 AM, Frank Lanitz wrote:
Am 26.03.2014 00:32, schrieb Steven Blatnick:
Actually, you could just add a button to the plugin preferences that points directly to the Edit -> Prefernces -> Keybindings by calling:
keybindings_dialog_show_prefs_scroll("Plugin Section");
Please don't do that. This is adding another way configuration dialog could look like with adding no extra value (-> 1.24 will have a keybindings button on plugin manager).
Cheers, Frank _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Le 26/03/2014 00:19, Shankhoneer Chakrovarty a écrit :
Thanks Lex.
It is actually preferable that plugins do not have default keybindings. It is not known what combination plugins will be loaded and so it is not known what combination of keybindings might clash, and it is not known what keybindings a user might define themselves that can clash. So I would recommend that default keybindings be removed from plugins.
I understand, I would remove the default keybindings. The problem is this plugin doesnt have its own preference page in the Plugin Manager window. Activating this plugin will mean the user has to go to Edit->Preference (not the Plugin preferences)->Keybindings to set the keybindings for this plugin which is a lot of clicks. What I would suggest is that plugin should have its own preference page and a way to tell the user how to set the keybindings and the recommended keys. One of the ways could be putting all those things in plugin description. What do you think?
In current dev version of Geany, if an enabled plugin installed configurable keybindings, the user can click on a "Shortcut" button in the plugin manager, which leads her to the right preference page at the right location to modify that plugin's shortcuts.
Cheers, Colomban
On 14-03-25 04:19 PM, Shankhoneer Chakrovarty wrote:
Thanks Lex.
It is actually preferable that plugins do not have default keybindings.
It is not known what combination plugins will be loaded and so it is not known what combination of keybindings might clash, and it is not known what keybindings a user might define themselves that can clash.
So I would recommend that default keybindings be removed from plugins.
I understand, I would remove the default keybindings. The problem is this plugin doesnt have its own preference page in the Plugin Manager window. Activating this plugin will mean the user has to go to Edit->Preference (not the Plugin preferences)->Keybindings to set the keybindings for this plugin which is a lot of clicks. What I would suggest is that plugin should have its own preference page and a way to tell the user how to set the keybindings and the recommended keys. One of the ways could be putting all those things in plugin description. What do you think?
I think this is the normal way though, I don't think (m)any plugins provide own keybindings preferences outside of the main one. There was a fairly recent commit which added a "Keybindings" button into the Plugin Manager dialog that jumps directly to the keybindings group for the selected plugin. IMO, this is not too hard.
I agree that the plugin could/should tell the user how to configure/use it though, either in the README file or wherever. In the case of Shift Column plugin, I think the README file should be more explicit about what the plugin actually does. When I tried it the other day, I had no clue what it should do as "move blocks of text horizontally" could mean several different things, and the most obvious one is built into the editor already just using the Tab/ShiftTab keybindings (to indent/dedent).
If you're looking to get started contributing to Geany-Plugins, a couple simple things could be to make two separate pull requests on github, one to replace the default Shift Column keybindings with 0s (no default binding), and then a separate pull request to improve its README/docs.
Cheers, Matthew Brush
Am 26.03.2014 00:19, schrieb Shankhoneer Chakrovarty:
I understand, I would remove the default keybindings. The problem is this plugin doesnt have its own preference page in the Plugin Manager window. Activating this plugin will mean the user has to go to Edit->Preference (not the Plugin preferences)->Keybindings to set the keybindings for this plugin which is a lot of clicks. What I would suggest is that plugin should have its own preference page and a way to tell the user how to set the keybindings and the recommended keys. One of the ways could be putting all those things in plugin description. What do you think?
Inside plugin manager (1.24) there is a button linked with Plguins' keybindings.
Cheers, Frank
The shortcut code would look something like this:
enum { KB_PLUGIN, KB_GROUP }; ... key_group = plugin_set_key_group(geany_plugin, "plugin_name_keyboard_shortcut", KB_GROUP, NULL); keybindings_set_item(key_group, KB_PLUGIN, shortcut_callback, 0, 0, "plugin_name", _("Shortcut Name"), NULL);
Here is a simple plugin that uses that structure: https://github.com/sblatnick/geany-plugins/blob/quick-search/quick-search/sr... Here is another plugin that allows dynamically adding shortcuts (as opposed to a fixed number): https://github.com/sblatnick/geany-plugins/blob/external-tools/external-tool... line 64
I hope this helps,
Steve
On 03/25/2014 05:12 PM, Lex Trotman wrote:
On 26 March 2014 09:33, Shankhoneer Chakrovarty shankhoneer@gmail.com wrote:
Hi,
'shiftcolumn' is one of the orphaned plugin which I have decided to work on. shiftcolumn's default shortcut key to move the selected text to right is <Primary>0 which conflicts with "Zoom reset", making the plugin useless to move the text right unless for every move the user clicks Tools->Shift Right. Shift left is done by <Primary>9 key which is working fine.
Also, this plugin doesnt have its plugin preferences dialog box.
I was planning to change the default shortcut key for the aforementioned behavior of the plugin to <Primary>8 which AFAIK doesnt conflict with anything.
Do you guys think its a good idea? What should I do to prevent such problems to arise in future?
It is actually preferable that plugins do not have default keybindings.
It is not known what combination plugins will be loaded and so it is not known what combination of keybindings might clash, and it is not known what keybindings a user might define themselves that can clash.
So I would recommend that default keybindings be removed from plugins.
Cheers Lex
Thanks, Shankhoneer Chakrovarty
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 25.03.2014 23:33, schrieb Shankhoneer Chakrovarty:
I was planning to change the default shortcut key for the aforementioned behavior of the plugin to <Primary>8 which AFAIK doesnt conflict with anything.
Plugins shouldn't have a default in about 99% of cases as it will always conflict with something else.
Cheers, Frank