同步主线最新改动
This commit is contained in:
parent
b963314df8
commit
d5a91f113f
|
@ -38,8 +38,9 @@ StatusNotiferScrollArea::StatusNotiferScrollArea(IUKUIPanelPlugin *plugin, QWidg
|
|||
QSettings backup_qsettings(CONFIG_FILE_BACKUP,QSettings::IniFormat);
|
||||
QStringList showAppBackup = backup_qsettings.value("statusnotifier/showApp").toStringList();
|
||||
QStringList hideAppBackup = backup_qsettings.value("statusnotifier/hideApp").toStringList();
|
||||
QStringList fixedAppBackup = backup_qsettings.value("statusnotifier/fixedApp").toStringList();
|
||||
QString alignmentBackup = backup_qsettings.value("statusnotifier/alignment").toString();
|
||||
PluginSettings *settings=m_plugin->settings(); // ~/.config/ukui/panel.conf
|
||||
PluginSettings *settings = m_plugin->settings(); // ~/.config/ukui/panel.conf
|
||||
QStringList allkeys = settings->allKeys();
|
||||
if(!allkeys.contains("showApp")) {
|
||||
settings->setValue("showApp",showAppBackup);
|
||||
|
@ -47,6 +48,18 @@ StatusNotiferScrollArea::StatusNotiferScrollArea(IUKUIPanelPlugin *plugin, QWidg
|
|||
if(!allkeys.contains("hideApp")) {
|
||||
settings->setValue("hideApp",hideAppBackup);
|
||||
}
|
||||
if(!allkeys.contains("fixedApp")) {
|
||||
settings->setValue("fixedApp",fixedAppBackup);
|
||||
}
|
||||
QStringList showApp = settings->value("showApp").toStringList();
|
||||
QStringList hideApp = settings->value("hideApp").toStringList();
|
||||
for(int i=0; i<fixedAppBackup.size(); i++) {
|
||||
QString str = fixedAppBackup.at(i);
|
||||
showApp.removeOne(str);
|
||||
hideApp.removeOne(str);
|
||||
}
|
||||
settings->setValue("showApp",showApp);
|
||||
settings->setValue("hideApp",hideApp);
|
||||
if(!allkeys.contains("alignment")) {
|
||||
settings->setValue("alignment",alignmentBackup);
|
||||
}
|
||||
|
|
|
@ -291,6 +291,16 @@ void UKUITaskWidget::sendSigToKwin()
|
|||
|
||||
}
|
||||
|
||||
void UKUITaskWidget::sendCloseSigToKWin()
|
||||
{
|
||||
QDBusMessage message = QDBusMessage::createSignal("/", "com.ukui.kwin", "panelNotUpdateLayer");
|
||||
QList<QVariant> args;
|
||||
bool flag = true;
|
||||
args.append(flag);
|
||||
message.setArguments(args);
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
}
|
||||
|
||||
void UKUITaskWidget::keepLeave()
|
||||
{
|
||||
if (m_timer->isActive()) {
|
||||
|
@ -304,13 +314,6 @@ void UKUITaskWidget::keepLeave()
|
|||
if(this->isVisible()) {
|
||||
return;
|
||||
}
|
||||
QDBusMessage message = QDBusMessage::createSignal("/", "com.ukui.kwin", "panelNotUpdateLayer");
|
||||
QList<QVariant> args;
|
||||
bool flag = true;
|
||||
args.append(flag);
|
||||
message.setArguments(args);
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
|
||||
}
|
||||
|
||||
void UKUITaskWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
|
@ -372,6 +375,7 @@ void UKUITaskWidget::raiseSdkApplication()
|
|||
WindowManager::activateWindow(m_sdkWindow);
|
||||
}
|
||||
WindowManager::activateWindow(m_sdkWindow);
|
||||
sendCloseSigToKWin();
|
||||
emit windowActived();
|
||||
}
|
||||
|
||||
|
@ -440,6 +444,7 @@ void UKUITaskWidget::closeSdkApplication()
|
|||
{
|
||||
// FIXME: Why there is no such thing in KWindowSystem??
|
||||
WindowManager::closeWindow(m_sdkWindow);
|
||||
sendCloseSigToKWin();
|
||||
}
|
||||
|
||||
void UKUITaskWidget::getSysTransparency()
|
||||
|
|
|
@ -154,7 +154,7 @@ private slots:
|
|||
void keepLeave();
|
||||
|
||||
void sendSigToKwin();
|
||||
|
||||
void sendCloseSigToKWin();
|
||||
|
||||
signals:
|
||||
void dropped(QObject * dragSource, QPoint const & pos);
|
||||
|
|
Loading…
Reference in New Issue