Re: How to detect a gtk desktop programmatically
- From: Tres Finocchiaro <tres finocchiaro gmail com>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: desktop-devel-list <desktop-devel-list gnome org>
- Subject: Re: How to detect a gtk desktop programmatically
- Date: Wed, 29 Apr 2020 15:03:39 -0400
Matthias,
Thanks for the detailed response. Please accept my lack of knowledge on the subject as I'm neither an OpenJDK developer nor a C developer, (I develop using Java, so information is to benefit the bug report against OpenJDK). That said...
It appears the environment variable is a preflight which is leveraged to avoid loading the libraries unintentionally.
I think what OpenJDK is trying to avoid is blindly loading a library that's on the system without knowing if it's actually in-use. This variable -- albeit deprecated -- was a reliable way to know that.
So although I can't answer the specific theming questions, I can confirm the theme seems to apply correctly on systems which utilize it. It's less of a matter of how to detect the theme and more of a matter of how to detect that the desktop environment offers a Gtk theme to begin with.
Albeit deprecated and clunky, GNOME_DESKTOP_SESSION_ID seemed to have been the way Java's known this historically and removal of it requires a replacement of which I'm hoping to gain knowledge of.
Hey Tres,
in my opinion, environment variables are about the worst possible option for this sort of thing.
If you are linking against GTK, the easiest way is to just ask GTK itself if you need to know
the theme name:
g_object_get (gtk_settings_get_defautt (), "gtk-theme-name", &theme, NULL);
But I am not sure that the theme name is really needed. What information are you looking for
exactly ? And what decision are you going to make based on it ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]