YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Imports

  • Directory
  • Map

Global Variables

Global Functions

Local Variables

Local Functions

Info:

File: modules/Desktop.ycp Package: yast2 Summary: Handling of .desktop entries Author: Michal Svec

global Modules -> map<string,map>

YaST configuration modules

global Groups -> map<string,map>

YaST configuration groups

global AgentPath -> path

Optional agent path to the desktop files

local Language -> string

Optional language for reading translated entries

local ReadLocalizedKey (string fname, path keypath, string key) -> string

Parameters:
fname
keypath
key
local ReadLanguage () -> void

Internal function: set up the language variables.

global Read (list<string> Values) -> void

Read module and group data from desktop files

Parameters:
Values list of values to be parsed (empty to read all)
global Translate (string key) -> string

Parameters:
key
local CreateList (map M) -> list <term>

Parameters:
M
global GroupList () -> list <term>

global ModuleList (string group) -> list <term>

Parameters:
group
local MakeAutostartMap (string exec, list<string> args) -> map<string, string>

Parameters:
exec
args
global RunViaDesktop (string exec, list<string> args) -> void

Runs a program by writing a special desktop file. Works with KDE and GNOME. Useful for kinternet, see bug 37864#c17

Parameters:
exec program to exec (basename)
args
global ParseSingleDesktopFile (string file) -> map<string,string>

Parses the a .desktop file it gets as a parameter without trying to use already cached information or agent to access all desktop files. This is optimized version to be used for rapid start of modules. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is relative to that directory without ".desktop" suffix. Warning: There are no desktop files in inst-sys.

Parameters:
file desktop file name
Return value:
filled with data, or nil
Example

	// Opens /usr/share/applications/YaST2/lan.desktop
	map description = Desktop::ParseSingleDesktopFile ("lan");
	Wizard::SetDialogTitle (description["Name"]:_("None));