Hi, For anyone used to atom/sublime/vscode and other rocking editors, one of the core features is what's referred to as a "command palette". In all the aforementioned, it's accessed by the Ctrl-Shift-P shortcut (C-S-p). In GIMP, it's accessed by default - at least on Linux - with /. An awesome individual has now made a generic library that enables this in "all" GTK3 applications, and it is amazingly excellent. Except, it doesn't work in LibreOffice. Here's a quote from the developer himself, in the relevant issue on github[1]: "Yeah, not quite sure what to do here. The problem is that Plotinus needs to register a global shortcut within the host application. I do not know of any reliable way to do that other than using a GtkApplication. Besides that, everything is already in place, and LibreOffice has been using native GTK menus for a year or so. Therefore, if the shortcut problem were solved, the menu entries should appear immediately." I can hack, but I'm not familiar with either the OOo or GTK codebases, so it seems like a lot to learn for something that I assume is either a very quick fix or a deeper issue with the toolkit couplings that would take immense efforts. But if anyone wants to point me in the right direction (as opposed to fixing it themselves), I could take a whack at it. 1: https://github.com/p-e-w/plotinus/issues/7
Sure - so the first thing to do is to get a build of LibreOffice; easiest on Linux - and now reasonably fun: http://www.libreoffice.org/about-us/source-code/ When you have a build, you'll want to poke into the framework code - please poke me then =)
I've got the build up and running and I grepped the framework folder for 'gtk' and it yields zero results. I grepped the whole source tree and got hundreds. I could spend some time filtering through the results there and trying to zero in on the code I should be inspecting/learning, but I do presume someone else already knows and could tell me in a few seconds. Is there any particular literature or set of instructions I should be reading as to how the repository is constructed?
Hi Vidar ! =) > I've got the build up and running Awesome =) good news; prolly we should continue this by direct mail and/or on the developers list to find a more alert mentor for you, and get some UX / design input too. > and I grepped the framework folder for 'gtk' and it yields zero results. Yep - the gtk+ integration is in vcl/unx/ around there. On the other hand, I'm not entirely sure that we use native gtk+ menus these days - but perhaps in gtk3 we do; Caolan would know. I had imagined that you'd want to make the functionality cross-platform, ie. using VCL/ and the information on all the menus / toolbars that the framework/ code sets up. > Is there any particular literature or set of instructions I should be > reading as to how the repository is constructed? There should be README files in each directory that may help.
It is indeed a native gtk menubar widget in gtk3, see vcl/unx/gtk/gtksalmenu.cxx and gtk_menu_bar_new_from_model (the various right click context menus are also native, see GtkSalMenu::ShowNativePopupMenu in the same file for those). Now we are not using a GtkApplication but we do try and set up some things like that does, see vcl/unx/gtk3/gtk3gtkframe.cxx and ensure_dbus_setup which is how we expose the menubar stuff to unity f.e. to get the integration of the menus with the unity mac-like menubar. I'm not sure what the hook plotinus uses is though, it might be useful to find/point out the piece of code that plotinus uses to register the shortcut and perhaps that might indicate the way to go.
Thanks for the guidance thus far, I apologize for the slow response. The plotinus author just made a commit[1] to his project that adds support for libreoffice (and I have tested it, it works perfectly after you unbind C-S-p from 'Superscript'), so I am uncertain as to whether this bug should be closed as FIXED/WFM/INVALID, or what to do moving forward. I've closed the bug as RESOLVED WORKSFORME for now. 1: https://github.com/p-e-w/plotinus/commit/fc91272d6453471f095af97dfaadcefea1e262c4?diff=unified