Re: GTK3 menu bar



Hi;

On 30 July 2015 at 18:31, Stefan Salewski <mail ssalewski de> wrote:
On Thu, 2015-07-30 at 13:25 +0100, Emmanuele Bassi wrote:
Hi;

the preferred way to make a menu bar in GTK+ 3.x is to use GMenu and
GAction:

 * https://wiki.gnome.org/HowDoI/GMenu
 * https://wiki.gnome.org/HowDoI/GAction

There are various, incremental examples in the C API reference:

 * https://developer.gnome.org/gtk3/stable/ch01s04.html

Thanks for that hint -- seems I missed that, more or less...

The reason may be that I am generally looking for GTK docs, not for
Gnome docs, so I often start at http://www.gtk.org/

www.gtk.org should just point to developer.gnome.org; they are on the
same infrastructure anyway, and the documentation is automatically
pushed there.

Personally I do not really care much about Windows and Mac, but I know
that GTK3 can be used on Windows. For all what is called GNOME I
generally do not know if it has unmet dependencies for Mac and Window.

As part of the consolidation effort for the core GNOME platform that
was started mid-2.x, most of the GNOME dependencies are, these days,
limited to GTK and its own dependencies. Generally speaking, anything
that requires GTK should also work on MacOS and Windows.

I just unpacked evolution 3.16.4 source code, one of the bigger tools
that uses GTK3. grepping for g_menu or gtk_menu gives me currently only
results for the later, so that one still ignores g-menu? Guess the menu
is too large for GMenu?

Not at all.

Evolution has been ported to GTK 3.x early in the process, but most of
its code base is old, huge, not heavily maintained, and thus slow
moving, so it's not odd that it only uses older technologies. I
personally would not take it as a shining example of a GTK 3
application.

If you want to see a better use of the more recent GTK API, you should
look at gedit instead. The whole set of core GNOME applications are
also good examples of the GTK API in multiple languages:
https://wiki.gnome.org/GnomeLove/CoreApps

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[ ] ebassi [ gmail com]


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