Novice needs help with gtk warnings

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ndiamond
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Feb 16, 2018 7:37 am

Novice needs help with gtk warnings

Post by ndiamond »

wxWidgets 3.0.3, gtk3-devel 3.14.3-1.1

My small experiment compiles with no errors and no warnings. wxFileDialog works (after I scrapped the wxWidgets X11 installation and built wxWidgets gtk+). However, during execution the following warnings get displayed in the user's command line terminal.

GLib-GObject-WARNING **: The property GtkImageMenuItem:use-stock is deprecated and shouldn't be used any more. It will be removed in a future version.
GLib-GObject-WARNING **: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used any more. It will be removed in a future version.
GLib-GObject-WARNING **: The property GtkImageMenuItem:accel-group is deprecated and shouldn't be used any more. It will be removed in a future version.

An internet search suggests that Gnome developers intentionally deprecated features which application developers would only use if they wanted to be user-friendly. To avoid the warnings, we either have to redirect stderr to /dev/null or find how to make wxWidgets stop using the user-friendly features which offended Gnome developers.

What is the correct way to contend with this nonsense?
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Novice needs help with gtk warnings

Post by DavidHart »

Hi,

I ignore them, especially as users of my program are unlikely to run it in a terminal. If that's not acceptable in your situation, redirect stderr.

AFAIK there's no way to prevent them happening, short of patching/rebuilding either wx or gtk+.

Regards,

David
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Novice needs help with gtk warnings

Post by ONEEYEMAN »

Hi,
Also keep in mind that you can't complain to GNOME/GTK+ people. They say - it's a done deaql, move on.
And also - GNOME is now GTK+ - all developers from GTK+ are now GNOME and so it is currently the same project.

Thank you.
ndiamond
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Feb 16, 2018 7:37 am

Re: Novice needs help with gtk warnings

Post by ndiamond »

Sorry, I'm late in noticing the latest reply.

If GTK+ is dead, then what Linux environment should I target in building wxWidgets?

First I tried raw X11, but that isn't supported and I couldn't make it work. When I asked for help, GTK+ was recommended. So far it's working though I need to hide warnings as discussed here. But if GTK+ is dead, what should I really use?
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Novice needs help with gtk warnings

Post by DavidHart »

But if GTK+ is dead,...
It's not dead or dying; in fact it's hyperactive.

There is a point of view, valid imho, that they change things too often. Though I'm sure they do so with the best intentions, that does tend to cause trouble for their users, including wx.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Novice needs help with gtk warnings

Post by ONEEYEMAN »

Hi,
In addition to what David said - what you see are run-time warnings. You users will never see them as they will start you program from the GUI environment by clicking on the icon and not running it from the Terminal.

Thank you.

P.S.: Also apologies for not being clear. What I tried to say is that you could go and complain to GTK+ developers, but most likely you will hear: "Sorry this warnings won't be fixed".
Post Reply