nautilus r14844 - in trunk: . src
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14844 - in trunk: . src
- Date: Tue, 13 Jan 2009 09:08:08 +0000 (UTC)
Author: alexl
Date: Tue Jan 13 09:08:08 2009
New Revision: 14844
URL: http://svn.gnome.org/viewvc/nautilus?rev=14844&view=rev
Log:
2009-01-13 Alexander Larsson <alexl redhat com>
* src/nautilus-window-slot.c (nautilus_window_slot_update_icon):
Only set window icon if it really changed.
Modified:
trunk/ChangeLog
trunk/src/nautilus-window-slot.c
Modified: trunk/src/nautilus-window-slot.c
==============================================================================
--- trunk/src/nautilus-window-slot.c (original)
+++ trunk/src/nautilus-window-slot.c Tue Jan 13 09:08:08 2009
@@ -346,7 +346,13 @@
if (info) {
icon_name = nautilus_icon_info_get_used_name (info);
if (icon_name != NULL) {
- gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
+ /* Gtk+ doesn't short circuit this (yet), so avoid lots of work
+ * if we're setting to the same icon. This happens a lot e.g. when
+ * the trash directory changes due to the file count changing.
+ */
+ if (g_strcmp0 (icon_name, gtk_window_get_icon_name (GTK_WINDOW (window))) != 0) {
+ gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
+ }
} else {
pixbuf = nautilus_icon_info_get_pixbuf_nodefault (info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]