Accepting request 448982 from KDE:Extra
1 OBS-URL: https://build.opensuse.org/request/show/448982 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/krusader?expand=0&rev=47
This commit is contained in:
commit
79a5b83bf4
81
Handle-arrow-key-press-in-brief-view.patch
Normal file
81
Handle-arrow-key-press-in-brief-view.patch
Normal file
@ -0,0 +1,81 @@
|
||||
From 991d28b4c9d14d860583cffd2b778d0f46c4f528 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Bikadorov <alex.bikadorov@kdemail.net>
|
||||
Date: Thu, 29 Dec 2016 18:28:09 +0100
|
||||
Subject: FIXED: [ 374238 ] Handle left/right arrow key press in brief view
|
||||
(previously filtered by search bar).
|
||||
|
||||
Quickfix. It is maybe better to remove the filtering in KrSearchBar and instead get all key events from KrView.
|
||||
Bug came with 374238.
|
||||
|
||||
BUG: 374238
|
||||
---
|
||||
krusader/Panel/krinterbriefview.cpp | 22 ++++++++++++++++------
|
||||
krusader/Panel/krinterbriefview.h | 2 ++
|
||||
2 files changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/krusader/Panel/krinterbriefview.cpp b/krusader/Panel/krinterbriefview.cpp
|
||||
index fcf4898..f4d38b8 100644
|
||||
--- a/krusader/Panel/krinterbriefview.cpp
|
||||
+++ b/krusader/Panel/krinterbriefview.cpp
|
||||
@@ -146,9 +146,19 @@ void KrInterBriefView::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if (!e || !_model->ready())
|
||||
return ; // subclass bug
|
||||
- if ((e->key() != Qt::Key_Left && e->key() != Qt::Key_Right) &&
|
||||
- (handleKeyEvent(e))) // did the view class handled the event?
|
||||
+
|
||||
+ if (handleKeyEvent(e))
|
||||
return;
|
||||
+
|
||||
+ QAbstractItemView::keyPressEvent(e);
|
||||
+}
|
||||
+
|
||||
+bool KrInterBriefView::handleKeyEvent(QKeyEvent *e)
|
||||
+{
|
||||
+ if ((e->key() != Qt::Key_Left && e->key() != Qt::Key_Right) &&
|
||||
+ (KrView::handleKeyEvent(e))) // did the view class handled the event?
|
||||
+ return true;
|
||||
+
|
||||
switch (e->key()) {
|
||||
case Qt::Key_Right : {
|
||||
if (e->modifiers() == Qt::ControlModifier) { // let the panel handle it
|
||||
@@ -178,7 +188,7 @@ void KrInterBriefView::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
if (e->modifiers() & Qt::ShiftModifier)
|
||||
op()->emitSelectionChanged();
|
||||
- break;
|
||||
+ return true;
|
||||
}
|
||||
case Qt::Key_Left : {
|
||||
if (e->modifiers() == Qt::ControlModifier) { // let the panel handle it
|
||||
@@ -208,11 +218,11 @@ void KrInterBriefView::keyPressEvent(QKeyEvent *e)
|
||||
}
|
||||
if (e->modifiers() & Qt::ShiftModifier)
|
||||
op()->emitSelectionChanged();
|
||||
- break;
|
||||
+ return true;
|
||||
}
|
||||
- default:
|
||||
- QAbstractItemView::keyPressEvent(e);
|
||||
}
|
||||
+
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void KrInterBriefView::wheelEvent(QWheelEvent *ev)
|
||||
diff --git a/krusader/Panel/krinterbriefview.h b/krusader/Panel/krinterbriefview.h
|
||||
index 6bc133b..88b286a 100644
|
||||
--- a/krusader/Panel/krinterbriefview.h
|
||||
+++ b/krusader/Panel/krinterbriefview.h
|
||||
@@ -77,6 +77,8 @@ protected slots:
|
||||
virtual void renameCurrentItem() Q_DECL_OVERRIDE;
|
||||
|
||||
protected:
|
||||
+ // ---- reimplemented from KrView ----
|
||||
+ virtual bool handleKeyEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
|
||||
// ---- reimplemented from QAbstractItemView ----
|
||||
virtual bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
|
||||
virtual void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
78
add-service-actions-to-right-click-popup-menu.patch
Normal file
78
add-service-actions-to-right-click-popup-menu.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From 5c6059fbd30365dbd036db556a38019fd7a84872 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Bikadorov <alex.bikadorov@kdemail.net>
|
||||
Date: Wed, 16 Nov 2016 16:39:40 +0100
|
||||
Subject: FIXED: [ 372231 ] Added KDE's service actions again to right-click
|
||||
popup menu
|
||||
|
||||
BUG: 372231
|
||||
|
||||
KFileItemActions::addServiceActionsTo() is not deprecated so we should continue using it like before.
|
||||
---
|
||||
krusader/Panel/krpopupmenu.cpp | 22 ++++++++--------------
|
||||
krusader/Panel/krpopupmenu.h | 2 +-
|
||||
2 files changed, 9 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/krusader/Panel/krpopupmenu.cpp b/krusader/Panel/krpopupmenu.cpp
|
||||
index 7eac4a9..bfb33d1 100644
|
||||
--- a/krusader/Panel/krpopupmenu.cpp
|
||||
+++ b/krusader/Panel/krpopupmenu.cpp
|
||||
@@ -63,9 +63,8 @@ void KrPopupMenu::run(const QPoint &pos, KrPanel *panel)
|
||||
/**
|
||||
* Copied from dolphin/src/dolphincontextmenu.cpp and modified to add only compress and extract submenus.
|
||||
*/
|
||||
-bool KrPopupMenu::addCompressAndExtractPluginActions()
|
||||
+void KrPopupMenu::addCompressAndExtractPluginActions()
|
||||
{
|
||||
-
|
||||
KFileItemListProperties props(_items);
|
||||
|
||||
QVector<KPluginMetaData> jsonPlugins = KPluginLoader::findPlugins("kf5/kfileitemaction",
|
||||
@@ -81,8 +80,6 @@ bool KrPopupMenu::addCompressAndExtractPluginActions()
|
||||
addActions(abstractPlugin->actions(props, this));
|
||||
}
|
||||
}
|
||||
-
|
||||
- return !jsonPlugins.isEmpty();
|
||||
}
|
||||
|
||||
KrPopupMenu::KrPopupMenu(KrPanel *thePanel, QWidget *parent) : QMenu(parent), panel(thePanel), empty(false),
|
||||
@@ -189,16 +186,13 @@ KrPopupMenu::KrPopupMenu(KrPanel *thePanel, QWidget *parent) : QMenu(parent), pa
|
||||
uAct->setText(i18n("User Actions"));
|
||||
|
||||
// add compress and extract plugins (if available)
|
||||
- bool success = addCompressAndExtractPluginActions();
|
||||
-
|
||||
- /*
|
||||
- * When KF 5.25 is adopted by all distros, we can remove these 2 lines (and corresponding code)
|
||||
- * because since KF 5.25 compress and extract submenus are standalone plugins.
|
||||
- */
|
||||
- if (!success) {
|
||||
- fileItemActions.setItemListProperties(KFileItemListProperties(_items));
|
||||
- fileItemActions.addServiceActionsTo(this);
|
||||
- }
|
||||
+ addCompressAndExtractPluginActions();
|
||||
+
|
||||
+ // NOTE: design and usability problem here. Services disabled in kservicemenurc settings won't
|
||||
+ // be added to the menu. But Krusader does not provide a way do change these settings (only
|
||||
+ // Dolphin does).
|
||||
+ fileItemActions.setItemListProperties(KFileItemListProperties(_items));
|
||||
+ fileItemActions.addServiceActionsTo(this);
|
||||
|
||||
addSeparator();
|
||||
|
||||
diff --git a/krusader/Panel/krpopupmenu.h b/krusader/Panel/krpopupmenu.h
|
||||
index 2d16818..b20dcf8 100644
|
||||
--- a/krusader/Panel/krpopupmenu.h
|
||||
+++ b/krusader/Panel/krpopupmenu.h
|
||||
@@ -44,7 +44,7 @@ protected:
|
||||
void performAction(int id);
|
||||
void addEmptyMenuEntries(); // adds the choices for a menu without selected items
|
||||
void addCreateNewMenu(); // adds a "create new" submenu
|
||||
- bool addCompressAndExtractPluginActions(); // adds various plugin actions
|
||||
+ void addCompressAndExtractPluginActions(); // adds various plugin actions
|
||||
|
||||
enum ID {
|
||||
OPEN_ID,
|
||||
--
|
||||
cgit v0.11.2
|
||||
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 5 21:20:49 UTC 2017 - wbauer@tmo.at
|
||||
|
||||
- Add Handle-arrow-key-press-in-brief-view.patch to fix the
|
||||
behavior when pressing the left/right cursor keys in brief view
|
||||
(boo#1017533, kde#374238)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 22 18:46:27 UTC 2016 - wbauer@tmo.at
|
||||
|
||||
- Add add-service-actions-to-right-click-popup-menu.patch to add
|
||||
KDE's service actions to the right click popup menu in krusader
|
||||
again (boo#1016980, kde#372231)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 21 20:01:31 UTC 2016 - wbauer@tmo.at
|
||||
|
||||
|
@ -31,6 +31,10 @@ Patch0: krusader-2.5.0-generate-manpage.patch
|
||||
Patch1: 0001-Don-t-hardcode-appdata-location.patch
|
||||
# PATCH-FIX-UPSTREAM Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch boo#1011320, kde#371765 -- fixes dolphin opening e.g. LibreOffice files as archives
|
||||
Patch2: Remove-non-archive-mimetypes-from-krarc-archive-mime-type-list.patch
|
||||
# PATCH-FIX-UPSTREAM add-service-actions-to-right-click-popup-menu.patch boo#1016980, kde#372231 -- add KDE's service actions to the right click popup menu in krusader again
|
||||
Patch3: add-service-actions-to-right-click-popup-menu.patch
|
||||
# PATCH-FIX-UPSTREAM Handle-arrow-key-press-in-brief-view.patch boo#1017533, kde#374238 -- fixes behavior when pressing the left/right cursor keys in brief view
|
||||
Patch4: Handle-arrow-key-press-in-brief-view.patch
|
||||
BuildRequires: extra-cmake-modules >= 1.1.0
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libacl-devel
|
||||
@ -91,6 +95,8 @@ An advanced twin panel (commander style) file manager for KDE.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
export RPM_OPT_FLAGS="%{optflags} -fpermissive"
|
||||
|
Loading…
Reference in New Issue
Block a user