Remove monoIcons-related functionality from theme
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 25 Jan 2023 11:42:47 +0000 (12:42 +0100)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 25 Jan 2023 11:42:47 +0000 (12:42 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/application.cpp
src/gui/application.h
src/libsync/theme.cpp
src/libsync/theme.h

index 3a262a305b6712991cb23af8cf29ce2227eb86b5..907d87facd2a03871d724035e210b1f6004eaecb 100644 (file)
@@ -360,9 +360,6 @@ Application::Application(int &argc, char **argv)
 
     setQuitOnLastWindowClosed(false);
 
-    _theme->setSystrayUseMonoIcons(cfg.monoIcons());
-    connect(_theme, &Theme::systrayUseMonoIconsChanged, this, &Application::slotUseMonoIconsChanged);
-
     // Setting up the gui class will allow tray notifications for the
     // setup that follows, like folder setup
     _gui = new ownCloudGui(this);
@@ -571,11 +568,6 @@ void Application::setupLogging()
     qCInfo(lcApplication) << "Arguments:" << qApp->arguments();
 }
 
-void Application::slotUseMonoIconsChanged(bool)
-{
-    _gui->slotComputeOverallSyncStatus();
-}
-
 void Application::slotParseMessage(const QString &msg, QObject *)
 {
     if (msg.startsWith(QLatin1String("MSG_PARSEOPTIONS:"))) {
index 5bd412077eda40c9fd80a94cbc3472cbd51008a1..67fd836e9471ad8a9f8f7a5dfcbb6bca05ee213d 100644 (file)
@@ -100,7 +100,6 @@ signals:
 protected slots:
     void slotParseMessage(const QString &, QObject *);
     void slotCheckConnection();
-    void slotUseMonoIconsChanged(bool);
     void slotCleanup();
     void slotAccountStateAdded(OCC::AccountState *accountState);
     void slotAccountStateRemoved(OCC::AccountState *accountState);
index caee23bc361e6050b51bc77bd2a6514626c1d155..732bd0948682f7c9fbfa543d2ffecb59c176b33c 100644 (file)
@@ -480,23 +480,6 @@ QString Theme::systrayIconFlavor(bool mono) const
     return flavor;
 }
 
-void Theme::setSystrayUseMonoIcons(bool mono)
-{
-    _mono = mono;
-    emit systrayUseMonoIconsChanged(mono);
-}
-
-bool Theme::systrayUseMonoIcons() const
-{
-    return _mono;
-}
-
-bool Theme::monoIconsAvailable() const
-{
-    QString themeDir = QString(Theme::themePrefix) + QString::fromLatin1("%1/").arg(Theme::instance()->systrayIconFlavor(true));
-    return QDir(themeDir).exists();
-}
-
 QString Theme::updateCheckUrl() const
 {
     return APPLICATION_UPDATE_URL;
index de721f71c273a5e8f94f84e6fa5a383e8226d663..7c6e42ba37a1b3bf76ef5febd46ae3c57d3c7519 100644 (file)
@@ -340,21 +340,6 @@ public:
      */
     virtual QString aboutDetails() const;
 
-    /**
-     * Define if the systray icons should be using mono design
-     */
-    void setSystrayUseMonoIcons(bool mono);
-
-    /**
-     * Retrieve wether to use mono icons for systray
-     */
-    bool systrayUseMonoIcons() const;
-
-    /**
-     * Check if mono icons are available
-     */
-    bool monoIconsAvailable() const;
-
     /**
      * @brief Where to check for new Updates.
      */
@@ -612,7 +597,6 @@ protected:
     Theme();
 
 signals:
-    void systrayUseMonoIconsChanged(bool);
     void systemPaletteChanged(const QPalette &palette);
     void darkModeChanged();
     void overrideServerUrlChanged();