Commit Graph
100 Commits
Author SHA1 Message Date
Camila San 706cfe88d0 Fixes syncing in sub directories.
Signed-off-by: Camila San <hello@camila.codes>
2019-02-04 15:10:29 +01:00
Camila San 653c10be86 Fixes deleting of files in sub folder.
Signed-off-by: Camila San <hello@camila.codes>
2019-01-28 10:59:42 +01:00
Camila San b38b821480 Fix wording.
See PR #1043.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-25 14:07:19 +01:00
Camila San 8499df8a7c Fixes conflicting files.
Signed-off-by: Camila San <hello@camila.codes>
2019-01-24 10:19:40 +01:00
Camila San 80ba3adc33 Does not change the file mode when user touches it.
- Always sync the file but do not change mode.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-22 20:12:04 +01:00
Camila San cd1c5922d1 Fixes syncing of files in sub directories.
- Paths were being set in the wrong way in the local file tree.
- TODO: refactor it. It can be done better.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-22 01:50:44 +01:00
Camila San f746c74bf8 Makes sure to set all files touched by the user to offline.
- After setting to offline, sync it.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-21 00:06:52 +01:00
Camila San 1c1111fb7b Fixes syncing of files in directories.
- Folders that are set to online get their files ignored by the sync
engine.
- Minor change: remove qdebug message from csync.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-17 13:32:27 +01:00
Camila San cd6225d418 Fixes deleting of files in the server.
- Also correctly add calls for syncing in the correct places.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-17 00:36:53 +01:00
Camila San 848993baab Merge branch 'filestreaming-v5' of https://github.com/nextcloud/desktop into filestreaming-v5 2019-01-16 13:27:54 +01:00
Camila San 06b32222a4 Only syncs offline files.
- Checks if files are offline before downloading it.
- Updates last access once syncing is done.
- In vfs_windows calls for syncing only where is needed: openfile,
delete and write (WIP)

Signed-off-by: Camila San <hello@camila.codes>
2019-01-16 01:27:51 +01:00
Camila San 37028c7e19 Only syncs offline files.
- Checks if files are offline before downloading it.
- Updates last access once syncing is done.
- In vfs_windows calls for syncing only where is needed: openfile,
delete and write (WIP)

Signed-off-by: Camila San <hello@camila.codes>
2019-01-15 22:42:17 +01:00
Camila San 3536c55ae4 Fixes syncing files in subfolders.
Signed-off-by: Camila San <hello@camila.codes>
2019-01-15 20:34:14 +01:00
Camila San f337125818 Removes last slash from path to folder.
- Extra slash in the end was causing error when trying to open and read
dir on Windows.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-15 16:15:29 +01:00
Camila San c89d3d97bc To test: fixes wrong file path.
- For the database we needed to use the relative path to the file.
- Fixes path before we do requests to the sync engine.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-14 17:36:06 +01:00
Camila San f848e21768 Do not overwrite the instruction given by FUSE.
- The instruction given by fuse was overwritten with 'new'.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-03 09:48:34 -08:00
Camila San 8ca06ff0ec Fixes crash on the first run.
- SyncJournalDb instance was null when _syncJournalDb variable was
created in SyncWrapper.

Signed-off-by: Camila San <hello@camila.codes>
2019-01-03 06:17:28 -08:00
Camila San b886bb9c15 Uses local discovery method for opening local directory.
Signed-off-by: Camila San <hello@camila.codes>
2018-12-28 17:16:06 +01:00
Camila San 181bbebd6f Fixes check if file gets excluded by _csync_detect_update on Windows.
- The code os commented out because of the changes made to search the
file in the folder.

Signed-off-by: Camila San <hello@camila.codes>
2018-12-24 14:06:54 -08:00
Camila San 98c8fa21c9 Fixes exception "directory or file invalid" on Windows.
- Refactores solution to get file information on Windows.
- Do not update the local tree again after finishing sync.

Signed-off-by: Camila San <hello@camila.codes>
2018-12-24 07:10:09 -08:00
Camila San 6eb4986e11 Replaces Qt::DirectConnection for Qt::QueuedConnection.
- The sync engine needed to run in the main thread not in the FUSE
thread.

Signed-off-by: Camila San <hello@camila.codes>
2018-12-18 06:49:24 -08:00
Camila San c19ecb3c8b Replaces timeout value for ULONG_MAX in discovery remote phase.
Signed-off-by: Camila San <hello@camila.codes>
2018-12-07 15:13:52 +01:00
Camila San 4d8dfae25f Removes logic that cleaned up trail slash in the beginning of the path.
It wasn't necessary.

Signed-off-by: Camila San <hello@camila.codes>
2018-12-07 15:13:28 +01:00
Camila San dbe3b662db Removes repeated call to schedule sync.
Signed-off-by: Camila San <hello@camila.codes>
2018-12-06 14:28:04 +01:00
Camila San 59ed4f3fa7 Checks if current thread can call sync start timer otherwise calls start sync directly.
Signed-off-by: Camila San <hello@camila.codes>
2018-12-02 13:51:43 -08:00
Camila San 6b050b9c50 Checks only for the given filename in the directory when adding file to local tree.
Signed-off-by: Camila San <hello@camila.codes>
2018-12-02 13:48:32 -08:00
Camila San bcb0f2cd62 Adds function to look for file in the folder when adding it the local
file tree.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-26 08:45:20 -08:00
Camila San ff62968cb8 Sets up syncing on fuse for Windows.
- Adds signals for triggering syncing for fuse operations.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-26 08:43:36 -08:00
Camila San d9ca247db3 Uses FolderMan functions to prepare folder for syncing.
And then calls the sync.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-26 08:42:39 -08:00
Camila San 9235c7cc7f Fixes comments in VfsMac.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-26 07:37:24 -08:00
Camila San 3344e18cf0 Adds syncwrapper.cpp to CMakelists.txt for Windows.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-26 07:34:22 -08:00
Camila San 9667421cff Handles release file at path instruction.
- TODO: remote discovery times out leading the sync engine to think that there are new files instead of syncing them correctly.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-25 12:10:23 +01:00
Camila San 8db3b4b790 It checks if path given to local discovery is a directory and then checks for files under it.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-24 22:08:21 +01:00
Camila San 7a842d14ad Uses only signal/slot to connect fuse drive operation to the sync engine.
- Uses QMutex + QWaitCondition to handle requestes to the sync engine.
- Refactores most of the SyncWrapper.
- Defines time out for the remote discoveryphase (TODO).

Signed-off-by: Camila San <hello@camila.codes>
2018-11-22 22:28:50 +01:00
Camila San ea0a49be67 Removes unused QThread for fuse.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-14 22:47:26 +01:00
Camila San 15f7b7641c Comments out the use of time controller local discovery.
- Also call sync engine startSync with a direct connection.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-14 22:47:26 +01:00
Camila San 5f974b91ac Refactores selective sync.
- Integrates sync with currrent FUSE code - still needs fixing.
- Fixes return of getProcessName function by using QString.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 21:41:15 +01:00
Camila San 22ee266f4d Refactores selective sync.
- Integrates sync with currrent FUSE code - still needs fixing.
- Fixes return of getProcessName function by using QString.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 19:05:56 +01:00
Camila San 9fc90a5aeb Fixes libproc.h header missing and file encoding.
UTF-8 should be the deault encoding.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 14:42:06 +01:00
Camila San 363d16d02f Adds update local tree function to SyncEngine.
Also removes unused code for start syncing with fuse.
Now it is using the same StartSync function as before.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 13:38:25 +01:00
Camila San 1fa89d0d76 Removes logic to not queue task if file is not offline.
The filtering out of online files is done in csync now.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 13:38:25 +01:00
Camila San afbaef3f75 Adds update local tree function to SyncWrapper/Folder/SyncEngine/csync.
Fuse -> SyncWrapper -> Folder -> SyncEngine -> csync.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 13:38:19 +01:00
Camila San 144852b023 Adds function to update or insert files in the local file tree.
It uses the same logic used previously to do the local discovery.
This time it process one single file: csync_update_file -> csync_vio_opendir (only to get the handle) ->
csync_vio_read_file (creates csync_file_stat_t) -> csync_walker -> _csync_detect_update.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 12:09:32 +01:00
Camila San 7f147d414e First attempt to use selective sync correctly by skipping local discovery.
It skips local discovery. It uses the information that fuse provides about the local files instead.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 12:09:32 +01:00
Camila San 522068a45f It syncs all files set to OFFLINE.
This version still uses the timer and the usual discovery to sync files to the cache.
Forcing sync is also possible via the UI. Since we still have 0 byte files created in the cache,
the sync engine interprets them as conflict.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 12:09:25 +01:00
Camila San 196ff7d692 Interrupt search for files in path once the path is found in the Fuse drive.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 11:40:33 +01:00
Camila San 5a0b954308 Sets SyncMode and SyncModeDownload for the fuse drive files once the list is retrived.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 11:40:33 +01:00
Camila San 5dfc577347 It checks file syncmode before queueing it for download.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 11:40:33 +01:00
Camila San ed8a9b3d03 Removes option to add more folders to sync.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 11:40:32 +01:00
Camila San b3c07d4b27 Removes unused var in OwncloudSetupWizard::slotAssistantFinished.
Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 11:40:32 +01:00
Camila San 0bca618c08 Allows the adding of only one folder.
FolderMan uses only _currentSyncFolder.

Signed-off-by: Camila San <hello@camila.codes>
2018-11-13 11:40:25 +01:00
Camila San 5335995f0e Skips folder configuration when adding an user.
Signed-off-by: Camila San <hello@camila.codes>
2018-10-11 23:10:56 +02:00
Camila San 189812d05a Fixes header and assert for syncjournaldb instance.
Signed-off-by: Camila San <hello@camila.codes>
2018-10-11 15:51:07 +02:00
Camila San 14c3aeac52 Adds OpenSSL initialization that it was commented out.
Signed-off-by: Camila San <hello@camila.codes>
2018-10-10 16:40:36 +02:00
Camila San 2c922e80a7 Fixes CMake find_package for OpenSSL.
Signed-off-by: Camila San <hello@camila.codes>
2018-10-10 15:51:14 +02:00
Camila San 552c8c703c Fixes header in dokanLib/public.h.
Signed-off-by: Camila San <hello@camila.codes>
2018-10-10 15:49:34 +02:00
Camila San 9d087b920b Inserts ShareDialogStartPage in the correct position in the share dialog.
- With the new UI this had to be adapted.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 20:23:26 +02:00
Camila San 2cd32261a2 Checks if share link exists before settings password.
Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 20:22:37 +02:00
Camila San 8e0398426d Replaces 'more' (3 dots) png icon for svg in buttons of the share
dialog.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 20:21:11 +02:00
Camila San 44865e0107 Adjustes sizes and margins in the share dialog and its widgets.
- Adds TODO's in commented out code.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:57:17 +02:00
Camila San c2c2fe3ce3 Changes Share User/Group widget UI to match the server share UI.
- Display list of permissions in the tool button menu.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:57:17 +02:00
Camila San 25ff932a0b Fixes edit permission on share link for files and folders.
Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:57:17 +02:00
Camila San 5b7970fed7 Updates client.qrc with new icon 'copy' for share link menu options.
Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:57:17 +02:00
Camila San b14aa11c29 Changes share link layout so it looks like the UI on the server.
- Adds icons to Share link and to save password on share dialog.
- Changes wording of the menu options for sharing link.
- Adds functionality to the new menu (mostly permissions).
- More widget size and size policy adjustments.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:57:16 +02:00
Camila San a19904657a Switches order of widgets in share dialog: share link comes first.
- First text input to search for users,then share link and then the list
of users.
- Adjusts size and scroll bar for sharees list.
- Adds option 'can share' to 3 dots menu in share user/group widget.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:52:28 +02:00
Camila San 7aff1e27c0 Fixes share users/groups widget.
- Existing sharees where not being displayed.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:52:28 +02:00
Camila San 55b0b46bb6 Changes size, size policy, content and margins of the share dialog and its widgets.
- Adds select with permissions to share dialog on the user/group search.
- Changes order of widgets, removes excess of text and do not display empty widgets.
- Share user/group widget: replaces combo box for tool button with permissions.
- Using Fixed as size policy it gives a much smoother user experience
when windows size dinamically changes.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:52:27 +02:00
Camila San 4ecfab4bf3 Improves share dialog.
- Removes the tabs: adds items to a vertical layout.
- Fix spacing and alignment.
- Removes extra text.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-02 19:48:42 +02:00
Camila San 0ac532f5c9 Fixes crash on mac OS and linux.
- The crash was happening when the user could not connect and it would
crash on trying to retrieve and display the navigation apps.
- Checks AccountStatePtr earlier in the function
slotNavigationAppsFetched.
- Cast of pointer stored in QVariant to QMenu was not done correctly -
qvariant_cast works best for user type defined or QMetaType known to
QVariant.

Signed-off-by: Camila San <hello@camila.codes>
2018-08-01 00:28:25 +02:00
Camila San 32bb1ca449 Aligns copy button to the left in the activity widget.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:11:04 +02:00
Camila San a149660ae9 Enables again alternate row color in the activity list.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:11:04 +02:00
Camila San 524a3d4c6a Returns default icon when no status matches any of the check for SyncFileItem::Status.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:11:04 +02:00
Camila San 90a2d5a3e7 Aligns text correcty when not all text has content in the activity list.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:11:04 +02:00
Camila San 156b4cf284 Aligns time vertically on the bottom of the notification action text when there is no message.
- Minor fix: gives less space for long text that needed ellipses which
was not showing and set right margin because otherwise text was not
painted correctly and completly.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:11:04 +02:00
Camila San ee612bda3a Fixes crash when folder it is not set in the activity list.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:11:03 +02:00
Camila San a1cab471e8 Comments out slotProgressInfo.
- Added TODO.
- It seems to be working only in some cases.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:02 +02:00
Camila San f294cf1b93 Changes icons for errors and warnings in the activity list.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:02 +02:00
Camila San 31892f5337 Changes background color to white for the Activity list widget.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:02 +02:00
Camila San e9dbee0df5 Removes alternate color on the rows of Activity Widget.
- Also fixes the click on each activity: the user had to click twice -
one to select the row and then one click to open file manager or
browser.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:02 +02:00
Camila San 9cbf5aa783 Changes icons for actions in Activity List.
- For folder (open file manager) and close (dismiss
notification).

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:02 +02:00
Camila San 36a73432bc Implements ActivityWidget::slotProgressInfo.
- Attempts to implement slot as it was in the old IssuesWidget.
- It should clean up the activity list when needed -  e.g. when file
conflict was solved.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San b2834e047d Refactores ActivityListModel::removeFromActivityList.
- Fixes crash when dismissing notification - notification was being
removed from the wrong list.
- Minor changes: removes AccountStatePtr where it was needed anymore now
that ActivityListModel has an _accountState, it doesn't need to be
checked for each activity/notification.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San f63434b856 Stores folder in ActivityData.
- The information is needed on ActivityWidget::slotProgressInfo.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 7bc9275a8c Separates types of errors: SyncErrorType and SyncFileItemType.
- This follows what the enums already being used SynResult::Status and
SyncFileItem::Status.
- Do not display buttons for FileErrorTypes - since they are errors on
local syncing, there is nothing to do in the server.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 7b1569df81 Removes static const from activity widget.
- It didn't need to be static.
- It crashed on Windows (Visual Studio 15 2017 Win64).

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San f85825dee4 Adds header and forward declaration of 'QMouseEvent' to ActivityItemDelegate.
To fix compiling for Qt5.7 (drone error).

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 3673603e5a Fixes buttons clickable area in the activities list.
- Their size was not correctly calculated so it was hard to filter the
clicks on the list. User had to click multiple times before clicking on
the right acceptable area.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 9f9be7814c Adjust space between action/buttons in the toolbar.
- Minor: cleans up code used for debug.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 938c99ec42 Fixes and improves 'copy to clipboard' output.
- With the merging of activities and notifications the copy to clipboard
function got broken. Had to put it back as it was before.
- The output text from the clipboard was almost unreadeable. Ajusted the
space between texts and used separator '-' instead of ','.
- Minor: cleans up comments.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 4a6b7854f5 Adds 'Join' string for call notifications.
- Stores object_type from the api response to check if notification is a
call so the primary button text and action is 'Join'.
- Puts strings into consts.
- Minor change: Improves comments on ActivityListModel.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 00effb0e2f Adds 'accept' button for remote share notifications.
- Stores object_type form the api response to check if notification is
remote_share, so the primary button text is 'accept' instead of 'more
information'.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San f0ca5dbded Fix settings dialog for mac.
- Fixes adding/removing accounts with separator in the toolbar -
accounts were not added in the right order and removing was not
including the separator.
- Fixes button sizes in the activities list - the buttons were too small
for the text.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San 11484d5588 Removes Protocol and Issues widget files and references.
- Minor changes:
 - Improves comments and qCWarning  messages
 - Removes commented out code.
 - adds TODO's.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San ab3c6da5d7 Gives full path to file to open in file manager.
- The path to the file wa being stored in the wrong activity property.
It was in the action link when it should be in the file.
- Minor: comments out the display of issues and protocol widget.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San f402b1d9e4 Changes icons for opening in file manager and to dismiss notification.
- The icons used before were not really clear on what their function
was.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:01 +02:00
Camila San ec51428e4d Fixes the url for the button 'more information'.
- The url for the browser was not full path to the file.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:00 +02:00
Camila San 64d635a046 Fixes the color of the font.
- It was too light when the row was selected.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:00 +02:00
Camila San 9de3985021 Small fixes.
- Align progress indicator to the center.
- Moves unused code.
- Removes unused labels.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:00 +02:00
Camila San a9cd3b3a6d Merges errors and protocols into notifications/activities.
- Errors will always be on top, then Notifications comes next and then Activities for last.
- Adds 2 new types of Activity: NotificationType and ErrorType.
- ActivityListModel and ActivityWidget stores AccountState to connect user and widget.

Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:00 +02:00
Camila San d0c72dd642 Makes space smaller bewteen user/activities and network/settings menu.
Signed-off-by: Camila San <hello@camila.codes>
2018-07-30 22:06:00 +02:00