aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/llpanellogin.cpp96
-rw-r--r--linden/indra/newview/llpanellogin.h3
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_login.xml23
4 files changed, 21 insertions, 112 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 5077a74..5d52329 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -832,17 +832,6 @@
832 <key>Value</key> 832 <key>Value</key>
833 <integer>1</integer> 833 <integer>1</integer>
834 </map> 834 </map>
835 <key>NewsBarURL</key>
836 <map>
837 <key>Comment</key>
838 <string>URL to load in the news bar on the login screen</string>
839 <key>Persist</key>
840 <integer>1</integer>
841 <key>Type</key>
842 <string>String</string>
843 <key>Value</key>
844 <string>http://app.kokuaviewer.org/news/</string>
845 </map>
846 <key>ObjectIMColor</key> 835 <key>ObjectIMColor</key>
847 <map> 836 <map>
848 <key>Comment</key> 837 <key>Comment</key>
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index d81cfa1..00d9332 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -302,6 +302,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
302 // make links open in external browser 302 // make links open in external browser
303 web_browser->setOpenInExternalBrowser( true ); 303 web_browser->setOpenInExternalBrowser( true );
304 304
305 // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through)
306 LLRect htmlRect = getRect();
307#if USE_VIEWER_AUTH
308 htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY(), getRect().getWidth() + 6, getRect().getHeight());
309#else
310 htmlRect.setCenterAndSize( getRect().getCenterX() - 2, getRect().getCenterY() + 40, getRect().getWidth() + 6, getRect().getHeight() - 78 );
311#endif
312 web_browser->setRect( htmlRect );
313 web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE );
314 reshape( getRect().getWidth(), getRect().getHeight(), 1 );
315
305 // kick off a request to grab the url manually 316 // kick off a request to grab the url manually
306 gResponsePtr = LLIamHereLogin::build( this ); 317 gResponsePtr = LLIamHereLogin::build( this );
307 std::string login_page = gSavedSettings.getString("LoginPage"); 318 std::string login_page = gSavedSettings.getString("LoginPage");
@@ -316,8 +327,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
316 refreshLocation( false ); 327 refreshLocation( false );
317#endif 328#endif
318 329
319 loadNewsBar();
320
321 LLFirstUse::useLoginScreen(); 330 LLFirstUse::useLoginScreen();
322} 331}
323 332
@@ -410,20 +419,13 @@ void LLPanelLogin::draw()
410 S32 width = getRect().getWidth(); 419 S32 width = getRect().getWidth();
411 S32 height = getRect().getHeight(); 420 S32 height = getRect().getHeight();
412 421
413 S32 news_bar_height = 0;
414 LLMediaCtrl* news_bar = getChild<LLMediaCtrl>("news_bar");
415 if (news_bar)
416 {
417 news_bar_height = news_bar->getRect().getHeight();
418 }
419
420 if ( mHtmlAvailable ) 422 if ( mHtmlAvailable )
421 { 423 {
422#if !USE_VIEWER_AUTH 424#if !USE_VIEWER_AUTH
423 // draw a background box in black 425 // draw a background box in black
424 gl_rect_2d( 0, height - 264 + news_bar_height, width, 264, LLColor4( 0.0f, 0.0f, 0.0f, 1.f ) ); 426 gl_rect_2d( 0, height - 264, width, 264, LLColor4( 0.0f, 0.0f, 0.0f, 1.f ) );
425 // draw the bottom part of the background image - just the blue background to the native client UI 427 // draw the bottom part of the background image - just the blue background to the native client UI
426 mLogoImage->draw(0, -264 + news_bar_height, width + 8, mLogoImage->getHeight()); 428 mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight());
427#endif 429#endif
428 } 430 }
429 else 431 else
@@ -1162,75 +1164,3 @@ void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)
1162 } 1164 }
1163} 1165}
1164*/ 1166*/
1165
1166
1167bool LLPanelLogin::loadNewsBar()
1168{
1169 std::string news_url = gSavedSettings.getString("NewsBarURL");
1170
1171 if (news_url.empty())
1172 {
1173 return false;
1174 }
1175
1176 LLMediaCtrl* news_bar = getChild<LLMediaCtrl>("news_bar");
1177
1178 if (!news_bar)
1179 {
1180 return false;
1181 }
1182
1183 // *HACK: Not sure how else to make LLMediaCtrl respect user's
1184 // preference when opening links with target="_blank". -Jacek
1185 if (gSavedSettings.getBOOL("UseExternalBrowser"))
1186 {
1187 news_bar->setOpenInExternalBrowser( true );
1188 news_bar->setOpenInInternalBrowser( false );
1189 }
1190 else
1191 {
1192 news_bar->setOpenInExternalBrowser( false );
1193 news_bar->setOpenInInternalBrowser( true );
1194 }
1195
1196
1197 std::ostringstream full_url;
1198
1199 full_url << news_url;
1200
1201 // Append a "?" if the URL doesn't already have query params.
1202 if (LLURI(news_url).queryMap().size() == 0)
1203 {
1204 full_url << "?";
1205 }
1206
1207 std::string channel = gSavedSettings.getString("VersionChannelName");
1208 std::string skin = gSavedSettings.getString("SkinCurrent");
1209
1210 std::string version =
1211 llformat("%d.%d.%d",
1212 ViewerVersion::getImpMajorVersion(),
1213 ViewerVersion::getImpMinorVersion(),
1214 ViewerVersion::getImpPatchVersion());
1215 if (!ViewerVersion::getImpTestVersion().empty())
1216 {
1217 version += " " + ViewerVersion::getImpTestVersion();
1218 }
1219
1220 char* curl_channel = curl_escape(channel.c_str(), 0);
1221 char* curl_version = curl_escape(version.c_str(), 0);
1222 char* curl_skin = curl_escape(skin.c_str(), 0);
1223
1224 full_url << "&channel=" << curl_channel;
1225 full_url << "&version=" << curl_version;
1226 full_url << "&skin=" << curl_skin;
1227
1228 curl_free(curl_channel);
1229 curl_free(curl_version);
1230 curl_free(curl_skin);
1231
1232 news_bar->navigateTo( full_url.str() );
1233
1234
1235 return true;
1236}
diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h
index 5830b52..c99fa30 100644
--- a/linden/indra/newview/llpanellogin.h
+++ b/linden/indra/newview/llpanellogin.h
@@ -87,9 +87,6 @@ public:
87 // inherited from LLViewerMediaObserver 87 // inherited from LLViewerMediaObserver
88 /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); 88 /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
89 89
90 /// Load the news bar web page, return true if successful.
91 bool loadNewsBar();
92
93private: 90private:
94 static void onClickConnect(void*); 91 static void onClickConnect(void*);
95 static void onClickGrid(void*); 92 static void onClickGrid(void*);
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml
index 13e8ff6..75c635e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_login.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_login.xml
@@ -5,7 +5,7 @@
5 follows="left|top|right|bottom" mouse_opaque="true" > 5 follows="left|top|right|bottom" mouse_opaque="true" >
6 6
7 <web_browser name="login_html" 7 <web_browser name="login_html"
8 bottom="102" top="-1" left="0" right="-1" 8 bottom="0" top="-1" left="0" right="-1"
9 border_visible="false" follows="top|left|bottom|right" 9 border_visible="false" follows="top|left|bottom|right"
10 start_url="data:text/html, 10 start_url="data:text/html,
11 %3Chtml%3E 11 %3Chtml%3E
@@ -33,7 +33,7 @@
33 <!-- START LOCATION --> 33 <!-- START LOCATION -->
34 34
35 <text name="start_location_text" 35 <text name="start_location_text"
36 bottom="32" left="10" height="16" right="115" 36 bottom="8" left="10" height="16" right="115"
37 follows="left|bottom" h_pad="0" halign="right" v_pad="0" 37 follows="left|bottom" h_pad="0" halign="right" v_pad="0"
38 bg_visible="false" drop_shadow_visible="true" 38 bg_visible="false" drop_shadow_visible="true"
39 border_visible="false" border_drop_shadow_visible="false" 39 border_visible="false" border_drop_shadow_visible="false"
@@ -59,7 +59,7 @@
59 <!-- FIRST NAME --> 59 <!-- FIRST NAME -->
60 60
61 <text name="first_name_text" 61 <text name="first_name_text"
62 bottom="80" left="24" height="16" width="120" 62 bottom="56" left="24" height="16" width="120"
63 follows="left|bottom" h_pad="0" halign="left" v_pad="0" 63 follows="left|bottom" h_pad="0" halign="left" v_pad="0"
64 bg_visible="false" drop_shadow_visible="true" 64 bg_visible="false" drop_shadow_visible="true"
65 border_visible="false" border_drop_shadow_visible="false" 65 border_visible="false" border_drop_shadow_visible="false"
@@ -123,7 +123,7 @@
123 <!-- GRIDS --> 123 <!-- GRIDS -->
124 124
125 <text name="grid_text" 125 <text name="grid_text"
126 bottom="80" left_delta="150" height="16" width="120" 126 bottom="56" left_delta="150" height="16" width="120"
127 follows="left|bottom" h_pad="0" halign="left" v_pad="0" 127 follows="left|bottom" h_pad="0" halign="left" v_pad="0"
128 bg_visible="false" drop_shadow_visible="true" 128 bg_visible="false" drop_shadow_visible="true"
129 border_visible="false" border_drop_shadow_visible="false" 129 border_visible="false" border_drop_shadow_visible="false"
@@ -143,7 +143,7 @@
143 <!-- LOG IN --> 143 <!-- LOG IN -->
144 144
145 <button name="connect_btn" label="Log In" 145 <button name="connect_btn" label="Log In"
146 bottom="58" left_delta="140" height="24" width="120" 146 bottom="34" left_delta="140" height="24" width="120"
147 follows="left|bottom" font="SansSerif" halign="center" 147 follows="left|bottom" font="SansSerif" halign="center"
148 mouse_opaque="true" scale_image="TRUE" /> 148 mouse_opaque="true" scale_image="TRUE" />
149 149
@@ -151,7 +151,7 @@
151 <!-- ACCOUNT / FORGOT PASSWORD --> 151 <!-- ACCOUNT / FORGOT PASSWORD -->
152 152
153 <text name="create_new_account_text" 153 <text name="create_new_account_text"
154 bottom="69" left="-210" height="16" width="200" 154 bottom="45" left="-210" height="16" width="200"
155 follows="right|bottom" h_pad="0" halign="right" v_pad="0" 155 follows="right|bottom" h_pad="0" halign="right" v_pad="0"
156 bg_visible="false" drop_shadow_visible="true" 156 bg_visible="false" drop_shadow_visible="true"
157 border_visible="false" border_drop_shadow_visible="false" 157 border_visible="false" border_drop_shadow_visible="false"
@@ -161,7 +161,7 @@
161 </text> 161 </text>
162 162
163 <text name="forgot_password_text" 163 <text name="forgot_password_text"
164 bottom="49" left="-210" height="16" width="200" 164 bottom="25" left="-210" height="16" width="200"
165 follows="right|bottom" h_pad="0" halign="right" v_pad="0" 165 follows="right|bottom" h_pad="0" halign="right" v_pad="0"
166 bg_visible="false" drop_shadow_visible="true" 166 bg_visible="false" drop_shadow_visible="true"
167 border_visible="false" border_drop_shadow_visible="false" 167 border_visible="false" border_drop_shadow_visible="false"
@@ -174,7 +174,7 @@
174 <!-- CHANNEL & VERSION --> 174 <!-- CHANNEL & VERSION -->
175 175
176 <text name="channel_text" 176 <text name="channel_text"
177 bottom="29" left="-310" height="16" width="300" 177 bottom="5" left="-310" height="16" width="300"
178 follows="right|bottom" h_pad="0" halign="right" v_pad="0" 178 follows="right|bottom" h_pad="0" halign="right" v_pad="0"
179 bg_visible="false" drop_shadow_visible="true" 179 bg_visible="false" drop_shadow_visible="true"
180 border_visible="false" border_drop_shadow_visible="false" 180 border_visible="false" border_drop_shadow_visible="false"
@@ -182,11 +182,4 @@
182 hover="true" hover_color="50 115 185"> 182 hover="true" hover_color="50 115 185">
183 [CHANNEL] [VERSION] 183 [CHANNEL] [VERSION]
184 </text> 184 </text>
185
186
187 <web_browser name="news_bar"
188 bottom="0" top="20" left="0" right="-1"
189 border_visible="true" follows="left|bottom|right"
190 start_url="data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody bgcolor=%22#000%22%3E%3C/body%3E%3C/html%3E" />
191
192</panel> 185</panel>