How can my GNOME Shell extension detect the GNOME version?

眉间皱痕 提交于 2020-08-07 05:45:59

问题


I'd like to support multiple GNOME versions with my shell extension. How can I detect the GNOME version it's running on and branch the code appropriately?


回答1:


const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
    // etc.


来源:https://stackoverflow.com/questions/34120963/how-can-my-gnome-shell-extension-detect-the-gnome-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!