diff --git a/app/SysTray-X/preferences.cpp b/app/SysTray-X/preferences.cpp
index ae1c5ba..5794c61 100644
--- a/app/SysTray-X/preferences.cpp
+++ b/app/SysTray-X/preferences.cpp
@@ -45,9 +45,6 @@ Preferences::Preferences( QObject *parent ) : QObject( parent )
m_minimize_type = PREF_DEFAULT_MINIMIZE;
m_start_minimized = false;
- m_poll_startup_delay = 60;
- m_poll_interval = 60;
-
m_debug = false;
m_version_major = QLatin1String( APP_VERSION_MAJOR );
@@ -344,58 +341,6 @@ void Preferences::setStartMinimized( bool state )
}
-/*
- * Get the poll startup delay.
- */
-int Preferences::getPollStartupDelay() const
-{
- return m_poll_startup_delay;
-}
-
-
-/*
- * Set the startup poll delay.
- */
-void Preferences::setPollStartupDelay( int val )
-{
- if( m_poll_startup_delay != val )
- {
- m_poll_startup_delay = val;
-
- /*
- * Tell the world the new preference
- */
- emit signalPollStartupDelayChange();
- }
-}
-
-
-/*
- * Get the poll interval.
- */
-int Preferences::getPollInterval() const
-{
- return m_poll_interval;
-}
-
-
-/*
- * Set the startup poll delay.
- */
-void Preferences::setPollInterval( int val )
-{
- if( m_poll_interval != val )
- {
- m_poll_interval = val;
-
- /*
- * Tell the world the new preference
- */
- emit signalPollIntervalChange();
- }
-}
-
-
/*
* Get the debug state.
*/
diff --git a/app/SysTray-X/preferences.h b/app/SysTray-X/preferences.h
index 688306f..4ad304b 100644
--- a/app/SysTray-X/preferences.h
+++ b/app/SysTray-X/preferences.h
@@ -247,34 +247,6 @@ class Preferences : public QObject
*/
void setStartMinimized( bool state );
- /**
- * @brief getPollStartupDelay. Get the poll startup delay.
- *
- * @return The poll startup delay.
- */
- int getPollStartupDelay() const;
-
- /**
- * @brief setPollStartupDelay. Set the poll startup delay.
- *
- * @param The poll startup delay.
- */
- void setPollStartupDelay( int val );
-
- /**
- * @brief getPollInterval. Get the poll interval.
- *
- * @return The poll interval.
- */
- int getPollInterval() const;
-
- /**
- * @brief setPollInterval. Set the poll interval.
- *
- * @param The poll interval.
- */
- void setPollInterval( int val );
-
/**
* @brief getDebug. Get the debug windows state.
*
@@ -361,16 +333,6 @@ class Preferences : public QObject
*/
void signalStartMinimizedChange();
- /**
- * @brief signalPollStartupDelayChange. Signal a poll startup delay change.
- */
- void signalPollStartupDelayChange();
-
- /**
- * @brief signalPollIntervalChange. Signal a poll interval change.
- */
- void signalPollIntervalChange();
-
/**
* @brief signalDebugChange. Signal a debug state change.
*/
@@ -438,16 +400,6 @@ class Preferences : public QObject
*/
bool m_start_minimized;
- /**
- * @brief m_poll_startup_delay. The startup poll delay.
- */
- int m_poll_startup_delay;
-
- /**
- * @brief m_poll_interval. The poll interval.
- */
- int m_poll_interval;
-
/**
* @brief m_debug. Display debug window.
*/
diff --git a/app/SysTray-X/preferences.ui b/app/SysTray-X/preferences.ui
index 5c42016..0b9196b 100644
--- a/app/SysTray-X/preferences.ui
+++ b/app/SysTray-X/preferences.ui
@@ -6,8 +6,8 @@
0
0
- 676
- 313
+ 482
+ 442
@@ -18,55 +18,273 @@
:/files/icons/SysTray-X.png:/files/icons/SysTray-X.png
- -
+
-
+
+
-
+
+
+ Mail notification icon
+
+
+
-
+
+
-
+
+
+ QLayout::SetFixedSize
+
+
-
+
+
+ Blank icon
+
+
+ true
+
+
+ iconTypeGroup
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ QLayout::SetFixedSize
+
+
-
+
+
+ New mail icon
+
+
+ iconTypeGroup
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ QLayout::SetMaximumSize
+
+
-
+
+
+ Custom icon
+
+
+ iconTypeGroup
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Choose
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Number properties
+
+
+
-
+
+
-
+
+
+ Display unread message count
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Text color
+
+
+
+ -
+
+
+ Qt::NoFocus
+
+
+
+
+
+
+
+
+ -
+
+
+ Count type
+
+
+
-
+
+
-
+
+
+ Unread
+
+
+ true
+
+
+ countTypeGroup
+
+
+
+ -
+
+
+ New
+
+
+ countTypeGroup
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 17
+ 13
+
+
+
+
+ -
+
+
+ Display debug window
+
+
+
+
+
+ -
Windows
-
-
-
+
+
-
-
Minimize
-
-
-
-
-
- Default minimize
-
-
- false
-
-
- minimizeTypeGroup
-
-
-
- -
-
-
- Minimize to tray, method 1
-
-
- true
-
-
- minimizeTypeGroup
-
-
-
- -
-
-
- Minimize to tray, method 2
-
-
- minimizeTypeGroup
-
-
+
+
-
+
+
-
+
+
+ Default minimize
+
+
+ false
+
+
+ minimizeTypeGroup
+
+
+
+ -
+
+
+ Minimize to tray, method 1
+
+
+ true
+
+
+ minimizeTypeGroup
+
+
+
+ -
+
+
+ Minimize to tray, method 2
+
+
+ minimizeTypeGroup
+
+
+
+
@@ -80,314 +298,23 @@
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
- Mail notification icon
-
-
-
-
-
-
-
-
-
- QLayout::SetFixedSize
-
-
-
-
-
- Blank icon
-
-
- true
-
-
- iconTypeGroup
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
- QLayout::SetFixedSize
-
-
-
-
-
- New mail icon
-
-
- iconTypeGroup
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
- QLayout::SetMaximumSize
-
-
-
-
-
- Custom icon
-
-
- iconTypeGroup
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Choose
-
-
- false
-
-
-
-
-
-
-
-
-
-
- -
-
-
- Mail actions
-
-
-
-
-
-
-
-
-
- Poll startup delay
-
-
-
- -
-
-
- 1
-
-
- 999
-
-
- 60
-
-
-
- -
-
-
- Poll interval
-
-
-
- -
-
-
- 1
-
-
- 999
-
-
- 60
-
-
-
-
-
-
-
-
- -
-
-
- Number properties
-
-
-
-
-
-
-
-
-
-
-
-
- Display unread message count
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 30
- 37
-
-
-
-
- -
-
-
- Text color
-
-
-
- -
-
-
- Qt::NoFocus
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 31
- 37
-
-
-
-
-
-
- -
-
-
-
-
-
- Message count type:
-
-
-
- -
-
-
-
-
-
- Unread
-
-
- true
-
-
- countTypeGroup
-
-
-
- -
-
-
- New
-
-
- countTypeGroup
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- Display debug window
-
-
-
- -
-
+
-
+
- Qt::Horizontal
+ Qt::Vertical
- 40
- 20
+ 20
+ 197
- -
+
-
Qt::Horizontal
diff --git a/app/SysTray-X/preferencesdialog.cpp b/app/SysTray-X/preferencesdialog.cpp
index 07b8a44..209f4a2 100644
--- a/app/SysTray-X/preferencesdialog.cpp
+++ b/app/SysTray-X/preferencesdialog.cpp
@@ -60,9 +60,9 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi
/*
* Hide the count type for now
*/
- m_ui->countTypeLabel->setVisible(false);
- m_ui->unreadRadioButton->setVisible(false);
- m_ui->newRadioButton->setVisible(false);
+ m_ui->countTypeGroupBox->setVisible(false);
+// m_ui->unreadRadioButton->setVisible(false);
+ // m_ui->newRadioButton->setVisible(false);
/*
* Set defaults
@@ -94,24 +94,6 @@ void PreferencesDialog::setDebug( bool state )
}
-/*
- * Set the poll startup delay
- */
-void PreferencesDialog::setPollStartupDelay( int val )
-{
- m_ui->pollStartupDelaySpinBox->setValue( val );
-}
-
-
-/*
- * Set the poll interval
- */
-void PreferencesDialog::setPollInterval( int val )
-{
- m_ui->pollIntervalSpinBox->setValue( val );
-}
-
-
/*
* Set the minimize type
*/
@@ -226,9 +208,6 @@ void PreferencesDialog::slotAccept()
m_pref->setMinimizeType( static_cast< Preferences::MinimizeType >( m_ui->minimizeTypeGroup->checkedId() ) );
m_pref->setStartMinimized( m_ui->startMinimizedCheckBox->isChecked() );
- m_pref->setPollStartupDelay(m_ui->pollStartupDelaySpinBox->value());
- m_pref->setPollInterval(m_ui->pollIntervalSpinBox->value());
-
m_pref->setShowNumber( m_ui->showNumberCheckBox->isChecked() );
m_pref->setNumberColor( m_number_color );
m_pref->setCountType( static_cast< Preferences::CountType >( m_ui->countTypeGroup->checkedId() ) );
@@ -310,24 +289,6 @@ void PreferencesDialog::slotDebugChange()
}
-/*
- * Handle the poll startup delay change signal
- */
-void PreferencesDialog::slotPollStartupDelayChange()
-{
- setPollStartupDelay( m_pref->getPollStartupDelay() );
-}
-
-
-/*
- * Handle the poll interval change signal
- */
-void PreferencesDialog::slotPollIntervalChange()
-{
- setPollInterval( m_pref->getPollInterval() );
-}
-
-
/*
* Handle the minimize type change signal
*/
diff --git a/app/SysTray-X/preferencesdialog.h b/app/SysTray-X/preferencesdialog.h
index 68b4731..9291f8e 100644
--- a/app/SysTray-X/preferencesdialog.h
+++ b/app/SysTray-X/preferencesdialog.h
@@ -48,20 +48,6 @@ class PreferencesDialog : public QDialog
*/
void setDebug( bool state );
- /**
- * @brief setPollStartupDelay. Set the poll startup delay.
- *
- * @param val The new value.
- */
- void setPollStartupDelay( int val );
-
- /**
- * @brief setPollInterval. Set the poll interval.
- *
- * @param val The new value.
- */
- void setPollInterval( int val );
-
/**
* @brief setMinimizeType. Set the minimize type.
*
@@ -138,16 +124,6 @@ class PreferencesDialog : public QDialog
*/
void slotDebugChange();
- /**
- * @brief slotPollStartupDelayChange. Slot for handling poll startup delay signals.
- */
- void slotPollStartupDelayChange();
-
- /**
- * @brief slotPollIntervalChange. Slot for handling poll interval signals.
- */
- void slotPollIntervalChange();
-
/**
* @brief slotMinimizeTypeChange. Slot for handling minimize type change signals.
*/
diff --git a/app/SysTray-X/systrayx.cpp b/app/SysTray-X/systrayx.cpp
index a697d96..a28914c 100644
--- a/app/SysTray-X/systrayx.cpp
+++ b/app/SysTray-X/systrayx.cpp
@@ -95,8 +95,6 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
connect( m_preferences, &Preferences::signalCountTypeChange, m_pref_dialog, &PreferencesDialog::slotCountTypeChange );
connect( m_preferences, &Preferences::signalMinimizeTypeChange, m_pref_dialog, &PreferencesDialog::slotMinimizeTypeChange );
connect( m_preferences, &Preferences::signalStartMinimizedChange, m_pref_dialog, &PreferencesDialog::slotStartMinimizedChange );
- connect( m_preferences, &Preferences::signalPollStartupDelayChange, m_pref_dialog, &PreferencesDialog::slotPollStartupDelayChange );
- connect( m_preferences, &Preferences::signalPollIntervalChange, m_pref_dialog, &PreferencesDialog::slotPollIntervalChange );
connect( m_preferences, &Preferences::signalDebugChange, m_pref_dialog, &PreferencesDialog::slotDebugChange );
connect( m_preferences, &Preferences::signalIconTypeChange, m_link, &SysTrayXLink::slotIconTypeChange );
@@ -106,8 +104,6 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
connect( m_preferences, &Preferences::signalCountTypeChange, m_link, &SysTrayXLink::slotCountTypeChange );
connect( m_preferences, &Preferences::signalMinimizeTypeChange, m_link, &SysTrayXLink::slotMinimizeTypeChange );
connect( m_preferences, &Preferences::signalStartMinimizedChange, m_link, &SysTrayXLink::slotStartMinimizedChange );
- connect( m_preferences, &Preferences::signalPollStartupDelayChange, m_link, &SysTrayXLink::slotPollStartupDelayChange );
- connect( m_preferences, &Preferences::signalPollIntervalChange, m_link, &SysTrayXLink::slotPollIntervalChange );
connect( m_preferences, &Preferences::signalDebugChange, m_link, &SysTrayXLink::slotDebugChange );
connect( m_preferences, &Preferences::signalDebugChange, m_debug, &DebugWidget::slotDebugChange );
diff --git a/app/SysTray-X/systrayxlink.cpp b/app/SysTray-X/systrayxlink.cpp
index ce5b2d2..a20595f 100644
--- a/app/SysTray-X/systrayxlink.cpp
+++ b/app/SysTray-X/systrayxlink.cpp
@@ -504,26 +504,6 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref )
m_pref->setStartMinimized( start_minimized );
}
- if( pref.contains( "pollStartupDelay" ) && pref[ "pollStartupDelay" ].isString() )
- {
- QString poll_startup_delay = pref[ "pollStartupDelay" ].toString();
-
- /*
- * Store the new start minimized state
- */
- m_pref->setPollStartupDelay( poll_startup_delay.toInt() );
- }
-
- if( pref.contains( "pollInterval" ) && pref[ "pollInterval" ].isString() )
- {
- QString poll_interval = pref[ "pollInterval" ].toString();
-
- /*
- * Store the new poll interval
- */
- m_pref->setPollInterval( poll_interval.toInt() );
- }
-
if( pref.contains( "debug" ) && pref[ "debug" ].isString() )
{
bool debug = pref[ "debug" ].toString() == "true";
@@ -546,8 +526,6 @@ void SysTrayXLink::EncodePreferences( const Preferences& pref )
*/
QJsonObject prefObject;
prefObject.insert("debug", QJsonValue::fromVariant( QString( pref.getDebug() ? "true" : "false" ) ) );
- prefObject.insert("pollStartupDelay", QJsonValue::fromVariant( QString::number( pref.getPollStartupDelay() ) ) );
- prefObject.insert("pollInterval", QJsonValue::fromVariant( QString::number( pref.getPollInterval() ) ) );
prefObject.insert("minimizeType", QJsonValue::fromVariant( QString::number( pref.getMinimizeType() ) ) );
prefObject.insert("startMinimized", QJsonValue::fromVariant( QString( pref.getStartMinimized() ? "true" : "false" ) ) );
prefObject.insert("iconType", QJsonValue::fromVariant( QString::number( pref.getIconType() ) ) );
@@ -600,30 +578,6 @@ void SysTrayXLink::slotDebugChange()
}
-/*
- * Handle a poll startup delay change signal
- */
-void SysTrayXLink::slotPollStartupDelayChange()
-{
- if( m_pref->getAppPrefChanged() )
- {
- sendPreferences();
- }
-}
-
-
-/*
- * Handle a poll interval change signal
- */
-void SysTrayXLink::slotPollIntervalChange()
-{
- if( m_pref->getAppPrefChanged() )
- {
- sendPreferences();
- }
-}
-
-
/*
* Handle the minimize type change signal
*/
diff --git a/app/SysTray-X/systrayxlink.h b/app/SysTray-X/systrayxlink.h
index abdc4a2..85741b3 100644
--- a/app/SysTray-X/systrayxlink.h
+++ b/app/SysTray-X/systrayxlink.h
@@ -190,16 +190,6 @@ class SysTrayXLink : public QObject
*/
void slotDebugChange();
- /**
- * @brief slotPollStartupDelayChange. Handle a change in poll startup delay.
- */
- void slotPollStartupDelayChange();
-
- /**
- * @brief slotPollIntervalChange. Handle a change in poll interval.
- */
- void slotPollIntervalChange();
-
/**
* @brief slotMinimizeTypeChange. Slot for handling minimize type change signals.
*/