!12 Fix the problem of the help manual button
From: @peijiankang Reviewed-by: @tanyulong2021 Signed-off-by: @tanyulong2021
This commit is contained in:
commit
2e94447535
95
0002-Fix-the-problem-of-the-help-manual-button.patch
Normal file
95
0002-Fix-the-problem-of-the-help-manual-button.patch
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
From 258b80e7f0a6e66185676f4da56bccff94175955 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peijiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Thu, 9 Jun 2022 09:27:39 +0800
|
||||||
|
Subject: [PATCH] Fix the problem of the help manual button
|
||||||
|
|
||||||
|
---
|
||||||
|
src/kmenu.cpp | 8 +++++++-
|
||||||
|
src/mainwidget.cpp | 8 +++++++-
|
||||||
|
src/topwindow.cpp | 8 +++++++-
|
||||||
|
3 files changed, 21 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/kmenu.cpp b/src/kmenu.cpp
|
||||||
|
index 5240094..dd62c6a 100644
|
||||||
|
--- a/src/kmenu.cpp
|
||||||
|
+++ b/src/kmenu.cpp
|
||||||
|
@@ -11,6 +11,8 @@
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
|
#include <ukui-log4qt.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
|
||||||
|
#include "global/global.h"
|
||||||
|
#include "kaction.h"
|
||||||
|
@@ -1107,8 +1109,12 @@ void TitleMenu::createHelpMenu()
|
||||||
|
|
||||||
|
act_f1 = new KAction(QKeySequence("F1"), nullptr, "manual");
|
||||||
|
connect(act_f1, &KAction::triggered, [this](){
|
||||||
|
+ char service_name[30];
|
||||||
|
+ memset(service_name, 0, 30);
|
||||||
|
+ snprintf(service_name, 30, "com.kylinUserGuide.hotel_%d", getuid());
|
||||||
|
+
|
||||||
|
// 帮助手册
|
||||||
|
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
|
||||||
|
+ QDBusMessage m = QDBusMessage::createMethodCall(QString(service_name),
|
||||||
|
"/",
|
||||||
|
"com.guide.hotel",
|
||||||
|
"showGuide");
|
||||||
|
diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp
|
||||||
|
index 89856fc..c7ba972 100644
|
||||||
|
--- a/src/mainwidget.cpp
|
||||||
|
+++ b/src/mainwidget.cpp
|
||||||
|
@@ -25,6 +25,8 @@
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
|
#include <QPropertyAnimation>
|
||||||
|
#include <ukui-log4qt.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <KWindowSystem>
|
||||||
|
|
||||||
|
@@ -1449,8 +1451,12 @@ void MainWidget::keyPressEvent(QKeyEvent *event)
|
||||||
|
g_user_signal->fullScreen();
|
||||||
|
}
|
||||||
|
else if(event->key() == Qt::Key_F1) {
|
||||||
|
+ char service_name[30];
|
||||||
|
+ memset(service_name, 0, 30);
|
||||||
|
+ snprintf(service_name, 30, "com.kylinUserGuide.hotel_%d", getuid());
|
||||||
|
+
|
||||||
|
// 帮助手册 先就分开写吧,快捷键不生效不知道为啥
|
||||||
|
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
|
||||||
|
+ QDBusMessage m = QDBusMessage::createMethodCall(QString(service_name),
|
||||||
|
"/",
|
||||||
|
"com.guide.hotel",
|
||||||
|
"showGuide");
|
||||||
|
diff --git a/src/topwindow.cpp b/src/topwindow.cpp
|
||||||
|
index 6b11f89..f55bdc2 100644
|
||||||
|
--- a/src/topwindow.cpp
|
||||||
|
+++ b/src/topwindow.cpp
|
||||||
|
@@ -14,6 +14,8 @@
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
|
#include <KF5/KWindowSystem/kwindowsystem.h>
|
||||||
|
#include <ukui-log4qt.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
|
||||||
|
#include "global/xatom-helper.h"
|
||||||
|
|
||||||
|
@@ -229,8 +231,12 @@ void TopWindow::setHide()
|
||||||
|
|
||||||
|
void TopWindow::openHelpDoc()
|
||||||
|
{
|
||||||
|
+ char service_name[30];
|
||||||
|
+ memset(service_name, 0, 30);
|
||||||
|
+ snprintf(service_name, 30, "com.kylinUserGuide.hotel_%d", getuid());
|
||||||
|
+
|
||||||
|
// 帮助手册 先就分开写吧,快捷键不生效不知道为啥
|
||||||
|
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
|
||||||
|
+ QDBusMessage m = QDBusMessage::createMethodCall(QString(service_name),
|
||||||
|
"/",
|
||||||
|
"com.guide.hotel",
|
||||||
|
"showGuide");
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
Name: kylin-video
|
Name: kylin-video
|
||||||
Version: 3.1.3
|
Version: 3.1.3
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: A powerful video player
|
Summary: A powerful video player
|
||||||
License: GPL-2.0-or-later and LGPL-2.0-or-later and BSD
|
License: GPL-2.0-or-later and LGPL-2.0-or-later and BSD
|
||||||
URL: https://github.com/UbuntuKylin/kylin-video
|
URL: https://github.com/UbuntuKylin/kylin-video
|
||||||
Source0: kylin-video-3.1.3.tar.gz
|
Source0: kylin-video-3.1.3.tar.gz
|
||||||
Patch1: 0001-modify-compile-error-of-kylin-video.patch
|
Patch1: 0001-modify-compile-error-of-kylin-video.patch
|
||||||
|
Patch2: 0002-Fix-the-problem-of-the-help-manual-button.patch
|
||||||
|
|
||||||
BuildRequires: qt5-devel
|
BuildRequires: qt5-devel
|
||||||
BuildRequires: qtchooser
|
BuildRequires: qtchooser
|
||||||
@ -39,6 +40,7 @@ It supports both x86 and ARM platform, and supports most of the audio and video
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -64,6 +66,9 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 9 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-3
|
||||||
|
- Fix the problem of the help manual button
|
||||||
|
|
||||||
* Wed Jun 8 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-2
|
* Wed Jun 8 2022 peijiankang <peijiankang@kylinos.cn> - 3.1.3-2
|
||||||
- add copyright file
|
- add copyright file
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user