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" />
</component>
<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$/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" />
@ -41,23 +40,23 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
&quot;Python.INSTALL.executor&quot;: &quot;Run&quot;,
&quot;Python.install.executor&quot;: &quot;Run&quot;,
&quot;Python.main.executor&quot;: &quot;Run&quot;,
&quot;Python.messagebox.executor&quot;: &quot;Run&quot;,
&quot;Python.start_wg.executor&quot;: &quot;Run&quot;,
&quot;Python.wg_func.executor&quot;: &quot;Run&quot;,
&quot;Python.wg_main.executor&quot;: &quot;Run&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;Shell Script.install.executor&quot;: &quot;Run&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;last_opened_file_path&quot;: &quot;/home/punix/Pyapps/wire-py&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.fileTypes&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_ADD_EXTERNAL_FILES": "true",
"Python.INSTALL.executor": "Run",
"Python.install.executor": "Run",
"Python.main.executor": "Run",
"Python.messagebox.executor": "Run",
"Python.start_wg.executor": "Run",
"Python.wg_func.executor": "Run",
"Python.wg_main.executor": "Run",
"RunOnceActivity.ShowReadmeOnStart": "true",
"Shell Script.install.executor": "Run",
"git-widget-placeholder": "main",
"last_opened_file_path": "/home/punix/Pyapps/wire-py",
"settings.editor.selected.configurable": "preferences.lookFeel"
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
@ -134,14 +133,6 @@
<option name="presentableId" value="Default" />
<updated>1723279982210</updated>
</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">
<option name="closed" value="true" />
<created>1723666477079</created>
@ -526,7 +517,15 @@
<option name="project" value="LOCAL" />
<updated>1727028915701</updated>
</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 />
</component>
<component name="UnknownFeatures">
@ -567,7 +566,6 @@
</component>
<component name="VcsManagerConfiguration">
<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="little fixes" />
<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="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" />
<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 name="XDebuggerManager">
<breakpoint-manager>

View File

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