mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Merge branch 'dictionaries-dialog-save-restore-geometry' of https://github.com/vedgy/goldendict into Temp
This commit is contained in:
commit
bc7fe1a3a8
|
@ -1100,6 +1100,11 @@ Class load() THROW_SPEC( exError )
|
|||
if ( !inspectorGeometry.isNull() )
|
||||
c.inspectorGeometry = QByteArray::fromBase64( inspectorGeometry.toElement().text().toLatin1() );
|
||||
|
||||
QDomNode dictionariesDialogGeometry = root.namedItem( "dictionariesDialogGeometry" );
|
||||
|
||||
if ( !dictionariesDialogGeometry.isNull() )
|
||||
c.dictionariesDialogGeometry = QByteArray::fromBase64( dictionariesDialogGeometry.toElement().text().toLatin1() );
|
||||
|
||||
QDomNode timeForNewReleaseCheck = root.namedItem( "timeForNewReleaseCheck" );
|
||||
|
||||
if ( !timeForNewReleaseCheck.isNull() )
|
||||
|
@ -2094,6 +2099,10 @@ void save( Class const & c ) THROW_SPEC( exError )
|
|||
opt.appendChild( dd.createTextNode( QString::fromLatin1( c.inspectorGeometry.toBase64() ) ) );
|
||||
root.appendChild( opt );
|
||||
|
||||
opt = dd.createElement( "dictionariesDialogGeometry" );
|
||||
opt.appendChild( dd.createTextNode( QString::fromLatin1( c.dictionariesDialogGeometry.toBase64() ) ) );
|
||||
root.appendChild( opt );
|
||||
|
||||
opt = dd.createElement( "timeForNewReleaseCheck" );
|
||||
opt.appendChild( dd.createTextNode( c.timeForNewReleaseCheck.toString( Qt::ISODate ) ) );
|
||||
root.appendChild( opt );
|
||||
|
|
|
@ -677,6 +677,7 @@ struct Class
|
|||
QByteArray popupWindowGeometry; // Geometry saved by QMainWindow
|
||||
QByteArray dictInfoGeometry; // Geometry of "Dictionary info" window
|
||||
QByteArray inspectorGeometry; // Geometry of WebKit inspector window
|
||||
QByteArray dictionariesDialogGeometry; // Geometry of Dictionaries dialog
|
||||
QByteArray helpWindowGeometry; // Geometry of help window
|
||||
QByteArray helpSplitterState; // Geometry of help splitter
|
||||
|
||||
|
|
|
@ -2035,7 +2035,9 @@ void MainWindow::editDictionaries( unsigned editDictionaryGroup )
|
|||
if ( editDictionaryGroup != Instances::Group::NoGroupId )
|
||||
dicts.editGroup( editDictionaryGroup );
|
||||
|
||||
dicts.restoreGeometry( cfg.dictionariesDialogGeometry );
|
||||
dicts.exec();
|
||||
cfg.dictionariesDialogGeometry = newCfg.dictionariesDialogGeometry = dicts.saveGeometry();
|
||||
|
||||
if ( dicts.areDictionariesChanged() || dicts.areGroupsChanged() )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue