mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
+ Add autoStart property to configuration (patch by Ars)
This commit is contained in:
parent
a2af2ee6bb
commit
24bd7066c3
|
@ -46,6 +46,7 @@ Preferences::Preferences():
|
|||
enableTrayIcon( true ),
|
||||
startToTray( false ),
|
||||
closeToTray( true ),
|
||||
autoStart( false ),
|
||||
enableScanPopup( true ),
|
||||
startWithScanPopupOn( false ),
|
||||
enableScanPopupModifiers( false ),
|
||||
|
@ -102,6 +103,10 @@ Class load() throw( exError )
|
|||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
|
||||
// #### "C:/Program Files" is bad! will not work for German Windows etc.
|
||||
// #### should be replaced to system path
|
||||
|
||||
if ( QDir( "C:/Program Files/StarDict/dic" ).exists() )
|
||||
c.paths.push_back( Path( "C:/Program Files/StarDict/dic", true ) );
|
||||
|
||||
|
@ -250,6 +255,7 @@ Class load() throw( exError )
|
|||
c.preferences.enableTrayIcon = ( preferences.namedItem( "enableTrayIcon" ).toElement().text() == "1" );
|
||||
c.preferences.startToTray = ( preferences.namedItem( "startToTray" ).toElement().text() == "1" );
|
||||
c.preferences.closeToTray = ( preferences.namedItem( "closeToTray" ).toElement().text() == "1" );
|
||||
c.preferences.autoStart = ( preferences.namedItem( "autoStart" ).toElement().text() == "1" );
|
||||
c.preferences.enableScanPopup = ( preferences.namedItem( "enableScanPopup" ).toElement().text() == "1" );
|
||||
c.preferences.startWithScanPopupOn = ( preferences.namedItem( "startWithScanPopupOn" ).toElement().text() == "1" );
|
||||
c.preferences.enableScanPopupModifiers = ( preferences.namedItem( "enableScanPopupModifiers" ).toElement().text() == "1" );
|
||||
|
@ -479,6 +485,10 @@ void save( Class const & c ) throw( exError )
|
|||
opt.appendChild( dd.createTextNode( c.preferences.closeToTray ? "1":"0" ) );
|
||||
preferences.appendChild( opt );
|
||||
|
||||
opt = dd.createElement( "autoStart" );
|
||||
opt.appendChild( dd.createTextNode( c.preferences.autoStart ? "1":"0" ) );
|
||||
preferences.appendChild( opt );
|
||||
|
||||
opt = dd.createElement( "enableScanPopup" );
|
||||
opt.appendChild( dd.createTextNode( c.preferences.enableScanPopup ? "1":"0" ) );
|
||||
preferences.appendChild( opt );
|
||||
|
|
|
@ -104,6 +104,7 @@ struct Preferences
|
|||
bool enableTrayIcon;
|
||||
bool startToTray;
|
||||
bool closeToTray;
|
||||
bool autoStart;
|
||||
bool enableScanPopup;
|
||||
bool startWithScanPopupOn;
|
||||
bool enableScanPopupModifiers;
|
||||
|
|
Loading…
Reference in a new issue