mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Don't show welcome page header in window title (issue #195)
This commit is contained in:
parent
fac836f29b
commit
9e3dd433a8
|
@ -77,6 +77,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
newReleaseCheckTimer( this ),
|
||||
wordListSelChanged( false )
|
||||
, wasMaximized( false )
|
||||
, blockUpdateWindowTitle( false )
|
||||
#ifdef Q_OS_WIN32
|
||||
, gdAskMessage( 0xFFFFFFFF )
|
||||
#endif
|
||||
|
@ -634,6 +635,9 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
// After we have dictionaries and groups, we can populate history
|
||||
// historyChanged();
|
||||
|
||||
setWindowTitle( "GoldenDict" );
|
||||
|
||||
blockUpdateWindowTitle = true;
|
||||
addNewTab();
|
||||
|
||||
// Create tab list menu
|
||||
|
@ -646,6 +650,8 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
|
||||
history.enableAdd( false );
|
||||
|
||||
blockUpdateWindowTitle = true;
|
||||
|
||||
view->showDefinition( tr( "Welcome!" ), Instances::Group::HelpGroupId );
|
||||
|
||||
history.enableAdd( cfg.preferences.storeHistory );
|
||||
|
@ -1474,7 +1480,13 @@ void MainWindow::updateWindowTitle()
|
|||
ArticleView *view = getCurrentArticleView();
|
||||
if ( view )
|
||||
{
|
||||
setWindowTitle( tr( "%1 - %2" ).arg( view->getTitle(), tr ( "GoldenDict" ) ) );
|
||||
QString str = view->getTitle();
|
||||
if( !str.isEmpty() )
|
||||
{
|
||||
if( !blockUpdateWindowTitle )
|
||||
setWindowTitle( tr( "%1 - %2" ).arg( str, tr ( "GoldenDict" ) ) );
|
||||
blockUpdateWindowTitle = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,6 +152,8 @@ private:
|
|||
|
||||
bool wasMaximized; // Window state before minimization
|
||||
|
||||
bool blockUpdateWindowTitle;
|
||||
|
||||
QPrinter & getPrinter(); // Creates a printer if it's not there and returns it
|
||||
|
||||
/// Applies the qt's stylesheet, given the style's name.
|
||||
|
|
Loading…
Reference in a new issue