aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterteleporthistory.cpp16
-rw-r--r--linden/indra/newview/llfloaterteleporthistory.h3
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml6
3 files changed, 23 insertions, 2 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 125void LLFloaterTeleportHistory::clearHistory()
126{
127 tpList.clear();
128 saveEntry(tpList);
129 mPlacesOutList->clearRows();
130 mPlacesInList->clearRows();
131}
125std::string LLFloaterTeleportHistory::getFileName() 132std::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
313void LLFloaterTeleportHistory::onClearHistory(void* data)
314{
315 LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data;
316 self->clearHistory();
317}
318
319// static
306void LLFloaterTeleportHistory::onShowOnMap(void* data) 320void LLFloaterTeleportHistory::onShowOnMap(void* data)
307{ 321{
308 LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data; 322 LLFloaterTeleportHistory* self = (LLFloaterTeleportHistory*) data;
diff --git a/linden/indra/newview/llfloaterteleporthistory.h b/linden/indra/newview/llfloaterteleporthistory.h
index e458259..702daf5 100644
--- a/linden/indra/newview/llfloaterteleporthistory.h
+++ b/linden/indra/newview/llfloaterteleporthistory.h
@@ -63,9 +63,12 @@ class LLFloaterTeleportHistory : public LLFloater
63 /// @brief: adds a teleport destination to the list of visited places 63 /// @brief: adds a teleport destination to the list of visited places
64 void addEntry(std::string regionName, S16 x, S16 y, S16 z,bool outList); 64 void addEntry(std::string regionName, S16 x, S16 y, S16 z,bool outList);
65 65
66 void clearHistory();
67
66 protected: 68 protected:
67 static void onInPlacesSelected(LLUICtrl* ctrl, void* data); 69 static void onInPlacesSelected(LLUICtrl* ctrl, void* data);
68 static void onOutPlacesSelected(LLUICtrl* ctrl, void* data); 70 static void onOutPlacesSelected(LLUICtrl* ctrl, void* data);
71 static void onClearHistory(void* data);
69 static void onTeleport(void* data); 72 static void onTeleport(void* data);
70 static void onShowOnMap(void* data); 73 static void onShowOnMap(void* data);
71 static void onCopySLURL(void* data); 74 static void onCopySLURL(void* data);
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml
index db36df5..13956e2 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_teleport_history.xml
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" 2<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
3 min_width="500" min_height="250" width="500" height="250" name="teleporthistory" 3 min_width="600" min_height="250" width="600" height="250" name="teleporthistory"
4 rect_control="FloaterTeleportHistoryRect" title="Teleport History"> 4 rect_control="FloaterTeleportHistoryRect" title="Teleport History">
5 <tab_container label="TPlistTabs" bottom="40" height="185" left="5" follows="left|top|right|bottom" mouse_opaque="false" name="tplisttabs" 5 <tab_container label="TPlistTabs" bottom="40" height="185" left="5" follows="left|top|right|bottom" mouse_opaque="false" name="tplisttabs"
6 tab_min_width="50" tab_position="top" width="480" right="-10" bg_opaque_color="0,0,0,0.0"> 6 tab_min_width="50" tab_position="top" width="480" right="-10" bg_opaque_color="0,0,0,0.0">
@@ -39,6 +39,10 @@
39 height="20" label="Show On Map" label_selected="Show On Map" 39 height="20" label="Show On Map" label_selected="Show On Map"
40 left_delta="100" mouse_opaque="true" name="show_on_map" 40 left_delta="100" mouse_opaque="true" name="show_on_map"
41 tool_tip="Center map on this location" width="125" /> 41 tool_tip="Center map on this location" width="125" />
42 <button bottom_delta="0" enabled="true" follows="left|bottom" font="SansSerif" halign="center"
43 height="20" label="Clear History"
44 left_delta="135" mouse_opaque="true" name="clear_history"
45 tool_tip="Clear Saved Teleport History" width="125" />
42 <button bottom_delta="0" enabled="false" follows="bottom|right" font="SansSerif" 46 <button bottom_delta="0" enabled="false" follows="bottom|right" font="SansSerif"
43 height="20" label="Copy SLURL to clipboard" left="-190" name="copy_slurl" 47 height="20" label="Copy SLURL to clipboard" left="-190" name="copy_slurl"
44 tool_tip="Copies current location as SLURL to be used on the web." 48 tool_tip="Copies current location as SLURL to be used on the web."