PB 5.20 B2 GTK3 subsystem for Linux

Just starting out? Need help? Post your questions and find answers here.
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

PB 5.20 B2 GTK3 subsystem for Linux

Post by uwekel »

Hi,

i cannot see anything of GTK3. When i compile and run on linux, i only get the GTK2 widgets (best compared by the SpinGadget which has been deeply re-designed). What has to be done to get the GTK3 widgets?

Best regards
Uwe
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by ts-soft »

Image
Gadget.pb from example dir with and without subsystem gtk3
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by Fred »

you need to specify "gtk3" in the subsystem field of the compiler options.
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by uwekel »

The Gtk3 SpinButton normally renders like this (with +/-buttons inside):
Image
The PB SpinGadget looks like always. Isn't it inherited from GtkSpinButton?
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by Fred »

You are right, this one is custom made, probably because GtkSpinButton didn't exists in old version of GTK
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by fsw »

Compiling PB examples while adding GTK3 as subsystem results in an linker error:
...undefined reference to symbol 'XInternAtom'.
Library libX11.so.6 is on the system as well...

BTW same files with GTK2 compile as expected.

Linux OS: Manjaro XFCE

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by ts-soft »

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by fsw »

ts-soft,
I tried to add the missing lib to the linker (compiler options) but it didn't work.

As always: you have the answerrs.

Thank you.

I am to provide the public with beneficial shocks.
Alfred Hitshock
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by ts-soft »

you can edit the ld.so.conf as root:
/etc/ld.so.conf

Add the path to missing lib like
/usr/lib
or
/usr/lib64
or
/usr/lib32

than in terminal as root
ldconfig

or
sudo ldconfig
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: PB 5.20 B2 GTK3 subsystem for Linux

Post by fsw »

With GTK2 the WebBrowser example works as expected, the gadgets are resized accordingly when the main window is resized.
With GTK3 the WebBrowser main window resizes itself (right after the start); it's bigger than the desktp size.
It's also unresponsive...

Bummer :shock:

Are the examples not tested before release of a beta?

:|

I am to provide the public with beneficial shocks.
Alfred Hitshock
Post Reply