If tunnel is renamed and this is in the car start,

is now renamed the label
This commit is contained in:
Désiré Werner Menrath 2024-09-22 20:12:31 +02:00
parent 9899395cf9
commit 63b9c7935b
2 changed files with 23 additions and 6 deletions

View File

@ -4,9 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="add con_to_dict in import for write PreSharedKey in .key File to warning if tunnel has already been imported and delete that the key is deleted again&#10;now works">
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="Descriptions added in wg_func-py">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/wg_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_func.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/wg_main.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_main.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -501,7 +501,15 @@
<option name="project" value="LOCAL" />
<updated>1727015078922</updated>
</task>
<option name="localTasksCounter" value="47" />
<task id="LOCAL-00047" summary="Descriptions added in wg_func-py">
<option name="closed" value="true" />
<created>1727018233930</created>
<option name="number" value="00047" />
<option name="presentableId" value="LOCAL-00047" />
<option name="project" value="LOCAL" />
<updated>1727018233930</updated>
</task>
<option name="localTasksCounter" value="48" />
<servers />
</component>
<component name="UnknownFeatures">
@ -542,7 +550,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="little fixes a &quot; &quot; to ' '" />
<MESSAGE value="add class FileHandle,&#10;add Label to show autoconnect Tunnel&#10;disable checkbox when Listbox is empty or no select Tunnel" />
<MESSAGE value="add if question and add autoconnect, autoconnect_var to class Filehandle in box_set no finish!" />
<MESSAGE value="fixes on empty Listbox now is disable and now works autoconnect label with read and write, delete works now with read and write" />
@ -567,7 +574,8 @@
<MESSAGE value="add rename Label rename works" />
<MESSAGE value="add con_to_dict in import for write PreSharedKey in .key File to warning if tunnel has already been imported and delete that the key is deleted again" />
<MESSAGE value="add con_to_dict in import for write PreSharedKey in .key File to warning if tunnel has already been imported and delete that the key is deleted again&#10;now works" />
<option name="LAST_COMMIT_MESSAGE" value="add con_to_dict in import for write PreSharedKey in .key File to warning if tunnel has already been imported and delete that the key is deleted again&#10;now works" />
<MESSAGE value="Descriptions added in wg_func-py" />
<option name="LAST_COMMIT_MESSAGE" value="Descriptions added in wg_func-py" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -219,11 +219,17 @@ class FrameWidgets(ttk.Frame):
self.l_box.delete(self.select_tunnel[0])
self.l_box.insert("end", self.lb_rename.get())
self.l_box.update()
new_a_connect = self.lb_rename.get()
self.lb_rename.delete(0, tk.END)
if self.a != '' and self.a == select_tl:
self.a = TunnelActiv.active()
self.StrVar.set(value=self.a)
if Path.is_file(Path('/etc/wire_py/wg_py')):
path_to_file = Path('/etc/wire_py') / 'wg_py'
a_con = Path.read_text(path_to_file)
if select_tl == a_con:
self.autoconnect_var.set(value=new_a_connect)
Path.write_text(path_to_file, new_a_connect)
return select_tl
except IndexError:
pass
@ -291,6 +297,9 @@ class FrameWidgets(ttk.Frame):
if __name__ == '__main__':
window = MainWindow()
"""
the hidden files are hidden in Filedialog
"""
try:
window.tk.call('tk_getOpenFile', '-foobarbaz')
except TclError: