Accepting request 575814 from GNOME:Apps

- Add shortkey-ctrl-o-alt-w.patch:
  When left-click the note tree view, shortkey should be enable
  ( bgo#792859 ). (forwarded request 575367 from zhengqiang)

OBS-URL: https://build.opensuse.org/request/show/575814
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnote?expand=0&rev=56
This commit is contained in:
Dominique Leuenberger 2018-02-14 08:45:51 +00:00 committed by Git OBS Bridge
commit ab889aae01
3 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Feb 11 05:51:40 UTC 2018 - qzheng@suse.com
- Add shortkey-ctrl-o-alt-w.patch:
When left-click the note tree view, shortkey should be enable
( bgo#792859 ).
-------------------------------------------------------------------
Mon Sep 18 22:05:25 UTC 2017 - luc14n0@linuxmail.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gnote
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,6 +25,8 @@ License: GPL-3.0+
Group: Productivity/Text/Editors
Url: http://live.gnome.org/Gnote
Source: http://download.gnome.org/sources/gnote/3.26/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM shortkey-ctrl-o-alt-w.patch bgo#792859 qzheng@suse.com -- When left-click the note tree view, shortkey should be enable.
Patch0: shortkey-ctrl-o-alt-w.patch
%if 0%{?suse_version} > 1325
BuildRequires: libboost_test-devel
%else
@ -71,6 +73,7 @@ search results from documents.
%prep
%setup -q
%patch0 -p1
translation-update-upstream
%build

View File

@ -0,0 +1,21 @@
diff --git a/src/searchnoteswidget.cpp b/src/searchnoteswidget.cpp
index 9aa7bed..1186158 100644
--- a/src/searchnoteswidget.cpp
+++ b/src/searchnoteswidget.cpp
@@ -946,6 +946,8 @@ bool SearchNotesWidget::on_treeview_button_released(GdkEventButton *ev)
bool SearchNotesWidget::on_treeview_key_pressed(GdkEventKey * ev)
{
+ Gtk::Menu *menu = get_note_list_context_menu();
+
switch(ev->keyval) {
case GDK_KEY_Delete:
delete_selected_notes();
@@ -955,7 +957,6 @@ bool SearchNotesWidget::on_treeview_key_pressed(GdkEventKey * ev)
// Pop up the context menu if a note is selected
Note::List selected_notes = get_selected_notes();
if(!selected_notes.empty()) {
- Gtk::Menu *menu = get_note_list_context_menu();
popup_context_menu_at_location(menu, 0, 0);
}
break;