ad max 12-character message, no character message and special_characters message for entry label

This commit is contained in:
Désiré Werner Menrath 2024-09-25 20:26:08 +02:00
parent 8cd5fc28e4
commit 392b6c94b5
2 changed files with 33 additions and 33 deletions

View File

@ -4,9 +4,8 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="fix scrollbar view with set self.y_height = 330 to self.y_height = 340"> <list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="in msg_window two further parameters to be added to the pass, so height and wide can also be specified.&#10;In rename, messages come now if new names do not fit&#10;Fix Index Error on msg_window()">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <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" /> <change beforePath="$PROJECT_DIR$/wg_main.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_main.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -41,23 +40,23 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;, "ASKED_ADD_EXTERNAL_FILES": "true",
&quot;Python.INSTALL.executor&quot;: &quot;Run&quot;, "Python.INSTALL.executor": "Run",
&quot;Python.install.executor&quot;: &quot;Run&quot;, "Python.install.executor": "Run",
&quot;Python.main.executor&quot;: &quot;Run&quot;, "Python.main.executor": "Run",
&quot;Python.messagebox.executor&quot;: &quot;Run&quot;, "Python.messagebox.executor": "Run",
&quot;Python.start_wg.executor&quot;: &quot;Run&quot;, "Python.start_wg.executor": "Run",
&quot;Python.wg_func.executor&quot;: &quot;Run&quot;, "Python.wg_func.executor": "Run",
&quot;Python.wg_main.executor&quot;: &quot;Run&quot;, "Python.wg_main.executor": "Run",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;Shell Script.install.executor&quot;: &quot;Run&quot;, "Shell Script.install.executor": "Run",
&quot;git-widget-placeholder&quot;: &quot;main&quot;, "git-widget-placeholder": "main",
&quot;last_opened_file_path&quot;: &quot;/home/punix/Pyapps/wire-py&quot;, "last_opened_file_path": "/home/punix/Pyapps/wire-py",
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.fileTypes&quot; "settings.editor.selected.configurable": "preferences.lookFeel"
} }
}</component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" /> <recent name="$PROJECT_DIR$" />
@ -134,14 +133,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1723279982210</updated> <updated>1723279982210</updated>
</task> </task>
<task id="LOCAL-00001" summary="Tunnel Start and Stop Work">
<option name="closed" value="true" />
<created>1723666001005</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1723666001005</updated>
</task>
<task id="LOCAL-00002" summary="Tunnel Start and Stop Work"> <task id="LOCAL-00002" summary="Tunnel Start and Stop Work">
<option name="closed" value="true" /> <option name="closed" value="true" />
<created>1723666477079</created> <created>1723666477079</created>
@ -526,7 +517,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1727028915701</updated> <updated>1727028915701</updated>
</task> </task>
<option name="localTasksCounter" value="50" /> <task id="LOCAL-00050" summary="in msg_window two further parameters to be added to the pass, so height and wide can also be specified.&#10;In rename, messages come now if new names do not fit&#10;Fix Index Error on msg_window()">
<option name="closed" value="true" />
<created>1727118598759</created>
<option name="number" value="00050" />
<option name="presentableId" value="LOCAL-00050" />
<option name="project" value="LOCAL" />
<updated>1727118598760</updated>
</task>
<option name="localTasksCounter" value="51" />
<servers /> <servers />
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">
@ -567,7 +566,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<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" />
<MESSAGE value="add Frame widget 3&#10;for Buttons and Listbox with Scrollbar.&#10;all Widgets new format&#10;delete works now of disable checkbox when Listbox empty (part two)" /> <MESSAGE value="add Frame widget 3&#10;for Buttons and Listbox with Scrollbar.&#10;all Widgets new format&#10;delete works now of disable checkbox when Listbox empty (part two)" />
<MESSAGE value="little fixes" /> <MESSAGE value="little fixes" />
<MESSAGE value="little fixes replace os.system with check_call&#10;first steps in install Script add wg_start.service file" /> <MESSAGE value="little fixes replace os.system with check_call&#10;first steps in install Script add wg_start.service file" />
@ -592,7 +590,8 @@
<MESSAGE value="Descriptions added in wg_func-py" /> <MESSAGE value="Descriptions added in wg_func-py" />
<MESSAGE value="If tunnel is renamed and this is in the car start,&#10;is now renamed the label" /> <MESSAGE value="If tunnel is renamed and this is in the car start,&#10;is now renamed the label" />
<MESSAGE value="fix scrollbar view with set self.y_height = 330 to self.y_height = 340" /> <MESSAGE value="fix scrollbar view with set self.y_height = 330 to self.y_height = 340" />
<option name="LAST_COMMIT_MESSAGE" value="fix scrollbar view with set self.y_height = 330 to self.y_height = 340" /> <MESSAGE value="in msg_window two further parameters to be added to the pass, so height and wide can also be specified.&#10;In rename, messages come now if new names do not fit&#10;Fix Index Error on msg_window()" />
<option name="LAST_COMMIT_MESSAGE" value="in msg_window two further parameters to be added to the pass, so height and wide can also be specified.&#10;In rename, messages come now if new names do not fit&#10;Fix Index Error on msg_window()" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>

View File

@ -215,6 +215,7 @@ class FrameWidgets(ttk.Frame):
self.lb_rename.config(state='disable') self.lb_rename.config(state='disable')
def tl_rename(): def tl_rename():
special_characters = ['\\', '/', '{', '}', ' ']
if len(self.lb_rename.get()) > 12: if len(self.lb_rename.get()) > 12:
"""img_w, img_i, w_title, w_txt hand over""" """img_w, img_i, w_title, w_txt hand over"""
@ -236,14 +237,14 @@ class FrameWidgets(ttk.Frame):
y = 140 # height y = 140 # height
msg_window(iw, ii, wt, msg_t, x, y) msg_window(iw, ii, wt, msg_t, x, y)
elif ' ' in self.lb_rename.get(): elif any(ch in special_characters for ch in self.lb_rename.get()):
"""img_w, img_i, w_title, w_txt x, y hand over""" """img_w, img_i, w_title, w_txt x, y hand over"""
iw = r'/usr/share/icons/wp-icons/64/info.png' iw = r'/usr/share/icons/wp-icons/64/info.png'
ii = r'/usr/share/icons/wp-icons/48/wg_msg.png' ii = r'/usr/share/icons/wp-icons/48/wg_msg.png'
wt = 'Renaming not possible' wt = 'Renaming not possible'
msg_t = 'Please do not use blanks.' msg_t = 'No valid sign. These must not be used.\nBlank, Slash, Backslash and { }'
x = 280 # width x = 370 # width
y = 140 # height y = 130 # height
msg_window(iw, ii, wt, msg_t, x, y) msg_window(iw, ii, wt, msg_t, x, y)
else: else:
try: try: