summaryrefslogtreecommitdiff
path: root/yapp/popup_history.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapp/popup_history.cpp')
-rw-r--r--yapp/popup_history.cpp35
1 files changed, 6 insertions, 29 deletions
diff --git a/yapp/popup_history.cpp b/yapp/popup_history.cpp
index b413727..8658d6f 100644
--- a/yapp/popup_history.cpp
+++ b/yapp/popup_history.cpp
@@ -1,6 +1,3 @@
-#define STRICT
-#define WIN32_LEAN_AND_MEAN
-
#include "common.h"
#include "popup_history.h"
@@ -28,16 +25,6 @@ void PopupHistoryList::Clear()
count = 0;
}
-int PopupHistoryList::Count()
-{
- return count;
-}
-
-int PopupHistoryList::Size()
-{
- return size;
-}
-
void PopupHistoryList::RemoveItem(int index)
{
int i;
@@ -51,8 +38,8 @@ void PopupHistoryList::RemoveItem(int index)
void PopupHistoryList::DeleteData(int index)
{
PopupHistoryData *item = &historyData[index];
- free(item->titleT);
- free(item->messageT);
+ mir_free(item->titleT);
+ mir_free(item->messageT);
item->timestamp = 0; //invalidate item
item->title = NULL;
item->message = NULL;
@@ -74,8 +61,8 @@ void PopupHistoryList::Add(char *title, char *message, time_t timestamp)
{
PopupHistoryData item = {0}; //create a history item
item.timestamp = timestamp;
- item.title = strdup(title);
- item.message = strdup(message);
+ item.title = mir_strdup(title);
+ item.message = mir_strdup(message);
AddItem(item); //add it (flags = 0)
}
@@ -84,8 +71,8 @@ void PopupHistoryList::Add(wchar_t *title, wchar_t *message, time_t timestamp)
PopupHistoryData item = {0}; //create an unicode history item
item.flags = PHDF_UNICODE; //mark it as unicode
item.timestamp = timestamp;
- item.titleW = _wcsdup(title);
- item.messageW = _wcsdup(message);
+ item.titleW = mir_wstrdup(title);
+ item.messageW = mir_wstrdup(message);
AddItem(item); //add it
}
@@ -98,13 +85,3 @@ PopupHistoryData *PopupHistoryList::Get(int index)
return &historyData[index];
}
-
-int PopupHistoryList::GetRenderer()
-{
- return renderer;
-}
-
-void PopupHistoryList::SetRenderer(int newRenderer)
-{
- renderer = newRenderer;
-}