summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llplugin/llplugininstance.cpp33
-rw-r--r--indra/llplugin/llplugininstance.h24
-rw-r--r--indra/llplugin/llpluginmessage.cpp6
-rw-r--r--indra/llplugin/llpluginmessage.h8
-rw-r--r--indra/newview/llpanelmaininventory.cpp9
-rw-r--r--indra/newview/llviewerinventory.cpp27
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml18
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml20
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp17
10 files changed, 105 insertions, 68 deletions
diff --git a/indra/llplugin/llplugininstance.cpp b/indra/llplugin/llplugininstance.cpp
index 16ba492669..44e3b4950f 100644
--- a/indra/llplugin/llplugininstance.cpp
+++ b/indra/llplugin/llplugininstance.cpp
@@ -37,13 +37,21 @@
#include "llapr.h"
-//virtual
+/** Virtual destructor. */
LLPluginInstanceMessageListener::~LLPluginInstanceMessageListener()
{
}
+/**
+ * TODO:DOC describe how it's used
+ */
const char *LLPluginInstance::PLUGIN_INIT_FUNCTION_NAME = "LLPluginInitEntryPoint";
+/**
+ * Constructor.
+ *
+ * @param[in] owner Plugin instance. TODO:DOC is this a good description of what "owner" is?
+ */
LLPluginInstance::LLPluginInstance(LLPluginInstanceMessageListener *owner) :
mDSOHandle(NULL),
mPluginUserData(NULL),
@@ -52,6 +60,9 @@ LLPluginInstance::LLPluginInstance(LLPluginInstanceMessageListener *owner) :
mOwner = owner;
}
+/**
+ * Destructor.
+ */
LLPluginInstance::~LLPluginInstance()
{
if(mDSOHandle != NULL)
@@ -61,6 +72,12 @@ LLPluginInstance::~LLPluginInstance()
}
}
+/**
+ * Dynamically loads the plugin and runs the plugin's init function.
+ *
+ * @param[in] plugin_file Name of plugin dll/dylib/so. TODO:DOC is this correct? see .h
+ * @return 0 if successful, APR error code or error code from the plugin's init function on failure.
+ */
int LLPluginInstance::load(std::string &plugin_file)
{
pluginInitFunction init_function = NULL;
@@ -102,6 +119,11 @@ int LLPluginInstance::load(std::string &plugin_file)
return (int)result;
}
+/**
+ * Sends a message to the plugin.
+ *
+ * @param[in] message Message
+ */
void LLPluginInstance::sendMessage(const std::string &message)
{
if(mPluginSendMessageFunction)
@@ -115,6 +137,10 @@ void LLPluginInstance::sendMessage(const std::string &message)
}
}
+/**
+ * Idle. TODO:DOC what's the purpose of this?
+ *
+ */
void LLPluginInstance::idle(void)
{
}
@@ -128,6 +154,11 @@ void LLPluginInstance::staticReceiveMessage(const char *message_string, void **u
self->receiveMessage(message_string);
}
+/**
+ * Plugin receives message from plugin loader shell.
+ *
+ * @param[in] message_string Message
+ */
void LLPluginInstance::receiveMessage(const char *message_string)
{
if(mOwner)
diff --git a/indra/llplugin/llplugininstance.h b/indra/llplugin/llplugininstance.h
index 02936f65fb..c11d5ab5d4 100644
--- a/indra/llplugin/llplugininstance.h
+++ b/indra/llplugin/llplugininstance.h
@@ -1,6 +1,5 @@
/**
* @file llplugininstance.h
- * @brief LLPluginInstance handles loading the dynamic library of a plugin and setting up its entry points for message passing.
*
* @cond
* $LicenseInfo:firstyear=2008&license=viewergpl$
@@ -39,13 +38,20 @@
#include "apr_dso.h"
+/**
+ * @brief LLPluginInstanceMessageListener receives messages sent from the plugin loader shell to the plugin.
+ */
class LLPluginInstanceMessageListener
{
public:
virtual ~LLPluginInstanceMessageListener();
+ /** Plugin receives message from plugin loader shell. */
virtual void receivePluginMessage(const std::string &message) = 0;
};
+/**
+ * @brief LLPluginInstance handles loading the dynamic library of a plugin and setting up its entry points for message passing.
+ */
class LLPluginInstance
{
LOG_CLASS(LLPluginInstance);
@@ -60,19 +66,27 @@ public:
// Sends a message to the plugin.
void sendMessage(const std::string &message);
+ // TODO:DOC is this comment obsolete? can't find "send_count" anywhere in indra tree.
// send_count is the maximum number of message to process from the send queue. If negative, it will drain the queue completely.
// The receive queue is always drained completely.
// Returns the total number of messages processed from both queues.
void idle(void);
- // this is the signature of the "send a message" function.
- // message_string is a null-terminated C string
- // user_data is the opaque reference that the callee supplied during setup.
+ /** The signature of the function for sending a message from plugin to plugin loader shell.
+ *
+ * @param[in] message_string Null-terminated C string
+ * @param[in] user_data The opaque reference that the callee supplied during setup.
+ */
typedef void (*sendMessageFunction) (const char *message_string, void **user_data);
- // signature of the plugin init function
+ /** The signature of the plugin init function. TODO:DOC check direction (pluging loader shell to plugin?)
+ *
+ * @param[in] host_user_data Data from plugin loader shell.
+ * @param[in] plugin_send_function Function for sending from the plugin loader shell to plugin.
+ */
typedef int (*pluginInitFunction) (sendMessageFunction host_send_func, void *host_user_data, sendMessageFunction *plugin_send_func, void **plugin_user_data);
+ /** Name of plugin init function */
static const char *PLUGIN_INIT_FUNCTION_NAME;
private:
diff --git a/indra/llplugin/llpluginmessage.cpp b/indra/llplugin/llpluginmessage.cpp
index d06f3cefa0..f76d848a70 100644
--- a/indra/llplugin/llpluginmessage.cpp
+++ b/indra/llplugin/llpluginmessage.cpp
@@ -387,12 +387,18 @@ int LLPluginMessage::parse(const std::string &message)
}
+/**
+ * Destructor
+ */
LLPluginMessageListener::~LLPluginMessageListener()
{
// TODO: should listeners have a way to ensure they're removed from dispatcher lists when deleted?
}
+/**
+ * Destructor
+ */
LLPluginMessageDispatcher::~LLPluginMessageDispatcher()
{
diff --git a/indra/llplugin/llpluginmessage.h b/indra/llplugin/llpluginmessage.h
index e00022a245..cbd31e0964 100644
--- a/indra/llplugin/llpluginmessage.h
+++ b/indra/llplugin/llpluginmessage.h
@@ -1,6 +1,5 @@
/**
* @file llpluginmessage.h
- * @brief LLPluginMessage encapsulates the serialization/deserialization of messages passed to and from plugins.
*
* @cond
* $LicenseInfo:firstyear=2008&license=viewergpl$
@@ -36,7 +35,9 @@
#include "llsd.h"
-
+/**
+ * @brief LLPluginMessage encapsulates the serialization/deserialization of messages passed to and from plugins.
+ */
class LLPluginMessage
{
LOG_CLASS(LLPluginMessage);
@@ -105,12 +106,13 @@ private:
};
/**
- * @brief Listens for plugin messages.
+ * @brief Listener for plugin messages.
*/
class LLPluginMessageListener
{
public:
virtual ~LLPluginMessageListener();
+ /** Plugin receives message from plugin loader shell. */
virtual void receivePluginMessage(const LLPluginMessage &message) = 0;
};
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 92b4c8383e..9fd92725dc 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -966,16 +966,19 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
preview_texture->openToSave();
}
}
+ // This doesn't currently work, since the viewer can't change an assetID an item.
if (command_name == "regenerate_link")
{
- LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ LLInventoryPanel *active_panel = getActivePanel();
+ LLFolderViewItem* current_item = active_panel->getRootFolder()->getCurSelectedItem();
if (!current_item)
{
return;
}
- const LLUUID& item_id = current_item->getListener()->getUUID();
+ const LLUUID item_id = current_item->getListener()->getUUID();
LLViewerInventoryItem *item = gInventory.getItem(item_id);
item->regenerateLink();
+ active_panel->setSelection(item_id, TAKE_FOCUS_NO);
}
if (command_name == "find_original")
{
@@ -1063,7 +1066,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
}
return FALSE;
}
-
+ // This doesn't currently work, since the viewer can't change an assetID an item.
if (command_name == "regenerate_link")
{
LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f20d87a687..5da77ecdb9 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1464,30 +1464,9 @@ LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_i
{
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
- /*
- LLAssetIDMatches asset_id_matches(target_item->getAssetUUID());
- gInventory.collectDescendentsIf(LLUUID::null,
- cats,
- items,
- LLInventoryModel::EXCLUDE_TRASH,
- asset_id_matches);
- for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items.begin();
- item_iter != items.end();
- item_iter++)
- {
- const LLViewerInventoryItem *item = (*item_iter);
- if (!item->getIsBrokenLink())
- {
- return item->getAssetUUID();
- }
- }
- */
-
- items.clear();
- cats.clear();
LLRegenerateLinkCollector candidate_matches(target_item);
- gInventory.collectDescendentsIf(LLUUID::null,
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
@@ -1502,6 +1481,8 @@ LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_i
return LLUUID::null;
}
+// This currently dosen't work, because the sim does not allow us
+// to change an item's assetID.
BOOL LLViewerInventoryItem::regenerateLink()
{
const LLUUID target_item_id = find_possible_item_for_regeneration(this);
@@ -1510,7 +1491,7 @@ BOOL LLViewerInventoryItem::regenerateLink()
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
LLAssetIDMatches asset_id_matches(getAssetUUID());
- gInventory.collectDescendentsIf(LLUUID::null,
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index d363452204..c5d6f885d3 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- legacy_header_height="18"
+ legacy_header_height="13"
can_resize="true"
- height="512"
+ height="646"
layout="topleft"
min_height="140"
min_width="467"
@@ -11,7 +11,7 @@
save_rect="true"
single_instance="true"
title="FIND"
- width="620">
+ width="670">
<floater.string
name="search_url">
http://eniac21.lindenlab.com:10001/viewer
@@ -25,21 +25,20 @@
Done
</floater.string>
<layout_stack
- bottom="512"
+ bottom="641"
follows="left|right|top|bottom"
layout="topleft"
left="10"
name="stack1"
top="20"
- width="600">
+ width="650">
<layout_panel
- height="12"
layout="topleft"
left_delta="0"
- name="external_controls"
top_delta="0"
+ name="browser_layout"
user_resize="false"
- width="570">
+ width="650">
<web_browser
bottom="-10"
follows="left|right|top|bottom"
@@ -48,7 +47,8 @@
name="browser"
top="0"
start_url="data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#2A2A2A%22%3E%3C/body%3E%3C/html%3E"
- width="570" />
+ height="600"
+ width="650" />
<text
follows="bottom|left"
height="16"
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
index e5592c3c57..4e6a07d020 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
@@ -111,15 +111,4 @@
function="Inventory.GearDefault.Enable"
parameter="find_links" />
</menu_item_call>
- <menu_item_call
- label="Regenerate Link"
- layout="topleft"
- name="Regenerate Link">
- <on_click
- function="Inventory.GearDefault.Custom.Action"
- parameter="regenerate_link" />
- <on_enable
- function="Inventory.GearDefault.Enable"
- parameter="regenerate_link" />
- </menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 0bc2b44ad5..efe26d3887 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -75,16 +75,6 @@
tool_tip="[SECOND_LIFE] Last Name"
top_delta="0"
width="135" />
- <combo_box
- allow_text_entry="true"
- font="SansSerifSmall"
- follows="left|bottom"
- height="23"
- layout="topleft"
- top="60"
- name="server_combo"
- width="135"
- visible="false" />
<text
follows="left|bottom"
font="SansSerifSmall"
@@ -161,6 +151,16 @@
name="Typeregionname"
value="" />
</combo_box>
+ <combo_box
+ allow_text_entry="true"
+ font="SansSerifSmall"
+ follows="right|bottom"
+ height="23"
+ layout="topleft"
+ top_pad="2"
+ name="server_combo"
+ width="135"
+ visible="false" />
<text
follows="right|bottom"
font="SansSerifSmall"
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 6255f7ed15..69a8424e87 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -29,6 +29,20 @@
#include "llevents.h"
#include "stringize.h"
+#if LL_WINDOWS
+#define skipwin(arg) skip(arg)
+#define skipmac(arg)
+#define skiplinux(arg)
+#elif LL_DARWIN
+#define skipwin(arg)
+#define skipmac(arg) skip(arg)
+#define skiplinux(arg)
+#elif LL_LINUX
+#define skipwin(arg)
+#define skipmac(arg)
+#define skiplinux(arg) skip(arg)
+#endif
+
/*****************************************************************************
* Helper classes
*****************************************************************************/
@@ -231,7 +245,6 @@ namespace tut
ensure_equals("Online state", listener.lastEvent()["state"].asString(), "online");
}
- /*
template<> template<>
void llviewerlogin_object::test<2>()
{
@@ -417,7 +430,6 @@ namespace tut
ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline");
}
- *FIX:Mani Disabled unit boost::coro is patched
template<> template<>
void llviewerlogin_object::test<5>()
{
@@ -453,5 +465,4 @@ namespace tut
ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login");
}
-*/
}