mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-02-25 23:50:45 +01:00
Restart TB base setup
This commit is contained in:
@@ -25,5 +25,7 @@
|
||||
<file>files/icons/new-indicator-star-open.png</file>
|
||||
<file>languages/SysTray-X.el.qm</file>
|
||||
<file>languages/SysTray-X.fr.qm</file>
|
||||
<file>files/restart.sh</file>
|
||||
<file>files/restart.bat</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
1
app/SysTray-X/SysTray-X-app/files/restart.bat
Normal file
1
app/SysTray-X/SysTray-X-app/files/restart.bat
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
app/SysTray-X/SysTray-X-app/files/restart.sh
Executable file
3
app/SysTray-X/SysTray-X-app/files/restart.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#/bin/sh
|
||||
|
||||
|
||||
@@ -237,12 +237,21 @@ void Preferences::displayDebug()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the platform os
|
||||
*/
|
||||
const QString& Preferences::getPlatformOs() const
|
||||
{
|
||||
return m_platform_os;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the platform os
|
||||
*/
|
||||
void Preferences::setPlatformOs( const QString os )
|
||||
{
|
||||
m_platform_os = os;
|
||||
m_platform_os = os;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -141,6 +141,13 @@ class Preferences : public QObject
|
||||
*/
|
||||
void displayDebug();
|
||||
|
||||
/**
|
||||
* @brief getPlatformOs. Get the platform OS.
|
||||
*
|
||||
* @return The platform os.
|
||||
*/
|
||||
const QString& getPlatformOs() const;
|
||||
|
||||
/**
|
||||
* @brief setPlatformOs. Set the platform OS.
|
||||
*
|
||||
|
||||
@@ -674,6 +674,11 @@ void SysTrayX::slotErrorAddOnShutdown()
|
||||
*/
|
||||
slotCloseApp();
|
||||
|
||||
/*
|
||||
* Restart Thunderbird?
|
||||
*/
|
||||
restartThunderbird();
|
||||
|
||||
/*
|
||||
* Let's quit
|
||||
*/
|
||||
@@ -706,6 +711,11 @@ void SysTrayX::slotShutdown()
|
||||
*/
|
||||
emit signalClose();
|
||||
|
||||
/*
|
||||
* Restart Thunderbird?
|
||||
*/
|
||||
restartThunderbird();
|
||||
|
||||
/*
|
||||
* Let's quit
|
||||
*/
|
||||
@@ -725,6 +735,32 @@ void SysTrayX::slotShutdown()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Show the about dialog
|
||||
*/
|
||||
void SysTrayX::restartThunderbird()
|
||||
{
|
||||
QString platform = QGuiApplication::platformName();
|
||||
QString os = m_preferences->getPlatformOs();
|
||||
|
||||
return;
|
||||
|
||||
|
||||
QString app = m_preferences->getCloseApp();
|
||||
QString args = m_preferences->getCloseAppArgs();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList args_list = args.split( ' ', Qt::SkipEmptyParts );
|
||||
#else
|
||||
QStringList args_list = args.split( ' ', QString::SkipEmptyParts );
|
||||
#endif
|
||||
|
||||
if( !app.isEmpty() )
|
||||
{
|
||||
QProcess::startDetached( app, args_list );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Show the about dialog
|
||||
*/
|
||||
|
||||
@@ -97,6 +97,11 @@ class SysTrayX : public QObject
|
||||
*/
|
||||
void resendMailCount();
|
||||
|
||||
/**
|
||||
* @brief restartThunderbird. restart thunderbird.
|
||||
*/
|
||||
void restartThunderbird();
|
||||
|
||||
signals:
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user