Skip to content

Commit

Permalink
Merge 89de382 into 31653ea
Browse files Browse the repository at this point in the history
  • Loading branch information
suconbu authored Oct 17, 2020
2 parents 31653ea + 89de382 commit 8c41f0d
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 56 deletions.
22 changes: 15 additions & 7 deletions sakura_core/dlg/CDlgGrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const DWORD p_helpids[] = { //12000
IDC_BUTTON_HELP, HIDC_GREP_BUTTON_HELP, //ヘルプ
IDC_CHK_WORD, HIDC_GREP_CHK_WORD, //単語単位
IDC_CHK_SUBFOLDER, HIDC_GREP_CHK_SUBFOLDER, //サブフォルダも検索
IDC_CHK_FROMTHISTEXT, HIDC_GREP_CHK_FROMTHISTEXT, //このファイルから
IDC_RADIO_FROMFOLDER, HIDC_GREP_RADIO_FROMFOLDER, //フォルダから
IDC_RADIO_FROMTHISTEXT, HIDC_GREP_RADIO_FROMTHISTEXT, //このファイルから
IDC_CHK_LOHICASE, HIDC_GREP_CHK_LOHICASE, //大文字小文字
IDC_CHK_REGULAREXP, HIDC_GREP_CHK_REGULAREXP, //正規表現
IDC_COMBO_CHARSET, HIDC_GREP_COMBO_CHARSET, //文字コードセット
Expand Down Expand Up @@ -417,9 +418,12 @@ BOOL CDlgGrep::OnBnClicked( int wID )
//Stonee, 2001/03/12 第四引数を、機能番号からヘルプトピック番号を調べるようにした
MyWinHelp( GetHwnd(), HELP_CONTEXT, ::FuncID_To_HelpContextID(F_GREP_DIALOG) ); // 2006.10.10 ryoji MyWinHelpに変更に変更
return TRUE;
case IDC_CHK_FROMTHISTEXT: /* この編集中のテキストから検索する */
case IDC_RADIO_FROMFOLDER:
SetDataFromThisText( false );
return TRUE;
case IDC_RADIO_FROMTHISTEXT: /* この編集中のテキストから検索する */
// 2010.05.30 関数化
SetDataFromThisText( 0 != ::IsDlgButtonChecked( GetHwnd(), IDC_CHK_FROMTHISTEXT ) );
SetDataFromThisText( true );
return TRUE;
case IDC_BUTTON_CURRENTFOLDER: /* 現在編集中のファイルのフォルダ */
/* ファイルを開いているか */
Expand Down Expand Up @@ -601,7 +605,11 @@ void CDlgGrep::SetData( void )
::CheckDlgButton( GetHwnd(), IDC_CHK_SUBFOLDER, m_bSubFolder );

// この編集中のテキストから検索する
::CheckDlgButton( GetHwnd(), IDC_CHK_FROMTHISTEXT, m_bFromThisText );
if( m_bFromThisText ){
::CheckDlgButton( GetHwnd(), IDC_RADIO_FROMTHISTEXT, TRUE );
}else{
::CheckDlgButton( GetHwnd(), IDC_RADIO_FROMFOLDER, TRUE );
}
// 2010.05.30 関数化
SetDataFromThisText( m_bFromThisText != FALSE );

Expand Down Expand Up @@ -691,9 +699,9 @@ void CDlgGrep::SetData( void )
// To Here Jun. 29, 2001 genta

if( m_szCurrentFilePath[0] != L'\0' ){
::EnableWindow( GetItemHwnd( IDC_CHK_FROMTHISTEXT ), TRUE );
::EnableWindow( GetItemHwnd( IDC_RADIO_FROMTHISTEXT ), TRUE );
}else{
::EnableWindow( GetItemHwnd( IDC_CHK_FROMTHISTEXT ), FALSE );
::EnableWindow( GetItemHwnd( IDC_RADIO_FROMTHISTEXT ), FALSE );
}

CheckDlgButtonBool( GetHwnd(), IDC_CHECK_FILE_ONLY, m_bGrepOutputFileOnly );
Expand Down Expand Up @@ -743,7 +751,7 @@ int CDlgGrep::GetData( void )
m_bSubFolder = ::IsDlgButtonChecked( GetHwnd(), IDC_CHK_SUBFOLDER );

/* この編集中のテキストから検索する */
m_bFromThisText = ::IsDlgButtonChecked( GetHwnd(), IDC_CHK_FROMTHISTEXT );
m_bFromThisText = ::IsDlgButtonChecked( GetHwnd(), IDC_RADIO_FROMTHISTEXT );

/* 英大文字と英小文字を区別する */
m_sSearchOption.bLoHiCase = (0!=::IsDlgButtonChecked( GetHwnd(), IDC_CHK_LOHICASE ));
Expand Down
3 changes: 2 additions & 1 deletion sakura_core/sakura.hh
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@
#define HIDC_GREP_BUTTON_HELP 12004 //ヘルプ
#define HIDC_GREP_CHK_WORD 12005 //単語単位
#define HIDC_GREP_CHK_SUBFOLDER 12006 //サブフォルダも検索
#define HIDC_GREP_CHK_FROMTHISTEXT 12007 //このファイルから
#define HIDC_GREP_RADIO_FROMTHISTEXT 12007 //このファイルから
#define HIDC_GREP_CHK_LOHICASE 12008 //大文字小文字
#define HIDC_GREP_CHK_REGULAREXP 12009 //正規表現
// #define HIDC_GREP_CHK_KANJICODEAUTODETECT 12010 //文字コードセット自動判別
Expand All @@ -832,6 +832,7 @@
#define HIDC_GREP_CHECK_CP 12025 //コードページ
#define HIDC_GREP_COMBO_EXCLUDE_FILE 12026 //除外ファイル
#define HIDC_GREP_COMBO_EXCLUDE_FOLDER 12027 //除外フォルダ
#define HIDC_GREP_RADIO_FROMFOLDER 12028 //フォルダから

//外部コマンド
#define HIDC_EXEC_BUTTON_REFERENCE 12100 //参照
Expand Down
4 changes: 2 additions & 2 deletions sakura_core/sakura_rc.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
#define IDC_CHECK_EXITCONFIRM 1035
#define IDC_CHECK_PLSQL 1036
#define IDC_CHECK_SHIFT 1037
#define IDC_CHK_FROMTHISTEXT 1038
#define IDC_RADIO_FROMTHISTEXT 1038
#define IDC_CHECK_TOOLBARISFLAT 1039
#define IDC_CHECK_RELOADWHENEXECUTE 1040
#define IDC_CHECK_DOCICON 1041
Expand Down Expand Up @@ -160,7 +160,7 @@
#define IDC_BUTTON_HELP 1091
#define IDC_BUTTON_OPENMDLL 1092
#define IDC_BUTTON_OPENMDICT 1093
//#define IDC_EDIT_TO 1094
#define IDC_RADIO_FROMFOLDER 1094
#define IDC_EDIT_BLOCKCOMMENT_TO 1095
#define IDC_EDIT_BLOCKCOMMENT_TO2 1096
#define IDC_EDIT_TYPEEXTS 1097
Expand Down
88 changes: 44 additions & 44 deletions sakura_core/sakura_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -173,51 +173,51 @@ BEGIN
COMBOBOX IDC_COMBO_nSortType, 34, 3, 94, 65, CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END

IDD_GREP DIALOGEX 0, 0, 348, 273
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_GREP DIALOGEX 0, 0, 420, 179
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Grep条件入力"
FONT 9, "MS Pゴシック"
BEGIN
LTEXT "条件(&N)", IDC_STATIC, 5, 6, 52, 10
COMBOBOX IDC_COMBO_TEXT, 64, 6, 273, 120, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "ファイル(&T)", IDC_STATIC, 5, 21, 52, 10, NOT WS_GROUP
COMBOBOX IDC_COMBO_FILE, 64, 21, 273, 120, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "フォルダ(&O)", IDC_STATIC, 5, 36, 52, 10
COMBOBOX IDC_COMBO_FOLDER, 64, 36, 262, 120, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&...", IDC_BUTTON_FOLDER, 328, 36, 9, 13

LTEXT "除外ファイル", IDC_STATIC, 5, 51, 52, 10, NOT WS_GROUP
COMBOBOX IDC_COMBO_EXCLUDE_FILE, 64, 51, 273, 120, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "除外フォルダ", IDC_STATIC, 5, 66, 52, 10
COMBOBOX IDC_COMBO_EXCLUDE_FOLDER, 64, 66, 273, 120, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP

CONTROL "単語単位で探す(&W)", IDC_CHK_WORD, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP, 5, 81, 73, 10
CONTROL "サブフォルダからも検索する(&S)", IDC_CHK_SUBFOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 97, 113, 10
CONTROL "現在編集中のファイルから検索(&Q)", IDC_CHK_FROMTHISTEXT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 113, 125, 10
CONTROL "英大文字と小文字を区別する(&C)", IDC_CHK_LOHICASE, "Button", BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP, 5, 129, 119, 10
CONTROL "ファイル毎最初のみ検索(&G)",IDC_CHECK_FILE_ONLY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 145, 119, 10
CONTROL "フォルダ毎に表示(&Y)", IDC_CHECK_SEP_FOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 161, 83, 10
CONTROL "ベースフォルダ表示(&V)", IDC_CHECK_BASE_PATH, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 177, 83, 10
LTEXT "文字コードセット(&A)", IDC_STATIC, 18, 193, 62, 10
COMBOBOX IDC_COMBO_CHARSET, 85, 193, 65, 101, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "CP(&2)", IDC_CHECK_CP, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 155, 193, 30, 10
CONTROL "フォルダの初期値をカレントフォルダにする(&D)", IDC_CHK_DEFAULTFOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 209, 164, 10
CONTROL "正規表現(&E)", IDC_CHK_REGULAREXP, "Button", BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP, 5, 225, 55, 10
LTEXT "JRE Status", IDC_STATIC_JRE32VER, 18, 241, 159, 10
GROUPBOX "結果出力", IDC_STATIC, 150, 84, 107, 46, WS_GROUP
CONTROL "該当行(&L)", IDC_RADIO_OUTPUTLINE, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 155, 94, 83, 10
CONTROL "該当部分(&P)", IDC_RADIO_OUTPUTMARKED, "Button", BS_AUTORADIOBUTTON, 155, 105, 83, 10
CONTROL "否該当行(&1)", IDC_RADIO_NOHIT, "Button", BS_AUTORADIOBUTTON, 155, 117, 83, 10
GROUPBOX "結果出力形式", IDC_STATIC, 150, 134, 107, 47, WS_GROUP
CONTROL "ノーマル(&M)", IDC_RADIO_OUTPUTSTYLE1, "Button", BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP, 155, 144, 83, 10
CONTROL "ファイル毎(&I)",IDC_RADIO_OUTPUTSTYLE2, "Button", BS_AUTORADIOBUTTON, 155, 156, 83, 10
CONTROL "結果のみ(&R)",IDC_RADIO_OUTPUTSTYLE3, "Button", BS_AUTORADIOBUTTON, 155, 168, 83, 10
PUSHBUTTON "上フォルダ(&B)", IDC_BUTTON_FOLDER_UP, 288, 83, 49, 14
PUSHBUTTON "現フォルダ(&U)", IDC_BUTTON_CURRENTFOLDER, 288, 105, 49, 14, BS_MULTILINE
DEFPUSHBUTTON "検索(&F)", IDOK, 288, 128, 49, 14, WS_GROUP
PUSHBUTTON "キャンセル(&X)", IDCANCEL, 288, 152, 49, 14
PUSHBUTTON "ヘルプ(&H)", IDC_BUTTON_HELP, 288, 177, 49,14
FONT 9, "Yu Gothic UI"
BEGIN
LTEXT "条件(&N)",IDC_STATIC,8,8,48,8
COMBOBOX IDC_COMBO_TEXT,60,8,284,120,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
CONTROL "単語単位(&W)",IDC_CHK_WORD,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,60,20,56,8
CONTROL "英大小文字区別(&C)",IDC_CHK_LOHICASE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,124,20,76,8
CONTROL "正規表現(&E)",IDC_CHK_REGULAREXP,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,208,20,55,8
LTEXT "JRE Status",IDC_STATIC_JRE32VER,208,28,136,8
LTEXT "検索場所",IDC_STATIC,8,40,48,8
CONTROL "フォルダ(&D)",IDC_RADIO_FROMFOLDER,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,60,40,60,8
CONTROL "編集中のファイル(&M)",IDC_RADIO_FROMTHISTEXT,"Button",BS_AUTORADIOBUTTON,124,40,72,8
COMBOBOX IDC_COMBO_FOLDER,60,50,266,120,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "&...",IDC_BUTTON_FOLDER,328,50,16,10
CONTROL "サブフォルダも検索(&S)",IDC_CHK_SUBFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,62,80,10
CONTROL "カレントフォルダが初期値(&K)",IDC_CHK_DEFAULTFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,144,62,100,10
PUSHBUTTON "上階層へ(&U)",IDC_BUTTON_FOLDER_UP,248,62,48,12
PUSHBUTTON "現フォルダ(&G)",IDC_BUTTON_CURRENTFOLDER,296,62,48,12,BS_MULTILINE
LTEXT "対象ファイル(&T)",IDC_STATIC,8,84,48,8,NOT WS_GROUP
COMBOBOX IDC_COMBO_FILE,60,84,284,120,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "除外ファイル(&J)",IDC_STATIC,8,96,48,8,NOT WS_GROUP
COMBOBOX IDC_COMBO_EXCLUDE_FILE,60,96,284,120,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "除外フォルダ(&L)",IDC_STATIC,8,108,48,8
COMBOBOX IDC_COMBO_EXCLUDE_FOLDER,60,108,284,120,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
GROUPBOX "結果出力",IDC_STATIC,60,124,76,48,WS_GROUP
CONTROL "該当行(&1)",IDC_RADIO_OUTPUTLINE,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,68,136,60,8
CONTROL "該当部分(&2)",IDC_RADIO_OUTPUTMARKED,"Button",BS_AUTORADIOBUTTON,68,148,60,8
CONTROL "否該当行(&3)",IDC_RADIO_NOHIT,"Button",BS_AUTORADIOBUTTON,68,160,60,8
GROUPBOX "結果出力形式",IDC_STATIC,144,124,76,48,WS_GROUP
CONTROL "ノーマル(&4)",IDC_RADIO_OUTPUTSTYLE1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,152,136,60,8
CONTROL "ファイル毎(&5)",IDC_RADIO_OUTPUTSTYLE2,"Button",BS_AUTORADIOBUTTON,152,148,60,8
CONTROL "結果のみ(&6)",IDC_RADIO_OUTPUTSTYLE3,"Button",BS_AUTORADIOBUTTON,152,160,60,8
GROUPBOX "その他",IDC_STATIC,228,124,184,48,WS_GROUP
CONTROL "ファイル毎最初のみ検索(&7)",IDC_CHECK_FILE_ONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,236,136,100,8
CONTROL "フォルダ毎に表示(&8)",IDC_CHECK_SEP_FOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,236,148,100,8
CONTROL "ベースフォルダ表示(&9)",IDC_CHECK_BASE_PATH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,236,160,100,8
LTEXT "文字コードセット(&A)",IDC_STATIC,340,136,62,8
COMBOBOX IDC_COMBO_CHARSET,340,146,65,101,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "CP(&P)",IDC_CHECK_CP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,340,160,30,8
DEFPUSHBUTTON "検索(&F)",IDOK,352,8,60,20,WS_GROUP
PUSHBUTTON "キャンセル(&X)",IDCANCEL,352,32,60,12
PUSHBUTTON "ヘルプ(&H)",IDC_BUTTON_HELP,352,48,60,12
END

IDD_GREP_REPLACE DIALOGEX 0, 0, 348, 304
Expand All @@ -244,7 +244,7 @@ BEGIN

CONTROL "単語単位で探す(&W)", IDC_CHK_WORD, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP, 5, 97, 73, 10
CONTROL "サブフォルダからも検索する(&S)", IDC_CHK_SUBFOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 113, 113, 10
CONTROL "現在編集中のファイルから検索(&Q)", IDC_CHK_FROMTHISTEXT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 129, 125, 10
CONTROL "現在編集中のファイルから検索(&Q)", IDC_RADIO_FROMTHISTEXT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 129, 125, 10
CONTROL "英大文字と小文字を区別する(&C)", IDC_CHK_LOHICASE, "Button", BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP, 5, 145, 119, 10
CONTROL "ファイル毎最初のみ検索(&G)",IDC_CHECK_FILE_ONLY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 161, 119, 10
CONTROL "フォルダ毎に表示(&Y)", IDC_CHECK_SEP_FOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 177, 83, 10
Expand Down
4 changes: 2 additions & 2 deletions sakura_lang_en_US/sakura_lang_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ BEGIN

CONTROL "Match Whole &Word", IDC_CHK_WORD, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP, 5, 81, 73, 10
CONTROL "Search &Sub Folders", IDC_CHK_SUBFOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 97, 113, 10
CONTROL "Search from current file(&Q)", IDC_CHK_FROMTHISTEXT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP, 5, 113, 125, 10
CONTROL "Search from current file(&Q)", IDC_RADIO_FROMTHISTEXT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP, 5, 113, 125, 10
CONTROL "&Case Sensitive", IDC_CHK_LOHICASE, "Button", BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP, 5, 129, 119, 10
CONTROL "Match Once Per File(&G)",IDC_CHECK_FILE_ONLY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 145, 119, 10
CONTROL "Output per director&y", IDC_CHECK_SEP_FOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 161, 83, 10
Expand Down Expand Up @@ -250,7 +250,7 @@ BEGIN

CONTROL "Match Whole &Word", IDC_CHK_WORD, "Button", BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP, 5, 97, 73, 10
CONTROL "Search &Sub Folders", IDC_CHK_SUBFOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 113, 113, 10
CONTROL "Search from current file(&Q)", IDC_CHK_FROMTHISTEXT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP, 5, 129, 125, 10
CONTROL "Search from current file(&Q)", IDC_RADIO_FROMTHISTEXT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP, 5, 129, 125, 10
CONTROL "&Case Sensitive", IDC_CHK_LOHICASE, "Button", BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP, 5, 145, 119, 10
CONTROL "Match Once Per File(&G)",IDC_CHECK_FILE_ONLY,"Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 161, 119, 10
CONTROL "Output per director&y", IDC_CHECK_SEP_FOLDER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 5, 177, 83, 10
Expand Down

0 comments on commit 8c41f0d

Please sign in to comment.