mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Polished the ui, stop syncing during user actions.
This commit is contained in:
parent
b7f5b8c2d8
commit
869152424c
8 changed files with 125 additions and 68 deletions
|
@ -122,6 +122,7 @@ void Application::setupSystemTray()
|
|||
void Application::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
|
||||
{
|
||||
if( reason == QSystemTrayIcon::Trigger ) {
|
||||
setAllFolderSyncEnabled( false );
|
||||
// check if there is a mirall.cfg already.
|
||||
if( _owncloudSetup->wizard()->isVisible() ) {
|
||||
_owncloudSetup->wizard()->show();
|
||||
|
@ -136,6 +137,7 @@ void Application::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
|
|||
|
||||
_statusDialog->show();
|
||||
}
|
||||
setAllFolderSyncEnabled( true );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,6 +169,8 @@ void Application::slotReparseConfiguration()
|
|||
|
||||
void Application::slotAddFolder()
|
||||
{
|
||||
setAllFolderSyncEnabled( false );
|
||||
|
||||
_folderWizard->setFolderMap( &_folderMap );
|
||||
|
||||
_folderWizard->restart();
|
||||
|
@ -216,6 +220,7 @@ void Application::slotAddFolder()
|
|||
}
|
||||
else
|
||||
qDebug() << "* Folder wizard cancelled";
|
||||
setAllFolderSyncEnabled( true );
|
||||
}
|
||||
|
||||
void Application::slotRemoveFolder( const QString& alias )
|
||||
|
@ -278,7 +283,9 @@ void Application::slotFetchFolder( const QString& alias )
|
|||
|
||||
void Application::slotConfigure()
|
||||
{
|
||||
setAllFolderSyncEnabled( false );
|
||||
_owncloudSetup->startWizard();
|
||||
setAllFolderSyncEnabled( true );
|
||||
}
|
||||
|
||||
void Application::setupKnownFolders()
|
||||
|
@ -394,6 +401,16 @@ void Application::slotFolderSyncFinished(const SyncResult &result)
|
|||
}
|
||||
}
|
||||
|
||||
void Application::setAllFolderSyncEnabled( bool stat )
|
||||
{
|
||||
if( stat )
|
||||
qDebug() << " ** Enabling folder sync!";
|
||||
else
|
||||
qDebug() << " ** Disabling folder sync!";
|
||||
foreach( Folder *f, _folderMap ) {
|
||||
f->setSyncEnabled( stat );
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Mirall
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ protected slots:
|
|||
|
||||
void slotFolderSyncStarted();
|
||||
void slotFolderSyncFinished(const SyncResult &);
|
||||
void setAllFolderSyncEnabled( bool );
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -16,6 +16,16 @@
|
|||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../mirall.qrc">:/new/mirall/resources/ownCloud-32.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
|
@ -26,7 +36,7 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create a new Owncloud:</string>
|
||||
<string>Create a new ownCloud</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -48,13 +58,19 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Where do you want to create your Owncloud?</string>
|
||||
<string>Where do you want to create your ownCloud?</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QRadioButton" name="createLocalRadioBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>create Owncloud on this computer</string>
|
||||
<string>create ownCloud on this computer</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
|
@ -90,7 +106,7 @@
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">This option installs the Owncloud on this computer. Other people will not be able to access your data.</span></p></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">installs the ownCloud on this computer. Other people will not be able to access your data by default.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
|
@ -107,13 +123,13 @@ p, li { white-space: pre-wrap; }
|
|||
<widget class="QRadioButton" name="createPerFTPRadioBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
<underline>false</underline>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>create Owncloud on my domain</string>
|
||||
<string>create ownCloud on my internet domain</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -140,9 +156,9 @@ p, li { white-space: pre-wrap; }
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">This option installs Owncloud on a domain you control. You need the FTP credentials for installations.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">installs ownCloud on a domain you control. You need the FTP credentials for the installation.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; color:#585858;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">This Owncloud will be visible in the internet.</span></p></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">This ownCloud will be accessible from the internet.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
|
@ -158,7 +174,10 @@ p, li { white-space: pre-wrap; }
|
|||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Domain:</string>
|
||||
<string>&Domain:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>myDomainEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -190,6 +209,8 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../mirall.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Owncloud Settings</string>
|
||||
<string>ownCloud Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
|
@ -90,7 +90,7 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Owncloud</string>
|
||||
<string>ownCloud</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -55,7 +55,10 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Directory alias name:</string>
|
||||
<string>&Directory alias name:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>aliasLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Owncloud Credentials:</string>
|
||||
<string>ownCloud Credentials</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Provide Owncloud Credentials</string>
|
||||
<string>Provide ownCloud Credentials</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
|
@ -58,7 +58,9 @@
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Provide the credentials to your ownCloud Instance. If you do not have credentials yet, quickly open the ownCloud link and finish the setup.</span></p></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Provide the credentials to your ownCloud Instance. </span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; color:#585858;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">If the ownCloud is created this is the admin account of your ownCloud. If you want to connect to an existing ownCloud, provide your account data.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
|
@ -71,12 +73,15 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Owncloud-User:</string>
|
||||
<string>ownCloud-User:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -112,18 +117,15 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>530</width>
|
||||
<height>194</height>
|
||||
<width>568</width>
|
||||
<height>158</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
|
|
@ -134,6 +134,7 @@ void OwncloudSetup::slotInstallOCServer()
|
|||
}
|
||||
args << "--admin-user" << adminUser;
|
||||
args << "--admin-password" << adminPwd;
|
||||
args << "--skip-download";
|
||||
|
||||
runOwncloudAdmin( args );
|
||||
_ocWizard->setField( "OCUrl", QString( "%1/owncloud/").arg(_ocWizard->field("myOCDomain").toString() ));
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create an Owncloud Connection:</string>
|
||||
<string>Create an ownCloud Connection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -48,13 +48,19 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Select the Owncloud you want to connect to:</string>
|
||||
<string>Select the ownCloud you want to connect to</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="QRadioButton" name="connectMyOCRadioBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>connect my Owncloud</string>
|
||||
<string>connect my ownCloud</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
|
@ -84,9 +90,9 @@
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Select this option if you already have an Owncloud instance running on a server to which you have access.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Select this option if you have an ownCloud instance running on a server.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; color:#585858;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Enter the web address of your Owncloud below.</span></p></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Enter the web address of your ownCloud below.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
|
@ -102,7 +108,7 @@ p, li { white-space: pre-wrap; }
|
|||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>URL:</string>
|
||||
<string>ownCloud-URL:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -115,8 +121,14 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<widget class="QRadioButton" name="createNewOCRadioBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>create a new Owncloud</string>
|
||||
<string>create a new ownCloud</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -143,7 +155,7 @@ p, li { white-space: pre-wrap; }
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Select this option if you want to create a new Owncloud either on the local machine or on your server. </span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">Select if you want to create a new ownCloud either on the local machine or on your server. </span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; color:#585858;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#585858;">This wizard will guide you through all neccessary steps.</span></p></body></html></string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue