Skip to content

Commit 7526f12

Browse files
committed
PatchUnicode-1046 v0.12 ダイアログを閉じるときの警告を削除
1 parent 2718c8c commit 7526f12

File tree

3 files changed

+3
-39
lines changed

3 files changed

+3
-39
lines changed

sakura_core/dlg/CDlgFavorite.cpp

+3-37
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
#include "StdAfx.h"
3535
#include <algorithm>
36-
#include <tuple>
3736
#include "CDlgFavorite.h"
3837
#include "dlg/CDlgInput1.h"
3938
#include "env/DLLSHAREDATA.h"
@@ -90,8 +89,7 @@ static int FormatFavoriteColumn( WCHAR*, int, int , bool );
9089
static int ListView_GetLParamInt( HWND, int );
9190
static int CALLBACK CompareListViewFunc( LPARAM, LPARAM, LPARAM );
9291

93-
const int nFavoriteMax = 3;
94-
const int nFavoriteLimitOffset = 20;
92+
const int nFavoriteLimitOffset = 5;
9593
const int ignoreTab = 3;
9694

9795
struct CompareListViewLParam
@@ -356,31 +354,18 @@ void CDlgFavorite::SetDataOne( int nIndex, int nLvItemIndex )
356354
int CDlgFavorite::GetData( void )
357355
{
358356
int nTab;
359-
std::wstring strReachFavLimitMsg;
360-
std::tuple<int,int> FavoriteCountAndHistory;
361357

362358
for( nTab = 0; m_aFavoriteInfo[nTab].m_pRecent; nTab++ )
363359
{
364360
if( m_aFavoriteInfo[nTab].m_bHaveFavorite )
365361
{
366-
GetFavorite(nTab);
367-
FavoriteCountAndHistory = GetListFavorite(nTab);
368-
if (std::get<0>(FavoriteCountAndHistory) >= nFavoriteMax) {
369-
std::wstring buffer = strprintf(L"%s : %d (%d)\n", m_aFavoriteInfo[nTab].m_strCaption.c_str(), std::get<0>(FavoriteCountAndHistory), std::get<1>(FavoriteCountAndHistory));
370-
strReachFavLimitMsg.append(buffer);
371-
}
362+
GetFavorite( nTab );
372363

373364
//リストを更新する。
374365
CRecent* pRecent = m_aFavoriteInfo[nTab].m_pRecent;
375366
pRecent->UpdateView();
376367
}
377368
}
378-
if (!strReachFavLimitMsg.empty())
379-
{
380-
strReachFavLimitMsg.append(LS( STR_DLGFAV_FAV_COUNT_LIMIT ));
381-
WarningMessage(GetHwnd(), strReachFavLimitMsg.c_str());
382-
strReachFavLimitMsg.clear();
383-
}
384369

385370
return TRUE;
386371
}
@@ -887,37 +872,18 @@ bool CDlgFavorite::RefreshListOne( int nIndex )
887872
// お気に入りのフラグだけ適用
888873
void CDlgFavorite::GetFavorite( int nIndex )
889874
{
890-
CRecent* const pRecent = m_aFavoriteInfo[nIndex].m_pRecent;
875+
CRecent * const pRecent = m_aFavoriteInfo[nIndex].m_pRecent;
891876
const HWND hwndList = m_aListViewInfo[nIndex].hListView;
892877
if( m_aFavoriteInfo[nIndex].m_bHaveFavorite ){
893878
const int nCount = ListView_GetItemCount( hwndList );
894879
for( int i = 0; i < nCount; i++ ){
895880
const int recIndex = ListView_GetLParamInt( hwndList, i );
896881
const BOOL bret = ListView_GetCheckState( hwndList, i );
897-
pRecent->GetTextMaxLength();
898882
pRecent->SetFavorite( recIndex, bret ? true : false );
899883
}
900884
}
901885
}
902886

903-
std::tuple<int,int> CDlgFavorite::GetListFavorite( int nIndex )
904-
{
905-
if ( nIndex < ignoreTab ) {
906-
return std::make_tuple( 0, 0 );
907-
}
908-
const HWND hwndList = m_aListViewInfo[nIndex].hListView;
909-
CRecent* const pRecent = m_aFavoriteInfo[nIndex].m_pRecent;
910-
int nMax = pRecent->GetArrayCount();
911-
int nFavoriteCount = 0;
912-
const int nCount = ListView_GetItemCount( hwndList );
913-
for( int i = 0; i < nCount; i++ ){
914-
if(ListView_GetCheckState( hwndList, i )){
915-
nFavoriteCount++;
916-
}
917-
}
918-
return std::make_tuple( nFavoriteCount, nMax - nFavoriteCount );
919-
}
920-
921887
bool CDlgFavorite::IsGreaterThanOrEqualMax( int nTab )
922888
{
923889
if( nTab < ignoreTab ){

sakura_core/dlg/CDlgFavorite.h

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ class CDlgFavorite final : public CDialog
8686
void UpdateUIState();
8787

8888
void GetFavorite( int nIndex );
89-
std::tuple<int,int> GetListFavorite( int nIndex );
9089
bool IsGreaterThanOrEqualMax( int nTab );
9190
int DeleteSelected();
9291
void AddItem();

sakura_core/sakura_rc.rc

-1
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,6 @@ BEGIN
30083008
STR_DLGFAV_EXT_COMMAND "コマンド"
30093009
STR_DLGFAV_HIDDEN "(非表示)"
30103010
STR_DLGFAV_FAVORITE "お気に入り"
3011-
STR_DLGFAV_FAV_COUNT_LIMIT "お気に入りの数(履歴として使える数)\nお気に入りの上限を超えています"
30123011
STR_DLGFAV_CONF_DEL_FAV "最近使った%sの履歴を削除します。\nよろしいですか?\n"
30133012
STR_DLGFAV_CONF_DEL_NOTFAV "最近使った%sの履歴のお気に入り以外を削除します。\nよろしいですか?"
30143013
END

0 commit comments

Comments
 (0)