d0vgan / nppexec

NppExec (plugin for Notepad++)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

toolbar icon hover-text

pryrt opened this issue · comments

right now, the toolbar icon hover text is "Show console". There are many plugins with a "console" of some sort, so it would be nice if the hover text were "Show NppExec Console".

Also, the docked Console window itself: could its title and tab-title be changed to "NppExec Console" or even just "NppExec"
image

(The other plugin-consoles I have call themselves "LuaScript", "Python", and "NppConsole", which follow the names of those plugins; by that naming scheme, "NppExec" would be the best name for the widow and tab)

I second this request. In the past I used a hex editor to change the toolbar tip text, but lately I just rely on the CustomizeToolbar plugin to organize the plugins in to separate groups with unique icons.

The caption of a toolbar icon is silently taken from the menu command name.
In case of a prefix, NppExec's menu and other UI elements may look like this:

изображение

изображение

изображение

To me this is about a unique name/label in areas that other plugins also use. It's clear that when I expand the NppExec menu in Plugins, everything there is related to NppExec. But, it's less clear when the tooltip on the toolbar just says 'Show Console' and even harder when a docking panel is only labeled 'Console'. So far I know of four docking console panels, but most of them differentiate themselves by using the language name they support. (I'm not very good at reading C++, but it looks to me like you actively remove the 'NppExec' prefix from these labels in "NppExec.cpp" around lines 4376 to 4387.) As much as I like the 'purity' and simple consistency of calling the console 'NppExec', calling it 'NppExec: Console' or 'NppExec Console' is a great improvement. I think adding the prefix 'NppExec' to all the entries in the Plugins menu makes it too busy and it becomes harder to find the item I'm looking for if all the names are longer.

The caption of a toolbar icon is silently taken from the menu command name.

@d0vgan , that seems to be the way you've implemented it, yes. But that's not a requirement. For example, PythonScript has a menu entry "Show Console", but it's console window is labeled "Python" for both the title and the docking-tab:
image
image

And the NppConsole plugin has a menu entry called "Show NppConsole" and its console-title/docking-tab-text is "NppConsole"

So there are other ways of doing it.

If you really have to have the automatic-from-menu-command, then call the menu command "Show NppExec Console" and thus the console's title and docking tab text should be "NppExec Console"

The docked window title is one thing, it can be changed independently indeed.
I was talking about Notepad++'s toolbar and the toolbar icon hover-text. This text is silently taken from the menu item text because of the following API:
WM_ADDTOOLBARICON(UINT funcItem[X]._cmdID, toolbarIcons icon)
The funcItem[X]._cmdID is an integer that specifies an ID (identificator) of a menu item with a given text. Which means that when my menu item is e.g. "Execute...", the same "Execute..." popup text will be shown for the correponding toolbar button.
NppExec allows to specify what toolbar button you want to have on the Notepad++'s toolbar:
изображение

Now, if the menu item text is just "Execute...", you will have the very same "Execute..." as the toolbar icon hover-text. I.e. you will not have any explicit hint that this toolbar's icon is related to NppExec. And there is no way to modify toolbar icon hover-text unless you change the corresponding menu item text to e.g. "NppExec: Execute...".
Here are the screenshots of the menu item with the text "Execute..." and its corresponding toolbar icon hover-text:

изображение

изображение

Once again: we either have just "Execute..." in both NppExec's menu and for the corresponding icon on the toolbar or we have "NppExec: Execute..." (or something else) in both NppExec's menu and for the corresponding icon on the toolbar.
Which way would you prefer?

I was talking about Notepad++'s toolbar and the toolbar icon hover-text.

Sorry, I misunderstood.

[for the menu and toolbar names] Which way would you prefer?

If it were my decision, I would say

  • Execute NppExec Script
  • Execute Previous NppExec Script
  • Show NppExec Console

But if you preferred the "NppExec: ..." prefix, that's okay with me, too.

I can see why @artie-finkelstein doesn't want the NppExec prefix on all the menu entries... but since only three of them can be made into buttons, those would be the only ones that would need to change.

Or maybe make it a "translatable string" like the builtin Notepad++ menu entries, so that if I don't like the name you choose, I can just go edit NppExec.ini to change that string to something of my own liking. :-) (That would also help those who don't want their plugin menus in English when the rest of the menus are in their localized language.)

Sorry, I wasn't trying to be a pest, and I didn't realize before the request that the toolbar hover text was tied to the menu text. There doesn't appear to be the simple solution I was hoping for. Getting a UI design that makes all your users happy is never easy. ;-)

I didn't realize what a tight needle you have to thread the code through, you have done exceedingly well given the heavy restrictions.

My personal preferences, in order of decreasing priority:

  1. somehow add NppExec as a prefix to or replacement for the docking console title (to me this is 'the biggie')
  2. I think @pryrt's version for script execution is fine; the important thing is to avoid a truly generic tooltip of 'Execute'
  3. since you have a well established icon for the console, the tool tip text should stay as it is (Show Console), this will match the current LuaScript & PythonScript behavior

OK, let's confirm the design :)

Main menu:
изображение

The Toolbar button (Note: the popup message is taken from the menu item and can't be independently changed):
изображение

The docked window and the Execute dialog (Note: the title of the docked window and the title of the Execute dialog can be independently changed to any text - please confirm whether the demonstrated version looks completely good or should it be changed):
изображение

That looks good to me.

Thanks for your effort on this.

Looks good to me too.
Thank you for the patient explanation of the limitations imposed on any solution as well as your effort in implementing the changes.
BTW as originator and author you always get the biggest vote!

Great job. Thanks for putting up with my requests.

I'll let you decide whether to close this issue now, or only after you've made the permanent rather than development release -- but since I'm using the development version now, it's "closed" in my opinion. :-)