rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/GreenPad-nt31/ @ 121  →  /GreenPad-nt31/ @ 122
/GreenPad-nt31/GpMain.cpp
@@ -283,49 +283,72 @@
 
void GreenPadWnd::on_initmenu( HMENU menu, bool editmenu_only )
{
/*LOGGER("GreenPadWnd::ReloadConfig on_initmenu begin");
MENUITEMINFO mi = { sizeof(MENUITEMINFO), MIIM_STATE };
#if 0
if(app().isNewShell())
{
MENUITEMINFO mi = { sizeof(MENUITEMINFO), MIIM_STATE };
 
mi.fState =
(edit_.getCursor().isSelected() ? MFS_ENABLED : MFS_DISABLED);
SetMenuItemInfo( menu, ID_CMD_CUT, FALSE, &mi );
SetMenuItemInfo( menu, ID_CMD_COPY, FALSE, &mi );
SetMenuItemInfo( menu, ID_CMD_DELETE, FALSE, &mi );
mi.fState =
(edit_.getCursor().isSelected() ? MFS_ENABLED : MFS_DISABLED);
::SetMenuItemInfo( menu, ID_CMD_CUT, FALSE, &mi );
::SetMenuItemInfo( menu, ID_CMD_COPY, FALSE, &mi );
::SetMenuItemInfo( menu, ID_CMD_DELETE, FALSE, &mi );
 
mi.fState =
(edit_.getDoc().isUndoAble() ? MFS_ENABLED : MFS_DISABLED);
SetMenuItemInfo( menu, ID_CMD_UNDO, FALSE, &mi );
mi.fState =
(edit_.getDoc().isUndoAble() ? MFS_ENABLED : MFS_DISABLED);
::SetMenuItemInfo( menu, ID_CMD_UNDO, FALSE, &mi );
 
mi.fState =
(edit_.getDoc().isRedoAble() ? MFS_ENABLED : MFS_DISABLED);
SetMenuItemInfo( menu, ID_CMD_REDO, FALSE, &mi );
mi.fState =
(edit_.getDoc().isRedoAble() ? MFS_ENABLED : MFS_DISABLED);
::SetMenuItemInfo( menu, ID_CMD_REDO, FALSE, &mi );
 
if( editmenu_only )
if( editmenu_only )
{
LOGGER("GreenPadWnd::ReloadConfig on_initmenu end");
return;
}
 
mi.fState = (isUntitled() || edit_.getDoc().isModified()
? MFS_ENABLED : MFS_DISABLED);
::SetMenuItemInfo( menu, ID_CMD_SAVEFILE, FALSE, &mi );
 
mi.fState =
(!isUntitled() ? MFS_ENABLED : MFS_DISABLED);
::SetMenuItemInfo( menu, ID_CMD_REOPENFILE, FALSE, &mi );
 
mi.fState =
(cfg_.grepExe().len()>0 ? MFS_ENABLED : MFS_DISABLED);
::SetMenuItemInfo( menu, ID_CMD_GREP, FALSE, &mi );
 
UINT id = (wrap_==-1 ? ID_CMD_NOWRAP
: (wrap_>0 ? ID_CMD_WRAPWIDTH : ID_CMD_WRAPWINDOW));
::CheckMenuRadioItem(
menu, ID_CMD_NOWRAP, ID_CMD_WRAPWINDOW, id, MF_BYCOMMAND );
}
else
#endif
{
LOGGER("GreenPadWnd::ReloadConfig on_initmenu end");
return;
}
::EnableMenuItem( menu, ID_CMD_CUT, MF_BYCOMMAND|(edit_.getCursor().isSelected() ? MF_ENABLED : MF_GRAYED) );
::EnableMenuItem( menu, ID_CMD_COPY, MF_BYCOMMAND|(edit_.getCursor().isSelected() ? MF_ENABLED : MF_GRAYED) );
::EnableMenuItem( menu, ID_CMD_DELETE, MF_BYCOMMAND|(edit_.getCursor().isSelected() ? MF_ENABLED : MF_GRAYED) );
::EnableMenuItem( menu, ID_CMD_UNDO, MF_BYCOMMAND|(edit_.getDoc().isUndoAble() ? MF_ENABLED : MF_GRAYED) );
::EnableMenuItem( menu, ID_CMD_REDO, MF_BYCOMMAND|(edit_.getDoc().isRedoAble() ? MF_ENABLED : MF_GRAYED) );
 
mi.fState = (isUntitled() || edit_.getDoc().isModified()
? MFS_ENABLED : MFS_DISABLED);
SetMenuItemInfo( menu, ID_CMD_SAVEFILE, FALSE, &mi );
if( editmenu_only )
{
LOGGER("GreenPadWnd::ReloadConfig on_initmenu end");
return;
}
 
mi.fState =
(!isUntitled() ? MFS_ENABLED : MFS_DISABLED);
SetMenuItemInfo( menu, ID_CMD_REOPENFILE, FALSE, &mi );
::EnableMenuItem( menu, ID_CMD_SAVEFILE, MF_BYCOMMAND|(isUntitled() || edit_.getDoc().isModified() ? MF_ENABLED : MF_GRAYED) );
::EnableMenuItem( menu, ID_CMD_REOPENFILE, MF_BYCOMMAND|(!isUntitled() ? MF_ENABLED : MF_GRAYED) );
::EnableMenuItem( menu, ID_CMD_GREP, MF_BYCOMMAND|(cfg_.grepExe().len()>0 ? MF_ENABLED : MF_GRAYED) );
 
mi.fState =
(cfg_.grepExe().len()>0 ? MFS_ENABLED : MFS_DISABLED);
SetMenuItemInfo( menu, ID_CMD_GREP, FALSE, &mi );
::CheckMenuItem( menu, ID_CMD_NOWRAP, MF_BYCOMMAND|(wrap_==-1?MF_CHECKED:MF_UNCHECKED));
::CheckMenuItem( menu, ID_CMD_WRAPWIDTH, MF_BYCOMMAND|(wrap_>0?MF_CHECKED:MF_UNCHECKED));
::CheckMenuItem( menu, ID_CMD_WRAPWINDOW, MF_BYCOMMAND|(wrap_==0?MF_CHECKED:MF_UNCHECKED));
}
 
/* UINT id = (wrap_==-1 ? ID_CMD_NOWRAP
: (wrap_>0 ? ID_CMD_WRAPWIDTH : ID_CMD_WRAPWINDOW));
::CheckMenuRadioItem(
menu, ID_CMD_NOWRAP, ID_CMD_WRAPWINDOW, id, MF_BYCOMMAND );*/
::CheckMenuItem( menu, ID_CMD_NOWRAP, MF_BYCOMMAND|(wrap_==-1?MF_CHECKED:MFS_UNCHECKED));
::CheckMenuItem( menu, ID_CMD_WRAPWIDTH, MF_BYCOMMAND|(wrap_>0?MF_CHECKED:MFS_UNCHECKED));
::CheckMenuItem( menu, ID_CMD_WRAPWINDOW, MF_BYCOMMAND|(wrap_==0?MF_CHECKED:MFS_UNCHECKED));
 
::CheckMenuItem( menu, ID_CMD_STATUSBAR,
cfg_.showStatusBar()?MFS_CHECKED:MFS_UNCHECKED );
LOGGER("GreenPadWnd::ReloadConfig on_initmenu end");
/GreenPad-nt31/kilib_vc71.vcproj
@@ -263,8 +263,8 @@
</Configuration>
<Configuration
Name="Win32s Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory=".\release"
IntermediateDirectory=".\OBJ/vc71/rel32s"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
@@ -291,10 +291,10 @@
RuntimeTypeInfo="FALSE"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\OBJ/vc71/rel/kilib.pch"
AssemblerListingLocation=".\OBJ/vc71/rel/"
ObjectFile=".\OBJ/vc71/rel/"
ProgramDataBaseFileName=".\OBJ/vc71/rel/"
PrecompiledHeaderFile=".\OBJ/vc71/rel32s/kilib.pch"
AssemblerListingLocation=".\OBJ/vc71/rel32s/"
ObjectFile=".\OBJ/vc71/rel32s/"
ProgramDataBaseFileName=".\OBJ/vc71/rel32s/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="0"
@@ -305,7 +305,7 @@
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386 /SUBSYSTEM:WINDOWS,3.10 /FIXED:NO"
AdditionalDependencies="kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib comctl32.lib comdlg32.lib ole32.lib advapi32.lib imm32.lib uuid.lib"
OutputFile="release/GreenPad.exe"
OutputFile="release/GnPad32s.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="TRUE"
@@ -349,8 +349,8 @@
</Configuration>
<Configuration
Name="Win32s Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
OutputDirectory=".\OBJ"
IntermediateDirectory=".\OBJ/vc71/debug32s"
ConfigurationType="1"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
@@ -376,10 +376,10 @@
RuntimeTypeInfo="FALSE"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\OBJ/vc71/debug/kilib.pch"
AssemblerListingLocation=".\OBJ/vc71/debug/"
ObjectFile=".\OBJ/vc71/debug/"
ProgramDataBaseFileName=".\OBJ/vc71/debug/"
PrecompiledHeaderFile=".\OBJ/vc71/debug32s/kilib.pch"
AssemblerListingLocation=".\OBJ/vc71/debug32s/"
ObjectFile=".\OBJ/vc71/debug32s/"
ProgramDataBaseFileName=".\OBJ/vc71/debug32s/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
@@ -391,7 +391,7 @@
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386 /SUBSYSTEM:WINDOWS,3.10 /FIXED:NO"
AdditionalDependencies="kernel32.lib user32.lib comctl32.lib shell32.lib gdi32.lib comctl32.lib comdlg32.lib ole32.lib advapi32.lib imm32.lib uuid.lib"
OutputFile="OBJ/GreenPad.exe"
OutputFile="OBJ/GPad32sd.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="TRUE"