Sécurity MAJ

This commit is contained in:
2025-04-02 10:17:53 +02:00
parent b3eeb2d60c
commit 8e84d39165
31 changed files with 554 additions and 717 deletions
+12 -1
View File
@@ -12,13 +12,15 @@ import qgis
#include <QSettings>
import socket
import os
from .tools.resources import (
plugin_path,
pyperclip,
resources_path,
maj_verif,
)
pyperclip()
from .flux_editor import Flux_Editor
from .about_form import AboutDialog
@@ -63,9 +65,18 @@ class PgFlux:
if not self.action_editor:
self.action_editor = Flux_Editor()
self.flux_editor = QAction(icon, 'SigCEN',None)
self.toolBar.addAction(self.flux_editor)
self.flux_editor.triggered.connect(self.open_editor)
self.flux_editor.setEnabled(False)
IPAddr=socket.gethostbyname(socket.gethostname())
if IPAddr[0:11] == "100.100.100":
self.flux_editor.setEnabled(True)
elif IPAddr[0:9] == "192.168.0":
self.flux_editor.setEnabled(True)
elif IPAddr[0:9] == "192.168.1":
self.flux_editor.setEnabled(True)
def open_about_dialog(self):
"""