diff options
author | McCabe Maxsted | 2009-12-26 22:18:51 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-12-26 22:18:51 -0700 |
commit | 6451ba34580e4646c5f36df0ed12c1feefcddd20 (patch) | |
tree | dab493c8219c60459cad6c568a7c09a1bd2206d2 /linden/indra | |
parent | Use Liberation-Sans font sizes (diff) | |
download | meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.zip meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.tar.gz meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.tar.bz2 meta-impy-6451ba34580e4646c5f36df0ed12c1feefcddd20.tar.xz |
Added script creation resource to the script editor's help menu
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llpreviewscript.cpp | 29 | ||||
-rw-r--r-- | linden/indra/newview/llpreviewscript.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/llweb.cpp | 7 | ||||
-rw-r--r-- | linden/indra/newview/llweb.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml | 5 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/notifications.xml | 12 |
6 files changed, 58 insertions, 0 deletions
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index 082b95c..ccec75b 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp | |||
@@ -446,6 +446,10 @@ void LLScriptEdCore::initMenu() | |||
446 | menuItem->setMenuCallback(onBtnSaveToDisc, this); | 446 | menuItem->setMenuCallback(onBtnSaveToDisc, this); |
447 | menuItem->setEnabledCallback(NULL); | 447 | menuItem->setEnabledCallback(NULL); |
448 | 448 | ||
449 | menuItem = getChild<LLMenuItemCallGL>("Launch Autoscript..."); | ||
450 | menuItem->setMenuCallback(onBtnAutoscript, this); | ||
451 | menuItem->setEnabledCallback(NULL); | ||
452 | |||
449 | menuItem = getChild<LLMenuItemCallGL>("LSL Wiki Help..."); | 453 | menuItem = getChild<LLMenuItemCallGL>("LSL Wiki Help..."); |
450 | menuItem->setMenuCallback(onBtnDynamicHelp, this); | 454 | menuItem->setMenuCallback(onBtnDynamicHelp, this); |
451 | menuItem->setEnabledCallback(NULL); | 455 | menuItem->setEnabledCallback(NULL); |
@@ -676,6 +680,22 @@ bool LLScriptEdCore::onHelpWebDialog(const LLSD& notification, const LLSD& respo | |||
676 | } | 680 | } |
677 | 681 | ||
678 | // static | 682 | // static |
683 | bool LLScriptEdCore::onHelpAutoscript(const LLSD& notification, const LLSD& response) | ||
684 | { | ||
685 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
686 | |||
687 | switch(option) | ||
688 | { | ||
689 | case 0: | ||
690 | LLWeb::loadURLInternal(notification["payload"]["autoscript_url"]); | ||
691 | break; | ||
692 | default: | ||
693 | break; | ||
694 | } | ||
695 | return false; | ||
696 | } | ||
697 | |||
698 | // static | ||
679 | void LLScriptEdCore::onBtnHelp(void* userdata) | 699 | void LLScriptEdCore::onBtnHelp(void* userdata) |
680 | { | 700 | { |
681 | LLScriptEdCore* corep = (LLScriptEdCore*)userdata; | 701 | LLScriptEdCore* corep = (LLScriptEdCore*)userdata; |
@@ -685,6 +705,15 @@ void LLScriptEdCore::onBtnHelp(void* userdata) | |||
685 | } | 705 | } |
686 | 706 | ||
687 | // static | 707 | // static |
708 | void LLScriptEdCore::onBtnAutoscript(void* userdata) | ||
709 | { | ||
710 | LLScriptEdCore* corep = (LLScriptEdCore*)userdata; | ||
711 | LLSD payload; | ||
712 | payload["autoscript_url"] = corep->getString("autoscript_url"); | ||
713 | LLNotifications::instance().add("WebLaunchAutoscript", LLSD(), payload, onHelpAutoscript); | ||
714 | } | ||
715 | |||
716 | // static | ||
688 | void LLScriptEdCore::onBtnDynamicHelp(void* userdata) | 717 | void LLScriptEdCore::onBtnDynamicHelp(void* userdata) |
689 | { | 718 | { |
690 | LLScriptEdCore* corep = (LLScriptEdCore*)userdata; | 719 | LLScriptEdCore* corep = (LLScriptEdCore*)userdata; |
diff --git a/linden/indra/newview/llpreviewscript.h b/linden/indra/newview/llpreviewscript.h index ee7d773..fc9ba4b 100644 --- a/linden/indra/newview/llpreviewscript.h +++ b/linden/indra/newview/llpreviewscript.h | |||
@@ -87,6 +87,7 @@ public: | |||
87 | bool handleReloadFromServerDialog(const LLSD& notification, const LLSD& response); | 87 | bool handleReloadFromServerDialog(const LLSD& notification, const LLSD& response); |
88 | 88 | ||
89 | static bool onHelpWebDialog(const LLSD& notification, const LLSD& response); | 89 | static bool onHelpWebDialog(const LLSD& notification, const LLSD& response); |
90 | static bool onHelpAutoscript(const LLSD& notification, const LLSD& response); | ||
90 | static void onBtnHelp(void* userdata); | 91 | static void onBtnHelp(void* userdata); |
91 | static void onBtnDynamicHelp(void* userdata); | 92 | static void onBtnDynamicHelp(void* userdata); |
92 | static void onCheckLock(LLUICtrl*, void*); | 93 | static void onCheckLock(LLUICtrl*, void*); |
@@ -100,6 +101,7 @@ public: | |||
100 | static void onBtnUndoChanges(void*); | 101 | static void onBtnUndoChanges(void*); |
101 | static void onBtnSaveToDisc(void*); | 102 | static void onBtnSaveToDisc(void*); |
102 | static void onBtnLoadFromDisc(void*); | 103 | static void onBtnLoadFromDisc(void*); |
104 | static void onBtnAutoscript(void* userdata); | ||
103 | static void onSearchMenu(void* userdata); | 105 | static void onSearchMenu(void* userdata); |
104 | 106 | ||
105 | static void onUndoMenu(void* userdata); | 107 | static void onUndoMenu(void* userdata); |
diff --git a/linden/indra/newview/llweb.cpp b/linden/indra/newview/llweb.cpp index a5691d8..6425156 100644 --- a/linden/indra/newview/llweb.cpp +++ b/linden/indra/newview/llweb.cpp | |||
@@ -69,6 +69,13 @@ void LLWeb::loadURLExternal(const std::string& url) | |||
69 | 69 | ||
70 | 70 | ||
71 | // static | 71 | // static |
72 | void LLWeb::loadURLInternal(const std::string& url) | ||
73 | { | ||
74 | LLFloaterMediaBrowser::showInstance(url); | ||
75 | } | ||
76 | |||
77 | |||
78 | // static | ||
72 | std::string LLWeb::escapeURL(const std::string& url) | 79 | std::string LLWeb::escapeURL(const std::string& url) |
73 | { | 80 | { |
74 | // The CURL curl_escape() function escapes colons, slashes, | 81 | // The CURL curl_escape() function escapes colons, slashes, |
diff --git a/linden/indra/newview/llweb.h b/linden/indra/newview/llweb.h index 278821b..51b7bbf 100644 --- a/linden/indra/newview/llweb.h +++ b/linden/indra/newview/llweb.h | |||
@@ -51,6 +51,9 @@ public: | |||
51 | // Loads unescaped url in external browser. | 51 | // Loads unescaped url in external browser. |
52 | static void loadURLExternal(const std::string& url); | 52 | static void loadURLExternal(const std::string& url); |
53 | 53 | ||
54 | //Loads unescaped url in internal browser. | ||
55 | static void loadURLInternal(const std::string& url); | ||
56 | |||
54 | // Returns escaped (eg, " " to "%20") url | 57 | // Returns escaped (eg, " " to "%20") url |
55 | static std::string escapeURL(const std::string& url); | 58 | static std::string escapeURL(const std::string& url); |
56 | 59 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml b/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml index 653c75b..b4577e6 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_script_ed_panel.xml | |||
@@ -73,6 +73,8 @@ | |||
73 | width="112"> | 73 | width="112"> |
74 | <menu_item_call bottom="-30" enabled="true" height="20" label="Help..." left="0" | 74 | <menu_item_call bottom="-30" enabled="true" height="20" label="Help..." left="0" |
75 | mouse_opaque="true" name="Help..." width="112" /> | 75 | mouse_opaque="true" name="Help..." width="112" /> |
76 | <menu_item_call bottom="-30" enabled="true" height="20" label="Launch Autoscript..." left="0" | ||
77 | mouse_opaque="true" name="Launch Autoscript..." width="112" /> | ||
76 | <menu_item_call bottom="-30" enabled="true" height="20" label="LSL Wiki Help..." left="0" | 78 | <menu_item_call bottom="-30" enabled="true" height="20" label="LSL Wiki Help..." left="0" |
77 | mouse_opaque="true" name="LSL Wiki Help..." width="112" /> | 79 | mouse_opaque="true" name="LSL Wiki Help..." width="112" /> |
78 | </menu> | 80 | </menu> |
@@ -89,4 +91,7 @@ | |||
89 | <string name="script_running"> | 91 | <string name="script_running"> |
90 | Running | 92 | Running |
91 | </string> | 93 | </string> |
94 | <string name="autoscript_url"> | ||
95 | http://www.3greeneggs.com/autoscript/ | ||
96 | </string> | ||
92 | </panel> | 97 | </panel> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index e8391ba..bc1a6fc 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml | |||
@@ -6616,6 +6616,18 @@ Go to the Official Imprudence Forums to discuss the Imprudence Project. | |||
6616 | yestext="Go to page"/> | 6616 | yestext="Go to page"/> |
6617 | </notification> | 6617 | </notification> |
6618 | 6618 | ||
6619 | <notification | ||
6620 | icon="alert.tga" | ||
6621 | name="WebLaunchAutoscript" | ||
6622 | type="alert"> | ||
6623 | Launch autoscript generator (by 3greeneggs.com)? | ||
6624 | <usetemplate | ||
6625 | ignoretext="When launching autoscript generator" | ||
6626 | name="okcancelignore" | ||
6627 | notext="Cancel" | ||
6628 | yestext="OK"/> | ||
6629 | </notification> | ||
6630 | |||
6619 | 6631 | ||
6620 | <!--End Imprudence notifications--> | 6632 | <!--End Imprudence notifications--> |
6621 | 6633 | ||