netfs_setup: simplify hintbox calls

Origin commit data
------------------
Commit: a6b82ac29c
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-11-21 (Mon, 21 Nov 2016)

Origin message was:
------------------
- netfs_setup: simplify hintbox calls
This commit is contained in:
vanhofen
2016-11-21 00:21:50 +01:00
parent 3ffdc99253
commit f8a7ef9f92

View File

@@ -439,8 +439,8 @@ int CNETFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey )
perror("autofs failed");
//FIXME please wait ...
CHintBox * hintBox = new CHintBox(LOCALE_NETFS_AUTOMOUNT_HEAD,g_Locale->getText(LOCALE_AUDIOPLAYER_RECEIVING_LIST));
hintBox->paint();
CHintBox hintBox(LOCALE_NETFS_AUTOMOUNT_HEAD,g_Locale->getText(LOCALE_AUDIOPLAYER_RECEIVING_LIST));
hintBox.paint();
sleep(3); //give automounter a few seconds
for(int i=0 ; i < NETFS_NR_OF_ENTRIES ; i++)
@@ -460,8 +460,7 @@ int CNETFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey )
mountMenuEntry[i]->iconName = NEUTRINO_ICON_NOT_MOUNTED;
}
}
hintBox->hide();
delete hintBox;
hintBox.hide();
}
returnval = menu_return::RETURN_REPAINT;
}
@@ -511,8 +510,8 @@ int CNETFSMountGui::menu(int mt)
mountMenuW.addItem(GenericMenuSeparatorLine);
//FIXME please wait ...
CHintBox * hintBox = new CHintBox(LOCALE_NETFS_AUTOMOUNT_HEAD,g_Locale->getText(LOCALE_AUDIOPLAYER_RECEIVING_LIST));
hintBox->paint();
CHintBox hintBox(LOCALE_NETFS_AUTOMOUNT_HEAD,g_Locale->getText(LOCALE_AUDIOPLAYER_RECEIVING_LIST));
hintBox.paint();
for(int i=0 ; i < NETFS_NR_OF_ENTRIES ; i++)
{
@@ -542,8 +541,7 @@ int CNETFSMountGui::menu(int mt)
}
mountMenuW.addItem(mountMenuEntry[i]);
}
hintBox->hide();
delete hintBox;
hintBox.hide();
int ret=mountMenuW.exec(this,"");
return ret;