[Pkg-owncloud-commits] [owncloud-client] 15/83: Revert "Set an "active" role for the menubar icon on Mac"
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 5b298abba1fc59f3bde50fa0b99a6ce58e8a442a
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Wed May 21 13:00:20 2014 +0200
Revert "Set an "active" role for the menubar icon on Mac"
Apart from a small mistake in this commit, there seems to be
something else wrong.
This reverts commit 97362cff32cbaec7323a39088eed77efdb43d06d.
---
src/mirall/theme.cpp | 31 +++++++------------------------
src/mirall/theme.h | 1 -
2 files changed, 7 insertions(+), 25 deletions(-)
diff --git a/src/mirall/theme.cpp b/src/mirall/theme.cpp
index 349c3f1..713e07c 100644
--- a/src/mirall/theme.cpp
+++ b/src/mirall/theme.cpp
@@ -16,8 +16,6 @@
#include "version.h"
#include "config.h"
-#include "mirall/utility.h"
-
#include <QtCore>
#ifndef TOKEN_AUTH_ONLY
#include <QtGui>
@@ -127,10 +125,10 @@ QIcon Theme::themeIcon( const QString& name, bool sysTray ) const
icon = QIcon::fromTheme( name );
} else {
QList<int> sizes;
- sizes << 16 << 22 << 32 << 48 << 64 << 128;
+ sizes <<16 << 22 << 32 << 48 << 64 << 128;
foreach (int size, sizes) {
- QString pixmapName = QString::fromLatin1(":/mirall/theme/%3/%1-%2.png").arg(name).arg(size);
- if (QFile::exists(pixmapName.arg(flavor))) {
+ QString pixmapName = QString::fromLatin1(":/mirall/theme/%1/%2-%3.png").arg(flavor).arg(name).arg(size);
+ if (QFile::exists(pixmapName)) {
QPixmap px(pixmapName);
// HACK, get rid of it by supporting FDO icon themes, this is really just emulating ubuntu-mono
if (qgetenv("DESKTOP_SESSION") == "ubuntu") {
@@ -140,10 +138,6 @@ QIcon Theme::themeIcon( const QString& name, bool sysTray ) const
p.drawPixmap(px.rect(), mask, mask.rect());
}
icon.addPixmap(px);
- if (Utility::isMac()) {
- QString selIcon = pixmapName.arg(systrayIconFlavorSelected(_mono));
- icon.addPixmap(QPixmap(selIcon), QIcon::Selected);
- }
}
}
if (icon.isNull()) {
@@ -184,22 +178,11 @@ QString Theme::systrayIconFlavor(bool mono) const
{
QString flavor;
if (mono) {
- if (Utility::isMac()) {
- flavor = QLatin1String("black");
- } else {
- flavor = QLatin1String("white");
- }
- } else {
- flavor = QLatin1String("colored");
- }
- return flavor;
-}
-
-QString Theme::systrayIconFlavorSelected(bool mono) const
-{
- QString flavor;
- if (mono) {
+#ifdef Q_OS_MAC
+ flavor = QLatin1String("black");
+#else
flavor = QLatin1String("white");
+#endif
} else {
flavor = QLatin1String("colored");
}
diff --git a/src/mirall/theme.h b/src/mirall/theme.h
index 8ef6ef0..6e40b9f 100644
--- a/src/mirall/theme.h
+++ b/src/mirall/theme.h
@@ -131,7 +131,6 @@ public:
/** colored, white or black */
QString systrayIconFlavor(bool mono) const;
- QString systrayIconFlavorSelected(bool mono) const;
#ifndef TOKEN_AUTH_ONLY
/**
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list