同步主线改动
This commit is contained in:
parent
8430129551
commit
3cd2f316e6
|
@ -1,6 +1,12 @@
|
|||
time-shutdown (1.1.0.1.0034-ok1ubuntu2) yangtze; urgency=medium
|
||||
|
||||
* 同步主线改动
|
||||
|
||||
-- zhangtianze <zhangtianze@kylinos.cn> Fri, 09 Sep 2022 14:06:07 +0800
|
||||
|
||||
time-shutdown (1.1.0.1.0034-ok1) yangtze; urgency=medium
|
||||
|
||||
* 修改为quilt格式
|
||||
* 同步主线改动
|
||||
|
||||
-- Xie Wei <xiewei@kylinos.cn> Thu, 02 Jun 2022 18:56:21 +0800
|
||||
-- Xie Wei <xiewei@kylinos.cn> Thu, 02 Jun 2022 18:56:21 +0800
|
||||
|
|
|
@ -105,7 +105,9 @@ void TimeShutdownDaemon::threadSlots()
|
|||
int currentMinute = currentTime.minute();
|
||||
int currentHour = currentTime.hour();
|
||||
|
||||
if (m_hour == currentHour && m_minite == currentMinute && currentSecond <= 2) {
|
||||
bool isNeedShutdown = m_gsettings->get("timeshutdown").toBool();
|
||||
|
||||
if (isNeedShutdown && m_hour == currentHour && m_minite == currentMinute && currentSecond <= 2) {
|
||||
if (m_selectWeek.contains(ONLY_ONCE)) {
|
||||
m_gsettings->set("timeshutdown", false);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = \
|
||||
time-shutdown-daemon \
|
||||
time-shutdown \
|
||||
|
||||
time-shutdown-daemon \
|
||||
|
|
|
@ -46,17 +46,41 @@ HEADERS += \
|
|||
verticalscroll60.h \
|
||||
widget.h
|
||||
|
||||
TRANSLATIONS += translations/time-shutdown_zh_CN.ts
|
||||
translation.files += translations/*.qm
|
||||
translation.path = /usr/share/ukui-time-shutdown/
|
||||
target.path = /usr/bin
|
||||
|
||||
TRANSLATIONS += \
|
||||
translations/time-shutdown_bo_CN.ts \
|
||||
translations/time-shutdown_zh_CN.ts
|
||||
|
||||
for (translation, TRANSLATIONS) {
|
||||
translation = $$basename(translation)
|
||||
QM_FILES += $$OUT_PWD/$$replace(translation, \\..*$, .qm)
|
||||
}
|
||||
|
||||
QM_FILES_INSTALL_PATH = /usr/share/ukui-time-shutdown/translations/
|
||||
|
||||
# CONFIG += lrelase not work for qt5.6, add those from lrelease.prf for compatibility
|
||||
qtPrepareTool(QMAKE_LRELEASE, lrelease)
|
||||
lrelease.name = lrelease
|
||||
lrelease.input = TRANSLATIONS
|
||||
lrelease.output = ${QMAKE_FILE_IN_BASE}.qm
|
||||
lrelease.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
|
||||
lrelease.CONFIG = no_link
|
||||
QMAKE_EXTRA_COMPILERS += lrelease
|
||||
PRE_TARGETDEPS += compiler_lrelease_make_all
|
||||
|
||||
qm_files.files += $$QM_FILES
|
||||
qm_files.path = $$QM_FILES_INSTALL_PATH
|
||||
qm_files.CONFIG = no_check_exist
|
||||
|
||||
schemes.files += data/org.ukui.time.shutdown.settings.gschema.xml
|
||||
schemes.path = /usr/share/glib-2.0/schemas/
|
||||
|
||||
target.path = /usr/bin/
|
||||
|
||||
INSTALLS += target schemes translation
|
||||
INSTALLS += target schemes qm_files
|
||||
# Default rules for deployment.
|
||||
DEFINES += QM_FILES_INSTALL_PATH='\\"$${QM_FILES_INSTALL_PATH}\\"'
|
||||
|
||||
DISTFILES += \
|
||||
data/org.ukui.time.shutdown.settings.gschema.xml
|
||||
data/org.ukui.time.shutdown.settings.gschema.xml \
|
||||
translations/time-shutdown_bo_CN.ts \
|
||||
translations/time-shutdown_zh_CN.ts
|
||||
|
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../comboxwidget.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>ཁ་གཏན་ཟློས་ཕྱོད་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../confirmareawidget.cpp" line="35"/>
|
||||
<source>Cancel</source>
|
||||
<translation>མེད་པར་བཟོ་བ་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../confirmareawidget.cpp" line="39"/>
|
||||
<source>Confirm</source>
|
||||
<translation>ངོས་འཛིན་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="76"/>
|
||||
<source>never</source>
|
||||
<translation>གཏན་ནས་མི་དགའ་བ་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="77"/>
|
||||
<source>Only this shutdown</source>
|
||||
<translation>ཐེངས་འདི་ཁ་གཏན་པ་ཡིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="78"/>
|
||||
<source>Everyday</source>
|
||||
<translation>ཉིན་ལྟར་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="79"/>
|
||||
<source>Mon</source>
|
||||
<translation>གཟའ་ཟླ་བ་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="80"/>
|
||||
<source>Tue</source>
|
||||
<translation>གཟའ་མིག་དམར་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="81"/>
|
||||
<source>Wed</source>
|
||||
<translation>གཟའ་ལྷག་པའི་ཉིན་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="82"/>
|
||||
<source>Thu</source>
|
||||
<translation>གཟའ་ཕུར་བུ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="83"/>
|
||||
<source>Fri</source>
|
||||
<translation>གཟའ་པ་སངས་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="84"/>
|
||||
<source>Sat</source>
|
||||
<translation>གཟའ་སྤེན་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="85"/>
|
||||
<source>Sun</source>
|
||||
<translation>གཟའ་ཉི་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="63"/>
|
||||
<source>time-shutdown is already running!</source>
|
||||
<translation>དུས་བཀག་ཁ་བཀག་འཁོར་སྐྱོད་ཟིན་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../timeshowwidget.cpp" line="58"/>
|
||||
<source>hours</source>
|
||||
<translation>དུས་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../timeshowwidget.cpp" line="64"/>
|
||||
<location filename="../widget.cpp" line="124"/>
|
||||
<source>minute</source>
|
||||
<translation>སྐར་མ་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="104"/>
|
||||
<location filename="../widget.cpp" line="224"/>
|
||||
<source>time-shutdown</source>
|
||||
<translation>དུས་བཅད་ཁ་རྒྱག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="122"/>
|
||||
<source>next shutdown</source>
|
||||
<translation>ཐེངས་རྗེས་མའི་ཁ་གཏན་དུས་ཚོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="123"/>
|
||||
<source>hour</source>
|
||||
<translation>ཆུ་ཚོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="522"/>
|
||||
<location filename="../widget.cpp" line="534"/>
|
||||
<source>OK</source>
|
||||
<translation>གཏན་ཁེལ་</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>VerticalScroll_60</name>
|
||||
<message>
|
||||
<location filename="../verticalscroll60.cpp" line="271"/>
|
||||
<source>VerticalScroll_60</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="204"/>
|
||||
<source>Mi&nimize</source>
|
||||
<translation>ཆེས་ཆུང་ཅན་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="207"/>
|
||||
<source>&Restore</source>
|
||||
<translation>ཁ་འབྱེད་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="210"/>
|
||||
<source>&Quit</source>
|
||||
<translation>ཕྱིར་འབུད་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="521"/>
|
||||
<source>no set shutdown</source>
|
||||
<translation>མ་བཙུགས་པའི་ཁ་གཏན་ཟློས་ཕྱོད་</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="533"/>
|
||||
<source>The shutdown time is shorter than the current time</source>
|
||||
<translation>ཁ་གཏན་དུས་ཚོད་མིག་སྔའི་དུས་ཚོད་ལས་ཆུང་།</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Binary file not shown.
|
@ -19,52 +19,52 @@
|
|||
<translation>确认</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="74"/>
|
||||
<location filename="../dropdownmenu.h" line="76"/>
|
||||
<source>never</source>
|
||||
<translation>从不</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="75"/>
|
||||
<location filename="../dropdownmenu.h" line="77"/>
|
||||
<source>Only this shutdown</source>
|
||||
<translation>仅本次关机</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="76"/>
|
||||
<location filename="../dropdownmenu.h" line="78"/>
|
||||
<source>Everyday</source>
|
||||
<translation>每天</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="77"/>
|
||||
<location filename="../dropdownmenu.h" line="79"/>
|
||||
<source>Mon</source>
|
||||
<translation>周一</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="78"/>
|
||||
<location filename="../dropdownmenu.h" line="80"/>
|
||||
<source>Tue</source>
|
||||
<translation>周二</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="79"/>
|
||||
<location filename="../dropdownmenu.h" line="81"/>
|
||||
<source>Wed</source>
|
||||
<translation>周三</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="80"/>
|
||||
<location filename="../dropdownmenu.h" line="82"/>
|
||||
<source>Thu</source>
|
||||
<translation>周四</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="81"/>
|
||||
<location filename="../dropdownmenu.h" line="83"/>
|
||||
<source>Fri</source>
|
||||
<translation>周五</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="82"/>
|
||||
<location filename="../dropdownmenu.h" line="84"/>
|
||||
<source>Sat</source>
|
||||
<translation>周六</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../dropdownmenu.h" line="83"/>
|
||||
<location filename="../dropdownmenu.h" line="85"/>
|
||||
<source>Sun</source>
|
||||
<translation>周日</translation>
|
||||
</message>
|
||||
|
@ -75,26 +75,32 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../timeshowwidget.cpp" line="64"/>
|
||||
<location filename="../widget.cpp" line="123"/>
|
||||
<location filename="../widget.cpp" line="124"/>
|
||||
<source>minute</source>
|
||||
<translation>分</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="103"/>
|
||||
<location filename="../widget.cpp" line="223"/>
|
||||
<location filename="../widget.cpp" line="104"/>
|
||||
<location filename="../widget.cpp" line="224"/>
|
||||
<source>time-shutdown</source>
|
||||
<translation>定时关机</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="121"/>
|
||||
<location filename="../widget.cpp" line="122"/>
|
||||
<source>next shutdown</source>
|
||||
<translation>距离下一次关机时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="122"/>
|
||||
<location filename="../widget.cpp" line="123"/>
|
||||
<source>hour</source>
|
||||
<translation>小时</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="522"/>
|
||||
<location filename="../widget.cpp" line="534"/>
|
||||
<source>OK</source>
|
||||
<translation>确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="63"/>
|
||||
<source>time-shutdown is already running!</source>
|
||||
|
@ -112,33 +118,31 @@
|
|||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="203"/>
|
||||
<location filename="../widget.cpp" line="204"/>
|
||||
<source>Mi&nimize</source>
|
||||
<translation>最小化</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="206"/>
|
||||
<location filename="../widget.cpp" line="207"/>
|
||||
<source>&Restore</source>
|
||||
<translation>打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="209"/>
|
||||
<location filename="../widget.cpp" line="210"/>
|
||||
<source>&Quit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="524"/>
|
||||
<location filename="../widget.cpp" line="533"/>
|
||||
<source>The shutdown time is shorter than the current time</source>
|
||||
<translation>关机时间小于当前时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="518"/>
|
||||
<location filename="../widget.cpp" line="523"/>
|
||||
<source>warning</source>
|
||||
<translation>警告</translation>
|
||||
<translation type="vanished">警告</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.cpp" line="518"/>
|
||||
<location filename="../widget.cpp" line="521"/>
|
||||
<source>no set shutdown</source>
|
||||
<translation>未设置关机频率</translation>
|
||||
</message>
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>Fri</source>
|
||||
<translation>གཟའ་པ་སངས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mon</source>
|
||||
<translation>Mono</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sat</source>
|
||||
<translation>གཟའ་སྤེན་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sun</source>
|
||||
<translation> ཉིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Thu</source>
|
||||
<translation>གཟའ་ཕུར་བུ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Tue</source>
|
||||
<translation>གཟའ་མིག་དམར།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wed</source>
|
||||
<translation>གཟའ་ལྷག་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hour</source>
|
||||
<translation>དུས་ཚོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Only this shutdown</source>
|
||||
<translation>སྒོ་གཏན་ཐེངས་འདི་ཁོ་ན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hours</source>
|
||||
<translation>དུས་ཚོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>never</source>
|
||||
<translation>གཏན་མིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation>མེད་པར་བཟོ་བ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>time-shutdown</source>
|
||||
<translation>དུས་བཅད་སྒོ་གཏན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>minute</source>
|
||||
<translation>སྐར་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm</source>
|
||||
<translation>གཏན་འཁེལ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>time-shutdown is already running!</source>
|
||||
<translation>དུས་བཅད་སྒོ་གཏན་མགོ་བརྩམས་ཟིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>next shutdown</source>
|
||||
<translation>ཐེངས་རྗེས་མའི་དུས་བཅད་སྒོ་གཏན་བར་གྱི་དུས་ཚོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Everyday</source>
|
||||
<translation>ཉིན་རེ་རེ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shutdown</source>
|
||||
<translation>ཁ་རྒྱག</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
<source>&Quit</source>
|
||||
<translation>ཕྱིར་འབུད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>never</source>
|
||||
<translation>གཏན་མིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>no set shutdown</source>
|
||||
<translation>སྒོ་གཏན་ཕྱོད་ལ་སྒྲིག་འགོད་བྱས་མེད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Restore</source>
|
||||
<translation>ཕྱིར་ལོག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mi&nimize</source>
|
||||
<translation>ཆེས་ཆུང་པ་ཅན།(&N)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>warning</source>
|
||||
<translation>ཉེན་བརྡ</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>VerticalScroll_60</name>
|
||||
<message>
|
||||
<source>VerticalScroll_60</source>
|
||||
<translation/>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -52,7 +52,7 @@ Widget::Widget(QWidget *parent)
|
|||
// 初始化当前的托盘栏图标
|
||||
createTrayIcon();
|
||||
|
||||
setIcon(QIcon::fromTheme("kylin-alarm-clock", QIcon("://image/time_shutdown.svg")));
|
||||
setIcon(QIcon::fromTheme("time-shutdown", QIcon("://image/time_shutdown.svg")));
|
||||
|
||||
// 获取保存在gsetting中的定时关机设置状态
|
||||
getTimedShutdownState();
|
||||
|
@ -70,7 +70,7 @@ Widget::Widget(QWidget *parent)
|
|||
initDropDownBoxLabelStatus();
|
||||
this->setAttribute(Qt::WA_TranslucentBackground);
|
||||
this->setWindowState(Qt::WindowNoState);
|
||||
this->setWindowIcon(QIcon::fromTheme("kylin-alarm-clock", QIcon("://image/time_shutdown.svg")));
|
||||
this->setWindowIcon(QIcon::fromTheme("time-shutdown", QIcon("://image/time_shutdown.svg")));
|
||||
QDesktopWidget *pDesk = QApplication::desktop();
|
||||
move((pDesk->width() - this->width()) / 2, (pDesk->height() - this->height()) / 2);
|
||||
}
|
||||
|
@ -85,7 +85,8 @@ void Widget::initTranslation()
|
|||
m_ptranslator = new QTranslator;
|
||||
QTranslator *translator_qt = new QTranslator;
|
||||
//获取系统语言环境 选择翻译文件
|
||||
if (m_ptranslator->load(QLocale(), QLatin1String("time-shutdown"), QLatin1String("_"), QLatin1String("/usr/share/ukui-time-shutdown/")))
|
||||
if (m_ptranslator->load(QLocale(), QLatin1String("time-shutdown"),
|
||||
QLatin1String("_"), QM_FILES_INSTALL_PATH))
|
||||
QApplication::installTranslator(m_ptranslator);
|
||||
else
|
||||
qDebug() << "cannot load translator ukui-time-shutdown" << QLocale::system().name() << ".qm!";
|
||||
|
@ -515,14 +516,28 @@ void Widget::updatedropDownBoxSelectSlots()
|
|||
void Widget::confirmButtonSlots()
|
||||
{
|
||||
if (m_weekSelect[0] == NEVER_SHUTDON) {
|
||||
QMessageBox::warning(NULL, tr("warning"), tr("no set shutdown"), QMessageBox::Ok );
|
||||
QMessageBox *msg = new QMessageBox(this);
|
||||
msg->setIcon(QMessageBox::Warning);
|
||||
msg->setText(tr("no set shutdown"));
|
||||
QPushButton *button = new QPushButton(QObject::tr("OK"));
|
||||
button->setProperty("useButtonPalette", true);
|
||||
msg->addButton(button, QMessageBox::RejectRole);
|
||||
msg->show();
|
||||
// QMessageBox::warning(NULL, tr("warning"), tr("no set shutdown"), QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
|
||||
if (determineShutdownTime()) {
|
||||
QMessageBox::warning(NULL, tr("warning"), \
|
||||
tr("The shutdown time is shorter than the current time"), \
|
||||
QMessageBox::Ok);
|
||||
QMessageBox *msg = new QMessageBox(this);
|
||||
msg->setIcon(QMessageBox::Warning);
|
||||
msg->setText(tr("The shutdown time is shorter than the current time"));
|
||||
QPushButton *button = new QPushButton(QObject::tr("OK"));
|
||||
button->setProperty("useButtonPalette", true);
|
||||
msg->addButton(button, QMessageBox::RejectRole);
|
||||
msg->show();
|
||||
// QMessageBox::warning(NULL, tr("warning"), \
|
||||
// tr("The shutdown time is shorter than the current time"), \
|
||||
// QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -543,7 +558,7 @@ void Widget::confirmButtonSlots()
|
|||
setFrequencyValue(m_selectIndexGsetting);
|
||||
m_pConfirmAreaWidget->m_pConfirmButton->setEnabled(false);
|
||||
m_pConfirmAreaWidget->m_pCancelButton->setEnabled(true);
|
||||
m_pTimeRemainLabel->setVisible(true);
|
||||
setNextShutDownTime();
|
||||
m_pComBoxWidget->setEnabled(false);
|
||||
|
||||
QProcess p(0);
|
||||
|
|
Loading…
Reference in New Issue