parsley.gui.gtk package¶
Subpackages¶
Submodules¶
parsley.gui.gtk.userfeedback module¶
Helper class for user feedback dialogs.
-
class
parsley.gui.gtk.userfeedback.
UserFeedbackController
(owner)¶ Bases:
object
-
choicedialog
(question, choices)¶ Shows a choice dialog to the user and returns the selected item (or
None
when cancelled).- Parameters
question (str) – The question text to show.
choices (List[str]) – The list of choices the user has to select from.
- Return type
Optional[int]
-
filesystemdialog
(fstype='file', question='', startpath=None)¶ Shows a file/directory selection dialog to the user and returns the path to the selected item (or
None
).- Parameters
fstype (str) – The type of filesystem items to select.
question (str) – The question text to show.
startpath (Optional[str]) – The directory path to start in.
- Return type
Optional[str]
-
inputdialog
(question, defaultanswer='')¶ Shows an input dialog to the user and returns the entered text (or
None
when cancelled).- Parameters
question (str) – The question text to show.
defaultanswer (str) – The default answer text that is written to the text field when showing.
- Return type
Optional[str]
-
messagedialog
(message, buttons=None)¶ Shows a message dialog to the user and returns the index of the selected button.
- Parameters
message (str) – The message text to show.
buttons (Optional[List[str]]) – The buttons to offer.
- Return type
int
-
multilineinputdialog
(question, defaultanswer='')¶ Like
inputdialog()
but multi-line capable.- Parameters
question (str) – The question text to show.
defaultanswer (str) – The default answer text that is written to the text field when showing.
- Return type
Optional[str]
-
Module contents¶
-
class
parsley.gui.gtk.
EntryDialog
(is_multiline=False, **kwargs)¶ Bases:
gi.overrides.Gtk.MessageDialog
Initializer for a GObject based classes with support for property sets through the use of explicit keyword arguments.
-
do_get_property
(pspec)¶
-
do_set_property
(pspec, value)¶
-
entry_text
¶
-
run_and_get_entry_text
()¶
-
-
class
parsley.gui.gtk.
ParsleyGtkBuilder
¶ Bases:
gi.overrides.Gtk.Builder
-
parsley.gui.gtk.
load_common_css
()¶ - Return type
None
-
parsley.gui.gtk.
load_css
(path)¶ - Parameters
path (str) –
- Return type
None
- Parameters
actions (List[Tuple[str, Callable[[], None]]]) –
align_to (gi.overrides.Gtk.Widget) –
- Return type
None