Author Topic: hotkey/shortcut view on tooltips  (Read 6352 times)

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
hotkey/shortcut view on tooltips
« on: March 31, 2006, 09:56:22 pm »
I found no functionality in C::B.

Is it possible to view the shortcuts in the tooltips?

example
"step into" should be "step into (Shift+F7)"

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: hotkey/shortcut view on tooltips
« Reply #1 on: March 31, 2006, 10:52:32 pm »
The menus show their shortcuts by default. To have shortcuts displayed on tooltips, too, you would have to modify the XRC file (is not a configuration thing).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: hotkey/shortcut view on tooltips
« Reply #2 on: April 01, 2006, 04:21:30 pm »
The menus show their shortcuts by default.

Yes, I know. But it is not what I want. :)

you would have to modify the XRC file (is not a configuration thing).

I found no XRC file. I think it is in the source package.
Ok, it should be a configuration thing. I will set a request.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: hotkey/shortcut view on tooltips
« Reply #3 on: April 01, 2006, 04:46:04 pm »
The XRC files are inside share\CodeBlocks\resources.zip. You can edit them with any text editor (including Code::Blocks, SciTE, or Notebook).

Submitting a feature request will not avail you, since we will certainly not make this configurable any time soon, but it will be included in the action based event system, anyway. Right now, it is a prohibitive amount of work to change toolbar tooltips programmatically.

On the other hand, the future action-based event handling system generates toolbar buttons programmatically, anyway. Thus, showing shortcuts in tooltips (and making this configurable) comes for free.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: hotkey/shortcut view on tooltips
« Reply #4 on: April 01, 2006, 06:49:41 pm »
the future action-based event handling system generates toolbar buttons programmatically

Is it a wxWidget system or is it C::B specific?

It could be modified. Reading C::B settings/options
if tooltips + shortcuts
 read the <tooltip> tag + <shortcut> tag in the xrc files.

It is important for usability! Please do not close the feauter request. I will handle it as soon has possible.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: hotkey/shortcut view on tooltips
« Reply #5 on: April 01, 2006, 07:03:53 pm »
Is it a wxWidget system or is it C::B specific?
The latter.

It could be modified. Reading C::B settings/options
if tooltips + shortcuts
 read the <tooltip> tag + <shortcut> tag in the xrc files.
We do not read in the XRC files. This is done by wxWidgets. What you describe would require us to patch wxWidgets, which is not an option.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MoonKid

  • Almost regular
  • **
  • Posts: 180
Re: hotkey/shortcut view on tooltips
« Reply #6 on: April 06, 2006, 02:03:28 pm »
We do not read in the XRC files. This is done by wxWidgets. What you describe would require us to patch wxWidgets, which is not an option.

Is that why the toolbars are not customizable?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: hotkey/shortcut view on tooltips
« Reply #7 on: April 06, 2006, 04:23:46 pm »
No, the reason why they are not customizable is that they are stored in XRC.

You cannot customise XRC thingies (dialogs, controls, toolbars) in an easy way without using nasty hacks. It is of course technically possible, but an awful lot of work (and not worth the trouble).

There are for example at least three things you could do. One would be to use TinyXML to modify the XRC files (works, but very nasty hack). The second would be to modify wxWidgets (that's even worse). The last would be to query a pointer to the respective objects from wxWidgets one by one and modify them after they have been loaded (very tedious and adds noticeable overhead to startup time).

As I said above, the reason why we aren't putting work into this is that we can already see at this time that our work would be useless. When the action-based event handling system gets merged (which will be one of the first things to happen after version 1.0), toolbars will no longer be loaded from XRC, so all the tedious work will be thrown overboard.
« Last Edit: April 06, 2006, 04:28:12 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: hotkey/shortcut view on tooltips
« Reply #8 on: April 06, 2006, 04:42:45 pm »
As I said above, the reason why we aren't putting work into this is that we can already see at this time that our work would be useless. When the action-based event handling system gets merged (which will be one of the first things to happen after version 1.0), toolbars will no longer be loaded from XRC, so all the tedious work will be thrown overboard.
That's the way to go. :)

About XRC hardcoding-ness, do you know how to make the XRC strings translatable?
With language catalogs (.po) or with different xrc's for each language?