Steve Bennetts 2009-11-04 19:15:12 -08:00
commit af401ac6dc
44 changed files with 644 additions and 435 deletions

View File

@ -172,6 +172,8 @@ public:
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; }
const std::string& getLabel() { return mLabel.getString(); }
void setText(const LLStringExplicit &new_text);
const std::string& getText() const { return mText.getString(); }

View File

@ -323,7 +323,6 @@ set(viewer_SOURCE_FILES
llpanellookinfo.cpp
llpanellooks.cpp
llpanelmaininventory.cpp
llpanelmedia.cpp
llpanelmediasettingsgeneral.cpp
llpanelmediasettingspermissions.cpp
llpanelmediasettingssecurity.cpp
@ -809,7 +808,6 @@ set(viewer_HEADER_FILES
llpanellookinfo.h
llpanellooks.h
llpanelmaininventory.h
llpanelmedia.h
llpanelmediasettingsgeneral.h
llpanelmediasettingspermissions.h
llpanelmediasettingssecurity.h

View File

@ -65,6 +65,20 @@ void LLAvatarList::toggleIcons()
}
}
void LLAvatarList::setSpeakingIndicatorsVisible(bool visible)
{
// Save the new value for new items to use.
mShowSpeakingIndicator = visible;
// Show/hide icons for all existing items.
std::vector<LLPanel*> items;
getItems(items);
for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
{
static_cast<LLAvatarListItem*>(*it)->setSpeakingIndicatorVisible(mShowSpeakingIndicator);
}
}
static bool findInsensitive(std::string haystack, const std::string& needle_upper)
{
LLStringUtil::toUpper(haystack);
@ -81,6 +95,7 @@ LLAvatarList::Params::Params()
, show_last_interaction_time("show_last_interaction_time", false)
, show_info_btn("show_info_btn", true)
, show_profile_btn("show_profile_btn", true)
, show_speaking_indicator("show_speaking_indicator", true)
{
}
@ -94,6 +109,7 @@ LLAvatarList::LLAvatarList(const Params& p)
, mShowIcons(true)
, mShowInfoBtn(p.show_info_btn)
, mShowProfileBtn(p.show_profile_btn)
, mShowSpeakingIndicator(p.show_speaking_indicator)
{
setCommitOnSelectionChange(true);
@ -295,6 +311,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
item->setAvatarIconVisible(mShowIcons);
item->setShowInfoBtn(mShowInfoBtn);
item->setShowProfileBtn(mShowProfileBtn);
item->setSpeakingIndicatorVisible(mShowSpeakingIndicator);
addItem(item, id, pos);
}

View File

@ -61,6 +61,7 @@ public:
Optional<bool> show_last_interaction_time; // show most recent interaction time. *HACK: move this to a derived class
Optional<bool> show_info_btn;
Optional<bool> show_profile_btn;
Optional<bool> show_speaking_indicator;
Params();
};
@ -76,6 +77,7 @@ public:
void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; }
void toggleIcons();
void setSpeakingIndicatorsVisible(bool visible);
void sortByName();
void setShowIcons(std::string param_name);
bool getIconsVisible() const { return mShowIcons; }
@ -105,6 +107,7 @@ private:
bool mShowIcons;
bool mShowInfoBtn;
bool mShowProfileBtn;
bool mShowSpeakingIndicator;
LLTimer* mLITUpdateTimer; // last interaction time update timer
std::string mIconParamName;

View File

@ -62,6 +62,7 @@ LLAvatarListItem::LLAvatarListItem()
mIconWidth = mAvatarName->getRect().mLeft - mAvatarIcon->getRect().mLeft;
mInfoBtnWidth = mInfoBtn->getRect().mRight - mSpeakingIndicator->getRect().mRight;
mProfileBtnWidth = mProfileBtn->getRect().mRight - mInfoBtn->getRect().mRight;
mSpeakingIndicatorWidth = mSpeakingIndicator->getRect().mRight - mAvatarName->getRect().mRight;
}
LLAvatarListItem::~LLAvatarListItem()
@ -230,6 +231,18 @@ void LLAvatarListItem::setShowProfileBtn(bool show)
mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight());
}
void LLAvatarListItem::setSpeakingIndicatorVisible(bool visible)
{
// Already done? Then do nothing.
if (mSpeakingIndicator->getVisible() == (BOOL)visible)
return;
mSpeakingIndicator->setVisible(visible);
S32 width_delta = visible ? - mSpeakingIndicatorWidth : mSpeakingIndicatorWidth;
//Reshaping avatar name
mAvatarName->reshape(mAvatarName->getRect().getWidth() + width_delta, mAvatarName->getRect().getHeight());
}
void LLAvatarListItem::setAvatarIconVisible(bool visible)
{
// Already done? Then do nothing.

View File

@ -65,8 +65,9 @@ public:
void setAvatarId(const LLUUID& id, bool ignore_status_changes = false);
void setLastInteractionTime(const std::string& val);
//Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly
void setShowProfileBtn(bool hide);
void setShowInfoBtn(bool hide);
void setShowProfileBtn(bool show);
void setShowInfoBtn(bool show);
void setSpeakingIndicatorVisible(bool visible);
void setAvatarIconVisible(bool visible);
const LLUUID& getAvatarId() const;
@ -109,6 +110,7 @@ private:
S32 mIconWidth; // icon width + padding
S32 mInfoBtnWidth; //info btn width + padding
S32 mProfileBtnWidth; //profile btn width + padding
S32 mSpeakingIndicatorWidth; //speaking indicator width + padding
};
#endif //LL_LLAVATARLISTITEM_H

View File

@ -198,9 +198,38 @@ void LLChiclet::setValue(const LLSD& value)
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
LLIMChiclet::LLIMChiclet(const LLChiclet::Params& p)
LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p)
: LLChiclet(p)
, mNewMessagesIcon(NULL)
, mCounterCtrl(NULL)
{
// initialize an overlay icon for new messages
LLIconCtrl::Params icon_params;
icon_params.visible = false;
icon_params.image = LLUI::getUIImage(p.new_messages_icon_name);
mNewMessagesIcon = LLUICtrlFactory::create<LLIconCtrl>(icon_params);
// adjust size and position of an icon
LLRect chiclet_rect = p.rect;
LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.mTop, chiclet_rect.mRight, chiclet_rect.getHeight()/2);
// shift an icon a little bit to the right and up corner of a chiclet
overlay_icon_rect.translate(overlay_icon_rect.getWidth()/4, overlay_icon_rect.getHeight()/4);
mNewMessagesIcon->setRect(overlay_icon_rect);
addChild(mNewMessagesIcon);
setShowCounter(false);
}
void LLIMChiclet::setShowNewMessagesIcon(bool show)
{
if(mNewMessagesIcon)
{
mNewMessagesIcon->setVisible(show);
}
}
bool LLIMChiclet::getShowNewMessagesIcon()
{
return mNewMessagesIcon->getVisible();
}
void LLIMChiclet::onMouseDown()
@ -274,7 +303,7 @@ LLIMP2PChiclet::Params::Params()
, show_speaker("show_speaker")
{
// *TODO Vadim: Get rid of hardcoded values.
rect(LLRect(0, 25, 45, 0));
rect(LLRect(0, 25, 25, 0));
avatar_icon.name("avatar_icon");
avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
@ -293,6 +322,7 @@ LLIMP2PChiclet::Params::Params()
unread_notifications.v_pad(5);
unread_notifications.text_color(LLColor4::white);
unread_notifications.mouse_opaque(false);
unread_notifications.visible(false);
speaker.name("speaker");
speaker.rect(LLRect(45, 25, 65, 0));
@ -303,7 +333,6 @@ LLIMP2PChiclet::Params::Params()
LLIMP2PChiclet::LLIMP2PChiclet(const Params& p)
: LLIMChiclet(p)
, mChicletIconCtrl(NULL)
, mCounterCtrl(NULL)
, mSpeakerCtrl(NULL)
, mPopupMenu(NULL)
{
@ -322,28 +351,14 @@ LLIMP2PChiclet::LLIMP2PChiclet(const Params& p)
mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params);
addChild(mSpeakerCtrl);
sendChildToFront(mNewMessagesIcon);
setShowSpeaker(p.show_speaker);
}
void LLIMP2PChiclet::setCounter(S32 counter)
{
mCounterCtrl->setCounter(counter);
if(getShowCounter())
{
LLRect counter_rect = mCounterCtrl->getRect();
LLRect required_rect = mCounterCtrl->getRequiredRect();
bool needs_resize = required_rect.getWidth() != counter_rect.getWidth();
if(needs_resize)
{
counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth();
mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight());
mCounterCtrl->setRect(counter_rect);
onChicletSizeChanged();
}
}
setShowNewMessagesIcon(counter);
}
LLRect LLIMP2PChiclet::getRequiredRect()
@ -455,9 +470,10 @@ LLAdHocChiclet::Params::Params()
, unread_notifications("unread_notifications")
, speaker("speaker")
, show_speaker("show_speaker")
, avatar_icon_color("avatar_icon_color", LLColor4::green)
{
// *TODO Vadim: Get rid of hardcoded values.
rect(LLRect(0, 25, 45, 0));
rect(LLRect(0, 25, 25, 0));
avatar_icon.name("avatar_icon");
avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
@ -476,6 +492,8 @@ LLAdHocChiclet::Params::Params()
unread_notifications.v_pad(5);
unread_notifications.text_color(LLColor4::white);
unread_notifications.mouse_opaque(false);
unread_notifications.visible(false);
speaker.name("speaker");
speaker.rect(LLRect(45, 25, 65, 0));
@ -486,12 +504,13 @@ LLAdHocChiclet::Params::Params()
LLAdHocChiclet::LLAdHocChiclet(const Params& p)
: LLIMChiclet(p)
, mChicletIconCtrl(NULL)
, mCounterCtrl(NULL)
, mSpeakerCtrl(NULL)
, mPopupMenu(NULL)
{
LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon;
mChicletIconCtrl = LLUICtrlFactory::create<LLChicletAvatarIconCtrl>(avatar_params);
//Make the avatar modified
mChicletIconCtrl->setColor(p.avatar_icon_color);
addChild(mChicletIconCtrl);
LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications;
@ -505,6 +524,7 @@ LLAdHocChiclet::LLAdHocChiclet(const Params& p)
mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params);
addChild(mSpeakerCtrl);
sendChildToFront(mNewMessagesIcon);
setShowSpeaker(p.show_speaker);
}
@ -518,22 +538,7 @@ void LLAdHocChiclet::setSessionId(const LLUUID& session_id)
void LLAdHocChiclet::setCounter(S32 counter)
{
mCounterCtrl->setCounter(counter);
if(getShowCounter())
{
LLRect counter_rect = mCounterCtrl->getRect();
LLRect required_rect = mCounterCtrl->getRequiredRect();
bool needs_resize = required_rect.getWidth() != counter_rect.getWidth();
if(needs_resize)
{
counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth();
mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight());
mCounterCtrl->setRect(counter_rect);
onChicletSizeChanged();
}
}
setShowNewMessagesIcon(counter);
}
LLRect LLAdHocChiclet::getRequiredRect()
@ -562,7 +567,7 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
LLIMGroupChiclet::Params::Params()
: group_icon("group_icon")
{
rect(LLRect(0, 25, 45, 0));
rect(LLRect(0, 25, 25, 0));
group_icon.name("group_icon");
@ -578,6 +583,7 @@ LLIMGroupChiclet::Params::Params()
unread_notifications.font_halign(LLFontGL::HCENTER);
unread_notifications.v_pad(5);
unread_notifications.text_color(LLColor4::white);
unread_notifications.visible(false);
speaker.name("speaker");
speaker.rect(LLRect(45, 25, 65, 0));
@ -589,7 +595,6 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p)
: LLIMChiclet(p)
, LLGroupMgrObserver(LLUUID::null)
, mChicletIconCtrl(NULL)
, mCounterCtrl(NULL)
, mSpeakerCtrl(NULL)
, mPopupMenu(NULL)
{
@ -608,6 +613,7 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p)
mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params);
addChild(mSpeakerCtrl);
sendChildToFront(mNewMessagesIcon);
setShowSpeaker(p.show_speaker);
}
@ -619,22 +625,7 @@ LLIMGroupChiclet::~LLIMGroupChiclet()
void LLIMGroupChiclet::setCounter(S32 counter)
{
mCounterCtrl->setCounter(counter);
if(getShowCounter())
{
LLRect counter_rect = mCounterCtrl->getRect();
LLRect required_rect = mCounterCtrl->getRequiredRect();
bool needs_resize = required_rect.getWidth() != counter_rect.getWidth();
if(needs_resize)
{
counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth();
mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight());
mCounterCtrl->setRect(counter_rect);
onChicletSizeChanged();
}
}
setShowNewMessagesIcon(counter);
}
LLRect LLIMGroupChiclet::getRequiredRect()

View File

@ -278,6 +278,14 @@ public:
TYPE_GROUP,
TYPE_AD_HOC
};
struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
{
Optional<std::string> new_messages_icon_name;
Params() : new_messages_icon_name("new_messages_icon_name", "icn_voice-localchat.tga")
{}
};
/*virtual*/ ~LLIMChiclet() {};
@ -307,6 +315,16 @@ public:
*/
virtual bool getShowSpeaker() {return mShowSpeaker;};
/*
* Shows/hides overlay icon concerning new unread messages.
*/
virtual void setShowNewMessagesIcon(bool show);
/*
* Returns visibility of overlay icon concerning new unread messages.
*/
virtual bool getShowNewMessagesIcon();
/*
* Draws border around chiclet.
*/
@ -335,7 +353,7 @@ public:
protected:
LLIMChiclet(const LLChiclet::Params& p);
LLIMChiclet(const LLIMChiclet::Params& p);
/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
@ -343,6 +361,9 @@ protected:
bool mShowSpeaker;
LLIconCtrl* mNewMessagesIcon;
LLChicletNotificationCounterCtrl* mCounterCtrl;
/** the id of another participant, either an avatar id or a group id*/
LLUUID mOtherParticipantId;
@ -374,7 +395,7 @@ public:
class LLIMP2PChiclet : public LLIMChiclet
{
public:
struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
Optional<LLChicletAvatarIconCtrl::Params> avatar_icon;
@ -436,7 +457,6 @@ protected:
private:
LLChicletAvatarIconCtrl* mChicletIconCtrl;
LLChicletNotificationCounterCtrl* mCounterCtrl;
LLChicletSpeakerCtrl* mSpeakerCtrl;
LLMenuGL* mPopupMenu;
};
@ -447,7 +467,7 @@ private:
class LLAdHocChiclet : public LLIMChiclet
{
public:
struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
Optional<LLChicletAvatarIconCtrl::Params> avatar_icon;
@ -457,6 +477,8 @@ public:
Optional<bool> show_speaker;
Optional<LLColor4> avatar_icon_color;
Params();
};
@ -495,7 +517,6 @@ protected:
private:
LLChicletAvatarIconCtrl* mChicletIconCtrl;
LLChicletNotificationCounterCtrl* mCounterCtrl;
LLChicletSpeakerCtrl* mSpeakerCtrl;
LLMenuGL* mPopupMenu;
};
@ -507,7 +528,7 @@ class LLIMGroupChiclet : public LLIMChiclet, public LLGroupMgrObserver
{
public:
struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
struct Params : public LLInitParam::Block<Params, LLIMChiclet::Params>
{
Optional<LLChicletGroupIconCtrl::Params> group_icon;
@ -576,7 +597,6 @@ protected:
private:
LLChicletGroupIconCtrl* mChicletIconCtrl;
LLChicletNotificationCounterCtrl* mCounterCtrl;
LLChicletSpeakerCtrl* mSpeakerCtrl;
LLMenuGL* mPopupMenu;
};

View File

@ -91,8 +91,44 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
return LLUUID::null;
}
// LLViewerInventoryCategory::fetchDescendents has it own period of fetching.
// for now it is FETCH_TIMER_EXPIRY = 10.0f; So made our period a bit more.
const F32 FETCH_FRIENDS_DESCENDENTS_PERIOD = 11.0f;
/**
* Intended to call passed callback after the specified period of time.
*
* Implemented to fix an issue when Inventory folders are in incomplete state. See EXT-2061, EXT-1935, EXT-813.
* For now it uses to periodically sync Inventory Friends/All folder with a Agent's Friends List
* until it is complete.
*/
class FriendListUpdater : public LLEventTimer
{
public:
typedef boost::function<bool()> callback_t;
FriendListUpdater(callback_t cb, F32 period)
: LLEventTimer(period)
, mCallback(cb)
{
mEventTimer.start();
}
virtual BOOL tick() // from LLEventTimer
{
return mCallback();
}
private:
callback_t mCallback;
};
// LLFriendCardsManager Constructor / Destructor
LLFriendCardsManager::LLFriendCardsManager()
: mFriendsAllFolderCompleted(true)
{
LLAvatarTracker::instance().addObserver(this);
}
@ -269,7 +305,7 @@ bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const
return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID);
}
void LLFriendCardsManager::syncFriendsFolder()
bool LLFriendCardsManager::syncFriendsFolder()
{
//lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" if they are absent
LLFriendCardsManager::instance().ensureFriendFoldersExist();
@ -297,11 +333,35 @@ void LLFriendCardsManager::syncFriendsFolder()
// 2. Add missing Friend Cards for friends
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
llinfos << "try to build friends, count: " << all_buddies.size() << llendl;
mFriendsAllFolderCompleted = true;
for(; buddy_it != all_buddies.end(); ++buddy_it)
{
const LLUUID& buddy_id = (*buddy_it).first;
addFriendCardToInventory(buddy_id);
}
if (!mFriendsAllFolderCompleted)
{
forceFriendListIsLoaded(findFriendAllSubfolderUUIDImpl());
static bool timer_started = false;
if (!timer_started)
{
lldebugs << "Create and start timer to sync Inventory Friends All folder with Friends list" << llendl;
// do not worry about destruction of the FriendListUpdater.
// It will be deleted by LLEventTimer::updateClass when FriendListUpdater::tick() returns true.
new FriendListUpdater(boost::bind(&LLFriendCardsManager::syncFriendsFolder, this),
FETCH_FRIENDS_DESCENDENTS_PERIOD);
}
timer_started = true;
}
else
{
lldebugs << "Friends/All Inventory folder is synchronized with the Agent's Friends List" << llendl;
}
return mFriendsAllFolderCompleted;
}
void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const
@ -461,7 +521,9 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
LLUUID friendListFolderID = findFriendAllSubfolderUUIDImpl();
if (shouldBeAdded && !invModel->isCategoryComplete(friendListFolderID))
{
mFriendsAllFolderCompleted = false;
shouldBeAdded = false;
lldebugs << "Friends/All category is not completed" << llendl;
}
if (shouldBeAdded)
{
@ -520,4 +582,11 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask)
}
}
void LLFriendCardsManager::forceFriendListIsLoaded(const LLUUID& folder_id) const
{
bool fetching_inventory = gInventory.fetchDescendentsOf(folder_id);
lldebugs << "Trying to fetch descendants of Friends/All Inventory folder, fetched: "
<< fetching_inventory << llendl;
}
// EOF

View File

@ -89,8 +89,10 @@ public:
/**
* Synchronizes content of the Calling Card/Friends/All Global Inventory folder with Agent's Friend List
*
* @return true - if folder is already synchronized, false otherwise.
*/
void syncFriendsFolder();
bool syncFriendsFolder();
/*!
* \brief
@ -144,11 +146,20 @@ private:
void onFriendListUpdate(U32 changed_mask);
/**
* Force fetching of the Inventory folder specified by passed folder's LLUUID.
*
* It only sends request to server, server reply should be processed in other place.
* Because request can be sent via UDP we need to periodically check if request was completed with success.
*/
void forceFriendListIsLoaded(const LLUUID& folder_id) const;
private:
typedef std::set<LLUUID> avatar_uuid_set_t;
avatar_uuid_set_t mBuddyIDSet;
bool mFriendsAllFolderCompleted;
};
#endif // LL_LLFRIENDCARD_H

View File

@ -225,6 +225,7 @@ BOOL LLIMFloater::postBuild()
// enable line history support for instant message bar
mInputEditor->setEnableLineHistory(TRUE);
mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) );
mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) );
mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this );
@ -232,13 +233,16 @@ BOOL LLIMFloater::postBuild()
mInputEditor->setRevertOnEsc( FALSE );
mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
std::string session_name(LLIMModel::instance().getName(mSessionID));
mInputEditor->setLabel(mInputEditor->getLabel() + " " + session_name);
LLStringUtil::toUpper(session_name);
setTitle(session_name);
childSetCommitCallback("chat_editor", onSendMsg, this);
mChatHistory = getChild<LLChatHistory>("chat_history");
std::string session_name(LLIMModel::instance().getName(mSessionID));
LLStringUtil::toUpper(session_name);
setTitle(session_name);
setDocked(true);

View File

@ -274,8 +274,14 @@ void LLNavigationBar::draw()
BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
show_navbar_context_menu(this,x,y);
return TRUE;
BOOL handled = childrenHandleRightMouseDown( x, y, mask) != NULL;
if(!handled && !gMenuHolder->hasVisibleMenu())
{
show_navbar_context_menu(this,x,y);
handled = true;
}
return handled;
}
void LLNavigationBar::onBackButtonClicked()

View File

@ -59,6 +59,14 @@ void LLPanelChatControlPanel::onOpenVoiceControlsClicked()
// TODO: implement Voice Control Panel opening
}
void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
bool is_call_started = ( new_state >= LLVoiceChannel::STATE_CALL_STARTED );
childSetVisible("end_call_btn", is_call_started);
childSetVisible("voice_ctrls_btn", is_call_started);
childSetVisible("call_btn", ! is_call_started);
}
BOOL LLPanelChatControlPanel::postBuild()
{
childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this));
@ -76,15 +84,6 @@ void LLPanelChatControlPanel::draw()
LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId);
if (!session) return;
LLVoiceChannel* voice_channel = session->mVoiceChannel;
if (voice_channel && voice_enabled)
{
bool is_call_started = ( voice_channel->getState() >= LLVoiceChannel::STATE_CALL_STARTED );
childSetVisible("end_call_btn", is_call_started);
childSetVisible("voice_ctrls_btn", is_call_started);
childSetVisible("call_btn", ! is_call_started);
}
bool session_initialized = session->mSessionInitialized;
bool callback_enabled = session->mCallBackEnabled;
LLViewerRegion* region = gAgent.getRegion();
@ -98,6 +97,15 @@ void LLPanelChatControlPanel::draw()
LLPanel::draw();
}
void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id)
{
//Method is called twice for AdHoc and Group chat. Second time when server init reply received
mSessionId = session_id;
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionId);
if(voice_channel)
voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
}
LLPanelIMControlPanel::LLPanelIMControlPanel()
{
}
@ -115,6 +123,8 @@ BOOL LLPanelIMControlPanel::postBuild()
childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this));
childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this));
childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId()));
return LLPanelChatControlPanel::postBuild();
}
@ -158,6 +168,9 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID);
// Fetch the currect name
gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4));
// Disable profile button if participant is not realy SL avatar
LLIMModel::LLIMSession* im_session =
im_model.findIMSession(session_id);
@ -165,6 +178,17 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
childSetEnabled("view_profile_btn", FALSE);
}
void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
{
if ( id == mAvatarID )
{
std::string avatar_name;
avatar_name.assign(first);
avatar_name.append(" ");
avatar_name.append(last);
getChild<LLTextBox>("avatar_name")->setValue(avatar_name);
}
}
LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id)
{
@ -214,6 +238,12 @@ void LLPanelGroupControlPanel::onSortMenuItemClicked(const LLSD& userdata)
}
void LLPanelGroupControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
LLPanelChatControlPanel::onVoiceChannelStateChanged(old_state, new_state);
mAvatarList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED);
}
void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id)
{
LLPanelChatControlPanel::setSessionId(session_id);

View File

@ -34,6 +34,7 @@
#define LL_LLPANELIMCONTROLPANEL_H
#include "llpanel.h"
#include "llvoicechannel.h"
class LLSpeakerMgr;
class LLAvatarList;
@ -52,7 +53,9 @@ public:
void onEndCallButtonClicked();
void onOpenVoiceControlsClicked();
virtual void setSessionId(const LLUUID& session_id) { mSessionId = session_id; }
virtual void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
virtual void setSessionId(const LLUUID& session_id);
private:
LLUUID mSessionId;
@ -69,6 +72,9 @@ public:
void setSessionId(const LLUUID& session_id);
protected:
void nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
private:
void onViewProfileButtonClicked();
void onAddFriendButtonClicked();
@ -100,6 +106,7 @@ protected:
private:
void onGroupInfoButtonClicked();
void onSortMenuItemClicked(const LLSD& userdata);
/*virtual*/ void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
};
class LLPanelAdHocControlPanel : public LLPanelGroupControlPanel

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -34,8 +34,6 @@
#include "llpanellandmarkinfo.h"
#include "llinventory.h"
#include "llcombobox.h"
#include "lllineeditor.h"
#include "lltextbox.h"
@ -44,7 +42,6 @@
#include "llagent.h"
#include "llagentui.h"
#include "llinventorymodel.h"
#include "lllandmarkactions.h"
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
@ -139,20 +136,6 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data)
{
LLPanelPlaceInfo::processParcelInfo(parcel_data);
// HACK: Flag 0x2 == adult region,
// Flag 0x1 == mature region, otherwise assume PG
std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
if (parcel_data.flags & 0x2)
{
rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT);
}
else if (parcel_data.flags & 0x1)
{
rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
}
mMaturityRatingText->setValue(rating);
S32 region_x;
S32 region_y;
S32 region_z;

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -40,6 +40,7 @@
#include "llagent.h"
#include "llagentpicksinfo.h"
#include "llbutton.h"
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "llparcel.h"
#include "llviewerparcelmgr.h"
@ -62,6 +63,7 @@
#define XML_SNAPSHOT "pick_snapshot"
#define XML_LOCATION "pick_location"
#define XML_BTN_ON_TXTR "edit_icon"
#define XML_BTN_SAVE "save_changes_btn"
#define SAVE_BTN_LABEL "[WHAT]"
@ -401,8 +403,6 @@ BOOL LLPanelPickEdit::postBuild()
LLPanelPickInfo::postBuild();
mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1));
mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::childSetVisible, this, "edit_icon", true));
mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::childSetVisible, this, "edit_icon", false));
LLLineEditor* line_edit = getChild<LLLineEditor>("pick_name");
line_edit->setKeystrokeCallback(boost::bind(&LLPanelPickEdit::onPickChanged, this, _1), NULL);
@ -547,3 +547,23 @@ void LLPanelPickEdit::processProperties(void* data, EAvatarProcessorType type)
LLPanelPickInfo::processProperties(data, type);
}
}
// PRIVATE AREA
void LLPanelPickEdit::initTexturePickerMouseEvents()
{
text_icon = getChild<LLIconCtrl>(XML_BTN_ON_TXTR);
mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseEnter, this, _1));
mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPickEdit::onTexturePickerMouseLeave, this, _1));
text_icon->setVisible(FALSE);
}
void LLPanelPickEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl)
{
text_icon->setVisible(TRUE);
}
void LLPanelPickEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl)
{
text_icon->setVisible(FALSE);
}

View File

@ -41,6 +41,7 @@
#include "llremoteparcelrequest.h"
#include "llavatarpropertiesprocessor.h"
class LLIconCtrl;
class LLTextureCtrl;
class LLMessageSystem;
class LLAvatarPropertiesObserver;
@ -236,6 +237,16 @@ protected:
bool mLocationChanged;
bool mNeedData;
bool mNewPick;
private:
void initTexturePickerMouseEvents();
void onTexturePickerMouseEnter(LLUICtrl* ctrl);
void onTexturePickerMouseLeave(LLUICtrl* ctrl);
private:
LLIconCtrl* text_icon;
};
#endif // LL_LLPANELPICK_H

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -38,8 +38,6 @@
#include "llsdutil.h"
#include "llsecondlifeurls.h"
#include "llinventory.h"
#include "llsdutil_math.h"
#include "llscrollcontainer.h"
@ -48,15 +46,12 @@
#include "llagent.h"
#include "llavatarpropertiesprocessor.h"
#include "llexpandabletextbox.h"
#include "llfloaterworldmap.h"
#include "llinventorymodel.h"
#include "llpanelpick.h"
#include "lltexturectrl.h"
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewertexteditor.h"
#include "llworldmap.h"
LLPanelPlaceInfo::LLPanelPlaceInfo()
: LLPanel(),
@ -209,6 +204,20 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
mDescEditor->setText(parcel_data.desc);
}
// HACK: Flag 0x2 == adult region,
// Flag 0x1 == mature region, otherwise assume PG
std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
if (parcel_data.flags & 0x2)
{
rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT);
}
else if (parcel_data.flags & 0x1)
{
rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
}
mMaturityRatingText->setValue(rating);
S32 region_x;
S32 region_y;
S32 region_z;

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -36,8 +36,6 @@
#include "llparcel.h"
#include "llqueryflags.h"
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "lltextbox.h"
@ -84,16 +82,24 @@ BOOL LLPanelPlaceProfile::postBuild()
mParcelOwner = getChild<LLTextBox>("owner_value");
mLastVisited = getChild<LLTextBox>("last_visited_value");
mRatingText = getChild<LLTextBox>("rating_value");
mParcelRatingIcon = getChild<LLIconCtrl>("rating_icon");
mParcelRatingText = getChild<LLTextBox>("rating_value");
mVoiceIcon = getChild<LLIconCtrl>("voice_icon");
mVoiceText = getChild<LLTextBox>("voice_value");
mFlyIcon = getChild<LLIconCtrl>("fly_icon");
mFlyText = getChild<LLTextBox>("fly_value");
mPushIcon = getChild<LLIconCtrl>("push_icon");
mPushText = getChild<LLTextBox>("push_value");
mBuildIcon = getChild<LLIconCtrl>("build_icon");
mBuildText = getChild<LLTextBox>("build_value");
mScriptsIcon = getChild<LLIconCtrl>("scripts_icon");
mScriptsText = getChild<LLTextBox>("scripts_value");
mDamageIcon = getChild<LLIconCtrl>("damage_icon");
mDamageText = getChild<LLTextBox>("damage_value");
mRegionNameText = getChild<LLTextBox>("region_name");
mRegionTypeText = getChild<LLTextBox>("region_type");
mRegionRatingIcon = getChild<LLIconCtrl>("region_rating_icon");
mRegionRatingText = getChild<LLTextBox>("region_rating");
mRegionOwnerText = getChild<LLTextBox>("region_owner");
mRegionGroupText = getChild<LLTextBox>("region_group");
@ -128,16 +134,24 @@ void LLPanelPlaceProfile::resetLocation()
mParcelOwner->setValue(not_available);
mLastVisited->setValue(not_available);
mRatingText->setText(not_available);
mParcelRatingIcon->setValue(not_available);
mParcelRatingText->setText(not_available);
mVoiceIcon->setValue(not_available);
mVoiceText->setText(not_available);
mFlyIcon->setValue(not_available);
mFlyText->setText(not_available);
mPushIcon->setValue(not_available);
mPushText->setText(not_available);
mBuildIcon->setValue(not_available);
mBuildText->setText(not_available);
mParcelScriptsText->setText(not_available);
mScriptsIcon->setValue(not_available);
mScriptsText->setText(not_available);
mDamageIcon->setValue(not_available);
mDamageText->setText(not_available);
mRegionNameText->setValue(not_available);
mRegionTypeText->setValue(not_available);
mRegionRatingIcon->setValue(not_available);
mRegionRatingText->setValue(not_available);
mRegionOwnerText->setValue(not_available);
mRegionGroupText->setValue(not_available);
@ -191,33 +205,6 @@ void LLPanelPlaceProfile::setInfoType(INFO_TYPE type)
LLPanelPlaceInfo::setInfoType(type);
}
// virtual
void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data)
{
LLPanelPlaceInfo::processParcelInfo(parcel_data);
// HACK: Flag 0x2 == adult region,
// Flag 0x1 == mature region, otherwise assume PG
std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
if (parcel_data.flags & 0x2)
{
rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT);
}
else if (parcel_data.flags & 0x1)
{
rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
}
mMaturityRatingText->setValue(rating);
mRatingText->setValue(rating);
//update for_sale banner, here we should use DFQ_FOR_SALE instead of PF_FOR_SALE
//because we deal with remote parcel response format
bool is_for_sale = (parcel_data.flags & DFQ_FOR_SALE) &&
mInfoType == AGENT ? TRUE : FALSE;
mForSalePanel->setVisible(is_for_sale);
}
void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
LLViewerRegion* region,
const LLVector3d& pos_global,
@ -238,19 +225,34 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
// HACK: Converting sim access flags to the format
// returned by remote parcel response.
switch(region->getSimAccess())
U8 sim_access = region->getSimAccess();
switch(sim_access)
{
case SIM_ACCESS_MATURE:
parcel_data.flags = 0x1;
mParcelRatingIcon->setValue("parcel_drk_M");
mRegionRatingIcon->setValue("parcel_drk_M");
break;
case SIM_ACCESS_ADULT:
parcel_data.flags = 0x2;
mParcelRatingIcon->setValue("parcel_drk_R");
mRegionRatingIcon->setValue("parcel_drk_R");
break;
default:
parcel_data.flags = 0;
mParcelRatingIcon->setValue("parcel_drk_PG");
mRegionRatingIcon->setValue("parcel_drk_PG");
}
std::string rating = LLViewerRegion::accessToString(sim_access);
mParcelRatingText->setText(rating);
mRegionRatingText->setText(rating);
parcel_data.desc = parcel->getDesc();
parcel_data.name = parcel->getName();
parcel_data.sim_name = region->getName();
@ -268,37 +270,45 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
// Processing parcel characteristics
if (parcel->getParcelFlagAllowVoice())
{
mVoiceIcon->setValue("parcel_drk_Voice");
mVoiceText->setText(on);
}
else
{
mVoiceIcon->setValue("parcel_drk_VoiceNo");
mVoiceText->setText(off);
}
if (!region->getBlockFly() && parcel->getAllowFly())
{
mFlyIcon->setValue("parcel_drk_Fly");
mFlyText->setText(on);
}
else
{
mFlyIcon->setValue("parcel_drk_FlyNo");
mFlyText->setText(off);
}
if (region->getRestrictPushObject() || parcel->getRestrictPushObject())
{
mPushIcon->setValue("parcel_drk_PushNo");
mPushText->setText(off);
}
else
{
mPushIcon->setValue("parcel_drk_Push");
mPushText->setText(on);
}
if (parcel->getAllowModify())
{
mBuildIcon->setValue("parcel_drk_Build");
mBuildText->setText(on);
}
else
{
mBuildIcon->setValue("parcel_drk_BuildNo");
mBuildText->setText(off);
}
@ -306,25 +316,28 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
(region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) ||
!parcel->getAllowOtherScripts())
{
mScriptsIcon->setValue("parcel_drk_ScriptsNo");
mScriptsText->setText(off);
}
else
{
mScriptsIcon->setValue("parcel_drk_Scripts");
mScriptsText->setText(on);
}
if (region->getAllowDamage() || parcel->getAllowDamage())
{
mDamageIcon->setValue("parcel_drk_Damage");
mDamageText->setText(on);
}
else
{
mDamageIcon->setValue("parcel_drk_DamageNo");
mDamageText->setText(off);
}
mRegionNameText->setText(region->getName());
mRegionTypeText->setText(region->getSimProductName());
mRegionRatingText->setText(region->getSimAccessString());
// Determine parcel owner
if (parcel->isPublic())
@ -383,9 +396,6 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
&dwell);
if (for_sale)
{
// Adding "For Sale" flag in remote parcel response format.
parcel_data.flags |= DFQ_FOR_SALE;
const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID();
if(auth_buyer_id.notNull())
{
@ -403,6 +413,8 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mSaleToText->setText(getString("anyone"));
}
mForSalePanel->setVisible(for_sale);
const U8* sign = (U8*)getString("price_text").c_str();
const U8* sqm = (U8*)getString("area_text").c_str();
@ -455,7 +467,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
mSelectedParcelID = parcel->getLocalID();
mLastSelectedRegionID = region->getRegionID();
processParcelInfo(parcel_data);
LLPanelPlaceInfo::processParcelInfo(parcel_data);
mYouAreHerePanel->setVisible(is_current_parcel);
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale);

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -35,6 +35,7 @@
#include "llpanelplaceinfo.h"
class LLIconCtrl;
class LLTextEditor;
class LLPanelPlaceProfile : public LLPanelPlaceInfo
@ -49,8 +50,6 @@ public:
/*virtual*/ void setInfoType(INFO_TYPE type);
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
// Displays information about the currently selected parcel
// without sending a request to the server.
// If is_current_parcel true shows "You Are Here" banner.
@ -81,16 +80,24 @@ private:
LLTextBox* mParcelOwner;
LLTextBox* mLastVisited;
LLTextBox* mRatingText;
LLIconCtrl* mParcelRatingIcon;
LLTextBox* mParcelRatingText;
LLIconCtrl* mVoiceIcon;
LLTextBox* mVoiceText;
LLIconCtrl* mFlyIcon;
LLTextBox* mFlyText;
LLIconCtrl* mPushIcon;
LLTextBox* mPushText;
LLIconCtrl* mBuildIcon;
LLTextBox* mBuildText;
LLIconCtrl* mScriptsIcon;
LLTextBox* mScriptsText;
LLIconCtrl* mDamageIcon;
LLTextBox* mDamageText;
LLTextBox* mRegionNameText;
LLTextBox* mRegionTypeText;
LLIconCtrl* mRegionRatingIcon;
LLTextBox* mRegionRatingText;
LLTextBox* mRegionOwnerText;
LLTextBox* mRegionGroupText;

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -160,9 +160,6 @@ BOOL LLPanelPlaces::postBuild()
mShowOnMapBtn = getChild<LLButton>("map_btn");
mShowOnMapBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShowOnMapButtonClicked, this));
mShareBtn = getChild<LLButton>("share_btn");
//mShareBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShareButtonClicked, this));
mEditBtn = getChild<LLButton>("edit_btn");
mEditBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this));
@ -413,13 +410,6 @@ void LLPanelPlaces::onTabSelected()
mActivePanel->updateVerbs();
}
/*
void LLPanelPlaces::onShareButtonClicked()
{
// TODO: Launch the "Things" Share wizard
}
*/
void LLPanelPlaces::onTeleportButtonClicked()
{
LLPanelPlaceInfo* panel = getCurrentInfoPanel();
@ -852,7 +842,6 @@ void LLPanelPlaces::updateVerbs()
mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
mShareBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
mOverflowBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
mEditBtn->setVisible(mPlaceInfoType == LANDMARK_INFO_TYPE && !isLandmarkEditModeOn);
mSaveBtn->setVisible(isLandmarkEditModeOn);

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -73,7 +73,6 @@ private:
void onFilterEdit(const std::string& search_string, bool force_filter);
void onTabSelected();
//void onShareButtonClicked();
void onTeleportButtonClicked();
void onShowOnMapButtonClicked();
void onEditButtonClicked();
@ -105,7 +104,6 @@ private:
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
LLButton* mShareBtn;
LLButton* mEditBtn;
LLButton* mSaveBtn;
LLButton* mCancelBtn;

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -51,7 +51,6 @@ bool LLPanelPlacesTab::isTabVisible()
void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel)
{
//mShareBtn = panel->getChild<LLButton>("share_btn");
mTeleportBtn = panel->getChild<LLButton>("teleport_btn");
mShowOnMapBtn = panel->getChild<LLButton>("map_btn");
}

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2004-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@ -44,10 +44,8 @@ public:
virtual void onSearchEdit(const std::string& string) = 0;
virtual void updateVerbs() = 0; // Updates buttons at the bottom of Places panel
//virtual void onShare() = 0;
virtual void onShowOnMap() = 0;
virtual void onTeleport() = 0;
//virtual void onCopySLURL() = 0;
bool isTabVisible(); // Check if parent TabContainer is visible.
@ -58,7 +56,6 @@ public:
const LLUUID& snapshot_id,
bool teleport);
protected:
//LLButton* mShareBtn;
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
};

View File

@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
* Copyright (c) 2001-2009, Linden Research, Inc.
* Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab

View File

@ -45,14 +45,15 @@
LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list):
mSpeakerMgr(data_source),
mAvatarList(avatar_list),
mSpeakerAddListener(*this),
mSpeakerRemoveListener(*this),
mSpeakerClearListener(*this),
mSortOrder(E_SORT_BY_NAME)
{
mSpeakerMgr->addListener(&mSpeakerAddListener, "add");
mSpeakerMgr->addListener(&mSpeakerRemoveListener, "remove");
mSpeakerMgr->addListener(&mSpeakerClearListener, "clear");
mSpeakerAddListener = new SpeakerAddListener(*this);
mSpeakerRemoveListener = new SpeakerRemoveListener(*this);
mSpeakerClearListener = new SpeakerClearListener(*this);
mSpeakerMgr->addListener(mSpeakerAddListener, "add");
mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove");
mSpeakerMgr->addListener(mSpeakerClearListener, "clear");
mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));
mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));

View File

@ -103,9 +103,9 @@ class LLParticipantList
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;
SpeakerAddListener mSpeakerAddListener;
SpeakerRemoveListener mSpeakerRemoveListener;
SpeakerClearListener mSpeakerClearListener;
LLPointer<SpeakerAddListener> mSpeakerAddListener;
LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener;
LLPointer<SpeakerClearListener> mSpeakerClearListener;
EParticipantSortOrder mSortOrder;
};

View File

@ -390,7 +390,15 @@ void LLVoiceChannel::setState(EState state)
break;
}
mState = state;
doSetState(state);
}
void LLVoiceChannel::doSetState(const EState& new_state)
{
EState old_state = mState;
mState = new_state;
if (!mStateChangedCallback.empty())
mStateChangedCallback(old_state, mState);
}
void LLVoiceChannel::toggleCallWindowIfNeeded(EState state)
@ -620,7 +628,7 @@ void LLVoiceChannelGroup::setState(EState state)
gIMMgr->addSystemMessage(mSessionID, "ringing", mNotifyArgs);
}
mState = state;
doSetState(state);
break;
default:
LLVoiceChannel::setState(state);
@ -865,7 +873,7 @@ void LLVoiceChannelP2P::setState(EState state)
if (mReceivedCall && state == STATE_RINGING)
{
gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs);
mState = state;
doSetState(state);
return;
}
LLVoiceChannel::setState(state);

View File

@ -52,6 +52,8 @@ public:
STATE_CONNECTED
} EState;
typedef boost::function<void(const EState& old_state, const EState& new_state)> state_changed_callback_t;
LLVoiceChannel(const LLUUID& session_id, const std::string& session_name);
virtual ~LLVoiceChannel();
@ -69,6 +71,8 @@ public:
virtual BOOL callStarted();
const std::string& getSessionName() const { return mSessionName; }
void setStateChangedCallback(state_changed_callback_t callback) { mStateChangedCallback = callback; }
const LLUUID getSessionID() { return mSessionID; }
EState getState() { return mState; }
@ -85,6 +89,10 @@ public:
protected:
virtual void setState(EState state);
/**
* Use this method if you want mStateChangedCallback to be executed while state is changed
*/
void doSetState(const EState& state);
void toggleCallWindowIfNeeded(EState state);
void setURI(std::string uri);
@ -106,6 +114,9 @@ protected:
static LLVoiceChannel* sCurrentVoiceChannel;
static LLVoiceChannel* sSuspendedVoiceChannel;
static BOOL sSuspended;
private:
state_changed_callback_t mStateChangedCallback;
};
class LLVoiceChannelGroup : public LLVoiceChannel

View File

@ -3,7 +3,7 @@
legacy_header_height="18"
background_visible="true"
follows="left|top|right|bottom"
height="359"
height="369"
layout="topleft"
left="0"
name="panel_im"
@ -12,13 +12,13 @@
can_dock="true"
can_minimize="true"
visible="true"
width="400"
width="520"
can_resize="true"
min_width="200"
min_height="150">
min_width="350"
min_height="350">
<layout_stack follows="left|top|right|bottom"
height="344"
width="400"
height="354"
width="520"
layout="topleft"
orientation="horizontal"
name="im_panels"
@ -28,13 +28,13 @@
name="panel_im_control_panel"
layout="topleft"
top_delta="-3"
height="344"
height="354"
follows="left"
label="IM Control Panel"
auto_resize="false"
user_resize="false" />
<layout_panel height="344"
width="235"
<layout_panel height="354"
width="355"
left_delta="146"
top="0"
user_resize="false">
@ -56,14 +56,20 @@
length="1"
follows="left|top|right|bottom"
font="SansSerif"
height="290"
height="300"
layout="topleft"
name="chat_history"
parse_highlights="true"
allow_html="true"
width="230">
width="350">
</chat_history>
<line_editor follows="left|right" name="chat_editor" height="20" layout="topleft" width="225">
<line_editor
follows="left|right"
height="20"
label="To"
layout="topleft"
name="chat_editor"
width="345">
</line_editor>
</layout_panel>
</layout_stack>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
name="panel_im_control_panel"
width="180"
border="false"
height="215"
border="false">
name="panel_im_control_panel"
width="180">
<avatar_list
color="DkGray2"
follows="left|top|right|bottom"
@ -15,25 +16,48 @@
opaque="false"
show_info_btn="false"
show_profile_btn="false"
show_speaking_indicator="false"
top="10"
width="180" />
<button
name="call_btn"
label="Call"
left_delta="27"
width="125"
height="20" />
<button
name="end_call_btn"
label="End Call"
width="125"
height="20"
visible="false"/>
<button
enabled="false"
name="voice_ctrls_btn"
label="Open Voice Controls"
width="125"
height="20"
visible="false"/>
width="180"/>
<panel
background_visible="true"
bg_alpha_color="0.2 0.2 0.2 1"
border="false"
bottom="1"
follows="left|bottom"
height="70"
left="0"
left_pad="0"
name="panel_call_buttons"
top_pad="0"
width="180">
<button
bottom="10"
height="20"
label="Call"
left_delta="28"
name="call_btn"
width="125"/>
<button
bottom="40"
height="20"
label="Leave Call"
name="end_call_btn"
visible="false"
width="125"/>
<button
enabled="false"
bottom="10"
height="20"
label="Open Voice Controls"
name="voice_ctrls_btn"
visible="false"
width="125"/>
</panel>
</panel>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
name="panel_im_control_panel"
width="180"
border="false"
height="238"
border="false">
name="panel_im_control_panel"
width="180">
<avatar_list
color="DkGray2"
follows="left|top|right|bottom"
@ -15,30 +16,56 @@
opaque="false"
show_info_btn="false"
show_profile_btn="false"
show_speaking_indicator="false"
top="10"
width="180" />
width="180"/>
<button
name="group_info_btn"
label="Group Info"
left_delta="27"
width="125"
height="20" />
<button
name="call_btn"
label="Call"
width="125"
height="20" />
<button
name="end_call_btn"
label="End Call"
width="125"
height="20"
visible="false"/>
<button
enabled="false"
name="voice_ctrls_btn"
label="Open Voice Controls"
width="125"
bottom_pad="0"
height="20"
visible="false"/>
label="Group Info"
left_delta="28"
name="group_info_btn"
width="125"/>
<panel
background_visible="true"
bg_alpha_color="0.2 0.2 0.2 1"
border="false"
bottom="1"
follows="left|bottom"
height="70"
left="0"
left_pad="0"
name="panel_call_buttons"
top_pad="0"
width="180">
<button
bottom="10"
height="20"
label="Call Group"
left_delta="28"
name="call_btn"
width="125"/>
<button
bottom="40"
height="20"
label="Leave Call"
name="end_call_btn"
visible="false"
width="125"/>
<button
enabled="false"
bottom="10"
height="20"
label="Open Voice Controls"
name="voice_ctrls_btn"
visible="false"
width="125"/>
</panel>
</panel>

View File

@ -128,7 +128,7 @@ background_visible="true"
can_resize="false"
expanded="true"
layout="topleft"
name="tab_general"
name="group_general_tab"
title="General">
<scroll_container
color="DkGray2"
@ -143,11 +143,12 @@ background_visible="true"
width="333">
<panel
border="false"
class="panel_group_general"
filename="panel_group_general.xml"
layout="topleft"
left="0"
help_topic="group_general_tab"
name="general_tab"
name="group_general_tab_panel"
top="0"
width="303" />
</scroll_container>
@ -156,7 +157,7 @@ background_visible="true"
can_resize="false"
expanded="false"
layout="topleft"
name="tab_roles"
name="group_roles_tab"
title="Roles">
<scroll_container
color="DkGray2"
@ -171,11 +172,12 @@ background_visible="true"
width="333">
<panel
border="false"
class="panel_group_roles"
filename="panel_group_roles.xml"
layout="topleft"
left="0"
help_topic="group_roles_tab"
name="roles_tab"
name="group_roles_tab_panel"
top="0"
width="303" />
</scroll_container>
@ -184,7 +186,7 @@ background_visible="true"
can_resize="false"
expanded="false"
layout="topleft"
name="tab_notices"
name="group_notices_tab"
title="Notices">
<scroll_container
color="DkGray2"
@ -199,11 +201,12 @@ background_visible="true"
width="333">
<panel
border="false"
class="panel_group_notices"
filename="panel_group_notices.xml"
layout="topleft"
left="0"
help_topic="group_notices_tab"
name="notices_tab"
name="group_notices_tab_panel"
top="0"
width="303" />
</scroll_container>
@ -212,7 +215,7 @@ background_visible="true"
can_resize="false"
expanded="false"
layout="topleft"
name="tab_notices"
name="group_land_tab"
title="Land/Assets">
<scroll_container
color="DkGray2"
@ -227,11 +230,12 @@ background_visible="true"
width="333">
<panel
border="false"
class="panel_group_land_money"
filename="panel_group_land_money.xml"
layout="topleft"
left="0"
help_topic="group_land_money_tab"
name="land_money_tab"
name="group_land_tab_panel"
top="0"
width="313" />
</scroll_container>

View File

@ -1,64 +1,101 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel name="panel_im_control_panel"
width="128"
height="327"
border="false">
<panel
border="false"
height="350"
name="panel_im_control_panel"
width="131">
<avatar_icon name="avatar_icon"
follows="left|top"
left_delta="3"
width="125"
height="125" />
<avatar_icon
follows="left|top"
height="125"
left_delta="3"
name="avatar_icon"
top="-10"
width="125"/>
<button name="view_profile_btn"
follows="left|bottom"
label="View Profile"
width="125"
height="20" />
<button name="add_friend_btn"
follows="left|bottom"
label="Add Friend"
width="125"
height="20" />
<button name="call_btn"
follows="left|bottom"
label="Call"
width="125"
height="20" />
<text
follows="left|right"
font="SansSerifBig"
height="16"
layout="topleft"
name="avatar_name"
use_ellipses="true"
value="Unknown"
width="125" />
<button
follows="left|bottom"
height="20"
label="End Call"
name="end_call_btn"
visible="false"
width="125" />
label="View Profile"
name="view_profile_btn"
width="125"/>
<button
enabled="false"
<button
follows="left|bottom"
name="voice_ctrls_btn"
label="Open Voice Controls"
width="125"
height="20"
visible="false"/>
label="Add Friend"
name="add_friend_btn"
width="125"/>
<button name="teleport_btn"
follows="left|bottom"
label="Teleport"
width="125"
height="20" />
<button name="share_btn"
follows="left|bottom"
label="Share"
width="125"
height="20" />
<button name="pay_btn"
follows="left|bottom"
label="Pay"
width="125"
height="20" />
<button
follows="left|bottom"
height="20"
label="Teleport"
name="teleport_btn"
width="125"/>
<button
follows="left|bottom"
height="20"
label="Share"
name="share_btn"
width="125"/>
<button
follows="left|bottom"
height="20"
label="Pay"
name="pay_btn"
width="125"/>
<panel
background_visible="true"
bg_alpha_color="0.2 0.2 0.2 1"
border="false"
bottom="1"
follows="left|bottom"
height="70"
left="0"
left_pad="0"
name="panel_call_buttons"
top_pad="0"
width="131">
<button
bottom="10"
height="20"
label="Call"
left_delta="3"
name="call_btn"
width="125"/>
<button
bottom="40"
height="20"
label="Leave Call"
name="end_call_btn"
visible="false"
width="125"/>
<button
enabled="false"
bottom="10"
height="20"
label="Open Voice Controls"
name="voice_ctrls_btn"
visible="false"
width="125"/>
</panel>
</panel>

View File

@ -11,7 +11,7 @@
<icon
follows="all"
image_name="NavBar_BG"
mouse_opaque="true"
mouse_opaque="false"
name="bg_icon"
scale_image="true"
visible="true"

View File

@ -289,33 +289,14 @@
left="0"
top="0"
width="275">
<icon
follows="top|left"
height="16"
image_name="parcel_drk_M"
layout="topleft"
left="20"
name="icon_M"
top="0"
width="18" />
<icon
follows="top|left"
height="16"
image_name="parcel_drk_R"
layout="topleft"
left="20"
name="icon_R"
top="0"
width="18" />
<icon
follows="top|left"
height="16"
image_name="parcel_drk_PG"
layout="topleft"
left="20"
name="icon_PG"
name="rating_icon"
top="0"
visible="false"
width="18" />
<text
follows="left|top"
@ -332,7 +313,7 @@
left_pad="0"
name="rating_value"
top_delta="0"
value="Mature"
value="unknown"
width="120" />
<icon
follows="top|left"
@ -340,19 +321,9 @@
image_name="parcel_drk_Voice"
layout="topleft"
left="20"
name="icon_Voice"
name="voice_icon"
top_pad="5"
width="22" />
<icon
follows="top|left"
height="18"
image_name="parcel_drk_VoiceNo"
layout="topleft"
left="20"
name="icon_VoiceNo"
top_delta="0"
visible="false"
width="22" />
<text
follows="left|top"
height="18"
@ -377,19 +348,9 @@
image_name="parcel_drk_Fly"
layout="topleft"
left="20"
name="icon_Fly"
name="fly_icon"
top_pad="3"
width="22" />
<icon
follows="top|left"
height="18"
image_name="parcel_drk_FlyNo"
layout="topleft"
left="20"
name="icon_FlyNo"
top_delta="0"
visible="false"
width="22" />
<text
follows="left|top"
height="16"
@ -413,18 +374,8 @@
image_name="parcel_drk_Push"
layout="topleft"
left="20"
name="icon_Push"
name="push_icon"
top_pad="3"
visible="false"
width="22" />
<icon
follows="top|left"
height="18"
image_name="parcel_drk_PushNo"
layout="topleft"
left="20"
name="icon_PushNo"
top_delta="0"
width="22" />
<text
follows="left|top"
@ -449,18 +400,9 @@
image_name="parcel_drk_Build"
layout="topleft"
left="20"
name="icon_Build"
name="build_icon"
top_pad="3"
width="22" />
<icon
follows="top|left"
height="18"
image_name="parcel_drk_BuildNo"
layout="topleft"
left="20"
name="icon_BuildNo"
top_delta="0"
visible="false" />
<text
follows="left|top"
height="14"
@ -484,18 +426,9 @@
image_name="parcel_drk_Scripts"
layout="topleft"
left="20"
name="icon_Scripts"
name="scripts_icon"
top_pad="3"
width="22" />
<icon
follows="top|left"
height="18"
image_name="parcel_drk_ScriptsNo"
layout="topleft"
left="20"
name="icon_ScriptsNo"
top_delta="0"
visible="false" />
<text
follows="left|top"
height="14"
@ -519,18 +452,9 @@
image_name="parcel_drk_Damage"
layout="topleft"
left="20"
name="icon_Damage"
name="damage_icon"
top_pad="7"
visible="false"
width="22" />
<icon
follows="top|left"
height="18"
image_name="parcel_drk_DamageNo"
layout="topleft"
left="20"
name="icon_DamageNo"
top_delta="0" />
<text
follows="left|top"
height="14"
@ -622,33 +546,13 @@
top_pad="7"
value="Rating:"
width="80" />
<icon
follows="top|left"
height="16"
image_name="parcel_drk_M"
layout="topleft"
left_pad="0"
name="icon_M"
width="18" />
<icon
follows="top|left"
height="16"
image_name="parcel_drk_R"
layout="topleft"
left_delta="0"
name="icon_R"
top_delta="0"
visible="false"
width="18" />
<icon
follows="top|left"
height="16"
image_name="parcel_drk_PG"
layout="topleft"
left_delta="0"
name="icon_PG"
top_delta="0"
visible="false"
left_pad="0"
name="region_rating_icon"
width="18" />
<text
follows="left|top|right"

View File

@ -79,7 +79,7 @@ background_visible="true"
left="5"
name="teleport_btn"
top="0"
width="77" />
width="100" />
<button
follows="bottom|left"
font="SansSerifSmall"
@ -89,18 +89,7 @@ background_visible="true"
left_pad="5"
name="map_btn"
top="0"
width="50" />
<button
enabled="false"
follows="bottom|left"
font="SansSerifSmall"
height="19"
label="Share"
layout="topleft"
left_pad="5"
name="share_btn"
top="0"
width="60" />
width="70" />
<button
follows="bottom|left"
font="SansSerifSmall"
@ -110,7 +99,7 @@ background_visible="true"
left_pad="5"
name="edit_btn"
top="0"
width="50" />
width="70" />
<button
follows="bottom|right"
font="SansSerifSmall"