-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses #1971
- Loading branch information
Daniel Molkentin
committed
Jan 18, 2015
1 parent
91fce3e
commit c2957b0
Showing
4 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ namespace OCC { | |
|
||
ownCloudGui::ownCloudGui(Application *parent) : | ||
QObject(parent), | ||
_tray(0), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
danimo
Contributor
|
||
#if defined(Q_OS_MAC) | ||
_settingsDialog(new SettingsDialogMac(this)), | ||
#else | ||
|
@@ -57,7 +56,7 @@ ownCloudGui::ownCloudGui(Application *parent) : | |
_recentItemsMapper(new QSignalMapper(this)), | ||
_app(parent) | ||
{ | ||
_tray = new Systray(); | ||
_tray = new Systray; | ||
_tray->setParent(this); | ||
|
||
// for the beginning, set the offline icon until the account was verified | ||
|
@@ -237,6 +236,12 @@ void ownCloudGui::slotComputeOverallSyncStatus() | |
if( !_settingsDialog.isNull() ) | ||
_settingsDialog->setGeneralErrors( _startupFails ); | ||
|
||
if (folderMan->isAllPaused()) { | ||
_tray->setIcon(Theme::instance()->syncStateIcon( SyncResult::Paused )); | ||
_tray->setToolTip(tr("Syncing has been paused")); | ||
return; | ||
} | ||
|
||
if( !_startupFails.isEmpty() ) { | ||
trayMessage = _startupFails.join(QLatin1String("\n")); | ||
QIcon statusIcon; | ||
|
@@ -341,6 +346,8 @@ void ownCloudGui::setupContextMenu() | |
_contextMenu->addAction(_actionStatus); | ||
_contextMenu->addMenu(_recentActionsMenu); | ||
_contextMenu->addSeparator(); | ||
_contextMenu->addAction(_actionPause); | ||
_contextMenu->addSeparator(); | ||
} | ||
_contextMenu->addAction(_actionSettings); | ||
if (!Theme::instance()->helpUrl().isEmpty()) { | ||
|
@@ -412,8 +419,13 @@ void ownCloudGui::setupActions() | |
_actionSettings = new QAction(tr("Settings..."), this); | ||
_actionRecent = new QAction(tr("Details..."), this); | ||
_actionRecent->setEnabled( true ); | ||
_actionPause = new QAction("Pause syncing", this); | ||
_actionPause->setEnabled( true ); | ||
_actionPause->setCheckable(true); | ||
_actionPause->setChecked(FolderMan::instance()->isAllPaused()); | ||
|
||
QObject::connect(_actionRecent, SIGNAL(triggered(bool)), SLOT(slotShowSyncProtocol())); | ||
QObject::connect(_actionPause, SIGNAL(triggered(bool)), SLOT(slotSetAllPaused(bool))); | ||
QObject::connect(_actionSettings, SIGNAL(triggered(bool)), SLOT(slotShowSettings())); | ||
_actionHelp = new QAction(tr("Help"), this); | ||
QObject::connect(_actionHelp, SIGNAL(triggered(bool)), SLOT(slotHelp())); | ||
|
@@ -563,7 +575,6 @@ void ownCloudGui::slotShowSyncProtocol() | |
_settingsDialog->showActivityPage(); | ||
} | ||
|
||
|
||
void ownCloudGui::slotShutdown() | ||
{ | ||
// those do delete on close | ||
|
@@ -645,5 +656,11 @@ void ownCloudGui::slotShowShareDialog(const QString &path) | |
w->show(); | ||
} | ||
|
||
void ownCloudGui::slotSetAllPaused(bool paused) | ||
{ | ||
FolderMan::instance()->slotSetAllPaused(paused); | ||
slotComputeOverallSyncStatus(); | ||
} | ||
|
||
|
||
} // end namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why was this removed?