Gscreen - a GTK / Glade / Python based screen
- csbrady
- Offline
- Senior Member
- 
				  
		Less
		More
		
			
	
		- Posts: 72
- Thank you received: 10
			
	
						29 Sep 2015 07:51				#63172
		by csbrady
	
	
		
			
	
			
			 		
													
	
				Replied by csbrady on topic Gscreen - a GTK / Glade / Python based screen			
			
				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.
					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.
- Big_Mas74
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 7
- Thank you received: 0
			
	
						23 Nov 2017 12:32				#102257
		by Big_Mas74
	
	
		
			
	
	
			
			 		
													
	
				Replied by Big_Mas74 on topic Gscreen - a GTK / Glade / Python based screen			
			
				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 handleralso I've add "Custom_button"to to toggle mode listalso in
till now every thing looks fine BUT, when I'm trying to add an external tab in the iniall 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
					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)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)connect_signals subtill 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.uibut 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 or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						24 Nov 2017 00:12				#102281
		by cmorley
	
	
		
			
	
			
			 		
													
	
				Replied by cmorley on topic Gscreen - a GTK / Glade / Python based screen			
			
				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
					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.
- Big_Mas74
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 7
- Thank you received: 0
			
	
						24 Nov 2017 13:33		 -  24 Nov 2017 13:37		#102286
		by Big_Mas74
	
	
		
			
	
	
	
			 		
													
	
				Replied by Big_Mas74 on topic Gscreen - a GTK / Glade / Python based screen			
			
				Here is my edited handler file
appreciate your help
Masoun
					appreciate your help
Masoun
		Last edit: 24 Nov 2017 13:37  by Big_Mas74.			
			Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						24 Nov 2017 13:35				#102287
		by cmorley
	
	
		
			
	
			
			 		
													
	
				Replied by cmorley on topic Gscreen - a GTK / Glade / Python based screen			
			
				need your glade file too			
					Please Log in or Create an account to join the conversation.
- Big_Mas74
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 7
- Thank you received: 0
			
	
						24 Nov 2017 13:38				#102288
		by Big_Mas74
	
	
		
			
	
			
			 		
													
	
				Replied by Big_Mas74 on topic Gscreen - a GTK / Glade / Python based screen			
			
				added the glade to the previous post			
					Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						25 Nov 2017 09:02				#102327
		by cmorley
	
	
		
			
	
	
			 		
													
	
				Replied by cmorley on topic Gscreen - a GTK / Glade / Python based screen			
			
				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 :
change it to:
Should fix the problem
Chris M
					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.
- Big_Mas74
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 7
- Thank you received: 0
			
	
						25 Nov 2017 09:35				#102329
		by Big_Mas74
	
	
		
			
	
			
			 		
													
	
				Replied by Big_Mas74 on topic Gscreen - a GTK / Glade / Python based screen			
			
				Perfect worked like a charm 
Masoun
					
Masoun
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
- 
				  
		Less
		More
		
			
	
		- Posts: 7230
- Thank you received: 2106
			
	
						25 Nov 2017 11:19				#102332
		by cmorley
	
	
		
			
	
	
			 		
													
	
				Replied by cmorley on topic Gscreen - a GTK / Glade / Python based screen			
			
				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
					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.
- Big_Mas74
- Offline
- New Member
- 
				  
		Less
		More
		
			
	
		- Posts: 7
- Thank you received: 0
			
	
						03 Dec 2017 10:03				#102611
		by Big_Mas74
	
	
		
			
	
	
			
			 		
													
	
				Replied by Big_Mas74 on topic Gscreen - a GTK / Glade / Python based screen			
			
				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
					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
Please Log in or Create an account to join the conversation.
		Time to create page: 0.434 seconds	
 
													 
	 
	 
	