Functions¶
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Garcon.check_version(required_major, required_minor, required_micro)¶
- Parameters:
- Returns:
None
if the library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by the library and must not be freed or modified by the caller.- Return type:
Checks that the garcon library in use is compatible with the given version. Generally you would pass in the constants
Garcon.MAJOR_VERSION
,Garcon.MINOR_VERSION
andGarcon.MICRO_VERSION
as the three arguments to this function; that produces a check that the library in use is compatible with the version ofgarcon the application was compiled against.
- Checking the runtime version of the garcon library
const gchar *mismatch; mismatch = garcon_check_version (GARCON_VERSION_MAJOR, GARCON_VERSION_MINOR, GARCON_VERSION_MICRO); if (G_UNLIKELY (mismatch != NULL)) g_error ("Version mismatch: %<!---->s", mismatch);
- Garcon.config_build_paths(filename)¶
- Garcon.config_lookup(filename)¶
- Parameters:
filename (
str
) – relative filename of the config resource.- Returns:
the absolute path to the first file in the search path, that matches filename or
None
if no such file or directory could be found.- Return type:
Looks for the filename in the users’ config directory and then the system config directories.
- Garcon.get_environment()¶
- Returns:
Name of the desktop environment (e.g. XFCE, KDE, GNOME) which is used or
None
.- Return type:
Get the environment set with
Garcon.set_environment
().
- Garcon.marshal_VOID__OBJECT_OBJECT(closure, return_value, n_param_values, param_values, invocation_hint, marshal_data)¶
- Parameters:
closure (
GObject.Closure
) –return_value (
GObject.Value
) –n_param_values (
int
) –param_values (
GObject.Value
) –
- Garcon.set_environment(env)¶
- Parameters:
env (
str
) – Name of the desktop environment for which menus will be generated (e.g. XFCE, KDE, GNOME orNone
).
Sets (or unsets) the desktop environment for which menus will generated. Menus and menu items belonging to other desktop environments will be ignored. If set to
None
, all menu items are used.
- Garcon.set_environment_xdg(fallback_env)¶
- Parameters:
fallback_env (
str
) – fallback value
Set the desktop environment to the envvar XDG_CURRENT_DESKTOP. If this variables is not set, it falls back to default_env.
For fallback_env you can use for example
Garcon.ENVIRONMENT_XFCE
.New in version 0.3.0.