Cleanup code a bit in snapshot floater and make stuff look nicer there too.
This commit is contained in:
@@ -91,9 +91,9 @@
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
///----------------------------------------------------------------------------
|
||||
S32 LLFloaterSnapshot::sUIWinHeightLong = 625 ;
|
||||
S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 266 ;
|
||||
S32 LLFloaterSnapshot::sUIWinWidth = 219 ;
|
||||
S32 LLFloaterSnapshot::sUIWinHeightLong = 566;
|
||||
S32 LLFloaterSnapshot::sUIWinHeightShort = LLFloaterSnapshot::sUIWinHeightLong - 266;
|
||||
S32 LLFloaterSnapshot::sUIWinWidth = 219;
|
||||
S32 const THUMBHEIGHT = 159;
|
||||
|
||||
LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
|
||||
@@ -1608,18 +1608,7 @@ LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(void)
|
||||
// static
|
||||
LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFloaterSnapshot* floater)
|
||||
{
|
||||
LLSnapshotLivePreview::ESnapshotType index = LLSnapshotLivePreview::SNAPSHOT_FEED;
|
||||
LLSD value = floater->childGetValue("snapshot_type_radio");
|
||||
const std::string id = value.asString();
|
||||
if (id == "feed")
|
||||
index = LLSnapshotLivePreview::SNAPSHOT_FEED;
|
||||
else if (id == "postcard")
|
||||
index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD;
|
||||
else if (id == "texture")
|
||||
index = LLSnapshotLivePreview::SNAPSHOT_TEXTURE;
|
||||
else if (id == "local")
|
||||
index = LLSnapshotLivePreview::SNAPSHOT_LOCAL;
|
||||
return index;
|
||||
return (LLSnapshotLivePreview::ESnapshotType)floater->childGetValue("snapshot_type_radio").asInteger();
|
||||
}
|
||||
|
||||
|
||||
@@ -1772,33 +1761,10 @@ void LLFloaterSnapshot::Impl::freezeTime(bool on)
|
||||
void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater, bool delayed_formatted)
|
||||
{
|
||||
DoutEntering(dc::snapshot, "LLFloaterSnapshot::Impl::updateControls()");
|
||||
std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee();
|
||||
if (gSavedSettings.getBOOL("TemporaryUpload"))
|
||||
{
|
||||
fee = fee.substr(0, fee.find_first_of("0123456789")) + "0";
|
||||
}
|
||||
floater->childSetLabelArg("upload_btn", "[UPLOADFEE]", fee);
|
||||
const HippoGridInfo& grid(*gHippoGridManager->getConnectedGrid());
|
||||
floater->childSetLabelArg("upload_btn", "[UPLOADFEE]", gSavedSettings.getBOOL("TemporaryUpload") ? (grid.getCurrencySymbol() + '0') : grid.getUploadFee());
|
||||
|
||||
LLSnapshotLivePreview::ESnapshotType shot_type = (LLSnapshotLivePreview::ESnapshotType)gSavedSettings.getS32("LastSnapshotType");
|
||||
LLRadioGroup* snapshot_type_radio = floater->getChild<LLRadioGroup>("snapshot_type_radio");
|
||||
if (snapshot_type_radio)
|
||||
{
|
||||
snapshot_type_radio->setSelectedIndex(shot_type);
|
||||
|
||||
const child_list_t *childs = snapshot_type_radio->getChildList();
|
||||
if (childs)
|
||||
{
|
||||
child_list_t::const_iterator it, end=childs->end();
|
||||
for (it=childs->begin(); it!=end; ++it)
|
||||
{
|
||||
LLView* ctrl = *it;
|
||||
if (ctrl && (ctrl->getName() == "texture"))
|
||||
{
|
||||
ctrl->setLabelArg("[UPLOADFEE]", fee);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat");
|
||||
|
||||
floater->childSetVisible("feed_size_combo", FALSE);
|
||||
@@ -2928,7 +2894,14 @@ LLFloaterSnapshot::~LLFloaterSnapshot()
|
||||
|
||||
BOOL LLFloaterSnapshot::postBuild()
|
||||
{
|
||||
childSetCommitCallback("snapshot_type_radio", Impl::onCommitSnapshotType, this);
|
||||
// Don't let statics override the xml.
|
||||
sUIWinHeightLong = getRect().getHeight();
|
||||
sUIWinHeightShort = sUIWinHeightLong - 266;
|
||||
if (LLUICtrl* snapshot_type_radio = getChild<LLUICtrl>("snapshot_type_radio"))
|
||||
{
|
||||
snapshot_type_radio->setCommitCallback(Impl::onCommitSnapshotType, this);
|
||||
snapshot_type_radio->setValue(gSavedSettings.getS32("LastSnapshotType"));
|
||||
}
|
||||
childSetCommitCallback("local_format_combo", Impl::onCommitSnapshotFormat, this);
|
||||
|
||||
childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this);
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<floater name="Snapshot" title="Foto-Anzeige">
|
||||
<text name="file_size_label">Dateigröße: [SIZE] KB</text>
|
||||
<text name="type_label">Ziel</text>
|
||||
<radio_group label="Fototyp" name="snapshot_type_radio">
|
||||
<radio_item name="feed">Sende an Profil-Feed</radio_item>
|
||||
<radio_item name="postcard">Per E-Mail senden</radio_item>
|
||||
<radio_item name="texture">Speichere in Inventar ([UPLOADFEE])</radio_item>
|
||||
<radio_item name="local">Auf Festplatte speichern</radio_item>
|
||||
</radio_group>
|
||||
<combo_box name="snapshot_type_radio">
|
||||
<combo_item name="feed">Sende an Profil-Feed</combo_item>
|
||||
<combo_item name="postcard">Per E-Mail senden</combo_item>
|
||||
<combo_item name="texture">Speichere in Inventar</combo_item>
|
||||
<combo_item name="local">Auf Festplatte speichern</combo_item>
|
||||
</combo_box>
|
||||
<button label="Aktualisieren" name="new_snapshot_btn"/>
|
||||
<button label="Einfrieren" name="freeze_time_btn" tool_tip="Zeige Vollansicht. Erlaubt Kammeraführung als stünde die Zeit still, um mehrere Fotos der gleichen Szene zu machen. ESC beendet den Zustand!"/>
|
||||
<button label="Hochladen" name="feed_btn"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater bottom="-300" can_close="true" can_drag_on_left="false" can_minimize="false"
|
||||
can_resize="false" follows="left|top" height="629" name="Snapshot"
|
||||
can_resize="false" follows="left|top" height="566" name="Snapshot"
|
||||
rect_control="FloaterSnapshotRect" title="Snapshot Preview" width="219">
|
||||
<text bottom="-210" right="-10" follows="left|top" height="25" name="file_size_label" halign="right" width="150">
|
||||
File size: [SIZE] KB
|
||||
@@ -8,22 +8,21 @@
|
||||
<text bottom_delta="10" follows="top|left" height="15" left="10" name="type_label">
|
||||
Target
|
||||
</text>
|
||||
<radio_group bottom_delta="-82" follows="left|top" height="79" label="Snapshot type"
|
||||
left="10" name="snapshot_type_radio" width="200">
|
||||
<radio_item bottom="-19" height="16" name="feed">
|
||||
<combo_box bottom_delta="-23" follows="left|top" height="20" left="10" name="snapshot_type_radio" width="200">
|
||||
<combo_item name="feed" value="0">
|
||||
Post to profile feed
|
||||
</radio_item>
|
||||
<radio_item bottom="-38" height="16" name="postcard">
|
||||
</combo_item>
|
||||
<combo_item name="postcard" value="1">
|
||||
Send via email
|
||||
</radio_item>
|
||||
<radio_item bottom="-57" height="16" name="texture">
|
||||
Save to inventory ([UPLOADFEE])
|
||||
</radio_item>
|
||||
<radio_item bottom="-76" height="16" name="local">
|
||||
</combo_item>
|
||||
<combo_item name="texture" value="2">
|
||||
Save to inventory
|
||||
</combo_item>
|
||||
<combo_item name="local" value="3">
|
||||
Save to hard drive
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
<button bottom="-309" follows="left|top" height="20" label="Refresh" left="10"
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<button bottom="-250" follows="left|top" height="20" label="Refresh" left="10"
|
||||
name="new_snapshot_btn" width="105"/>
|
||||
<button bottom_delta="0" follows="left|top" height="20" label="Freeze" left="120"
|
||||
name="freeze_time_btn" width="90" tool_tip="Show a fullscreen preview. Allows camming around as if time is frozen to make multiple snapshots of the same scene. Press ESC to undo!" />
|
||||
@@ -39,7 +38,7 @@
|
||||
<flyout_button_item value="saveas" name="saveas_item">Save As...</flyout_button_item>
|
||||
</flyout_button>
|
||||
<button bottom_delta="0" follows="left|top" height="20" label="Cancel" left="120" name="discard_btn" width="90"/>
|
||||
<button bottom="-353" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
<button bottom="-294" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="20" label="More >>" left="10"
|
||||
mouse_opaque="true" name="more_btn" scale_image="TRUE"
|
||||
tool_tip="Advanced Options" width="80" />
|
||||
|
||||
@@ -6,20 +6,20 @@
|
||||
<text name="type_label">
|
||||
Destino
|
||||
</text>
|
||||
<radio_group label="Tipo de foto" name="snapshot_type_radio">
|
||||
<radio_item name="feed">
|
||||
<combo_box name="snapshot_type_radio">
|
||||
<combo_item name="feed">
|
||||
Publicar en my.secondlife.com
|
||||
</radio_item>
|
||||
<radio_item name="postcard">
|
||||
</combo_item>
|
||||
<combo_item name="postcard">
|
||||
Enviar por Email
|
||||
</radio_item>
|
||||
<radio_item name="texture">
|
||||
Guardarla en tu inventario ([UPLOADFEE])
|
||||
</radio_item>
|
||||
<radio_item name="local">
|
||||
</combo_item>
|
||||
<combo_item name="texture">
|
||||
Guardarla en tu inventario
|
||||
</combo_item>
|
||||
<combo_item name="local">
|
||||
Guardarla en disco duro
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<button label="Actualizar foto" name="new_snapshot_btn"/>
|
||||
<button label="Congelar" name="freeze_time_btn" tool_tip="Congelar la imagen y mostrar la vista previa en pantalla completa. Permite mover la cámara por la escena congelada y tomar múltiples fotos de la misma. ¡Presiona ESC para deshacer!" />
|
||||
<button label="Publicar" name="feed_btn"/>
|
||||
@@ -160,4 +160,4 @@
|
||||
Aspecto Resolución y Destino
|
||||
</string>
|
||||
</floater>
|
||||
|
||||
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
<text name="type_label">
|
||||
Destination de la photo
|
||||
</text>
|
||||
<radio_group label="Type de photo" name="snapshot_type_radio" width="228">
|
||||
<radio_item name="feed">
|
||||
<combo_box name="snapshot_type_radio" width="228">
|
||||
<combo_item name="feed">
|
||||
Poster sur my.secondlife.com
|
||||
</radio_item>
|
||||
<radio_item name="postcard">
|
||||
</combo_item>
|
||||
<combo_item name="postcard">
|
||||
Envoyez par e-mail
|
||||
</radio_item>
|
||||
<radio_item name="texture">
|
||||
Enregistrez dans votre inventaire ([UPLOADFEE])
|
||||
</radio_item>
|
||||
<radio_item name="local">
|
||||
</combo_item>
|
||||
<combo_item name="texture">
|
||||
Enregistrez dans votre inventaire
|
||||
</combo_item>
|
||||
<combo_item name="local">
|
||||
Enregistrez sur votre disque dur
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<button label="Plus >>" name="more_btn" tool_tip="Options avancées"/>
|
||||
<button label="<< Moins" name="less_btn" tool_tip="Options avancées"/>
|
||||
<text name="type_label2">
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
<text name="type_label">
|
||||
Destinazione della fotografia
|
||||
</text>
|
||||
<radio_group label="Tipo di fotografia" name="snapshot_type_radio" width="228">
|
||||
<radio_item name="postcard">
|
||||
<combo_box name="snapshot_type_radio" width="228">
|
||||
<combo_item name="postcard">
|
||||
Invia via email
|
||||
</radio_item>
|
||||
<radio_item name="texture">
|
||||
Salva nel tuo inventario ([UPLOADFEE])
|
||||
</radio_item>
|
||||
<radio_item name="local">
|
||||
</combo_item>
|
||||
<combo_item name="texture">
|
||||
Salva nel tuo inventario
|
||||
</combo_item>
|
||||
<combo_item name="local">
|
||||
Salva sul tuo disco rigido
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<text name="file_size_label">
|
||||
Grandezza del file: [SIZE] KB
|
||||
</text>
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
<text name="type_label">
|
||||
Destino da foto
|
||||
</text>
|
||||
<radio_group label="Tipo de Foto" name="snapshot_type_radio">
|
||||
<radio_item name="postcard">
|
||||
<combo_box name="snapshot_type_radio">
|
||||
<combo_item name="postcard">
|
||||
Enviar por email
|
||||
</radio_item>
|
||||
<radio_item name="texture">
|
||||
Salvar no seu inventário ([UPLOADFEE])
|
||||
</radio_item>
|
||||
<radio_item name="local">
|
||||
</combo_item>
|
||||
<combo_item name="texture">
|
||||
Salvar no seu inventário
|
||||
</combo_item>
|
||||
<combo_item name="local">
|
||||
Salvar no seu disco rígido
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<text name="file_size_label">
|
||||
Tamanho do arquivo: [SIZE] KB
|
||||
</text>
|
||||
|
||||
Reference in New Issue
Block a user