Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings while running Gtimelog #37

Closed
shirishag75 opened this issue Apr 21, 2015 · 7 comments
Closed

Warnings while running Gtimelog #37

shirishag75 opened this issue Apr 21, 2015 · 7 comments

Comments

@shirishag75
Copy link
Contributor

Hi there,
I constantly get warnings whenever I run gtimelog :-

[$] ./gtimelog

./src/gtimelog/main.py:234: Warning: The property GtkButton:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version.
  builder.add_from_file(ui_file)
./src/gtimelog/main.py:234: Warning: The property GtkSettings:gtk-button-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
  builder.add_from_file(ui_file)
./src/gtimelog/main.py:234: Warning: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
  builder.add_from_file(ui_file)
./src/gtimelog/main.py:234: Warning: The property GtkToolButton:stock-id is deprecated and shouldn't be used anymore. It will be removed in a future version.
  builder.add_from_file(ui_file)
./src/gtimelog/main.py:234: Warning: The property GtkMisc:xpad is deprecated and shouldn't be used anymore. It will be removed in a future version.
  builder.add_from_file(ui_file)

These are the GTK library versions I'm using on Debian Jessie :-

[$] dpkg -l libgtk-3-0 libgtk-3-bin libgtk-3-common libgtk-3-dev                                                                   

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version              Architecture         Description
+++-==============================-====================-====================-=================================================================
ii  libgtk-3-0:amd64               3.14.5-1             amd64                GTK+ graphical user interface library
ii  libgtk-3-bin                   3.14.5-1             amd64                programs for the GTK+ graphical user interface library
ii  libgtk-3-common                3.14.5-1             all                  common files for the GTK+ graphical user interface library
ii  libgtk-3-dev:amd64             3.14.5-1             amd64                development files for the GTK+ library

I am on Debian-mate desktop could that have made a difference ?

@shirishag75 shirishag75 mentioned this issue Apr 21, 2015
23 tasks
@mgedmin
Copy link
Member

mgedmin commented May 12, 2015

I'm now on GTK+ 3.16.2, and I don't get these warnings when I run ./gtimelog from master.

Interesting.

git grep xpad shows

src/gtimelog/gtimelog.ui:                            <property name="xpad">6</property>

so, yes, I'm apparently using some of the deprecated properties.

@shirishag75
Copy link
Contributor Author

@mgedmin
Copy link
Member

mgedmin commented May 19, 2015

I'd prefer to know how I can convince my GTK+ to show these warnings.

@shirishag75
Copy link
Contributor Author

Umm....if you are running Ubuntu it will not show because they (as in Canonical has silenced it). See https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/1430307/

I'm guessing you will have to revert the glib to an older version in order to see it. The other way is for me to come to GTK+ 3.16.2 ( Debian is still on 3.14 series as of now ) and would still require some time till it moves to 3.16 series. Do not know any other way or can't think.

@standagh
Copy link

It's in the discussion on the linked page - see comment by Lars Uebernickel (larsu) wrote on 2015-04-16:
Yeah, let's disable them for the release. Developers can still opt in to showing them while developing an application by setting G_ENABLE_DIAGNOSTIC to 1.
Works for me for gedit on ubuntu.

@shirishag75
Copy link
Contributor Author

I did see that but because I'm not on Ubuntu didn't know whether that worked or not. Good to know it works. If you don't still get it then probably will have to wait till I get on 3.16 to see if the issue is still there.

@mgedmin
Copy link
Member

mgedmin commented May 19, 2015

Thank you, G_ENABLE_DIAGNOSTIC=1 works:

And I can get extra deprecation warnings if I also use PYTHONWARNINGS=all:

/home/mg/src/gtimelog/src/gtimelog/main.py:308: PyGIDeprecationWarning: timeout_add_seconds is deprecated; use GLib.timeout_add_seconds instead
  GObject.timeout_add_seconds(1, self.tick)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants