diff --git a/src/dict/loaddictionaries.cc b/src/dict/loaddictionaries.cc index 9234f20d..fc4bb737 100644 --- a/src/dict/loaddictionaries.cc +++ b/src/dict/loaddictionaries.cc @@ -198,7 +198,6 @@ void LoadDictionaries::loadingDictionary( string const & dictionaryName ) noexce void loadDictionaries( QWidget * parent, - bool showInitially, Config::Class const & cfg, std::vector< sptr< Dictionary::Class > > & dictionaries, QNetworkAccessManager & dictNetMgr, @@ -206,7 +205,7 @@ void loadDictionaries( QWidget * parent, { dictionaries.clear(); - ::Initializing init( parent, showInitially ); + ::Initializing init( parent ); // Start a thread to load all the dictionaries diff --git a/src/dict/loaddictionaries.hh b/src/dict/loaddictionaries.hh index bae93521..ca060bb1 100644 --- a/src/dict/loaddictionaries.hh +++ b/src/dict/loaddictionaries.hh @@ -67,7 +67,6 @@ signals: /// If doDeferredInit is true (default), doDeferredInit() is done on all /// dictionaries at the end. void loadDictionaries( QWidget * parent, - bool showInitially, Config::Class const & cfg, std::vector< sptr< Dictionary::Class > > &, QNetworkAccessManager & dictNetMgr, diff --git a/src/initializing.cc b/src/initializing.cc index 0acf099d..62fc88e7 100644 --- a/src/initializing.cc +++ b/src/initializing.cc @@ -5,19 +5,17 @@ #include "initializing.hh" #include -Initializing::Initializing( QWidget * parent, bool showOnStartup ): +Initializing::Initializing( QWidget * parent ): QDialog( parent ) { ui.setupUi( this ); setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint ); - setWindowIcon( QIcon( ":/icons/programicon.png" ) ); - if ( showOnStartup ) { + if ( parent->isVisible() ) { ui.operation->setText( tr( "Please wait..." ) ); - ui.dictionary->hide(); - ui.progressBar->hide(); + ui.dictionary->setText( "" ); show(); } } @@ -26,9 +24,6 @@ void Initializing::indexing( QString const & dictionaryName ) { ui.operation->setText( tr( "Indexing..." ) ); ui.dictionary->setText( dictionaryName ); - ui.dictionary->show(); - ui.progressBar->show(); - adjustSize(); show(); } @@ -36,9 +31,6 @@ void Initializing::loading( QString const & dictionaryName ) { ui.operation->setText( tr( "Loading..." ) ); ui.dictionary->setText( dictionaryName ); - ui.dictionary->show(); - ui.progressBar->show(); - adjustSize(); show(); } diff --git a/src/initializing.hh b/src/initializing.hh index c32cefaf..7f4104c4 100644 --- a/src/initializing.hh +++ b/src/initializing.hh @@ -12,7 +12,7 @@ class Initializing: public QDialog public: - Initializing( QWidget * parent, bool showOnStartup ); + Initializing( QWidget * parent ); public slots: diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 56045ea0..0730d61e 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -208,7 +208,7 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) groups.clear(); orderAndProps.clear(); - loadDictionaries( this, true, cfg, dictionaries, dictNetMgr ); + loadDictionaries( this, cfg, dictionaries, dictNetMgr ); // If no changes to groups were made, update the original data const bool noGroupEdits = ( origCfg.groups == savedGroups ); diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 23483792..78689ba7 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -1585,7 +1585,7 @@ void MainWindow::makeDictionaries() ftsIndexing.stopIndexing(); ftsIndexing.clearDictionaries(); - loadDictionaries( this, isVisible(), cfg, dictionaries, dictNetMgr, false ); + loadDictionaries( this, cfg, dictionaries, dictNetMgr, false ); //create map dictMap = Dictionary::dictToMap( dictionaries ); @@ -3478,7 +3478,7 @@ void MainWindow::on_rescanFiles_triggered() dictionariesUnmuted.clear(); dictionaryBar.setDictionaries( dictionaries ); - loadDictionaries( this, true, cfg, dictionaries, dictNetMgr ); + loadDictionaries( this, cfg, dictionaries, dictNetMgr ); dictMap = Dictionary::dictToMap( dictionaries ); for ( const auto & dictionarie : dictionaries ) {