aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-01 17:39:58 -0600
committerJacek Antonelli2008-12-01 17:40:06 -0600
commit7abecb48babe6a6f09bf6692ba55076546cfced9 (patch)
tree8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/llpreviewscript.cpp
parentSecond Life viewer sources 1.21.6 (diff)
downloadmeta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz
Second Life viewer sources 1.22.0-RC
Diffstat (limited to 'linden/indra/newview/llpreviewscript.cpp')
-rw-r--r--linden/indra/newview/llpreviewscript.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp
index 52fca27..2b87128 100644
--- a/linden/indra/newview/llpreviewscript.cpp
+++ b/linden/indra/newview/llpreviewscript.cpp
@@ -101,7 +101,7 @@ const std::string HELLO_LSL =
101 " llSay(0, \"Touched.\");\n" 101 " llSay(0, \"Touched.\");\n"
102 " }\n" 102 " }\n"
103 "}\n"; 103 "}\n";
104const std::string HELP_LSL = "lsl_guide.html"; 104const std::string HELP_LSL_URL = "http://wiki.secondlife.com/wiki/LSL_Portal";
105 105
106const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate? 106const std::string DEFAULT_SCRIPT_NAME = "New Script"; // *TODO:Translate?
107const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate? 107const std::string DEFAULT_SCRIPT_DESC = "(No Description)"; // *TODO:Translate?
@@ -294,7 +294,7 @@ LLScriptEdCore::LLScriptEdCore(
294 const std::string& name, 294 const std::string& name,
295 const LLRect& rect, 295 const LLRect& rect,
296 const std::string& sample, 296 const std::string& sample,
297 const std::string& help, 297 const std::string& help_url,
298 const LLHandle<LLFloater>& floater_handle, 298 const LLHandle<LLFloater>& floater_handle,
299 void (*load_callback)(void*), 299 void (*load_callback)(void*),
300 void (*save_callback)(void*, BOOL), 300 void (*save_callback)(void*, BOOL),
@@ -304,7 +304,7 @@ LLScriptEdCore::LLScriptEdCore(
304 : 304 :
305 LLPanel( std::string("name"), rect ), 305 LLPanel( std::string("name"), rect ),
306 mSampleText(sample), 306 mSampleText(sample),
307 mHelpFile ( help ), 307 mHelpURL(help_url),
308 mEditor( NULL ), 308 mEditor( NULL ),
309 mLoadCallback( load_callback ), 309 mLoadCallback( load_callback ),
310 mSaveCallback( save_callback ), 310 mSaveCallback( save_callback ),
@@ -547,7 +547,6 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string)
547 if (!history_combo) return; 547 if (!history_combo) return;
548 548
549 LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); 549 LLUIString url_string = gSavedSettings.getString("LSLHelpURL");
550 url_string.setArg("[APP_DIRECTORY]", gDirUtilp->getWorkingDir());
551 url_string.setArg("[LSL_STRING]", help_string); 550 url_string.setArg("[LSL_STRING]", help_string);
552 551
553 addHelpItemToHistory(help_string); 552 addHelpItemToHistory(help_string);
@@ -556,6 +555,7 @@ void LLScriptEdCore::setHelpPage(const std::string& help_string)
556 555
557} 556}
558 557
558
559void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string) 559void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string)
560{ 560{
561 if (help_string.empty()) return; 561 if (help_string.empty()) return;
@@ -647,7 +647,7 @@ void LLScriptEdCore::onHelpWebDialog(S32 option, void* userdata)
647 switch(option) 647 switch(option)
648 { 648 {
649 case 0: 649 case 0:
650 load_url_local_file(corep->mHelpFile); 650 LLWeb::loadURL(corep->mHelpURL);
651 break; 651 break;
652 default: 652 default:
653 break; 653 break;
@@ -773,7 +773,6 @@ void LLScriptEdCore::onHelpComboCommit(LLUICtrl* ctrl, void* userdata)
773 773
774 LLWebBrowserCtrl* web_browser = live_help_floater->getChild<LLWebBrowserCtrl>("lsl_guide_html"); 774 LLWebBrowserCtrl* web_browser = live_help_floater->getChild<LLWebBrowserCtrl>("lsl_guide_html");
775 LLUIString url_string = gSavedSettings.getString("LSLHelpURL"); 775 LLUIString url_string = gSavedSettings.getString("LSLHelpURL");
776 url_string.setArg("[APP_DIRECTORY]", gDirUtilp->getWorkingDir());
777 url_string.setArg("[LSL_STRING]", help_string); 776 url_string.setArg("[LSL_STRING]", help_string);
778 web_browser->navigateTo(url_string); 777 web_browser->navigateTo(url_string);
779 } 778 }
@@ -1072,7 +1071,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
1072 self->mScriptEd = new LLScriptEdCore("script panel", 1071 self->mScriptEd = new LLScriptEdCore("script panel",
1073 LLRect(), 1072 LLRect(),
1074 HELLO_LSL, 1073 HELLO_LSL,
1075 HELP_LSL, 1074 HELP_LSL_URL,
1076 self->getHandle(), 1075 self->getHandle(),
1077 LLPreviewLSL::onLoad, 1076 LLPreviewLSL::onLoad,
1078 LLPreviewLSL::onSave, 1077 LLPreviewLSL::onSave,
@@ -1590,7 +1589,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
1590 self->mScriptEd = new LLScriptEdCore("script ed panel", 1589 self->mScriptEd = new LLScriptEdCore("script ed panel",
1591 LLRect(), 1590 LLRect(),
1592 HELLO_LSL, 1591 HELLO_LSL,
1593 HELP_LSL, 1592 HELP_LSL_URL,
1594 self->getHandle(), 1593 self->getHandle(),
1595 &LLLiveLSLEditor::onLoad, 1594 &LLLiveLSLEditor::onLoad,
1596 &LLLiveLSLEditor::onSave, 1595 &LLLiveLSLEditor::onSave,