mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CUpnpBrowserGui: simplify hintbox calls
This commit is contained in:
@@ -245,19 +245,19 @@ bool CUpnpBrowserGui::discoverDevices()
|
|||||||
if (!m_devices.empty())
|
if (!m_devices.empty())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
CHintBox *scanBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_UPNPBROWSER_SCANNING)); // UTF-8
|
CHintBox hintbox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_UPNPBROWSER_SCANNING)); // UTF-8
|
||||||
scanBox->paint();
|
hintbox.paint();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
|
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
|
||||||
}
|
}
|
||||||
catch (std::runtime_error error)
|
catch (std::runtime_error error)
|
||||||
{
|
{
|
||||||
delete scanBox;
|
hintbox.hide();
|
||||||
DisplayErrorMessage(error.what());
|
DisplayErrorMessage(error.what());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
delete scanBox;
|
hintbox.hide();
|
||||||
if (m_devices.empty())
|
if (m_devices.empty())
|
||||||
{
|
{
|
||||||
DisplayInfoMessage(g_Locale->getText(LOCALE_UPNPBROWSER_NOSERVERS));
|
DisplayInfoMessage(g_Locale->getText(LOCALE_UPNPBROWSER_NOSERVERS));
|
||||||
|
Reference in New Issue
Block a user