2.3. hk_class

hk_class is the basic class for all other defined classes.

show_warningmessage(message)

Prints a warning message by using a dialog window. If none is set the message will be print to standard error (cerr). (Info: if you use it in knoda, such a dialog window is set)

hk_translate(text)

tries to translate the message t by using implemented translatingfunction of the underlying OS.

show_yesnodialog(question, default_value)

prints a question. The user has either to answer the question with yes or no.

Parameter 'question': the shown question

Parameter 'default_value': if hk_classes should not show nerving questions (can be set in knoda's preferences dialog), the default_value will be returned without asking.

show_stringvaluedialog(question)

prints the question 'question' and returns the user input. The user has to answer the question by entering a string (i.e. a filename).

Parameter 'question': the shown question

returns the string the user gave as an answer

save_preferences()

This function stores all preferences of the hk_classes library in the file ~/.hk_classes/preferences