meow-7.2.2
Richard Linden 2010-10-08 17:38:19 -07:00
commit c25216ca3a
8 changed files with 41 additions and 9 deletions

View File

@ -50,7 +50,7 @@ LLProgressBar::Params::Params()
LLProgressBar::LLProgressBar(const LLProgressBar::Params& p)
: LLView(p),
: LLUICtrl(p),
mImageBar(p.image_bar),
mImageFill(p.image_fill),
mColorBackground(p.color_bg()),
@ -80,7 +80,7 @@ void LLProgressBar::draw()
mImageFill->draw(progress_rect, bar_color);
}
void LLProgressBar::setPercent(const F32 percent)
void LLProgressBar::setValue(const LLSD& value)
{
mPercentDone = llclamp(percent, 0.f, 100.f);
mPercentDone = llclamp((F32)value.asReal(), 0.f, 100.f);
}

View File

@ -27,14 +27,14 @@
#ifndef LL_LLPROGRESSBAR_H
#define LL_LLPROGRESSBAR_H
#include "llview.h"
#include "lluictrl.h"
#include "llframetimer.h"
class LLProgressBar
: public LLView
: public LLUICtrl
{
public:
struct Params : public LLInitParam::Block<Params, LLView::Params>
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
Optional<LLUIImage*> image_bar,
image_fill;
@ -47,7 +47,7 @@ public:
LLProgressBar(const Params&);
virtual ~LLProgressBar();
void setPercent(const F32 percent);
void setValue(const LLSD& value);
/*virtual*/ void draw();

View File

@ -2984,6 +2984,17 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FastQuit</key>
<map>
<key>Comment</key>
<string>Quits as quickly as possible, only sending logout request before forcefully terminating. Use with care, as this might result in data corruption or loss.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FeatureManagerHTTPTable</key>
<map>

View File

@ -2879,8 +2879,22 @@ void LLAppViewer::forceQuit()
LLApp::setQuitting();
}
void LLAppViewer::fastQuit()
{
if (LLStartUp::getStartupState() >= STATE_STARTED)
{
sendLogoutRequest();
}
_exit(isError());
}
void LLAppViewer::requestQuit()
{
if (gSavedSettings.getBOOL("FastQuit"))
{
fastQuit();
}
llinfos << "requestQuit" << llendl;
LLViewerRegion* region = gAgent.getRegion();

View File

@ -66,6 +66,7 @@ public:
// Application control
void forceQuit(); // Puts the viewer into 'shutting down without error' mode.
void fastQuit(); // Shuts down the viewer immediately after sending a logout message
void requestQuit(); // Request a quit. A kinder, gentler quit.
void userQuit(); // The users asks to quit. Confirm, then requestQuit()
void earlyExit(const std::string& name,

View File

@ -175,6 +175,12 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
viewer_app_ptr->mainLoop();
}
if (gSavedSettings.getBOOL("FastQuit"))
{
viewer_app_ptr->fastQuit();
}
if (!LLApp::isError())
{
//

View File

@ -519,7 +519,7 @@ void LLPanelPrimMediaControls::updateShape()
if(LLPluginClassMediaOwner::MEDIA_LOADING == media_plugin->getStatus())
{
mMediaProgressPanel->setVisible(true);
mMediaProgressBar->setPercent(media_plugin->getProgressPercent());
mMediaProgressBar->setValue(media_plugin->getProgressPercent());
}
else
{

View File

@ -207,7 +207,7 @@ void LLProgressView::setText(const std::string& text)
void LLProgressView::setPercent(const F32 percent)
{
mProgressBar->setPercent(percent);
mProgressBar->setValue(percent);
}
void LLProgressView::setMessage(const std::string& msg)