gui: Settings dialog improvements and small logic change
!!! The real directory for the folder is now composed <PATH>/<shared-folder-name> !!!
In initial stage when there are no settings:
+ if FileDialog aborted, selected $HOME/ChronoShare as a base directory
+ if invalid folder specified, ask question again until aborted to valid
folder selected
At later stages:
+ if aborted, just exit
+ if the same folder selected, just exit
+ if invalid folder selected, ask again until valid folder selected or aborted
+ if different valid folder is selected, restart FsWatcher and Dispatcher for new location
For either stage:
+ if username or folder name not specified, don't hide/save settings.
Keep it until something is specified
+ if username or folder name changed, restart FsWatcher and Dispatcher
with new parameters
Change-Id: I19c34cb91f7375f88347542abe30b85a1c5d6d3f
diff --git a/gui/chronosharegui.h b/gui/chronosharegui.h
index fffaca7..c56baa5 100644
--- a/gui/chronosharegui.h
+++ b/gui/chronosharegui.h
@@ -112,9 +112,9 @@
// capture close event
void closeEvent(QCloseEvent* event);
- // starts fs watcher and dispatcher
+ // starts/restarts fs watcher and dispatcher
void
- startBackend();
+ startBackend(bool restart=false);
private:
QSystemTrayIcon* m_trayIcon; // tray icon