Only emit ::trash-state-changed when the state actually changes.

* libnautilus-private/nautilus-trash-monitor.c (update_info_cb):
        Only emit ::trash-state-changed when the state actually changes.

svn path=/trunk/; revision=14856
This commit is contained in:
Matthias Clasen 2009-01-13 15:42:34 +00:00
parent 5a4f860df8
commit 9665b199bd
2 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2009-01-13 Matthias Clasen <mclasen@redhat.com>
Bug 567460 NautilusTrashMonitor emits trash-state-changed too often
* libnautilus-private/nautilus-trash-monitor.c (update_info_cb):
Only emit ::trash-state-changed when the state actually changes.
2009-01-13 Alexander Larsson <alexl@redhat.com>
* src/nautilus-navigation-window-ui.xml:

View file

@ -122,12 +122,14 @@ update_info_cb (GObject *source_object,
}
}
}
trash_monitor->details->empty = empty;
if (trash_monitor->details->empty != empty) {
trash_monitor->details->empty = empty;
/* trash got empty or full, notify everyone who cares */
g_signal_emit (trash_monitor,
signals[TRASH_STATE_CHANGED], 0,
trash_monitor->details->empty);
/* trash got empty or full, notify everyone who cares */
g_signal_emit (trash_monitor,
signals[TRASH_STATE_CHANGED], 0,
trash_monitor->details->empty);
}
}
g_object_unref (info);
}