diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index 9e76f4969..a699ec95d 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -46,7 +46,6 @@ #include #include -#include #include #include @@ -363,7 +362,8 @@ int CNetworkSetup::showNetworkSetup() mf = new CMenuForwarder(LOCALE_NETWORKMENU_MOUNT, true, NULL, &networkmounts, NULL, CRCInput::RC_blue); mf->setHint("", LOCALE_MENU_HINT_NET_MOUNT); networkSettings->addItem(mf); - showNetworkNFSMounts(&networkmounts); + CNETFSMountGui *netfsMountGui = new CNETFSMountGui(); + showNetworkNFSMounts(&networkmounts,netfsMountGui); #endif //proxyserver submenu @@ -389,6 +389,7 @@ int CNetworkSetup::showNetworkSetup() dhcpDisable.Clear(); wlanEnable.Clear(); + delete netfsMountGui; delete networkSettings; delete sectionsdConfigNotifier; return ret; @@ -419,7 +420,7 @@ void CNetworkSetup::showNetworkNTPSetup(CMenuWidget *menu_ntp) } #ifdef ENABLE_GUI_MOUNT -void CNetworkSetup::showNetworkNFSMounts(CMenuWidget *menu_nfs) +void CNetworkSetup::showNetworkNFSMounts(CMenuWidget *menu_nfs,CNETFSMountGui *netfsMountGui) { menu_nfs->addIntroItems(LOCALE_NETWORKMENU_MOUNT); CMenuForwarder * mf = new CMenuDForwarder(LOCALE_NFS_MOUNT , true, NULL, new CNFSMountGui(), NULL, CRCInput::RC_red); @@ -431,7 +432,6 @@ void CNetworkSetup::showNetworkNFSMounts(CMenuWidget *menu_nfs) menu_nfs->addItem(GenericMenuSeparatorLine); - CNETFSMountGui *netfsMountGui = new CNETFSMountGui(); const char *used_fstab = netfsMountGui->fstabPath.c_str(); const char *used_autonet = netfsMountGui->autoPath.c_str(); diff --git a/src/gui/network_setup.h b/src/gui/network_setup.h index 31b626b80..eb43205cc 100644 --- a/src/gui/network_setup.h +++ b/src/gui/network_setup.h @@ -35,6 +35,7 @@ #include #include +#include #include @@ -84,7 +85,7 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver void backupNetworkSettings(); int showNetworkSetup(); void showNetworkNTPSetup(CMenuWidget *menu_ntp); - void showNetworkNFSMounts(CMenuWidget *menu_nfs); + void showNetworkNFSMounts(CMenuWidget *menu_nfs,CNETFSMountGui *netfsMountGui); int saveChangesDialog(); void applyNetworkSettings(); void saveNetworkSettings();