diff options
-rw-r--r-- | src/helpers.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/helpers.py b/src/helpers.py index 7023011..8717bef 100644 --- a/src/helpers.py +++ b/src/helpers.py @@ -8,6 +8,7 @@ from PyQt6.QtCore import Qt, QObject, pyqtSlot, QAbstractListModel, QModelIndex, from PyQt6.QtNetwork import QNetworkInformation from PyQt6.QtWidgets import QStyledItemDelegate,QLabel from xdg.DesktopEntry import DesktopEntry +import netifaces translate = QCoreApplication.translate @@ -69,23 +70,7 @@ class Autostart(): self.desktop_file_system = "/etc/xdg/autostart/mageiawelcome.desktop" # self.conffile = self.home + "/.config/mageiawelcome/norun.flag" - # @pyqtSlot(bool) - # def setRunAtLaunch(self, checked): - # print("Setting", checked) - # if checked: - # if os.path.exists(self.conffile): - # os.remove(self.conffile) - # else: - # os.makedirs(self.home + "/.config/mageiawelcome", exist_ok=True) - # with open(self.conffile, "w"): - # pass - # - # @pyqtSlot(result=bool) - # def startupcheck(self): - # return not os.path.exists(self.conffile) - def disable(self): - print("Désactive") if os.path.exists(self.desktop_file): desktop = DesktopEntry(self.desktop_file) else: @@ -98,7 +83,6 @@ class Autostart(): def enable(self): # desktop in autostart is already installed in /etc we remove the local one to avoid to hide system one - print("Active") if os.path.exists(self.desktop_file): os.remove(self.desktop_file) @@ -125,7 +109,7 @@ class NetworkState(QObject): return self.net.reachability() def availableBackends(self): - return self.net.availableBackends() + return netifaces.interfaces() class ConfList(): |