diff options
author | McCabe Maxsted | 2010-10-16 23:11:23 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-10-16 23:11:23 -0700 |
commit | 4ac17041d34e54323e91ed705065a054e1dae2d8 (patch) | |
tree | dc78d25105db70193a42bdaa65a6205bed93ac41 /linden/indra/newview/llfloaterteleporthistory.cpp | |
parent | Select the correct preset when the windlight toolbar is first built (diff) | |
download | meta-impy-4ac17041d34e54323e91ed705065a054e1dae2d8.zip meta-impy-4ac17041d34e54323e91ed705065a054e1dae2d8.tar.gz meta-impy-4ac17041d34e54323e91ed705065a054e1dae2d8.tar.bz2 meta-impy-4ac17041d34e54323e91ed705065a054e1dae2d8.tar.xz |
Added 'Clear History' button to the Teleport History from Phoenix
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterteleporthistory.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloaterteleporthistory.cpp b/linden/indra/newview/llfloaterteleporthistory.cpp index 65675fa..c901029 100644 --- a/linden/indra/newview/llfloaterteleporthistory.cpp +++ b/linden/indra/newview/llfloaterteleporthistory.cpp | |||
@@ -108,6 +108,7 @@ BOOL LLFloaterTeleportHistory::postBuild() | |||
108 | childSetAction("teleport", onTeleport, this); | 108 | childSetAction("teleport", onTeleport, this); |
109 | childSetAction("show_on_map", onShowOnMap, this); | 109 | childSetAction("show_on_map", onShowOnMap, this); |
110 | childSetAction("copy_slurl", onCopySLURL, this); | 110 | childSetAction("copy_slurl", onCopySLURL, this); |
111 | childSetAction("clear_history", onClearHistory,this); | ||
111 | loadEntrys(); | 112 | loadEntrys(); |
112 | 113 | ||
113 | return TRUE; | 114 | return TRUE; |
@@ -121,7 +122,13 @@ void LLFloaterTeleportHistory::saveEntry(LLSD toSave) | |||
121 | LLSDSerialize::toPrettyXML(tpList, file); | 122 | LLSDSerialize::toPrettyXML(tpList, file); |
122 | file.close(); | 123 | file.close(); |
123 | } | 124 | } |
124 | 125 | void LLFloaterTeleportHistory::clearHistory() | |
126 | { | ||
127 | tpList.clear(); | ||
128 | saveEntry(tpList); | ||
129 | mPlacesOutList->clearRows(); | ||
130 | mPlacesInList->clearRows(); | ||
131 | } | ||
125 | std::string LLFloaterTeleportHistory::getFileName() | 132 | std::string LLFloaterTeleportHistory::getFileName() |
126 | { | 133 | { |
127 | std::string path=gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, ""); | 134 | std::string path=gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, ""); |
@@ -303,6 +310,13 @@ void LLFloaterTeleportHistory::onTeleport(void* data) | |||
303 | } | 310 | } |
304 | 311 | ||
305 | // static | 312 | // static |
313 | void LLFloaterTeleportHistory::onClearHistory(void* data) | ||
314 | { | ||
315 | LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; | ||
316 | self->clearHistory(); | ||
317 | } | ||
318 | |||
319 | // static | ||
306 | void LLFloaterTeleportHistory::onShowOnMap(void* data) | 320 | void LLFloaterTeleportHistory::onShowOnMap(void* data) |
307 | { | 321 | { |
308 | LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; | 322 | LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; |