Skip to content

Instantly share code, notes, and snippets.

Created May 27, 2013 06:27
Show Gist options
  • Save anonymous/5655465 to your computer and use it in GitHub Desktop.
Save anonymous/5655465 to your computer and use it in GitHub Desktop.
with cached control: git diff for moving the chat console up watch out, this also lists the hack to avoid the compilation error about unused values
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 98336d3..a0a0198 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16636,6 +16636,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<string>Random</string>
</map>
+ <key>ChatConsoleBottomOffset</key>
+ <map>
+ <key>Comment</key>
+ <string>User definable offset between the bottom of the chat console and the bottom of the window; increase to move text in the console up</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp
index 91e485d..6d94151 100644
--- a/indra/newview/llviewerstatsrecorder.cpp
+++ b/indra/newview/llviewerstatsrecorder.cpp
@@ -169,6 +169,8 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime;
S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures;
+ size_t none;
+
if ( delta_time < interval || total_objects == 0) return;
mLastSnapshotTime = LLTimer::getTotalSeconds();
@@ -216,7 +218,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
<< "Texture Fetch bps\t"
<< "\n";
- fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
+ none = fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
}
else
{
@@ -249,7 +251,7 @@ void LLViewerStatsRecorder::writeToLog( F32 interval )
<< "\t" << (mTextureFetchSize * 8 / delta_time)
<< "\n";
- fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
+ none = fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile );
clearStats();
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ff4d8ce..9303c32 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -5380,12 +5380,14 @@ void LLViewerWindow::calcDisplayScale()
S32 LLViewerWindow::getChatConsoleBottomPad()
{
- S32 offset = 0;
-
- if(gToolBar && gToolBar->getVisible())
- offset += TOOL_BAR_HEIGHT;
-
- return offset;
+ // figure in a user definable offset for the chat console
+ // (allows users to bring the chat console above the communications window)
+ //
+ // when the toolbar is visible, add the height of the toolbar to the offset
+ // and return that; otherwise just return the user defined offset
+
+ static const LLCachedControl<S32> offset("ChatConsoleBottomOffset");
+ return ( (gToolBar && gToolBar->getVisible() ) ? (offset + TOOL_BAR_HEIGHT) : offset);
}
LLRect LLViewerWindow::getChatConsoleRect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment