Skip to content

Commit

Permalink
Merge branch 'Original' into Qt4x5
Browse files Browse the repository at this point in the history
  • Loading branch information
Abs62 committed Dec 19, 2015
2 parents 85fa1de + 38adb08 commit b1f4795
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
Binary file modified help/gdhelp_en.qch
Binary file not shown.
Binary file modified help/gdhelp_ru.qch
Binary file not shown.
7 changes: 7 additions & 0 deletions mainwindow.cc
Expand Up @@ -1565,6 +1565,13 @@ void MainWindow::tabCloseRequested( int x )
if ( cfg.preferences.mruTabOrder && mruList.size() > 0 ) {
ui.tabWidget->setCurrentWidget(mruList.at(0));
}
else if( ui.tabWidget->count() > 1 )
{
//activate neighboring tab
int n = x >= ui.tabWidget->count() - 1 ? x - 1 : x + 1;
if( n >= 0 )
ui.tabWidget->setCurrentIndex( n );
}

ui.tabWidget->removeTab( x );
delete w;
Expand Down
Binary file modified opencc/HKVariants.ocd
Binary file not shown.
18 changes: 13 additions & 5 deletions slob.cc
Expand Up @@ -64,7 +64,7 @@ DEF_EX( exNoResource, "No resource found", Dictionary::Ex )
enum
{
Signature = 0x58424C53, // SLBX on little-endian, XBLS on big-endian
CurrentFormatVersion = 1 + BtreeIndexing::FormatVersion + Folding::Version
CurrentFormatVersion = 2 + BtreeIndexing::FormatVersion + Folding::Version
};

struct IdxHeader
Expand Down Expand Up @@ -92,8 +92,8 @@ const char SLOB_MAGIC[ 8 ] = { 0x21, 0x2d, 0x31, 0x53, 0x4c, 0x4f, 0x42, 0x1f };
struct RefEntry
{
QString key;
quint32 binIndex;
quint16 itemIndex;
quint32 itemIndex;
quint16 binIndex;
QString fragment;
};

Expand Down Expand Up @@ -207,7 +207,7 @@ QString SlobFile::readString( unsigned length )

char term = 0;
int n = str.indexOf( term );
if( n > 0 )
if( n >= 0 )
str.resize( n );

return str;
Expand Down Expand Up @@ -564,7 +564,7 @@ class SlobDictionary: public BtreeIndexing::BtreeDictionary
}

virtual uint32_t getFtsIndexVersion()
{ return 1; }
{ return 2; }

protected:

Expand Down Expand Up @@ -812,8 +812,16 @@ string SlobDictionary::convert( const string & in, RefEntry const & entry )

if( !QFileInfo( imgName ).exists() )
{

// Replace some TeX commands which don't support by mimetex.cgi

QString tex = list[ 2 ];
tex.replace( regFrac, "\\frac" );
tex.replace( "\\leqslant", "\\leq" );
tex.replace( "\\geqslant", "\\geq" );
tex.replace( "\\infin", "\\infty" );
tex.replace( "\\iff", "\\Longleftrightarrow" );
tex.replace( "\\tbinom", "\\binom" );

QString command = texCgiPath + " -e " + imgName
+ " \"" + tex + "\"";
Expand Down
Binary file modified winlibs/lib/libopencc.dll.a
Binary file not shown.
Binary file modified winlibs/lib/opencc.dll
Binary file not shown.

0 comments on commit b1f4795

Please sign in to comment.