gio.desktop_app_info
Module for [DesktopAppInfo] class
Types 3
[gio.desktop_app_info.DesktopAppInfo] is an implementation of [gio.app_info.AppInfo] based on desktop files.
Note that <gio/gdesktopappinfo.h> belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file or the GioUnix-2.0 GIR namespace when using it.
Methods
DesktopAppInfo self()Returns `this`, for use in `with` statements.DesktopAppInfoGidBuilder builder()Get builder for [gio.desktopappinfo.DesktopAppInfo] Returns: New builder objectstring filename() @propertyGet `filename` property. Returns: The origin filename of this #GDesktopAppInfogio.desktop_app_info.DesktopAppInfo newFromFilename(string filename)Creates a new #GDesktopAppInfo.gio.desktop_app_info.DesktopAppInfo newFromKeyfile(glib.key_file.KeyFile keyFile)Creates a new #GDesktopAppInfo.gio.desktop_app_info.DesktopAppInfo[] getImplementations(string interface_)Gets all applications that implement interface.void setDesktopEnv(string desktopEnv)Sets the name of the desktop that the application is running in. This is used by [gio.appinfo.AppInfo.shouldShow] and [gio.desktopapp_info.DesktopAppInfo.getShowIn] to evaluate the `OnlyShowIn` and...string getActionName(string actionName)Gets the user-visible display name of the "additional application action" specified by action_name.bool getBoolean(string key)Looks up a boolean value in the keyfile backing info.string getCategories()Gets the categories from the desktop file. Returns: The unparsed Categories key from the desktop file; i.e. no attempt is made to split it by ';' or validate it.string getFilename()When info was created from a known filename, return it. In some situations such as the #GDesktopAppInfo returned from [gio.desktopappinfo.DesktopAppInfo.newFromKeyfile], this function will return ...string getGenericName()Gets the generic name from the desktop file. Returns: The value of the GenericName keybool getIsHidden()A desktop file is hidden if the Hidden key in it is set to True. Returns: true if hidden, false otherwise.string[] getKeywords()Gets the keywords from the desktop file. Returns: The value of the Keywords keystring getLocaleString(string key)Looks up a localized string value in the keyfile backing info translated to the current locale.bool getNodisplay()Gets the value of the NoDisplay key, which helps determine if the application info should be shown in menus. See [glib.types.KEYFILEDESKTOPKEYNODISPLAY] and [gio.appinfo.AppInfo.shouldShow]. Return...bool getShowIn(string desktopEnv = null)Checks if the application info should be shown in menus that list available applications for a specific name of the desktop, based on the `OnlyShowIn` and `NotShowIn` keys.string getStartupWmClass()Retrieves the StartupWMClass field from info. This represents the WM_CLASS property of the main window of the application, if launched through info. Returns: the startup WM class, or null if none i...string getString(string key)Looks up a string value in the keyfile backing info.string[] getStringList(string key)Looks up a string list value in the keyfile backing info.bool hasKey(string key)Returns whether key exists in the "Desktop Entry" group of the keyfile backing info.void launchAction(string actionName, gio.app_launch_context.AppLaunchContext launchContext = null)Activates the named application action.bool launchUrisAsManager(string[] uris, gio.app_launch_context.AppLaunchContext launchContext, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc userSetup = null, gio.types.DesktopAppLaunchCallback pidCallback = null)This function performs the equivalent of [gio.appinfo.AppInfo.launchUris], but is intended primarily for operating system components that launch applications. Ordinary applications should use [gio...bool launchUrisAsManagerWithFds(string[] uris, gio.app_launch_context.AppLaunchContext launchContext, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc userSetup, gio.types.DesktopAppLaunchCallback pidCallback, int stdinFd, int stdoutFd, int stderrFd)Equivalent to [gio.desktopappinfo.DesktopAppInfo.launchUrisAsManager] but allows you to pass in file descriptors for the stdin, stdout and stderr streams of the launched process.string[] listActions()Returns the list of "additional application actions" supported on the desktop file, as per the desktop file specification.classDesktopAppInfoGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gio.app_info.AppInfoGidBuilderImpl!T
Methods
T filename(string propval)Set `filename` property. Params: propval = The origin filename of this #GDesktopAppInfo Returns: Builder instance for fluent chainingFluent builder for [gio.desktop_app_info.DesktopAppInfo]
Methods