Compare commits

..

18 commits

Author SHA1 Message Date
xiaoyifang 3c5233f2a1 1 2024-11-11 09:19:29 +08:00
YiFang Xiao c5ca1b7d63 1 2024-11-11 09:16:14 +08:00
YiFang Xiao 5092ebe2ee 1 2024-11-11 09:16:14 +08:00
YiFang Xiao 5bef4cef22 1 2024-11-11 09:16:14 +08:00
xiaoyifang 59d01868da 1: do not update name 2024-11-11 09:16:14 +08:00
xiaoyifang 10b0496cce 1: do not update name 2024-11-11 09:16:14 +08:00
xiaoyifang 1cf495e7dd Revert "opt: update name should reflect the latest info"
This reverts commit 1272ea2d20a7908b9a69d6b551511916f97cc024.
2024-11-11 09:16:14 +08:00
xiaoyifang c2fc90801b opt: update name should reflect the latest info 2024-11-11 09:16:14 +08:00
autofix-ci[bot] 2de2141758 [autofix.ci] apply automated fixes 2024-11-11 09:16:14 +08:00
xiaoyifang db4c352d6c opt: erase the need to removeTabs 2024-11-11 09:16:14 +08:00
xiaoyifang 7c32cad65a opt: erase the need to removeTabs 2024-11-11 09:16:14 +08:00
shenleban tongying 160402e1d0 Consistently use README and no CRLF
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
2024-11-10 17:39:43 -05:00
shenleban tongying fb48f66370 move audio files to src/audio
a
2024-11-10 17:39:43 -05:00
xiaoyifang dcc4579544
Merge pull request #1927 from xiaoyifang/opt/group-empty-name
Some checks failed
SonarCloud / Build and analyze (push) Has been cancelled
opt: Group struct default constructor only invoked with empty string
2024-11-08 20:59:40 +08:00
xiaoyifang d3ad40f988
Merge pull request #1924 from xiaoyifang/opt/tab-blank
opt: dictionary tab switch will show blank widget when source changing.
2024-11-08 20:55:42 +08:00
xiaoyifang 081cba6b23 opt: Group struct default constructor only invoked with empty string 2024-11-08 20:49:55 +08:00
xiaoyifang 59f9b3d04f opt: dictionary tab switch show blank widget when source changed 2024-11-08 20:48:31 +08:00
shenleban tongying f6434f4219 fix a mistake of https://github.com/xiaoyifang/goldendict-ng/pull/1912
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
2024-11-08 01:36:29 -05:00
27 changed files with 90 additions and 104 deletions

View file

@ -1,79 +1,79 @@
issue: https://github.com/goldendict/goldendict/issues/1441
http://tango.freedesktop.org/Tango_Desktop_Project GPLv3
list:
internet.svg
home.svg
configure.svg
fileopen.svg
addtab.svg
wizard.svg
fulltext
text2speech
reload
icons/print.svg
icons/programs.svg
error
star.svg
star_blue.svg
network.svg
hotkeys
previous
next
advanced
windows-list
filesave
playsound_color
interface
webdict
transliteration
closetab
folder
reload
menu.svg
https://packages.debian.org/bullseye/gnome-icon-theme GPLv3
lists:
clear
https://commons.wikimedia.org/wiki/File:Accessories-dictionary.svg
lists:
icon32_sdict.svg
https://freesvg.org/pushpin-vector-image public domain
lists:
pushbin
https://commons.wikimedia.org/wiki/File:Arrow_bottom_svg.svg license:public domain
lists:
1downarrow
these two icons from sertoli @ https://forum.freemdict.com/u/sertoli/summary
playsound.png
playsound_full.png
LGPL
icon32_zoombase.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-page-zoom-icon.png
icon32_zoomout.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-zoom-out-icon.png
icon32_zoomin.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-zoom-in-icon.png
reload.png https://iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-edit-redo-icon.html
advanced.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-system-run-icon.png
sources.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Apps-plasma-icon.png
book.svg https://github.com/johnfactotum/foliate
lingualibre.svg https://en.m.wikipedia.org/wiki/File:Lingualibre-logo-no-text.svg
Apache License Version 2.0
1downarrow.svg
system-search.svg
Modified from https://github.com/google/material-design-icons
add-anki-icon.svg MIT license
issue: https://github.com/goldendict/goldendict/issues/1441
http://tango.freedesktop.org/Tango_Desktop_Project GPLv3
list:
internet.svg
home.svg
configure.svg
fileopen.svg
addtab.svg
wizard.svg
fulltext
text2speech
reload
icons/print.svg
icons/programs.svg
error
star.svg
star_blue.svg
network.svg
hotkeys
previous
next
advanced
windows-list
filesave
playsound_color
interface
webdict
transliteration
closetab
folder
reload
menu.svg
https://packages.debian.org/bullseye/gnome-icon-theme GPLv3
lists:
clear
https://commons.wikimedia.org/wiki/File:Accessories-dictionary.svg
lists:
icon32_sdict.svg
https://freesvg.org/pushpin-vector-image public domain
lists:
pushbin
https://commons.wikimedia.org/wiki/File:Arrow_bottom_svg.svg license:public domain
lists:
1downarrow
these two icons from sertoli @ https://forum.freemdict.com/u/sertoli/summary
playsound.png
playsound_full.png
LGPL
icon32_zoombase.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-page-zoom-icon.png
icon32_zoomout.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-zoom-out-icon.png
icon32_zoomin.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-zoom-in-icon.png
reload.png https://iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-edit-redo-icon.html
advanced.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-system-run-icon.png
sources.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Apps-plasma-icon.png
book.svg https://github.com/johnfactotum/foliate
lingualibre.svg https://en.m.wikipedia.org/wiki/File:Lingualibre-logo-no-text.svg
Apache License Version 2.0
1downarrow.svg
system-search.svg
Modified from https://github.com/google/material-design-icons
add-anki-icon.svg MIT license
https://www.svgrepo.com/svg/435992/add-card

3
src/audio/README.md Normal file
View file

@ -0,0 +1,3 @@
Code to support GD's internal/external audio players.
Only `audioplayerinterface.hh` is supposed to be used outside this folder.

View file

@ -111,7 +111,7 @@ HotKey::HotKey( QKeySequence const & seq ):
QKeySequence HotKey::toKeySequence() const
{
if ( key2 != 0 || key2 != Qt::Key::Key_unknown ) {
if ( key2 != 0 && key2 != Qt::Key::Key_unknown ) {
return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ),
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
}

View file

@ -53,9 +53,8 @@ Group::Group( Config::Group const & cfgGroup,
}
}
Group::Group( QString name_ ):
id( 0 ),
name( std::move( name_ ) )
Group::Group():
id( 0 )
{
}

View file

@ -32,7 +32,7 @@ struct Group
Config::Group const & inactiveGroup );
/// Creates an empty group.
explicit Group( QString name_ );
explicit Group();
Group( unsigned id, QString name_ );

View file

@ -10,7 +10,7 @@
#include <QWebEngineView>
#include <list>
#include "article_netmgr.hh"
#include "audioplayerinterface.hh"
#include "audio/audioplayerinterface.hh"
#include "instances.hh"
#include "groupcombobox.hh"
#include "globalbroadcaster.hh"

View file

@ -204,22 +204,11 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups )
// Those hold pointers to dictionaries, we need to free them.
groupInstances.clear();
// groups.clear();
// orderAndProps.clear();
loadDictionaries( this, cfg, dictionaries, dictNetMgr );
if ( rebuildGroups ) {
// ui.tabs->removeTab( 1 );
// ui.tabs->removeTab( 1 );
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" ) );
// connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo );
// connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords );
}
setUpdatesEnabled( true );
}

View file

@ -75,10 +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 );
// Populate groups' widget
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
countChanged();

View file

@ -122,7 +122,7 @@ void DictGroupWidget::groupIconActivated( int index )
Config::Group DictGroupWidget::makeGroup() const
{
Instances::Group g( "" );
Instances::Group g;
g.id = groupId;

View file

@ -14,7 +14,7 @@
#include "config.hh"
#include "dict/dictionary.hh"
#include "article_netmgr.hh"
#include "audioplayerfactory.hh"
#include "audio/audioplayerfactory.hh"
#include "instances.hh"
#include "article_maker.hh"
#include "scanpopup.hh"

View file

@ -146,8 +146,6 @@ void OrderAndProps::rebuild( Config::Group const & dictionaryOrder,
ui.dictionaryOrder->populate( order.dictionaries, allDictionaries );
ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries );
// ui.searchLine->applyTo( ui.dictionaryOrder );
disableDictionaryDescription();
showDictNumbers();
@ -156,7 +154,7 @@ void OrderAndProps::rebuild( Config::Group const & dictionaryOrder,
Config::Group OrderAndProps::getCurrentDictionaryOrder() const
{
Instances::Group g( "" );
Instances::Group g;
g.dictionaries = ui.dictionaryOrder->getCurrentDictionaries();
@ -165,7 +163,7 @@ Config::Group OrderAndProps::getCurrentDictionaryOrder() const
Config::Group OrderAndProps::getCurrentInactiveDictionaries() const
{
Instances::Group g( "" );
Instances::Group g;
g.dictionaries = ui.inactiveDictionaries->getCurrentDictionaries();