Template
forked from CEN-RA/Plugin_QGIS
Mise à jour de sécurité
This commit is contained in:
@@ -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 .copie_editor import Copie_Editor
|
||||
from .about_form import AboutDialog
|
||||
|
||||
@@ -66,6 +68,14 @@ class PgCopie:
|
||||
self.copie_editor = QAction(icon, 'Copie',None)
|
||||
self.toolBar.addAction(self.copie_editor)
|
||||
self.copie_editor.triggered.connect(self.open_editor)
|
||||
self.copie_editor.setEnabled(False)
|
||||
IPAddr=socket.gethostbyname(socket.gethostname())
|
||||
if IPAddr[0:11] == "100.100.100":
|
||||
self.copie_editor.setEnabled(True)
|
||||
elif IPAddr[0:9] == "192.168.0":
|
||||
self.copie_editor.setEnabled(True)
|
||||
elif IPAddr[0:9] == "192.168.1":
|
||||
self.copie_editor.setEnabled(True)
|
||||
|
||||
def open_about_dialog(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user