PE viewer-trunk merge.

meow-7.2.2
Tofu Linden 2010-04-08 08:57:16 +01:00
commit e979e48bc0
23 changed files with 145 additions and 52 deletions

View File

@ -860,5 +860,16 @@ void LLAccordionCtrlTab::ctrlSetLeftTopAndSize(LLView* panel, S32 left, S32 top,
panel->reshape( width, height, 1);
panel->setRect(panel_rect);
}
BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
{
//header may be not the first child but we need to process it first
if(y >= (getRect().getHeight() - HEADER_HEIGHT - HEADER_HEIGHT/2) )
{
//inside tab header
//fix for EXT-6619
return TRUE;
}
return LLUICtrl::handleToolTip(x, y, mask);
}

View File

@ -148,6 +148,8 @@ public:
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
virtual bool addChild(LLView* child, S32 tab_group);
bool isExpanded() { return mDisplayChildren; }

View File

@ -22,17 +22,6 @@
<key>Value</key>
<string>|TOKEN COPY BusyModeResponse|</string>
</map>
<key>InstantMessageLogFolder</key>
<map>
<key>Comment</key>
<string>Top level folder to your log files.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string />
</map>
<key>InstantMessageLogPath</key>
<map>
<key>Comment</key>
@ -55,10 +44,10 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LogChat</key>
<key>LogNearbyChat</key>
<map>
<key>Comment</key>
<string>Log Chat</string>
<string>Log Nearby Chat messages to a file. Is used instead of LogChat but with the "1" default value.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@ -110,5 +99,46 @@
<key>Value</key>
<integer>1</integer>
</map>
<!-- Settings below are for back compatibility only.
They are not used in current viewer anymore. But they can't be removed to avoid
influence on previous versions of the viewer in case of settings are not used or default value
should be changed. See EXT-6661. -->
<!-- 1.23 settings -->
<key>LogChat</key>
<map>
<key>Comment</key>
<string>Log Chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LogChatIM</key>
<map>
<key>Comment</key>
<string>Log Incoming Instant Messages with Chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LogChatTimestamp</key>
<map>
<key>Comment</key>
<string>Log Timestamp of Chat</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<!-- End of back compatibility settings -->
</map>
</llsd>

View File

@ -1083,10 +1083,8 @@ void LLFloaterPreference::onClickLogPath()
{
return; //Canceled!
}
std::string chat_log_dir = picker.getDirName();
std::string chat_log_top_folder= gDirUtilp->getBaseFileName(chat_log_dir);
gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir);
gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder);
gSavedPerAccountSettings.setString("InstantMessageLogPath", picker.getDirName());
}
void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email)

View File

@ -75,12 +75,13 @@ public:
return false;
}
//*TODO by what to replace showing groups floater?
if (tokens[0].asString() == "list")
{
if (tokens[1].asString() == "show")
{
//LLFloaterReg::showInstance("contacts", "groups");
LLSD params;
params["people_panel_tab_name"] = "groups_panel";
LLSideTray::getInstance()->showPanel("panel_people", params);
return true;
}
return false;

View File

@ -207,7 +207,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args)
return;
}
if (gSavedPerAccountSettings.getBOOL("LogChat"))
if (gSavedPerAccountSettings.getBOOL("LogNearbyChat"))
{
LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText);
}

View File

@ -280,6 +280,17 @@ void LLLandmarksPanel::onShowOnMap()
doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1));
}
//virtual
void LLLandmarksPanel::onShowProfile()
{
LLFolderViewItem* cur_item = getCurSelectedItem();
if(!cur_item)
return;
cur_item->getListener()->performAction(mCurrentSelectedList->getModel(),"about");
}
// virtual
void LLLandmarksPanel::onTeleport()
{
@ -306,6 +317,7 @@ void LLLandmarksPanel::updateVerbs()
bool landmark_selected = isLandmarkSelected();
mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport"));
mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map"));
mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info"));
// TODO: mantipov: Uncomment when mShareBtn is supported
// Share button should be enabled when neither a folder nor a landmark is selected
@ -977,13 +989,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
void LLLandmarksPanel::onCustomAction(const LLSD& userdata)
{
LLFolderViewItem* cur_item = getCurSelectedItem();
if(!cur_item)
return;
std::string command_name = userdata.asString();
if("more_info" == command_name)
{
cur_item->getListener()->performAction(mCurrentSelectedList->getModel(),"about");
onShowProfile();
}
else if ("teleport" == command_name)
{

View File

@ -57,6 +57,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onSearchEdit(const std::string& string);
/*virtual*/ void onShowOnMap();
/*virtual*/ void onShowProfile();
/*virtual*/ void onTeleport();
/*virtual*/ void updateVerbs();

View File

@ -252,6 +252,9 @@ BOOL LLPanelPlaces::postBuild()
mOverflowBtn = getChild<LLButton>("overflow_btn");
mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this));
mPlaceInfoBtn = getChild<LLButton>("profile_btn");
mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this));
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2));
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
@ -745,6 +748,14 @@ void LLPanelPlaces::onOverflowButtonClicked()
LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop);
}
void LLPanelPlaces::onProfileButtonClicked()
{
if (!mActivePanel)
return;
mActivePanel->onShowProfile();
}
bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param)
{
std::string value = param.asString();
@ -1060,8 +1071,11 @@ void LLPanelPlaces::updateVerbs()
mSaveBtn->setVisible(isLandmarkEditModeOn);
mCancelBtn->setVisible(isLandmarkEditModeOn);
mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn);
mPlaceInfoBtn->setVisible(mPlaceInfoType != LANDMARK_INFO_TYPE && mPlaceInfoType != TELEPORT_HISTORY_INFO_TYPE
&& !is_create_landmark_visible && !isLandmarkEditModeOn);
mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
if (is_place_info_visible)
{

View File

@ -98,6 +98,7 @@ private:
bool onOverflowMenuItemEnable(const LLSD& param);
void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
void onBackButtonClicked();
void onProfileButtonClicked();
void toggleMediaPanel();
void togglePickPanel(BOOL visible);
@ -128,6 +129,7 @@ private:
LLButton* mCancelBtn;
LLButton* mCloseBtn;
LLButton* mOverflowBtn;
LLButton* mPlaceInfoBtn;
LLPlacesInventoryObserver* mInventoryObserver;
LLPlacesParcelObserver* mParcelObserver;

View File

@ -56,6 +56,7 @@ void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel)
{
mTeleportBtn = panel->getChild<LLButton>("teleport_btn");
mShowOnMapBtn = panel->getChild<LLButton>("map_btn");
mShowProfile = panel->getChild<LLButton>("profile_btn");
}
void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,

View File

@ -45,6 +45,7 @@ public:
virtual void onSearchEdit(const std::string& string) = 0;
virtual void updateVerbs() = 0; // Updates buttons at the bottom of Places panel
virtual void onShowOnMap() = 0;
virtual void onShowProfile() = 0;
virtual void onTeleport() = 0;
bool isTabVisible(); // Check if parent TabContainer is visible.
@ -62,6 +63,7 @@ public:
protected:
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
LLButton* mShowProfile;
// Search string for filtering landmarks and teleport history locations
static std::string sFilterSubString;

View File

@ -496,6 +496,20 @@ void LLTeleportHistoryPanel::onShowOnMap()
}
}
//virtual
void LLTeleportHistoryPanel::onShowProfile()
{
if (!mLastSelectedFlatlList)
return;
LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
if(!itemp)
return;
LLTeleportHistoryFlatItem::showPlaceInfoPanel(itemp->getIndex());
}
// virtual
void LLTeleportHistoryPanel::onTeleport()
{
@ -544,6 +558,7 @@ void LLTeleportHistoryPanel::updateVerbs()
{
mTeleportBtn->setEnabled(false);
mShowOnMapBtn->setEnabled(false);
mShowProfile->setEnabled(false);
return;
}
@ -551,6 +566,7 @@ void LLTeleportHistoryPanel::updateVerbs()
mTeleportBtn->setEnabled(NULL != itemp);
mShowOnMapBtn->setEnabled(NULL != itemp);
mShowProfile->setEnabled(NULL != itemp);
}
void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date)

View File

@ -73,6 +73,7 @@ public:
/*virtual*/ void onSearchEdit(const std::string& string);
/*virtual*/ void onShowOnMap();
/*virtual*/ void onShowProfile();
/*virtual*/ void onTeleport();
///*virtual*/ void onCopySLURL();
/*virtual*/ void updateVerbs();

View File

@ -47,7 +47,6 @@
#include "llsyswellwindow.h"
#include "llimfloater.h"
#include "llscriptfloater.h"
#include "llfontgl.h"
#include <algorithm>
@ -582,7 +581,6 @@ void LLScreenChannel::showToastsTop()
void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
{
LLRect toast_rect;
LLRect tbox_rect;
LLToast::Params p;
p.lifetime_secs = timer;
p.enable_hide_btn = false;
@ -593,34 +591,26 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
mStartUpToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onStartUpToastHide, this));
LLPanel* wrapper_panel = mStartUpToastPanel->getChild<LLPanel>("wrapper_panel");
LLTextBox* text_box = mStartUpToastPanel->getChild<LLTextBox>("toast_text");
std::string text = LLTrans::getString("StartUpNotifications");
tbox_rect = text_box->getRect();
S32 tbox_width = tbox_rect.getWidth();
S32 tbox_vpad = text_box->getVPad();
S32 text_width = text_box->getDefaultFont()->getWidth(text);
S32 text_height = text_box->getTextPixelHeight();
// EXT - 3703 (Startup toast message doesn't fit toast width)
// Calculating TextBox HEIGHT needed to include the whole string according to the given WIDTH of the TextBox.
S32 new_tbox_height = (text_width/tbox_width + 1) * text_height;
// Calculating TOP position of TextBox
S32 new_tbox_top = new_tbox_height + tbox_vpad + gSavedSettings.getS32("ToastGap");
// Calculating toast HEIGHT according to the new TextBox size
S32 toast_height = new_tbox_height + tbox_vpad * 2;
tbox_rect.setLeftTopAndSize(tbox_rect.mLeft, new_tbox_top, tbox_rect.getWidth(), new_tbox_height);
text_box->setRect(tbox_rect);
toast_rect = mStartUpToastPanel->getRect();
mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
toast_rect.setLeftTopAndSize(0, toast_height + gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_height);
mStartUpToastPanel->setRect(toast_rect);
text_box->setValue(text);
text_box->setVisible(TRUE);
S32 old_height = text_box->getRect().getHeight();
text_box->reshapeToFitText();
text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2);
S32 new_height = text_box->getRect().getHeight();
S32 height_delta = new_height - old_height;
toast_rect.setLeftTopAndSize(0, toast_rect.getHeight() + height_delta +gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
mStartUpToastPanel->setRect(toast_rect);
addChild(mStartUpToastPanel);
mStartUpToastPanel->setVisible(TRUE);

View File

@ -889,13 +889,12 @@ bool idle_startup()
}
//Default the path if one isn't set.
if (gSavedPerAccountSettings.getString("InstantMessageLogFolder").empty())
// *NOTE: unable to check variable differ from "InstantMessageLogPath" because it was
// provided in pre 2.0 viewer. See EXT-6661
if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty())
{
gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir());
std::string chat_log_dir = gDirUtilp->getChatLogsDir();
std::string chat_log_top_folder=gDirUtilp->getBaseFileName(chat_log_dir);
gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir);
gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder);
gSavedPerAccountSettings.setString("InstantMessageLogPath", gDirUtilp->getChatLogsDir());
}
else
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
default_tab_group="1"
follows="all"
height="408"
label="Things"
@ -61,6 +62,7 @@
left="7"
name="inventory filter tabs"
tab_height="30"
tab_group="1"
tab_position="top"
tab_min_width="100"
top_pad="10"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- Side tray panel -->
<panel
default_tab_group="1"
follows="all"
height="449"
label="People"
@ -56,6 +57,7 @@
layout="topleft"
left="5"
name="tabs"
tab_group="1"
tab_min_width="70"
tab_height="30"
tab_position="top"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
default_tab_group="1"
follows="all"
height="570"
label="Places"
@ -37,6 +38,7 @@ background_visible="true"
name="Places Tabs"
tab_min_width="80"
tab_height="30"
tab_group="1"
tab_position="top"
top_pad="10"
width="315" />
@ -132,5 +134,14 @@ background_visible="true"
right="-10"
top="1"
width="60" />
<button
follows="bottom|left"
height="23"
label="Profile"
layout="topleft"
name="profile_btn"
right="-1"
top="1"
width="111" />
</panel>
</panel>

View File

@ -84,7 +84,7 @@
</text>
<check_box
enabled="false"
control_name="LogChat"
control_name="LogNearbyChat"
height="16"
label="Save nearby chat logs on my computer"
layout="topleft"

View File

@ -64,7 +64,6 @@
text_color="white"
top="5"
translate="false"
v_pad="5"
use_ellipses="true"
width="260">
Toast text;

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
default_tab_group="1"
follows="all"
height="570"
label="Outfits"
@ -90,6 +91,7 @@ width="333">
min_height="410"
width="320"
left="0"
tab_group="1"
top_pad="6"
follows="all" />
<!-- <button