Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated GTK functions #475

Merged
merged 7 commits into from
Feb 1, 2024
Merged

Replace deprecated GTK functions #475

merged 7 commits into from
Feb 1, 2024

Conversation

cristina-suteu
Copy link
Contributor

@cristina-suteu cristina-suteu commented Jan 29, 2024

Replaced most deprecated gtk3 functions
The threading methods gdk_threads_init, gdk_threads_enter, gdk_threads_leave will be addressed in a separate PR. These require a greater change within the application code.

@cristina-suteu cristina-suteu requested review from dNechita and a team and removed request for a team January 29, 2024 07:39
Copy link
Contributor

@nunojsa nunojsa left a comment

Choose a reason for hiding this comment

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

Some minor nits...

I'm also not sure how things are handled in osc with respect to backporting fixes to the release branches (2022_R2 in this case). If that is something that should be done, I would recommend to reorder your series so that the fixes are the first patches (and hence easier to backport)

dialogs.c Outdated Show resolved Hide resolved
dialogs.c Outdated Show resolved Hide resolved
plugins/debug.c Outdated Show resolved Hide resolved
plugins/scpi.c Show resolved Hide resolved
plugins/scpi.c Show resolved Hide resolved
oscplot.c Outdated Show resolved Hide resolved
dialogs.c Outdated Show resolved Hide resolved
plugins/debug.c Show resolved Hide resolved
plugins/adrv9009.c Outdated Show resolved Hide resolved
plugins/adrv9009.c Show resolved Hide resolved
use gdk_cursor_new_for_display instead of gdk_cursor_new

Signed-off-by: Cristina Suteu <[email protected]>
replace gdk_screen_get_width/height with monitor geometry

Signed-off-by: Cristina Suteu <[email protected]>
use gtk_container_add instead of gtk_widget_reparent
get widget current parent, hide widget
ref widget before removing from current container, gtk_container_remove automatically unrefs widget
remove widget from current container and add to the new one

Signed-off-by: Cristina Suteu <[email protected]>
use gtk_widget_set_halign/valign instead of gtk_misc_set_alignment

Signed-off-by: Cristina Suteu <[email protected]>
plugins/debug.c Outdated Show resolved Hide resolved
use gtk_widget_get_preffered_size instead of gtk_widget_size_request
use gtk_widget_set_halign/valign instead of gtk_misc_set_alignment
use gtk_widget_set_margin_start/end/top/bottom instead of gtk_misc_set_padding
use gtk_container_add instead of gtk_widget_reparent
get current parent for widget and hide the widget
add ref for the widget before removing, gtk_container_remove automatically unrefs object when removing from container
add widget to new container and show widget

Signed-off-by: Cristina Suteu <[email protected]>
use CSS style provider to set box widget color instead of gtk_widget_override_color
add box colors to style sheet

Signed-off-by: Cristina Suteu <[email protected]>
use gtk_tool_button_set_icon_name instead of gtk_tool_button_set_stock_id

Signed-off-by: Cristina Suteu <[email protected]>
@cristina-suteu cristina-suteu merged commit 5fc10f1 into main Feb 1, 2024
10 checks passed
@cristina-suteu cristina-suteu deleted the fix-deprecated branch February 1, 2024 10:34
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.

3 participants