[Amis-vcs] SF.net SVN: amis: [2222] branches/amis3
Brought to you by:
julienq,
marisademeglio
From: <mar...@us...> - 2007-11-05 22:19:50
|
Revision: 2222 http://amis.svn.sourceforge.net/amis/?rev=2222&view=rev Author: marisademeglio Date: 2007-11-05 14:19:49 -0800 (Mon, 05 Nov 2007) Log Message: ----------- Added (untested) code to retrieve the text (but not the audio yet) title and author. Added "close" menu item to accessible UI XML file. Added new dialog (not being used yet) for publication information. Removed unused dialogs: current position, navigation options, colors page Modified Paths: -------------- branches/amis3/AmisCore/src/dtb/Dtb.cpp branches/amis3/AmisGuiMFC2/AmisGuiMFC2.aps branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc branches/amis3/AmisGuiMFC2/resource.h branches/amis3/DefaultLangpack/amisAccessibleUi.xml Modified: branches/amis3/AmisCore/src/dtb/Dtb.cpp =================================================================== --- branches/amis3/AmisCore/src/dtb/Dtb.cpp 2007-11-05 20:22:52 UTC (rev 2221) +++ branches/amis3/AmisCore/src/dtb/Dtb.cpp 2007-11-05 22:19:49 UTC (rev 2222) @@ -275,7 +275,20 @@ //the spine visitor also makes the smil file paths absolute mpSpine = spine_visitor.getSpine(mpNavModel, this->getFileSet()->getBookDirectory()); + //fill in the text for the title and the author mUid = getUid(); + mpTitle = new amis::MediaGroup(); + amis::TextNode* p_title_text = new amis::TextNode(); + p_title_text->setTextString(mpMetadata->getMetadata("dc:title")); + mpTitle->setText(p_title_text); + + mpAuthor = new amis::MediaGroup(); + amis::TextNode p_author_text = new amis::TextNode(); + p_author_text->setTextString(mpMetadata->getMetadata("dc:creator")); + mpAuthor->setText(p_author_text); + + //TODO: get the audio for the title and author + mpFiles->setAdditionalDataAfterInitialParse(this->mUid, NULL, NULL); amis::dtb::nav::ResolveSmilDataVisitor resolve_smil_visitor; resolve_smil_visitor.resolve(mpNavModel, mpSpine, true); Modified: branches/amis3/AmisGuiMFC2/AmisGuiMFC2.aps =================================================================== (Binary files differ) Modified: branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc =================================================================== --- branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc 2007-11-05 20:22:52 UTC (rev 2221) +++ branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc 2007-11-05 22:19:49 UTC (rev 2222) @@ -88,7 +88,7 @@ BOTTOMMARGIN, 280 END - IDD_PROPPAGE4, DIALOG + IDD_LANGUAGES, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 222 @@ -96,7 +96,7 @@ BOTTOMMARGIN, 215 END - IDD_PROPPAGE1, DIALOG + IDD_PREFERENCES, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 249 @@ -120,14 +120,6 @@ BOTTOMMARGIN, 48 END - IDD_CURRENTPOSITION, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 232 - TOPMARGIN, 7 - BOTTOMMARGIN, 165 - END - IDD_CDSEARCH, DIALOG BEGIN LEFTMARGIN, 7 @@ -144,30 +136,14 @@ BOTTOMMARGIN, 90 END - IDD_NAVIGATIONOPTIONS, DIALOG + IDD_PUBLICATIONINFO, DIALOG BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 240 - TOPMARGIN, 7 - BOTTOMMARGIN, 168 - END - - IDD_FULLSUMMARY, DIALOG - BEGIN LEFTMARGIN, 6 - RIGHTMARGIN, 248 + RIGHTMARGIN, 393 TOPMARGIN, 7 - BOTTOMMARGIN, 171 + BOTTOMMARGIN, 270 END - IDD_PROPPAGE2, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 203 - TOPMARGIN, 7 - BOTTOMMARGIN, 200 - END - IDD_OPENURL, DIALOG BEGIN LEFTMARGIN, 7 @@ -319,7 +295,7 @@ CONTROL 186,IDC_PICTURE,"Static",SS_BITMAP,7,7,86,79 END -IDD_PROPPAGE4 DIALOGEX 0, 0, 229, 223 +IDD_LANGUAGES DIALOGEX 0, 0, 229, 223 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Language" FONT 8, "MS Sans Serif", 0, 0, 0x0 @@ -335,7 +311,7 @@ LTEXT "Your language choices are:",IDC_STATIC,7,57,56,8 END -IDD_PROPPAGE1 DIALOGEX 0, 0, 256, 236 +IDD_PREFERENCES DIALOGEX 0, 0, 256, 236 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General Preferences" FONT 8, "MS Sans Serif", 0, 0, 0x0 @@ -383,18 +359,6 @@ EDITTEXT IDC_SEARCHSTRING,7,7,106,13,ES_AUTOHSCROLL END -IDD_CURRENTPOSITION DIALOGEX 0, 0, 239, 172 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Current Position" -FONT 8, "MS Sans Serif", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,95,151,50,14 - LTEXT "This is a list of data about your current position.", - IDC_LISTCAPTION,7,7,225,17 - CONTROL "",IDC_SUMMARY,"SysListView32",LVS_LIST | LVS_ALIGNLEFT | - WS_BORDER | WS_TABSTOP,7,23,225,119,WS_EX_LEFTSCROLLBAR -END - IDD_CDSEARCH DIALOGEX 0, 0, 253, 180 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Multiple books found" @@ -414,66 +378,36 @@ CAPTION "About AMIS" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - ICON IDI_AMIS,IDC_STATIC,11,17,21,20 + ICON IDI_AMIS,IDC_STATIC,11,17,20,20 LTEXT "AMIS: \nAdaptive Multimedia Information System", IDC_AMISNAME,40,10,132,31,SS_NOPREFIX - LTEXT "Copyright \xA9 2006 DAISY for All",IDC_COPYRIGHT,40,82,119, + LTEXT "Copyright \xA9 2008 DAISY for All",IDC_COPYRIGHT,40,82,119, 8 DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP - LTEXT "Version 2.0",IDC_VERSION,39,44,128,8 - LTEXT "Release Date: 23 Oct 2005",IDC_VERSIONNOTE,40,59,124,11 + LTEXT "Version 3.0 beta",IDC_VERSION,39,44,128,8 + LTEXT "Release Date: 01 January 2008",IDC_VERSIONNOTE,40,59, + 124,11 END -IDD_NAVIGATIONOPTIONS DIALOGEX 0, 0, 247, 175 +IDD_PUBLICATIONINFO DIALOGEX 0, 0, 400, 278 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Navigation Options" -FONT 8, "MS Sans Serif", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,100,154,50,14 - LTEXT "This is a list of items to which you may navigate directly.", - IDC_LISTCAPTION,7,7,225,17 - CONTROL "",IDC_SUMMARY,"SysListView32",LVS_LIST | LVS_ALIGNLEFT | - WS_BORDER | WS_TABSTOP,7,31,233,119,WS_EX_LEFTSCROLLBAR -END - -IDD_FULLSUMMARY DIALOGEX 0, 0, 255, 178 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Publication Summary" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - DEFPUSHBUTTON "OK",IDOK,107,157,50,14 - LTEXT "This is a list of publication metadata.", - IDC_LISTCAPTION,6,7,242,17 - CONTROL "",IDC_SUMMARY,"SysListView32",LVS_LIST | LVS_ALIGNLEFT | - WS_BORDER | WS_TABSTOP,6,31,242,119,WS_EX_LEFTSCROLLBAR + DEFPUSHBUTTON "OK",IDOK,176,256,50,14 + LTEXT "About: TITLE by CREATOR",IDC_DIALOGCAPTION,6,7,387,17 + CONTROL "",IDC_PUBLICATIONINFO,"SysListView32",LVS_LIST | + LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,6,126,387,119, + WS_EX_LEFTSCROLLBAR + LTEXT "About your current position:", + IDC_CURRENTPOSITIONCAPTION,6,27,387,17 + CONTROL "",IDC_CURRENTPOSITION2,"SysListView32",LVS_LIST | + LVS_SINGLESEL | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7, + 46,386,47,WS_EX_LEFTSCROLLBAR + LTEXT "About this publication:",IDC_PUBLICATIONINFOCAPTION,6, + 107,387,16 END -IDD_PROPPAGE2 DIALOGEX 0, 0, 210, 207 -STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Set Colors" -FONT 8, "MS Sans Serif", 0, 0, 0x0 -BEGIN - GROUPBOX "Phrase Highlighting",IDC_PHRASES,7,7,196,73 - LTEXT "Text Foreground:",IDC_TEXTFG,15,21,58,9 - PUSHBUTTON "",IDC_BTN_TEXTFG,79,17,19,14,BS_FLAT - LTEXT "Text Background:",IDC_TEXTBG,13,42,58,9 - PUSHBUTTON "",IDC_BTN_TEXTBG,79,38,19,14,BS_FLAT - LTEXT "Selection Border:",IDC_BORDER,15,64,55,9,NOT WS_VISIBLE - PUSHBUTTON "",IDC_BTN_BORDER,79,61,19,14,BS_FLAT | NOT WS_VISIBLE - GROUPBOX "High Contrast Settings",IDC_CONTRAST,7,87,196,75 - LTEXT "Page Foreground:",IDC_PAGEFG,14,112,58,9 - PUSHBUTTON "",IDC_BTN_PAGEFG,80,109,19,14,BS_FLAT - LTEXT "Page Background:",IDC_PAGEBG,14,133,61,9 - PUSHBUTTON "",IDC_BTN_PAGEBG,80,130,19,14,BS_FLAT - PUSHBUTTON "Reset Colors",IDC_BTN_RESETCOLORS,146,185,57,15 - CONTROL "Preview of phrase highlight colors.",IDC_PHRASEPREVIEW, - "RichEdit20A",ES_MULTILINE | ES_AUTOHSCROLL | WS_BORDER | - WS_TABSTOP,113,14,90,63 - CONTROL "Preview of page contrast colors.",IDC_CONTRASTPREVIEW, - "RichEdit20A",ES_MULTILINE | ES_AUTOHSCROLL | WS_BORDER | - WS_TABSTOP,113,95,90,63 -END - IDD_OPENURL DIALOGEX 0, 0, 265, 70 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU @@ -582,13 +516,14 @@ VK_UP, ID_MENU_PLAY_VOLUP, VIRTKEY, CONTROL, NOINVERT VK_SPACE, ID_MENU_PLAYPAUSE, VIRTKEY, NOINVERT VK_F11, ID_MENU_VIEW_BASIC, VIRTKEY, NOINVERT - "S", ID_VIEW_CONTRAST, VIRTKEY, CONTROL, NOINVERT "E", ID_RESET_HIGHLIGHT_COLORS, VIRTKEY, SHIFT, CONTROL, NOINVERT "F", ID_TOGGLE_AUDIO_CONTENT_PLAYBACK, VIRTKEY, SHIFT, CONTROL, NOINVERT "G", ID_TOGGLE_AUDIO_SELFVOICING_PLAYBACK, VIRTKEY, SHIFT, CONTROL, NOINVERT + "S", ID_VIEW_CONTRAST, VIRTKEY, CONTROL, NOINVERT + "U", ID_MENU_FILE_OPENFROMURL, VIRTKEY, CONTROL, NOINVERT END @@ -720,6 +655,7 @@ STRINGTABLE BEGIN ID_MENU_PLAYPAUSE "Start synchronized playback." + ID_MENU_FILE_CLOSE "Close the publication." END #endif // English (U.S.) resources Modified: branches/amis3/AmisGuiMFC2/resource.h =================================================================== --- branches/amis3/AmisGuiMFC2/resource.h 2007-11-05 20:22:52 UTC (rev 2221) +++ branches/amis3/AmisGuiMFC2/resource.h 2007-11-05 22:19:49 UTC (rev 2222) @@ -5,9 +5,10 @@ #define IDD_ABOUTBOX 100 #define IDS_PROPSHT_CAPTION 102 #define IDD_SIDEBAR 103 -#define IDD_PROPPAGE2 106 #define IDD_PROPPAGE1 110 +#define IDD_PREFERENCES 110 #define IDD_PROPPAGE4 112 +#define IDD_LANGUAGES 112 #define ID_FOCUS_ON_SIDEBAR 123 #define ID_HEAR_LAST_PROMPT 124 #define ID_HEAR_INSTRUCTIONS 125 @@ -28,8 +29,7 @@ #define IDD_GOTOPAGE 180 #define IDD_CDSEARCH 181 #define IDD_FULLSUMMARY 182 -#define IDD_CURRENTPOSITION 183 -#define IDD_NAVIGATIONOPTIONS 184 +#define IDD_PUBLICATIONINFO 182 #define IDI_LANGICON 185 #define IDD_PROPPAGE3 185 #define IDB_BOOKSHELFMAG 186 @@ -89,7 +89,12 @@ #define IDC_TEXTFG 1079 #define IDC_URL 1079 #define IDC_TEXTBG 1080 +#define IDC_DIALOGCAPTION 1080 #define IDC_BORDER 1081 +#define IDC_PUBLICATIONINFO 1081 +#define IDC_CURRENTPOSITIONCAPTION 1082 +#define IDC_CURRENTPOSITION2 1083 +#define IDC_PUBLICATIONINFOCAPTION 1084 #define ID_MENU_FIND_IN_TEXT_NEXT 9000 #define IDC_LANGLIST 9001 #define ID_MENU_FIND_IN_TEXT_PREV 9001 @@ -135,8 +140,8 @@ #define ID_MENU_NAV_FINDINTEXT 32859 #define ID_MENU_NAV_GOTOPAGE 32860 #define ID_MENU_PLAYPAUSE 32865 -#define ID_MENU_FILE_CLOSE 32867 #define ID_MENU_FILE_OPENFROMURL 32870 +#define ID_MENU_FILE_CLOSE 32871 #define IDS_NOSKIP 61245 #define IDS_SELFOLDER_TITLE 61258 #define IDS_SELFOLDER_INSTR 61259 @@ -151,8 +156,8 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 191 -#define _APS_NEXT_COMMAND_VALUE 32871 -#define _APS_NEXT_CONTROL_VALUE 1080 +#define _APS_NEXT_COMMAND_VALUE 32873 +#define _APS_NEXT_CONTROL_VALUE 1083 #define _APS_NEXT_SYMED_VALUE 141 #endif #endif Modified: branches/amis3/DefaultLangpack/amisAccessibleUi.xml =================================================================== --- branches/amis3/DefaultLangpack/amisAccessibleUi.xml 2007-11-05 20:22:52 UTC (rev 2221) +++ branches/amis3/DefaultLangpack/amisAccessibleUi.xml 2007-11-05 22:19:49 UTC (rev 2222) @@ -17,7 +17,7 @@ <audio src="./audio/003_Open.mp3" from="file:///c:/devel/amis/Defaultlangpack/prompts/prom0004.smil#text_0004" /> </caption> <description> - <text>Open a Daisy book from the local file system</text> + <text>Open a DAISY book from the local file system</text> <originalText>Open a Daisy book from the local file system</originalText> <audio src="./audio/004_Open_a_Daisy_book_from_the_loc.mp3" from="file:///c:/devel/amis/Defaultlangpack/prompts/prom0005.smil#text_0005" /> </description> @@ -33,6 +33,23 @@ </mnemonic> </action> <!--new action--> + <action mfcid="ID_MENU_FILE_CLOSE" widget="menuItem"> + <note>This is going to be a menu item</note> + <icon src="./close.png" type="smallIcon" /> + <caption> + <text>Close</text> + <originalText>Close</originalText> + </caption> + <description> + <text>Close the DAISY publication.</text> + <originalText>Close the DAISY publication.</originalText> + </description> + <mnemonic> + <text>C</text> + <originalText>C</originalText> + </mnemonic> + </action> + <!--new action--> <action mfcid="ID_MENU_FILE_OPENURL" widget="menuItem"> <note>This is going to be a menu item</note> <icon src="./open.png" type="smallIcon" /> @@ -41,13 +58,17 @@ <originalText>Open URL...</originalText> </caption> <description> - <text>Open a Daisy book from a URL</text> + <text>Open a DAISY publication from a URL</text> <originalText>Open a Daisy book from a URL</originalText> </description> <accelerator> <text>Ctrl+U</text> <originalText>Ctrl+U</originalText> </accelerator> + <mnemonic> + <text>U</text> + <originalText>U</originalText> + </mnemonic> </action> <action mfcid="ID_MENU_FILE_LOADCD" widget="menuItem toolbarItem"> <note>This is going to be a menu item and a toolbar item</note> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |