İnstall glade

More
24 Aug 2024 09:29 #308523 by Moutomation
Replied by Moutomation on topic İnstall glade
wonderfull thanks a lot

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

More
25 Aug 2024 16:39 #308609 by Moutomation
Replied by Moutomation on topic İnstall glade
I tried but I couldn't do it. How can I run this code to save with ctrl+c?


By default, the reaction of GladeVCP to a Ctrl-C event is to just exit - without saving state. To make sure that this case is covered, add a handler call on_unix_signal which will be automatically be called on Ctrl-C (actually on the SIGINT and SIGTERM signals). Example:

def on_unix_signal(self,signum,stack_frame):
print("on_unix_signal(): signal %d received, saving state" % (signum))
self.ini.save_state(self)

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

More
25 Aug 2024 17:02 #308611 by Aciera
Replied by Aciera on topic İnstall glade
Why do you want this?
This is only if you wanted to catch a <ctrl>+c in the terminal it has no effect in gmoccapy.

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

More
25 Aug 2024 17:13 #308612 by Moutomation
Replied by Moutomation on topic İnstall glade
Sometimes people using the machine cut off the electricity by directly turning off the button of the machine. Automatic saving after values ​​change. Or can I add a separate save button?

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

More
25 Aug 2024 17:16 #308613 by Moutomation
Replied by Moutomation on topic İnstall glade
Can gmoccapy be closed first and then the computer shut down when a button is pressed on the machine? If such a thing is possible, data can be recorded in this way.

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

More
25 Aug 2024 17:21 #308614 by Aciera
Replied by Aciera on topic İnstall glade
There is nothing that will automatically save in case of a powercut, so you will have to do with a save button. Not sure about the shutdown procedure as that usually requires elevated privileges.

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

More
25 Aug 2024 17:24 #308615 by Moutomation
Replied by Moutomation on topic İnstall glade
I have no idea how to make the save button

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

More
25 Aug 2024 17:25 #308616 by Moutomation
Replied by Moutomation on topic İnstall glade
How should I follow to save when I press the save button?

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

More
25 Aug 2024 17:42 #308617 by Aciera
Replied by Aciera on topic İnstall glade
Open the panel in glade, insert a button, add 'on_destroy' to the 'released' signal (not sure about the exact signal name but it should be fairly obvious)

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

More
25 Aug 2024 17:51 #308619 by Moutomation
Replied by Moutomation on topic İnstall glade
This is great now. I'm using the test panel you sent. I can see the normal buttons in Hallshow. However, Toogle buttons are not visible in Hallshow. Can you teach me this too?

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

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