gtkmaxgui - SetGadgetHotkey not fully implemented

BlitzMax Forums/Brucey's Modules/gtkmaxgui - SetGadgetHotkey not fully implemented

Mark Tiffany(Posted 2008) [#1]
On all other platforms, SetGadgetHotKey can:

a) clear a gadgets hotkey by passing nulls
b) change a gadgets hotkey at run-time

This does not appear to be the case with the gtk module. It looks like this is due to the use of gtk_widget_add_accelerator. From the gtk library:

Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget's toplevel via gtk_window_add_accel_group(), and the signal must be of type G_RUN_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or gtk_menu_item_set_accel_path() instead.



Mark Tiffany(Posted 2008) [#2]
fyi, this causes errors at run-time on the gtk version of the ce ide.

And the title of the topic sounds a bit harsh - sorry - blame the size limit for topic titles!


Mark Tiffany(Posted 2008) [#3]
*bump*

Any chance you could take a look Brucey?


Brucey(Posted 2008) [#4]
aye :-)

Am fighting with my Linux box at the moment though - the one I have sounds like Concorde taking off, and I've found that neither VMWare nor Parallels like running BlitzMax code much - due to the way that BlitzMax runs a 1000th second tick/timer on Linux, which basically results in 100% cpu usage under the VM. I should see about re-applying my "hack" which knocks that down to 100th.

So, I'm trying to save up for a new box. I fancy a microATX thing with either a Core2 or Quad.

Not that I'm not trying...

Watch this space? ... :-)


Mark Tiffany(Posted 2008) [#5]
ta - I've just had woes with my linux box - a recent update a) took out the wireless config, and b) filled the HD and barfed halfway through!

Back up and running now, making minor tweaks to CE IDE to tidy it up under FLTK, but I really want to get GTK version working again...it gets further than it did (probably the freeprocess fix), but still hangs once the window shows. Trying to pin the cause down now...


Mark Tiffany(Posted 2008) [#6]
Brucey, seeing as you're looking at gtk, I'll bump this in case you missed it. I think this one is possibly the last one really screwing up CE IDE as of now.


Brucey(Posted 2008) [#7]
Thanks! I did miss this one ;-)

I should probably try the CEIDE too, just to see if I can help with that. The IDE appears to be working well again. The latest code is available via the maxmods SVN.


Brucey(Posted 2008) [#8]
I think this is going to be tricky to implement. Each accelerator requires a fairly unique path :


The accelerator path must consist of "<WINDOWTYPE>/Category1/Category2/.../Action", where <WINDOWTYPE> should be a unique application-specific identifier, that corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image", "Abiword-Document" or "Gnumeric-Settings". The Category1/.../Action portion is most appropriately chosen by the action the accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path, e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All". So a full valid accelerator path may look like: "<Gimp-Toolbox>/File/Dialogs/Tool Options...".



So, I suppose I'll need to work out some kind of path generator to get some kind of uniqueness in there - should be fun? :-p


Mark Tiffany(Posted 2008) [#9]
yeah, if i thought it was going to be easy I'd have had a hack at it myself, but it's clearly more involved and in need of in depth knowledge!