Group :: Editors
RPM: notepadqq
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: fix-context-menu-translation.patch
Download
Download
diff -ruN src/ui/EditorNS/customqwebview.cpp new_src/ui/EditorNS/customqwebview.cpp
--- src/ui/EditorNS/customqwebview.cpp 2019-01-11 17:51:05.643056147 +0300
+++ new_src/ui/EditorNS/customqwebview.cpp 2019-01-11 17:59:21.918445794 +0300
@@ -16,10 +16,21 @@
void CustomQWebView::onCustomContextMenuRequested(const QPoint& pos)
{
QMenu menu;
- menu.addAction(page()->action(QWebPage::Cut));
- menu.addAction(page()->action(QWebPage::Copy));
- menu.addAction(page()->action(QWebPage::Paste));
- menu.addAction(page()->action(QWebPage::SelectAll));
+
+ cut = page()->action(QWebPage::Cut);
+ copy = page()->action(QWebPage::Copy);
+ paste = page()->action(QWebPage::Paste);
+ selectAll = page()->action(QWebPage::SelectAll);
+
+ cut->setText(QObject::tr("Cut"));
+ copy->setText(QObject::tr("Copy"));
+ paste->setText(QObject::tr("Paste"));
+ selectAll->setText(QObject::tr("Select All"));
+
+ menu.addAction(cut);
+ menu.addAction(copy);
+ menu.addAction(paste);
+ menu.addAction(selectAll);
menu.exec(mapToGlobal(pos));
}
diff -ruN src/ui/include/EditorNS/customqwebview.h new_src/ui/include/EditorNS/customqwebview.h
--- src/ui/include/EditorNS/customqwebview.h 2019-01-11 17:58:38.041499731 +0300
+++ new_src/ui/include/EditorNS/customqwebview.h 2019-01-11 17:59:32.727432496 +0300
@@ -3,6 +3,7 @@
#include <QWebView>
#include <QWheelEvent>
+#include <QAction>
namespace EditorNS
{
@@ -26,6 +27,12 @@
private slots:
void onCustomContextMenuRequested(const QPoint& pos);
+
+ private:
+ QAction *cut;
+ QAction *copy;
+ QAction *paste;
+ QAction *selectAll;
};
}