[sword-cvs] swordreader/src/gui Main.cpp,1.1.1.1,1.2 Main.h,1.1.1.1,1.2 Navigator.cpp,1.1.1.1,1.2 Navigator.h,1.1.1.1,1.2 SwordIndex.h,1.2,1.3 gui.vcl,1.10,1.11
sword@www.crosswire.org
sword@www.crosswire.org
Sat, 24 Jan 2004 12:45:54 -0700
Update of /cvs/core/swordreader/src/gui
In directory www:/tmp/cvs-serv10139/src/gui
Modified Files:
Main.cpp Main.h Navigator.cpp Navigator.h SwordIndex.h gui.vcl
Log Message:
Fixed stricmp and started adding support for GlobalOptions from sword lib
Index: Main.cpp
===================================================================
RCS file: /cvs/core/swordreader/src/gui/Main.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Main.cpp 16 Jan 2004 17:34:19 -0000 1.1.1.1
+++ Main.cpp 24 Jan 2004 19:45:52 -0000 1.2
@@ -171,6 +171,8 @@
setMenuSelected(g_hwndCB,MENU_TEXT,1);
// Fill up the translation popup menu
makeTranslations();
+ // Fill up the options popup menu
+ makeGlobalOptions();
// Initialize the shell activate info structure
memset (&s_sai, 0, sizeof (s_sai));
s_sai.cbSize = sizeof (s_sai);
@@ -233,6 +235,16 @@
HMENU menuTranslations=CreatePopupMenu();
g_navigator->fillTranslationsMenu(menuTranslations);
InsertMenu(menuMenu,0,MF_POPUP,(UINT)menuTranslations,L"Translation");
+
+ DrawMenuBar(g_hwndCB);
+}
+
+void makeGlobalOptions() {
+ HMENU menuMenu = getSubMenu(g_hwndCB,MENU_MENU);
+
+ HMENU menuGlobalOptions=CreatePopupMenu();
+ g_navigator->fillGlobalOptionsMenu(menuGlobalOptions);
+ InsertMenu(menuMenu,0,MF_POPUP,(UINT)menuGlobalOptions,L"Options");
DrawMenuBar(g_hwndCB);
}
Index: Main.h
===================================================================
RCS file: /cvs/core/swordreader/src/gui/Main.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Main.h 16 Jan 2004 17:34:18 -0000 1.1.1.1
+++ Main.h 24 Jan 2004 19:45:52 -0000 1.2
@@ -22,6 +22,7 @@
HWND CreateRpCommandBar(HWND hwnd);
void makeTranslations();
+void makeGlobalOptions();
LRESULT CALLBACK Error(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
Index: Navigator.cpp
===================================================================
RCS file: /cvs/core/swordreader/src/gui/Navigator.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Navigator.cpp 16 Jan 2004 17:34:19 -0000 1.1.1.1
+++ Navigator.cpp 24 Jan 2004 19:45:52 -0000 1.2
@@ -7,7 +7,10 @@
#include "NavNumbers.h"
#include "NavBooks.h"
#include "NavRenderText.h"
+#include <swordce.h>
+#include <swmgr.h>
+using namespace sword;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
@@ -138,6 +141,22 @@
}
}
checkModuleMenu(1);
+}
+
+void Navigator::fillGlobalOptionsMenu(HMENU menuOptions) {
+ this->menuOptions=menuOptions;
+ if (menuOptions) {
+ int modulenr=1;
+ StringList options = position.manager->getGlobalOptions();
+ for (StringList::iterator i = options.begin(); i != options.end(); i++) {
+ HMENU menuOption = CreatePopupMenu();
+ StringList values = position.manager->getGlobalOptionValues(*i);
+ for (StringList::iterator j = values.begin(); j != values.end(); j++) {
+ addMenu(menuOption, modulenr++, toUString(j->c_str()));
+ }
+ InsertMenu(menuOptions,0,MF_POPUP,(UINT)menuOption, strtowstr(i->c_str()));
+ }
+ }
}
void Navigator::setModule(int id) {
Index: Navigator.h
===================================================================
RCS file: /cvs/core/swordreader/src/gui/Navigator.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Navigator.h 16 Jan 2004 17:34:20 -0000 1.1.1.1
+++ Navigator.h 24 Jan 2004 19:45:52 -0000 1.2
@@ -35,6 +35,7 @@
int mode;
HMENU menuTranslations;
+ HMENU menuOptions;
UString getVerseHeader();
@@ -58,6 +59,7 @@
void updateTitle();
void fillTranslationsMenu(HMENU menuTranslations);
+ void fillGlobalOptionsMenu(HMENU menuTranslations);
void refresh();
Index: SwordIndex.h
===================================================================
RCS file: /cvs/core/swordreader/src/gui/SwordIndex.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- SwordIndex.h 18 Jan 2004 01:03:23 -0000 1.2
+++ SwordIndex.h 24 Jan 2004 19:45:52 -0000 1.3
@@ -36,7 +36,6 @@
private:
static void initManager();
static void leaveManager();
- static sword::SWMgr* manager;
static int indices;
static ModuleMap* texts;
@@ -64,6 +63,7 @@
void setMark();
void jumpBack();
void next();
+ static sword::SWMgr* manager;
bool initialized() { return (bible!=0);};
Index: gui.vcl
===================================================================
RCS file: /cvs/core/swordreader/src/gui/gui.vcl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- gui.vcl 24 Jan 2004 03:11:28 -0000 1.10
+++ gui.vcl 24 Jan 2004 19:45:52 -0000 1.11
@@ -3,13 +3,13 @@
<pre>
<h1>Build Log</h1>
<h3>
---------------------Configuration: gui - Win32 (WCE ARM) Release--------------------
+--------------------Configuration: gui - Win32 (WCE x86) Debug--------------------
</h3>
<h3>Command Lines</h3>
-Creating command line "rc.exe /l 0x409 /fo"ARMRel/BibleReader.res" /i "..\dll1\sword\include" /i "..\dll1\wincesword\include" /i "..\STL_eVC" /d UNDER_CE=300 /d _WIN32_WCE=300 /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "WIN32_PLATFORM_PSPC=310" /d "ARM" /d "_ARM_" /r "D:\src\swordreader\src\gui\BibleReader.rc""
-Creating temporary file "C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP85.tmp" with contents
+Creating command line "rc.exe /l 0x409 /fo"X86Dbg/BibleReader.res" /i "..\dll1\sword\include" /i "..\dll1\wincesword\include" /d UNDER_CE=300 /d _WIN32_WCE=300 /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "WIN32_PLATFORM_PSPC=310" /d "_X86_" /d "x86" /d "_i386_" /r "D:\src\swordreader\src\gui\BibleReader.rc""
+Creating temporary file "C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP5A.tmp" with contents
[
-/nologo /W3 /I "..\STL_eVC" /I "..\..\..\sword\include" /I "..\dll1\wincesword\include" /D _WIN32_WCE=300 /D "WIN32_PLATFORM_PSPC=310" /D "ARM" /D "_ARM_" /D UNDER_CE=300 /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Fp"ARMRel/gui.pch" /YX /Fo"ARMRel/" /Oxs /MC /c
+/nologo /W3 /Zi /Od /I "..\STL_eVC" /I "..\..\..\sword\include" /I "..\dll1\wincesword\include" /D "DEBUG" /D "_i386_" /D UNDER_CE=300 /D _WIN32_WCE=300 /D "WIN32_PLATFORM_PSPC=310" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /FR"X86Dbg/" /Fp"X86Dbg/gui.pch" /YX /Fo"X86Dbg/" /Fd"X86Dbg/" /Gs8192 /GF /c
"D:\src\swordreader\src\gui\ApplicationInterface.cpp"
"D:\src\swordreader\src\gui\Main.cpp"
"D:\src\swordreader\src\gui\NavBooks.cpp"
@@ -19,21 +19,21 @@
"D:\src\swordreader\src\gui\SwordIndex.cpp"
"D:\src\swordreader\src\gui\Utils.cpp"
]
-Creating command line "clarm.exe @C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP85.tmp"
-Creating temporary file "C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP86.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP5A.tmp"
+Creating temporary file "C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP5B.tmp" with contents
[
-..\Dll1\ARMRel\sword.lib htmlview.lib oleaut32.lib commctrl.lib coredll.lib aygshell.lib ..\Dll1\ARMRel\sword.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /incremental:no /pdb:"ARMRel/gui.pdb" /nodefaultlib:"libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /nodefaultlib:oldnames.lib" /out:"ARMRel/gui.exe" /libpath:"..\STL_eVC" /libpath:"C:\IpaqProgs\SwordReader\src\STL_eVC\\" /subsystem:windowsce,3.00 /align:"4096" /MACHINE:ARM
-.\ARMRel\ApplicationInterface.obj
-.\ARMRel\Main.obj
-.\ARMRel\NavBooks.obj
-.\ARMRel\Navigator.obj
-.\ARMRel\NavNumbers.obj
-.\ARMRel\NavRenderText.obj
-.\ARMRel\SwordIndex.obj
-.\ARMRel\Utils.obj
-.\ARMRel\BibleReader.res
+corelibc.lib ..\Dll1\X86Dbg\sword.lib htmlview.lib oleaut32.lib commctrl.lib coredll.lib aygshell.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /incremental:yes /pdb:"X86Dbg/gui.pdb" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:libc.lib /nodefaultlib:libcd.lib /nodefaultlib:libcmt.lib /nodefaultlib:libcmtd.lib /nodefaultlib:msvcrt.lib /nodefaultlib:msvcrtd.lib /nodefaultlib:oldnames.lib /out:"X86Dbg/gui.exe" /subsystem:windowsce,3.00 /MACHINE:IX86
+.\X86Dbg\ApplicationInterface.obj
+.\X86Dbg\Main.obj
+.\X86Dbg\NavBooks.obj
+.\X86Dbg\Navigator.obj
+.\X86Dbg\NavNumbers.obj
+.\X86Dbg\NavRenderText.obj
+.\X86Dbg\SwordIndex.obj
+.\X86Dbg\Utils.obj
+.\X86Dbg\BibleReader.res
]
-Creating command line "link.exe @C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP86.tmp"
+Creating command line "link.exe @C:\DOCUME~1\scribe\LOCALS~1\Temp\RSP5B.tmp"
<h3>Output Window</h3>
Compiling resources...
Compiling...