GUI: Change 'Wi-Fi Sharing' tab name to 'LAN'

This commit is contained in:
Alexander Tkachev 2019-07-21 20:52:16 +07:00 committed by Matan Bareket
parent e4da63823a
commit f7902583bc
11 changed files with 18 additions and 18 deletions

View File

@ -1763,10 +1763,10 @@ void GlobalOptionsDialog::build() {
#endif USE_LIBCURL
#ifdef USE_SDL_NET
//
// 8) The Wi-Fi Sharing tab (local "cloud" webserver)
// 8) The LAN tab (local "cloud" webserver)
//
tab->addTab(_c("Wi-Fi Sharing", context));
addWiFiSharingControls(tab, "GlobalOptions_WiFiSharing.", context);
tab->addTab(_c("LAN", context));
addNetworkControls(tab, "GlobalOptions_Network.", context);
#endif // USE_SDL_NET
#endif // USE_CLOUD
@ -1903,7 +1903,7 @@ void GlobalOptionsDialog::addCloudControls(GuiObject *boss, const Common::String
#endif // USE_LIBCURL
#ifdef USE_SDL_NET
void GlobalOptionsDialog::addWiFiSharingControls(GuiObject *boss, const Common::String &prefix, const char *context) {
void GlobalOptionsDialog::addNetworkControls(GuiObject *boss, const Common::String &prefix, const char *context) {
_runServerButton = new ButtonWidget(boss, prefix + "RunServerButton", _("Run server"), _("Run local webserver"), kRunServerCmd);
_serverInfoLabel = new StaticTextWidget(boss, prefix + "ServerInfoLabel", _("Not running"));
@ -1918,10 +1918,10 @@ void GlobalOptionsDialog::addWiFiSharingControls(GuiObject *boss, const Common::
_serverPort = new EditTextWidget(boss, prefix + "ServerPortEditText", Common::String::format("%u", port), 0);
_serverPortClearButton = addClearButton(boss, prefix + "ServerPortClearButton", kServerPortClearCmd);
_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _c("Run server to manage files with browser (in the same Wi-Fi network).", context), "", ThemeEngine::kFontStyleNormal);
_featureDescriptionLine1 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine1", _c("Run server to manage files with browser (in the same network).", context), "", ThemeEngine::kFontStyleNormal);
_featureDescriptionLine2 = new StaticTextWidget(boss, prefix + "FeatureDescriptionLine2", _c("Closing options dialog will stop the server.", context), "", ThemeEngine::kFontStyleNormal);
reflowWiFiSharingTabLayout();
reflowNetworkTabLayout();
}
#endif // USE_SDL_NET
@ -2403,7 +2403,7 @@ void GlobalOptionsDialog::handleTickle() {
#ifdef USE_SDL_NET
if (LocalServer.isRunning() != _serverWasRunning) {
_serverWasRunning = !_serverWasRunning;
reflowWiFiSharingTabLayout();
reflowNetworkTabLayout();
}
#endif // USE_SDL_NET
#endif // USE_CLOUD
@ -2450,7 +2450,7 @@ void GlobalOptionsDialog::reflowLayout() {
setupCloudTab();
#endif // USE_LIBCURL
#ifdef USE_SDL_NET
reflowWiFiSharingTabLayout();
reflowNetworkTabLayout();
#endif // USE_SDL_NET
#endif // USE_CLOUD
}
@ -2592,7 +2592,7 @@ void GlobalOptionsDialog::shiftWidget(Widget *widget, const char *widgetName, in
#endif // USE_LIBCURL
#ifdef USE_SDL_NET
void GlobalOptionsDialog::reflowWiFiSharingTabLayout() {
void GlobalOptionsDialog::reflowNetworkTabLayout() {
bool serverIsRunning = LocalServer.isRunning();
if (_runServerButton) {

View File

@ -333,7 +333,7 @@ protected:
#ifdef USE_SDL_NET
//
// Wi-Fi Sharing controls
// LAN controls
//
ButtonWidget *_runServerButton;
StaticTextWidget *_serverInfoLabel;
@ -347,8 +347,8 @@ protected:
StaticTextWidget *_featureDescriptionLine2;
bool _serverWasRunning;
void addWiFiSharingControls(GuiObject *boss, const Common::String &prefix, const char *context = nullptr);
void reflowWiFiSharingTabLayout();
void addNetworkControls(GuiObject *boss, const Common::String &prefix, const char *context = nullptr);
void reflowNetworkTabLayout();
#endif // USE_SDL_NET
#endif // USE_CLOUD

Binary file not shown.

View File

@ -732,7 +732,7 @@
</layout>
</dialog>
<dialog name = 'GlobalOptions_WiFiSharing' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'RunServerButton'

View File

@ -737,7 +737,7 @@
</layout>
</dialog>
<dialog name = 'GlobalOptions_WiFiSharing' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'RunServerButton'

Binary file not shown.

View File

@ -746,7 +746,7 @@
</layout>
</dialog>
<dialog name = 'GlobalOptions_WiFiSharing' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'RunServerButton'

View File

@ -735,7 +735,7 @@
</layout>
</dialog>
<dialog name = 'GlobalOptions_WiFiSharing' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'RunServerButton'

Binary file not shown.

View File

@ -746,7 +746,7 @@
</layout>
</dialog>
<dialog name = 'GlobalOptions_WiFiSharing' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '10' center = 'true'>
<widget name = 'RunServerButton'

View File

@ -735,7 +735,7 @@
</layout>
</dialog>
<dialog name = 'GlobalOptions_WiFiSharing' overlays = 'Dialog.GlobalOptions.TabWidget'>
<dialog name = 'GlobalOptions_Network' overlays = 'Dialog.GlobalOptions.TabWidget'>
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'>
<layout type = 'horizontal' padding = '0, 0, 0, 0' spacing = '6' center = 'true'>
<widget name = 'RunServerButton'