diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 4 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llfloatertoybox.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llfloatertoybox.h | 1 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.h | 4 | ||||
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinbox.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.cpp | 107 | ||||
-rw-r--r-- | indra/newview/llpanelmarketplaceinboxinventory.h | 36 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 21 | ||||
-rw-r--r-- | indra/newview/lltoolbarview.cpp | 30 | ||||
-rw-r--r-- | indra/newview/lltoolbarview.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_toybox.xml | 24 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 18 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml | 19 |
15 files changed, 265 insertions, 57 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 4dd11541b9..8057506736 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -2545,8 +2545,8 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e { // This is where we would constrain move/resize to a particular screen - const S32 MIN_WIDTH = 320; - const S32 MIN_HEIGHT = 240; + const S32 MIN_WIDTH = 1024; + const S32 MIN_HEIGHT = 768; Rect currentBounds; Rect previousBounds; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 121c7880df..6ef49a9a9c 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2354,6 +2354,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ return 0; } + case WM_GETMINMAXINFO: + { + LPMINMAXINFO min_max = (LPMINMAXINFO)l_param; + min_max->ptMinTrackSize.x = 1024; + min_max->ptMinTrackSize.y = 768; + return 0; + } + case WM_SIZE: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_SIZE"); diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index f527937e8f..324afe661f 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -42,6 +42,7 @@ LLFloaterToybox::LLFloaterToybox(const LLSD& key) , mToolBar(NULL) { mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this)); + mCommitCallbackRegistrar.add("Toybox.ClearAll", boost::bind(&LLFloaterToybox::onBtnClearAll, this)); } LLFloaterToybox::~LLFloaterToybox() @@ -121,15 +122,35 @@ static bool finish_restore_toybox(const LLSD& notification, const LLSD& response { LLToolBarView::loadDefaultToolbars(); } + return false; } + +static bool finish_clear_all_toybox(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + LLToolBarView::clearAllToolbars(); + } + + return false; +} + static LLNotificationFunctorRegistration finish_restore_toybox_reg("ConfirmRestoreToybox", finish_restore_toybox); +static LLNotificationFunctorRegistration finish_clear_all_toybox_reg("ConfirmClearAllToybox", finish_clear_all_toybox); void LLFloaterToybox::onBtnRestoreDefaults() { LLNotificationsUtil::add("ConfirmRestoreToybox"); } +void LLFloaterToybox::onBtnClearAll() +{ + LLNotificationsUtil::add("ConfirmClearAllToybox"); +} + BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h index 6f0275b8fe..10aee0e6f5 100644 --- a/indra/newview/llfloatertoybox.h +++ b/indra/newview/llfloatertoybox.h @@ -50,6 +50,7 @@ public: std::string& tooltip_msg); protected: + void onBtnClearAll(); void onBtnRestoreDefaults(); void onToolBarButtonEnter(LLView* button); diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 676eaf825d..a26515821d 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -556,6 +556,10 @@ public: folders_t::const_iterator getFoldersBegin() const { return mFolders.begin(); } folders_t::const_iterator getFoldersEnd() const { return mFolders.end(); } folders_t::size_type getFoldersCount() const { return mFolders.size(); } + + items_t::const_iterator getItemsBegin() const { return mItems.begin(); } + items_t::const_iterator getItemsEnd() const { return mItems.end(); } + items_t::size_type getItemsCount() const { return mItems.size(); } }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index fb02fe0ff7..dc25689fa3 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2528,9 +2528,9 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLPointer<LLViewerInventoryCategory> tfolder = new LLViewerInventoryCategory(gAgent.getID()); tfolder->unpackMessage(msg, _PREHASH_FolderData, i); - //llinfos << "unpaked folder '" << tfolder->getName() << "' (" - // << tfolder->getUUID() << ") in " << tfolder->getParentUUID() - // << llendl; + llinfos << "unpacked folder '" << tfolder->getName() << "' (" + << tfolder->getUUID() << ") in " << tfolder->getParentUUID() + << llendl; if(tfolder->getUUID().notNull()) { folders.push_back(tfolder); @@ -2570,8 +2570,8 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; titem->unpackMessage(msg, _PREHASH_ItemData, i); - //llinfos << "unpaked item '" << titem->getName() << "' in " - // << titem->getParentUUID() << llendl; + llinfos << "unpaked item '" << titem->getName() << "' in " + << titem->getParentUUID() << llendl; U32 callback_id; msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id); if(titem->getUUID().notNull()) diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index ac528947a4..7cb4bbf891 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -151,6 +151,20 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const fresh_item_count++; } } + + LLFolderViewFolder::items_t::const_iterator items_it = inbox_folder->getItemsBegin(); + LLFolderViewFolder::items_t::const_iterator items_end = inbox_folder->getItemsEnd(); + + for (; items_it != items_end; ++items_it) + { + const LLFolderViewItem * item_view = *items_it; + const LLInboxFolderViewItem * inbox_item_view = dynamic_cast<const LLInboxFolderViewItem*>(item_view); + + if (inbox_item_view && inbox_item_view->isFresh()) + { + fresh_item_count++; + } + } } } @@ -171,6 +185,7 @@ U32 LLPanelMarketplaceInbox::getTotalItemCount() const if (inbox_folder) { item_count += inbox_folder->getFoldersCount(); + item_count += inbox_folder->getItemsCount(); } } diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 2e4bf55d51..b9fb5b8c55 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -45,6 +45,7 @@ static LLDefaultChildRegistry::Register<LLInboxInventoryPanel> r1("inbox_inventory_panel"); static LLDefaultChildRegistry::Register<LLInboxFolderViewFolder> r2("inbox_folder_view_folder"); +static LLDefaultChildRegistry::Register<LLInboxFolderViewItem> r3("inbox_folder_view_item"); // @@ -137,7 +138,7 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge) { - LLFolderViewItem::Params params; + LLInboxFolderViewItem::Params params; params.name = bridge->getDisplayName(); params.icon = bridge->getIcon(); @@ -171,10 +172,6 @@ LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p) #endif } -LLInboxFolderViewFolder::~LLInboxFolderViewFolder() -{ -} - // virtual void LLInboxFolderViewFolder::draw() { @@ -190,6 +187,20 @@ void LLInboxFolderViewFolder::draw() LLFolderViewFolder::draw(); } +void LLInboxFolderViewFolder::selectItem() +{ + LLFolderViewFolder::selectItem(); + + deFreshify(); +} + +void LLInboxFolderViewFolder::toggleOpen() +{ + LLFolderViewFolder::toggleOpen(); + + deFreshify(); +} + void LLInboxFolderViewFolder::computeFreshness() { const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity"); @@ -218,20 +229,6 @@ void LLInboxFolderViewFolder::deFreshify() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -void LLInboxFolderViewFolder::selectItem() -{ - LLFolderViewFolder::selectItem(); - - deFreshify(); -} - -void LLInboxFolderViewFolder::toggleOpen() -{ - LLFolderViewFolder::toggleOpen(); - - deFreshify(); -} - void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) { mCreationDate = creation_date_utc; @@ -246,9 +243,81 @@ void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) // LLInboxFolderViewItem Implementation // +LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p) + : LLFolderViewItem(p) + , LLBadgeOwner(getHandle()) + , mFresh(false) +{ +#if SUPPORTING_FRESH_ITEM_COUNT + computeFreshness(); + + initBadgeParams(p.new_badge()); +#endif +} + BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) { return TRUE; } +// virtual +void LLInboxFolderViewItem::draw() +{ +#if SUPPORTING_FRESH_ITEM_COUNT + if (!badgeHasParent()) + { + addBadgeToParentPanel(); + } + + setBadgeVisibility(mFresh); +#endif + + LLFolderViewItem::draw(); +} + +void LLInboxFolderViewItem::selectItem() +{ + LLFolderViewItem::selectItem(); + + deFreshify(); +} + +void LLInboxFolderViewItem::computeFreshness() +{ + const U32 last_expansion_utc = gSavedPerAccountSettings.getU32("LastInventoryInboxActivity"); + + if (last_expansion_utc > 0) + { + mFresh = (mCreationDate > last_expansion_utc); + +#if DEBUGGING_FRESHNESS + if (mFresh) + { + llinfos << "Item is fresh! -- creation " << mCreationDate << ", saved_freshness_date " << last_expansion_utc << llendl; + } +#endif + } + else + { + mFresh = true; + } +} + +void LLInboxFolderViewItem::deFreshify() +{ + mFresh = false; + + gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); +} + +void LLInboxFolderViewItem::setCreationDate(time_t creation_date_utc) +{ + mCreationDate = creation_date_utc; + + if (mParentFolder == mRoot) + { + computeFreshness(); + } +} + // eof diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h index 46eeb9ea7f..09b14ec547 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.h +++ b/indra/newview/llpanelmarketplaceinboxinventory.h @@ -69,16 +69,15 @@ public: }; LLInboxFolderViewFolder(const Params& p); - ~LLInboxFolderViewFolder(); void draw(); - void computeFreshness(); - void deFreshify(); - void selectItem(); void toggleOpen(); + void computeFreshness(); + void deFreshify(); + bool isFresh() const { return mFresh; } protected: @@ -88,15 +87,36 @@ protected: }; -class LLInboxFolderViewItem : public LLFolderViewItem +class LLInboxFolderViewItem : public LLFolderViewItem, public LLBadgeOwner { public: - LLInboxFolderViewItem(const Params& p) - : LLFolderViewItem(p) + struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params> { - } + Optional<LLBadge::Params> new_badge; + + Params() + : new_badge("new_badge") + { + } + }; + + LLInboxFolderViewItem(const Params& p); BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + + void draw(); + + void selectItem(); + + void computeFreshness(); + void deFreshify(); + + bool isFresh() const { return mFresh; } + +protected: + void setCreationDate(time_t creation_date_utc); + + bool mFresh; }; #endif //LL_INBOXINVENTORYPANEL_H diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index a24f6b24f0..91f8035556 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -113,21 +113,13 @@ public: switch (added_category_type) { case LLFolderType::FT_INBOX: + mSidepanelInventory->enableInbox(true); mSidepanelInventory->observeInboxModifications(added_category->getUUID()); break; case LLFolderType::FT_OUTBOX: + mSidepanelInventory->enableOutbox(true); mSidepanelInventory->observeOutboxModifications(added_category->getUUID()); break; - case LLFolderType::FT_NONE: - // HACK until sim update to properly create folder with system type - if (added_category->getName() == "Received Items") - { - mSidepanelInventory->observeInboxModifications(added_category->getUUID()); - } - else if (added_category->getName() == "Merchant Outbox") - { - mSidepanelInventory->observeOutboxModifications(added_category->getUUID()); - } default: break; } @@ -288,7 +280,6 @@ BOOL LLSidepanelInventory::postBuild() gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); gSavedSettings.getControl("InventoryDisplayOutbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayOutboxChanged)); - updateInboxOutbox(); // Update the verbs buttons state. updateVerbs(); @@ -316,20 +307,20 @@ void LLSidepanelInventory::updateInboxOutbox() // Set up observer for inbox changes, if we have an inbox already if (!inbox_id.isNull()) { - observeInboxModifications(inbox_id); - // Enable the display of the inbox if it exists enableInbox(true); + + observeInboxModifications(inbox_id); } #if ENABLE_MERCHANT_OUTBOX_PANEL // Set up observer for outbox changes, if we have an outbox already if (!outbox_id.isNull()) { - observeOutboxModifications(outbox_id); - // Enable the display of the outbox if it exists enableOutbox(true); + + observeOutboxModifications(outbox_id); } #endif } diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index ed1dfbb8cd..5ff0ccfeb2 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -315,6 +315,19 @@ bool LLToolBarView::loadToolbars(bool force_default) return true; } +bool LLToolBarView::clearToolbars() +{ + for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++) + { + if (mToolbars[i]) + { + mToolbars[i]->clearCommandsList(); + } + } + + return true; +} + //static bool LLToolBarView::loadDefaultToolbars() { @@ -332,6 +345,23 @@ bool LLToolBarView::loadDefaultToolbars() return retval; } +//static +bool LLToolBarView::clearAllToolbars() +{ + bool retval = false; + + if (gToolBarView) + { + retval = gToolBarView->clearToolbars(); + if (retval) + { + gToolBarView->saveToolbars(); + } + } + + return retval; +} + void LLToolBarView::saveToolbars() const { if (!mToolbarsLoaded) diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index 4307d10258..f871d522a2 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -93,10 +93,14 @@ public: // Loads the toolbars from the existing user or default settings bool loadToolbars(bool force_default = false); // return false if load fails + + // Clears all buttons off the toolbars + bool clearToolbars(); void setToolBarsVisible(bool visible); static bool loadDefaultToolbars(); + static bool clearAllToolbars(); static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton); static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); diff --git a/indra/newview/skins/default/xui/en/floater_toybox.xml b/indra/newview/skins/default/xui/en/floater_toybox.xml index ef3951a1cd..493d44a9cf 100644 --- a/indra/newview/skins/default/xui/en/floater_toybox.xml +++ b/indra/newview/skins/default/xui/en/floater_toybox.xml @@ -5,7 +5,7 @@ can_minimize="false" can_resize="false" default_tab_group="1" - height="460" + height="330" help_topic="toybox" layout="topleft" legacy_header_height="18" @@ -46,7 +46,7 @@ Buttons will appear as shown or as icon-only depending on each toolbar's settings. </text> <toolbar - bottom="395" + bottom="265" button_display_mode="icons_with_text" follows="all" left="20" @@ -82,20 +82,32 @@ <panel bevel_style="none" border="true" - bottom="396" + bottom="266" follows="left|bottom|right" left="20" right="-20" - top="396" /> + top="266" /> + <button + follows="left|bottom|right" + height="23" + label="Clear all toolbars" + label_selected="Clear all toolbars" + layout="topleft" + left="185" + name="btn_clear_all" + top="285" + width="130"> + <button.commit_callback function="Toybox.ClearAll" /> + </button> <button follows="left|bottom|right" height="23" label="Restore defaults" label_selected="Restore defaults" layout="topleft" - left="260" + left="335" name="btn_restore_defaults" - top="415" + top="285" width="130"> <button.commit_callback function="Toybox.RestoreDefaults" /> </button> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 3ed8c30ca8..e4458f33b1 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4636,7 +4636,21 @@ Are you sure you want to quit? name="ConfirmRestoreToybox" type="alertmodal"> <unique/> -Are you sure you want to restore your default buttons and toolbars? +This action will restore your default buttons and toolbars. + +You cannot undo this action. + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" + name="ConfirmClearAllToybox" + type="alertmodal"> + <unique/> +This action will return all buttons to the toolbox and your toolbars will be empty. You cannot undo this action. <usetemplate @@ -4644,7 +4658,7 @@ You cannot undo this action. notext="Cancel" yestext="OK"/> </notification> - + <notification icon="alertmodal.tga" name="DeleteItems" diff --git a/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml new file mode 100644 index 0000000000..7a7a6e9a09 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/inbox_folder_view_item.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<inbox_folder_view_item + item_height="20" + item_top_pad="4" + selection_image="Rounded_Square" + > + <new_badge + label="New" + label_offset_horiz="-1" + location="right" + padding_horiz="12.5" + padding_vert="2" + location_offset_hcenter="-23" + border_image="New_Tag_Border" + border_color="DkGray2" + image="New_Tag_Background" + image_color="Black" + /> +</inbox_folder_view_item> |