How to put a password on the exit button

More
02 Aug 2024 16:12 - 02 Aug 2024 16:14 #306759 by Moutomation
  I am making Gmoccapy full screen, but I do not want the user to close the cnc screen without entering a password. should not be able to access anything other than the CNC screen without entering the password. How can I put a password on the exit button? It will be like a settings page and I should be able to set the password.
How do I check the g code renewal key from Classicladder? 
Attachments:
Last edit: 02 Aug 2024 16:14 by Moutomation.

Please Log in or Create an account to join the conversation.

More
02 Aug 2024 18:20 #306775 by Aciera

How can I put a password on the exit button?

You would have to modify the gmoccapy source code for this.

How do I check the g code renewal key from Classicladder?

you can't as there is no hal pin or state tag that reflects the reload action. You would need to handle this in the GUI source code.
The following user(s) said Thank You: zz912, Moutomation

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 04:04 #306828 by Moutomation
If there is someone who can do this for a fee, I am ready to pay. I think there is someone who can do this, because the people who make this program probably won't have much difficulty in putting a password on the exit.

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 18:58 #306873 by zz912
Can you compile LCNC yourself from source codes? You have to master it so that when someone helps you, you can use it.

This is first step:
linuxcnc.org/docs/stable/html/code/building-linuxcnc.html
The following user(s) said Thank You: Moutomation

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 19:22 #306874 by Moutomation
Thanks a lot

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 22:08 #306885 by rodw
IN the gmocappy source there is a screen handler written in Python. There is also a glade screen definition, You probably just need to modify the handler for the exit button or even better move it to the already password protected area. Sorry its been 7 or 8 years since I modified gmocappy
The following user(s) said Thank You: Moutomation

Please Log in or Create an account to join the conversation.

More
04 Aug 2024 05:55 - 04 Aug 2024 05:59 #306901 by Moutomation
I don't have to use gmoccapy, the reason I use gmoccapy is because it automatically reads the g-code file when it first starts and has a file refresh button. I can use another graphical user interface. I have a file whose name doesn't change, for example CutDocument.ngc, but its content does.
I don't want the operator to select the g code file every time. Because the g code file is sent to linuxcnc over the network without changing its name.
Last edit: 04 Aug 2024 05:59 by Moutomation.

Please Log in or Create an account to join the conversation.

More
05 Aug 2024 07:16 #306970 by Aciera
Try this:

modify these line in '/bin/gmoccapy':

 

To this:
    # If button exit is clicked, press emergency button before closing the application
    def on_btn_exit_clicked(self, widget, data=None):
        # if 'Use unlock code' option is activated on the settings/hardware tab we ask for the code using the system.dialog
        if self.widgets.rbt_use_unlock.get_active():
            if self.dialogs.system_dialog(self):
                self.widgets.window1.destroy()
        else:
            self.widgets.window1.destroy()

Note, standard unlock code is "123", which is displayed in the tool tip text when the mouse hovers over the settings button so you might want to change it to something else. To do that open the .pref file in the machine config folder and find the line 'unlock_code':
 

 
Attachments:
The following user(s) said Thank You: Moutomation

Please Log in or Create an account to join the conversation.

More
05 Aug 2024 16:46 #307013 by Moutomation
Thanks a lot, I will try

Please Log in or Create an account to join the conversation.

More
06 Aug 2024 04:15 #307055 by Moutomation
I tried it and it was exactly what I wanted. Thanks a lot

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.139 seconds
Powered by Kunena Forum