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

common: Fix compilation warnings replace deprecated functions gtk_rc_get_theme_dir and gtk_rc_scanner_new #734

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

zhuyaliang
Copy link
Member

No description provided.

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

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

Builds and runs fine, themes are properly rendered in mate-appearance-properties, which I am presuming to be the main user of the theme tester. Current GTK theme properly applied to the control center itself.

We get these four runtime warnings from mate-appearance-properties (with the newer glib versions only) but they are shared with master, need to be fixed elsewhere in the code, and that can be a separate PR. Opened issue #735 for it:

(mate-appearance-properties:34711): GLib-GIO-CRITICAL **: 15:12:11.817: GFileInfo created without standard::type

(mate-appearance-properties:34711): GLib-GIO-CRITICAL **: 15:12:11.817: file ../gio/gfileinfo.c: line 1611 (g_file_info_get_file_type): should not be reached

(mate-appearance-properties:34711): GLib-GIO-CRITICAL **: 15:12:11.817: GFileInfo created without standard::type

(mate-appearance-properties:34711): GLib-GIO-CRITICAL **: 15:12:11.817: file ../gio/gfileinfo.c: line 1611 (g_file_info_get_file_type): should not be reached
No such key “theme”

@lukefromdc lukefromdc requested a review from a team October 23, 2023 19:37
@raveit65
Copy link
Member

gtkrc is for gtk-2.0 themes. See https://github.com/mate-desktop/mate-themes/tree/master/desktop-themes/BlueMenta/gtk-2.0 for example. So do we need this code with gtk-3.0 themes?

@zhuyaliang
Copy link
Member Author

gtkrc is for gtk-2.0 themes. See https://github.com/mate-desktop/mate-themes/tree/master/desktop-themes/BlueMenta/gtk-2.0 for example. So do we need this code with gtk-3.0 themes?

I know little about the theme, and I don't know how to add gtk3 support

@raveit65
Copy link
Member

Opps, i did a force push by accidental but i was able to restore previous state.
I hope code is now OK.

@raveit65
Copy link
Member

raveit65 commented Oct 25, 2023

gtkrc is for gtk-2.0 themes. See https://github.com/mate-desktop/mate-themes/tree/master/desktop-themes/BlueMenta/gtk-2.0 for example. So do we need this code with gtk-3.0 themes?

I know little about the theme, and I don't know how to add gtk3 support

Correct me if i am wrong. gtk_rc_get_theme_dir is used to find the directory where themes are installed and gtk_rc_scanner_new scans the gtk_color value in the theme_dir/gtk-2.0/gtkrc file.
I am thinking minimum gtk_rc_scanner_new is obsolete because i can remove the `theme_dir/gtk-2.0/ folder from our themes and m-a-p find the theme with colors.
Also, nowadays gtk-2.0 isn't use by any application any more, ihmo. I am thinking about to remove gtk-2.0 part from our themes because the gtk-murrine-engine which is used by gtk-2.0 themes will be removed from fedora soon.
Any way, i will test for myself if both functions are really used nowadays.

Copy link
Member

@raveit65 raveit65 left a comment

Choose a reason for hiding this comment

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

LGTM,
m-a-p runs like before and deprecated warnings are gone.

@raveit65 raveit65 merged commit b1331ef into master Oct 25, 2023
1 check passed
@raveit65 raveit65 deleted the fix-deprecated branch October 25, 2023 10:19
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