mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
Compare commits
18 commits
45d386e5b2
...
3c5233f2a1
Author | SHA1 | Date | |
---|---|---|---|
3c5233f2a1 | |||
c5ca1b7d63 | |||
5092ebe2ee | |||
5bef4cef22 | |||
59d01868da | |||
10b0496cce | |||
1cf495e7dd | |||
c2fc90801b | |||
2de2141758 | |||
db4c352d6c | |||
7c32cad65a | |||
160402e1d0 | |||
fb48f66370 | |||
dcc4579544 | |||
d3ad40f988 | |||
081cba6b23 | |||
59f9b3d04f | |||
f6434f4219 |
|
@ -1,79 +1,79 @@
|
||||||
issue: https://github.com/goldendict/goldendict/issues/1441
|
issue: https://github.com/goldendict/goldendict/issues/1441
|
||||||
|
|
||||||
http://tango.freedesktop.org/Tango_Desktop_Project GPLv3
|
http://tango.freedesktop.org/Tango_Desktop_Project GPLv3
|
||||||
list:
|
list:
|
||||||
internet.svg
|
internet.svg
|
||||||
home.svg
|
home.svg
|
||||||
configure.svg
|
configure.svg
|
||||||
fileopen.svg
|
fileopen.svg
|
||||||
addtab.svg
|
addtab.svg
|
||||||
wizard.svg
|
wizard.svg
|
||||||
fulltext
|
fulltext
|
||||||
text2speech
|
text2speech
|
||||||
reload
|
reload
|
||||||
icons/print.svg
|
icons/print.svg
|
||||||
icons/programs.svg
|
icons/programs.svg
|
||||||
error
|
error
|
||||||
star.svg
|
star.svg
|
||||||
star_blue.svg
|
star_blue.svg
|
||||||
network.svg
|
network.svg
|
||||||
hotkeys
|
hotkeys
|
||||||
previous
|
previous
|
||||||
next
|
next
|
||||||
advanced
|
advanced
|
||||||
windows-list
|
windows-list
|
||||||
filesave
|
filesave
|
||||||
playsound_color
|
playsound_color
|
||||||
interface
|
interface
|
||||||
webdict
|
webdict
|
||||||
transliteration
|
transliteration
|
||||||
closetab
|
closetab
|
||||||
folder
|
folder
|
||||||
reload
|
reload
|
||||||
menu.svg
|
menu.svg
|
||||||
|
|
||||||
https://packages.debian.org/bullseye/gnome-icon-theme GPLv3
|
https://packages.debian.org/bullseye/gnome-icon-theme GPLv3
|
||||||
lists:
|
lists:
|
||||||
clear
|
clear
|
||||||
|
|
||||||
https://commons.wikimedia.org/wiki/File:Accessories-dictionary.svg
|
https://commons.wikimedia.org/wiki/File:Accessories-dictionary.svg
|
||||||
lists:
|
lists:
|
||||||
icon32_sdict.svg
|
icon32_sdict.svg
|
||||||
|
|
||||||
|
|
||||||
https://freesvg.org/pushpin-vector-image public domain
|
https://freesvg.org/pushpin-vector-image public domain
|
||||||
lists:
|
lists:
|
||||||
pushbin
|
pushbin
|
||||||
|
|
||||||
|
|
||||||
https://commons.wikimedia.org/wiki/File:Arrow_bottom_svg.svg license:public domain
|
https://commons.wikimedia.org/wiki/File:Arrow_bottom_svg.svg license:public domain
|
||||||
lists:
|
lists:
|
||||||
1downarrow
|
1downarrow
|
||||||
|
|
||||||
|
|
||||||
these two icons from sertoli @ https://forum.freemdict.com/u/sertoli/summary
|
these two icons from sertoli @ https://forum.freemdict.com/u/sertoli/summary
|
||||||
playsound.png
|
playsound.png
|
||||||
playsound_full.png
|
playsound_full.png
|
||||||
|
|
||||||
|
|
||||||
LGPL
|
LGPL
|
||||||
icon32_zoombase.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Actions-page-zoom-icon.png
|
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_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
|
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
|
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
|
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
|
sources.png https://icons.iconarchive.com/icons/oxygen-icons.org/oxygen/128/Apps-plasma-icon.png
|
||||||
|
|
||||||
book.svg https://github.com/johnfactotum/foliate
|
book.svg https://github.com/johnfactotum/foliate
|
||||||
|
|
||||||
|
|
||||||
lingualibre.svg https://en.m.wikipedia.org/wiki/File:Lingualibre-logo-no-text.svg
|
lingualibre.svg https://en.m.wikipedia.org/wiki/File:Lingualibre-logo-no-text.svg
|
||||||
|
|
||||||
|
|
||||||
Apache License Version 2.0
|
Apache License Version 2.0
|
||||||
1downarrow.svg
|
1downarrow.svg
|
||||||
system-search.svg
|
system-search.svg
|
||||||
Modified from https://github.com/google/material-design-icons
|
Modified from https://github.com/google/material-design-icons
|
||||||
|
|
||||||
add-anki-icon.svg MIT license
|
add-anki-icon.svg MIT license
|
||||||
https://www.svgrepo.com/svg/435992/add-card
|
https://www.svgrepo.com/svg/435992/add-card
|
3
src/audio/README.md
Normal file
3
src/audio/README.md
Normal 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.
|
|
@ -111,7 +111,7 @@ HotKey::HotKey( QKeySequence const & seq ):
|
||||||
|
|
||||||
QKeySequence HotKey::toKeySequence() const
|
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 ) ),
|
return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ),
|
||||||
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
|
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,9 +53,8 @@ Group::Group( Config::Group const & cfgGroup,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Group::Group( QString name_ ):
|
Group::Group():
|
||||||
id( 0 ),
|
id( 0 )
|
||||||
name( std::move( name_ ) )
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct Group
|
||||||
Config::Group const & inactiveGroup );
|
Config::Group const & inactiveGroup );
|
||||||
|
|
||||||
/// Creates an empty group.
|
/// Creates an empty group.
|
||||||
explicit Group( QString name_ );
|
explicit Group();
|
||||||
|
|
||||||
Group( unsigned id, QString name_ );
|
Group( unsigned id, QString name_ );
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <QWebEngineView>
|
#include <QWebEngineView>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "article_netmgr.hh"
|
#include "article_netmgr.hh"
|
||||||
#include "audioplayerinterface.hh"
|
#include "audio/audioplayerinterface.hh"
|
||||||
#include "instances.hh"
|
#include "instances.hh"
|
||||||
#include "groupcombobox.hh"
|
#include "groupcombobox.hh"
|
||||||
#include "globalbroadcaster.hh"
|
#include "globalbroadcaster.hh"
|
||||||
|
|
|
@ -204,22 +204,11 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups )
|
||||||
// Those hold pointers to dictionaries, we need to free them.
|
// Those hold pointers to dictionaries, we need to free them.
|
||||||
groupInstances.clear();
|
groupInstances.clear();
|
||||||
|
|
||||||
// groups.clear();
|
|
||||||
// orderAndProps.clear();
|
|
||||||
|
|
||||||
loadDictionaries( this, cfg, dictionaries, dictNetMgr );
|
loadDictionaries( this, cfg, dictionaries, dictNetMgr );
|
||||||
|
|
||||||
if ( rebuildGroups ) {
|
if ( rebuildGroups ) {
|
||||||
// ui.tabs->removeTab( 1 );
|
|
||||||
// ui.tabs->removeTab( 1 );
|
|
||||||
|
|
||||||
orderAndProps->rebuild( savedOrder, savedInactive, dictionaries );
|
orderAndProps->rebuild( savedOrder, savedInactive, dictionaries );
|
||||||
groups->rebuild( dictionaries, savedGroups, orderAndProps->getCurrentDictionaryOrder() );
|
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 );
|
setUpdatesEnabled( true );
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,10 +75,7 @@ void Groups::rebuild( vector< sptr< Dictionary::Class > > const & dicts_,
|
||||||
ui.dictionaries->setAsSource();
|
ui.dictionaries->setAsSource();
|
||||||
ui.dictionaries->populate( Instances::Group( order, dicts, Config::Group() ).dictionaries, dicts );
|
ui.dictionaries->populate( Instances::Group( order, dicts, Config::Group() ).dictionaries, dicts );
|
||||||
|
|
||||||
// ui.searchLine->applyTo( ui.dictionaries );
|
|
||||||
|
|
||||||
// Populate groups' widget
|
// Populate groups' widget
|
||||||
|
|
||||||
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
|
ui.groups->populate( groups, dicts, ui.dictionaries->getCurrentDictionaries() );
|
||||||
|
|
||||||
countChanged();
|
countChanged();
|
||||||
|
|
|
@ -122,7 +122,7 @@ void DictGroupWidget::groupIconActivated( int index )
|
||||||
|
|
||||||
Config::Group DictGroupWidget::makeGroup() const
|
Config::Group DictGroupWidget::makeGroup() const
|
||||||
{
|
{
|
||||||
Instances::Group g( "" );
|
Instances::Group g;
|
||||||
|
|
||||||
g.id = groupId;
|
g.id = groupId;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "config.hh"
|
#include "config.hh"
|
||||||
#include "dict/dictionary.hh"
|
#include "dict/dictionary.hh"
|
||||||
#include "article_netmgr.hh"
|
#include "article_netmgr.hh"
|
||||||
#include "audioplayerfactory.hh"
|
#include "audio/audioplayerfactory.hh"
|
||||||
#include "instances.hh"
|
#include "instances.hh"
|
||||||
#include "article_maker.hh"
|
#include "article_maker.hh"
|
||||||
#include "scanpopup.hh"
|
#include "scanpopup.hh"
|
||||||
|
|
|
@ -146,8 +146,6 @@ void OrderAndProps::rebuild( Config::Group const & dictionaryOrder,
|
||||||
ui.dictionaryOrder->populate( order.dictionaries, allDictionaries );
|
ui.dictionaryOrder->populate( order.dictionaries, allDictionaries );
|
||||||
ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries );
|
ui.inactiveDictionaries->populate( inactive.dictionaries, allDictionaries );
|
||||||
|
|
||||||
// ui.searchLine->applyTo( ui.dictionaryOrder );
|
|
||||||
|
|
||||||
disableDictionaryDescription();
|
disableDictionaryDescription();
|
||||||
|
|
||||||
showDictNumbers();
|
showDictNumbers();
|
||||||
|
@ -156,7 +154,7 @@ void OrderAndProps::rebuild( Config::Group const & dictionaryOrder,
|
||||||
|
|
||||||
Config::Group OrderAndProps::getCurrentDictionaryOrder() const
|
Config::Group OrderAndProps::getCurrentDictionaryOrder() const
|
||||||
{
|
{
|
||||||
Instances::Group g( "" );
|
Instances::Group g;
|
||||||
|
|
||||||
g.dictionaries = ui.dictionaryOrder->getCurrentDictionaries();
|
g.dictionaries = ui.dictionaryOrder->getCurrentDictionaries();
|
||||||
|
|
||||||
|
@ -165,7 +163,7 @@ Config::Group OrderAndProps::getCurrentDictionaryOrder() const
|
||||||
|
|
||||||
Config::Group OrderAndProps::getCurrentInactiveDictionaries() const
|
Config::Group OrderAndProps::getCurrentInactiveDictionaries() const
|
||||||
{
|
{
|
||||||
Instances::Group g( "" );
|
Instances::Group g;
|
||||||
|
|
||||||
g.dictionaries = ui.inactiveDictionaries->getCurrentDictionaries();
|
g.dictionaries = ui.inactiveDictionaries->getCurrentDictionaries();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue