1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-11-26 22:42:44 +01:00
Commit Graph

14674 Commits

Author SHA1 Message Date
Stephan Beyer
08cb289b8c Fix SEGV (by circular ownership) at exit
Commit a12205f322 (PR #1891) introduced
a circular ownership: qmlRegisterSingletonType<Systray>(...) makes the
QQmlEngine own the resulting singleton Systray instance, however, the
QQmlEngine _trayEngine itself is owned by the Systray instance. This
circular ownership results in a crash when the destructor of Systray
calls the destructor of _trayEngine which attempts to call the destructor
of Systray.

This commit solves this problem by making ownCloudGui, which is the
parent of Systray, the parent of the _trayEngine.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-24 13:50:17 +02:00
Stephan Beyer
6adb798728 Let Systray constructor call its base class constructor
Although I see no behavioral difference, this is probably
a good idea.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-24 13:42:26 +02:00
Nextcloud bot
af5acd5142
[tx-robot] updated from transifex 2020-06-24 03:25:43 +00:00
Nextcloud bot
5959a98e29
[tx-robot] updated from transifex 2020-06-23 03:30:12 +00:00
Michael Schuster
902963fa10 Fix issue #2108: Default system proxy not working with Account Wizard
Discovered on Windows in conjunction with PAC scripts:
- Already configured accounts worked
- Fresh client account setup did not work

Reason:
- Proxy was reset over and over again in Account::setCredentials

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-22 11:59:13 +02:00
Kevin Ottens
d5113b5342
Merge pull request #2110 from nextcloud/sbeyer-menu-border-colors
Darken menu border color
2020-06-22 11:58:10 +02:00
Stephan Beyer
3f4ed0883a Make sure the menu separator uses Style.menuBorder color
In case the default color value will ever change, this
commit makes sure that the colors of the menu border and
the menu separator coincide.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-22 06:54:57 +00:00
Stephan Beyer
f671a4b23f Darken menu border color
The lightgray menu border color #ededed introduced in
commit f147e5a66f (by PR #2095)
is way too light for my display (and probably others).
Thus the menus have no clear border which looks odd and broken.

This commit simply darkens the menu border to #bdbdbd, which
coincides with the (current default) color of the menu separator.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-22 06:54:57 +00:00
Nextcloud bot
6f5bf018f6
[tx-robot] updated from transifex 2020-06-22 03:24:14 +00:00
Nextcloud bot
0b5484bfea
[tx-robot] updated from transifex 2020-06-20 03:26:41 +00:00
Michael Schuster
cee8a4ccf6
Merge pull request #2106 from nextcloud/fix/proxy-build-libsync
Fix libsync exports for proxy changes in #1886
2020-06-18 21:24:25 +02:00
Michael Schuster
92c8d6836b
Fix libsync exports for proxy changes in #1886
Build failed on Windows, missing libsync export for printQNetworkProxy after
moving ClientProxy class from gui to libsync.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-18 21:05:11 +02:00
Michael Schuster
1afb70e114
Merge pull request #1886 from nextcloud/enh/proxy
Move the proxyfiles to libsync where they make more sense
2020-06-18 20:38:27 +02:00
Michael Schuster
0253e98041
Improve proxy logging: Log type string instead of abstract ID
The format in the client log was: 3://host:port
Now it is shown like:             HttpProxy://host:port

The old ID display was confusing and misleading users (and people debugging it ;p)

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-18 20:13:57 +02:00
Roeland Jago Douma
50dcab5f88
Move the proxyfiles to libsync where they make more sense
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-18 18:38:06 +02:00
Nextcloud bot
9b9504c860
[tx-robot] updated from transifex 2020-06-18 03:26:43 +00:00
Michael Schuster
56f79eb8b4
Merge pull request #2093 from nicrame/patch-1
Add photothumb.db to sync-exclude.lst
2020-06-18 01:36:00 +02:00
Michael Schuster
93404c6c1b
Merge branch 'master' into patch-1 2020-06-18 00:44:52 +02:00
Kevin Ottens
bc9f7415b6
Merge pull request #2099 from nextcloud/ease_access_to_main_dialog
Ease access to main dialog
2020-06-17 19:25:37 +02:00
Kevin Ottens
2ce1669ceb Bring forward the main systray dialog on second execution
Previously we were showing up the settings dialog but it doesn't quite
make sense anymore now that we got two dialogs.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-17 16:01:49 +00:00
Kevin Ottens
a6873f556b Also show the window on right click
Note this won't work on all platforms. KDE Plasma and GNOME Shell (with
systray extension) assume that right click is necessarily for a context
menu exposed via D-Bus, there's not nice way to make the right click
popup the main dialog on those platforms.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-17 16:01:49 +00:00
Michael Schuster
bb78789300
Merge branch 'master' into patch-1 2020-06-17 17:35:07 +02:00
Nextcloud bot
afac668d9c
[tx-robot] updated from transifex 2020-06-17 03:24:38 +00:00
Kevin Ottens
73a689bc39 Don't call method on potentially null object
We were calling accountState() on a "folder" member which could be
nullptr. In fact this would happen any time one right click on a file
outside of a sync dir under Windows, this thus led to a crash.

Since the capabilities variable was unused anyway, we just removed it.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-16 19:15:53 +02:00
Kevin Ottens
4f7a6cfb1d Make activity items with a link clickable
We then get more items clickable, in particular the bottom one proposing
to open the activity application. Now we can click it and it opens the
activity application straight away.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-16 18:52:20 +02:00
Kevin Ottens
f147e5a66f Don't use a bright blue color for menus
As advised, use a light gray instead, this electric blue was a bit too
much.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-16 18:52:20 +02:00
Kevin Ottens
2096e8295d Don't use a weirdly truncated icon size for header buttons
This led to blurry icons. Now use a fixed size of 32 which also makes
them a bit more pleasing... at least to me. ;-)

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-16 18:52:20 +02:00
Kevin Ottens
bc863584db Don't duplicate file name in the info line
For the "Activity" type activities, displayPath contains the file name
which is also in the subject. This was redundant, so now we don't
display an info line at all for that type of activities.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-16 18:52:20 +02:00
Kevin Ottens
f8e2e3403a Close all menus on window show
We previously missed the app menu which wasn't closed.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-16 18:52:20 +02:00
Nicolas Fella
07bede8a56 Use properties to get user details
Convert imperative QML code to declarative code using property bindings

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-06-16 15:01:37 +02:00
Nicolas Fella
a12205f322 Port from context properties to singletons
Context properties are deprecated and will be removed in Qt 6.
QML singletons are the better option here, especially given that
UserModel and UserAppsModel already are singletons.

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-06-16 14:34:59 +02:00
Nextcloud bot
1157ceafb1
[tx-robot] updated from transifex 2020-06-16 03:26:18 +00:00
Nicolas Fella
be2e5266aa Create HeaderButton QML component
Deduplicate the Button code by moving it into a separate file.

Also use the same background code for the apps button since as far as I can tell it didn't behave any different

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-06-15 20:52:41 +02:00
Kevin Ottens
cf6ac3d14e
Merge pull request #1939 from nextcloud/fix-tray-multiscreen
Major multi monitor improvements and rewrite of tray window positioning
2020-06-15 14:49:35 +02:00
Kevin Ottens
d3d99b2d9d Add some debug output for the window placement
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Michael Schuster
44a9200c5d Fix crash caused by setting Tray window screen pointer on the QML side
Seems like Qt sometimes doesn't like the QML window's screen property to be set
to a C++ (QVariant) pointer value, so we use the index: Qt.application.screens[]

See Qt docs: https://doc.qt.io/qt-5/qml-qtquick-window-window.html#screen-prop

This fix returns the matching window's index from the QGuiApplication::screens()
list to the QML side, instead of the window pointer.

Steps to reproduce the crash with the previous code:
- Open the Tray menu and close it a few times,
  or scroll randomly up and down in its activity list.

Tested with Qt 5.12.5

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-15 12:32:25 +00:00
Michael Schuster
5055f526c2 Remove Submodule qtmacgoodies again
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-15 12:32:25 +00:00
Kevin Ottens
f15a9cfc82 Try make taskbar position heuristic more readable
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Kevin Ottens
5848a1575b Make the reference point independent of the window
This leads to simplifying the computation code quite a bit as well.
Indeed we're separating concern between what is window size dependent or
not and that shows.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Kevin Ottens
40824dc427 Get rid of screenIndex
This was leading to the same logic being duplicated several times. It's
fine to return the QScreen* on the QML side directly but wrapped into a
QVariant.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Kevin Ottens
6c6dfb15a7 Move all the position computation on the C++ side
The API is just more convenient there, the rect and point types on the
QML side are just pale shadow of their C++ counterparts.

Also improved a bit the constness of the Systray class.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Kevin Ottens
83b36b4ab0 Rename tbOrientation into taskbarOrientation
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Kevin Ottens
aa90237e94 Introduce a screenRect as coordinate space
The top left corner of that screenRect is (0,0) or based on
(virtualX,virtualY) depending on the platform. This leads to easier
reduction in code duplication.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Kevin Ottens
65e8f33ccf Use TaskBarPosition enum on the QML side
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15 12:32:25 +00:00
Dominique Fuchs
a6f918f3c2 More simplifications, also transfer of more tray positioning logic to C++ backend.
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-06-15 12:32:25 +00:00
Dominique Fuchs
f44df7f61a Major multi monitor improvements and rewrite of tray window positioning
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-06-15 12:32:25 +00:00
Nextcloud bot
121e23e322
[tx-robot] updated from transifex 2020-06-15 03:25:35 +00:00
Marcin Wilk
299749681d
Add photothumb.db to sync-exclude.lst
Add photothumb.db file that is thumbnails generated by Photoscape application (generated in every folder with graphic files).
2020-06-14 20:24:10 +02:00
Nextcloud bot
39e8c80116
[tx-robot] updated from transifex 2020-06-14 03:23:26 +00:00
Nextcloud bot
e92d79956f
[tx-robot] updated from transifex 2020-06-12 03:26:31 +00:00