summaryrefslogtreecommitdiff
diff options
authorIain Lane <iain@orangesquash.org.uk>2015-09-21 17:44:04 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-09-21 17:44:04 +0000
commit017eebdc17e0ec50143f131f290de97b8536c62d (patch)
tree0930440232cfb8a3d90de170ab53c8959c4606af
parent3c391819a2c5e8894d51b99c2fde4cb70ab4e03b (diff)
parente292586c90d9c008d6a8ef76dd3ab37cd2d24efc (diff)
launcher: Always make sure we check the right file when seeing if .desktop files have been deleted. Fixes disappearing launcher icons when applications are upgraded when we are using glib > 2.44. Fixes: #1498106
Approved by: Marco Trevisan (TreviƱo) (bzr r4015)
-rw-r--r--launcher/ApplicationLauncherIcon.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp
index 9010f3c02..ede26baf8 100644
--- a/launcher/ApplicationLauncherIcon.cpp
+++ b/launcher/ApplicationLauncherIcon.cpp
@@ -559,14 +559,13 @@ void ApplicationLauncherIcon::UpdateDesktopFile()
g_file_monitor_set_rate_limit(_desktop_file_monitor, 2000);
_gsignals.Add<void, GFileMonitor*, GFile*, GFile*, GFileMonitorEvent>(_desktop_file_monitor, "changed",
- [this] (GFileMonitor*, GFile* f, GFile*, GFileMonitorEvent event_type) {
+ [this, desktop_file] (GFileMonitor*, GFile*, GFile*, GFileMonitorEvent event_type) {
switch (event_type)
{
case G_FILE_MONITOR_EVENT_DELETED:
{
- glib::Object<GFile> file(f, glib::AddRef());
- _source_manager.AddTimeoutSeconds(1, [this, file] {
- if (!g_file_query_exists(file, nullptr))
+ _source_manager.AddTimeoutSeconds(1, [this, desktop_file] {
+ if (!g_file_query_exists(desktop_file, nullptr))
{
UnStick();
LogUnityEvent(ApplicationEventType::DELETE);