X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fqt-console%2Ffileset%2Ffileset.cpp;h=ded84d15d64fda8c7b8e9f0fd93163c72c8c9cb6;hb=0814c96da7cd32509cf182667b4b124dea4aab2b;hp=1aeb9a1bb052d20c20a7a9055b39f6641032d133;hpb=f85d9ac48410082dc5965ccf86d3b758508a61a0;p=bacula%2Fbacula diff --git a/bacula/src/qt-console/fileset/fileset.cpp b/bacula/src/qt-console/fileset/fileset.cpp index 1aeb9a1bb0..ded84d15d6 100644 --- a/bacula/src/qt-console/fileset/fileset.cpp +++ b/bacula/src/qt-console/fileset/fileset.cpp @@ -50,10 +50,12 @@ FileSet::FileSet() m_populated = false; m_checkcurwidget = true; m_closeable = false; + readSettings(); } FileSet::~FileSet() { + writeSettings(); } /* @@ -124,7 +126,7 @@ void FileSet::populateTree() } } /* Resize the columns */ - for(int cnter=1; cnterresizeColumnToContents(cnter); } @@ -208,7 +210,7 @@ void FileSet::currentStackItem() if(!m_populated) { populateTree(); /* add context sensitive menu items specific to this classto the page - * selector tree. m_m_contextActions is QList of QActions, so this is + * selector tree. m_contextActions is QList of QActions, so this is * only done once with the first population. */ m_contextActions.append(actionRefreshFileSet); /* Create the context menu for the fileset tree */ @@ -216,3 +218,25 @@ void FileSet::currentStackItem() m_populated=true; } } + +/* + * Save user settings associated with this page + */ +void FileSet::writeSettings() +{ + QSettings settings(m_console->m_dir->name(), "bat"); + settings.beginGroup("FileSet"); + settings.setValue("geometry", saveGeometry()); + settings.endGroup(); +} + +/* + * Read and restore user settings associated with this page + */ +void FileSet::readSettings() +{ + QSettings settings(m_console->m_dir->name(), "bat"); + settings.beginGroup("FileSet"); + restoreGeometry(settings.value("geometry").toByteArray()); + settings.endGroup(); +}