pulled latest translations from Transifex
[TortoiseGit.git] / src / TortoiseProc / LogDlgHelper.cpp
blob6d05d259a39ef20f55ab6143404fe62a45ec5f44
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2007 - TortoiseSVN
4 // Copyright (C) 2008-2011 - TortoiseGit
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "stdafx.h"
21 #include "LogDlgHelper.h"
22 #include "LogDlg.h"
24 CStoreSelection::CStoreSelection(CLogDlg* dlg)
26 #if 0
27 m_logdlg = dlg;
29 int selIndex = m_logdlg->m_LogList.GetSelectionMark();
30 if ( selIndex>=0 )
32 POSITION pos = m_logdlg->m_LogList.GetFirstSelectedItemPosition();
33 int nIndex = m_logdlg->m_LogList.GetNextSelectedItem(pos);
34 if ( nIndex!=-1 && nIndex < m_logdlg->m_arShownList.GetSize() )
36 PLOGENTRYDATA pLogEntry = reinterpret_cast<PLOGENTRYDATA>(m_logdlg->m_arShownList.GetAt(nIndex));
37 m_SetSelectedRevisions.insert(pLogEntry->Rev);
38 while (pos)
40 nIndex = m_logdlg->m_LogList.GetNextSelectedItem(pos);
41 if ( nIndex!=-1 && nIndex < m_logdlg->m_arShownList.GetSize() )
43 pLogEntry = reinterpret_cast<PLOGENTRYDATA>(m_logdlg->m_arShownList.GetAt(nIndex));
44 m_SetSelectedRevisions.insert(pLogEntry->Rev);
49 #endif
52 CStoreSelection::~CStoreSelection()
54 #if 0
55 if ( m_SetSelectedRevisions.size()>0 )
57 for (int i=0; i<m_logdlg->m_arShownList.GetCount(); ++i)
59 LONG nRevision = reinterpret_cast<PLOGENTRYDATA>(m_logdlg->m_arShownList.GetAt(i))->Rev;
60 if ( m_SetSelectedRevisions.find(nRevision)!=m_SetSelectedRevisions.end() )
62 m_logdlg->m_LogList.SetSelectionMark(i);
63 m_logdlg->m_LogList.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED);
64 m_logdlg->m_LogList.EnsureVisible(i, FALSE);
68 #endif