diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-11-14 14:44:13 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-11-14 14:44:13 -0800 |
commit | 76caf0238cb98c1abf69d56e122c71a1208b0d72 (patch) | |
tree | 4f4a77ff8f11e7cc0a0f7af437b8699f0d035727 /indra/newview/llviewerwindow.cpp | |
parent | b403a9da23a2df73a657bfa835a3706a261af2fb (diff) | |
parent | c24645f7b51ea27e1686bbe72470a9f3c09fc676 (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6fcbc401af..140cbb4e04 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1789,17 +1789,13 @@ void LLViewerWindow::initBase() mLoginPanelHolder = main_view->getChild<LLView>("login_panel_holder")->getHandle(); // Create the toolbar view - // *TODO: Eventually, suppress the existence of this debug setting and turn toolbar FUI on permanently - if (gSavedSettings.getBOOL("DebugToolbarFUI")) - { - // Get a pointer to the toolbar view holder - LLPanel* panel_holder = main_view->getChild<LLPanel>("toolbar_view_holder"); - // Load the toolbar view from file - gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance()); - gToolBarView->setShape(panel_holder->getLocalRect()); - // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI()) - gToolBarView->setVisible(FALSE); - } + // Get a pointer to the toolbar view holder + LLPanel* panel_holder = main_view->getChild<LLPanel>("toolbar_view_holder"); + // Load the toolbar view from file + gToolBarView = LLUICtrlFactory::getInstance()->createFromFile<LLToolBarView>("panel_toolbar_view.xml", panel_holder, LLDefaultChildRegistry::instance()); + gToolBarView->setShape(panel_holder->getLocalRect()); + // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI()) + gToolBarView->setVisible(FALSE); // Constrain floaters to inside the menu and status bar regions. gFloaterView = main_view->getChild<LLFloaterView>("Floater View"); @@ -2165,8 +2161,18 @@ void LLViewerWindow::reshape(S32 width, S32 height) if (!maximized && mWindow->getSize(&window_size)) { - gSavedSettings.setS32("WindowWidth", window_size.mX); - gSavedSettings.setS32("WindowHeight", window_size.mY); + U32 min_window_width=gSavedSettings.getU32("MinWindowWidth"); + if ( window_size.mX < min_window_width ) + window_size.mX=min_window_width; + gSavedSettings.setU32("WindowWidth", window_size.mX); + + U32 min_window_height=gSavedSettings.getU32("MinWindowHeight"); + if ( window_size.mY < min_window_height ) + window_size.mY=min_window_height; + gSavedSettings.setU32("WindowHeight", window_size.mY); + + // tell the OS specific window code about min windoow size + mWindow->setMinSize(min_window_width, min_window_height); } LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width); @@ -4020,10 +4026,11 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d } // Saves an image to the harddrive as "SnapshotX" where X >= 1. -BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image) +BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker) { if (!image) { + llwarns << "No image to save" << llendl; return FALSE; } @@ -4043,7 +4050,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image) pick_type = LLFilePicker::FFSAVE_ALL; // ??? // Get a base file location if needed. - if ( ! isSnapshotLocSet()) + if (force_picker || !isSnapshotLocSet()) { std::string proposed_name( sSnapshotBaseName ); @@ -4083,6 +4090,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image) } while( -1 != err ); // search until the file is not found (i.e., stat() gives an error). + llinfos << "Saving snapshot to " << filepath << llendl; return image->save(filepath); } |