Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37519438
en ru br
Репозитории ALT
S:2.0.0-alt0.2.beta
www.altlinux.org/Changes

Группа :: Редакторы
Пакет: notepadqq

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: fix-context-menu-translation.patch
Скачать


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;
     };
 
 }
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin