svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@56429 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance@56431

This turned up the following "lost" changes:

	llapp.cpp (from maintenance r55371) - SIGPIPE fix, possibly
	llfontgl.cpp (from maintenance r50207) - whitespace only
	inventorybridge.cpp (property - non-executable)
	skins/xui/*/* (from maintenance r55380) - XML processing instruction went AWOL
master
Josh Bell 2007-01-04 02:04:29 +00:00
parent 0434d35c16
commit d60f16540d
48 changed files with 245 additions and 442 deletions

View File

@ -27,17 +27,6 @@
#include <string>
#include "llfile.h"
#if LL_WINDOWS
// Limit Windows API to small and manageable set.
// If you get undefined symbols, find the appropriate
// Windows header file and include that in your .cpp file.
// Please don't take this out -- it helps with library
// compile times. JC
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#endif // LL_WINDOWS
#include "stdtypes.h"
#include "lldefs.h"
#include "llerror.h"
@ -50,4 +39,4 @@
#pragma warning (3 : 4702) // we like level 3, not 4
#endif // LL_WINDOWS
#endif // not LL_LINDEN_COMMON_H
#endif

View File

@ -499,6 +499,7 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
switch (signum)
{
case SIGALRM:
case SIGPIPE:
case SIGUSR2:
// We don't care about these signals, ignore them
if (LLApp::sLogInSignal)
@ -548,7 +549,6 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
// Change the signal that we reraise to SIGABRT, so we generate a core dump.
signum = SIGABRT;
case SIGPIPE:
case SIGBUS:
case SIGSEGV:
case SIGQUIT:

View File

@ -26,15 +26,12 @@
#if LL_DARWIN
#define LL_QUICKTIME_ENABLED 1
#define LL_MOZILLA_ENABLED 0
#define LL_LIBXUL_ENABLED 1
#elif LL_WINDOWS
#define LL_QUICKTIME_ENABLED 1
#define LL_MOZILLA_ENABLED 0
#define LL_LIBXUL_ENABLED 1
#elif LL_LINUX
#define LL_QUICKTIME_ENABLED 0
#define LL_MOZILLA_ENABLED 0
#define LL_LIBXUL_ENABLED 0
#endif

View File

@ -26,10 +26,17 @@
#include "linden_common.h"
#include "processor.h"
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include "processor.h"
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# include <windows.h>
#endif
#if !LL_DARWIN

View File

@ -11,15 +11,14 @@
///////////////////////////////////////////
#ifndef PROCESSOR_H
#define PROCESSOR_H
#ifndef LLPROCESSOR_H
#define LLPROCESSOR_H
// Options:
///////////
#if LL_WINDOWS
#define PROCESSOR_FREQUENCY_MEASURE_AVAILABLE
#endif
// Includes <windows.h> --> code gets os-dependend (Win32)
typedef struct ProcessorExtensions

View File

@ -8,15 +8,20 @@
* $License$
*/
#if LL_LINUX
#include <netinet/in.h>
#endif
#if LL_DARWIN
#include <arpa/inet.h>
#include "linden_common.h"
#include "llsdutil.h"
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h> // for htonl
#elif LL_LINUX
# include <netinet/in.h>
#elif LL_DARWIN
# include <arpa/inet.h>
#endif
#include "linden_common.h"
#include "llsdutil.h"
// vector3
LLSD ll_sd_from_vector3(const LLVector3& vec)

View File

@ -8,15 +8,21 @@
#include "linden_common.h"
#include "llsys.h"
#include <iostream>
#include <zlib/zlib.h>
#include "processor.h"
#if LL_DARWIN
#include <sys/sysctl.h>
#include <sys/utsname.h>
#if LL_WINDOWS
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# include <windows.h>
#elif LL_DARWIN
# include <sys/sysctl.h>
# include <sys/utsname.h>
#elif LL_LINUX
#include <sys/utsname.h>
# include <sys/utsname.h>
const char MEMINFO_FILE[] = "/proc/meminfo";
const char CPUINFO_FILE[] = "/proc/cpuinfo";
#endif

View File

@ -8,15 +8,19 @@
#include "linden_common.h"
#include "lltimer.h"
#include "u64.h"
#if LL_WINDOWS
#include <time.h>
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# include <windows.h>
# include <time.h>
#elif LL_LINUX
#include <time.h>
#include <sys/time.h>
#include <sched.h>
# include <time.h>
# include <sys/time.h>
# include <sched.h>
#elif LL_DARWIN
# include <time.h>
# include <sys/time.h>
@ -25,9 +29,6 @@
#endif
#include "lltimer.h"
#include "u64.h"
//
// Locally used constants
//

View File

@ -8,19 +8,21 @@
#include "linden_common.h"
#if !LL_WINDOWS
#include <netdb.h>
#include <netinet/in.h> // ntonl()
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#endif
#include "llhost.h"
#include "llerror.h"
#if LL_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#else
#include <netdb.h>
#include <netinet/in.h> // ntonl()
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#endif
LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS);
LLHost::LLHost(const std::string& ip_and_port)

View File

@ -8,6 +8,13 @@
#include "linden_common.h"
// APR on Windows needs full windows headers
#ifdef LL_WINDOWS
# undef WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# include <windows.h>
#endif
#include <string>
#include <sstream>
#include <boost/regex.hpp>

View File

@ -9,7 +9,7 @@
#ifndef LL_LLMAIL_H
#define LL_LLMAIL_H
#include "apr-1/apr_pools.h"
typedef struct apr_pool_t apr_pool_t;
// if hostname is NULL, then the host is resolved as 'mail'
void init_mail(const std::string& hostname, apr_pool_t* pool);

View File

@ -14,13 +14,17 @@
#include <stdexcept>
#include <stdio.h>
#if !LL_WINDOWS // Windows Versions
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <errno.h>
#if LL_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <errno.h>
#endif
// linden library includes

View File

@ -113,7 +113,7 @@ void LLFontGL::init()
mImageGLp = new LLImageGL(FALSE);
//RN: use nearest mipmap filtering to obviate the need to do pixel-accurate positioning
mImageGLp->bind();
mImageGLp->setMipFilterNearest(TRUE,TRUE);
mImageGLp->setMipFilterNearest(TRUE, TRUE);
}
if (mRawImageGLp.isNull())
{

View File

@ -11,9 +11,10 @@
#include "linden_common.h"
#include "llglheaders.h"
#include "llgldbg.h"
#include "llgl.h"
#include "llglheaders.h"
//------------------------------------------------------------------------

View File

@ -747,7 +747,7 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_
if (LLUI::sShowXUINames)
{
tool_tip = mName;
tool_tip = getShowNamesToolTip();
}
else
{

View File

@ -1048,7 +1048,7 @@ BOOL LLTabContainer::selectTab(S32 which)
// tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here.
tuple->mButton->setToggleState( is_selected );
// RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs
tuple->mButton->setTabStop( is_selected && mTabList.size() > 1 );
tuple->mButton->setTabStop( is_selected );
if( is_selected && mMaxScrollPos > 0)
{
@ -1466,4 +1466,3 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag
return LLView::handleDragAndDrop(x, y, mask, drop, type, cargo_data, accept, tooltip);
}

View File

@ -385,6 +385,7 @@ LLMenuGL *LLUICtrlFactory::buildMenu(const LLString &filename, LLView* parentp)
{
// TomY TODO: Break this function into buildMenu and buildMenuBar
LLXMLNodePtr root;
LLMenuGL* menu;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root))
{
@ -398,12 +399,23 @@ LLMenuGL *LLUICtrlFactory::buildMenu(const LLString &filename, LLView* parentp)
return NULL;
}
if (root->hasName("menu"))
{
return (LLMenuGL*)LLMenuGL::fromXML(root, parentp, this);
menu = (LLMenuGL*)LLMenuGL::fromXML(root, parentp, this);
}
else
{
menu = (LLMenuGL*)LLMenuBarGL::fromXML(root, parentp, this);
}
if (LLUI::sShowXUINames)
{
menu->mToolTipMsg = filename;
}
return (LLMenuGL*)LLMenuBarGL::fromXML(root, parentp, this);
return menu;
}
//-----------------------------------------------------------------------------
@ -432,6 +444,12 @@ LLPieMenu *LLUICtrlFactory::buildPieMenu(const LLString &filename, LLView* paren
LLPieMenu *menu = new LLPieMenu(name);
parentp->addChild(menu);
menu->initXML(root, parentp, this);
if (LLUI::sShowXUINames)
{
menu->mToolTipMsg = filename;
}
return menu;
}

View File

@ -811,6 +811,35 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
LLString LLView::getShowNamesToolTip()
{
LLView* view = getParent();
LLString name;
LLString tool_tip = mName;
while (view)
{
name = view->getName();
if (name == "root") break;
if (view->getToolTip().find(".xml") != LLString::npos)
{
tool_tip = view->getToolTip() + "/" + tool_tip;
break;
}
else
{
tool_tip = view->getName() + "/" + tool_tip;
}
view = view->getParent();
}
return "/" + tool_tip;
}
BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen)
{
BOOL handled = FALSE;
@ -834,7 +863,7 @@ BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_scre
if (LLUI::sShowXUINames && (mToolTipMsg.find(".xml", 0) == LLString::npos) &&
(mName.find("Drag", 0) == LLString::npos))
{
tool_tip = mName;
tool_tip = getShowNamesToolTip();
}
else
{

View File

@ -352,6 +352,8 @@ public:
// then display mToolTipMsg if no child handled it.
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect);
LLString getShowNamesToolTip();
virtual void draw();
void drawDebugRect();

View File

@ -17,18 +17,18 @@ public:
LLDir_Win32();
virtual ~LLDir_Win32();
virtual void initAppDirs(const std::string &app_name);
public:
virtual std::string getCurPath();
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask);
virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
/*virtual*/ void initAppDirs(const std::string &app_name);
/*virtual*/ std::string getCurPath();
/*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask);
/*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
/*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname);
/*virtual*/ BOOL fileExists(const std::string &filename);
private:
BOOL LLDir_Win32::getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname, BOOL wrap);
HANDLE mDirSearch_h;
void* mDirSearch_h;
llutf16string mCurrentDir;
};

View File

@ -9,9 +9,15 @@
#if LL_WINDOWS
#include "linden_common.h"
#include "llkeyboardwin32.h"
#include "llwindow.h"
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
LLKeyboardWin32::LLKeyboardWin32()
{
// Set up key mapping for windows - eventually can read this from a file?

View File

@ -23,6 +23,7 @@
#include "llerror.h"
#include "llkeyboard.h"
#include "linked_lists.h"
//static instance for default callbacks
LLWindowCallbacks LLWindow::sDefaultCallbacks;
@ -305,7 +306,8 @@ void LLSplashScreen::hide()
// LLWindowManager
//
LLLinkedList<LLWindow> LLWindowManager::sWindowList;
// TODO: replace with std::set
static LLLinkedList<LLWindow> sWindowList;
LLWindow* LLWindowManager::createWindow(
char *title,

View File

@ -12,7 +12,6 @@
#include <sys/stat.h>
#include "llrect.h"
#include "linked_lists.h"
#include "llcoord.h"
#include "llstring.h"
@ -272,9 +271,6 @@ const S32 OSBTN_CANCEL = 3;
class LLWindowManager
{
private:
static LLLinkedList<LLWindow> sWindowList;
public:
static LLWindow* createWindow(
char *title,
@ -316,13 +312,4 @@ void shell_open(const char* file_path);
void simpleEscapeString ( std::string& stringIn );
#if LL_WINDOWS
// return Win32 specific window handle
HWND llwindow_get_hwnd(LLWindow *window);
// backdoor for special case handling of Win32 messages
void llwindow_install_wndproc(LLWindow *window, WNDPROC wnd_proc);
#endif
#endif // _LL_window_h_

View File

@ -10,6 +10,8 @@
#if LL_WINDOWS && !LL_MESA_HEADLESS
#include "llwindowwin32.h"
#include <commdlg.h>
#include <WinUser.h>
#include <mapi.h>
@ -20,7 +22,7 @@
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include "llwindowwin32.h"
#include "llkeyboardwin32.h"
#include "llerror.h"
#include "llgl.h"
@ -3023,19 +3025,6 @@ LRESULT CALLBACK LLSplashScreenWin32::windowProc(HWND h_wnd, UINT u_msg,
// Helper Funcs
//
HWND llwindow_get_hwnd(LLWindow *window)
{
//assumes we are dealing with a Win32 window
return ((LLWindowWin32*)window)->mWindowHandle;
}
void llwindow_install_wndproc(LLWindow *window, WNDPROC wnd_proc)
{
//assumes we are dealing with a Win32 window
((LLWindowWin32*)window)->mWndProc = wnd_proc;
}
S32 OSMessageBoxWin32(const char* text, const char* caption, U32 type)
{
UINT uType;

View File

@ -9,6 +9,11 @@
#ifndef LL_LLWINDOWWIN32_H
#define LL_LLWINDOWWIN32_H
// Limit Windows API to small and manageable set.
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#include "llwindow.h"
// Hack for async host by name
@ -152,8 +157,6 @@ protected:
BOOL mMousePositionModified;
BOOL mInputProcessingPaused;
friend HWND llwindow_get_hwnd(LLWindow *window);
friend void llwindow_install_wndproc(LLWindow *window, WNDPROC wnd_proc);
friend class LLWindowManager;
};

View File

@ -56,7 +56,7 @@ BOOL LLDirPicker::getDir(LLString* filename)
memset(&bi, 0, sizeof(bi));
bi.ulFlags = BIF_USENEWUI;
bi.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow());;
bi.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
bi.lpszTitle = NULL;
::OleInitialize(NULL);

View File

@ -20,7 +20,6 @@
#include "lldrawpoolbump.h"
#include "lldrawpoolclouds.h"
#include "lldrawpoolground.h"
#include "lldrawpoolmedia.h"
#include "lldrawpoolsimple.h"
#include "lldrawpoolsky.h"
#include "lldrawpoolstars.h"
@ -93,9 +92,6 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerImage *tex0)
case POOL_BUMP:
poolp = new LLDrawPoolBump(tex0);
break;
case POOL_MEDIA:
poolp = new LLDrawPoolMedia(tex0);
break;
case POOL_HUD:
poolp = new LLDrawPoolHUD();
break;

View File

@ -163,7 +163,7 @@ public:
POOL_GROUND,
POOL_TERRAIN,
POOL_SIMPLE,
POOL_MEDIA,
POOL_MEDIA, // unused
POOL_BUMP,
POOL_AVATAR,
POOL_TREE,

View File

@ -130,7 +130,7 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter)
// don't provide default file selection
mFilesW[0] = '\0';
mOFN.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow());
mOFN.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
mOFN.lpstrFile = mFilesW;
mOFN.nMaxFile = SINGLE_FILENAME_BUFFER_SIZE;
mOFN.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_NOCHANGEDIR ;
@ -167,7 +167,7 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter)
// don't provide default file selection
mFilesW[0] = '\0';
mOFN.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow());
mOFN.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
mOFN.lpstrFile = mFilesW;
mOFN.nFilterIndex = 1;
mOFN.nMaxFile = FILENAME_BUFFER_SIZE;
@ -238,7 +238,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const char* filename)
{
mFilesW[0] = '\0';
}
mOFN.hwndOwner = llwindow_get_hwnd(gViewerWindow->getWindow());
mOFN.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
switch( filter )
{

0
indra/newview/llinventorybridge.cpp Executable file → Normal file
View File

View File

@ -534,16 +534,8 @@ void LLOverlayBar::onPlayButtonPressed( const LLMediaRemoteCtrlObserver::EventTy
LLParcel* parcel = gParcelMgr->getAgentParcel();
if (parcel)
{
bool web_url = (parcel->getParcelFlag(PF_URL_WEB_PAGE) || parcel->getParcelFlag(PF_URL_RAW_HTML));
LLString path( "" );
#if LL_MOZILLA_ENABLED
LLString mozilla_subdir;
if (web_url)
{
path = get_mozilla_path();
}
#endif
LLMediaEngine::getInstance ()->convertImageAndLoadUrl( true, web_url, path );
LLMediaEngine::getInstance ()->convertImageAndLoadUrl( true, false, path );
mMediaRemote->setTransportState ( LLMediaRemoteCtrl::Play, TRUE );
}
};

View File

@ -824,6 +824,20 @@ void LLPanelAvatarClassified::enableControls(BOOL self)
{
}
BOOL LLPanelAvatarClassified::titleIsValid()
{
LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab");
for (S32 i = 0; i < tabs->getTabCount(); i++)
{
LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i);
if ( ! panel->titleIsValid() )
{
return FALSE;
}
}
return TRUE;
}
void LLPanelAvatarClassified::apply()
{
@ -1624,12 +1638,15 @@ void LLPanelAvatar::onClickOK(void *userdata)
{
self->sendAvatarPropertiesUpdate();
self->mPanelClassified->apply();
LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID);
if (infop)
if ( self->mPanelClassified->titleIsValid() )
{
infop->close();
self->mPanelClassified->apply();
LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID);
if (infop)
{
infop->close();
}
}
}
}

View File

@ -176,6 +176,8 @@ public:
void apply();
void enableControls(BOOL own_avatar);
BOOL titleIsValid();
// Delete all the classified sub-panels from the tab container
void deleteClassifiedPanels();

View File

@ -224,6 +224,24 @@ BOOL LLPanelClassified::postBuild()
return TRUE;
}
BOOL LLPanelClassified::titleIsValid()
{
// Disallow leading spaces, punctuation, etc. that screw up
// sort order.
const LLString& name = mNameEditor->getText();
if (name.empty())
{
gViewerWindow->alertXml("BlankClassifiedName");
return FALSE;
}
if (!isalnum(name[0]))
{
gViewerWindow->alertXml("ClassifiedMustBeAlphanumeric");
return FALSE;
}
return TRUE;
}
void LLPanelClassified::apply()
{
@ -602,17 +620,10 @@ void LLPanelClassified::onClickUpdate(void* data)
// Disallow leading spaces, punctuation, etc. that screw up
// sort order.
const LLString& name = self->mNameEditor->getText();
if (name.empty())
if ( ! self->titleIsValid() )
{
gViewerWindow->alertXml("BlankClassifiedName");
return;
}
if (!isalnum(name[0]))
{
gViewerWindow->alertXml("ClassifiedMustBeAlphanumeric");
return;
}
};
// if already paid for, just do the update
if (self->mPaidFor)

View File

@ -55,6 +55,9 @@ public:
static void setClickThrough(const LLUUID& classified_id,
S32 teleport, S32 map, S32 profile);
// check that the title is valid (E.G. starts with a number or letter)
BOOL titleIsValid();
// Schedules the panel to request data
// from the server next time it is drawn.
void markForServerRequest();

View File

@ -51,13 +51,6 @@ BOOL LLPanelFace::postBuild()
LLTextureCtrl* mTextureCtrl;
LLColorSwatchCtrl* mColorSwatch;
#if LL_MOZILLA_ENABLED
LLTextBox* mLabelMediaType;
LLComboBox* mComboMediaType;
LLTextBox* mLabelMediaURL;
LLLineEditor* mLineMediaURL;
#endif
LLTextBox* mLabelTexGen;
LLComboBox* mComboTexGen;
@ -111,36 +104,6 @@ BOOL LLPanelFace::postBuild()
mColorSwatch->setCanApplyImmediately(TRUE);
}
#if LL_MOZILLA_ENABLED
mLabelMediaType = LLUICtrlFactory::getTextBoxByName(this,"web_label");
if(mLabelMediaType)
mLabelMediaType->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP);
mComboMediaType = LLUICtrlFactory::getComboBoxByName(this,"web_type_combo");
if(mComboMediaType)
{
mComboMediaType->setCommitCallback(onCommitMediaInfo);
mComboMediaType->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP);
mComboMediaType->setCallbackUserData( this );
mComboMediaType->add("None");
mComboMediaType->add("Web page");
}
mLabelMediaURL = LLUICtrlFactory::getTextBoxByName(this,"url_label");
if(mLabelMediaURL)
{
mLabelMediaURL->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP);
}
mLineMediaURL = LLUICtrlFactory::getLineEditorByName(this,"url_line");
if(mLineMediaURL)
{
mLineMediaURL->setCommitCallback(onCommitMediaInfo);
mLineMediaURL->setFollows(FOLLOWS_LEFT|FOLLOWS_TOP);
mLineMediaURL->setCommitOnFocusLost(TRUE);
mLineMediaURL->setCallbackUserData( this );
}
#endif
mLabelColorTransp = LLUICtrlFactory::getTextBoxByName(this,"color trans");
if(mLabelColorTransp)
{
@ -250,19 +213,6 @@ void LLPanelFace::sendFullbright()
gSelectMgr->selectionSetFullbright( fullbright );
}
#if LL_MOZILLA_ENABLED
void LLPanelFace::sendMediaInfo()
{
if (mComboMediaType)
{
U8 media_type = (U8) mComboMediaType->getCurrentIndex();
std::string media_url = mLineMediaURL->getText();
gSelectMgr->selectionSetMediaTypeAndURL( media_type, media_url );
}
}
#endif
void LLPanelFace::sendColor()
{
@ -397,48 +347,6 @@ void LLPanelFace::getState()
//mBtnAutoFix->setEnabled ( editable );
}
childSetEnabled("button apply",editable);
//mBtnApply->setEnabled( editable );
#if LL_MOZILLA_ENABLED
if (gSavedSettings.getBOOL("UseWebPagesOnPrims"))
{
// Web page selection
mLabelMediaType->setEnabled(editable);
mLabelMediaType->setToolTip("Experimental");
// JAMESDEBUG - use viewerobject mMedia->mMediaType when transmission is wired in
U8 media_type = LLViewerObject::MEDIA_TYPE_NONE;
bool same = gSelectMgr->selectionGetMediaType( &media_type );
mComboMediaType->setTentative( !same );
mComboMediaType->setEnabled( editable );
mComboMediaType->setCurrentByIndex( (S32)media_type );
mComboMediaType->setToolTip("Experimental");
mLabelMediaURL->setEnabled(editable);
mLabelMediaURL->setToolTip("Experimental");
const std::string& media_url = objectp->getMediaURL();
mLineMediaURL->setEnabled( editable );
mLineMediaURL->setText( media_url );
mLineMediaURL->setToolTip("Experimental");
}
else
{
mLabelMediaType->setEnabled(FALSE);
mLabelMediaType->setToolTip("Disabled because 'Show web pages on objects' preference is disabled");
mComboMediaType->setEnabled( FALSE );
mComboMediaType->setCurrentByIndex( LLViewerObject::MEDIA_TYPE_NONE );
mComboMediaType->setToolTip("Disabled because 'Show web pages on objects' preference is disabled");
mLabelMediaURL->setEnabled(FALSE);
mLabelMediaURL->setToolTip("Disabled because 'Show web pages on objects' preference is disabled");
mLineMediaURL->setEnabled( FALSE );
mLineMediaURL->setText( "" );
mLineMediaURL->setToolTip("Disabled because 'Show web pages on objects' preference is disabled");
}
#endif
// Texture
LLUUID id;
@ -895,15 +803,6 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata )
self->sendTextureInfo();
}
#if LL_MOZILLA_ENABLED
// static
void LLPanelFace::onCommitMediaInfo(LLUICtrl* ctrl, void* data)
{
LLPanelFace* self = (LLPanelFace*) data;
self->sendMediaInfo();
}
#endif
// Commit the number of repeats per meter
// static
void LLPanelFace::onClickApply(void* userdata)

View File

@ -49,9 +49,6 @@ protected:
void sendTexGen(); // applies and sends bump map
void sendShiny(); // applies and sends shininess
void sendFullbright(); // applies and sends full bright
#if LL_MOZILLA_ENABLED
void sendMediaInfo(); // web page settings and URL
#endif
// this function is to return TRUE if the dra should succeed.
static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
@ -68,9 +65,6 @@ protected:
static void onCommitTexGen( LLUICtrl* ctrl, void* userdata);
static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
static void onCommitFullbright( LLUICtrl* ctrl, void* userdata);
#if LL_MOZILLA_ENABLED
static void onCommitMediaInfo( LLUICtrl* ctrl, void* data);
#endif
static void onClickApply(void*);
static void onClickAutoFix(void*);
@ -85,52 +79,6 @@ protected:
static F32 valueTexGen(LLViewerObject* object, S32 face);
static F32 valueShiny(LLViewerObject* object, S32 face);
static F32 valueFullbright(LLViewerObject* object, S32 face);
protected:
//LLTextureCtrl* mTextureCtrl;
//LLColorSwatchCtrl* mColorSwatch;
//#if LL_MOZILLA_ENABLED
//LLTextBox* mLabelMediaType;
//LLComboBox* mComboMediaType;
//LLTextBox* mLabelMediaURL;
//LLLineEditor* mLineMediaURL;
//#endif
//LLTextBox *mLabelTexScale;
//LLSpinCtrl *mCtrlTexScaleS;
//LLSpinCtrl *mCtrlTexScaleT;
//LLCheckBoxCtrl *mCheckFlipScaleS;
//LLCheckBoxCtrl *mCheckFlipScaleT;
//LLTextBox *mLabelTexOffset;
//LLSpinCtrl *mCtrlTexOffsetS;
//LLSpinCtrl *mCtrlTexOffsetT;
//LLTextBox *mLabelTexRotation;
//LLSpinCtrl *mCtrlTexRotation;
//LLTextBox* mLabelTexGen;
//LLComboBox* mComboTexGen;
//LLTextBox* mLabelShininess;
//LLComboBox* mComboShininess;
//LLTextBox* mLabelBumpiness;
//LLComboBox* mComboBumpiness;
//LLCheckBoxCtrl *mCheckFullbright;
//
//LLTextBox* mLabelColorTransp;
//LLSpinCtrl* mCtrlColorTransp; // transparency = 1 - alpha
//LLTextBox* mLabelRepeatsPerMeter;
//LLSpinCtrl* mCtrlRepeatsPerMeter;
//LLButton* mBtnApply;
//LLTextBox* mLabelTexAutoFix;
//LLButton* mBtnAutoFix;
};
#endif

View File

@ -11,9 +11,9 @@
#include "llstartup.h"
#if LL_WINDOWS
#include <process.h> // _spawnl()
# include <process.h> // _spawnl()
#else
#include <sys/stat.h> // mkdir()
# include <sys/stat.h> // mkdir()
#endif
#include "audioengine.h"
@ -108,7 +108,6 @@
#include "llviewerdisplay.h"
#include "llviewergesture.h"
#include "llviewerimagelist.h"
#include "llviewermedialist.h"
#include "llviewermenu.h"
#include "llviewermessage.h"
#include "llviewernetwork.h"
@ -497,7 +496,7 @@ BOOL idle_startup()
#if LL_WINDOWS
// FMOD on Windows needs the window handle to stop playing audio
// when window is minimized. JC
void* window_handle = (void*)llwindow_get_hwnd(gViewerWindow->getWindow());
void* window_handle = (HWND)gViewerWindow->getPlatformWindow();
#else
void* window_handle = NULL;
#endif
@ -1854,46 +1853,6 @@ BOOL idle_startup()
}
#endif
// Get list of URLs approved for usage
// CP: removed since they're not useful without Mozilla enabled
#if LL_MOZILLA_ENABLED
LLUrlWhiteList::getInstance()->load();
#endif
// initialize mozilla if we're using web page on a prim or not using an external browser for floater
BOOL use_web_pages_on_prims = gSavedSettings.getBOOL("UseWebPagesOnPrims");
BOOL use_external_browser = gSavedSettings.getBOOL("UseExternalBrowser");
use_external_browser = false;
if (use_web_pages_on_prims || !use_external_browser)
{
//llinfos << "Initializing web browser...." << llendl;
//set_startup_status(0.48f, "Initializing web browser...", gAgent.mMOTD.c_str());
//display_startup();
// initialize mozilla
LLString mozilla_path = gDirUtilp->getExecutableDir();
mozilla_path.append( gDirUtilp->getDirDelimiter() );
#if LL_DEBUG
mozilla_path.append( "mozilla_debug" );
#else
mozilla_path.append( "mozilla" );
#endif
#if LL_MOZILLA_ENABLED
if (!gMozillaInitialized)
{
void* platform_window = gViewerWindow->getPlatformWindow();
mozilla_init_embedding(platform_window, mozilla_path);
}
#endif
if (use_web_pages_on_prims)
{
gMediaList = new LLViewerMediaList(2);
}
}
gStartupState++;
return do_normal_idle;
}

View File

@ -200,22 +200,4 @@ bool LLUrlWhiteList::getNext ( LLString& valueOut )
bool LLUrlWhiteList::containsMatch ( const LLString& patternIn )
{
return false;
// CP: removed since they're not useful without Mozilla enabled
#if LL_MOZILLA_ENABLED
LLString pattern = url_cleanup(patternIn);
if (pattern.empty()) return false;
LLStringListIter iter = std::find ( mUrlList.begin (), mUrlList.end (), pattern );
if ( iter != mUrlList.end () )
{
return true;
}
else
{
return false;
};
#endif
}

View File

@ -183,7 +183,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
static F32 last_update_time = 0.f;
if ((gFrameTimeSeconds - last_update_time) > 1.f)
{
InvalidateRect(llwindow_get_hwnd(gViewerWindow->getWindow()), NULL, FALSE);
InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, FALSE);
last_update_time = gFrameTimeSeconds;
}
#elif LL_DARWIN

View File

@ -49,7 +49,6 @@
#include "llviewercamera.h"
#include "llviewerimagelist.h"
#include "llviewerinventory.h"
#include "llviewermedialist.h"
#include "llviewerobjectlist.h"
#include "llviewerparceloverlay.h"
#include "llviewerpartsource.h"
@ -3266,16 +3265,8 @@ void LLViewerObject::setMediaType(U8 media_type)
else if (mMedia->mMediaType != media_type)
{
mMedia->mMediaType = media_type;
if (gMediaList)
{
// we're using web pages on prims
gMediaList->updatedMediaURL(this);
}
if (mDrawable.notNull())
{
// move this object's faces into LLDrawPoolMedia
gPipeline.markTextured(mDrawable);
}
// TODO: update materials with new image
}
}
@ -3300,30 +3291,15 @@ void LLViewerObject::setMediaURL(const LLString& media_url)
mMedia = new LLViewerObjectMedia;
mMedia->mMediaURL = media_url;
mMedia->mPassedWhitelist = FALSE;
if (gMediaList)
{
gMediaList->addedMediaURL(this);
}
if (mDrawable.notNull())
{
// move this object's faces into LLDrawPoolMedia
gPipeline.markTextured(mDrawable);
}
// TODO: update materials with new image
}
else if (mMedia->mMediaURL != media_url)
{
mMedia->mMediaURL = media_url;
mMedia->mPassedWhitelist = FALSE;
if (gMediaList)
{
// we're using web pages on prims
gMediaList->updatedMediaURL(this);
}
if (mDrawable.notNull())
{
// move this object's faces into LLDrawPoolMedia
gPipeline.markTextured(mDrawable);
}
// TODO: update materials with new image
}
}
@ -4137,6 +4113,12 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
}
}
if ( mAudioSourcep )
{
gAudiop->cleanupAudioSource(mAudioSourcep);
mAudioSourcep = NULL;
}
getAudioSource(owner_id);
if (mAudioSourcep)
@ -4153,8 +4135,6 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
LLAudioSource *LLViewerObject::getAudioSource(const LLUUID& owner_id)
{
LLMemType mt(LLMemType::MTYPE_OBJECT);
if (!mAudioSourcep)
{
// Arbitrary low gain for a sound that's not playing.

View File

@ -44,7 +44,6 @@
#include "lldatapacker.h"
#include <zlib/zlib.h>
#include "object_flags.h"
#include "llviewermedialist.h"
extern BOOL gVelocityInterpolate;
extern BOOL gPingInterpolate;
@ -178,11 +177,13 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
U32 i,
const EObjectUpdateType update_type,
LLDataPacker* dpp,
BOOL justCreated)
BOOL just_created)
{
LLMessageSystem* msg = gMessageSystem;
U32 pum_flags = objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
// ignore returned flags
objectp->processUpdateMessage(msg, user_data, i, update_type, dpp);
if (objectp->isDead())
{
// The update failed
@ -196,7 +197,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
// Update the image levels of textures for this object.
objectp->updateTextures(gAgent);
if (justCreated)
if (just_created)
{
gPipeline.addObject(objectp);
}
@ -207,7 +208,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
findOrphans(objectp, msg->getSenderIP(), msg->getSenderPort());
// If we're just wandering around, don't create new objects selected.
if (justCreated
if (just_created
&& update_type != OUT_TERSE_IMPROVED
&& objectp->mCreateSelected)
{
@ -223,37 +224,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp,
gViewerWindow->getWindow()->decBusyCount();
gViewerWindow->getWindow()->setCursor( UI_CURSOR_ARROW );
}
if (gMediaList)
{
// we're using web pages on prims
if (pum_flags & LLViewerObject::MEDIA_URL_ADDED)
{
//llwarns << "WEBONPRIM media url added " << objectp->getMediaURL() << llendl;
gMediaList->addedMediaURL(objectp);
}
if (pum_flags & LLViewerObject::MEDIA_URL_UPDATED)
{
//llwarns << "WEBONPRIM media url updated " << objectp->getMediaURL() << llendl;
gMediaList->updatedMediaURL(objectp);
}
if (pum_flags & LLViewerObject::MEDIA_URL_REMOVED)
{
//llwarns << "WEBONPRIM media url removed " << objectp->getMediaURL() << llendl;
gMediaList->removedMediaURL(objectp);
}
// Make sure we get moved in or out of LLDrawPoolMedia, as needed
if (pum_flags & (LLViewerObject::MEDIA_URL_ADDED | LLViewerObject::MEDIA_URL_REMOVED | LLViewerObject::MEDIA_URL_UPDATED))
{
if (objectp->mDrawable.notNull())
{
gPipeline.markTextured(objectp->mDrawable);
}
}
}
}
void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,

View File

@ -1866,15 +1866,8 @@ void prepare_video(const LLParcel *parcel)
void start_video(const LLParcel *parcel)
{
prepare_video(parcel);
bool web_url = (parcel->getParcelFlag(PF_URL_WEB_PAGE) || parcel->getParcelFlag(PF_URL_RAW_HTML));
std::string path( "" );
#if LL_MOZILLA_ENABLED
if (web_url)
{
path = get_mozilla_path();
}
#endif
LLMediaEngine::getInstance ()->convertImageAndLoadUrl ( true, web_url, path);
LLMediaEngine::getInstance ()->convertImageAndLoadUrl ( true, false, path);
}
void stop_video()

View File

@ -15,10 +15,18 @@
// in viewer.
// It is used to precompile headers for improved build speed.
// Reference headers your program requires here:
#include "linden_common.h"
// The rest of the common system headers go here:
// We may want to take the windows.h include out, but it used to be in
// linden_common.h, and hence in all the libraries. This is better. JC
#if LL_WINDOWS
// Limit Windows API to small and manageable set.
// If you get undefined symbols, find the appropriate
// Windows header file and include that in your .cpp file.
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#endif
// Work around stupid Microsoft STL warning
#ifdef LL_WINDOWS

View File

@ -1023,7 +1023,7 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S
#if LL_WINDOWS
if (gNoRender)
{
HWND window_handle = llwindow_get_hwnd(window);
HWND window_handle = (HWND)window->getPlatformWindow();
PAINTSTRUCT ps;
HDC hdc;

View File

@ -35,7 +35,6 @@
#include "lldrawable.h"
#include "lldrawpoolavatar.h"
#include "lldrawpoolalpha.h"
#include "lldrawpoolmedia.h"
#include "lldrawpoolbump.h"
#include "lldriverparam.h"
#include "lleditingmotion.h"

View File

@ -19,18 +19,7 @@
// static
void LLWeb::loadURL(std::string url)
{
#if LL_MOZILLA_ENABLED
if (gSavedSettings.getBOOL("UseExternalBrowser"))
{
loadURLExternal(url);
}
else
{
LLFloaterHTML::show((void*)url.c_str());
}
#else
loadURLExternal(url);
#endif
}

View File

@ -9,9 +9,11 @@
// win_crash_logger.cpp : Defines the entry point for the application.
//
// Must be first include, precompiled headers.
#include "stdafx.h"
#include "linden_common.h"
#include "llcontrol.h"
#include "stdafx.h"
#include "resource.h"
#include <stdio.h>