From ae596b767fb2348f2982c566a5fb026a75f917f4c297761e02398d3909a30f29 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 4 Sep 2020 11:46:47 +0000 Subject: [PATCH] Accepting request 831345 from home:JonathanKang:branches:GNOME:Apps - Add gnote-enabling-addin-for-opened-notes.patch: noteaddin: Fix newly enabled addin not working for opened(bsc#1075342, glgo#GNOME/gnote!11). OBS-URL: https://build.opensuse.org/request/show/831345 OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/gnote?expand=0&rev=129 --- gnote-enabling-addin-for-opened-notes.patch | 31 +++++++++++++++++++++ gnote.changes | 7 +++++ gnote.spec | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 gnote-enabling-addin-for-opened-notes.patch diff --git a/gnote-enabling-addin-for-opened-notes.patch b/gnote-enabling-addin-for-opened-notes.patch new file mode 100644 index 0000000..8d36602 --- /dev/null +++ b/gnote-enabling-addin-for-opened-notes.patch @@ -0,0 +1,31 @@ +From 1c295905251aaa5d031531392eab5575da2d87b9 Mon Sep 17 00:00:00 2001 +From: Jonathan Kang +Date: Wed, 2 Sep 2020 09:11:07 +0800 +Subject: [PATCH] noteaddin: Fix newly enabled addin not working for opened + notes + +--- + src/noteaddin.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/noteaddin.cpp b/src/noteaddin.cpp +index 612bc8d8..ddb60ca0 100644 +--- a/src/noteaddin.cpp ++++ b/src/noteaddin.cpp +@@ -39,7 +39,13 @@ namespace gnote { + sigc::mem_fun(*this, &NoteAddin::on_note_opened_event)); + initialize(); + if(m_note->is_opened()) { ++ NoteWindow * window = get_window(); ++ + on_note_opened(); ++ /* Connect these two signals here, because signal_opened won't emit for ++ * opening already opened notes. */ ++ window->signal_foregrounded.connect(sigc::mem_fun(*this, &NoteAddin::on_note_foregrounded)); ++ window->signal_backgrounded.connect(sigc::mem_fun(*this, &NoteAddin::on_note_backgrounded)); + } + } + +-- +2.25.4 + diff --git a/gnote.changes b/gnote.changes index 1e41abd..9c996e4 100644 --- a/gnote.changes +++ b/gnote.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 2 02:36:36 UTC 2020 - Jonathan Kang + +- Add gnote-enabling-addin-for-opened-notes.patch: noteaddin: Fix + newly enabled addin not working for opened(bsc#1075342, + glgo#GNOME/gnote!11). + ------------------------------------------------------------------- Sun Jun 28 10:46:23 UTC 2020 - Bjørn Lie diff --git a/gnote.spec b/gnote.spec index 77308d4..1b24114 100644 --- a/gnote.spec +++ b/gnote.spec @@ -27,6 +27,8 @@ Group: Productivity/Text/Editors URL: https://wiki.gnome.org/Apps/Gnote Source0: https://download.gnome.org/sources/gnote/%{base_version}/%{name}-%{version}.tar.xz Source99: gnote-rpmlintrc +# PATCH-FIX-UPSTREAM gnote-enabling-addin-for-opened-notes.patch bsc#1075342, glgo#GNOME/gnote!11 noteaddin: Fix newly enabled addin not working for opened. +Patch0: gnote-enabling-addin-for-opened-notes.patch BuildRequires: desktop-file-utils BuildRequires: fdupes