Gscreen - a GTK / Glade / Python based screen

More
10 Mar 2013 22:14 #31177 by newbynobi
Hallo Chris,

while testing around, I found that you use as default theme "Redmond"
Could you change the default to "Follow System Theme"?

When the user sets a own path to preference file in the INI , like so

PFREFERENCE_FILE_PATH = ~/./gmoccapy_preferences

The File will be filed from gscreen with default values.

In my case resulting in problems, because you set the dro colors with standard values, so I get red numbers on a red background.
I found a solution, but I would apreciate, if you could set the standard colors to black.

I.e. If I say in gmoccapy:
self.data.theme_name = self.gscreen.pref.getpref('gtk-theme', 'Follow System Theme', str)

I get "Redmond" as result if the preference file does not exist jet. That happen after the first start if you set a new path in the INI File.
I could not understand, why I didn't get the default values I set in the code.

Norbert

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

More
11 Mar 2013 07:59 #31197 by cmorley

Hallo Chris,

why do you get the units for self.data.dro_units only from the preference file?
I think you should get the units from the INI File like so:
self.data.dro_units = self.inifile.find("TRAJ","LINEAR_UNITS")
if self.data.dro_units == "inch"
	self.widgets.toglebutton_units.set_active(True)

Users are always forced to enter units in the INI File, why again in the settings?

Norbert


I think you are confusing machine units and displayed units.

The ini [TRAJ} defines the machine (native) units.
The preference file defines the displayed units.

and in Gscreen there are two ways to select displayed units.
On the preference page the button set the starting unit type (inch or mm)
On the main page there is a units button that allows a user to change the units without saving it to the preference file.

for example :
My machine is mostly metric so I define the machine in metric units.
I work in inches, so I set the starting units to inch (preference file)
If I have a metric job, I can switch the display to metric (main screen) if that's easier for me.
but if I restart Gscreen it will be in inch again.

A user is free to change the displayed units as they see fit and at any time.

Chris M

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

More
11 Mar 2013 11:04 #31202 by cmorley

Hallo Chris,

while testing around, I found that you use as default theme "Redmond"
Could you change the default to "Follow System Theme"?

When the user sets a own path to preference file in the INI , like so

PFREFERENCE_FILE_PATH = ~/./gmoccapy_preferences

The File will be filed from gscreen with default values.

In my case resulting in problems, because you set the dro colors with standard values, so I get red numbers on a red background.
I found a solution, but I would apreciate, if you could set the standard colors to black.

I.e. If I say in gmoccapy:
self.data.theme_name = self.gscreen.pref.getpref('gtk-theme', 'Follow System Theme', str)

I get "Redmond" as result if the preference file does not exist jet. That happen after the first start if you set a new path in the INI File.
I could not understand, why I didn't get the default values I set in the code.

Norbert


I use Redmond as a default because in Ubuntu 10.04 the default buttons are very difficult to see the difference between on and off.
Redmond seems to be readily available in the distributions we use and looks a bit more 'industrial'.
I am not apt to switch the default theme....BUT...

I can probably set it up so you can over riding the preference file references (so also the defaults) just like initialize widgets and signals etc...
Give me a little bit to try this ....

Chris M

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

More
11 Mar 2013 12:57 - 11 Mar 2013 12:57 #31204 by cmorley
Norbert:
next time you merge gscreen, try adding this to your handler file:
    def initialize_preferences(self):
        self.data.theme_name = 'Follow System Theme'
        self.gscreen.init_dro_pref()
        #self.gscreen.init_theme_pref()
        self.gscreen.init_window_geometry_pref()
        self.gscreen.init_general_pref()

Chris M
Last edit: 11 Mar 2013 12:57 by cmorley.

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

More
11 Mar 2013 16:36 #31208 by newbynobi

I think you are confusing machine units and displayed units.

The ini [TRAJ} defines the machine (native) units.
The preference file defines the displayed units.

and in Gscreen there are two ways to select displayed units.
On the preference page the button set the starting unit type (inch or mm)
On the main page there is a units button that allows a user to change the units without saving it to the preference file.

for example :
My machine is mostly metric so I define the machine in metric units.
I work in inches, so I set the starting units to inch (preference file)
If I have a metric job, I can switch the display to metric (main screen) if that's easier for me.
but if I restart Gscreen it will be in inch again.

A user is free to change the displayed units as they see fit and at any time.

Chris M


That is exactly what I understand, but IMHO after a restart of the GUI it should display the DRO in machine units. For most people switching between units is not necesary.

Norbert

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

More
11 Mar 2013 16:38 #31209 by newbynobi

Norbert:
next time you merge gscreen, try adding this to your handler file:

def initialize_preferences(self):
self.data.theme_name = 'Follow System Theme'
self.gscreen.init_dro_pref()
#self.gscreen.init_theme_pref()
self.gscreen.init_window_geometry_pref()
self.gscreen.init_general_pref()


Chris M


Will do this.

Norbert

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

More
12 Mar 2013 00:02 #31241 by tjamscad
Chris,

Can you resize the buttons on indrustrail. I think you could get another button on the side if you fix the sizing of the large buttons.
Attachments:

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

More
13 Mar 2013 22:24 #31335 by tjamscad
Where did the rest of this thread go? I only see 60 pages and the first page is no longer the first page?

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

More
13 Mar 2013 22:31 #31336 by andypugh

I only see 60 pages


But more posts per page?

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

More
14 Mar 2013 03:12 #31364 by tjamscad
Perhaps, but where did the first half of this thread go?

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

Time to create page: 0.754 seconds
Powered by Kunena Forum