Skip to content

gscreen: assorted updates#2356

Merged
phillc54 merged 1 commit intoLinuxCNC:2.9from
phillc54:phillc54/gscreen
Mar 16, 2023
Merged

gscreen: assorted updates#2356
phillc54 merged 1 commit intoLinuxCNC:2.9from
phillc54:phillc54/gscreen

Conversation

@phillc54
Copy link
Copy Markdown
Collaborator

No description provided.

@phillc54 phillc54 requested a review from c-morley February 21, 2023 02:22
Comment thread src/emc/usr_intf/gscreen/gscreen.py Outdated
gi.require_version('Vte', '2.91')
from gi.repository import Vte as vte
except:
LOG.error("**** WARNING GSCREEN: could not import vte terminal - is package installed?")
Copy link
Copy Markdown
Collaborator

@c-morley c-morley Feb 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a warning only. Gscreen screens can run without Vte.
I would remove the ****** WARNING GSCREEN. (every where)

_AUDIO_AVAILABLE = True
print("**** GSCREEN INFO: audio available!")
except:
_AUDIO_AVAILABLE = False
Copy link
Copy Markdown
Collaborator

@c-morley c-morley Feb 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG.debug for audio available
log warning for missing library

Comment thread src/emc/usr_intf/gscreen/gscreen.py Outdated
active_iter = widget.get_active_iter()
if active_iter:
print("texst",widget.get_model()[active_iter][0])
# print("test",widget.get_model()[active_iter][0])
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably removable

Comment thread src/emc/usr_intf/gscreen/gscreen.py Outdated
global gscreen_debug
if not gscreen_debug: return
print(str)
print("**** GSCREEN DEBUG:", str)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using LOG is better then '**** GSCREEN DEBUG 'etc

@c-morley
Copy link
Copy Markdown
Collaborator

I put my 2 cents in but I think you already were thinking the same things.
That's a real good spring cleaning!

@phillc54
Copy link
Copy Markdown
Collaborator Author

I think it is almost good enough, the GUI is almost done as well as the CSS for the default theme.

@c-morley
Copy link
Copy Markdown
Collaborator

I just tried it out - that looks a lot more functional. I think it should go in 2.9 though.

@phillc54
Copy link
Copy Markdown
Collaborator Author

Oops, I thought that I had set it for 2.9, just another mistake :)
I will change it shortly.

@phillc54 phillc54 changed the base branch from master to 2.9 February 25, 2023 01:02
@phillc54
Copy link
Copy Markdown
Collaborator Author

I think this should be ok to go now.
I will take a break and come back later to add a bit of polish.

@phillc54
Copy link
Copy Markdown
Collaborator Author

I think that I may have broken something to do with exceptions.
I tried to start SilverDragon and it crashes because it cannot find the colorbuttons.
I will see what I can do tomorrow.

@phillc54
Copy link
Copy Markdown
Collaborator Author

I think that I may have broken something to do with exceptions.

That was a false alarm, it was caused by issues in SilverDragon.

@phillc54 phillc54 changed the title Phillc54/gscreen gscreen: assorted updates Feb 27, 2023
@c-morley
Copy link
Copy Markdown
Collaborator

c-morley commented Mar 2, 2023

Should we push this in now Phill?

@phillc54
Copy link
Copy Markdown
Collaborator Author

phillc54 commented Mar 2, 2023

I found an issue with sounds that I am working on at the moment.

@phillc54
Copy link
Copy Markdown
Collaborator Author

phillc54 commented Mar 2, 2023

I am not sure if hard coding the sounds directory was a good idea...

@c-morley
Copy link
Copy Markdown
Collaborator

I'm sorry I missed this. I think for now hard coding is fine. It does seem in different linux flavours the sounds are in different places. In Qtvcp there is a function for searching known locations for this reason.

If you are happy, could you fix the conflict and merge?

@phillc54
Copy link
Copy Markdown
Collaborator Author

Yep, I can do that. I probably need to test it all against the gladevcp changes as well.

Off Topic: Any hints on why an xid cannot be found for the hal_gremlin widget when using Glade. This is the line (I think) in gremlin.py:
self.xwindow_id = GdkX11.X11Window.get_xid(widget.get_window())

@c-morley
Copy link
Copy Markdown
Collaborator

You are using :
self.xwindow_id
in hal_gremlin?
Do you get 'None' or an error?

@phillc54
Copy link
Copy Markdown
Collaborator Author

It gives an int of zero.
It is in the reshape function of gremlin.py

@c-morley
Copy link
Copy Markdown
Collaborator

The window_id is not available till later in the process - probably after first realization.
check it in hal_gremlin's 'fileloaded' function - you should get the id.

@phillc54
Copy link
Copy Markdown
Collaborator Author

Thanks, I will have a look tomorrow.
Would you prefer all these gscreen commits squashed?

@c-morley
Copy link
Copy Markdown
Collaborator

I think squashing would be good.

@phillc54
Copy link
Copy Markdown
Collaborator Author

I fixed the conflict and changed sounds so they are not hard coded. I cannot test in Mint so I left the commits separate so you can easily see what I did. If you are happy with it I will squash and push.

@c-morley
Copy link
Copy Markdown
Collaborator

Looks good to me. Thank you.

switch audio play to python3 gstreamer
switch notifications to gst notifications
switch terminal to spawn_async rather than fork
remove some trailing whitespace
fix some typos
rework some print statements
comment out some debug print statements
python3 updates
silence deprecation messages at startup
use markup for dro colors
quieten gtk dont know color warnings
fix hide-show pointer
fix some dialog deprecations
utilise the QtVCP logging library
use theme from preferences file
make glade file gtk3 compliant
make a start for gtk3 stylesheet
play nicely if audio file is incorrect or missing
@phillc54 phillc54 merged commit 22ea7a3 into LinuxCNC:2.9 Mar 16, 2023
@phillc54 phillc54 deleted the phillc54/gscreen branch March 16, 2023 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants