mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 19:38:48 +03:00
Remove mac extras
This commit is contained in:
parent
da96558bb9
commit
dadaa10b93
4 changed files with 1 additions and 62 deletions
|
@ -219,10 +219,6 @@ else()
|
|||
find_package(Qt6Keychain REQUIRED)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
find_package(Qt6MacExtras REQUIRED)
|
||||
endif(APPLE)
|
||||
|
||||
if (Qt5Widgets_FOUND)
|
||||
if (Qt5Widgets_VERSION VERSION_LESS 5.15.0)
|
||||
message(STATUS "Qt version ${Qt5Widgets_VERSION}")
|
||||
|
@ -585,10 +581,6 @@ endif()
|
|||
|
||||
if (APPLE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Foundation -framework Cocoa -framework UserNotifications")
|
||||
set(SRC_FILES ${SRC_FILES} src/notifications/ManagerMac.mm src/notifications/ManagerMac.cpp src/emoji/MacHelper.mm)
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
|
||||
set_source_files_properties( src/notifications/ManagerMac.mm src/emoji/MacHelper.mm PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
|
||||
endif()
|
||||
elseif (WIN32)
|
||||
file(DOWNLOAD
|
||||
"https://raw.githubusercontent.com/mohabouje/WinToast/41ed1c58d5dce0ee9c01dbdeac05be45358d4f57/src/wintoastlib.cpp"
|
||||
|
@ -752,9 +744,7 @@ if (NOT COMPILE_QML)
|
|||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries (nheko PRIVATE Qt5::MacExtras)
|
||||
elseif(WIN32)
|
||||
if(WIN32)
|
||||
target_compile_definitions(nheko PRIVATE WIN32_LEAN_AND_MEAN)
|
||||
target_link_libraries (nheko PRIVATE ${NTDLIB} Qt5::WinMain)
|
||||
if(MSVC)
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2021 Nheko Contributors
|
||||
// SPDX-FileCopyrightText: 2022 Nheko Contributors
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QMenuBar>
|
||||
|
||||
class MacHelper
|
||||
{
|
||||
public:
|
||||
static void showEmojiWindow();
|
||||
static void initializeMenus();
|
||||
};
|
|
@ -1,26 +0,0 @@
|
|||
#include "MacHelper.h"
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <QCoreApplication>
|
||||
|
||||
void
|
||||
MacHelper::showEmojiWindow()
|
||||
{
|
||||
NSApplication *theNSApplication = [NSApplication sharedApplication];
|
||||
[theNSApplication orderFrontCharacterPalette:nil];
|
||||
}
|
||||
|
||||
void
|
||||
MacHelper::initializeMenus()
|
||||
{
|
||||
NSApplication *theNSApplication = [NSApplication sharedApplication];
|
||||
|
||||
NSArray<NSMenuItem *> *menus = [theNSApplication mainMenu].itemArray;
|
||||
NSUInteger size = menus.count;
|
||||
for (NSUInteger i = 0; i < size; i++) {
|
||||
NSMenuItem *item = [menus objectAtIndex:i];
|
||||
[item setTitle:@"Edit"];
|
||||
}
|
||||
}
|
10
src/main.cpp
10
src/main.cpp
|
@ -31,10 +31,6 @@
|
|||
#include "config/nheko.h"
|
||||
#include "singleapplication.h"
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#include "emoji/MacHelper.h"
|
||||
#endif
|
||||
|
||||
#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC) || defined(Q_OS_WINDOWS))
|
||||
#include <QAbstractEventDispatcher>
|
||||
#include <gst/gst.h>
|
||||
|
@ -343,12 +339,6 @@ main(int argc, char *argv[])
|
|||
QDesktopServices::setUrlHandler(
|
||||
QStringLiteral("matrix"), ChatPage::instance(), "handleMatrixUri");
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
// Temporary solution for the emoji picker until
|
||||
// nheko has a proper menu bar with more functionality.
|
||||
MacHelper::initializeMenus();
|
||||
#endif
|
||||
|
||||
nhlog::ui()->info("starting nheko {}", nheko::version);
|
||||
|
||||
return app.exec();
|
||||
|
|
Loading…
Reference in a new issue