From 2f443a712bf21f268c7c88d320afcd09fff01db2 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sat, 2 Nov 2024 16:45:13 +0800 Subject: [PATCH 01/11] opt: erase the need to removeTabs --- src/ui/editdictionaries.cc | 16 ++++++++-------- src/ui/groups.cc | 21 +++++++++++++++++++++ src/ui/groups.hh | 4 +++- src/ui/orderandprops.cc | 21 +++++++++++++++++++++ src/ui/orderandprops.hh | 4 +++- 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index ceeac7f2..fed82147 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -214,16 +214,16 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) Instances::updateNames( savedInactive, dictionaries ); if ( rebuildGroups ) { - ui.tabs->removeTab( 1 ); - ui.tabs->removeTab( 1 ); + // ui.tabs->removeTab( 1 ); + // ui.tabs->removeTab( 1 ); - orderAndProps = new OrderAndProps( this, savedOrder, savedInactive, dictionaries ); - groups = new Groups( this, dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() ); + orderAndProps->rebuild( this, savedOrder, savedInactive, dictionaries ); + groups->rebuild( this, dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() ); - ui.tabs->insertTab( 1, orderAndProps, QIcon( ":/icons/book.svg" ), tr( "&Dictionaries" ) ); - ui.tabs->insertTab( 2, groups, QIcon( ":/icons/bookcase.svg" ), tr( "&Groups" ) ); - connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo ); - connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords ); + // ui.tabs->insertTab( 1, orderAndProps, QIcon( ":/icons/book.svg" ), tr( "&Dictionaries" ) ); + // ui.tabs->insertTab( 2, groups, QIcon( ":/icons/bookcase.svg" ), tr( "&Groups" ) ); + // connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo ); + // connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords ); } ui.tabs->setUpdatesEnabled( true ); } diff --git a/src/ui/groups.cc b/src/ui/groups.cc index 09661f3b..ada9cd36 100644 --- a/src/ui/groups.cc +++ b/src/ui/groups.cc @@ -64,6 +64,27 @@ Groups::Groups( QWidget * parent, countChanged(); } +void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_, + Config::Groups const & groups_, + Config::Group const & order ){ + + setUpdatesEnabled( false ); + dicts = dicts_; + groups = groups_; + + ui.dictionaries->setAsSource(); + ui.dictionaries->populate( Instances::Group( order, dicts, Config::Group() ).dictionaries, dicts ); + + ui.searchLine->applyTo( ui.dictionaries ); + + // Populate groups' widget + + ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() ); + + countChanged(); + setUpdatesEnabled( true ); +} + void Groups::editGroup( unsigned id ) { for ( int x = 0; x < groups.size(); ++x ) { diff --git a/src/ui/groups.hh b/src/ui/groups.hh index 8366f1e2..ce6c1799 100644 --- a/src/ui/groups.hh +++ b/src/ui/groups.hh @@ -19,7 +19,9 @@ public: std::vector< sptr< Dictionary::Class > > const &, Config::Groups const &, Config::Group const & order ); - + void rebuild( vector< sptr< Dictionary::Class > > const & dicts_, + Config::Groups const & groups_, + Config::Group const & order ); /// Instructs the dialog to position itself on editing the given group. void editGroup( unsigned id ); diff --git a/src/ui/orderandprops.cc b/src/ui/orderandprops.cc index be92334d..d764054b 100644 --- a/src/ui/orderandprops.cc +++ b/src/ui/orderandprops.cc @@ -133,6 +133,27 @@ OrderAndProps::OrderAndProps( QWidget * parent, showDictNumbers(); } +void OrderAndProps::rebuild( Config::Group const & dictionaryOrder, + Config::Group const & inactiveDictionaries, + std::vector< sptr< Dictionary::Class > > const & allDictionaries ) +{ + Instances::Group order( dictionaryOrder, allDictionaries, Config::Group() ); + Instances::Group inactive( inactiveDictionaries, allDictionaries, Config::Group() ); + + Instances::complementDictionaryOrder( order, inactive, allDictionaries ); + + setUpdatesEnabled( false ); + ui.dictionaryOrder->populate( order.dictionaries, allDictionaries ); + ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries ); + + ui.searchLine->applyTo( ui.dictionaryOrder ); + + disableDictionaryDescription(); + + showDictNumbers(); + setUpdatesEnabled( true ); +} + Config::Group OrderAndProps::getCurrentDictionaryOrder() const { Instances::Group g( "" ); diff --git a/src/ui/orderandprops.hh b/src/ui/orderandprops.hh index dce11782..2dd0d76d 100644 --- a/src/ui/orderandprops.hh +++ b/src/ui/orderandprops.hh @@ -18,7 +18,9 @@ public: Config::Group const & dictionaryOrder, Config::Group const & inactiveDictionaries, std::vector< sptr< Dictionary::Class > > const & allDictionaries ); - + void rebuild( Config::Group const & dictionaryOrder, + Config::Group const & inactiveDictionaries, + std::vector< sptr< Dictionary::Class > > const & allDictionaries ); Config::Group getCurrentDictionaryOrder() const; Config::Group getCurrentInactiveDictionaries() const; From 930e2f35314b142e44f81dab03434d149e6add62 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sat, 2 Nov 2024 16:45:31 +0800 Subject: [PATCH 02/11] opt: erase the need to removeTabs --- src/ui/editdictionaries.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index fed82147..41945da0 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -217,8 +217,8 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) // ui.tabs->removeTab( 1 ); // ui.tabs->removeTab( 1 ); - orderAndProps->rebuild( this, savedOrder, savedInactive, dictionaries ); - groups->rebuild( this, dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() ); + orderAndProps->rebuild( savedOrder, savedInactive, dictionaries ); + groups->rebuild( dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() ); // ui.tabs->insertTab( 1, orderAndProps, QIcon( ":/icons/book.svg" ), tr( "&Dictionaries" ) ); // ui.tabs->insertTab( 2, groups, QIcon( ":/icons/bookcase.svg" ), tr( "&Groups" ) ); From 7b13b31ad5d41fc0780c68bbc40037f1261f0731 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sat, 2 Nov 2024 16:49:34 +0800 Subject: [PATCH 03/11] opt: erase the need to removeTab --- src/ui/editdictionaries.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 41945da0..98ee6de1 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -200,7 +200,7 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) #ifndef NO_TTS_SUPPORT cfg.voiceEngines = sources.getVoiceEngines(); #endif - ui.tabs->setUpdatesEnabled( false ); + setUpdatesEnabled( false ); // Those hold pointers to dictionaries, we need to free them. groupInstances.clear(); @@ -225,7 +225,7 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) // connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo ); // connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords ); } - ui.tabs->setUpdatesEnabled( true ); + setUpdatesEnabled( true ); } EditDictionaries::~EditDictionaries() { From 46b425a6f6eb841072c3738b44d4f29297947720 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 09:04:09 +0000 Subject: [PATCH 04/11] [autofix.ci] apply automated fixes --- src/ui/groups.cc | 11 ++++++----- src/ui/groups.hh | 4 ++-- src/ui/orderandprops.cc | 4 ++-- src/ui/orderandprops.hh | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ui/groups.cc b/src/ui/groups.cc index ada9cd36..3601a033 100644 --- a/src/ui/groups.cc +++ b/src/ui/groups.cc @@ -64,12 +64,13 @@ Groups::Groups( QWidget * parent, countChanged(); } -void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_, - Config::Groups const & groups_, - Config::Group const & order ){ - +void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_, + Config::Groups const & groups_, + Config::Group const & order ) +{ + setUpdatesEnabled( false ); - dicts = dicts_; + dicts = dicts_; groups = groups_; ui.dictionaries->setAsSource(); diff --git a/src/ui/groups.hh b/src/ui/groups.hh index ce6c1799..d8cf1e95 100644 --- a/src/ui/groups.hh +++ b/src/ui/groups.hh @@ -20,8 +20,8 @@ public: Config::Groups const &, Config::Group const & order ); void rebuild( vector< sptr< Dictionary::Class > > const & dicts_, - Config::Groups const & groups_, - Config::Group const & order ); + Config::Groups const & groups_, + Config::Group const & order ); /// Instructs the dialog to position itself on editing the given group. void editGroup( unsigned id ); diff --git a/src/ui/orderandprops.cc b/src/ui/orderandprops.cc index d764054b..8aa90b84 100644 --- a/src/ui/orderandprops.cc +++ b/src/ui/orderandprops.cc @@ -134,8 +134,8 @@ OrderAndProps::OrderAndProps( QWidget * parent, } void OrderAndProps::rebuild( Config::Group const & dictionaryOrder, - Config::Group const & inactiveDictionaries, - std::vector< sptr< Dictionary::Class > > const & allDictionaries ) + Config::Group const & inactiveDictionaries, + std::vector< sptr< Dictionary::Class > > const & allDictionaries ) { Instances::Group order( dictionaryOrder, allDictionaries, Config::Group() ); Instances::Group inactive( inactiveDictionaries, allDictionaries, Config::Group() ); diff --git a/src/ui/orderandprops.hh b/src/ui/orderandprops.hh index 2dd0d76d..84ffa26d 100644 --- a/src/ui/orderandprops.hh +++ b/src/ui/orderandprops.hh @@ -19,8 +19,8 @@ public: Config::Group const & inactiveDictionaries, std::vector< sptr< Dictionary::Class > > const & allDictionaries ); void rebuild( Config::Group const & dictionaryOrder, - Config::Group const & inactiveDictionaries, - std::vector< sptr< Dictionary::Class > > const & allDictionaries ); + Config::Group const & inactiveDictionaries, + std::vector< sptr< Dictionary::Class > > const & allDictionaries ); Config::Group getCurrentDictionaryOrder() const; Config::Group getCurrentInactiveDictionaries() const; From ac11ba7b51e20264f68eef4f43613f68ffedecc3 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sat, 2 Nov 2024 17:14:27 +0800 Subject: [PATCH 05/11] opt: update name should reflect the latest info --- src/ui/editdictionaries.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 98ee6de1..10648ffc 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -113,7 +113,6 @@ void EditDictionaries::currentChanged( int index ) if ( index == -1 || !isVisible() ) { return; // Sent upon the construction/destruction } - qDebug() << ui.tabs->currentWidget()->objectName(); if ( lastTabName.isEmpty() || lastTabName == "Sources" ) { // We're switching away from the Sources tab -- if its contents were // changed, we need to either apply or reject now. @@ -183,9 +182,6 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) { dictionariesChanged = true; - Config::Groups savedGroups = groups->getGroups(); - Config::Group savedOrder = orderAndProps->getCurrentDictionaryOrder(); - Config::Group savedInactive = orderAndProps->getCurrentInactiveDictionaries(); cfg.paths = sources.getPaths(); cfg.soundDirs = sources.getSoundDirs(); @@ -209,10 +205,6 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) loadDictionaries( this, cfg, dictionaries, dictNetMgr ); - Instances::updateNames( savedGroups, dictionaries ); - Instances::updateNames( savedOrder, dictionaries ); - Instances::updateNames( savedInactive, dictionaries ); - if ( rebuildGroups ) { // ui.tabs->removeTab( 1 ); // ui.tabs->removeTab( 1 ); @@ -225,6 +217,15 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) // connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo ); // connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords ); } + + Config::Groups savedGroups = groups->getGroups(); + Config::Group savedOrder = orderAndProps->getCurrentDictionaryOrder(); + Config::Group savedInactive = orderAndProps->getCurrentInactiveDictionaries(); + + Instances::updateNames( savedGroups, dictionaries ); + Instances::updateNames( savedOrder, dictionaries ); + Instances::updateNames( savedInactive, dictionaries ); + setUpdatesEnabled( true ); } EditDictionaries::~EditDictionaries() From 7784f8bb62ceacf3549b667a31f06971c7abcb98 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Sat, 2 Nov 2024 17:32:05 +0800 Subject: [PATCH 06/11] Revert "opt: update name should reflect the latest info" This reverts commit 1272ea2d20a7908b9a69d6b551511916f97cc024. --- src/ui/editdictionaries.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 10648ffc..98ee6de1 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -113,6 +113,7 @@ void EditDictionaries::currentChanged( int index ) if ( index == -1 || !isVisible() ) { return; // Sent upon the construction/destruction } + qDebug() << ui.tabs->currentWidget()->objectName(); if ( lastTabName.isEmpty() || lastTabName == "Sources" ) { // We're switching away from the Sources tab -- if its contents were // changed, we need to either apply or reject now. @@ -182,6 +183,9 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) { dictionariesChanged = true; + Config::Groups savedGroups = groups->getGroups(); + Config::Group savedOrder = orderAndProps->getCurrentDictionaryOrder(); + Config::Group savedInactive = orderAndProps->getCurrentInactiveDictionaries(); cfg.paths = sources.getPaths(); cfg.soundDirs = sources.getSoundDirs(); @@ -205,6 +209,10 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) loadDictionaries( this, cfg, dictionaries, dictNetMgr ); + Instances::updateNames( savedGroups, dictionaries ); + Instances::updateNames( savedOrder, dictionaries ); + Instances::updateNames( savedInactive, dictionaries ); + if ( rebuildGroups ) { // ui.tabs->removeTab( 1 ); // ui.tabs->removeTab( 1 ); @@ -217,15 +225,6 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) // connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo ); // connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords ); } - - Config::Groups savedGroups = groups->getGroups(); - Config::Group savedOrder = orderAndProps->getCurrentDictionaryOrder(); - Config::Group savedInactive = orderAndProps->getCurrentInactiveDictionaries(); - - Instances::updateNames( savedGroups, dictionaries ); - Instances::updateNames( savedOrder, dictionaries ); - Instances::updateNames( savedInactive, dictionaries ); - setUpdatesEnabled( true ); } EditDictionaries::~EditDictionaries() From da99f9c330f94b090d5a0006eaa97712a9fd0f92 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Mon, 4 Nov 2024 14:05:02 +0800 Subject: [PATCH 07/11] 1: do not update name --- src/ui/editdictionaries.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 98ee6de1..0921c22d 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -209,9 +209,6 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) loadDictionaries( this, cfg, dictionaries, dictNetMgr ); - Instances::updateNames( savedGroups, dictionaries ); - Instances::updateNames( savedOrder, dictionaries ); - Instances::updateNames( savedInactive, dictionaries ); if ( rebuildGroups ) { // ui.tabs->removeTab( 1 ); From d8736af97392e1cd55f98fe3e71ed0f9ead96b34 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Mon, 4 Nov 2024 14:15:54 +0800 Subject: [PATCH 08/11] 1: do not update name --- src/ui/editdictionaries.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 0921c22d..3775fc99 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -183,9 +183,9 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) { dictionariesChanged = true; - Config::Groups savedGroups = groups->getGroups(); - Config::Group savedOrder = orderAndProps->getCurrentDictionaryOrder(); - Config::Group savedInactive = orderAndProps->getCurrentInactiveDictionaries(); + Config::Groups savedGroups = cfg.groups; + Config::Group savedOrder = cfg.dictionaryOrder; + Config::Group savedInactive = cfg.inactiveDictionaries; cfg.paths = sources.getPaths(); cfg.soundDirs = sources.getSoundDirs(); From 94160f2d8a3c969d7cbe36b240cb7d3be71733c7 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Mon, 4 Nov 2024 21:25:44 +0800 Subject: [PATCH 09/11] 1 --- src/ui/editdictionaries.cc | 5 ++--- src/ui/groups.cc | 5 ++--- src/ui/groups.hh | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index 3775fc99..f0b4632b 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -204,12 +204,11 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) // Those hold pointers to dictionaries, we need to free them. groupInstances.clear(); - groups.clear(); - orderAndProps.clear(); + // groups.clear(); + // orderAndProps.clear(); loadDictionaries( this, cfg, dictionaries, dictNetMgr ); - if ( rebuildGroups ) { // ui.tabs->removeTab( 1 ); // ui.tabs->removeTab( 1 ); diff --git a/src/ui/groups.cc b/src/ui/groups.cc index 3601a033..15a49e12 100644 --- a/src/ui/groups.cc +++ b/src/ui/groups.cc @@ -68,8 +68,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_, Config::Groups const & groups_, Config::Group const & order ) { - - setUpdatesEnabled( false ); + this->setUpdatesEnabled( false ); dicts = dicts_; groups = groups_; @@ -83,7 +82,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_, ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() ); countChanged(); - setUpdatesEnabled( true ); + this->setUpdatesEnabled( true ); } void Groups::editGroup( unsigned id ) diff --git a/src/ui/groups.hh b/src/ui/groups.hh index d8cf1e95..21224f19 100644 --- a/src/ui/groups.hh +++ b/src/ui/groups.hh @@ -19,7 +19,7 @@ public: std::vector< sptr< Dictionary::Class > > const &, Config::Groups const &, Config::Group const & order ); - void rebuild( vector< sptr< Dictionary::Class > > const & dicts_, + void rebuild( std::vector< sptr< Dictionary::Class > > const & dicts_, Config::Groups const & groups_, Config::Group const & order ); /// Instructs the dialog to position itself on editing the given group. @@ -34,7 +34,7 @@ public: private: Ui::Groups ui; - std::vector< sptr< Dictionary::Class > > const & dicts; + std::vector< sptr< Dictionary::Class > > dicts; Config::Groups groups; QToolButton * groupsListButton; From 4a0db3f7ee7554fbc3df79742fab2460503e7b90 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Mon, 4 Nov 2024 21:52:53 +0800 Subject: [PATCH 10/11] 1 --- src/dict/loaddictionaries.cc | 2 +- src/ui/editdictionaries.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dict/loaddictionaries.cc b/src/dict/loaddictionaries.cc index fc4bb737..e369ac6e 100644 --- a/src/dict/loaddictionaries.cc +++ b/src/dict/loaddictionaries.cc @@ -224,7 +224,7 @@ void loadDictionaries( QWidget * parent, loadDicts.wait(); - if ( loadDicts.getExceptionText().size() ) { + if ( !loadDicts.getExceptionText().empty() ) { QMessageBox::critical( parent, QCoreApplication::translate( "LoadDictionaries", "Error loading dictionaries" ), QString::fromUtf8( loadDicts.getExceptionText().c_str() ) ); diff --git a/src/ui/editdictionaries.cc b/src/ui/editdictionaries.cc index f0b4632b..9887266e 100644 --- a/src/ui/editdictionaries.cc +++ b/src/ui/editdictionaries.cc @@ -183,9 +183,9 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups ) { dictionariesChanged = true; - Config::Groups savedGroups = cfg.groups; - Config::Group savedOrder = cfg.dictionaryOrder; - Config::Group savedInactive = cfg.inactiveDictionaries; + Config::Groups savedGroups = groups->getGroups(); + Config::Group savedOrder = orderAndProps->getCurrentDictionaryOrder(); + Config::Group savedInactive = orderAndProps->getCurrentInactiveDictionaries(); cfg.paths = sources.getPaths(); cfg.soundDirs = sources.getSoundDirs(); From 44a32c9f1912d3c47cbdb7d0a4b00caacec38937 Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Thu, 7 Nov 2024 21:27:45 +0800 Subject: [PATCH 11/11] 1 --- src/ui/groups.cc | 2 +- src/ui/orderandprops.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/groups.cc b/src/ui/groups.cc index 15a49e12..e7f4af6f 100644 --- a/src/ui/groups.cc +++ b/src/ui/groups.cc @@ -75,7 +75,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_, ui.dictionaries->setAsSource(); ui.dictionaries->populate( Instances::Group( order, dicts, Config::Group() ).dictionaries, dicts ); - ui.searchLine->applyTo( ui.dictionaries ); + // ui.searchLine->applyTo( ui.dictionaries ); // Populate groups' widget diff --git a/src/ui/orderandprops.cc b/src/ui/orderandprops.cc index 8aa90b84..e0b2242b 100644 --- a/src/ui/orderandprops.cc +++ b/src/ui/orderandprops.cc @@ -146,7 +146,7 @@ void OrderAndProps::rebuild( Config::Group const & dictionaryOrder, ui.dictionaryOrder->populate( order.dictionaries, allDictionaries ); ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries ); - ui.searchLine->applyTo( ui.dictionaryOrder ); + // ui.searchLine->applyTo( ui.dictionaryOrder ); disableDictionaryDescription();