Community
Participate
Working Groups
Sometimes, it would be useful to know which GTK theme is used during an Eclipse session for troubleshooting purposes. For example, when running tests remotely or when helping someone who doesn't know which theme is used, etc. This could be similar to org.eclipse.swt.internal.gtk.version. I suggest org.eclipse.swt.internal.gtk.theme. I think all the native hooks are there already because I can see the name of the theme being retrieved in Display.gtk_css_default_theme_values. Let me know if you think that's a acceptable idea and if so, I'll start working on a patch!
I'm not SWT committer, but I think this is great idea because we always have trouble to understand what user is running. I wondering if we can made those properties even more prominent in the about dialog.
Just as an FYI: You can enable gtk inspector: https://wiki.gnome.org/Projects/GTK+/Inspector gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true Then open GTK inspector via ctrl+shift+i, then you can see which theme is used on any gtk3 application in the 'visual' tab.
Created attachment 264254 [details] Screenshot of gtk inspector.
(In reply to Leo Ufimtsev from comment #2) > Just as an FYI: > You can enable gtk inspector: > https://wiki.gnome.org/Projects/GTK+/Inspector > > gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true > > Then open GTK inspector via ctrl+shift+i, > then you can see which theme is used on any gtk3 application in the 'visual' > tab. That's quite useful, thanks! I'm thinking the property is still useful for builds that no one interacts with and people using older GTKs. It's also nice to ask for the "Configuration" output of a user and see the versions, theme, etc.
(In reply to Marc-Andre Laperle from comment #4) > (In reply to Leo Ufimtsev from comment #2) > > Just as an FYI: > > You can enable gtk inspector: > > https://wiki.gnome.org/Projects/GTK+/Inspector > > > > gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true > > > > Then open GTK inspector via ctrl+shift+i, > > then you can see which theme is used on any gtk3 application in the 'visual' > > tab. > > That's quite useful, thanks! I'm thinking the property is still useful for > builds that no one interacts with and people using older GTKs. It's also > nice to ask for the "Configuration" output of a user and see the versions, > theme, etc. +1. Yea, I agree, having the property in the logs would be very useful.
New Gerrit change created: https://git.eclipse.org/r/81356
Gerrit change https://git.eclipse.org/r/81356 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=1442b65a15fa6b4d877df34d32606cf8e0c5a74a
Thanks for the patch. Pushed.
(In reply to Alexander Kurtakov from comment #8) > Thanks for the patch. Pushed. So fast! Thank you!
schouldn't we add some notes to the N&N section for M3 and to the swt wiki?
(In reply to Andrey Loskutov from comment #10) > schouldn't we add some notes to the N&N section for M3 and to the swt wiki? I can do that, where is it located? I couldn't find it.
Uh, I get this error now when starting a UI test. Any hint of what could be wrong? (process:17052): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed Calling gtk_settings_get_default too soon perhaps?
New Gerrit change created: https://git.eclipse.org/r/81411
Gerrit change https://git.eclipse.org/r/81411 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=9460f86f13172520d8cbfaeb20aeecca8d829f38
(In reply to Marc-Andre Laperle from comment #12) > Uh, I get this error now when starting a UI test. Any hint of what could be > wrong? > (process:17052): GLib-GObject-CRITICAL **: g_object_get: assertion > 'G_IS_OBJECT (object)' failed > > Calling gtk_settings_get_default too soon perhaps? Fixed with the additional commit. In short gtk_* functions (except for few) have to be called only after gtk_init_check is called so I moved to registration of the system property after init.
(In reply to Alexander Kurtakov from comment #15) > (In reply to Marc-Andre Laperle from comment #12) > > Uh, I get this error now when starting a UI test. Any hint of what could be > > wrong? > > (process:17052): GLib-GObject-CRITICAL **: g_object_get: assertion > > 'G_IS_OBJECT (object)' failed > > > > Calling gtk_settings_get_default too soon perhaps? > > Fixed with the additional commit. In short gtk_* functions (except for few) > have to be called only after gtk_init_check is called so I moved to > registration of the system property after init. Makes perfect sense. Thanks for the quick fix! I tested it and it works well in all situations from what I can tell.
Would it be OK to cherry-pick this to 4.6?
(In reply to Andrey Loskutov from comment #10) > schouldn't we add some notes to the N&N section for M3 and to the swt wiki? https://git.eclipse.org/r/#/c/82129/