mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
zeal: new recipe (#1165)
This commit is contained in:
committed by
Jérôme Duval
parent
7364cfdcef
commit
f9e5fd1534
132
app-doc/zeal/patches/zeal-0.3.1.patchset
Normal file
132
app-doc/zeal/patches/zeal-0.3.1.patchset
Normal file
@@ -0,0 +1,132 @@
|
||||
From 0ad02f549ecf15428bfeb1f3ed1b0cdb14a6922c Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Hill <calvin@hakobaito.co.uk>
|
||||
Date: Wed, 22 Feb 2017 20:13:41 +0000
|
||||
Subject: [PATCH] Disable global shortcuts for haiku support
|
||||
|
||||
---
|
||||
src/libs/ui/mainwindow.cpp | 15 ++++++++-------
|
||||
src/libs/ui/mainwindow.h | 4 ++--
|
||||
src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri | 2 +-
|
||||
src/libs/ui/ui.pri | 5 ++---
|
||||
4 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/libs/ui/mainwindow.cpp b/src/libs/ui/mainwindow.cpp
|
||||
index d7766c6..a2f8c50 100644
|
||||
--- a/src/libs/ui/mainwindow.cpp
|
||||
+++ b/src/libs/ui/mainwindow.cpp
|
||||
@@ -28,7 +28,8 @@
|
||||
#include "docsetsdialog.h"
|
||||
#include "searchitemdelegate.h"
|
||||
#include "settingsdialog.h"
|
||||
-#include "qxtglobalshortcut/qxtglobalshortcut.h"
|
||||
+// TODO: Implement global shortcuts for Haiku
|
||||
+// #include "qxtglobalshortcut/qxtglobalshortcut.h"
|
||||
|
||||
#include <core/application.h>
|
||||
#include <core/settings.h>
|
||||
@@ -179,7 +180,7 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
|
||||
m_application(app),
|
||||
m_settings(app->settings()),
|
||||
m_zealListModel(new Registry::ListModel(app->docsetRegistry(), this)),
|
||||
- m_globalShortcut(new QxtGlobalShortcut(m_settings->showShortcut, this)),
|
||||
+ //m_globalShortcut(new QxtGlobalShortcut(m_settings->showShortcut, this)),
|
||||
m_openDocsetTimer(new QTimer(this))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -194,7 +195,7 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
|
||||
createTrayIcon();
|
||||
|
||||
// initialise key grabber
|
||||
- connect(m_globalShortcut, &QxtGlobalShortcut::activated, this, &MainWindow::toggleWindow);
|
||||
+ //connect(m_globalShortcut, &QxtGlobalShortcut::activated, this, &MainWindow::toggleWindow);
|
||||
|
||||
setupTabBar();
|
||||
|
||||
@@ -223,10 +224,10 @@ MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
|
||||
connect(ui->actionFind, &QAction::triggered, ui->webView, &SearchableWebView::showSearchBar);
|
||||
|
||||
connect(ui->actionPreferences, &QAction::triggered, [this]() {
|
||||
- m_globalShortcut->setEnabled(false);
|
||||
+ //m_globalShortcut->setEnabled(false);
|
||||
QScopedPointer<SettingsDialog> dialog(new SettingsDialog(m_application, this));
|
||||
dialog->exec();
|
||||
- m_globalShortcut->setEnabled(true);
|
||||
+ //m_globalShortcut->setEnabled(true);
|
||||
});
|
||||
|
||||
ui->actionBack->setShortcut(QKeySequence::Back);
|
||||
@@ -899,7 +900,7 @@ void MainWindow::keyPressEvent(QKeyEvent *keyEvent)
|
||||
|
||||
void MainWindow::applySettings()
|
||||
{
|
||||
- m_globalShortcut->setShortcut(m_settings->showShortcut);
|
||||
+ //m_globalShortcut->setShortcut(m_settings->showShortcut);
|
||||
|
||||
if (m_settings->showSystrayIcon)
|
||||
createTrayIcon();
|
||||
@@ -909,7 +910,7 @@ void MainWindow::applySettings()
|
||||
|
||||
void MainWindow::toggleWindow()
|
||||
{
|
||||
- const bool checkActive = sender() == m_globalShortcut;
|
||||
+ const bool checkActive = sender(); //== m_globalShortcut;
|
||||
|
||||
if (!isVisible() || (checkActive && !isActiveWindow())) {
|
||||
#ifdef USE_APPINDICATOR
|
||||
diff --git a/src/libs/ui/mainwindow.h b/src/libs/ui/mainwindow.h
|
||||
index 7d886d7..81f6c09 100644
|
||||
--- a/src/libs/ui/mainwindow.h
|
||||
+++ b/src/libs/ui/mainwindow.h
|
||||
@@ -34,7 +34,7 @@ struct _AppIndicator;
|
||||
struct _GtkWidget;
|
||||
#endif
|
||||
|
||||
-class QxtGlobalShortcut;
|
||||
+//class QxtGlobalShortcut;
|
||||
|
||||
class QModelIndex;
|
||||
class QSystemTrayIcon;
|
||||
@@ -116,7 +116,7 @@ private:
|
||||
|
||||
Zeal::Registry::CancellationToken m_cancelSearch;
|
||||
|
||||
- QxtGlobalShortcut *m_globalShortcut = nullptr;
|
||||
+// QxtGlobalShortcut *m_globalShortcut = nullptr;
|
||||
|
||||
QTabBar *m_tabBar = nullptr;
|
||||
|
||||
diff --git a/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri b/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri
|
||||
index d4c3e3c..7ce3d36 100644
|
||||
--- a/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri
|
||||
+++ b/src/libs/ui/qxtglobalshortcut/qxtglobalshortcut.pri
|
||||
@@ -1,6 +1,6 @@
|
||||
HEADERS += $$files($$PWD/*.h)
|
||||
SOURCES += $$PWD/qxtglobalshortcut.cpp
|
||||
|
||||
-unix:!macx:SOURCES += $$PWD/qxtglobalshortcut_x11.cpp
|
||||
+unix:!macx:!haiku:SOURCES += $$PWD/qxtglobalshortcut_x11.cpp
|
||||
win32:SOURCES += $$PWD/qxtglobalshortcut_win.cpp
|
||||
macx:SOURCES += $$PWD/qxtglobalshortcut_mac.cpp
|
||||
diff --git a/src/libs/ui/ui.pri b/src/libs/ui/ui.pri
|
||||
index ca5169d..db95b89 100644
|
||||
--- a/src/libs/ui/ui.pri
|
||||
+++ b/src/libs/ui/ui.pri
|
||||
@@ -3,13 +3,12 @@ ZEAL_LIB_NAME = Ui
|
||||
QT += widgets
|
||||
|
||||
# QxtGlobalShortcut dependencies
|
||||
-unix:!macx {
|
||||
- QT += x11extras
|
||||
+unix:!macx:!haiku{
|
||||
+ QT += x11extras
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += x11 xcb xcb-keysyms
|
||||
}
|
||||
-
|
||||
macx {
|
||||
LIBS += -framework Carbon
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
||||
Reference in New Issue
Block a user