Skip to content

Commit

Permalink
ダイアログリソース整理 APPVEYOR_SHORTHASH
Browse files Browse the repository at this point in the history
表示非表示をコードで切り替えていたのを変更。
ビルド元ソースの情報は、実行時に変わることはないので埋め込んでしまう。
  • Loading branch information
berryzplus committed Oct 21, 2018
1 parent 983f655 commit f2c30b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
11 changes: 2 additions & 9 deletions sakura_core/dlg/CDlgAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,13 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )
#ifdef APPVEYOR_BUILD_TEXT
m_UrlBuildLinkWnd.SetSubclassWindow( GetItemHwnd( IDC_STATIC_URL_APPVEYOR_BUILD ) );
#endif
#if defined(GITHUB_COMMIT_URL) && defined(APPVEYOR_SHORTHASH)
m_UrlGitHubCommitWnd.SetSubclassWindow(GetItemHwnd(IDC_STATIC_URL_GITHUB_COMMIT));
#ifdef APPVEYOR_SHORTHASH
m_UrlGitHubCommitWnd.SetSubclassWindow( GetItemHwnd( IDC_STATIC_URL_GITHUB_COMMIT ) );
#endif
#if defined(GITHUB_COMMIT_URL_PR_HEAD) && defined(APPVEYOR_PULL_REQUEST_NUMBER)
m_UrlGitHubPRWnd.SetSubclassWindow(GetItemHwnd(IDC_STATIC_URL_GITHUB_PR));
#endif

// GitHub の Commit のリンク
#if defined(GITHUB_COMMIT_URL) && defined(APPVEYOR_SHORTHASH)
::SetWindowText(GetItemHwnd(IDC_STATIC_URL_GITHUB_COMMIT), _T(APPVEYOR_SHORTHASH));
#else
ShowWindow(GetItemHwnd(IDC_STATIC_URL_GITHUB_COMMIT), SW_HIDE);
#endif

// GitHub の PR のリンク
#if defined(GITHUB_COMMIT_URL_PR_HEAD) && defined(APPVEYOR_PULL_REQUEST_NUMBER)
::SetWindowText(GetItemHwnd(IDC_STATIC_URL_GITHUB_PR), _T("PR ") _T(APPVEYOR_PULL_REQUEST_NUMBER));
Expand Down
4 changes: 3 additions & 1 deletion sakura_core/sakura_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ BEGIN
LTEXT APPVEYOR_BUILD_TEXT, IDC_STATIC_URL_APPVEYOR_BUILD, 101, 123, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
LTEXT "GitHub URL:", IDC_STATIC_URL_GITHUB_CAPTION, 33, 133, 50, 8, NOT WS_GROUP
LTEXT "Commit", IDC_STATIC_URL_GITHUB_COMMIT, 101, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#ifdef APPVEYOR_SHORTHASH
LTEXT APPVEYOR_SHORTHASH, IDC_STATIC_URL_GITHUB_COMMIT, 101, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
LTEXT "PR.", IDC_STATIC_URL_GITHUB_PR, 150, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
EDITTEXT IDC_EDIT_ABOUT, 5, 146, 233, 53, ES_MULTILINE | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 97, 203, 50, 14
Expand Down
4 changes: 3 additions & 1 deletion sakura_lang_en_US/sakura_lang_rc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ BEGIN
LTEXT APPVEYOR_BUILD_TEXT, IDC_STATIC_URL_APPVEYOR_BUILD, 101, 123, 120, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
LTEXT "GitHub URL:", IDC_STATIC_URL_GITHUB_CAPTION, 33, 133, 50, 8, NOT WS_GROUP
LTEXT "Commit", IDC_STATIC_URL_GITHUB_COMMIT, 101, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#ifdef APPVEYOR_SHORTHASH
LTEXT APPVEYOR_SHORTHASH, IDC_STATIC_URL_GITHUB_COMMIT, 101, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
#endif
LTEXT "PR.", IDC_STATIC_URL_GITHUB_PR, 150, 133, 30, 8, SS_NOTIFY | NOT WS_GROUP | WS_TABSTOP
EDITTEXT IDC_EDIT_ABOUT, 5, 146, 233, 53, ES_MULTILINE | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
DEFPUSHBUTTON "&OK", IDOK, 97, 203, 50, 14
Expand Down

0 comments on commit f2c30b6

Please sign in to comment.