Gscreen - a GTK / Glade / Python based screen

More
13 years 7 months ago #31169 by newbynobi

newbynobi wrote:
No, I tried this in normal gscreen. I noticed this while testing around with gmoccapy and I thought it was caused by myself. But testing it with gscreen results in the same behavior.

If I leave gscreen with a visible cursor, I am able to restart gscreen from the terminal without any problem, just when the cursor was hideen when closing gscreen, the server crashes.

How can I find out what hapens?

Norbert

I tried again with default Gscreen - no problems.
I don't know how to pin point closer.
can you try different computer?


I will do so, but it will need some time.

Norbert

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

More
13 years 7 months ago - 13 years 7 months ago #31171 by newbynobi
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:
Code:
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
Last edit: 13 years 7 months ago by newbynobi.

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

More
13 years 7 months ago #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:
Code:
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
13 years 7 months ago #31197 by cmorley

newbynobi wrote: 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:

Code:
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
13 years 7 months ago #31202 by cmorley

newbynobi wrote: 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:

Code:
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
13 years 7 months ago - 13 years 7 months ago #31204 by cmorley
Norbert:
next time you merge gscreen, try adding this to your handler file:
Code:
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: 13 years 7 months ago by cmorley.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum