Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-15Use QGuiApplication::primaryScreen() as fallback for Systray::currentScreen()Kevin Ottens
Under Wayland QCursor::pos() is unlikely to give us anything meaningful, so fallback to the primary screen information. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-08-03Always show Settings in the context menu (amends #2164)Michael Schuster
The context menu should allow access to the Settings even when no accounts are configured. Users may specify proxy / startup / update and other settings at any time. This slipped through in #2164. Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-07-23Let context menu open wizard if there are no accountsStephan Beyer
The context menu offers to open the main dialog and the settings even if no accounts are configured. In this case, the main dialog is useless and the settings are probably confusing. Hence, this commit replaces these actions in the context menu by an action to open the wizard (which also opens on left click, so this is the most natural thing to do). Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-21sigh, tooDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21Get a const auto for the FolderMap to iterate overDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21Replaced Qt foreach by C++11 ranged for loopDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-21Properly set syncPause state on Systray creation when account init is doneDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-07-15Make sure the tray icon point is in screen coordinatesKevin Ottens
Previously we were using QCursor::pos() in the Linux case, which is a fair heuristic except it will always be relative to the primary screen and not the current screen. This explains why we had to adjust with the virtual geometry. In the Windows and Mac case we got the position out of QSystemTrayIcon and that one was already relative to the current screen. So now we use QCursor::pos(currentScreen()) which ensures we give the coordinates relatively to the current screen also in the Linux case. Since all platforms are now having that point in the same coordinate system we don't need to mess around with the virtual geometry to compensate. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-07-08Use braced initializer list for returns in Systray::taskbarGeometry()Stephan Beyer
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-07-02Fix #2085 new tray menu.Camila
Update systray behavior and context menu: - left click brings up the new QtQuick based dialogs on all latforms - right click brings up the new QtQuick based dialog on Mac OS only - right click brings up a context menu on all other platforms than Mac OS - "Quit Nextcloud" => "Exit Nextcloud" - Add "Open main dialog" option. Signed-off-by: Camila <hello@camila.codes>
2020-06-26Simplify tray window positioningStephan Beyer
The Qml position setting code is moved to C++, which allowed to get rid of the currentScreenIndex() method (which seemed to be just a detour to pass the screen from C++ to Qml). Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-24Fix SEGV (by circular ownership) at exitStephan Beyer
Commit a12205f322d43476230881192616e47c9cf786ef (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-24Let Systray constructor call its base class constructorStephan Beyer
Although I see no behavioral difference, this is probably a good idea. Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-06-16Port from context properties to singletonsNicolas Fella
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-15Add some debug output for the window placementKevin Ottens
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15Fix crash caused by setting Tray window screen pointer on the QML sideMichael Schuster
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-15Try make taskbar position heuristic more readableKevin Ottens
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15Make the reference point independent of the windowKevin Ottens
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-15Get rid of screenIndexKevin Ottens
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-15Move all the position computation on the C++ sideKevin Ottens
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-15Use TaskBarPosition enum on the QML sideKevin Ottens
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-06-15More simplifications, also transfer of more tray positioning logic to C++ ↵Dominique Fuchs
backend. Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-06-15Major multi monitor improvements and rewrite of tray window positioningDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-06-11Simplify nullptr comparisons where appropriateMichael Schuster
Make the codebase consistent, we already have a lot of implicit pointer comparisons. Exception: Stay explicit on return's, example: return _db != nullptr; Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-03Use default member init when applicableKevin Ottens
This also fixes a couple of warnings at places (out of order init for instance) and a potential bug in the webflow credentials / qtkeychain integration. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-21Fix leak in SystrayStephan Beyer
The member _trayEngine, allocated in the constructor, was leaking. This commit sets the Systray instance as the Qt object tree parent of the _trayEngine to fix the leak. While at it, a few unused header includes have been removed. Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-04-25Merge pull request #1889 from nicolasfella/applicationengineDominique Fuchs
Use QQmlApplicationEngine instead of QQmlEngine
2020-04-15Merge pull request #1880 from nicolasfella/timeoutMichael Schuster
Remove timeout parameter from showMessage
2020-04-14Use LINUX_APPLICATION_IDNicolas Fella
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-03-22Use QQmlApplicationEngineNicolas Fella
This simplifies the code a bit. Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-03-21Remove timeout parameter from showMessageNicolas Fella
It it never set by calling code so the default value of 10000 is used. It is only used in the call to QSystemTrayIcon, which uses 10000 as default value too. Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-03-21Add desktop-entry hint to notificationsNicolas Fella
This allows the notification server to map a notification to the program's desktop file, which allows the server to do extra things. For example KDE Plasma adds the Nextcloud icon to the notification and allows to configure notifications from Nextcloud. This is a standard hint from https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#hints Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-03-01Merge pull request #1744 from nextcloud/qt-traygeometry-workaroundMichael Schuster
Fix wrong window position on some linux DEs - worked around invalid g…
2020-01-21Rewrite of screen selection logic, plus synamic screen selection Window.qmlDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-21Fix also screen selection for different Qt versions and for buggy linux DEsDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-21Fix wrong window position on some linux DEs - worked around invalid ↵Dominique Fuchs
geometry() returned by QT Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-19Introduced Style moduleDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-19Fix crash on start without any accountsDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> (cherry picked from commit 9935606c87ec4818f04c7d7c63d2f4b61187eead) Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-01-16Minor layout adjustmentsDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-15Add App list menu to Tray UIMichael Schuster
- Modify Window.qml and Systray to show the App menu upon clicking the App button on the top-right. Fall back to opening the general URL in case no apps are found. - Introduce a new UserAppsModel in UserModel.cpp to access the fetched server Apps from AccountState (propagated down from the User class). Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-01-14Fix missing trayScreen init in non-OSX clauseDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-14Made tray window positioning HighDPI awareDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-12Show activitylist on initial tray opening when logged inDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-12Removed old account toolboxDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-12Bunch of fixes and optimizations for activityListDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-11Systray now a singleton with instance(), show tray on finished wizardDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-11Added confirmation dialog for account removalDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-11Tray creation timing, account menu reinstantiating on visible changeDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-05Code cleanup regarding context menu. Pause/resume logic implemented. Halfway ↵Dominique Fuchs
through remodeling account menu. Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
2020-01-05Focus and popup improvements for macOSDominique Fuchs
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>