aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm2
-rw-r--r--apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp8
-rw-r--r--apps/windoze/CBuilder5/BibleCS/mainfrm.cpp7
-rw-r--r--apps/windoze/CBuilder5/BibleCS/sword.bpr8
-rw-r--r--apps/windoze/CBuilder5/BibleCS/sword.cpp80
-rw-r--r--apps/windoze/CBuilder5/BibleCS/sword.resbin1976 -> 1968 bytes
-rw-r--r--apps/windoze/CBuilder5/InstallMgr/InstallMgr.bpr29
-rw-r--r--apps/windoze/CBuilder5/InstallMgr/InstallMgr.cpp3
-rw-r--r--apps/windoze/swdisprtf.cpp17
9 files changed, 105 insertions, 49 deletions
diff --git a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm
index d79b09f..b301641 100644
--- a/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm
+++ b/apps/windoze/CBuilder5/BibleCS/AboutBoxfrm.dfm
@@ -102,7 +102,7 @@ object AboutBox: TAboutBox
Width = 213
Height = 21
AutoSize = False
- Caption = 'v1.5.4rc5'
+ Caption = 'v1.5.4'
IsControl = True
end
object Copyright: TLabel
diff --git a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
index f42ffb1..a304b10 100644
--- a/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/RxRichEditX.cpp
@@ -591,10 +591,18 @@ void TRxRichEditX::fillWithVerses(SWModule *module, ListKey *verses, bool headin
this->SelAttributes->Link = true;
}
if (Visible) {
+ TComponent *owner = this->Owner;
+ TForm *parentForm = dynamic_cast<TForm *>(owner);
+ TWinControl *focus = 0;
+
+ if (parentForm)
+ focus = parentForm->ActiveControl;
this->SetFocus();
SelStart = 0;
SelLength = 0;
SendMessage(Handle, EM_SCROLLCARET, 0, 0);
+ if (focus)
+ focus->SetFocus();
}
Repaint();
diff --git a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
index 3d7aec6..244c406 100644
--- a/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/mainfrm.cpp
@@ -54,8 +54,7 @@ inline AnsiString& operator=(AnsiString& dest, const string& src) {
void __fastcall TForm1::AppMessage(tagMSG &Msg, bool &Handled)
{
- if (Msg.message == WM_VERSE)
- {
+ if (Msg.message == WM_VERSE) {
HKEY hkey;
LONG result;
unsigned long verSize = 32;
@@ -67,6 +66,8 @@ void __fastcall TForm1::AppMessage(tagMSG &Msg, bool &Handled)
result = RegDeleteKey(HKEY_CLASSES_ROOT, "sword\\OpenVerse");
NavigateVerseURL(verStr);
Handled = true;
+ Form1->Show();
+ ::SetForegroundWindow(this->Handle);
}
}
@@ -1493,7 +1494,7 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
// rv = NS_InitEmbedding(nsnull, nsnull);
Application->OnMessage = AppMessage;
- Application->Title = "The SWORD Project for Windows";
+ Application->Title = "The SWORD Project";
}
diff --git a/apps/windoze/CBuilder5/BibleCS/sword.bpr b/apps/windoze/CBuilder5/BibleCS/sword.bpr
index 3fc3a45..d9468d8 100644
--- a/apps/windoze/CBuilder5/BibleCS/sword.bpr
+++ b/apps/windoze/CBuilder5/BibleCS/sword.bpr
@@ -72,8 +72,8 @@ IncludeVerInfo=1
AutoIncBuild=1
MajorVer=1
MinorVer=5
-Release=3
-Build=119
+Release=4
+Build=121
Debug=0
PreRelease=0
Special=0
@@ -85,13 +85,13 @@ CodePage=1252
[Version Info Keys]
CompanyName=CrossWire Software &amp; Bible Society
FileDescription=Windows 32bit User Interface to The SWORD Project
-FileVersion=1.5.3.119
+FileVersion=1.5.4.121
InternalName=biblecs
LegalCopyright=(c) 2002 CrossWire Bible Society under the terms of the GNU General Public License
LegalTrademarks=
OriginalFilename=
ProductName=The SWORD Project
-ProductVersion=1.5.4rc5
+ProductVersion=1.5.4
Comments=Seek Him and you will find Him
[HistoryLists\hlIncludePath]
diff --git a/apps/windoze/CBuilder5/BibleCS/sword.cpp b/apps/windoze/CBuilder5/BibleCS/sword.cpp
index 6bc578e..0bdf69a 100644
--- a/apps/windoze/CBuilder5/BibleCS/sword.cpp
+++ b/apps/windoze/CBuilder5/BibleCS/sword.cpp
@@ -5,6 +5,7 @@
#include <winreg.h>
#include <dir.h>
#include "sword.h"
+#include <thmlplain.h>
USERES("sword.res");
USEFORM("mainfrm.cpp", Form1);
@@ -55,17 +56,41 @@ WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, in
try {
HKEY hkey;
HWND otherInst;
+ ThMLPlain filter;
// see if there's a previous instance running
- otherInst = ::FindWindow(NULL, "The SWORD Project for Windows");
+ otherInst = ::FindWindow(NULL, "The SWORD Project");
// if so, and we have an argument, send the argument to the other instance
if (*lpCmdLine) {
- if (otherInst && *lpCmdLine) {
+ int len = (strlen(lpCmdLine) + 1) * 5;
+ char *buf = new char [len + 1];
+ strcpy(buf, lpCmdLine);
+// filter.ProcessText(buf, len);
+ while (true) {
+ char *change = strstr(buf, "%20");
+ if (change) {
+ change[0] = ' ';
+ change[1] = ' ';
+ change[2] = ' ';
+ }
+ else {
+ change = strstr(buf, "%3A");
+ if (change) {
+ change[0] = ' ';
+ change[1] = ':';
+ change[2] = ' ';
+ }
+ else break;
+ }
+ }
+
+ if (otherInst != NULL) {
result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "sword\\OpenVerse", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
- result = RegSetValueEx(hkey, NULL, 0, REG_SZ, lpCmdLine, strlen(lpCmdLine) + 1);
+ result = RegSetValueEx(hkey, NULL, 0, REG_SZ, buf, strlen(buf) + 1);
result = RegCloseKey(hkey);
PostMessage(otherInst, WM_VERSE, NULL, NULL);
+ delete [] buf;
return 0;
}
@@ -78,6 +103,7 @@ WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, in
}
chdir(dir);
delete [] dir;
+ delete [] buf;
}
// adjust the registry for our private protocol using the current path
@@ -97,31 +123,31 @@ WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, in
/*
// don't override Logos' setting if it exists
result = RegOpenKeyEx(HKEY_CLASSES_ROOT, "libronixdls", 0, KEY_READ | KEY_WRITE, &hkey);
- if (!result) {
- char* libStr = new char[32];
- unsigned long libSize = 32;
- result = RegQueryValueEx(hkey, NULL, NULL, NULL, libStr, &libSize);
- if (!result) {
- if (strstr(libStr, "SWORD")) {
- result = 1;
- }
- }
- }
- if (result) {
- result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "libronixdls", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
- result = RegSetValueEx(hkey, NULL, 0, REG_SZ, "URL:SWORD Protocol", strlen("URL:SWORD Protocol") + 1);
- result = RegSetValueEx(hkey, "URL Protocol", 0, REG_SZ, "", 1);
- result = RegCloseKey(hkey);
- result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "libronixdls\\DefaultIcon", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
- result = RegSetValueEx(hkey, NULL, 0, REG_SZ, Application->ExeName.c_str(), Application->ExeName.Length() + 1);
- result = RegCloseKey(hkey);
- AnsiString opencommand = Application->ExeName + " \"%1\"";
- result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "libronixdls\\shell\\open\\command", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
- result = RegSetValueEx(hkey, NULL, 0, REG_SZ, opencommand.c_str(), opencommand.Length() + 1);
- result = RegCloseKey(hkey);
- }
+ if (!result) {
+ char* libStr = new char[32];
+ unsigned long libSize = 32;
+ result = RegQueryValueEx(hkey, NULL, NULL, NULL, libStr, &libSize);
+ if (!result) {
+ if (strstr(libStr, "SWORD")) {
+ result = 1;
+ }
+ }
+ }
+ if (result) {
+ result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "libronixdls", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
+ result = RegSetValueEx(hkey, NULL, 0, REG_SZ, "URL:SWORD Protocol", strlen("URL:SWORD Protocol") + 1);
+ result = RegSetValueEx(hkey, "URL Protocol", 0, REG_SZ, "", 1);
+ result = RegCloseKey(hkey);
+ result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "libronixdls\\DefaultIcon", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
+ result = RegSetValueEx(hkey, NULL, 0, REG_SZ, Application->ExeName.c_str(), Application->ExeName.Length() + 1);
+ result = RegCloseKey(hkey);
+ AnsiString opencommand = Application->ExeName + " \"%1\"";
+ result = RegCreateKeyEx(HKEY_CLASSES_ROOT, "libronixdls\\shell\\open\\command", NULL, "", NULL, KEY_READ | KEY_WRITE, NULL, &hkey, NULL);
+ result = RegSetValueEx(hkey, NULL, 0, REG_SZ, opencommand.c_str(), opencommand.Length() + 1);
+ result = RegCloseKey(hkey);
+ }
*/
- }
+ }
catch (Exception &exception) {
Application->ShowException(&exception);
}
diff --git a/apps/windoze/CBuilder5/BibleCS/sword.res b/apps/windoze/CBuilder5/BibleCS/sword.res
index c2d0916..935ce20 100644
--- a/apps/windoze/CBuilder5/BibleCS/sword.res
+++ b/apps/windoze/CBuilder5/BibleCS/sword.res
Binary files differ
diff --git a/apps/windoze/CBuilder5/InstallMgr/InstallMgr.bpr b/apps/windoze/CBuilder5/InstallMgr/InstallMgr.bpr
index 1b2a792..e6ef0c5 100644
--- a/apps/windoze/CBuilder5/InstallMgr/InstallMgr.bpr
+++ b/apps/windoze/CBuilder5/InstallMgr/InstallMgr.bpr
@@ -12,7 +12,10 @@
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) MainFrm.dfm StatusFrm.dfm RemoteMntFrm.dfm InfoFrm.dfm
cipherfrm.dfm UninstallFrm.dfm"/>
- <LIBFILES value="zlib.lib ..\..\..\..\lib\swordlib.lib libcurl.lib curl\lib\ws2_32.lib"/>
+ <LIBFILES value="zlib.lib ..\..\..\..\lib\swordlib.lib libcurl.lib curl\lib\ws2_32.lib
+ ..\..\..\..\..\icu-sword\as_is\borland\icui18n.lib
+ ..\..\..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\..\..\icu-sword\as_is\borland\icucommon.lib"/>
<LIBRARIES value="vclx50.lib vcl50.lib"/>
<SPARELIBS value="vcl50.lib vclx50.lib"/>
<PACKAGES value="vcl50.bpi vclx50.bpi vcljpg50.bpi bcbsmp50.bpi qrpt50.bpi vcldb50.bpi
@@ -25,7 +28,7 @@
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="ilink32"/>
- <USERDEFINES value="VCL"/>
+ <USERDEFINES value="VCL;_DEBUG"/>
<SYSDEFINES value="NO_STRICT"/>
<MAINSOURCE value="InstallMgr.cpp"/>
<INCLUDEPATH value="curl\include;..\BibleCS;..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr;$(BCB)\include;$(BCB)\include\vcl;..\..\..\..\include"/>
@@ -37,12 +40,12 @@
<IDLCFLAGS value="-I..\BibleCS -I..\..\..\..\usr\src\sword\apps\windoze\CBuilder4\InstallMgr
-I$(BCB)\include -I$(BCB)\include\vcl -I..\..\..\..\include -src_suffix
cpp -DVCL -boa"/>
- <CFLAG1 value="-O2 -H=c:\PROGRA~1\borland\CBUILD~2\lib\vcl50.csm -Hc -Vx -Ve -RT- -X- -a8
- -b- -k- -vi -c -tW -tWM"/>
- <PFLAGS value="-$Y- -$L- -$D- -v -JPHNE -M"/>
+ <CFLAG1 value="-Od -H=c:\PROGRA~1\borland\CBUILD~2\lib\vcl50.csm -Hc -Vx -Ve -RT- -X- -r-
+ -a8 -b- -k -y -v -vi- -c -tW -tWM"/>
+ <PFLAGS value="-$Y+ -$W -$O- -v -JPHNE -M"/>
<RFLAGS value=""/>
- <AFLAGS value="/mx /w2 /zn"/>
- <LFLAGS value="-D&quot;&quot; -aa -Tpe -x -Gn"/>
+ <AFLAGS value="/mx /w2 /zi"/>
+ <LFLAGS value="-D&quot;&quot; -aa -Tpe -x -Gn -v"/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
@@ -100,12 +103,12 @@ Item0=$(BCB)\source\vcl
[HistoryLists\hlConditionals]
Count=8
-Item0=VCL
-Item1=VCL;__STDC__ true
-Item2=VCL;__STDC__
-Item3=VCL;_MSC_VER
-Item4=VCL __STDC__
-Item5=VCL;_DEBUG
+Item0=VCL;_DEBUG
+Item1=VCL
+Item2=VCL;__STDC__ true
+Item3=VCL;__STDC__
+Item4=VCL;_MSC_VER
+Item5=VCL __STDC__
Item6=_DEBUG;VCL
Item7=_DEBUG
diff --git a/apps/windoze/CBuilder5/InstallMgr/InstallMgr.cpp b/apps/windoze/CBuilder5/InstallMgr/InstallMgr.cpp
index a269603..ce79815 100644
--- a/apps/windoze/CBuilder5/InstallMgr/InstallMgr.cpp
+++ b/apps/windoze/CBuilder5/InstallMgr/InstallMgr.cpp
@@ -12,6 +12,9 @@ USELIB("zlib.lib");
USELIB("..\..\..\..\lib\swordlib.lib");
USELIB("libcurl.lib");
USELIB("curl\lib\ws2_32.lib");
+USELIB("..\..\..\..\..\icu-sword\as_is\borland\icui18n.lib");
+USELIB("..\..\..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\..\..\icu-sword\as_is\borland\icucommon.lib");
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
diff --git a/apps/windoze/swdisprtf.cpp b/apps/windoze/swdisprtf.cpp
index f999301..64429f3 100644
--- a/apps/windoze/swdisprtf.cpp
+++ b/apps/windoze/swdisprtf.cpp
@@ -104,8 +104,23 @@ char SWDispRTF::Display(SWModule &Module) {
this->SelAttributes->Link = true;
}
//{ Position control text at current verse }
- this->SetFocus();
SelStart = 0;
+/*
+ if (Visible) {
+ TComponent *owner = this->Owner;
+ TForm *parentForm = dynamic_cast<TForm *>(owner);
+ TWinControl *focus = 0;
+
+ if (parentForm)
+ focus = parentForm->ActiveControl;
+ this->SetFocus();
+ SelStart = 0;
+ SelLength = 0;
+ SendMessage(Handle, EM_SCROLLCARET, 0, 0);
+ if (focus)
+ focus->SetFocus();
+ }
+*/
SelLength = 0;
SendMessage(Handle, EM_SCROLLCARET, 0, 0);