Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
eaea788a
Verified
Commit
eaea788a
authored
1 year ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Use macos define everywhere
parent
7b2d04cd
No related branches found
No related tags found
No related merge requests found
Pipeline
#5474
passed
1 year ago
Stage: sign
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/TrayIcon.cpp
+1
-1
1 addition, 1 deletion
src/TrayIcon.cpp
src/UserSettingsPage.h
+2
-2
2 additions, 2 deletions
src/UserSettingsPage.h
src/main.cpp
+8
-8
8 additions, 8 deletions
src/main.cpp
with
11 additions
and
11 deletions
src/TrayIcon.cpp
+
1
−
1
View file @
eaea788a
...
...
@@ -98,7 +98,7 @@ MsgCountComposedIcon::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State s
TrayIcon
::
TrayIcon
(
const
QString
&
filename
,
QWindow
*
parent
)
:
QSystemTrayIcon
(
parent
)
{
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
#if defined(Q_OS_MAC
OS
) || defined(Q_OS_WIN)
setIcon
(
QIcon
(
filename
));
#else
icon_
=
new
MsgCountComposedIcon
(
filename
);
...
...
This diff is collapsed.
Click to expand it.
src/UserSettingsPage.h
+
2
−
2
View file @
eaea788a
...
...
@@ -465,7 +465,7 @@ class UserSettingsModel : public QAbstractListModel
Theme
,
MobileMode
,
DisableSwipe
,
#ifndef Q_OS_MAC
#ifndef Q_OS_MAC
OS
ScaleFactor
,
#endif
Font
,
...
...
@@ -551,7 +551,7 @@ class UserSettingsModel : public QAbstractListModel
COUNT
,
// hidden for now
AccessToken
,
#ifdef Q_OS_MAC
#ifdef Q_OS_MAC
OS
ScaleFactor
,
#endif
#ifndef NHEKO_DBUS_SYS
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
8
−
8
View file @
eaea788a
...
...
@@ -21,7 +21,7 @@
// in theory we can enable this everywhere, but the header is missing on some of our CI systems and
// it is too much effort to install.
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC
OS
)
#include
<QtGui/qpa/qplatformwindow_p.h>
#endif
...
...
@@ -35,7 +35,7 @@
#include
"Utils.h"
#include
"config/nheko.h"
#if defined(Q_OS_MAC)
#if defined(Q_OS_MAC
OS
)
#include
"emoji/MacHelper.h"
#include
"notifications/Manager.h"
#endif
...
...
@@ -114,7 +114,7 @@ registerSignalHandlers()
#endif
#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC) || defined(Q_OS_WINDOWS))
#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC
OS
) || defined(Q_OS_WINDOWS))
GMainLoop
*
gloop
=
0
;
GThread
*
gthread
=
0
;
...
...
@@ -168,7 +168,7 @@ main(int argc, char *argv[])
// this needs to be after setting the application name. Or how would we find our settings
// file then?
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC
OS
)
if
(
qgetenv
(
"QT_SCALE_FACTOR"
).
size
()
==
0
)
{
float
factor
=
utils
::
scaleFactor
();
...
...
@@ -254,7 +254,7 @@ main(int argc, char *argv[])
if
(
!
singleapp
.
isPrimaryInstance
())
{
auto
token
=
qgetenv
(
"XDG_ACTIVATION_TOKEN"
);
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC
OS
)
// getting a valid activation token on wayland is a bit of a pain, it works most reliably
// when you have an actual window, that has the focus...
auto
waylandApp
=
app
.
nativeInterface
<
QNativeInterface
::
QWaylandApplication
>
();
...
...
@@ -304,7 +304,7 @@ main(int argc, char *argv[])
return
0
;
}
#if !defined(Q_OS_MAC)
#if !defined(Q_OS_MAC
OS
)
app
.
setWindowIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"nheko"
),
QIcon
{
":/logos/nheko.png"
}));
#endif
#ifdef NHEKO_FLATPAK
...
...
@@ -320,7 +320,7 @@ main(int argc, char *argv[])
registerSignalHandlers
();
#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC) || defined(Q_OS_WINDOWS))
#if defined(GSTREAMER_AVAILABLE) && (defined(Q_OS_MAC
OS
) || defined(Q_OS_WINDOWS))
// If the version of Qt we're running in does not use GLib, we need to
// start a GMainLoop so that gstreamer can dispatch events.
const
QMetaObject
*
mo
=
QAbstractEventDispatcher
::
instance
(
qApp
->
thread
())
->
metaObject
();
...
...
@@ -469,7 +469,7 @@ main(int argc, char *argv[])
QDesktopServices
::
setUrlHandler
(
QStringLiteral
(
"matrix"
),
ChatPage
::
instance
(),
"handleMatrixUri"
);
#if defined(Q_OS_MAC)
#if defined(Q_OS_MAC
OS
)
// Temporary solution for the emoji picker until
// nheko has a proper menu bar with more functionality.
MacHelper
::
initializeMenus
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment