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 341351 - window icon not set correctly when opening the first image
window icon not set correctly when opening the first image
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: image viewer
2.16.x
Other Linux
: Normal minor
: ---
Assigned To: EOG Maintainers
EOG Maintainers
eog-ng
Depends on:
Blocks:
 
 
Reported: 2006-05-10 23:13 UTC by Sebastien Bacher
Modified: 2007-03-18 00:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Suboptimal patch (3.29 KB, patch)
2006-06-06 19:59 UTC, Pat Rondon
none Details | Review
patch using signals (4.60 KB, patch)
2006-08-02 20:57 UTC, Felix Riemann
none Details | Review

Description Sebastien Bacher 2006-05-10 23:13:34 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/eog/+bug/43609

"when opening an image, the window bar does not display the image's thumbnail as an identifier but rather EOG's icon.

However, if you switch to the next / previous image, its thumbnail appears on the window bar."
Comment 1 Pat Rondon 2006-06-06 00:25:32 UTC
This doesn't _always_ happen - it looks like a race between the thumbnail creation job and the image loading job, which calls display_image_data(), which in turn sets the window's icon.

One possible solution is creating the thumbnail in display_image_data() and having the job finished callback set the window's icon.  I'm not too sure about how the icon creation is performed, but I assume EOG is going through the collection creating thumbnails.  If that's the case, then it could be a while before the thumbnail gets created, especially if it's done lazily (i.e. not for images that are not displayed in the collection browser), so this might be an ok approach. OTOH, it may step on the thumbnail creation that will inevitably happen (I think).
Comment 2 Pat Rondon 2006-06-06 19:59:39 UTC
Created attachment 66855 [details] [review]
Suboptimal patch

Here's a patch that addresses this issue, but it's probably not the ideal way to fix it - I'm uploading it to highlight the problem.  I noticed there's a thumbnail_finished signal for EogImage, but I can't seem to find where it's emitted.
Comment 3 Felix Riemann 2006-08-02 20:57:30 UTC
Created attachment 70096 [details] [review]
patch using signals

The idea of using the signals to set the icon is not bad.
This patch changes EogImage so it emits a thumbnail_set signal once the thumb gets set.
If the thumbnail is already set it's set as usual EogWindow sets the icon (nearly) as usual, but if it's not EogWindow waits for the signal to set it.
Comment 4 Daniel Holbach 2006-09-29 13:49:20 UTC
Maybe for 2.18?
Comment 5 Felix Riemann 2006-11-19 10:43:38 UTC
I forgot to note that I commited a fix in a similar way as my patch in comment 3 to eog-ng branch some time ago:

2006-10-05  Felix Riemann

	* libeog/eog-image.c: (eog_image_class_init),
	(eog_image_set_thumbnail):
	* libeog/eog-image.h: Replace old unused thumbnail signals by a single
	one being emitted once the thumbnail is set.
	* shell/eog-window.c: (image_thumb_changed_cb),
	(eog_window_display_image): Set window icon using the new signal. Make
	it work when the collection view is hidden.
Comment 6 Björn Lindqvist 2006-12-30 16:43:56 UTC
I was just about to file the opposite bug so I just add a comment here instead. There seem to be some inconsistency in that some applications choose to display a "document icon" while other use the applications icon. For example, in Bug 131010 Epiphany was changed so that it doesn't display an icon of the document (favicon in Epiphany's case) as the application icon. 

I don't know which is correct, but to me it seems a little inconsistent.
Comment 7 David Prieto 2007-02-13 13:29:49 UTC
"There seem to be some inconsistency in that some applications choose to display
a "document icon" while other use the applications icon".

Based on that bug, I think that apps with tabs should show the app icon, whereas apps without should use the document's one.
Comment 8 Lucas Rocha 2007-03-18 00:08:06 UTC
eog-ng branch, which has a full rewrite of eog's core, has been merged into trunk as part of 2.19/2.20 development cycle. Therefore this bug is fixed now. Thanks for the report!