Use theme icons here rather than stock icons.
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-wi.cpp
index b8f2c547ed9439b0ae629441007ede124affbf5d..b6326e280350dd1c42ad5f1cd0da447968769cc0 100644 (file)
@@ -63,10 +63,12 @@ DhcpcdWi::~DhcpcdWi()
                menu = NULL;
        }
 
-       dhcpcd_wi_scans_free(scans);
-
-       if (notifier)
+       if (notifier) {
                delete notifier;
+               notifier = NULL;
+       }
+
+       dhcpcd_wi_scans_free(scans);
 }
 
 DHCPCD_WPA *DhcpcdWi::getWpa()
@@ -158,10 +160,12 @@ void DhcpcdWi::createMenu(QMenu *menu)
 QMenu *DhcpcdWi::createIfMenu(QMenu *parent)
 {
        DHCPCD_IF *ifp;
+       QIcon icon;
 
        ifp = dhcpcd_wpa_if(wpa);
        menu = new DhcpcdIfMenu(ifp, parent);
-       menu->setIcon(QIcon::fromTheme("network-wireless"));
+       icon = DhcpcdQt::getIcon("devices", "network-wireless");
+       menu->setIcon(icon);
        createMenu1(menu);
        return menu;
 }