Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2013-11-26 06:15:03 +0400
committerDaniel Molkentin <danimo@owncloud.com>2013-11-26 06:15:03 +0400
commit0d85dcdd9e11dd24ae76f90268ba4adf0dc22480 (patch)
treef2e82769666989edecae7ba7bc5be01b8d0f9b7a /src
parent7eddff39e7313a9160eb4d198772a746c21ca255 (diff)
Toggle Settings window when clicking on the icon
This restores the old behavior for every DE but OS X and Ubuntu Unity (which respond to all clicks by opening the menu). Discussed in #896
Diffstat (limited to 'src')
-rw-r--r--src/mirall/owncloudgui.cpp13
-rw-r--r--src/mirall/owncloudgui.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/mirall/owncloudgui.cpp b/src/mirall/owncloudgui.cpp
index 70528b180..76d140ada 100644
--- a/src/mirall/owncloudgui.cpp
+++ b/src/mirall/owncloudgui.cpp
@@ -86,7 +86,12 @@ bool ownCloudGui::checkAccountExists(bool openSettings)
// if account is set up, start the configuration wizard.
if( AccountManager::instance()->account() ) {
if( openSettings ) {
- this->slotSettings();
+ if (_settingsDialog.isNull()) {
+ slotShowSettings();
+ } else {
+ _settingsDialog->close();
+ }
+
}
return true;
} else {
@@ -353,7 +358,7 @@ void ownCloudGui::setupActions()
_actionRecent->setEnabled( true );
QObject::connect(_actionRecent, SIGNAL(triggered(bool)), SLOT(slotShowSyncProtocol()));
- QObject::connect(_actionSettings, SIGNAL(triggered(bool)), SLOT(slotSettings()));
+ QObject::connect(_actionSettings, SIGNAL(triggered(bool)), SLOT(slotShowSettings()));
_actionHelp = new QAction(tr("Help"), this);
QObject::connect(_actionHelp, SIGNAL(triggered(bool)), SLOT(slotHelp()));
_actionQuit = new QAction(tr("Quit %1").arg(Theme::instance()->appNameGUI()), this);
@@ -471,7 +476,7 @@ void ownCloudGui::slotShowGuiMessage(const QString &title, const QString &messag
msgBox->open();
}
-void ownCloudGui::slotSettings()
+void ownCloudGui::slotShowSettings()
{
if (_settingsDialog.isNull()) {
_settingsDialog = new SettingsDialog(this);
@@ -487,7 +492,7 @@ void ownCloudGui::slotSettings()
// open sync protocol widget
void ownCloudGui::slotShowSyncProtocol()
{
- slotSettings(); // FIXME: Show the protocol tab.
+ slotShowSettings(); // FIXME: Show the protocol tab.
_settingsDialog->slotShowProtocol();
}
diff --git a/src/mirall/owncloudgui.h b/src/mirall/owncloudgui.h
index af17d3835..19c4aaff1 100644
--- a/src/mirall/owncloudgui.h
+++ b/src/mirall/owncloudgui.h
@@ -59,7 +59,7 @@ public slots:
void slotShowGuiMessage(const QString &title, const QString &message);
void slotFoldersChanged();
void slotShowSyncProtocol();
- void slotSettings();
+ void slotShowSettings();
void slotShutdown();
void slotSyncStateChange( const QString& alias );
void slotTrayClicked( QSystemTrayIcon::ActivationReason reason );