Skip to content

Conversation

@genbtc
Copy link

@genbtc genbtc commented Mar 7, 2025

I've undertaken a task of porting alsa-tools programs from GTK2 to GTK3.
These patches start with a base of 5eaadd1 (master) Date: Mon Jan 27 (latest pull)

Results: Compilation completes successfully, Linked to GTK3, but I do not have the hardware cards to test run them.

All work has been done by me, and I request a code review on the GDK 2 Pixmap to GDK 3 Pixbuf + Cairo surfaces.
Like it needs new logic and new plan. not simply change statement A to B (whatever I did to get it to compile)

I tried to comply with the existing style, and
There was also a fair bit of inconsequential whitespace removed like (\n\t\n) or trailing space chars as I discovered them.

Looking forward to upstreaming these changes somehow if you would like to work on this.

  • genBTC @ gentoo

@andreas56
Copy link
Contributor

andreas56 commented Mar 21, 2025

Hi! I have tried your port of envy24control, and actually also made one myself (I started doing it before I found yours).

The level meters are not quite correct in your version (as you maybe already suspected). The signal expose_event is no longer valid, instead you should use "draw". Also, I don't think there's any point in using the pixbufs and surfaces anymore, as the drawing area is already double-buffered and the draw callback provides a cairo drawing context you can use directly. You can see my version here.

Other differences between your port and mine are:

  • Your radio buttons don't quite work, they show all options as chosen.
  • You don't set the data pointer for the control_input_callback, which causes a crash if some settings are changed outside the application.
  • I changed all vbox and hbox to box, to get rid of deprecation warnings.
  • Same thing with hseparator: I changed it to separator. I also fixed the pack options here, as the separator wasn't shown as a line anymore with the old options.
  • I didn't do any whitespace cleanup.

Other than that our versions are very similar. I didn't create a pull request, as I wasn't sure if I should make it to your repo or this one.

@andreas56
Copy link
Contributor

I updated my version a bit: I removed the create_blank workaround, as it wasn't needed anymore.

@andreas56
Copy link
Contributor

I wasn't happy with the performance of my version, so I made some optimizations. After that, I decided to create a new pull request for it: #35. I hope that wasn't rude of me, I'm not trying to take credit for your work.

The new pull request only includes envy24control, not the other two applications included here.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Apr 15, 2025
Note that per alsa-project/alsa-tools#27 (comment),
there's still some need for gtk+:2, so the dep remains both gtk+:2 and gtk+:3.

Signed-off-by: Sam James <[email protected]>
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