- User Interfaces
- Other User Interfaces
- PathPilot
- Remapping the file path for the Home button in Pathpilot
Remapping the file path for the Home button in Pathpilot
- tormachstorm
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
20 Oct 2021 16:33 #223683
by tormachstorm
I have only just been introduced to the whole Linux Pathpilot thing so I can't say that I know where to look when it comes to remapping buttons in the UI. I have searched around the files on the Linux machine trying to familiarize myself with how the files are setup. I have even messed around in the .glade file found in \python\images\tormach_mil_ui.glade but it doesn't seem to have the Home button in the editor. I'm to find a way to modify the PathPilot UI in a way so that the home button under the file tab is remapped to take you to a specific folder rather than the main root folder if that makes sense.
Please Log in or Create an account to join the conversation.
20 Oct 2021 23:14 #223719
by sharmstr
Replied by sharmstr on topic Remapping the file path for the Home button in Pathpilot
If I remember correctly, mappings are in the python files. The first place I'd look is tormach_file_util.py. Its been over a year since I've played with it, but I think I'm right.
Please Log in or Create an account to join the conversation.
- tormachstorm
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
25 Oct 2021 12:04 #224250
by tormachstorm
Replied by tormachstorm on topic Remapping the file path for the Home button in Pathpilot
Thanks for responding I'm glad to know that "Tormach_file_util.py" is probably the correct area to look seeing that word find sees many mentions of the home button in the file "Tormach_file_util.py". even so I can't seem to understand how you change the button mapping so that the home button takes you to a specific folder of your choosing rather than the default folder "gcode".
I feel like this line is what needs to be changed DEFAULT_RESTRICTED_DIR = os.path.join(os.getenv('HOME'), 'gcode') and change it to DEFAULT_RESTRICTED_DIR = os.path.join(os.getenv('HOME'), 'untitled folder') ("untitled folder" is the folder is a generic name we will use it for explanation purposes) would I be correct? if so I have changed this and saved the file after the changes were made but when I tried this in Pathpilot the home button seemed to be still mapped the default 'gcode' file.
I feel like this line is what needs to be changed DEFAULT_RESTRICTED_DIR = os.path.join(os.getenv('HOME'), 'gcode') and change it to DEFAULT_RESTRICTED_DIR = os.path.join(os.getenv('HOME'), 'untitled folder') ("untitled folder" is the folder is a generic name we will use it for explanation purposes) would I be correct? if so I have changed this and saved the file after the changes were made but when I tried this in Pathpilot the home button seemed to be still mapped the default 'gcode' file.
Please Log in or Create an account to join the conversation.
25 Oct 2021 16:17 - 25 Oct 2021 16:18 #224278
by sharmstr
Replied by sharmstr on topic Remapping the file path for the Home button in Pathpilot
Check out ui_common.py.
restricted_dir is set there. Changing this will make the home button go there. However, it will also become your default folder. This might cause other issues since pp is so reliant on that gcode folder. You probably want to make your own routines instead.
There's also constants.py with has GCODE_BASE_PATH. Same issues with above though.
restricted_dir is set there. Changing this will make the home button go there. However, it will also become your default folder. This might cause other issues since pp is so reliant on that gcode folder. You probably want to make your own routines instead.
There's also constants.py with has GCODE_BASE_PATH. Same issues with above though.
Last edit: 25 Oct 2021 16:18 by sharmstr.
Please Log in or Create an account to join the conversation.
25 Oct 2021 16:42 - 25 Oct 2021 16:43 #224282
by sharmstr
Replied by sharmstr on topic Remapping the file path for the Home button in Pathpilot
Ignore the above.
Just change the on_home_button_release function in tormach_file_util.py.
example
self.set_current_directory(os.path.join(os.getenv('HOME')) + os.path.sep + 'gcode/untitled folder')
Just change the on_home_button_release function in tormach_file_util.py.
example
self.set_current_directory(os.path.join(os.getenv('HOME')) + os.path.sep + 'gcode/untitled folder')
Last edit: 25 Oct 2021 16:43 by sharmstr.
Please Log in or Create an account to join the conversation.
- tormachstorm
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
26 Oct 2021 17:22 #224406
by tormachstorm
Replied by tormachstorm on topic Remapping the file path for the Home button in Pathpilot
That seems to work, thanks a lot!
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
- User Interfaces
- Other User Interfaces
- PathPilot
- Remapping the file path for the Home button in Pathpilot
Time to create page: 0.090 seconds