diff --git a/ChangeLog b/ChangeLog index 09c981785..1e128da01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-13 Matthias Clasen + + 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 * src/nautilus-navigation-window-ui.xml: diff --git a/libnautilus-private/nautilus-trash-monitor.c b/libnautilus-private/nautilus-trash-monitor.c index 23c1a8462..98aacdf27 100644 --- a/libnautilus-private/nautilus-trash-monitor.c +++ b/libnautilus-private/nautilus-trash-monitor.c @@ -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); }