SystemPrompter#

class SystemPrompter(**properties: Any)#

Superclasses: Object

A prompter used by implementations of system prompts.

This is a D-Bus service which is rarely implemented. Use SystemPrompt to display system prompts.

The system prompter service responds to D-Bus requests to create system prompts and creates Prompt type objects to display those prompts.

Pass the GType of the implementation of Prompt to new.

Constructors#

class SystemPrompter
classmethod new(mode: SystemPrompterMode, prompt_type: type) SystemPrompter#

Create a new system prompter service. This prompter won’t do anything unless you connect to its signals and show appropriate prompts.

If prompt_type is zero, then the new-prompt signal must be handled and return a valid prompt object implementing the Prompt interface.

If prompt_type is non-zero then the Type must implement the Prompt interface.

Parameters:
  • mode – the mode for the prompt

  • prompt_type – the gobject type for prompts created by this prompter

Methods#

class SystemPrompter
get_mode() SystemPrompterMode#

Get the mode for this prompter.

Most system prompters only display one prompt at a time and therefore return SINGLE.

get_prompt_type() type#

Get the Type for prompts created by this prompter.

The returned Type will be a Prompt implementation.

get_prompting() bool#

Get whether prompting or not.

register(connection: DBusConnection) None#

Register this system prompter on the DBus connection.

This makes the prompter available for clients to call. The prompter will remain registered until unregister() is called, or the prompter is unreferenced.

Parameters:

connection – a DBus connection

unregister(wait: bool) None#

Unregister this system prompter on the DBus connection.

The prompter must have previously been registered with register().

If wait is set then this function will wait until all prompts have been closed or cancelled. This is usually only used by tests.

Parameters:

wait – whether to wait for closing prompts

Properties#

class SystemPrompter
props.prompt_type: type#

The type of the None singleton.

props.prompting: bool#

The type of the None singleton.

Signals#

class SystemPrompter.signals
new_prompt() Prompt#

The type of the None singleton.

Fields#

class SystemPrompter
parent#
pv#