Move remaining code to app module
There's still some stuff that could potentially go elsewhere but I think it's enough for now.
This commit is contained in:
@@ -42,13 +42,13 @@ SPDX-FileCopyrightText = "2021 Carl Schwan <carlschwan@kde.org>"
|
|||||||
SPDX-License-Identifier = "BSD-2-Clause"
|
SPDX-License-Identifier = "BSD-2-Clause"
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = "src/neochatconfig.kcfg"
|
path = "src/app/neochatconfig.kcfg"
|
||||||
precedence = "aggregate"
|
precedence = "aggregate"
|
||||||
SPDX-FileCopyrightText = "2020-2021 Carl Schwan <carlschwan@kde.org>, Tobias Fella <tobias.fella@kde.org>"
|
SPDX-FileCopyrightText = "2020-2021 Carl Schwan <carlschwan@kde.org>, Tobias Fella <tobias.fella@kde.org>"
|
||||||
SPDX-License-Identifier = "BSD-2-Clause"
|
SPDX-License-Identifier = "BSD-2-Clause"
|
||||||
|
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = "src/neochat.notifyrc"
|
path = "src/app/neochat.notifyrc"
|
||||||
precedence = "aggregate"
|
precedence = "aggregate"
|
||||||
SPDX-FileCopyrightText = "2020 Tobias Fella <tobias.fella@kde.org>"
|
SPDX-FileCopyrightText = "2020 Tobias Fella <tobias.fella@kde.org>"
|
||||||
SPDX-License-Identifier = "BSD-2-Clause"
|
SPDX-License-Identifier = "BSD-2-Clause"
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2020-2021 Carl Schwan <carl@carlschwan.eu>
|
# SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Nicolas Fella <nicolas.fella@gmx.de>
|
|
||||||
# SPDX-FileCopyrightText: 2020-2021 Tobias Fella <tobias.fella@kde.org>
|
|
||||||
# SPDX-License-Identifier: BSD-2-Clause
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT NEOCHAT_FLATPAK AND NOT NEOCHAT_APPIMAGE)
|
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT NEOCHAT_FLATPAK AND NOT NEOCHAT_APPIMAGE)
|
||||||
@@ -12,377 +10,7 @@ add_subdirectory(login)
|
|||||||
add_subdirectory(rooms)
|
add_subdirectory(rooms)
|
||||||
add_subdirectory(timeline)
|
add_subdirectory(timeline)
|
||||||
add_subdirectory(spaces)
|
add_subdirectory(spaces)
|
||||||
|
add_subdirectory(chatbar)
|
||||||
add_subdirectory(settings)
|
add_subdirectory(settings)
|
||||||
add_subdirectory(devtools)
|
add_subdirectory(devtools)
|
||||||
|
add_subdirectory(app)
|
||||||
add_library(neochat STATIC
|
|
||||||
controller.cpp
|
|
||||||
controller.h
|
|
||||||
roommanager.cpp
|
|
||||||
roommanager.h
|
|
||||||
models/userfiltermodel.cpp
|
|
||||||
models/userfiltermodel.h
|
|
||||||
models/userdirectorylistmodel.cpp
|
|
||||||
models/userdirectorylistmodel.h
|
|
||||||
notificationsmanager.cpp
|
|
||||||
notificationsmanager.h
|
|
||||||
blurhash.cpp
|
|
||||||
blurhash.h
|
|
||||||
blurhashimageprovider.cpp
|
|
||||||
blurhashimageprovider.h
|
|
||||||
windowcontroller.cpp
|
|
||||||
windowcontroller.h
|
|
||||||
models/serverlistmodel.cpp
|
|
||||||
models/serverlistmodel.h
|
|
||||||
logger.cpp
|
|
||||||
logger.h
|
|
||||||
jobs/neochatgetcommonroomsjob.cpp
|
|
||||||
jobs/neochatgetcommonroomsjob.h
|
|
||||||
models/notificationsmodel.cpp
|
|
||||||
models/notificationsmodel.h
|
|
||||||
proxycontroller.cpp
|
|
||||||
proxycontroller.h
|
|
||||||
mediamanager.cpp
|
|
||||||
mediamanager.h
|
|
||||||
sharehandler.cpp
|
|
||||||
sharehandler.h
|
|
||||||
foreigntypes.h
|
|
||||||
identityserverhelper.cpp
|
|
||||||
identityserverhelper.h
|
|
||||||
models/commonroomsmodel.cpp
|
|
||||||
models/commonroomsmodel.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set_source_files_properties(qml/TextToSpeechWrapper.qml PROPERTIES
|
|
||||||
QT_QML_SINGLETON_TYPE TRUE
|
|
||||||
)
|
|
||||||
|
|
||||||
set_source_files_properties(qml/OsmLocationPlugin.qml PROPERTIES
|
|
||||||
QT_QML_SINGLETON_TYPE TRUE
|
|
||||||
)
|
|
||||||
|
|
||||||
if(ANDROID OR WIN32)
|
|
||||||
set_source_files_properties(qml/ShareActionStub.qml PROPERTIES
|
|
||||||
QT_QML_SOURCE_TYPENAME ShareAction
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
|
|
||||||
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat
|
|
||||||
QML_FILES
|
|
||||||
qml/Main.qml
|
|
||||||
qml/AccountMenu.qml
|
|
||||||
qml/CollapsedRoomDelegate.qml
|
|
||||||
qml/RoomPage.qml
|
|
||||||
qml/ExploreRoomsPage.qml
|
|
||||||
qml/ManualRoomDialog.qml
|
|
||||||
qml/ExplorerDelegate.qml
|
|
||||||
qml/InviteUserPage.qml
|
|
||||||
qml/ImageEditorPage.qml
|
|
||||||
qml/NeochatMaximizeComponent.qml
|
|
||||||
qml/TypingPane.qml
|
|
||||||
qml/QuickSwitcher.qml
|
|
||||||
qml/HoverActions.qml
|
|
||||||
qml/AttachmentPane.qml
|
|
||||||
qml/QuickFormatBar.qml
|
|
||||||
qml/UserDetailDialog.qml
|
|
||||||
qml/CreateRoomDialog.qml
|
|
||||||
qml/OpenFileDialog.qml
|
|
||||||
qml/KeyVerificationDialog.qml
|
|
||||||
qml/ConfirmLogoutDialog.qml
|
|
||||||
qml/VerificationMessage.qml
|
|
||||||
qml/EmojiItem.qml
|
|
||||||
qml/EmojiRow.qml
|
|
||||||
qml/EmojiSas.qml
|
|
||||||
qml/VerificationCanceled.qml
|
|
||||||
qml/MessageSourceSheet.qml
|
|
||||||
qml/RoomSearchPage.qml
|
|
||||||
qml/RoomPinnedMessagesPage.qml
|
|
||||||
qml/LocationChooser.qml
|
|
||||||
qml/InvitationView.qml
|
|
||||||
qml/AvatarTabButton.qml
|
|
||||||
qml/OsmLocationPlugin.qml
|
|
||||||
qml/TextToSpeechWrapper.qml
|
|
||||||
qml/FullScreenMap.qml
|
|
||||||
qml/LocationsPage.qml
|
|
||||||
qml/LocationMapItem.qml
|
|
||||||
qml/RoomDrawer.qml
|
|
||||||
qml/RoomDrawerPage.qml
|
|
||||||
qml/DirectChatDrawerHeader.qml
|
|
||||||
qml/GroupChatDrawerHeader.qml
|
|
||||||
qml/RoomInformation.qml
|
|
||||||
qml/RoomMedia.qml
|
|
||||||
qml/ChooseRoomDialog.qml
|
|
||||||
qml/RemoveChildDialog.qml
|
|
||||||
qml/QrCodeMaximizeComponent.qml
|
|
||||||
qml/NotificationsView.qml
|
|
||||||
qml/SearchPage.qml
|
|
||||||
qml/ServerComboBox.qml
|
|
||||||
qml/UserSearchPage.qml
|
|
||||||
qml/ManualUserDialog.qml
|
|
||||||
qml/RecommendedSpaceDialog.qml
|
|
||||||
qml/ShareDialog.qml
|
|
||||||
qml/UnlockSSSSDialog.qml
|
|
||||||
qml/QrScannerPage.qml
|
|
||||||
qml/JoinRoomDialog.qml
|
|
||||||
qml/ConfirmUrlDialog.qml
|
|
||||||
qml/AccountSwitchDialog.qml
|
|
||||||
qml/ConfirmLeaveDialog.qml
|
|
||||||
qml/CodeMaximizeComponent.qml
|
|
||||||
qml/EditStateDialog.qml
|
|
||||||
qml/ConsentDialog.qml
|
|
||||||
qml/AskDirectChatConfirmation.qml
|
|
||||||
qml/HoverLinkIndicator.qml
|
|
||||||
qml/AvatarNotification.qml
|
|
||||||
qml/ReasonDialog.qml
|
|
||||||
qml/NewPollDialog.qml
|
|
||||||
DEPENDENCIES
|
|
||||||
QtCore
|
|
||||||
QtQuick
|
|
||||||
IMPORTS
|
|
||||||
org.kde.neochat.libneochat
|
|
||||||
org.kde.neochat.rooms
|
|
||||||
org.kde.neochat.timeline
|
|
||||||
org.kde.neochat.spaces
|
|
||||||
org.kde.neochat.settings
|
|
||||||
org.kde.neochat.devtools
|
|
||||||
org.kde.neochat.login
|
|
||||||
org.kde.neochat.chatbar
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectory(chatbar)
|
|
||||||
|
|
||||||
if(NOT ANDROID AND NOT WIN32)
|
|
||||||
qt_target_qml_sources(neochat QML_FILES
|
|
||||||
qml/ShareAction.qml
|
|
||||||
qml/GlobalMenu.qml
|
|
||||||
qml/EditMenu.qml
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
qt_target_qml_sources(neochat QML_FILES qml/ShareActionStub.qml)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
set_target_properties(neochat PROPERTIES OUTPUT_NAME "neochatlib")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(neochat-app
|
|
||||||
main.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
if(TARGET Qt::WebView)
|
|
||||||
target_link_libraries(neochat-app PUBLIC Qt::WebView)
|
|
||||||
target_compile_definitions(neochat-app PUBLIC -DHAVE_WEBVIEW)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR})
|
|
||||||
|
|
||||||
target_link_libraries(neochat-app PRIVATE
|
|
||||||
neochat
|
|
||||||
)
|
|
||||||
|
|
||||||
ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png)
|
|
||||||
|
|
||||||
target_sources(neochat-app PRIVATE ${NEOCHAT_ICON})
|
|
||||||
|
|
||||||
if(NOT ANDROID)
|
|
||||||
if (NOT WIN32 AND NOT APPLE)
|
|
||||||
target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h)
|
|
||||||
target_link_libraries(neochat PRIVATE KF6::StatusNotifierItem)
|
|
||||||
else()
|
|
||||||
target_sources(neochat PRIVATE trayicon.cpp trayicon.h)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(neochat PUBLIC KF6::WindowSystem)
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT HAIKU)
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_RUNNER)
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_X11=1)
|
|
||||||
target_sources(neochat PRIVATE runner.cpp)
|
|
||||||
|
|
||||||
if (TARGET KUnifiedPush)
|
|
||||||
target_sources(neochat PRIVATE fakerunner.cpp)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_X11=0)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models)
|
|
||||||
target_link_libraries(neochat PRIVATE Settingsplugin Roomsplugin Timelineplugin Spacesplugin Devtoolsplugin Loginplugin chatbarplugin)
|
|
||||||
target_link_libraries(neochat PUBLIC
|
|
||||||
LibNeoChat
|
|
||||||
Timeline
|
|
||||||
Settings
|
|
||||||
Qt::Core
|
|
||||||
Qt::Quick
|
|
||||||
Qt::Qml
|
|
||||||
Qt::Gui
|
|
||||||
Qt::Multimedia
|
|
||||||
Qt::Network
|
|
||||||
Qt::QuickControls2
|
|
||||||
KF6::I18n
|
|
||||||
KF6::Kirigami
|
|
||||||
KF6::Notifications
|
|
||||||
KF6::ConfigCore
|
|
||||||
KF6::ConfigGui
|
|
||||||
KF6::CoreAddons
|
|
||||||
KF6::SonnetCore
|
|
||||||
KF6::IconThemes
|
|
||||||
KF6::ItemModels
|
|
||||||
QuotientQt6
|
|
||||||
Login
|
|
||||||
Rooms
|
|
||||||
Spaces
|
|
||||||
)
|
|
||||||
|
|
||||||
if (TARGET KF6::Crash)
|
|
||||||
target_link_libraries(neochat PUBLIC KF6::Crash)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
kconfig_target_kcfg_file(neochat FILE neochatconfig.kcfg CLASS_NAME NeoChatConfig MUTATORS GENERATE_PROPERTIES DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR SINGLETON GENERATE_MOC QML_REGISTRATION)
|
|
||||||
|
|
||||||
if(NEOCHAT_FLATPAK)
|
|
||||||
target_compile_definitions(neochat PUBLIC NEOCHAT_FLATPAK)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ANDROID)
|
|
||||||
target_sources(neochat PRIVATE notifyrc.qrc)
|
|
||||||
target_link_libraries(neochat PRIVATE Qt::Svg OpenSSL::SSL)
|
|
||||||
if(SQLite3_FOUND)
|
|
||||||
target_link_libraries(neochat-app PRIVATE SQLite::SQLite3)
|
|
||||||
endif()
|
|
||||||
target_sources(neochat-app PRIVATE notifyrc.qrc)
|
|
||||||
target_link_libraries(neochat PUBLIC Qt::Svg OpenSSL::SSL)
|
|
||||||
kirigami_package_breeze_icons(ICONS
|
|
||||||
"arrow-down-symbolic"
|
|
||||||
"arrow-up-symbolic"
|
|
||||||
"arrow-up-double-symbolic"
|
|
||||||
"arrow-left-symbolic"
|
|
||||||
"arrow-right-symbolic"
|
|
||||||
"checkmark"
|
|
||||||
"help-about"
|
|
||||||
"im-user"
|
|
||||||
"im-invisible-user"
|
|
||||||
"im-kick-user"
|
|
||||||
"mail-attachment"
|
|
||||||
"dialog-cancel"
|
|
||||||
"preferences-desktop-emoticons"
|
|
||||||
"preferences-security"
|
|
||||||
"document-open"
|
|
||||||
"document-save"
|
|
||||||
"document-send"
|
|
||||||
"dialog-close"
|
|
||||||
"edit-delete-remove"
|
|
||||||
"code-context"
|
|
||||||
"document-edit"
|
|
||||||
"list-user-add"
|
|
||||||
"list-add-user"
|
|
||||||
"user-others"
|
|
||||||
"media-playback-pause"
|
|
||||||
"media-playback-start"
|
|
||||||
"media-playback-stop"
|
|
||||||
"go-previous"
|
|
||||||
"go-up"
|
|
||||||
"go-down"
|
|
||||||
"list-add"
|
|
||||||
"irc-join-channel"
|
|
||||||
"settings-configure"
|
|
||||||
"configure"
|
|
||||||
"rating"
|
|
||||||
"rating-unrated"
|
|
||||||
"search"
|
|
||||||
"mail-replied-symbolic"
|
|
||||||
"edit-clear"
|
|
||||||
"edit-copy"
|
|
||||||
"gtk-quit"
|
|
||||||
"compass"
|
|
||||||
"computer"
|
|
||||||
"network-connect"
|
|
||||||
"list-remove-user"
|
|
||||||
"org.kde.neochat"
|
|
||||||
"org.kde.neochat.tray"
|
|
||||||
"preferences-system-users"
|
|
||||||
"preferences-desktop-theme-global"
|
|
||||||
"notifications"
|
|
||||||
"notifications-disabled"
|
|
||||||
"audio-volume-high"
|
|
||||||
"audio-volume-muted"
|
|
||||||
"draw-highlight"
|
|
||||||
"zoom-in"
|
|
||||||
"zoom-out"
|
|
||||||
"image-rotate-left-symbolic"
|
|
||||||
"image-rotate-right-symbolic"
|
|
||||||
"channel-secure-symbolic"
|
|
||||||
"download"
|
|
||||||
"smiley"
|
|
||||||
"tools-check-spelling"
|
|
||||||
"username-copy"
|
|
||||||
"system-switch-user"
|
|
||||||
"bookmark-new"
|
|
||||||
"bookmark-remove"
|
|
||||||
"favorite"
|
|
||||||
"window-new"
|
|
||||||
"globe"
|
|
||||||
"visibility"
|
|
||||||
"home"
|
|
||||||
"preferences-desktop-notification"
|
|
||||||
"computer-symbolic"
|
|
||||||
"gps"
|
|
||||||
"system-users-symbolic"
|
|
||||||
"map-flat"
|
|
||||||
"documentinfo"
|
|
||||||
"view-list-details"
|
|
||||||
"go-previous"
|
|
||||||
"mail-forward-symbolic"
|
|
||||||
"dialog-warning-symbolic"
|
|
||||||
"object-rotate-left"
|
|
||||||
"object-rotate-right"
|
|
||||||
"add-subtitle"
|
|
||||||
"security-high"
|
|
||||||
"security-low"
|
|
||||||
"security-low-symbolic"
|
|
||||||
"kde"
|
|
||||||
"list-remove-symbolic"
|
|
||||||
"edit-delete"
|
|
||||||
"user-home-symbolic"
|
|
||||||
"pin-symbolic"
|
|
||||||
"kt-restore-defaults-symbolic"
|
|
||||||
"user-symbolic"
|
|
||||||
|
|
||||||
${KIRIGAMI_ADDONS_ICONS}
|
|
||||||
)
|
|
||||||
ecm_add_android_apk(neochat-app ANDROID_DIR ${CMAKE_SOURCE_DIR}/android)
|
|
||||||
else()
|
|
||||||
target_link_libraries(neochat PUBLIC Qt::Widgets KF6::KIOWidgets)
|
|
||||||
install(FILES neochat.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT ANDROID)
|
|
||||||
set_target_properties(neochat-app PROPERTIES OUTPUT_NAME "neochat")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TARGET KF6::DBusAddons AND NOT WIN32)
|
|
||||||
target_link_libraries(neochat PUBLIC KF6::DBusAddons)
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_KDBUSADDONS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (TARGET KF6::KIOWidgets)
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_KIO)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (TARGET KUnifiedPush)
|
|
||||||
target_compile_definitions(neochat PUBLIC -DHAVE_KUNIFIEDPUSH)
|
|
||||||
target_link_libraries(neochat PUBLIC KUnifiedPush)
|
|
||||||
|
|
||||||
if (NOT ANDROID)
|
|
||||||
configure_file(org.kde.neochat.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
|
|
||||||
install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins)
|
|
||||||
endif()
|
|
||||||
|
|||||||
372
src/app/CMakeLists.txt
Normal file
372
src/app/CMakeLists.txt
Normal file
@@ -0,0 +1,372 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2020-2021 Carl Schwan <carl@carlschwan.eu>
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Nicolas Fella <nicolas.fella@gmx.de>
|
||||||
|
# SPDX-FileCopyrightText: 2020-2021 Tobias Fella <tobias.fella@kde.org>
|
||||||
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
|
add_library(neochat STATIC
|
||||||
|
controller.cpp
|
||||||
|
controller.h
|
||||||
|
roommanager.cpp
|
||||||
|
roommanager.h
|
||||||
|
models/userfiltermodel.cpp
|
||||||
|
models/userfiltermodel.h
|
||||||
|
models/userdirectorylistmodel.cpp
|
||||||
|
models/userdirectorylistmodel.h
|
||||||
|
notificationsmanager.cpp
|
||||||
|
notificationsmanager.h
|
||||||
|
blurhash.cpp
|
||||||
|
blurhash.h
|
||||||
|
blurhashimageprovider.cpp
|
||||||
|
blurhashimageprovider.h
|
||||||
|
windowcontroller.cpp
|
||||||
|
windowcontroller.h
|
||||||
|
models/serverlistmodel.cpp
|
||||||
|
models/serverlistmodel.h
|
||||||
|
logger.cpp
|
||||||
|
logger.h
|
||||||
|
models/notificationsmodel.cpp
|
||||||
|
models/notificationsmodel.h
|
||||||
|
proxycontroller.cpp
|
||||||
|
proxycontroller.h
|
||||||
|
mediamanager.cpp
|
||||||
|
mediamanager.h
|
||||||
|
sharehandler.cpp
|
||||||
|
sharehandler.h
|
||||||
|
foreigntypes.h
|
||||||
|
identityserverhelper.cpp
|
||||||
|
identityserverhelper.h
|
||||||
|
models/commonroomsmodel.cpp
|
||||||
|
models/commonroomsmodel.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set_source_files_properties(qml/TextToSpeechWrapper.qml PROPERTIES
|
||||||
|
QT_QML_SINGLETON_TYPE TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
set_source_files_properties(qml/OsmLocationPlugin.qml PROPERTIES
|
||||||
|
QT_QML_SINGLETON_TYPE TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ANDROID OR WIN32)
|
||||||
|
set_source_files_properties(qml/ShareActionStub.qml PROPERTIES
|
||||||
|
QT_QML_SOURCE_TYPENAME ShareAction
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
|
||||||
|
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat
|
||||||
|
QML_FILES
|
||||||
|
qml/Main.qml
|
||||||
|
qml/AccountMenu.qml
|
||||||
|
qml/CollapsedRoomDelegate.qml
|
||||||
|
qml/RoomPage.qml
|
||||||
|
qml/ExploreRoomsPage.qml
|
||||||
|
qml/ManualRoomDialog.qml
|
||||||
|
qml/ExplorerDelegate.qml
|
||||||
|
qml/InviteUserPage.qml
|
||||||
|
qml/ImageEditorPage.qml
|
||||||
|
qml/NeochatMaximizeComponent.qml
|
||||||
|
qml/TypingPane.qml
|
||||||
|
qml/QuickSwitcher.qml
|
||||||
|
qml/HoverActions.qml
|
||||||
|
qml/AttachmentPane.qml
|
||||||
|
qml/QuickFormatBar.qml
|
||||||
|
qml/UserDetailDialog.qml
|
||||||
|
qml/CreateRoomDialog.qml
|
||||||
|
qml/OpenFileDialog.qml
|
||||||
|
qml/KeyVerificationDialog.qml
|
||||||
|
qml/ConfirmLogoutDialog.qml
|
||||||
|
qml/VerificationMessage.qml
|
||||||
|
qml/EmojiItem.qml
|
||||||
|
qml/EmojiRow.qml
|
||||||
|
qml/EmojiSas.qml
|
||||||
|
qml/VerificationCanceled.qml
|
||||||
|
qml/MessageSourceSheet.qml
|
||||||
|
qml/RoomSearchPage.qml
|
||||||
|
qml/RoomPinnedMessagesPage.qml
|
||||||
|
qml/LocationChooser.qml
|
||||||
|
qml/InvitationView.qml
|
||||||
|
qml/AvatarTabButton.qml
|
||||||
|
qml/OsmLocationPlugin.qml
|
||||||
|
qml/TextToSpeechWrapper.qml
|
||||||
|
qml/FullScreenMap.qml
|
||||||
|
qml/LocationsPage.qml
|
||||||
|
qml/LocationMapItem.qml
|
||||||
|
qml/RoomDrawer.qml
|
||||||
|
qml/RoomDrawerPage.qml
|
||||||
|
qml/DirectChatDrawerHeader.qml
|
||||||
|
qml/GroupChatDrawerHeader.qml
|
||||||
|
qml/RoomInformation.qml
|
||||||
|
qml/RoomMedia.qml
|
||||||
|
qml/ChooseRoomDialog.qml
|
||||||
|
qml/RemoveChildDialog.qml
|
||||||
|
qml/QrCodeMaximizeComponent.qml
|
||||||
|
qml/NotificationsView.qml
|
||||||
|
qml/SearchPage.qml
|
||||||
|
qml/ServerComboBox.qml
|
||||||
|
qml/UserSearchPage.qml
|
||||||
|
qml/ManualUserDialog.qml
|
||||||
|
qml/RecommendedSpaceDialog.qml
|
||||||
|
qml/ShareDialog.qml
|
||||||
|
qml/UnlockSSSSDialog.qml
|
||||||
|
qml/QrScannerPage.qml
|
||||||
|
qml/JoinRoomDialog.qml
|
||||||
|
qml/ConfirmUrlDialog.qml
|
||||||
|
qml/AccountSwitchDialog.qml
|
||||||
|
qml/ConfirmLeaveDialog.qml
|
||||||
|
qml/CodeMaximizeComponent.qml
|
||||||
|
qml/EditStateDialog.qml
|
||||||
|
qml/ConsentDialog.qml
|
||||||
|
qml/AskDirectChatConfirmation.qml
|
||||||
|
qml/HoverLinkIndicator.qml
|
||||||
|
qml/AvatarNotification.qml
|
||||||
|
qml/ReasonDialog.qml
|
||||||
|
qml/NewPollDialog.qml
|
||||||
|
DEPENDENCIES
|
||||||
|
QtCore
|
||||||
|
QtQuick
|
||||||
|
IMPORTS
|
||||||
|
org.kde.neochat.libneochat
|
||||||
|
org.kde.neochat.rooms
|
||||||
|
org.kde.neochat.timeline
|
||||||
|
org.kde.neochat.spaces
|
||||||
|
org.kde.neochat.settings
|
||||||
|
org.kde.neochat.devtools
|
||||||
|
org.kde.neochat.login
|
||||||
|
org.kde.neochat.chatbar
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ANDROID AND NOT WIN32)
|
||||||
|
qt_target_qml_sources(neochat QML_FILES
|
||||||
|
qml/ShareAction.qml
|
||||||
|
qml/GlobalMenu.qml
|
||||||
|
qml/EditMenu.qml
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
qt_target_qml_sources(neochat QML_FILES qml/ShareActionStub.qml)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set_target_properties(neochat PROPERTIES OUTPUT_NAME "neochatlib")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(neochat-app
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
if(TARGET Qt::WebView)
|
||||||
|
target_link_libraries(neochat-app PUBLIC Qt::WebView)
|
||||||
|
target_compile_definitions(neochat-app PUBLIC -DHAVE_WEBVIEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
|
target_link_libraries(neochat-app PRIVATE
|
||||||
|
neochat
|
||||||
|
)
|
||||||
|
|
||||||
|
ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png)
|
||||||
|
|
||||||
|
target_sources(neochat-app PRIVATE ${NEOCHAT_ICON})
|
||||||
|
|
||||||
|
if(NOT ANDROID)
|
||||||
|
if (NOT WIN32 AND NOT APPLE)
|
||||||
|
target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h)
|
||||||
|
target_link_libraries(neochat PRIVATE KF6::StatusNotifierItem)
|
||||||
|
else()
|
||||||
|
target_sources(neochat PRIVATE trayicon.cpp trayicon.h)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(neochat PUBLIC KF6::WindowSystem)
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT HAIKU)
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_RUNNER)
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_X11=1)
|
||||||
|
target_sources(neochat PRIVATE runner.cpp)
|
||||||
|
|
||||||
|
if (TARGET KUnifiedPush)
|
||||||
|
target_sources(neochat PRIVATE fakerunner.cpp)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_X11=0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models)
|
||||||
|
target_link_libraries(neochat PRIVATE Loginplugin Roomsplugin Timelineplugin Spacesplugin Chatbarplugin Settingsplugin Devtoolsplugin)
|
||||||
|
target_link_libraries(neochat PUBLIC
|
||||||
|
LibNeoChat
|
||||||
|
Timeline
|
||||||
|
Settings
|
||||||
|
Qt::Core
|
||||||
|
Qt::Quick
|
||||||
|
Qt::Qml
|
||||||
|
Qt::Gui
|
||||||
|
Qt::Multimedia
|
||||||
|
Qt::Network
|
||||||
|
Qt::QuickControls2
|
||||||
|
KF6::I18n
|
||||||
|
KF6::Kirigami
|
||||||
|
KF6::Notifications
|
||||||
|
KF6::ConfigCore
|
||||||
|
KF6::ConfigGui
|
||||||
|
KF6::CoreAddons
|
||||||
|
KF6::SonnetCore
|
||||||
|
KF6::IconThemes
|
||||||
|
KF6::ItemModels
|
||||||
|
QuotientQt6
|
||||||
|
Login
|
||||||
|
Rooms
|
||||||
|
Spaces
|
||||||
|
)
|
||||||
|
|
||||||
|
if (TARGET KF6::Crash)
|
||||||
|
target_link_libraries(neochat PUBLIC KF6::Crash)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
kconfig_target_kcfg_file(neochat FILE neochatconfig.kcfg CLASS_NAME NeoChatConfig MUTATORS GENERATE_PROPERTIES DEFAULT_VALUE_GETTERS PARENT_IN_CONSTRUCTOR SINGLETON GENERATE_MOC QML_REGISTRATION)
|
||||||
|
|
||||||
|
if(NEOCHAT_FLATPAK)
|
||||||
|
target_compile_definitions(neochat PUBLIC NEOCHAT_FLATPAK)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ANDROID)
|
||||||
|
target_sources(neochat PRIVATE notifyrc.qrc)
|
||||||
|
target_link_libraries(neochat PRIVATE Qt::Svg OpenSSL::SSL)
|
||||||
|
if(SQLite3_FOUND)
|
||||||
|
target_link_libraries(neochat-app PRIVATE SQLite::SQLite3)
|
||||||
|
endif()
|
||||||
|
target_sources(neochat-app PRIVATE notifyrc.qrc)
|
||||||
|
target_link_libraries(neochat PUBLIC Qt::Svg OpenSSL::SSL)
|
||||||
|
kirigami_package_breeze_icons(ICONS
|
||||||
|
"arrow-down-symbolic"
|
||||||
|
"arrow-up-symbolic"
|
||||||
|
"arrow-up-double-symbolic"
|
||||||
|
"arrow-left-symbolic"
|
||||||
|
"arrow-right-symbolic"
|
||||||
|
"checkmark"
|
||||||
|
"help-about"
|
||||||
|
"im-user"
|
||||||
|
"im-invisible-user"
|
||||||
|
"im-kick-user"
|
||||||
|
"mail-attachment"
|
||||||
|
"dialog-cancel"
|
||||||
|
"preferences-desktop-emoticons"
|
||||||
|
"preferences-security"
|
||||||
|
"document-open"
|
||||||
|
"document-save"
|
||||||
|
"document-send"
|
||||||
|
"dialog-close"
|
||||||
|
"edit-delete-remove"
|
||||||
|
"code-context"
|
||||||
|
"document-edit"
|
||||||
|
"list-user-add"
|
||||||
|
"list-add-user"
|
||||||
|
"user-others"
|
||||||
|
"media-playback-pause"
|
||||||
|
"media-playback-start"
|
||||||
|
"media-playback-stop"
|
||||||
|
"go-previous"
|
||||||
|
"go-up"
|
||||||
|
"go-down"
|
||||||
|
"list-add"
|
||||||
|
"irc-join-channel"
|
||||||
|
"settings-configure"
|
||||||
|
"configure"
|
||||||
|
"rating"
|
||||||
|
"rating-unrated"
|
||||||
|
"search"
|
||||||
|
"mail-replied-symbolic"
|
||||||
|
"edit-clear"
|
||||||
|
"edit-copy"
|
||||||
|
"gtk-quit"
|
||||||
|
"compass"
|
||||||
|
"computer"
|
||||||
|
"network-connect"
|
||||||
|
"list-remove-user"
|
||||||
|
"org.kde.neochat"
|
||||||
|
"org.kde.neochat.tray"
|
||||||
|
"preferences-system-users"
|
||||||
|
"preferences-desktop-theme-global"
|
||||||
|
"notifications"
|
||||||
|
"notifications-disabled"
|
||||||
|
"audio-volume-high"
|
||||||
|
"audio-volume-muted"
|
||||||
|
"draw-highlight"
|
||||||
|
"zoom-in"
|
||||||
|
"zoom-out"
|
||||||
|
"image-rotate-left-symbolic"
|
||||||
|
"image-rotate-right-symbolic"
|
||||||
|
"channel-secure-symbolic"
|
||||||
|
"download"
|
||||||
|
"smiley"
|
||||||
|
"tools-check-spelling"
|
||||||
|
"username-copy"
|
||||||
|
"system-switch-user"
|
||||||
|
"bookmark-new"
|
||||||
|
"bookmark-remove"
|
||||||
|
"favorite"
|
||||||
|
"window-new"
|
||||||
|
"globe"
|
||||||
|
"visibility"
|
||||||
|
"home"
|
||||||
|
"preferences-desktop-notification"
|
||||||
|
"computer-symbolic"
|
||||||
|
"gps"
|
||||||
|
"system-users-symbolic"
|
||||||
|
"map-flat"
|
||||||
|
"documentinfo"
|
||||||
|
"view-list-details"
|
||||||
|
"go-previous"
|
||||||
|
"mail-forward-symbolic"
|
||||||
|
"dialog-warning-symbolic"
|
||||||
|
"object-rotate-left"
|
||||||
|
"object-rotate-right"
|
||||||
|
"add-subtitle"
|
||||||
|
"security-high"
|
||||||
|
"security-low"
|
||||||
|
"security-low-symbolic"
|
||||||
|
"kde"
|
||||||
|
"list-remove-symbolic"
|
||||||
|
"edit-delete"
|
||||||
|
"user-home-symbolic"
|
||||||
|
"pin-symbolic"
|
||||||
|
"kt-restore-defaults-symbolic"
|
||||||
|
"user-symbolic"
|
||||||
|
|
||||||
|
${KIRIGAMI_ADDONS_ICONS}
|
||||||
|
)
|
||||||
|
ecm_add_android_apk(neochat-app ANDROID_DIR ${CMAKE_SOURCE_DIR}/android)
|
||||||
|
else()
|
||||||
|
target_link_libraries(neochat PUBLIC Qt::Widgets KF6::KIOWidgets)
|
||||||
|
install(FILES neochat.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ANDROID)
|
||||||
|
set_target_properties(neochat-app PROPERTIES OUTPUT_NAME "neochat")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TARGET KF6::DBusAddons AND NOT WIN32)
|
||||||
|
target_link_libraries(neochat PUBLIC KF6::DBusAddons)
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_KDBUSADDONS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (TARGET KF6::KIOWidgets)
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_KIO)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (TARGET KUnifiedPush)
|
||||||
|
target_compile_definitions(neochat PUBLIC -DHAVE_KUNIFIEDPUSH)
|
||||||
|
target_link_libraries(neochat PUBLIC KUnifiedPush)
|
||||||
|
|
||||||
|
if (NOT ANDROID)
|
||||||
|
configure_file(org.kde.neochat.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
|
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
|
||||||
|
install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins)
|
||||||
|
endif()
|
||||||
@@ -253,32 +253,32 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#ifdef HAVE_KDBUSADDONS
|
#ifdef HAVE_KDBUSADDONS
|
||||||
service.connect(&service,
|
service.connect(&service,
|
||||||
&KDBusService::activateRequested,
|
&KDBusService::activateRequested,
|
||||||
&RoomManager::instance(),
|
&RoomManager::instance(),
|
||||||
[&engine](const QStringList &arguments, const QString &workingDirectory) {
|
[&engine](const QStringList &arguments, const QString &workingDirectory) {
|
||||||
Q_UNUSED(workingDirectory);
|
Q_UNUSED(workingDirectory);
|
||||||
|
|
||||||
QWindow *window = windowFromEngine(&engine);
|
QWindow *window = windowFromEngine(&engine);
|
||||||
KWindowSystem::updateStartupId(window);
|
KWindowSystem::updateStartupId(window);
|
||||||
|
|
||||||
WindowController::instance().showAndRaiseWindow(QString());
|
WindowController::instance().showAndRaiseWindow(QString());
|
||||||
|
|
||||||
// Open matrix uri
|
// Open matrix uri
|
||||||
if (arguments.isEmpty()) {
|
if (arguments.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto args = arguments;
|
auto args = arguments;
|
||||||
args.removeFirst();
|
args.removeFirst();
|
||||||
if (args.length() == 2 && args[0] == "--share"_L1) {
|
if (args.length() == 2 && args[0] == "--share"_L1) {
|
||||||
ShareHandler::instance().setText(args[1]);
|
ShareHandler::instance().setText(args[1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &arg : args) {
|
for (const auto &arg : args) {
|
||||||
RoomManager::instance().resolveResource(arg);
|
RoomManager::instance().resolveResource(arg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
|
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
|
||||||
@@ -317,7 +317,8 @@ void NotificationsManager::doPostInviteNotification(QPointer<NeoChatRoom> room)
|
|||||||
|
|
||||||
const auto acceptAction = notification->addAction(i18nc("@action:button The thing being accepted is an invitation to chat", "Accept"));
|
const auto acceptAction = notification->addAction(i18nc("@action:button The thing being accepted is an invitation to chat", "Accept"));
|
||||||
const auto rejectAction = notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject"));
|
const auto rejectAction = notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject"));
|
||||||
const auto rejectAndIgnoreAction = notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject and Ignore User"));
|
const auto rejectAndIgnoreAction =
|
||||||
|
notification->addAction(i18nc("@action:button The thing being rejected is an invitation to chat", "Reject and Ignore User"));
|
||||||
connect(acceptAction, &KNotificationAction::activated, this, [room, notification]() {
|
connect(acceptAction, &KNotificationAction::activated, this, [room, notification]() {
|
||||||
if (!room) {
|
if (!room) {
|
||||||
return;
|
return;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user