After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721708 - Drag destination Gtk-WARNING upon quitting the application
Drag destination Gtk-WARNING upon quitting the application
Status: RESOLVED FIXED
Product: nfoview
Classification: Other
Component: general
1.13.1
Other Linux
: Normal minor
: ---
Assigned To: nfoview-maint
nfoview-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-07 15:48 UTC by jcfp
Modified: 2016-01-16 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jcfp 2014-01-07 15:48:53 UTC
To reproduce: open and then quit the application. A Gtk-warning is logged as follows:

(nfoview:11749): Gtk-WARNING **: Can't set a target list on a widget until you've called gtk_drag_dest_set() to make the widget into a drag destination


This happens regardless of whether an nfo file was ever opened or not. The method of opening files (command line argument, loaded through file opening dialog, or drag and drop) also doesn't make any difference. Apart from the warning itself there do not appear to be any negative side effects to usability, hence the low severity.

Reported in Debian as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731741 - please see there for versions of dependencies etc.
Comment 1 Osmo Salomaa 2014-01-07 22:42:01 UTC
I'm aware of this warning, it has existed since some particular gtk version.

The cause of the warning is calling 'drag_dest_unset' on the text view to disable some text view default drag handling thus relaying the drag event to be handled by the window, which I'm using as the drag destination so that you can drop a file on the menubar as well. I don't really understand the warning, my best guess is that gtk tries to set some default drag targets for that text view (after initialization!?) and it fails because the destination has been unset.

As you note, the warning is harmless, drag-and-drop and everything else works fine. If someone has a simple fix for this, I'll gladly accept it, but I don't want a complicated work-around for a harmless warning.
Comment 2 jcfp 2014-01-10 12:21:15 UTC
Thanks for your quick response. Unfortunately, my knowledge of the inner workings of gtk is non-existent, so I can only wonder why it would try to set default targets for anything on shutdown.

I'll leave the debian bug report open as a means of tracking possible future progress and preventing duplicates.
Comment 3 Osmo Salomaa 2015-10-10 23:13:29 UTC
I don't see this anymore with Gtk 3.18.
Comment 4 shirish agarwal 2015-12-28 19:44:23 UTC
the Downstream bug-reporter here. I still see this. I am on Debian-mate desktop. Specifically Mate 3.10.2 . I do not know which version of GTK it uses by default. I do have GNOME 3.18 installed as well but use MATE exclusively (as it uses/eats less RAM).
Comment 5 Osmo Salomaa 2015-12-28 21:05:06 UTC
Could you check the version libgtk-3-0 you have installed? e.g. with "apt-cache policy libgtk-3-0" at the command line.
Comment 6 jcfp 2016-01-13 19:24:29 UTC
Still shows up in ubuntu 16.04 alpha, with nfoview 1.17 and libgtk-3-0 at 3.18.6-1ubuntu1.
Comment 7 Osmo Salomaa 2016-01-13 21:03:44 UTC
OK, reopening.

I also have GTK+ 3.18.6, but I don't see this. If the bug has disappeared with some update, it could also be due to a change in GObject, GLib, or something else.
Comment 8 Osmo Salomaa 2016-01-16 12:05:58 UTC
Upon closer look, with GTK+ 3.18 (or maybe since we switched to use Gtk.Application?), this warning seems to only appear when clicking the window close icon, not when hitting Ctrl+W or Ctrl+Q or the equivalent menu items. This led me to a work-around, which seems to work for me.

https://github.com/otsaloma/nfoview/commit/4f9420ebdc99ffb6cd722904e158efd6be8cb537

Could someone else test this as well, preferrably with GTK+ 3.18? Just get the code from GitHub, open a terminal in the source directory and run "python3 bin/nfoview". Check all three ways of closing a window: Ctrl+W, Ctrl+Q and the window close icon.

https://github.com/otsaloma/nfoview/archive/master.zip
Comment 9 jcfp 2016-01-16 12:53:23 UTC
Using the exact same test system as in my previous comment, your workaround removes the warning.
Comment 10 Osmo Salomaa 2016-01-16 13:18:21 UTC
Thanks. I'll close the bug and make a new release maybe in a week or so.