diff --git a/saoridef.h b/saoridef.h index afd2e3a..d49177f 100644 --- a/saoridef.h +++ b/saoridef.h @@ -54,7 +54,7 @@ #define SAORI_SETTING_RELOADINT_DEFAULT 5 #define SAORI_SETTING_SHOWENTRIES "application/showentries" #define SAORI_SETTING_SHOWENTRIES_DEFAULT 100 -#define SAORI_SETTING_VIEW "application/view" +#define SAORI_SETTING_VIEW "view" #define SAORI_SETTING_VIEW_PINED "/pined" #define SAORI_SETTING_VIEW_GEOMETRY "/geometry" diff --git a/saoriview.cpp b/saoriview.cpp index 08ccaf4..34814bd 100644 --- a/saoriview.cpp +++ b/saoriview.cpp @@ -52,10 +52,9 @@ m_viewList.append(this); m_maxid = 0; - m_config = SAORI_SETTING_VIEW; - m_config += "/" + m_account + "/" + m_viewname; + m_config = "/" + m_account + "/" + m_viewname; ui->pushButton_pin->setChecked( - SaoriApplication::saori()->setting()->value(m_config + SAORI_SETTING_VIEW_PINED,false).toBool()); + SaoriApplication::saori()->setting()->value(SAORI_SETTING_VIEW + m_config + SAORI_SETTING_VIEW_PINED,false).toBool()); ui->header->hide(); @@ -355,11 +354,13 @@ void SaoriView::closeEvent(QCloseEvent *event) { + SaoriApplication::saori()->setting()->beginGroup(SAORI_SETTING_VIEW); if (ui->pushButton_pin->isChecked()) { SaoriApplication::saori()->setting()->setValue(m_config + SAORI_SETTING_VIEW_GEOMETRY, qobject_cast(parent())->geometry()); } SaoriApplication::saori()->setting()->setValue(m_config + SAORI_SETTING_VIEW_PINED,ui->pushButton_pin->isChecked()); + SaoriApplication::saori()->setting()->endGroup(); QWidget::closeEvent(event); } diff --git a/saoriwindow.cpp b/saoriwindow.cpp index ac7b6fa..25e90ba 100644 --- a/saoriwindow.cpp +++ b/saoriwindow.cpp @@ -156,7 +156,8 @@ auto setting = SaoriApplication::saori()->setting(); QString c = SAORI_SETTING_VIEW; - c += "/" + viewName.at(0) + "/" + viewName.at(1); + c += "/" + viewName.at(0) + "/" + "accounts:" + viewName.at(1); + qDebug() << c; QRect defRect((ui->mdiArea->subWindowList().count() - 1) * 24, (ui->mdiArea->subWindowList().count() - 1) * 24, 450,