Skip to content

Commit bfb59a9

Browse files
committed
update_ini: proposal for message box
1 parent 24251e2 commit bfb59a9

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

src/emc/ini/update_ini.py

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,32 @@ def find_section(section, inistring):
108108

109109
# Show start message with abort option
110110
if dialogs:
111-
ret = ''
112-
if version == "1.0":
113-
ret = messagebox._show("Confirm automatic update",
114-
"This version of LinuxCNC separates the concepts of Axes and "
115-
"Joints which necessitates changes to the INI and HAL files. "
116-
"The changes required are described here:\n"
117-
"http://linuxcnc.org/docs/2.9/html/ in the section "
118-
"'Getting Started with LinuxCNC' -> 'Updating LinuxCNC'\n"
119-
"The [EMC]VERSION data in your INI file indicates that your "
120-
"configuration requires update.\n"
121-
"A script exists that can attempt to automatically "
122-
"reconfigure your configuration files.\nPress 'Yes' to perform "
123-
"the conversion, 'No' to continue with the current configuration "
124-
"files or 'Cancel' to exit LinuxCNC.\n"
125-
"The process can not be automatically reversed, though a "
126-
"backup version of your entire existing config will be created.",
127-
messagebox.QUESTION, messagebox.YESNOCANCEL)
111+
message = ""
112+
if version == "1.0" or version == "$Revision$":
113+
message += "This version of LinuxCNC separates the concepts of Axes and "\
114+
"Joints which necessitates changes to the INI and HAL files."\
115+
"The changes required are described here:\n"\
116+
"http://linuxcnc.org/docs/2.9/html/ in the section "\
117+
"'Getting Started with LinuxCNC' -> 'Updating LinuxCNC'\n\n"
118+
119+
if version < "1.2":
120+
message += "This version of LinuxCNC supports multiple spindles "\
121+
"which necessitates changes to the INI files."\
122+
"The changes required are described here:\n"\
123+
"http://linuxcnc.org/docs/2.10/html/ in the section "\
124+
"'Getting Started with LinuxCNC' -> 'Updating LinuxCNC'\n\n"
125+
126+
message += "The [EMC]VERSION data in your INI file indicates that your "\
127+
"configuration requires update.\n"\
128+
"A script exists that can attempt to automatically "\
129+
"reconfigure your configuration files.\nPress 'Yes' to perform "\
130+
"the conversion, 'No' to continue with the current configuration "\
131+
"files or 'Cancel' to exit LinuxCNC.\n"\
132+
"The process can not be automatically reversed, though a "\
133+
"backup version of your entire existing config will be created."
134+
135+
ret = messagebox._show("Confirm automatic update", message,
136+
messagebox.QUESTION, messagebox.YESNOCANCEL)
128137
if ret == 'cancel': exit(42)
129138
elif ret == 'no': exit(0)
130139

0 commit comments

Comments
 (0)