diff options
author | James Cook <james@lindenlab.com> | 2010-02-12 16:12:12 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-12 16:12:12 -0800 |
commit | c16591c046fa76fc5d13387efa3bcaec3422e593 (patch) | |
tree | 709d1bd5e4c5587ee9b51a032535a6567565342e /indra/llui/llurlentry.h | |
parent | 3581d0001e2506389f41ce46f5007cc6f40f2d6a (diff) |
Per-avatar customizable icons next to name links in text
Changed LLUrlEntryAgent callbacks to handle both link label and icon
Eliminated legacy LLNameCache file loading
Reviewed with Kelly
Diffstat (limited to 'indra/llui/llurlentry.h')
-rw-r--r-- | indra/llui/llurlentry.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 2bc21eb989..1f0caeacf5 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -42,7 +42,8 @@ #include <map> typedef boost::signals2::signal<void (const std::string& url, - const std::string& label)> LLUrlLabelSignal; + const std::string& label, + const std::string& icon)> LLUrlLabelSignal; typedef LLUrlLabelSignal::slot_type LLUrlLabelCallback; /// @@ -77,7 +78,7 @@ public: virtual std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) { return url; } /// Return an icon that can be displayed next to Urls of this type - std::string getIcon() const { return mIcon; } + virtual std::string getIcon(const std::string &url) const; /// Return the color to render the displayed text LLUIColor getColor() const { return mColor; } @@ -101,7 +102,7 @@ protected: std::string getLabelFromWikiLink(const std::string &url) const; std::string getUrlFromWikiLink(const std::string &string) const; void addObserver(const std::string &id, const std::string &url, const LLUrlLabelCallback &cb); - void callObservers(const std::string &id, const std::string &label); + void callObservers(const std::string &id, const std::string &label, const std::string& icon); typedef struct { std::string url; @@ -168,10 +169,10 @@ class LLUrlEntryAgent : public LLUrlEntryBase public: LLUrlEntryAgent(); /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getIcon(const std::string &url) const; private: void onNameCache(const LLUUID& id, const std::string& full_name, bool is_group); - std::string buildName(const LLUUID& id); }; /// |