Gscreen - a GTK / Glade / Python based screen

More
11 years 1 month ago #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 to join the conversation.

More
8 years 11 months ago #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

Attachment not found


and I've added the following lines in the handler
Code:
# 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
Code:
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
Code:
connect_signals sub

till now every thing looks fine BUT, when I'm trying to add an external tab in the ini
Code:
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

Attachment not found



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

Please Log in to join the conversation.

More
8 years 11 months ago #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 to join the conversation.

More
8 years 11 months ago #102286 by Big_Mas74
Here is my edited handler file
appreciate your help
Masoun

Please Log in to join the conversation.

More
8 years 11 months ago #102287 by cmorley
need your glade file too

Please Log in to join the conversation.

More
8 years 11 months ago #102288 by Big_Mas74
added the glade to the previous post

Please Log in to join the conversation.

More
8 years 11 months ago #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 :
Code:
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:
Code:
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

Please Log in to join the conversation.

More
8 years 11 months ago #102329 by Big_Mas74
Perfect worked like a charm B)

Masoun

Please Log in to join the conversation.

More
8 years 11 months ago #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

Please Log in to join the conversation.

More
8 years 10 months ago #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

Attachment not found


file opened within linuxcnc, while here:

Attachment not found


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

Please Log in to join the conversation.

Time to create page: 0.159 seconds
Powered by Kunena Forum