mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Merge branch 'temp/staged' into staged
This commit is contained in:
commit
6943b77972
8
.github/workflows/macos.yml
vendored
8
.github/workflows/macos.yml
vendored
|
@ -7,7 +7,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- staged
|
- master
|
||||||
|
# - staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
|
@ -17,7 +18,8 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- staged
|
- master
|
||||||
|
# - staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
|
@ -96,5 +98,5 @@ jobs:
|
||||||
Windows built with: msvc64 Visual studio 2019
|
Windows built with: msvc64 Visual studio 2019
|
||||||
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
|
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
|
||||||
AppImage built with: Ubuntu-20.04 ,latest gcc
|
AppImage built with: Ubuntu-20.04 ,latest gcc
|
||||||
macos built with: ${{ matrix.os }},clang_64
|
macos built with: macos-10.15,macos-11.0,clang_64
|
||||||
This is a prerelease version ,auto build by github action. use on your on risk:-)
|
This is a prerelease version ,auto build by github action. use on your on risk:-)
|
||||||
|
|
8
.github/workflows/ubuntu.yml
vendored
8
.github/workflows/ubuntu.yml
vendored
|
@ -8,7 +8,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- staged
|
- master
|
||||||
|
# - staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
|
@ -18,7 +19,8 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- staged
|
- master
|
||||||
|
# - staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
|
@ -111,5 +113,5 @@ jobs:
|
||||||
Windows built with: msvc64 Visual studio 2019
|
Windows built with: msvc64 Visual studio 2019
|
||||||
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
|
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
|
||||||
AppImage built with: Ubuntu-20.04 ,latest gcc
|
AppImage built with: Ubuntu-20.04 ,latest gcc
|
||||||
macos built with: ${{ matrix.os }},clang_64
|
macos built with: macos-10.15,macos-11.0,clang_64
|
||||||
This is a prerelease version ,auto build by github action. use on your on risk:-)
|
This is a prerelease version ,auto build by github action. use on your on risk:-)
|
||||||
|
|
8
.github/workflows/windows.yml
vendored
8
.github/workflows/windows.yml
vendored
|
@ -8,7 +8,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- staged
|
- master
|
||||||
|
# - staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
|
@ -18,7 +19,8 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- staged
|
- master
|
||||||
|
# - staged
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- ".github/**"
|
- ".github/**"
|
||||||
|
@ -148,5 +150,5 @@ jobs:
|
||||||
Windows built with: msvc64 Visual studio 2019
|
Windows built with: msvc64 Visual studio 2019
|
||||||
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
|
goldendict.exe was provided alone ,if you have a previous version. replace this maybe ok. if not ,download the whole bundle.
|
||||||
AppImage built with: Ubuntu-20.04 ,latest gcc
|
AppImage built with: Ubuntu-20.04 ,latest gcc
|
||||||
macos built with: ${{ matrix.os }},clang_64
|
macos built with: macos-10.15,macos-11.0,clang_64
|
||||||
This is a prerelease version ,auto build by github action. use on your on risk:-)
|
This is a prerelease version ,auto build by github action. use on your on risk:-)
|
||||||
|
|
|
@ -134,6 +134,12 @@ a:hover {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Headers */
|
||||||
|
h3 {
|
||||||
|
color: inherit;
|
||||||
|
font-family: Arial;
|
||||||
|
}
|
||||||
|
|
||||||
/* The first headword in a (possibly) multi-headword DSL article */
|
/* The first headword in a (possibly) multi-headword DSL article */
|
||||||
.gdarticlebody > div:first-child .dsl_headwords,
|
.gdarticlebody > div:first-child .dsl_headwords,
|
||||||
.gdarticlebody > h3:first-child {
|
.gdarticlebody > h3:first-child {
|
||||||
|
@ -162,12 +168,6 @@ code::selection {
|
||||||
background: #839EC7;
|
background: #839EC7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Headers */
|
|
||||||
h3 {
|
|
||||||
color: inherit;
|
|
||||||
font-family: Arial;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******** DSL Dictionaries ****************/
|
/******** DSL Dictionaries ****************/
|
||||||
|
|
||||||
/* DSL headwords */
|
/* DSL headwords */
|
||||||
|
|
|
@ -218,14 +218,11 @@ QString ArticleView::scrollToFromDictionaryId( QString const & dictionaryId )
|
||||||
return scrollToPrefix + dictionaryId;
|
return scrollToPrefix + dictionaryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm,
|
ArticleView::ArticleView( QWidget * parent, ArticleNetworkAccessManager & nm, AudioPlayerPtr const & audioPlayer_,
|
||||||
AudioPlayerPtr const & audioPlayer_,
|
|
||||||
std::vector< sptr< Dictionary::Class > > const & allDictionaries_,
|
std::vector< sptr< Dictionary::Class > > const & allDictionaries_,
|
||||||
Instances::Groups const & groups_, bool popupView_,
|
Instances::Groups const & groups_, bool popupView_, Config::Class const & cfg_,
|
||||||
Config::Class const & cfg_,
|
QAction & openSearchAction_, QAction * dictionaryBarToggled_,
|
||||||
QAction & openSearchAction_,
|
GroupComboBox const * groupComboBox_ ) :
|
||||||
QAction * dictionaryBarToggled_,
|
|
||||||
GroupComboBox const * groupComboBox_ ):
|
|
||||||
QFrame( parent ),
|
QFrame( parent ),
|
||||||
articleNetMgr( nm ),
|
articleNetMgr( nm ),
|
||||||
audioPlayer( audioPlayer_ ),
|
audioPlayer( audioPlayer_ ),
|
||||||
|
|
10
dictzip.c
10
dictzip.c
|
@ -349,11 +349,13 @@ static enum DZ_ERRORS dict_read_header( const char *filename,
|
||||||
}
|
}
|
||||||
header->chunks = xmalloc( sizeof( header->chunks[0] )
|
header->chunks = xmalloc( sizeof( header->chunks[0] )
|
||||||
* header->chunkCount );
|
* header->chunkCount );
|
||||||
if( header->chunks == 0 ) {
|
if( header->chunks == 0 )
|
||||||
return DZ_ERR_NOMEMORY;
|
{
|
||||||
}
|
fclose( str );
|
||||||
|
return DZ_ERR_NOMEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < header->chunkCount; i++) {
|
for (i = 0; i < header->chunkCount; i++) {
|
||||||
header->chunks[i] = getc( str ) << 0;
|
header->chunks[i] = getc( str ) << 0;
|
||||||
header->chunks[i] |= getc( str ) << 8;
|
header->chunks[i] |= getc( str ) << 8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -553,11 +553,11 @@ CONFIG( chinese_conversion_support ) {
|
||||||
win32-msvc* {
|
win32-msvc* {
|
||||||
LIBS += -lopencc
|
LIBS += -lopencc
|
||||||
} else {
|
} else {
|
||||||
# mac {
|
mac {
|
||||||
# LIBS += -lopencc.2
|
LIBS += -lopencc.1.1
|
||||||
# } else {
|
} else {
|
||||||
LIBS += -lopencc
|
LIBS += -lopencc
|
||||||
# }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4392,39 +4392,6 @@ void MainWindow::openDictionaryFolder( const QString & id )
|
||||||
{
|
{
|
||||||
QString fileName = FsEncoding::decode( dictionaries[ x ]->getDictionaryFilenames()[ 0 ].c_str() );
|
QString fileName = FsEncoding::decode( dictionaries[ x ]->getDictionaryFilenames()[ 0 ].c_str() );
|
||||||
|
|
||||||
// Platform-dependent way to launch a file explorer and to select a file,
|
|
||||||
// currently only on Windows.
|
|
||||||
#if defined(Q_OS_WIN)
|
|
||||||
bool explorerLaunched = false;
|
|
||||||
if ( !QFileInfo( fileName ).isDir() )
|
|
||||||
{
|
|
||||||
QString param = QLatin1String("explorer.exe ")
|
|
||||||
+ QLatin1String("/select, \"") + QDir::toNativeSeparators( fileName ) + QLatin1String("\"");
|
|
||||||
|
|
||||||
qDebug() << "Launching" << param;
|
|
||||||
|
|
||||||
// We use CreateProcess() directly instead of QProcess::startDetached() since
|
|
||||||
// startDetached() does some evil things with quotes breaking explorer arguments.
|
|
||||||
// E.g., the following file cannot be properly selected via startDetached(), due to equals sign,
|
|
||||||
// which explorer considers as separator:
|
|
||||||
// Z:\GoldenDict\content\-=MDict=-\Test.mdx
|
|
||||||
PROCESS_INFORMATION pinfo;
|
|
||||||
STARTUPINFOW startupInfo = { sizeof( STARTUPINFO ), 0, 0, 0,
|
|
||||||
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
|
|
||||||
(ulong)CW_USEDEFAULT, (ulong)CW_USEDEFAULT,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
||||||
};
|
|
||||||
explorerLaunched = CreateProcess(0, (wchar_t*) param.utf16(),
|
|
||||||
0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
|
|
||||||
0, &startupInfo, &pinfo);
|
|
||||||
|
|
||||||
if ( explorerLaunched ) {
|
|
||||||
CloseHandle( pinfo.hThread );
|
|
||||||
CloseHandle( pinfo.hProcess );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QString folder = QFileInfo( fileName ).absoluteDir().absolutePath();
|
QString folder = QFileInfo( fileName ).absoluteDir().absolutePath();
|
||||||
if( !folder.isEmpty() )
|
if( !folder.isEmpty() )
|
||||||
QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) );
|
QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) );
|
||||||
|
|
Loading…
Reference in a new issue