From 8f7ec64899c54dcee6caa0307510cc4003ba7bdd Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 27 Jul 2009 17:56:26 +0000 Subject: Merged skinning-17 into viewer-2 for bug fixes. Commented out new IM window for now, not complete. Merging revisions 127913-128319 of svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-17 into D:\viewer-2.0.0-3, respecting ancestry --- indra/newview/CMakeLists.txt | 2 + indra/newview/app_settings/settings.xml | 6 +- indra/newview/llavatariconctrl.h | 3 +- indra/newview/llavatarlistitem.h | 4 +- indra/newview/llbottomtray.cpp | 9 + indra/newview/llbottomtray.h | 1 + indra/newview/llchatitemscontainerctrl.cpp | 2 +- indra/newview/llchiclet.cpp | 25 ++- indra/newview/llchiclet.h | 4 + indra/newview/llfloaterinventory.cpp | 22 +- indra/newview/llfloaterinventory.h | 6 +- indra/newview/llfloaterland.cpp | 18 +- indra/newview/llfloateruipreview.cpp | 15 +- indra/newview/llfloateruipreview.h | 1 + indra/newview/llfloaterworldmap.h | 1 + indra/newview/llfolderviewitem.cpp | 5 +- indra/newview/llimpanel.cpp | 235 +++++++++++++++++++-- indra/newview/llimpanel.h | 44 +++- indra/newview/llimview.cpp | 12 +- indra/newview/llimview.h | 6 +- indra/newview/llmenucommands.cpp | 1 + indra/newview/llnameeditor.h | 5 + indra/newview/llnamelistctrl.cpp | 2 +- indra/newview/llnamelistctrl.h | 4 +- indra/newview/llnavigationbar.cpp | 10 +- indra/newview/llnavigationbar.h | 4 +- indra/newview/lloutputmonitorctrl.cpp | 3 +- indra/newview/llpanelavatar.cpp | 1 + indra/newview/llpanelimcontrolpanel.cpp | 87 ++++++++ indra/newview/llpanelimcontrolpanel.h | 55 +++++ indra/newview/llpanellandmarks.cpp | 1 + indra/newview/llpanellogin.h | 1 + indra/newview/llpanelpeople.cpp | 12 +- indra/newview/llpanelpeople.h | 6 +- indra/newview/llpanelpick.cpp | 1 + indra/newview/llpanelplaces.cpp | 18 +- indra/newview/llpanelplaces.h | 6 +- indra/newview/llpanelplacestab.cpp | 4 +- indra/newview/llsidetray.cpp | 2 +- indra/newview/llsidetray.h | 25 +-- indra/newview/lltexturectrl.cpp | 22 +- indra/newview/lltexturectrl.h | 2 +- indra/newview/lltoast.cpp | 4 +- indra/newview/lltoastnotifypanel.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerwindow.cpp | 1 + indra/newview/skins/default/textures/textures.xml | 3 +- .../skins/default/xui/en/floater_about_land.xml | 2 +- .../skins/default/xui/en/floater_im_session.xml | 73 +++++-- .../skins/default/xui/en/floater_inspect.xml | 6 +- .../skins/default/xui/en/floater_inventory.xml | 2 +- .../skins/default/xui/en/floater_test_widgets.xml | 8 +- .../skins/default/xui/en/floater_texture_ctrl.xml | 2 +- .../skins/default/xui/en/floater_ui_preview.xml | 11 +- .../skins/default/xui/en/panel_bottomtray.xml | 1 + .../newview/skins/default/xui/en/panel_friends.xml | 2 +- .../default/xui/en/panel_im_control_panel.xml | 32 +++ .../skins/default/xui/en/panel_navigation_bar.xml | 24 +-- .../newview/skins/default/xui/en/panel_people.xml | 3 +- .../newview/skins/default/xui/en/panel_places.xml | 2 +- .../default/xui/en/panel_teleport_history.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 + .../skins/default/xui/en/widgets/filter_editor.xml | 7 + .../skins/default/xui/en/widgets/line_editor.xml | 10 +- .../skins/default/xui/en/widgets/scroll_list.xml | 2 +- .../skins/default/xui/en/widgets/search_editor.xml | 13 +- .../default/xui/en/widgets/simple_text_editor.xml | 32 ++- .../skins/default/xui/en/widgets/text_editor.xml | 21 +- 68 files changed, 735 insertions(+), 227 deletions(-) create mode 100644 indra/newview/llpanelimcontrolpanel.cpp create mode 100644 indra/newview/llpanelimcontrolpanel.h create mode 100644 indra/newview/skins/default/xui/en/panel_im_control_panel.xml create mode 100644 indra/newview/skins/default/xui/en/widgets/filter_editor.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d06571fb7a..2e29a56e79 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -299,6 +299,7 @@ set(viewer_SOURCE_FILES llpanelgroupnotices.cpp llpanelgrouproles.cpp llpanelinventory.cpp + llpanelimcontrolpanel.cpp llpanelland.cpp llpanellandmarks.cpp llpanellandmedia.cpp @@ -734,6 +735,7 @@ set(viewer_HEADER_FILES llpanelgroupnotices.h llpanelgrouproles.h llpanelinventory.h + llpanelimcontrolpanel.h llpanelland.h llpanellandmarks.h llpanellandmedia.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index cb30cada70..ab9b018150 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8091,7 +8091,7 @@ Type S32 Value - 1 + 4 UIPreeditMarkerThickness @@ -8135,7 +8135,7 @@ Type S32 Value - 2 + 4 UIPreeditStandoutThickness @@ -8146,7 +8146,7 @@ Type S32 Value - 2 + 2 UIResizeBarHeight diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index cb1e9584ba..e34f2ff474 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -46,9 +46,10 @@ public: Optional avatar_id; Optional draw_tooltip; Params() + : avatar_id("avatar_id"), + draw_tooltip("draw_tooltip", true) { name = "avatar_icon"; - draw_tooltip = TRUE; } }; protected: diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 5835a4c6b4..dc73f187a7 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -57,7 +57,9 @@ public: {}; } buttons; - Params() : avatar_icon("avatar_icon",LLUUID()), user_name("user_name","") + Params() + : avatar_icon("avatar_icon"), + user_name("user_name") {}; }; diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d84dd09812..963946e888 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -32,11 +32,14 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "llbottomtray.h" + #include "llagent.h" #include "llchiclet.h" #include "llfloaterreg.h" #include "llflyoutbutton.h" +#include "llimpanel.h" #include "llkeyboard.h" +#include "lllineeditor.h" #include "llgesturemgr.h" #include "llanimationstates.h" #include "llmultigesture.h" @@ -233,7 +236,13 @@ void LLBottomTray::onChicletClick(LLUICtrl* ctrl) LLIMChiclet* chiclet = dynamic_cast(ctrl); if (chiclet) { + // Until you can type into an IM Window and have a conversation, + // still show the old communicate window LLFloaterReg::showInstance("communicate", chiclet->getSessionId()); + // DISABLED IN VIEWER-2 BRANCH UNTIL FEATURE IS DONE -- James + //// Show after comm window so it is frontmost (and hence will not + //// auto-hide) + //LLIMFloater::show(chiclet->getSessionId()); } } diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 330afeb647..08f5cb91d8 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -40,6 +40,7 @@ #include "llcombobox.h" class LLChicletPanel; +class LLLineEditor; class LLNotificationChiclet; class LLTalkButton; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 27ebccfe25..bb31b7f2e8 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -367,7 +367,7 @@ void LLChatItemsContainerCtrl::updateLayout (S32 width, S32 height) } - //set sizes for first pannels and dragbars + //set sizes for first panels and dragbars for(size_t i=0;igetRect(); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 38a7494b5b..bfa4e06d2e 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -37,7 +37,7 @@ #include "llbottomtray.h" #include "llgroupactions.h" #include "lliconctrl.h" -#include "llimpanel.h" +#include "llimpanel.h" // LLFloaterIMPanel #include "llimview.h" #include "llfloatergroupinfo.h" #include "llmenugl.h" @@ -203,6 +203,7 @@ LLIMChiclet::LLIMChiclet(const Params& p) , mSpeakerCtrl(NULL) , mShowSpeaker(p.show_speaker) , mPopupMenu(NULL) +, mDockTongueVisible(false) { LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon; mAvatarCtrl = LLUICtrlFactory::create(avatar_params); @@ -227,6 +228,11 @@ LLIMChiclet::~LLIMChiclet() } +void LLIMChiclet::setDockTongueVisible(bool visible) +{ + mDockTongueVisible = visible; +} + void LLIMChiclet::setCounter(S32 counter) { mCounterCtrl->setCounter(counter); @@ -321,6 +327,13 @@ void LLIMChiclet::draw() { LLUICtrl::draw(); gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE); + + if (mDockTongueVisible) + { + LLUIImagePtr flyout_tongue = LLUI::getUIImage("windows/Flyout_Pointer.png"); + // was previously AVATAR_WIDTH-16 and CHICLET_HEIGHT-6 + flyout_tongue->draw( getRect().getWidth()-31, getRect().getHeight()-5); + } } BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) @@ -552,14 +565,6 @@ void LLChicletPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) void LLChicletPanel::onChicletClick(LLUICtrl*ctrl,const LLSD¶m) { - LLIMChiclet* chiclet = dynamic_cast(ctrl); - if (chiclet) - { - S32 x, y; - LLRect rect = getRect(); - localPointToScreen(rect.getCenterX(), 0, &x, &y); - LLIMFloater::show(chiclet->getSessionId(), x); - } mCommitSignal(ctrl,param); } @@ -653,7 +658,7 @@ void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent ) width, height - scroll_button_rect.getHeight())); mScrollArea->setRect(LLRect(scroll_button_rect.getWidth() + SCROLL_BUTTON_PAD, - height + 1, width - scroll_button_rect.getWidth() - SCROLL_BUTTON_PAD, 0)); + height + 7, width - scroll_button_rect.getWidth() - SCROLL_BUTTON_PAD, 0)); trimChiclets(); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index e467ec012a..415ae59ca2 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -34,6 +34,7 @@ #define LL_LLCHICLET_H #include "llavatariconctrl.h" +#include "llbutton.h" #include "llpanel.h" #include "lltextbox.h" #include "lloutputmonitorctrl.h" @@ -266,6 +267,8 @@ public: */ virtual void setShowSpeaker(bool show); + void setDockTongueVisible(bool visible); + /* * Returns voice chat status control visibility. */ @@ -332,6 +335,7 @@ protected: LLMenuGL* mPopupMenu; bool mShowSpeaker; + bool mDockTongueVisible; }; /* diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index d05a32dc88..cf78d7d34f 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -42,7 +42,7 @@ #include "llcallingcard.h" #include "llfloaterreg.h" #include "llsdserialize.h" -#include "llsearcheditor.h" +#include "llfiltereditor.h" #include "llspinctrl.h" #include "llui.h" #include "message.h" @@ -530,10 +530,10 @@ BOOL LLFloaterInventory::postBuild() } - mSearchEditor = getChild("inventory search editor"); - if (mSearchEditor) + mFilterEditor = getChild("inventory search editor"); + if (mFilterEditor) { - mSearchEditor->setSearchCallback(boost::bind(&LLFloaterInventory::onSearchEdit, this, _1)); + mFilterEditor->setCommitCallback(boost::bind(&LLFloaterInventory::onFilterEdit, this, _2)); } // *TODO:Get the cost info from the server @@ -598,9 +598,9 @@ void LLFloaterInventory::draw() title << mFilterText; setTitle(title.str()); } - if (mActivePanel && mSearchEditor) + if (mActivePanel && mFilterEditor) { - mSearchEditor->setText(mActivePanel->getFilterSubString()); + mFilterEditor->setText(mActivePanel->getFilterSubString()); } LLFloater::draw(); } @@ -673,9 +673,9 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) void LLFloaterInventory::startSearch() { // this forces focus to line editor portion of search editor - if (mSearchEditor) + if (mFilterEditor) { - mSearchEditor->focusFirstItem(TRUE); + mFilterEditor->focusFirstItem(TRUE); } } @@ -715,8 +715,8 @@ BOOL LLFloaterInventory::handleKeyHere(KEY key, MASK mask) if (root_folder) { // first check for user accepting current search results - if (mSearchEditor - && mSearchEditor->hasFocus() + if (mFilterEditor + && mFilterEditor->hasFocus() && (key == KEY_RETURN || key == KEY_DOWN) && mask == MASK_NONE) @@ -966,7 +966,7 @@ void LLFloaterInventory::onClearSearch() } } -void LLFloaterInventory::onSearchEdit(const std::string& search_string ) +void LLFloaterInventory::onFilterEdit(const std::string& search_string ) { if (search_string == "") { diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index cd60407507..35ac1ab380 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -64,7 +64,7 @@ class LLScrollContainer; class LLTextBox; class LLIconCtrl; class LLSaveFolderState; -class LLSearchEditor; +class LLFilterEditor; class LLTabContainer; class LLInventoryPanel : public LLPanel @@ -267,7 +267,7 @@ public: void onClearSearch(); static void onFoldersByName(void *user_data); static BOOL checkFoldersByName(void *user_data); - void onSearchEdit(const std::string& search_string ); + void onFilterEdit(const std::string& search_string ); static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward); void onFilterSelected(); @@ -291,7 +291,7 @@ public: LLFloaterInventoryFinder* getFinder() { return (LLFloaterInventoryFinder*)mFinderHandle.get(); } protected: - LLSearchEditor* mSearchEditor; + LLFilterEditor* mFilterEditor; LLTabContainer* mFilterTabs; LLHandle mFinderHandle; LLInventoryPanel* mActivePanel; diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 08a042707d..149df61b35 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1490,26 +1490,26 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo if (is_group_owned) { - item_params.cells.add().type("icon").value(self->mIconGroup->getName()).column("type"); - item_params.cells.add().value(OWNER_GROUP).font(FONT).column("online_status"); + item_params.columns.add().type("icon").value(self->mIconGroup->getName()).column("type"); + item_params.columns.add().value(OWNER_GROUP).font(FONT).column("online_status"); } else if (is_online) { - item_params.cells.add().type("icon").value(self->mIconAvatarOnline->getName()).column("type"); - item_params.cells.add().value(OWNER_ONLINE).font(FONT).column("online_status"); + item_params.columns.add().type("icon").value(self->mIconAvatarOnline->getName()).column("type"); + item_params.columns.add().value(OWNER_ONLINE).font(FONT).column("online_status"); } else // offline { - item_params.cells.add().type("icon").value(self->mIconAvatarOffline->getName()).column("type"); - item_params.cells.add().value(OWNER_OFFLINE).font(FONT).column("online_status"); + item_params.columns.add().type("icon").value(self->mIconAvatarOffline->getName()).column("type"); + item_params.columns.add().value(OWNER_OFFLINE).font(FONT).column("online_status"); } // Placeholder for name. - item_params.cells.add().font(FONT).column("name"); + item_params.columns.add().font(FONT).column("name"); object_count_str = llformat("%d", object_count); - item_params.cells.add().value(object_count_str).font(FONT).column("count"); - item_params.cells.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent"); + item_params.columns.add().value(object_count_str).font(FONT).column("count"); + item_params.columns.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent"); self->mOwnerList->addRow(item_params); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 41e9ee3ccd..4870494b20 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -57,6 +57,7 @@ #include "lldraghandle.h" #include "lllayoutstack.h" #include "llviewermenu.h" +#include "llrngwriter.h" // Boost (for linux/unix command-line execv) #include @@ -354,6 +355,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl) void LLFloaterUIPreview::onClickExportSchema() { + gViewerWindow->setCursor(UI_CURSOR_WAIT); std::string template_path = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "xui", "schema"); typedef LLWidgetTypeRegistry::Registrar::registry_map_t::const_iterator registry_it; @@ -373,10 +375,12 @@ void LLFloaterUIPreview::onClickExportSchema() LLFILE* rng_file = LLFile::fopen(file_name.c_str(), "w"); { LLXMLNode::writeHeaderToFile(rng_file); - root_nodep->writeToFile(rng_file); + const bool use_type_decorations = false; + root_nodep->writeToFile(rng_file, std::string(), use_type_decorations); } fclose(rng_file); } + gViewerWindow->setCursor(UI_CURSOR_ARROW); } @@ -625,7 +629,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) std::string full_filename = append_new_to_xml_filename(path); LLFILE* floater_temp = LLFile::fopen(full_filename.c_str(), "w"); LLXMLNode::writeHeaderToFile(floater_temp); - floater_write->writeToFile(floater_temp); + const bool use_type_decorations = false; + floater_write->writeToFile(floater_temp, std::string(), use_type_decorations); fclose(floater_temp); } } @@ -647,7 +652,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) std::string full_filename = append_new_to_xml_filename(path); LLFILE* menu_temp = LLFile::fopen(full_filename.c_str(), "w"); LLXMLNode::writeHeaderToFile(menu_temp); - menu_write->writeToFile(menu_temp); + const bool use_type_decorations = false; + menu_write->writeToFile(menu_temp, std::string(), use_type_decorations); fclose(menu_temp); } @@ -671,7 +677,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) std::string full_filename = append_new_to_xml_filename(path); LLFILE* panel_temp = LLFile::fopen(full_filename.c_str(), "w"); LLXMLNode::writeHeaderToFile(panel_temp); - panel_write->writeToFile(panel_temp); + const bool use_type_decorations = false; + panel_write->writeToFile(panel_temp, std::string(), use_type_decorations); fclose(panel_temp); } } diff --git a/indra/newview/llfloateruipreview.h b/indra/newview/llfloateruipreview.h index 1307d60689..eca8c0a141 100644 --- a/indra/newview/llfloateruipreview.h +++ b/indra/newview/llfloateruipreview.h @@ -49,6 +49,7 @@ class LLColor; class LLScrollListCtrl; class LLComboBox; class LLButton; +class LLLineEditor; class LLXmlTreeNode; class LLFloaterUIPreview; class LLFadeEventTimer; diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 5c1760ce22..d52079fc06 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -49,6 +49,7 @@ class LLFriendObserver; class LLInventoryModel; class LLInventoryObserver; class LLItemInfo; +class LLLineEditor; class LLTabContainer; class LLFloaterWorldMap : public LLFloater diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 43f3ea8d8f..a6a8da2a76 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -81,8 +81,9 @@ void LLFolderViewItem::cleanupClass() // NOTE: Optimize this, we call it a *lot* when opening a large inventory LLFolderViewItem::Params::Params() -: folder_arrow_image("", LLUI::getUIImage("folder_arrow.tga")), - selection_image("", LLUI::getUIImage("rounded_square.tga")) +: icon("icon"), + folder_arrow_image("folder_arrow_image", LLUI::getUIImage("folder_arrow.tga")), + selection_image("selection_image", LLUI::getUIImage("rounded_square.tga")) { mouse_opaque(true); follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 5b4f711099..248a8dbc4c 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -45,8 +45,10 @@ #include "llagent.h" #include "llbutton.h" +#include "llbottomtray.h" #include "llcallingcard.h" #include "llchat.h" +#include "llchiclet.h" #include "llconsole.h" #include "llfloater.h" #include "llfloatercall.h" @@ -57,9 +59,12 @@ #include "llinventorymodel.h" #include "llfloaterinventory.h" #include "llfloaterchat.h" +#include "lliconctrl.h" +#include "llimview.h" // for LLIMModel to get other avatar id in chat #include "llkeyboard.h" #include "lllineeditor.h" #include "llnotify.h" +#include "llpanelimcontrolpanel.h" #include "llrecentpeople.h" #include "llresmgr.h" #include "lltrans.h" @@ -2040,7 +2045,7 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const } return false; } - + std::map LLIMFloater::sIMFloaterMap; @@ -2048,23 +2053,183 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id, const std::string title, EInstantMessage dialog) : mSessionID(session_id), - mIndex(0) + mLastMessageIndex(-1), + mDialog(dialog) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_im_session.xml"); sIMFloaterMap[mSessionID] = this; + LLPanelIMControlPanel* im_control_panel = getChild("panel_im_control_panel"); + + LLIMModel::LLIMSession* session = get_if_there(LLIMModel::instance().sSessionsMap, session_id, (LLIMModel::LLIMSession*)NULL); + if(session) + { + mOtherParticipantUUID = session->mOtherParticipantID; + im_control_panel->setAvatarId(session->mOtherParticipantID); + } + + LLButton* slide_left = getChild("slide_left_btn"); + slide_left->setVisible(im_control_panel->getVisible()); + slide_left->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); + + LLButton* slide_right = getChild("slide_right_btn"); + slide_right->setVisible(!im_control_panel->getVisible()); + slide_right->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); + setTitle(title); + setDocked(true); + + mInputEditor = getChild("chat_editor"); + + + mInputEditor->setMaxTextLength(1023); + // enable line history support for instant message bar + mInputEditor->setEnableLineHistory(TRUE); + + mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived, this ); + mInputEditor->setFocusLostCallback( onInputEditorFocusLost, this ); + mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this ); + mInputEditor->setCommitOnFocusLost( FALSE ); + mInputEditor->setRevertOnEsc( FALSE ); + mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); + + childSetCommitCallback("chat_editor", onSendMsg, this); +} + +/* static */ +void LLIMFloater::newIMCallback(const LLSD& data){ + + if (data["num_unread"].asInteger() > 0) + { + LLUUID session_id = data["session_id"].asUUID(); + + LLIMFloater* floater = get_if_there(sIMFloaterMap, session_id, (LLIMFloater*)NULL); + + if (floater == NULL) + { + llwarns << "new_im_callback for non-existent session_id " << session_id << llendl; + return; + } + + // update if visible, otherwise will be updated when opened + if (floater->getVisible()) + { + floater->updateMessages(); + } + } +} + +void LLIMFloater::onSendMsg( LLUICtrl* ctrl, void* userdata ) +{ + LLIMFloater* self = (LLIMFloater*) userdata; + self->sendMsg(); } +void LLIMFloater::sendMsg() +{ + if (!gAgent.isGodlike() + && (mDialog == IM_NOTHING_SPECIAL) + && mOtherParticipantUUID.isNull()) + { + llinfos << "Cannot send IM to everyone unless you're a god." << llendl; + return; + } + + if (mInputEditor) + { + LLWString text = mInputEditor->getConvertedText(); + if(!text.empty()) + { + // Truncate and convert to UTF8 for transport + std::string utf8_text = wstring_to_utf8str(text); + utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); + + LLIMModel::sendMessage(utf8_text, + mSessionID, + mOtherParticipantUUID, + mDialog); + + mInputEditor->setText(LLStringUtil::null); + + updateMessages(); + } + } +} + + + LLIMFloater::~LLIMFloater() { sIMFloaterMap.erase(mSessionID); } +//virtual +BOOL LLIMFloater::postBuild() +{ + mHistoryEditor = getChild("im_text", true, false); + mChiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet(mSessionID); + + if (!mChiclet) + { + llwarns << "No chiclet found for the IMFloter" << llendl; + } + setDocked(false); + return TRUE; +} + +const U32 UNDOCK_LEAP_HEIGHT = 12; +const U32 DOCK_ICON_HEIGHT = 6; -void LLIMFloater::show(const LLUUID& session_id, S32 center_x) +//virtual +void LLIMFloater::onFocusLost() { + // spec says close if docked to bottom tray and user has clicked away + // (hence we are no longer focused) + if (isDocked()) + { + // app not quitting + closeFloater(false); + } +} + +//virtual +void LLIMFloater::setDocked(bool docked, bool pop_on_undock) +{ + LLFloater::setDocked(docked); + mChiclet->setDockTongueVisible(docked); + if (docked) + { + S32 x, y; + mChiclet->localPointToScreen((mChiclet->getRect().getWidth())/2, 0, &x, &y); + translate(x - getRect().getCenterX(), DOCK_ICON_HEIGHT - getRect().mBottom); + } + else if (pop_on_undock) + { + // visually pop up a little bit to emphasize the undocking + translate(0, UNDOCK_LEAP_HEIGHT); + } +} + + +void LLIMFloater::onClose(bool app_quitting) +{ + mChiclet->setDockTongueVisible(false); + LLFloater::onClose(app_quitting); +} + +void LLIMFloater::onSlide() +{ + LLPanel* im_control_panel = getChild("panel_im_control_panel"); + im_control_panel->setVisible(!im_control_panel->getVisible()); + + getChild("slide_left_btn")->setVisible(im_control_panel->getVisible()); + getChild("slide_right_btn")->setVisible(!im_control_panel->getVisible()); +} + +//static +LLIMFloater* LLIMFloater::show(const LLUUID& session_id) +{ LLIMFloater* floater = get_if_there(sIMFloaterMap, session_id, (LLIMFloater*)NULL); if (floater == NULL) @@ -2078,28 +2243,25 @@ void LLIMFloater::show(const LLUUID& session_id, S32 center_x) { LLIMFloater* floater = (*iter).second; floater->setVisible(false); + floater->mChiclet->setDockTongueVisible(false); + } - //floater->setVisibleAndFrontmost(true); + floater->setVisibleAndFrontmost(true); - floater->updateMessages(session_id); - - floater->translate(center_x - floater->getRect().getCenterX(), gFloaterView->getRect().mBottom - floater->getRect().mBottom); + if (floater->isDocked()) + { + floater->mChiclet->setDockTongueVisible(true); + } + floater->updateMessages(); + return floater; } -void LLIMFloater::updateMessages(const LLUUID& session_id) +void LLIMFloater::updateMessages() { - LLTextEditor* text_editor = getChild("im_text", true, false); - - if (!text_editor) - { - llwarns << "Text editor not found! " << llendl; - return; - } - - std::list messages = LLIMModel::instance().getMessages(mSessionID, mIndex); + std::list messages = LLIMModel::instance().getMessages(mSessionID, mLastMessageIndex+1); if (messages.size()) { @@ -2112,10 +2274,45 @@ void LLIMFloater::updateMessages(const LLUUID& session_id) message << msg["from"].asString() << " : " << msg["time"].asString() << "\n " << msg["message"].asString() << "\n"; - mIndex = msg["index"].asInteger(); + mLastMessageIndex = msg["index"].asInteger(); } - text_editor->setText(message.str()); + mHistoryEditor->appendText(message.str(), false, false); + mHistoryEditor->setCursorAndScrollToEnd(); } } +// static +void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ) +{ + LLIMFloater* self= (LLIMFloater*) userdata; + self->mHistoryEditor->setCursorAndScrollToEnd(); +} + +// static +void LLIMFloater::onInputEditorFocusLost(LLFocusableElement* caller, void* userdata) +{ + LLIMFloater* self = (LLIMFloater*) userdata; + self->setTyping(FALSE); +} + +// static +void LLIMFloater::onInputEditorKeystroke(LLLineEditor* caller, void* userdata) +{ + LLIMFloater* self = (LLIMFloater*)userdata; + std::string text = self->mInputEditor->getText(); + if (!text.empty()) + { + self->setTyping(TRUE); + } + else + { + // Deleting all text counts as stopping typing. + self->setTyping(FALSE); + } +} + +//just a stub for now +void LLIMFloater::setTyping(BOOL typing) +{ +} diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 88f21864b5..e6bde5c93a 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -47,6 +47,7 @@ class LLInventoryItem; class LLInventoryCategory; class LLIMSpeakerMgr; class LLPanelActiveSpeakers; +class LLIMChiclet; class LLVoiceChannel : public LLVoiceClientStatusObserver { @@ -359,6 +360,8 @@ private: }; +// Individual IM window that appears at the bottom of the screen, +// optionally "docked" to the bottom tray. class LLIMFloater : public LLFloater { public: @@ -367,14 +370,49 @@ public: EInstantMessage dialog); virtual ~LLIMFloater(); + + // LLView overrides + /*virtual*/ BOOL postBuild(); + + // Floater should close when user clicks away to other UI area, + // hence causing focus loss. + /*virtual*/ void onFocusLost(); + + // LLFloater overrides + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + + static LLIMFloater* show(const LLUUID& session_id); + void onClose(bool app_quitting); - static void show(const LLUUID& session_id, S32 center_x); - void updateMessages(const LLUUID& session_id); + // get new messages from LLIMModel + void updateMessages(); + static void onSendMsg( LLUICtrl*, void*); + void sendMsg(); + // callback for LLIMModel on new messages + // route to specific floater if it is visible + static void newIMCallback(const LLSD& data); + static std::map sIMFloaterMap; + + +private: + + static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); + static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); + static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); + void setTyping(BOOL typing); + void onSlide(); + LLUUID mSessionID; - U32 mIndex; + S32 mLastMessageIndex; + EInstantMessage mDialog; + LLIMChiclet* mChiclet; + LLUUID mOtherParticipantUUID; + LLViewerTextEditor* mHistoryEditor; + LLLineEditor* mInputEditor; + }; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 38335fe68f..0505baac41 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -113,14 +113,16 @@ void toast_callback(const LLSD& msg){ LLIMModel::LLIMModel() { addChangedCallback(toast_callback); + addChangedCallback(LLIMFloater::newIMCallback); } void LLIMModel::testMessages() { - static LLUUID bot1_id, bot1_session_id; - if (bot1_id.isNull()) bot1_id.generate(); - std::string from = "Bot1 TestLinden"; + LLUUID bot1_id("d0426ec6-6535-4c11-a5d9-526bb0c654d9"); + LLUUID bot1_session_id; + std::string from = "IM Tester"; + bot1_session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, bot1_id); newSession(bot1_session_id, from, IM_NOTHING_SPECIAL, bot1_id); addMessage(bot1_session_id, from, "Test Message: Hi from testerbot land!"); @@ -158,7 +160,7 @@ bool LLIMModel::newSession(LLUUID session_id, std::string name, EInstantMessage } -std::list LLIMModel::getMessages(LLUUID session_id, int index) +std::list LLIMModel::getMessages(LLUUID session_id, int start_index) { std::list return_list; @@ -170,7 +172,7 @@ std::list LLIMModel::getMessages(LLUUID session_id, int index) return return_list; } - int i = session->mMsgs.size() - index; + int i = session->mMsgs.size() - start_index; for (std::list::iterator iter = session->mMsgs.begin(); iter != session->mMsgs.end() && i > 0; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 6a354dfe92..b3b821f2ac 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -53,11 +53,11 @@ public: struct LLIMSession { LLIMSession(std::string name, EInstantMessage type, LLUUID other_participant_id) - :mName(name), mType(type), mNumUnread(0), mOtherPraticipantID(other_participant_id) {} + :mName(name), mType(type), mNumUnread(0), mOtherParticipantID(other_participant_id) {} std::string mName; EInstantMessage mType; - LLUUID mOtherPraticipantID; + LLUUID mOtherParticipantID; S32 mNumUnread; std::list mMsgs; }; @@ -70,7 +70,7 @@ public: boost::signals2::connection addChangedCallback( boost::function cb ); bool newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id); - std::list getMessages(LLUUID session_id, int index = 0); + std::list getMessages(LLUUID session_id, int start_index = 0); bool addMessage(LLUUID session_id, std::string from, std::string utf8_text); bool addToHistory(LLUUID session_id, std::string from, std::string utf8_text); //used to get the name of the session, for use as the title diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp index 0c652621f4..cfcb331912 100644 --- a/indra/newview/llmenucommands.cpp +++ b/indra/newview/llmenucommands.cpp @@ -51,6 +51,7 @@ #include "llfloaterworldmap.h" #include "llgivemoney.h" #include "llfloaterinventory.h" +#include "lllineeditor.h" #include "llnotify.h" #include "llstatusbar.h" #include "llimview.h" diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h index f9cabb5831..99e03a1166 100644 --- a/indra/newview/llnameeditor.h +++ b/indra/newview/llnameeditor.h @@ -50,6 +50,11 @@ public: { Optional is_group; Optional name_id; + + Params() + : is_group("is_group"), + name_id("name_id") + {} }; protected: diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index d7066cb140..ffc3b2f37a 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -169,7 +169,7 @@ LLScrollListItem* LLNameListCtrl::addRow(const LLNameListCtrl::NameItem& name_it if (!item) return NULL; // use supplied name by default - std::string fullname = name_item.display_name; + std::string fullname = name_item.name; switch(name_item.target) { case GROUP: diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 6692d4cff9..80feaea881 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -57,11 +57,11 @@ public: struct NameItem : public LLInitParam::Block { - Optional display_name; + Optional name; Optional target; NameItem() - : display_name("name"), + : name("name"), target("target", INDIVIDUAL) {} }; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index fbeff2d628..c0bddd101e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -45,6 +45,7 @@ #include "lllocationhistory.h" #include "lllocationinputctrl.h" #include "llteleporthistory.h" +#include "llsearcheditor.h" #include "llslurl.h" #include "llurlsimstring.h" #include "llviewerinventory.h" @@ -204,12 +205,10 @@ BOOL LLNavigationBar::postBuild() mBtnHelp = getChild("help_btn"); mCmbLocation= getChild("location_combo"); - mLeSearch = getChild("search_input"); - - LLButton* search_btn = getChild("search_btn"); + mLeSearch = getChild("search_input"); if (!mBtnBack || !mBtnForward || !mBtnHome || !mBtnHelp || - !mCmbLocation || !mLeSearch || !search_btn) + !mCmbLocation || !mLeSearch) { llwarns << "Malformed navigation bar" << llendl; return FALSE; @@ -229,7 +228,6 @@ BOOL LLNavigationBar::postBuild() mCmbLocation->setSelectionCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); mLeSearch->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); - search_btn->setClickedCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); // Load the location field context menu mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -306,7 +304,7 @@ void LLNavigationBar::onHelpButtonClicked() void LLNavigationBar::onSearchCommit() { - invokeSearch(mLeSearch->getText()); + invokeSearch(mLeSearch->getValue().asString()); } void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata) diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 846040e506..a82dfc73ff 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -40,7 +40,7 @@ extern S32 NAVIGATION_BAR_HEIGHT; class LLButton; class LLLocationInputCtrl; class LLMenuGL; -class LLLineEditor; +class LLSearchEditor; /** * Web browser-like navigation bar. @@ -97,7 +97,7 @@ private: LLButton* mBtnForward; LLButton* mBtnHome; LLButton* mBtnHelp; - LLLineEditor* mLeSearch; + LLSearchEditor* mLeSearch; LLLocationInputCtrl* mCmbLocation; bool mPurgeTPHistoryItems; }; diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 340cb8187d..955f50caf5 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -52,7 +52,8 @@ LLColor4 LLOutputMonitorCtrl::sColorBound; //F32 LLOutputMonitorCtrl::sRectHeightRatio = 0.f; LLOutputMonitorCtrl::Params::Params() -: image_mute("image_mute"), +: draw_border("draw_border"), + image_mute("image_mute"), image_off("image_off"), image_on("image_on"), image_level_1("image_level_1"), diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 868d4d9200..bf6ecd6bf4 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -61,6 +61,7 @@ public: { Optional agent_id; Params() + : agent_id("agent_id") { mouse_opaque(false); follows.flags(FOLLOWS_ALL); diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp new file mode 100644 index 0000000000..45fe625a13 --- /dev/null +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -0,0 +1,87 @@ +/** + * @file llpanelavatar.cpp + * @brief LLPanelAvatar and related class implementations + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelimcontrolpanel.h" + +#include "llavataractions.h" +#include "llavatariconctrl.h" +#include "llbutton.h" + +static LLRegisterPanelClassWrapper t_im_control_panel("panel_im_control_panel"); + +LLPanelIMControlPanel::LLPanelIMControlPanel() +: LLPanel() +{ +} + +LLPanelIMControlPanel::~LLPanelIMControlPanel() +{ +} + +BOOL LLPanelIMControlPanel::postBuild() +{ + childSetAction("view_profile_btn", boost::bind(&LLPanelIMControlPanel::onViewProfileButtonClicked, this)); + childSetAction("add_friend_btn", boost::bind(&LLPanelIMControlPanel::onAddFriendButtonClicked, this)); + childSetAction("call_btn", boost::bind(&LLPanelIMControlPanel::onCallButtonClicked, this)); + childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this)); + + return TRUE; +} + +void LLPanelIMControlPanel::onViewProfileButtonClicked() +{ + LLAvatarActions::showProfile(getChild("avatar_icon")->getAvatarId()); +} + +void LLPanelIMControlPanel::onAddFriendButtonClicked() +{ + LLAvatarIconCtrl* avatar_icon = getChild("avatar_icon"); + std::string full_name = avatar_icon->getFirstName() + " " + avatar_icon->getLastName(); + LLAvatarActions::requestFriendshipDialog(avatar_icon->getAvatarId(), full_name); +} + +void LLPanelIMControlPanel::onCallButtonClicked() +{ + // *TODO: Implement +} + +void LLPanelIMControlPanel::onShareButtonClicked() +{ + // *TODO: Implement +} + +void LLPanelIMControlPanel::setAvatarId(const LLUUID& avatar_id) +{ + getChild("avatar_icon")->setValue(avatar_id); +} diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h new file mode 100644 index 0000000000..be3b2d3130 --- /dev/null +++ b/indra/newview/llpanelimcontrolpanel.h @@ -0,0 +1,55 @@ +/** + * @file llpanelimcontrolpanel.h + * @brief LLPanelIMControlPanel and related class definitions + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELIMCONTROLPANEL_H +#define LL_LLPANELIMCONTROLPANEL_H + +#include "llpanel.h" + +class LLPanelIMControlPanel : public LLPanel +{ +public: + LLPanelIMControlPanel(); + ~LLPanelIMControlPanel(); + + BOOL postBuild(); + + void setAvatarId(const LLUUID& avatar_id); + +private: + void onViewProfileButtonClicked(); + void onAddFriendButtonClicked(); + void onCallButtonClicked(); + void onShareButtonClicked(); +}; + +#endif // LL_LLPANELIMCONTROLPANEL_H diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 453183ad74..0cbf10f7c2 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -33,6 +33,7 @@ #include "llpanellandmarks.h" +#include "llbutton.h" #include "llfloaterreg.h" #include "lllandmark.h" diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 540f938053..83a31eecda 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -37,6 +37,7 @@ #include "llpointer.h" // LLPointer<> #include "llwebbrowserctrl.h" // LLWebBrowserCtrlObserver +class LLLineEditor; class LLUIImage; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index d2879a675f..d947003109 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -35,7 +35,7 @@ // libs #include "llfloaterreg.h" #include "llmenugl.h" -#include "llsearcheditor.h" +#include "llfiltereditor.h" #include "lltabcontainer.h" #include "lluictrlfactory.h" @@ -306,7 +306,7 @@ public: LLPanelPeople::LLPanelPeople() : LLPanel(), mFilterSubString(LLStringUtil::null), - mSearchEditor(NULL), + mFilterEditor(NULL), mTabContainer(NULL), mFriendList(NULL), mNearbyList(NULL), @@ -330,8 +330,8 @@ LLPanelPeople::~LLPanelPeople() BOOL LLPanelPeople::postBuild() { - mSearchEditor = getChild("filter_input"); - mSearchEditor->setSearchCallback(boost::bind(&LLPanelPeople::onSearchEdit, this, _1)); + mFilterEditor = getChild("filter_input"); + mFilterEditor->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); mTabContainer = getChild("tabs"); mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2)); @@ -609,7 +609,7 @@ void LLPanelPeople::reSelectedCurrentTab() mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex()); } -void LLPanelPeople::onSearchEdit(const std::string& search_string) +void LLPanelPeople::onFilterEdit(const std::string& search_string) { if (mFilterSubString == search_string) return; @@ -618,7 +618,7 @@ void LLPanelPeople::onSearchEdit(const std::string& search_string) LLStringUtil::toUpper(mFilterSubString); LLStringUtil::trimHead(mFilterSubString); - mSearchEditor->setText(mFilterSubString); + mFilterEditor->setText(mFilterSubString); // Apply new filter to all tabs. filterNearbyList(); diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 1131790106..6c3b5e0664 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -37,7 +37,7 @@ #include "llcallingcard.h" // for avatar tracker -class LLSearchEditor; +class LLFilterEditor; class LLTabContainer; class LLAvatarList; class LLGroupList; @@ -77,7 +77,7 @@ private: void reSelectedCurrentTab(); // UI callbacks - void onSearchEdit(const std::string& search_string); + void onFilterEdit(const std::string& search_string); void onTabSelected(const LLSD& param); void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); @@ -104,7 +104,7 @@ private: const std::vector& ids, void*); - LLSearchEditor* mSearchEditor; + LLFilterEditor* mFilterEditor; LLTabContainer* mTabContainer; LLAvatarList* mFriendList; LLAvatarList* mNearbyList; diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index 961c54d667..cda1a9e7e7 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -38,6 +38,7 @@ #include "llpanel.h" #include "message.h" #include "llagent.h" +#include "llbutton.h" #include "llparcel.h" #include "llviewerparcelmgr.h" #include "lltexturectrl.h" diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index c162a9ba33..57c633dd74 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -32,7 +32,7 @@ #include "llviewerprecompiledheaders.h" #include "llfloaterreg.h" -#include "llsearcheditor.h" +#include "llfiltereditor.h" #include "lltabcontainer.h" #include "lluictrlfactory.h" @@ -67,7 +67,7 @@ LLPanelPlaces::LLPanelPlaces() : LLPanel(), mFilterSubString(LLStringUtil::null), mActivePanel(NULL), - mSearchEditor(NULL), + mFilterEditor(NULL), mPlaceInfo(NULL) { gInventory.addObserver(this); @@ -92,10 +92,10 @@ BOOL LLPanelPlaces::postBuild() mTabContainer->setCommitCallback(boost::bind(&LLPanelPlaces::onTabSelected, this)); } - mSearchEditor = getChild("Filter"); - if (mSearchEditor) + mFilterEditor = getChild("Filter"); + if (mFilterEditor) { - mSearchEditor->setSearchCallback(boost::bind(&LLPanelPlaces::onSearchEdit, this, _1)); + mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2)); } mPlaceInfo = getChild("panel_place_info", TRUE, FALSE); @@ -187,7 +187,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) } } -void LLPanelPlaces::onSearchEdit(const std::string& search_string) +void LLPanelPlaces::onFilterEdit(const std::string& search_string) { if (mFilterSubString != search_string) { @@ -196,7 +196,7 @@ void LLPanelPlaces::onSearchEdit(const std::string& search_string) LLStringUtil::toUpper(mFilterSubString); LLStringUtil::trimHead(mFilterSubString); - mSearchEditor->setText(mFilterSubString); + mFilterEditor->setText(mFilterSubString); mActivePanel->onSearchEdit(mFilterSubString); } @@ -208,7 +208,7 @@ void LLPanelPlaces::onTabSelected() if (!mActivePanel) return; - onSearchEdit(mFilterSubString); + onFilterEdit(mFilterSubString); mActivePanel->updateVerbs(); } @@ -274,7 +274,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) return; mPlaceInfo->setVisible(visible); - mSearchEditor->setVisible(!visible); + mFilterEditor->setVisible(!visible); mTabContainer->setVisible(!visible); // Enable overflow button only for the information about agent's current location. diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 6fbb7562c9..e2ba4f39cd 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -42,7 +42,7 @@ #include "llpanelplaceinfo.h" class LLPanelPlacesTab; -class LLSearchEditor; +class LLFilterEditor; class LLTabContainer; class LLPanelPlaces : public LLPanel, LLInventoryObserver @@ -55,7 +55,7 @@ public: /*virtual*/ void changed(U32 mask); /*virtual*/ void onOpen(const LLSD& key); - void onSearchEdit(const std::string& search_string); + void onFilterEdit(const std::string& search_string); void onTabSelected(); //void onAddLandmarkButtonClicked(); //void onCopySLURLButtonClicked(); @@ -68,7 +68,7 @@ public: void onAgentParcelChange(); private: - LLSearchEditor* mSearchEditor; + LLFilterEditor* mFilterEditor; LLPanelPlacesTab* mActivePanel; LLTabContainer* mTabContainer; LLPanelPlaceInfo* mPlaceInfo; diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index dc9119d2e3..e5b1f04064 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -31,12 +31,14 @@ #include "llviewerprecompiledheaders.h" +#include "llpanelplacestab.h" + #include "llwindow.h" #include "llnotifications.h" +#include "llbutton.h" #include "llslurl.h" -#include "llpanelplacestab.h" #include "llworldmap.h" void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel) diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 37262b736e..abcff7cfb1 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -118,7 +118,7 @@ LLSideTrayTab::LLSideTrayTab(const Params& params):mAccordionCtrl(0) { mImagePath = params.image_path; mTabTitle = params.tab_title; - mDescription = params.tab_description; + mDescription = params.description; } LLSideTrayTab::~LLSideTrayTab() { diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 7487c71bfc..7b1f4aee04 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -51,10 +51,11 @@ public: // image name Optional image_path; Optional tab_title; - Optional tab_description; - Params():image_path("image","") - ,tab_title("tab_title","no title") - ,tab_description("description","no description") + Optional description; + Params() + : image_path("image"), + tab_title("tab_title","no title"), + description("description","no description") {}; }; protected: @@ -109,14 +110,14 @@ public: Optional default_button_height; Optional default_button_margin; - Params(): - collapsed("collapsed",false) - ,tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga") - ,tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga") - ,default_button_width("tab_btn_width",32) - ,default_button_height("tab_btn_height",32) - ,default_button_margin("tab_btn_margin",0) - {}; + Params() + : collapsed("collapsed",false), + tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga"), + tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga"), + default_button_width("tab_btn_width",32), + default_button_height("tab_btn_height",32), + default_button_margin("tab_btn_margin",0) + {}; }; static LLSideTray* getInstance (); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 211a441d64..d792b972bb 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -60,7 +60,7 @@ #include "llscrollcontainer.h" #include "lltoolmgr.h" #include "lltoolpipette.h" -#include "llsearcheditor.h" +#include "llfiltereditor.h" #include "lltool.h" #include "llviewerwindow.h" @@ -130,7 +130,7 @@ public: void updateFilterPermMask(); void commitIfImmediateSet(); - void onSearchEdit(const std::string& search_string ); + void onFilterEdit(const std::string& search_string ); static void onBtnSetToDefault( void* userdata ); static void onBtnSelect( void* userdata ); @@ -164,7 +164,7 @@ protected: std::string mPendingName; BOOL mActive; - LLSearchEditor* mSearchEdit; + LLFilterEditor* mFilterEdit; LLInventoryPanel* mInventoryPanel; PermissionMask mImmediateFilterPermMask; PermissionMask mNonImmediateFilterPermMask; @@ -191,7 +191,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mTentativeLabel(NULL), mResolutionLabel(NULL), mActive( TRUE ), - mSearchEdit(NULL), + mFilterEdit(NULL), mImmediateFilterPermMask(immediate_filter_perm_mask), mNonImmediateFilterPermMask(non_immediate_filter_perm_mask), mContextConeOpacity(0.f) @@ -335,9 +335,9 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) { LLFolderView* root_folder = mInventoryPanel->getRootFolder(); - if (root_folder && mSearchEdit) + if (root_folder && mFilterEdit) { - if (mSearchEdit->hasFocus() + if (mFilterEdit->hasFocus() && (key == KEY_RETURN || key == KEY_DOWN) && mask == MASK_NONE) { @@ -362,7 +362,7 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) if (mInventoryPanel->hasFocus() && key == KEY_UP) { - mSearchEdit->focusFirstItem(TRUE); + mFilterEdit->focusFirstItem(TRUE); } } @@ -404,8 +404,8 @@ BOOL LLFloaterTexturePicker::postBuild() childSetCommitCallback("show_folders_check", onShowFolders, this); childSetVisible("show_folders_check", FALSE); - mSearchEdit = getChild("inventory search editor"); - mSearchEdit->setSearchCallback(boost::bind(&LLFloaterTexturePicker::onSearchEdit, this, _1)); + mFilterEdit = getChild("inventory search editor"); + mFilterEdit->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onFilterEdit, this, _2)); mInventoryPanel = getChild("inventory panel"); @@ -524,7 +524,7 @@ void LLFloaterTexturePicker::draw() childSetValue("Pipette", LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); //RN: reset search bar to reflect actual search query (all caps, for example) - mSearchEdit->setText(mInventoryPanel->getFilterSubString()); + mFilterEdit->setText(mInventoryPanel->getFilterSubString()); //BOOL allow_copy = FALSE; if( mOwner ) @@ -797,7 +797,7 @@ void LLFloaterTexturePicker::updateFilterPermMask() //mInventoryPanel->setFilterPermMask( getFilterPermMask() ); Commented out due to no-copy texture loss. } -void LLFloaterTexturePicker::onSearchEdit(const std::string& search_string ) +void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string ) { std::string upper_case_search_string = search_string; LLStringUtil::toUpper(upper_case_search_string); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index e30cdb2e97..0b232da62b 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -84,7 +84,7 @@ public: Params() : image_id("image"), - default_image_id("default_image"), + default_image_id("default_image_id"), default_image_name("default_image_name"), allow_no_texture("allow_no_texture"), can_apply_immediately("can_apply_immediately"), diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 954418f7fb..9144f9c3e0 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -32,9 +32,11 @@ #include "llviewerprecompiledheaders.h" // must be first include -#include "llfocusmgr.h" #include "lltoast.h" +#include "llbutton.h" +#include "llfocusmgr.h" + using namespace LLNotificationsUI; //-------------------------------------------------------------------------- diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index c43618d330..a7b57802c1 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -174,7 +174,7 @@ LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification) : LLToas params.max_text_length(MAX_LENGTH); params.default_text(mMessage); params.font(sFont); - params.allow_embedded_items(false); + params.embedded_items(false); params.word_wrap(true); params.tab_stop(false); params.mouse_opaque(false); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8f1b105ba6..74ded99124 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1719,7 +1719,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; args["SUBJECT"] = subj; args["MESSAGE"] = mes; - LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).timestamp(timestamp)); + LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(timestamp)); } // Also send down the old path for now. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 24479485ef..3e86f48cc5 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -107,6 +107,7 @@ #include "llfloatertools.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" +#include "llfontfreetype.h" #include "llgesturemgr.h" #include "llglheaders.h" #include "llhoverview.h" diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 7703211c3d..dc5936a435 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -1,4 +1,5 @@ + @@ -469,7 +470,6 @@ - @@ -477,4 +477,5 @@ + diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 1fb0942461..cb3388ccbc 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1147,7 +1147,7 @@ Go to World menu > About Land or select another parcel to show its details. name="online_status" width="-1" /> - - + width="315"> + + + +