Bug 144301 - unwanted new pygtk2-libglade warning message
Summary: unwanted new pygtk2-libglade warning message
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-05 19:18 UTC by Jason Vas Dias
Modified: 2007-11-30 22:10 UTC (History)
0 users

Clone Of:
Last Closed: 2005-08-24 17:12:27 UTC

Attachments (Terms of Use)

Description Jason Vas Dias 2005-01-05 19:18:24 UTC
Description of problem:
Having just yum upgraded to latest rawhide of 2005-01-03, upgrading
pygtk2 from 2.4.1-1 to 2.4.1-2, I now get this warning message 
when I load my .glade file:

/usr/sbin/system-config-bind:70: GtkWarning: Mixing deprecated and
non-deprecated GtkToolbar API is not allowed
  self.xml = gtk.glade.XML ( SCB+/+system-config-bind.glade )

This message was not generated in pygtk2-2.4.1-1 .

This message now appears every time the application is run, and 
it is not clear how it can be avoided, aside from rewriting the app
not to use glade at all (which I now wish I'd done from the start!).

I strongly object to this message for these reasons:

1. If something a programmer writes is "not allowed" in an API, 
   the API should not allow it, not complain about it.

2. The information content of the message is insufficient - 
   exactly what "deprecated"/"non-deprecated" parts of the API are
   being mixed ? How I am meant to know how what precisely is
   causing the problem from this message ?

Is there any way I can turn generation of this message off ? 
If so, please tell me how.

If not, please ammend the message to contain details about how
the problem can be fixed - ie. exactly what API components used
by my app should not be used together and which trigger the message
generation .
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Run a pygtk2-libglade app (eg. system-config-bind-4.0.0)
Actual results:

Annoying message is generated 

Expected results:

No message should be generated, or the message should contain
sufficient information to allow me to rectify the problem 
triggering it.

Additional info:

Comment 1 Jason Vas Dias 2005-01-05 20:06:56 UTC
Whoops! I found out it is actually generated by gtk2-2.6.0-1, which got
yum upgraded from 2.4.13-11, in which the message was not generated.

The same comments above still apply - either:
   1. The message should not be generated
or 2. There needs to be a way to disable its generation
or 3. It should contain sufficient information to allow a programmer
      to prevent it being generated.

The offending file is:
./gtk+-2.6.0/gtk/gtktoolbar.c: 79:    "Mixing deprecated and
non-deprecated GtkToolbar API is not allowed"

Moving to gtk+ package.

Comment 2 Jason Vas Dias 2005-01-05 20:40:04 UTC
Part of this IS a pygtk problem: there should be a way of catching
and handling the gtk.GtkWarning exception, which there does not seem
to be.
I tried:
        self.xml = gtk.glade.XML ( SCB+'/'+'system-config-bind.glade'
    except gtk.GtkWarning, w:
This did not work - the warning is still generated unconditionally.

I'm having to resort to:
        sys.stdout = file("/dev/null","w")
        sys.stderr = sys.stdout
        self.xml = gtk.glade.XML(SCB+'/'+'system-config-bind.glade')
        sys.stdout = sys.__stdout__
        sys.stderr = sys.__stderr__

Comment 3 Matthias Clasen 2005-08-24 17:12:27 UTC
We can not include all of the toolbar api docs in that warning message...

Note You need to log in before you can comment on or make changes to this bug.