- removed constants.h as not longer needed because of themes.

- tray icons from theme now.
This commit is contained in:
Klaas Freitag 2012-03-15 18:09:00 +01:00
Родитель 1b12e6590f
Коммит 16a9a73ea3
5 изменённых файлов: 16 добавлений и 38 удалений

Просмотреть файл

@ -20,7 +20,6 @@
#include <QDesktopServices>
#include <QSplashScreen>
#include "mirall/constants.h"
#include "mirall/application.h"
#include "mirall/folder.h"
#include "mirall/folderwatcher.h"
@ -106,7 +105,7 @@ Application::Application(int argc, char **argv) :
setupSystemTray();
if( cnt ) {
_tray->setIcon(QIcon::fromTheme(MIRALL_ICON, QIcon( QString( ":/mirall/resources/%1").arg(MIRALL_ICON))));
_tray->setIcon(_theme->folderIcon("owncloud", 24));
}
QTimer::singleShot( 5000, this, SLOT(slotHideSplash()) );
@ -444,11 +443,15 @@ void Application::computeOverallSyncStatus()
}
QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 20 );
if( overallResult.status() == SyncResult::Success ) {
// QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 22 );
// if( overallResult.status() == SyncResult::Success ) {
// Rather display the mirall icon instead of the ok icon.
statusIcon = _theme->applicationIcon( 24 );
}
#ifdef _WIN32
QIcon statusIcon = _theme->applicationIcon( 16 );
#else
QIcon statusIcon = _theme->applicationIcon( 22 );
#endif
// }
_tray->setIcon( statusIcon );

Просмотреть файл

@ -1,24 +0,0 @@
/*
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#ifndef MIRALL_CONSTANTS_H
#define MIRALL_CONSTANTS_H
#define MIRALL_ICON "mirall-32"
#define FOLDER_ICON "folder-favorites"
#define FOLDER_SYNC_ICON "folder-sync"
#define FOLDER_SYNC_ERROR "folder-important"
#define FOLDER_ICON_EMPTY "folder-grey"
#endif

Просмотреть файл

@ -16,7 +16,6 @@
#include <QTimer>
#include <QUrl>
#include "mirall/constants.h"
#include "mirall/folder.h"
#include "mirall/folderwatcher.h"

Просмотреть файл

@ -88,7 +88,7 @@ QString Theme::statusHeaderText( SyncResult::Status status ) const
QIcon Theme::applicationIcon( int size ) const
{
return QIcon::fromTheme( "mirall", QIcon(QString(":mirall/resources/mirall-%1").arg(size) ) );
return QIcon(QString(":mirall/resources/mirall-%1").arg(size));
}
QString Theme::version() const