Gio.FilenameCompleter

g GObject.Object GObject.Object Gio.FilenameCompleter Gio.FilenameCompleter GObject.Object->Gio.FilenameCompleter

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_completion_suffix (initial_text)

get_completions (initial_text)

set_dirs_only (dirs_only)

Virtual Methods

Inherited:

GObject.Object (7)

do_got_completion_data ()

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

got-completion-data

Emitted when the file name completion information comes available.

Fields

Inherited:

GObject.Object (1)

Class Details

class Gio.FilenameCompleter(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gio.FilenameCompleterClass

Completes partial file and directory names given a partial string by looking in the file system for clues. Can return a list of possible completion strings for widget implementations.

classmethod new()[source]
Returns:

a Gio.FilenameCompleter.

Return type:

Gio.FilenameCompleter

Creates a new filename completer.

get_completion_suffix(initial_text)[source]
Parameters:

initial_text (str) – text to be completed.

Returns:

a completed string, or None if no completion exists. This string is not owned by GIO, so remember to GLib.free() it when finished.

Return type:

str or None

Obtains a completion for initial_text from self.

get_completions(initial_text)[source]
Parameters:

initial_text (str) – text to be completed.

Returns:

array of strings with possible completions for initial_text. This array must be freed by GLib.strfreev() when finished.

Return type:

[str]

Gets an array of completion strings for a given initial text.

set_dirs_only(dirs_only)[source]
Parameters:

dirs_only (bool) – a bool.

If dirs_only is True, self will only complete directory names, and not file names.

do_got_completion_data() virtual

Signal Details

Gio.FilenameCompleter.signals.got_completion_data(filename_completer)
Signal Name:

got-completion-data

Flags:

RUN_LAST

Parameters:

filename_completer (Gio.FilenameCompleter) – The object which received the signal

Emitted when the file name completion information comes available.