Merge viewer-neko

master
Ansariel 2018-06-01 20:27:39 +02:00
commit 5d3ba25bf2
15 changed files with 84 additions and 168 deletions

View File

@ -2743,6 +2743,14 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
}
}
break;
default:
{
if (gDebugWindowProc)
{
LL_INFOS("Window") << "Unhandled windows message code: " << U32(u_msg) << LL_ENDL;
}
}
break;
}
window_imp->mCallbacks->handlePauseWatchdog(window_imp);

View File

@ -206,6 +206,4 @@ public:
~LLFilePicker();
};
const std::string upload_pick(void* data);
#endif

View File

@ -1631,18 +1631,22 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
//static
void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel, BOOL take_keyboard_focus, BOOL reset_filter)
{
LLInventoryPanel *active_panel;
// <FS:Ansariel> Use correct inventory floater
//LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
//sidepanel_inventory->showInventoryPanel();
// </FS:Ansariel>
bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX)));
bool show_inbox = gSavedSettings.getBOOL("FSShowInboxFolder"); // <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
// <FS:Ansariel> FIRE-22167: Make "Show in Main View" work properly
//if (main_panel && !in_inbox)
//{
// LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory")->selectAllItemsPanel();
// sidepanel_inventory->selectAllItemsPanel();
//}
// </FS:Ansariel>
active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
if (active_panel)
{
@ -1658,7 +1662,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
if (in_inbox && !show_inbox)
// </FS:Ansariel>
{
LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); // <FS:Ansariel> Use correct inventory floater
LLInventoryPanel * inventory_panel = NULL;
sidepanel_inventory->openInbox();
inventory_panel = sidepanel_inventory->getInboxPanel();

View File

@ -49,6 +49,7 @@
#include "llui.h"
#include "llviewercontrol.h" // <FS:PP> For user-defined default save format for textures
#include "llviewerinventory.h"
#include "llviewermenufile.h" // LLFilePickerReplyThread
#include "llviewertexture.h"
#include "llviewertexturelist.h"
#include "lluictrlfactory.h"
@ -398,12 +399,9 @@ void LLPreviewTexture::saveAs()
void LLPreviewTexture::saveAs(EFileformatType format)
{
if( mLoadingFullImage )
if (mLoadingFullImage)
return;
LLFilePicker& file_picker = LLFilePicker::instance();
const LLInventoryItem* item = getItem() ;
loaded_callback_func callback;
LLFilePicker::ESaveFilter saveFilter;
@ -420,15 +418,21 @@ void LLPreviewTexture::saveAs(EFileformatType format)
break;
}
// <FS:Ansariel> FIRE-14111: File extension missing on Linux when saving a texture
//if( !file_picker.getSaveFile( saveFilter, item ? LLDir::getScrubbedFileName(item->getName()) : LLStringUtil::null) )
if( !file_picker.getSaveFile( saveFilter, item ? checkFileExtension(LLDir::getScrubbedFileName(item->getName()), format) : LLStringUtil::null) )
// <FS:Ansariel> Undo MAINT-2897 and use our own texture format selection
//std::string filename = getItem() ? LLDir::getScrubbedFileName(getItem()->getName()) : LLStringUtil::null;
//(new LLFilePickerReplyThread(boost::bind(&LLPreviewTexture::saveTextureToFile, this, _1), LLFilePicker::FFSAVE_TGAPNG, filename))->getFile();
std::string filename = getItem() ? checkFileExtension(LLDir::getScrubbedFileName(getItem()->getName()), format) : LLStringUtil::null;
(new LLFilePickerReplyThread(boost::bind(&LLPreviewTexture::saveTextureToFile, this, _1, format, callback), saveFilter, filename))->getFile();
// </FS:Ansariel>
{
// User canceled or we failed to acquire save file.
return;
}
if(mPreviewToSave)
}
// <FS:Ansariel> Undo MAINT-2897 and use our own texture format selection
//void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenames)
void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback)
// </FS:Ansariel>
{
const LLInventoryItem* item = getItem();
if (item && mPreviewToSave)
{
mPreviewToSave = FALSE;
LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", item->getUUID());
@ -436,15 +440,18 @@ void LLPreviewTexture::saveAs(EFileformatType format)
// remember the user-approved/edited file name.
// <FS:Ansariel> FIRE-14111: File extension missing on Linux when saving a texture
//mSaveFileName = file_picker.getFirstFile();
mSaveFileName = checkFileExtension(file_picker.getFirstFile(), format);
//mSaveFileName = filenames[0];
mSaveFileName = checkFileExtension(filenames[0], format);
// </FS:Ansariel>
mLoadingFullImage = TRUE;
getWindow()->incBusyCount();
mImage->forceToSaveRawImage(0) ;//re-fetch the raw image if the old one is removed.
mImage->setLoadedCallback( callback,
0, TRUE, FALSE, new LLUUID( mItemUUID ), &mCallbackTextureList );
mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed.
// <FS:Ansariel> Undo MAINT-2897 and use our own texture format selection
//mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave,
mImage->setLoadedCallback(callback,
// </FS:Ansariel>
0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList);
}
// virtual

View File

@ -80,6 +80,11 @@ public:
BOOL final,
void* userdata );
void openToSave();
// <FS:Ansariel> Undo MAINT-2897 and use our own texture format selection
//void saveTextureToFile(const std::vector<std::string>& filenames);
void saveTextureToFile(const std::vector<std::string>& filenames, EFileformatType format, loaded_callback_func callback);
// </FS:Ansariel>
static void onSaveAsBtn(LLUICtrl* ctrl, void* data);

View File

@ -55,6 +55,9 @@
#include "llviewernetwork.h"
#include "llviewercontrol.h"
#include "llfloatersidepanelcontainer.h"
#include "llsidepanelinventory.h"
void dialog_refresh_all();
static const U32 LL_ASSET_UPLOAD_TIMEOUT_SEC = 60;
@ -802,14 +805,20 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);
if (panel)
// <FS:Ansariel> Use correct inventory floater for showing the upload
if (!panel)
{
panel->setSelection(serverInventoryItem, TAKE_FOCUS_NO);
}
else
{
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, TRUE, TAKE_FOCUS_NO, TRUE);
// Having no active panel here could either mean the primary inventory floater
// is the most-active inventory, but showing the object properties panel, or
// no inventory floater is open. In that case we make sure to show the inventory
// panel on the primary inventory floater. We don't have to deal with selecting
// the correct floater because only the primary inventory floater can show
// object properties.
LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
sidepanel_inventory->showInventoryPanel();
}
// </FS:Ansariel>
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, TRUE, TAKE_FOCUS_NO, (panel == NULL));
// restore keyboard focus
gFocusMgr.setKeyboardFocus(focus);

View File

@ -440,125 +440,6 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::
}
}
#if 0
/**
char* upload_pick(void* data)
If applicable, brings up a file chooser in which the user selects a file
to upload for a particular task. If the file is valid for the given action,
returns the string to the full path filename, else returns NULL.
Data is the load filter for the type of file as defined in LLFilePicker.
**/
const std::string upload_pick(void* data)
{
if( gAgentCamera.cameraMouselook() )
{
gAgentCamera.changeCameraToDefault();
// This doesn't seem necessary. JC
// display();
}
LLFilePicker::ELoadFilter type;
if(data)
{
type = (LLFilePicker::ELoadFilter)((intptr_t)data);
}
else
{
type = LLFilePicker::FFLOAD_ALL;
}
LLFilePicker& picker = LLFilePicker::instance();
if (!picker.getOpenFile(type))
{
LL_INFOS() << "Couldn't import objects from file" << LL_ENDL;
return std::string();
}
const std::string& filename = picker.getFirstFile();
std::string ext = gDirUtilp->getExtension(filename);
//strincmp doesn't like NULL pointers
if (ext.empty())
{
std::string short_name = gDirUtilp->getBaseFileName(filename);
// No extension
LLSD args;
args["FILE"] = short_name;
LLNotificationsUtil::add("NoFileExtension", args);
return std::string();
}
else
{
//so there is an extension
//loop over the valid extensions and compare to see
//if the extension is valid
//now grab the set of valid file extensions
std::string valid_extensions = build_extensions_string(type);
BOOL ext_valid = FALSE;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
tokenizer tokens(valid_extensions, sep);
tokenizer::iterator token_iter;
//now loop over all valid file extensions
//and compare them to the extension of the file
//to be uploaded
for( token_iter = tokens.begin();
token_iter != tokens.end() && ext_valid != TRUE;
++token_iter)
{
const std::string& cur_token = *token_iter;
if (cur_token == ext || cur_token == "*.*")
{
//valid extension
//or the acceptable extension is any
ext_valid = TRUE;
}
}//end for (loop over all tokens)
if (ext_valid == FALSE)
{
//should only get here if the extension exists
//but is invalid
LLSD args;
args["EXTENSION"] = ext;
args["VALIDS"] = valid_extensions;
LLNotificationsUtil::add("InvalidFileExtension", args);
return std::string();
}
}//end else (non-null extension)
//valid file extension
//now we check to see
//if the file is actually a valid image/sound/etc.
if (type == LLFilePicker::FFLOAD_WAV)
{
// pre-qualify wavs to make sure the format is acceptable
std::string error_msg;
if (check_for_invalid_wav_formats(filename,error_msg))
{
LL_INFOS() << error_msg << ": " << filename << LL_ENDL;
LLSD args;
args["FILE"] = filename;
LLNotificationsUtil::add( error_msg, args );
return std::string();
}
}//end if a wave/sound file
return filename;
}
#endif
class LLFileUploadImage : public view_listener_t
{
bool handleEvent(const LLSD& userdata)

View File

@ -2418,6 +2418,15 @@ void LLViewerWindow::shutdownViews()
RecordToChatConsole::getInstance()->stopRecorder();
LL_INFOS() << "Warning logger is cleaned." << LL_ENDL ;
gFocusMgr.unlockFocus();
gFocusMgr.setMouseCapture(NULL);
gFocusMgr.setKeyboardFocus(NULL);
gFocusMgr.setTopCtrl(NULL);
if (mWindow)
{
mWindow->allowLanguageTextInput(NULL, FALSE);
}
delete mDebugText;
mDebugText = NULL;
@ -2450,7 +2459,11 @@ void LLViewerWindow::shutdownViews()
view_listener_t::cleanup();
LL_INFOS() << "view listeners destroyed." << LL_ENDL ;
// Clean up pointers that are going to be invalid. (todo: check sMenuContainer)
mProgressView = NULL;
mPopupView = NULL;
// Delete all child views.
delete mRootView;
mRootView = NULL;

View File

@ -3,7 +3,7 @@
<menu_item_call label="Nicht mehr blockieren" name="unblock"/>
<menu_item_check label="Voice blockieren" name="BlockVoice"/>
<menu_item_check label="Chat blockieren" name="MuteText"/>
<menu_item_check label="Partikel blockieren" name="BlockObjectParticles"/>
<menu_item_check label="Partikel blockieren" name="MuteParticles"/>
<menu_item_check label="Klänge blockieren" name="BlockObjectSounds"/>
<menu_item_call label="Profil..." name="profile"/>
</toggleable_menu>

View File

@ -253,7 +253,7 @@
follows="left|top"
height="16"
layout="topleft"
name="ShadersText"
name="HardwareText"
top_delta="20"
left="10"
width="128">
@ -426,7 +426,7 @@
follows="left|top"
height="16"
layout="topleft"
name="AvatarText"
name="MeshText"
top_delta="20"
left="400"
top="21"
@ -917,7 +917,7 @@ are saved in a preset file. -->
label="RenderAvatarMaxComplexity"
layout="topleft"
left="0"
name="RenderAvatarMaxNonImpostors"
name="RenderAvatarMaxComplexity"
top_delta="0"
width="0">
</check_box>

View File

@ -53,7 +53,7 @@
<menu_item_check
label="Block Particles"
layout="topleft"
name="BlockObjectParticles">
name="MuteParticles">
<on_check
function="Block.Check"
parameter="block_particles" />

View File

@ -11112,13 +11112,13 @@ Cannot save to object contents: This would modify the attachment permissions.
Your attachments contain too much inventory to add more.
</notification>
<!--<notification
<notification
icon="alertmodal.tga"
name="IllegalAttachment"
type="notify">
<tag>fail</tag>
The attachment has requested a nonexistent point on the avatar. It has been attached to the chest instead.
</notification>-->
</notification>
<notification
icon="alertmodal.tga"
@ -11609,14 +11609,6 @@ Not enough script resources available to attach object!
Cannot attach object because it is already being removed.
</notification>
<notification
icon="alertmodal.tga"
name="IllegalAttachment"
type="notify">
<tag>fail</tag>
The attachment has requested a nonexistent point on the avatar. It has been attached to the chest instead.
</notification>
<notification
icon="alertmodal.tga"
name="CantDropItemTrialUser"

View File

@ -104,7 +104,7 @@
height="12"
layout="topleft"
left="37"
name="title_animation"
name="title_model"
top_pad="7"
width="100">
Models

View File

@ -2821,8 +2821,7 @@ Try enclosing path to the editor with double quotes.
<string name="ExperiencePermissionShort10">Control Camera</string>
<string name="ExperiencePermissionShort11">Teleport</string>
<string name="ExperiencePermissionShort12">Permission</string>
<string name="ExperiencePermissionShortUnknown">Unknown: [Permission]</string>
<!-- Conversation log messages -->
<string name="logging_calls_disabled_log_empty">
Conversations are not being logged. To begin keeping a log, choose "Save: Log only" or "Save: Log and transcripts" under Preferences > Privacy.

View File

@ -3,7 +3,7 @@
<menu_item_call label="Odblokuj" name="unblock" />
<menu_item_check label="Wycisz głos" name="BlockVoice" />
<menu_item_check label="Wycisz czat" name="MuteText" />
<menu_item_check label="Blokuj cząsteczki" name="BlockObjectParticles" />
<menu_item_check label="Blokuj cząsteczki" name="MuteParticles" />
<menu_item_check label="Blokuj dźwięki obiektu" name="BlockObjectSounds" />
<menu_item_call label="Profil..." name="profile" />
</toggleable_menu>