From cecfb9f2afa30b38d190c12ceeba99dd1ea6c402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Sat, 7 Nov 2015 11:59:13 +0000 Subject: [PATCH] Accepting request 342874 from home:badshah400:branches:GNOME:Factory 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 --- anjuta-file-deleted-upon-save.patch | 37 +++++++++++++++++++++++++++++ anjuta.changes | 7 ++++++ anjuta.spec | 3 +++ 3 files changed, 47 insertions(+) create mode 100644 anjuta-file-deleted-upon-save.patch diff --git a/anjuta-file-deleted-upon-save.patch b/anjuta-file-deleted-upon-save.patch new file mode 100644 index 0000000..bbec11d --- /dev/null +++ b/anjuta-file-deleted-upon-save.patch @@ -0,0 +1,37 @@ +From e4b3dcce7086709c80cd159960f3a4433c054182 Mon Sep 17 00:00:00 2001 +From: Yannick Inizan +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 diff --git a/anjuta.changes b/anjuta.changes index 9583455..a0e3720 100644 --- a/anjuta.changes +++ b/anjuta.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Nov 7 11:31:31 UTC 2015 - badshah400@gmail.com + +- Add anjuta-file-deleted-upon-save.patch to prevent showing + "The file ... has been deleted on the disk" everytime upon file + save (bgo#756426); patch taken from upstream master. + ------------------------------------------------------------------- Sun Sep 20 12:44:34 UTC 2015 - zaitor@opensuse.org diff --git a/anjuta.spec b/anjuta.spec index 99d45f8..17e4461 100644 --- a/anjuta.spec +++ b/anjuta.spec @@ -25,6 +25,8 @@ Group: Development/Tools/IDE Url: https://wiki.gnome.org/Apps/Anjuta Source0: http://download.gnome.org/sources/anjuta/3.18/%{name}-%{version}.tar.xz Source99: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM anjuta-file-deleted-upon-save.patch bgo#756426 badshah400@gmail.com -- Prevent showing "The file ... has been deleted on the disk" everytime on file save +Patch0: anjuta-file-deleted-upon-save.patch BuildRequires: autogen BuildRequires: binutils-devel BuildRequires: bison @@ -149,6 +151,7 @@ and more. %lang_package %prep %setup -q +%patch0 -p1 # HACK to support vala 0.30 sed -i "s:-0.28:-0.30:g" configure translation-update-upstream