Kevin Ottens [Thu, 22 Oct 2020 10:39:40 +0000 (12:39 +0200)]
Ensure we quickly show/hide the systray window on startup
This is quick enough that no flickering should appear in practice.
We end up doing this because for some reason on Windows (I dug up deep
into the Windows QPA without nailing it down) not showing that systray
window at least once prevents the app object to return from exec() when
the session ends.
It's as if that window would be in some limbo state (neither opened nor
closed) which would prevent quitting. Clearly what we're doing here is a
workaround...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 7 Oct 2020 11:23:34 +0000 (13:23 +0200)]
Move the activity action behavior on the C++ side
We better do this before this business logic grows in the QML side and
gets out of control. We'll need finer grained information due to the
conflict handling anyway.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 7 Oct 2020 10:28:31 +0000 (12:28 +0200)]
Repair SettingsDialog::showIssuesList
This was completely disabled code and the connect was gone... So let's
introduce the connect back and have it trigger the main window while
selecting the right user. This way the new activity list is displayed
and since the conflicts are shown at the top this is hopefully obvious
again.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 7 Oct 2020 14:30:43 +0000 (16:30 +0200)]
Move some of the SocketApi conflict handling in a ConflictSolver class
The socket api move and delete commands are not strictly about conflicts
since they also deal with files which couldn't be uploaded for some
other reason. Still the new ConflictSolver could be used in those cases.
This opens the door at reusing that logic in other places.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 7 Oct 2020 15:47:48 +0000 (17:47 +0200)]
Repair the canAddToDir logic
This could only work at the root of the sync folder where the record for
the parent folder would be invalid. Otherwise the negation would be
wrong... assuming you can add a file only if the permission is not
there.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Michael Schuster [Thu, 22 Oct 2020 01:57:29 +0000 (03:57 +0200)]
Delay initialization of SettingsDialog
ownCloudGui::slotShowSettings already got what it takes to create it only when we try to show it for the first time.
This however has some implications:
Pros:
- Only created when needed, while testing saved ca. 20 MB of RAM and got freed again after closing the dialog.
- Since we defaulted to the new Tray UI from 3.0, this is an added bonus for users don't opening the settings.
Cons:
- Resources like the avatar image have to be refetched everytime the dialog is recreated.
This may be desired as well, because it ensures displaying no outdated info (e.g. on connection issues).
Signed-off-by: Michael Schuster <michael@schuster.ms>
Kevin Ottens [Wed, 21 Oct 2020 09:24:06 +0000 (11:24 +0200)]
Get rid of ncBlueHover
Use a similar trick of a semi-transparent rectangle on top when the
mouse area is hovered. This way it will always work whatever is the
background color.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 20 Oct 2020 15:05:57 +0000 (17:05 +0200)]
Don't use depth infinity anymore to get the folders e2ee status
This way we avoid the expensive SQL query on the server at the price of
more round-trips since we're doing the recursive traversal by hand now.
Also it turns out this depth was used for all the other propfind calls
during sync when we want fresher information regarding a folder. This
was very inefficient in all cases and won't happen anymore.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 14 Oct 2020 16:37:34 +0000 (18:37 +0200)]
Inform _emptyShareLinkWidget of linkShareRequiresPassword signals
All the other ShareLinkWidgets process that signal (which allows to
display error messages for instance) but not that one for some reason.
That being said it might need to deal with an enforced password
situation.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Wed, 14 Oct 2020 16:35:12 +0000 (18:35 +0200)]
Emit last to avoid use after delete crash
It turns out the shareDeleted() signal is connected to a function
cleaning up the ShareLinkWidget holding the last shared pointer to the
Share object. Since we use member variables for calling updateFolder()
this would lead to using deleted objects.
Just swap the call and the signal to have everything back in order.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Thu, 8 Oct 2020 15:39:24 +0000 (17:39 +0200)]
Fix the secure lock label aspect
Make sure we got a fixed size for that label. Also ensure that the
pixmap we display there is properly scaled to fit while maintaining the
aspect ratio.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Nicolas Fella [Fri, 9 Oct 2020 22:26:18 +0000 (00:26 +0200)]
Avoid string translation puzzle
Combining translated strings like this makes them hard to translate since the order of words is different between languages.
Use proper placeholder strings instead.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Nicolas Fella [Tue, 21 Jul 2020 11:24:59 +0000 (13:24 +0200)]
Make QML code more declarative by using properties
By using properties and property bindings the QML code gets more declarative rather than imperative, which is considered better.
This patch:
- Introduces a currentUserId property in UserModel that replaces the equivalent Q_INVOKABLE call
- Introduces an avatar property in User that contains the avatar's image provider url without any fallback
- Introduces new image provider urls for fallback images
- Moves the fallback image selection to QML since we want different fallbacks according to where it is used
- Wires up the necessary signals to propagate a changing avatar
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
Kevin Ottens [Thu, 8 Oct 2020 13:58:29 +0000 (15:58 +0200)]
Export the WordList functions
Now that they are used from gui/ they need to be properly exported so
that linking doesn't fail when visibility is activated (only on our
Windows build it seems).
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 6 Oct 2020 15:28:20 +0000 (17:28 +0200)]
Use friendly user agent during webflow2 auth
This way the server displays a less scary string while granting access
from the browser. Also this same string will be used in the "Devices and
sessions" section of the server settings.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 17:20:26 +0000 (19:20 +0200)]
Add dependency on QtGuiPrivate
I'm not a huge fan of using private APIs but QZip is really the API with
the least hassles for our debug archive need. No external dependency and
we know it is generally available and stable despite the lack of
stability promise.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 17:36:25 +0000 (19:36 +0200)]
Expose more of the logger state
It is better to rely on the Logger state to know exactly where we're
logging. Indeed due to the the various ways to impact its state the
config alone might not now where we're logging.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 17:34:46 +0000 (19:34 +0200)]
Make sure --logfile has precedence on config
Since we changed the default in the config file and since log dir had
precedence on log file, the --logfile command line option wasn't doing
anything anymore.
We make sure it has an effect again overriding --logdir or the logDir
config entry.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Mon, 5 Oct 2020 15:48:30 +0000 (17:48 +0200)]
Change the defaults for logging
Turn on the logging by default for everyone. Let's use a log dir within
the config directory of the application and have debug logs expiring
after a day.
This obviously means we'll generate quite some logs but with the
automated compression it shouldn't be too horrible. Obviously that
scales with the amount of files and syncs occurring. In our tests with a
large setup we're around 100 MB for a day worth of logs, this shouldn't
be too much of an issue on today's average desktop/laptop.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Kevin Ottens [Tue, 6 Oct 2020 12:01:53 +0000 (14:01 +0200)]
If askForOptionalPassword is enabled preset a random password
This is the same approach used on the server side. Turns out I quite
like it, this avoids popping up a dialog to the user and since she won't
know the password she'll have to set a new one anyway or disable it.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>