Libxfce4ui.FilenameInput

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box Libxfce4ui.FilenameInput Libxfce4ui.FilenameInput Gtk.Box->Libxfce4ui.FilenameInput Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

desensitise_widget (widget)

class

sensitise_widget (widget)

check ()

get_entry ()

get_text ()

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

max-text-length

int

w/co

Maximum permitted length of a filename

original-filename

str

w/co

The original filename

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

text-invalid

Signals that the current text is not a valid filename.

text-valid

Signals that the current text is a valid filename.

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class Libxfce4ui.FilenameInput(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

Libxfce4ui.FilenameInputClass

An opaque structure with only private fields.

classmethod desensitise_widget(widget)
Parameters:

widget (Gtk.Widget) – a Gtk.Widget

A convenience function to be connected as a callback for the “text-invalid” signal (for example, using g_connect_swapped) for the simple case where the desired effect of this signal is to set the sensitivity of a single Gtk.Widget (for example, a Gtk.Button).

New in version 4.16.

classmethod sensitise_widget(widget)
Parameters:

widget (Gtk.Widget) – a Gtk.Widget

A convenience function to be connected as a callback for the “text-valid” signal (for example, using g_connect_swapped) for the simple case where the desired effect of this signal is to set the sensitivity of a single Gtk.Widget (for example, a Gtk.Button).

New in version 4.16.

check()

Forces a check of the current input text even when it has not changed. This is useful to force the appropriate signal to be sent to indicate whether the text is a valid filename or not, so that for example any GtkWidgets whose sensitivity is controlled by this can be correctly updated when they are first created.

New in version 4.16.

get_entry()
Returns:

A Gtk.Entry

Return type:

Gtk.Entry

Gets the Gtk.Entry associated to filename_input

New in version 4.16.

get_text()
Returns:

the string representing the current text

Return type:

str

Gets the current text of the widget.

New in version 4.16.

Signal Details

Libxfce4ui.FilenameInput.signals.text_invalid(filename_input)
Signal Name:

text-invalid

Flags:

RUN_LAST

Parameters:

filename_input (Libxfce4ui.FilenameInput) – The object which received the signal

Signals that the current text is not a valid filename. This signal is emitted whenever the user changes the text and the result is not a valid filename.

New in version 4.16.

Libxfce4ui.FilenameInput.signals.text_valid(filename_input)
Signal Name:

text-valid

Flags:

RUN_LAST

Parameters:

filename_input (Libxfce4ui.FilenameInput) – The object which received the signal

Signals that the current text is a valid filename. This signal is emitted whenever the user changes the text and the result is a valid filename.

New in version 4.16.

Property Details

Libxfce4ui.FilenameInput.props.max_text_length
Name:

max-text-length

Type:

int

Default Value:

-1

Flags:

WRITABLE, CONSTRUCT_ONLY

The maximum permitted length of a filename. A value of -1 indicates no maximum length.

New in version 4.16.

Libxfce4ui.FilenameInput.props.original_filename
Name:

original-filename

Type:

str

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

The original name of the file, to be used as the initial text displayed in the Gtk.Entry. A None value indicates no original filename.

New in version 4.16.