| 1 |
/* |
| 2 |
* Copyright (C) 2015-2018 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#include "GUIViewStateEventLog.h" |
| 10 |
|
| 11 |
#include "FileItem.h" |
| 12 |
#include "guilib/WindowIDs.h" |
| 13 |
#include "view/ViewState.h" |
| 14 |
#include "windowing/GraphicContext.h" |
| 15 |
|
| 16 |
CGUIViewStateEventLog::CGUIViewStateEventLog(const CFileItemList& items) : CGUIViewState(items) |
| 17 |
{ |
| 18 |
AddSortMethod(SortByDate, 552, LABEL_MASKS("%L", "%d", "%L", "%d")); // Label, Date | Label, Date |
| 19 |
|
| 20 |
SetSortMethod(SortByDate); |
| 21 |
SetViewAsControl(DEFAULT_VIEW_AUTO); |
| 22 |
|
| 23 |
SetSortOrder(SortOrderDescending); |
| 24 |
LoadViewState(items.GetPath(), WINDOW_EVENT_LOG); |
| 25 |
} |
| 26 |
|
| 27 |
void CGUIViewStateEventLog::SaveViewState() |
| 28 |
{ |
| 29 |
SaveViewToDb(m_items.GetPath(), WINDOW_EVENT_LOG); |
| 30 |
} |
| 31 |
|
| 32 |
std::string CGUIViewStateEventLog::GetExtensions() |
| 33 |
{ |
| 34 |
return ""; |
| 35 |
} |