Hi Daniel (and Florian assuming he reads this mailing list), I'm very confused. The link you give gives an error 404, I can't find the original bug report anymore, and I can't reproduce the problem.
I don't see how this patch is supposed to work in improving things. In the original code, gtk_window_set_icon(..., create_pixbuf("xournal.png")); create_pixbuf() is pretty careful about error checking and returns NULL whenever something goes wrong; and the manual for gtk_window_set_icon() explicitly says that it's ok to pass NULL. When I delete xournal.png, I get a ** (xournal:27193): WARNING **: Couldn't find pixmap file: xournal.png as expected, but everything works fine. Meanwhile, the proposed replacement code doesn't look obviously cleaner to me in any way -- for example it only ensures that the file exists but doesn't check whether it can be successfully loaded as an image; and the behavior of gtk_window_set_default_icon_from_file() on an invalid file is not completely clear to me (presumably warning and go on), but in any case I don't see the benefit. There is a comment from Florian about the original code improperly using a pointer allocated on the stack, I've been looking through the code he removed/replaced and can't find the problem (+ there is another very similar function create_pixmap() that was not put into question). Help please? Thanks in advance, Denis On 03/19/2017 04:17 PM, D M German wrote: > > Hi Denis, > > you might remember this bug: > > https://github.com/dmgerman/xournal/issues/30 > > I tracked it and it was present in official xournal > > Florian Bruhin provided a fix and I created patch to apply to official > xournal. It is available here: > > https://github.com/dmgerman/xournal/tree/icon > > thanks Denis, > > --dmg > > -- > Daniel M. German "None but those who have experienced > Mary Shelley (Frankenstein) -> them can conceive of the enticements of > science." > http://turingmachine.org/ > http://silvernegative.com/ > dmg (at) uvic (dot) ca > replace (at) with @ and (dot) with . > -- Denis Auroux UC Berkeley, Department of Mathematics 817 Evans Hall, Berkeley CA 94720-3840, USA aur...@math.berkeley.edu ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel