Re: [anjuta-devel] Dock visibility and keyboard shortcuts of popup menu actions



On Sunday, 19 May, 2013 05:52 PM, Sébastien Granjoux wrote:
Hi Arnel,


Le 19/05/2013 03:56, Arnel A. Borja a écrit :
I tried using the gtk_widget_is_visible but it only checks if the
widget is marked as visible.

And why isn't it enough?

I think GDL uses a notebook here (a GdlDockNotebook)? All widgets of notebooks are always set as visible, or their tab won't be shown. GdlDockItem has iconified and other properties that could be used though.

GdlDockItem has closed, iconified and lock properties, but I can't
> find a function where I could get the GdlDockObject from Anjuta.

I think you can get it by "dock-item" data but it's probably better to add a function in anjuta-dock.c if it's needed.
I'll try that once I got some time.


I need this so that the DevHelp plugin will open a new tab if the
API dock is not visible and a link was clicked on the sidebar (API
Browser dock).

There is a function anjuta_dock_present_pane that will make sure that the pane is visible. Isn't it possible to use it?


Anyway, I have planned to spend more time on GDL. Could you explain me what is needed in more details and I will try to implement. I still need a few time to read again GDL code and understand how it's working.

I want to check first if the pane is indeed visible so that if its visible, we just change the current URI of the current tab. If it is not visible then create a new tab so that the user won't be surprised that pages in his tabs changed without his knowledge.

If you want I could push the current patches to Bugzilla so that you could take a look. Though you need WebKitGTK+ to compile them.


2. How should I add keyboard shortcuts to popup menu actions and
widgets on docks?

I think you need to set the shortcut on the GtkAction, but I haven't take care of this. There are a few bug reports related to shortcut (by example https://bugzilla.gnome.org/show_bug.cgi?id=678275), so it's quite possible that there are some issues here.
I've tried adding the shortcut to the GtkActionEntry structs, without success.

Maybe, AnjutaUI should add accelerators to AnjutaWindow using gtk_window_add_accel_group? There's a call to gtk_ui_manager_get_accel_group but it was only used to disconnect accelerators, but I can't find where it adds them to the window (I just grep'ed the sources in libanjuta directory).


Regards,

Arnel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]