cecfb9f2af
Basically make anjuta usable again, by allowing saving instead of falsely warning about deleted files OBS-URL: https://build.opensuse.org/request/show/342874 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/anjuta?expand=0&rev=187
38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
From e4b3dcce7086709c80cd159960f3a4433c054182 Mon Sep 17 00:00:00 2001
|
|
From: Yannick Inizan <inizan.yannick@gmail.com>
|
|
Date: Sun, 25 Oct 2015 14:45:32 +0100
|
|
Subject: sourceview: bgo #756426 - Anjuta show "The file ... has been deleted
|
|
on the disk" everytime I save file
|
|
|
|
SourceviewIO - Only emit "deleted" if monitored file isn't temporary.
|
|
---
|
|
plugins/sourceview/sourceview-io.c | 12 +++++++++++-
|
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/plugins/sourceview/sourceview-io.c b/plugins/sourceview/sourceview-io.c
|
|
index ec93bc1..323e5d7 100644
|
|
--- a/plugins/sourceview/sourceview-io.c
|
|
+++ b/plugins/sourceview/sourceview-io.c
|
|
@@ -196,8 +196,18 @@ static void on_file_changed (GFileMonitor* monitor,
|
|
break;
|
|
}
|
|
case G_FILE_MONITOR_EVENT_DELETED:
|
|
- g_signal_emit_by_name (sio, "deleted");
|
|
+ {
|
|
+ gchar* filename = NULL;
|
|
+
|
|
+ if (G_IS_FILE (file))
|
|
+ filename = g_file_get_basename (file);
|
|
+ /* Only emit "deleted" if monitored file isn't temporary */
|
|
+ if (filename != NULL && !g_str_has_prefix (filename, ".goutputstream-"))
|
|
+ g_signal_emit_by_name (sio, "deleted");
|
|
+
|
|
+ g_free (filename);
|
|
break;
|
|
+ }
|
|
default:
|
|
break;
|
|
}
|
|
--
|
|
cgit v0.11.2
|