Page 1 of 2

Re: Please implement the GtkHeaderBar

Posted: Thu Oct 01, 2015 11:54 am
by Shardik
I see a big problem in making available the GtkHeaderBar in PureBasic and that's a problem inherent to Linux distributions: in contrast to Windows or MacOS there exist numerous Windows/Desktop managers in Linux like Gnome 3, KDE, Unity, LXDE, Xfce, Pantheon, Cinnamon, Mate, Enlightenment and several others. And they all seem to implement the GtkHeaderBar differently (if at all!). So I tried fsw's GtkHeaderBar example on Ubuntu 14.04 x64 with these 3 Desktop managers:

KDE:
Image

Unity:
Image

Enlightenment:
Image

As the snapshots prove only on KDE fsw's example allows to drop down the menu list, on Enlightenment the menu title appears but no drop down menu and on Unity only the close button is functional. I assume that fsw only did his tests on Gnome 3 (I am currently on vacation, so that I am not able to check 22 other distributions with different desktop managers on my Linux distribution test machine at work... 8)).

Another problem is that the GtkHeaderBar was introduced with Gtk 3.10 and not so recent Linux distributions with older Gtk3 versions (or Gtk2) won't support the GtkHeaderBar even if the desktop manager would be able to... :wink:

Re: Please implement the GtkHeaderBar

Posted: Thu Oct 01, 2015 6:18 pm
by fsw
@Shardik
I get your point.

However, there is nothing that cannot be solved with CompilerIf.
Information about the enabled session can be obtained through the environment variable.

BTW: Enjoy your vacation. 8)

Re: Please implement the GtkHeaderBar

Posted: Thu Oct 01, 2015 8:41 pm
by Shardik
fsw wrote:
Keya wrote:
fsw wrote:Things like the headerbar need a GTK window, a PB window cannot be used.
please pardon my linux newbieness but I thought PB windows in Linux were GTK windows? what framework do they use otherwise?
If you look at my example in the Linux forum you can see for yourself.
Exchange the GTK window with OpenWindow and menu events stop working because the PB window is a "finalized" window (whatever the GTK folks mean with that...)

BTW: I'm a newbie in many things myself...
I have just posted an example that uses a GtkHeaderBar in a PB window with a PB menu bar integrated into the GtkHeaderBar... :wink: