summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-04 17:33:36 -0800
committerJames Cook <james@lindenlab.com>2009-12-04 17:33:36 -0800
commit7ff7709f9fd07de5cc9b039562d0fe3794f6ce36 (patch)
treee90e33e04ea849c5f4e6a9141af0da6370b2dc8f
parent738dabede22236e2f9618c402362ada88c785d68 (diff)
Expose window minimize and restore in LLWindow interface.
Add secondlife:///app/login/reg handler for Reg-In-Client Reviewed with Ambroff
-rw-r--r--indra/llwindow/llwindow.h2
-rw-r--r--indra/llwindow/llwindowheadless.h2
-rw-r--r--indra/llwindow/llwindowmacosx.cpp2
-rw-r--r--indra/llwindow/llwindowmacosx.h5
-rw-r--r--indra/llwindow/llwindowmesaheadless.h2
-rw-r--r--indra/llwindow/llwindowsdl.cpp2
-rw-r--r--indra/llwindow/llwindowsdl.h5
-rw-r--r--indra/llwindow/llwindowwin32.cpp3
-rw-r--r--indra/llwindow/llwindowwin32.h5
-rw-r--r--indra/newview/llloginhandler.cpp29
10 files changed, 47 insertions, 10 deletions
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 8602225108..127dbf45e0 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -70,6 +70,8 @@ public:
virtual BOOL getMinimized() = 0;
virtual BOOL getMaximized() = 0;
virtual BOOL maximize() = 0;
+ virtual void minimize() = 0;
+ virtual void restore() = 0;
BOOL getFullscreen() { return mFullscreen; };
virtual BOOL getPosition(LLCoordScreen *position) = 0;
virtual BOOL getSize(LLCoordScreen *size) = 0;
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 3cffd2bbf6..59fc2ec657 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -45,6 +45,8 @@ public:
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
+ /*virtual*/ void minimize() {};
+ /*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index af9a30cb25..7cbc507b85 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1033,6 +1033,7 @@ void LLWindowMacOSX::hide()
HideWindow(mWindow);
}
+//virtual
void LLWindowMacOSX::minimize()
{
setMouseClipping(FALSE);
@@ -1040,6 +1041,7 @@ void LLWindowMacOSX::minimize()
CollapseWindow(mWindow, true);
}
+//virtual
void LLWindowMacOSX::restore()
{
show();
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 17074080eb..fbfa07fab4 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -56,6 +56,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
+ /*virtual*/ void minimize();
+ /*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@@ -139,9 +141,6 @@ protected:
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
- void minimize();
- void restore();
-
BOOL shouldPostQuit() { return mPostQuit; }
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index 46b62b914c..06146afde7 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -49,6 +49,8 @@ public:
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
+ /*virtual*/ void minimize() {};
+ /*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index e671fc8a83..bfdf1147a1 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -839,11 +839,13 @@ void LLWindowSDL::hide()
// *FIX: What to do with SDL?
}
+//virtual
void LLWindowSDL::minimize()
{
// *FIX: What to do with SDL?
}
+//virtual
void LLWindowSDL::restore()
{
// *FIX: What to do with SDL?
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index dcf41291ec..0ba1c861da 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -62,6 +62,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
+ /*virtual*/ void minimize();
+ /*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@@ -165,9 +167,6 @@ protected:
// Go back to last fullscreen display resolution.
BOOL setFullscreenResolution();
- void minimize();
- void restore();
-
BOOL shouldPostQuit() { return mPostQuit; }
protected:
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c608c21d05..3b9c840e72 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -643,6 +643,7 @@ void LLWindowWin32::hide()
ShowWindow(mWindowHandle, SW_HIDE);
}
+//virtual
void LLWindowWin32::minimize()
{
setMouseClipping(FALSE);
@@ -650,7 +651,7 @@ void LLWindowWin32::minimize()
ShowWindow(mWindowHandle, SW_MINIMIZE);
}
-
+//virtual
void LLWindowWin32::restore()
{
ShowWindow(mWindowHandle, SW_RESTORE);
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index e14324c9f1..e4e9179db7 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -54,6 +54,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
+ /*virtual*/ void minimize();
+ /*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@@ -137,9 +139,6 @@ protected:
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
- void minimize();
- void restore();
-
BOOL shouldPostQuit() { return mPostQuit; }
void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form);
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index 2a1f42c3c4..1be3430e07 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -40,9 +40,12 @@
#include "llurlsimstring.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llviewernetwork.h" // EGridInfo
+#include "llviewerwindow.h" // getWindow()
// library includes
#include "llmd5.h"
+#include "llweb.h"
+#include "llwindow.h"
// Must have instance to auto-register with LLCommandDispatcher
@@ -174,6 +177,32 @@ bool LLLoginHandler::handle(const LLSD& tokens,
return true;
}
+ if (tokens.size() == 1
+ && tokens[0].asString() == "reg")
+ {
+ LLWindow* window = gViewerWindow->getWindow();
+ window->incBusyCount();
+ window->setCursor(UI_CURSOR_ARROW);
+
+ // Do this first, as it may be slow and we want to keep something
+ // on the user's screen as long as possible
+ LLWeb::loadURLExternal( "http://join.eniac15.lindenlab.com/" );
+
+ window->decBusyCount();
+ window->setCursor(UI_CURSOR_ARROW);
+
+ // Then hide the window
+ window->minimize();
+ return true;
+ }
+
+ // Make sure window is visible
+ LLWindow* window = gViewerWindow->getWindow();
+ if (window->getMinimized())
+ {
+ window->restore();
+ }
+
parse(query_map);
//if we haven't initialized stuff yet, this is