Gscreen - a GTK / Glade / Python based screen

More
29 Sep 2015 07:51 #63172 by csbrady
The default version has a lot more buttons, but it needs to. If you want broad appeal you have to include more stuff.
What may be better for the masses is an easier way to customize what buttons you want. Not everyone can do the customization as is.

I am calling the screen interact right now since it is for my machine Maybe Spartan would be a good fit.

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

More
23 Nov 2017 12:32 #102257 by Big_Mas74
HI Chris,
I have a question , I'm trying to add and extra page to the mode buttons in gscreen industrial "Custom" so I've added extra a new page to "notebook_main"
also a Custom_button

and I've added the following lines in the handler
# Display the Custom tab
    def on_Custom_button_clicked(self,widget):
        self.widgets.notebook_main.set_current_page(5)
        self.toggle_modes(widget)
also I've add "Custom_button"to to toggle mode list
def toggle_modes(self,widget):
        temp = "setup_button","mdi_button","run_button","tooledit_button","system_button","offsetpage_button","Custom_button"
        for i in temp:
            state = False
            if self.widgets[i] == widget: state = True
            self.gscreen.block(i)
            self.widgets[i].set_active(state)
            self.gscreen.unblock(i)
also in
connect_signals sub

till now every thing looks fine BUT, when I'm trying to add an external tab in the ini
EMBED_TAB_NAME = Buttons
EMBED_TAB_LOCATION = notebook_main
EMBED_TAB_COMMAND = gladevcp -x {XID} -t Redmond Custom.ui
all the axis DRO's are shown


but if I change the location to "vcp_box"or other places I have the exact number of axis, where should I look for hiding all extra axis?

Thank you
best regards
Masoun
Attachments:

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

More
24 Nov 2017 00:12 #102281 by cmorley
Could you post your glade and handler files please.
I will look at the problem then.
It's been awhile since working on gscreen so not sure how quick it will be.

Chris M

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

More
24 Nov 2017 13:33 - 24 Nov 2017 13:37 #102286 by Big_Mas74
Here is my edited handler file
appreciate your help
Masoun
Attachments:
Last edit: 24 Nov 2017 13:37 by Big_Mas74.

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

More
24 Nov 2017 13:35 #102287 by cmorley
need your glade file too

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

More
24 Nov 2017 13:38 #102288 by Big_Mas74
added the glade to the previous post

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

More
25 Nov 2017 09:02 #102327 by cmorley
Ok the problem is industrial relies on the extra axes widgets being hidden by default. it then shows the one defined in the INI file.
But when you add a tab to that particular tab widget it resets those hidden widgets to now show.
So we must hide them again.

in the handler file ( under the def initialize_widgets(self): method) look for :
self.widgets["dro_%s1"%i].show()
            self.widgets["dro_%s2"%i].show()
            self.widgets["dro_%s3"%i].show()
            self.widgets["axis_%s"%i].show()
            self.widgets["home_%s"%i].show()

change it to:
for i in ('x','y','z','a','b','c','u','v','w'):
            if i in self.data.axis_list:
                self.widgets["dro_%s1"%i].show()
                self.widgets["dro_%s2"%i].show()
                self.widgets["dro_%s3"%i].show()
                self.widgets["axis_%s"%i].show()
                self.widgets["home_%s"%i].show()
            else:
                self.widgets["dro_%s1"%i].hide()
                self.widgets["dro_%s2"%i].hide()
                self.widgets["dro_%s3"%i].hide()
                self.widgets["axis_%s"%i].hide()
                self.widgets["home_%s"%i].hide()


Should fix the problem :)

Chris M
The following user(s) said Thank You: Big_Mas74

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

More
25 Nov 2017 09:35 #102329 by Big_Mas74
Perfect worked like a charm B)

Masoun

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

More
25 Nov 2017 11:19 #102332 by cmorley
Excellent.
And kudos for diving into Gscreen modifications!
I'm always happy when someone proves that I didn't waste my time on the project :)

Chris M
The following user(s) said Thank You: Big_Mas74

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

More
03 Dec 2017 10:03 #102611 by Big_Mas74
Hi Chris,
I have a question, regarding the EDITOR in ini file, currently there is no editor specified in it and the screen uses gedit by default ( I presume ), now the problem is the language syntax customisation in it looks deferent if I opened the same file from gedit directly, for example here how looks within linuxcnc

file opened within linuxcnc, while here:

how it looks when open by gedit externally

the gedit version is 3.4.1 and I've installed gcode.lang and/or ngc.lang language to it.

Is this screen limitation or can I do something?

Masoun
Attachments:

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

Time to create page: 0.274 seconds
Powered by Kunena Forum