From 5301d4189fde3332237b52ce26ab08f5c7fb0baa Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 4 Mar 2010 12:18:24 +0200 Subject: Updated major sub task EXT-5858 - Assigned picture is stretched in the Classified Info panel. Fixed reshape issues. Added stretching to edit classified panel. --HG-- branch : product-engine --- indra/newview/llpanelclassified.cpp | 64 +++++++++++++++++----- indra/newview/llpanelclassified.h | 15 ++++- .../skins/default/xui/en/panel_classified_info.xml | 14 ++++- .../skins/default/xui/en/panel_edit_classified.xml | 21 +++++-- 4 files changed, 89 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 6f0b7df935..ee722a048b 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1166,6 +1166,7 @@ LLPanelClassifiedInfo::LLPanelClassifiedInfo() , mTeleportClicksNew(0) , mMapClicksNew(0) , mProfileClicksNew(0) + , mSnapshotCtrl(NULL) { sAllPanels.push_back(this); } @@ -1195,7 +1196,8 @@ BOOL LLPanelClassifiedInfo::postBuild() mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight(); mScrollingPanelWidth = mScrollingPanel->getRect().getWidth(); - mSnapshotRect = getChild("classified_snapshot")->getRect(); + mSnapshotCtrl = getChild("classified_snapshot"); + mSnapshotRect = getDefaultSnapshotRect(); return TRUE; } @@ -1229,7 +1231,8 @@ void LLPanelClassifiedInfo::reshape(S32 width, S32 height, BOOL called_from_pare mScrollingPanel->reshape(mScrollingPanelWidth + scrollbar_size, scroll_height); } - mSnapshotRect = getChild("classified_snapshot")->getRect(); + mSnapshotRect = getDefaultSnapshotRect(); + stretchSnapshot(); } void LLPanelClassifiedInfo::onOpen(const LLSD& key) @@ -1359,12 +1362,7 @@ void LLPanelClassifiedInfo::setClassifiedLocation(const std::string& location) void LLPanelClassifiedInfo::setSnapshotId(const LLUUID& id) { - childSetValue("classified_snapshot", id); - if(!mSnapshotStreched) - { - LLUICtrl* snapshot = getChild("classified_snapshot"); - snapshot->setRect(mSnapshotRect); - } + mSnapshotCtrl->setValue(id); mSnapshotStreched = false; } @@ -1374,7 +1372,10 @@ void LLPanelClassifiedInfo::draw() // Stretch in draw because it takes some time to load a texture, // going to try to stretch snapshot until texture is loaded - stretchSnapshot(); + if(!mSnapshotStreched) + { + stretchSnapshot(); + } } LLUUID LLPanelClassifiedInfo::getSnapshotId() @@ -1474,10 +1475,9 @@ void LLPanelClassifiedInfo::stretchSnapshot() // *NOTE dzaporozhan // Could be moved to LLTextureCtrl - LLTextureCtrl* texture_ctrl = getChild("classified_snapshot"); - LLViewerFetchedTexture* texture = texture_ctrl->getTexture(); + LLViewerFetchedTexture* texture = mSnapshotCtrl->getTexture(); - if(!texture || mSnapshotStreched) + if(!texture) { return; } @@ -1485,11 +1485,16 @@ void LLPanelClassifiedInfo::stretchSnapshot() if(0 == texture->getOriginalWidth() || 0 == texture->getOriginalHeight()) { // looks like texture is not loaded yet - llinfos << "Missing image size" << llendl; return; } LLRect rc = mSnapshotRect; + // *HACK dzaporozhan + // LLTextureCtrl uses BTN_HEIGHT_SMALL as bottom for texture which causes + // drawn texture to be smaller than expected. (see LLTextureCtrl::draw()) + // Lets increase texture height to force texture look as expected. + rc.mBottom -= BTN_HEIGHT_SMALL; + F32 t_width = texture->getFullWidth(); F32 t_height = texture->getFullHeight(); @@ -1499,11 +1504,19 @@ void LLPanelClassifiedInfo::stretchSnapshot() t_height *= ratio; rc.setCenterAndSize(rc.getCenterX(), rc.getCenterY(), llfloor(t_width), llfloor(t_height)); - texture_ctrl->setRect(rc); + mSnapshotCtrl->setShape(rc); mSnapshotStreched = true; } +LLRect LLPanelClassifiedInfo::getDefaultSnapshotRect() +{ + // Using scroll container makes getting default rect a hard task + // because rect in postBuild() and in first reshape() is not the same. + // Using snapshot_panel makes it easier to reshape snapshot. + return getChild("snapshot_panel")->getLocalRect(); +} + void LLPanelClassifiedInfo::onMapClick() { LLFloaterWorldMap::getInstance()->trackLocation(getPosGlobal()); @@ -1587,6 +1600,8 @@ BOOL LLPanelClassifiedEdit::postBuild() childSetAction("save_changes_btn", boost::bind(&LLPanelClassifiedEdit::onSaveClick, this)); childSetAction("set_to_curr_location_btn", boost::bind(&LLPanelClassifiedEdit::onSetLocationClick, this)); + mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelClassifiedEdit::onTextureSelected, this)); + return TRUE; } @@ -1734,6 +1749,22 @@ bool LLPanelClassifiedEdit::canClose() return mCanClose; } +void LLPanelClassifiedEdit::draw() +{ + LLPanel::draw(); + + // Need to re-stretch on every draw because LLTextureCtrl::onSelectCallback + // does not trigger callbacks when user navigates through images. + stretchSnapshot(); +} + +void LLPanelClassifiedEdit::stretchSnapshot() +{ + LLPanelClassifiedInfo::stretchSnapshot(); + + getChild("edit_icon")->setShape(mSnapshotCtrl->getRect()); +} + void LLPanelClassifiedEdit::sendUpdate() { LLAvatarClassifiedInfo c_data; @@ -1913,4 +1944,9 @@ void LLPanelClassifiedEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl) ctrl->setVisible(FALSE); } +void LLPanelClassifiedEdit::onTextureSelected() +{ + setSnapshotId(mSnapshotCtrl->getValue().asUUID()); +} + //EOF diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 43b47d4e3e..3df3a2255b 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -280,10 +280,16 @@ protected: void stretchSnapshot(); + LLRect getDefaultSnapshotRect(); + void onMapClick(); void onTeleportClick(); void onExit(); + bool mSnapshotStreched; + LLRect mSnapshotRect; + LLTextureCtrl* mSnapshotCtrl; + private: LLUUID mAvatarId; @@ -292,9 +298,6 @@ private: LLUUID mParcelId; bool mInfoLoaded; - bool mSnapshotStreched; - LLRect mSnapshotRect; - LLScrollContainer* mScrollContainer; LLPanel* mScrollingPanel; @@ -341,6 +344,10 @@ public: bool canClose(); + void draw(); + + void stretchSnapshot(); + protected: LLPanelClassifiedEdit(); @@ -372,6 +379,8 @@ protected: void onTexturePickerMouseEnter(LLUICtrl* ctrl); void onTexturePickerMouseLeave(LLUICtrl* ctrl); + void onTextureSelected(); + private: bool mIsNew; bool mCanClose; diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 869a05f27d..65c154daee 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -74,15 +74,25 @@ height="500" left="0" width="285"> + + + - + top="0" + left="0" + width="272" /> + Date: Thu, 4 Mar 2010 12:19:54 +0200 Subject: Updated major sub task EXT-5857 - location, content type, category, description in the Classified Info panel have no labels. Updating padding because texture and name field are too close(introduced in 10127:4b36b7d75399) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_classified_info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index 65c154daee..cee78d7d5c 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -104,7 +104,7 @@ font="SansSerifBig" font.style="BOLD" left="10" - top_pad="0" + top_pad="5" name="classified_name" read_only="true" text_color="white" -- cgit v1.2.3 From e76f673cc2d548ffb20f2c617ac6f6ee24a32bd5 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 4 Mar 2010 13:39:54 +0200 Subject: Related to major EXT-4105 ([BSI] group names are not able to be copied from side panel) - added ability to copy group names from group info panel title. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 5147bb72d0..701a14e1c5 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -44,11 +44,16 @@ background_visible="true" tab_stop="false" top="2" width="23" /> - Date: Thu, 4 Mar 2010 13:41:04 +0200 Subject: Fixed normal EXT-4798 (Voice notifications steal keyboard focus by default) --HG-- branch : product-engine --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1dc601e260..b3f085ef6d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1565,7 +1565,7 @@ void LLCallDialog::onOpen(const LLSD& key) LLDockableFloater::onOpen(key); // it should be over the all floaters. EXT-5116 - gFloaterView->bringToFront(this); + gFloaterView->bringToFront(this, FALSE); } void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) -- cgit v1.2.3 From 85e698fa72399ecb1ab9dab5e5a88e7389fdd234 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 4 Mar 2010 15:24:22 +0200 Subject: fixed reopened EXT-4131 [BSI] "Only friends and groups can call or IM me" NEEDS auto-response --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 8 ++++++-- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 224514dd48..839d3f0c21 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1289,7 +1289,7 @@ BOOL LLPanelPreference::postBuild() if (hasChild("media_enabled")) { bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); - getChild("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); + getChild("media_enabled")->set(media_enabled); getChild("autoplay_enabled")->setEnabled(media_enabled); } @@ -1297,7 +1297,11 @@ BOOL LLPanelPreference::postBuild() { getChild("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic")); } - + if (hasChild("voice_call_friends_only_check")) + { + getChild("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); + } + apply(); return true; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 936f4a3fab..14347e146b 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -249,7 +249,7 @@ Save all changes to clothing/body parts? Non-friends won't know that you've choosen to ignore their calls and instant messages. + yestext="OK"/> Date: Thu, 4 Mar 2010 15:40:35 +0200 Subject: partial fix for EXT-4819 [NUX] New Application Icon Integration only the obvious icon files are replaced --HG-- branch : product-engine --- indra/newview/installers/windows/install_icon.ico | Bin 25214 -> 367958 bytes .../newview/installers/windows/uninstall_icon.ico | Bin 25214 -> 367958 bytes indra/newview/res/ll_icon.ico | Bin 364590 -> 367958 bytes indra/newview/secondlife.icns | Bin 135209 -> 180809 bytes 4 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra') diff --git a/indra/newview/installers/windows/install_icon.ico b/indra/newview/installers/windows/install_icon.ico index 1e00530c90..efe6c4f323 100644 Binary files a/indra/newview/installers/windows/install_icon.ico and b/indra/newview/installers/windows/install_icon.ico differ diff --git a/indra/newview/installers/windows/uninstall_icon.ico b/indra/newview/installers/windows/uninstall_icon.ico index c4ec6c70bd..05e1546860 100644 Binary files a/indra/newview/installers/windows/uninstall_icon.ico and b/indra/newview/installers/windows/uninstall_icon.ico differ diff --git a/indra/newview/res/ll_icon.ico b/indra/newview/res/ll_icon.ico index c35a3fa3a3..87985b9285 100644 Binary files a/indra/newview/res/ll_icon.ico and b/indra/newview/res/ll_icon.ico differ diff --git a/indra/newview/secondlife.icns b/indra/newview/secondlife.icns index ceb6036e0e..4560d4bb24 100644 Binary files a/indra/newview/secondlife.icns and b/indra/newview/secondlife.icns differ -- cgit v1.2.3 From b6d5909ddc06613c581dbd8a60dedf14ffb9d1fe Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 4 Mar 2010 15:43:14 +0200 Subject: partitial fix for major EXT-4820 [NUX] Viewer dimensions on first-run need to specify desctop width and height for macos and linux (see LLDesctopInfo in llsys.cpp for details) --HG-- branch : product-engine --- indra/llcommon/llsys.cpp | 28 ++++++++++++++++++++++++++++ indra/llcommon/llsys.h | 15 +++++++++++++++ indra/newview/llappviewer.cpp | 32 ++++++++++++++++++++++++++++---- 3 files changed, 71 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 0272c55db2..cb91a54f11 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -775,6 +775,34 @@ void LLMemoryInfo::stream(std::ostream& s) const #endif } +S32 LLDisplayInfo::getDisplayWidth() const +{ +#if LL_WINDOWS + return ::GetSystemMetrics(SM_CXVIRTUALSCREEN); +#elif LL_DARWIN + return 1024; //*FIXME +#elif LL_SOLARIS + return 1024; //*FIXME +else + return 1024; //*FIXME +#endif +} + +S32 LLDisplayInfo::getDisplayHeight() const +{ +#if LL_WINDOWS + return ::GetSystemMetrics(SM_CYVIRTUALSCREEN); +#elif LL_DARWIN + return 768; //*FIXME +#elif LL_SOLARIS + return 768; //*FIXME +#else + return 768; //*FIXME +#endif + +} + + std::ostream& operator<<(std::ostream& s, const LLOSInfo& info) { info.stream(s); diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index c2c45bec9a..aa3fdd485b 100644 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -122,6 +122,21 @@ public: U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes }; +//============================================================================= +// +// CLASS LLDisplayInfo +class LL_COMMON_API LLDisplayInfo + +/*! @brief Class to query the information about some display settings +*/ +{ +public: + LLDisplayInfo(){}; ///< Default constructor + + S32 getDisplayWidth() const; ///< display width + S32 getDisplayHeight() const; ///< display height + +}; LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info); LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 948d38befb..6d4c90c2b9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -304,7 +304,8 @@ static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; - +static const S32 FIRST_RUN_WINDOW_WIDTH = 1024; +static const S32 FIRST_RUN_WINDOW_HRIGHT = 768; //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2362,12 +2363,35 @@ bool LLAppViewer::initWindow() // store setting in a global for easy access and modification gNoRender = gSavedSettings.getBOOL("DisableRendering"); + S32 window_x = gSavedSettings.getS32("WindowX"); + S32 window_y = gSavedSettings.getS32("WindowY"); + S32 window_width = gSavedSettings.getS32("WindowWidth"); + S32 window_height = gSavedSettings.getS32("WindowHeight"); + + bool show_maximized = gSavedSettings.getBOOL("WindowMaximized"); + + bool first_run = gSavedSettings.getBOOL("FirstLoginThisInstall"); + + if (first_run)//for first login + { + window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded + window_height = FIRST_RUN_WINDOW_HRIGHT; + + //if screen resolution is lower then 1024*768 then show maximized + LLDisplayInfo display_info; + if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH + || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HRIGHT) + { + show_maximized = true; + } + } + // always start windowed BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); gViewerWindow = new LLViewerWindow(gWindowTitle, VIEWER_WINDOW_CLASSNAME, - gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"), - gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), + window_x, window_y, + window_width, window_height, FALSE, ignorePixelDepth); LLNotificationsUI::LLNotificationManager::getInstance(); @@ -2378,7 +2402,7 @@ bool LLAppViewer::initWindow() gViewerWindow->toggleFullscreen(FALSE); } - if (gSavedSettings.getBOOL("WindowMaximized")) + if (show_maximized) { gViewerWindow->mWindow->maximize(); gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); -- cgit v1.2.3 From 997e91f08e9b6afd5bb3335da235e6ea9e9c0761 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 4 Mar 2010 16:05:04 +0200 Subject: Fixed major bug EXT-5943 - Classifieds are Published and charged as soon as you hit Save. Added Publish Classified floater to confirm classified creashion and publishing. --HG-- branch : product-engine --- indra/newview/llpanelclassified.cpp | 94 +++++++++++++++++++++- indra/newview/llpanelclassified.h | 31 ++++++- indra/newview/llviewerfloaterreg.cpp | 2 + .../default/xui/en/floater_publish_classified.xml | 82 +++++++++++++++++++ .../skins/default/xui/en/panel_edit_classified.xml | 8 +- 5 files changed, 211 insertions(+), 6 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_publish_classified.xml (limited to 'indra') diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index ee722a048b..0bbd850eda 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1549,6 +1549,7 @@ LLPanelClassifiedEdit::LLPanelClassifiedEdit() : LLPanelClassifiedInfo() , mIsNew(false) , mCanClose(false) + , mPublishFloater(NULL) { } @@ -1656,6 +1657,9 @@ void LLPanelClassifiedEdit::onOpen(const LLSD& key) enableEditing(false); } + std::string save_btn_label = isNew() ? getString("publish_label") : getString("save_label"); + childSetLabelArg("save_changes_btn", "[LABEL]", save_btn_label); + resetDirty(); setInfoLoaded(false); } @@ -1724,12 +1728,12 @@ void LLPanelClassifiedEdit::resetDirty() getChild("price_for_listing")->resetDirty(); } -void LLPanelClassifiedEdit::setSaveCallback(const commit_callback_t& cb) +void LLPanelClassifiedEdit::setSaveCallback(const commit_signal_t::slot_type& cb) { - getChild("save_changes_btn")->setClickedCallback(cb); + mSaveButtonClickedSignal.connect(cb); } -void LLPanelClassifiedEdit::setCancelCallback(const commit_callback_t& cb) +void LLPanelClassifiedEdit::setCancelCallback(const commit_signal_t::slot_type& cb) { getChild("cancel_btn")->setClickedCallback(cb); } @@ -1852,6 +1856,11 @@ S32 LLPanelClassifiedEdit::getPriceForListing() return childGetValue("price_for_listing").asInteger(); } +void LLPanelClassifiedEdit::setPriceForListing(S32 price) +{ + childSetValue("price_for_listing", price); +} + void LLPanelClassifiedEdit::onSetLocationClick() { setPosGlobal(gAgent.getPositionGlobal()); @@ -1895,9 +1904,45 @@ void LLPanelClassifiedEdit::onSaveClick() } } + if(isNew()) + { + mPublishFloater = LLFloaterReg::findTypedInstance( + "publish_classified", LLSD()); + + if(!mPublishFloater) + { + mPublishFloater = LLFloaterReg::getTypedInstance( + "publish_classified", LLSD()); + + mPublishFloater->setPublishClickedCallback(boost::bind + (&LLPanelClassifiedEdit::onPublishFloaterPublishClicked, this)); + } + + // set spinner value before it has focus or value wont be set + mPublishFloater->setPrice(getPriceForListing()); + mPublishFloater->openFloater(mPublishFloater->getKey()); + mPublishFloater->center(); + } + else + { + doSave(); + } +} + +void LLPanelClassifiedEdit::doSave() +{ mCanClose = true; sendUpdate(); resetDirty(); + + mSaveButtonClickedSignal(this, LLSD()); +} + +void LLPanelClassifiedEdit::onPublishFloaterPublishClicked() +{ + setPriceForListing(mPublishFloater->getPrice()); + + doSave(); } std::string LLPanelClassifiedEdit::getLocationNotice() @@ -1949,4 +1994,47 @@ void LLPanelClassifiedEdit::onTextureSelected() setSnapshotId(mSnapshotCtrl->getValue().asUUID()); } +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLPublishClassifiedFloater::LLPublishClassifiedFloater(const LLSD& key) + : LLFloater(key) +{ +} + +LLPublishClassifiedFloater::~LLPublishClassifiedFloater() +{ +} + +BOOL LLPublishClassifiedFloater::postBuild() +{ + LLFloater::postBuild(); + + childSetAction("publish_btn", boost::bind(&LLFloater::closeFloater, this, false)); + childSetAction("cancel_btn", boost::bind(&LLFloater::closeFloater, this, false)); + + return TRUE; +} + +void LLPublishClassifiedFloater::setPrice(S32 price) +{ + childSetValue("price_for_listing", price); +} + +S32 LLPublishClassifiedFloater::getPrice() +{ + return childGetValue("price_for_listing").asInteger(); +} + +void LLPublishClassifiedFloater::setPublishClickedCallback(const commit_signal_t::slot_type& cb) +{ + getChild("publish_btn")->setClickedCallback(cb); +} + +void LLPublishClassifiedFloater::setCancelClickedCallback(const commit_signal_t::slot_type& cb) +{ + getChild("cancel_btn")->setClickedCallback(cb); +} + //EOF diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 3df3a2255b..1b5b5e54d8 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -202,6 +202,23 @@ private: void* mUserData; }; +class LLPublishClassifiedFloater : public LLFloater +{ +public: + LLPublishClassifiedFloater(const LLSD& key); + virtual ~LLPublishClassifiedFloater(); + + /*virtual*/ BOOL postBuild(); + + void setPrice(S32 price); + S32 getPrice(); + + void setPublishClickedCallback(const commit_signal_t::slot_type& cb); + void setCancelClickedCallback(const commit_signal_t::slot_type& cb); + +private: +}; + class LLPanelClassifiedInfo : public LLPanel, public LLAvatarPropertiesObserver { public: @@ -334,9 +351,9 @@ public: /*virtual*/ void resetDirty(); - void setSaveCallback(const commit_callback_t& cb); + void setSaveCallback(const commit_signal_t::slot_type& cb); - void setCancelCallback(const commit_callback_t& cb); + void setCancelCallback(const commit_signal_t::slot_type& cb); /*virtual*/ void resetControls(); @@ -364,6 +381,8 @@ protected: S32 getPriceForListing(); + void setPriceForListing(S32 price); + U8 getFlags(); std::string getLocationNotice(); @@ -376,6 +395,10 @@ protected: void onChange(); void onSaveClick(); + void doSave(); + + void onPublishFloaterPublishClicked(); + void onTexturePickerMouseEnter(LLUICtrl* ctrl); void onTexturePickerMouseLeave(LLUICtrl* ctrl); @@ -384,6 +407,10 @@ protected: private: bool mIsNew; bool mCanClose; + + LLPublishClassifiedFloater* mPublishFloater; + + commit_signal_t mSaveButtonClickedSignal; }; #endif // LL_LLPANELCLASSIFIED_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8370c98470..65e9d8971a 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -117,6 +117,7 @@ #include "llmoveview.h" #include "llnearbychat.h" #include "llpanelblockedlist.h" +#include "llpanelclassified.h" #include "llpreviewanim.h" #include "llpreviewgesture.h" #include "llpreviewnotecard.h" @@ -219,6 +220,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("preview_sound", "floater_preview_sound.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); LLFloaterReg::add("properties", "floater_inventory_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build); LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml", diff --git a/indra/newview/skins/default/xui/en/floater_publish_classified.xml b/indra/newview/skins/default/xui/en/floater_publish_classified.xml new file mode 100644 index 0000000000..3225843d09 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_publish_classified.xml @@ -0,0 +1,82 @@ + + + + +Your classified ad will run for one week from the date it is published. + +Remember, Classified fees are non-refundable. + + + + + +More info (link to classified help) + +