GimpUi.PathEditor

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 GimpUi.PathEditor GimpUi.PathEditor Gtk.Box Gtk.Box Gtk.Box->GimpUi.PathEditor 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

new (title, path)

get_dir_writable (directory)

get_path ()

get_writable_path ()

set_dir_writable (directory, writable)

set_path (path)

set_writable_path (path)

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)

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

path-changed

This signal is emitted whenever the user adds, deletes, modifies or reorders an element of the search path.

writable-changed

This signal is emitted whenever the “writable” column of a directory is changed, either by the user clicking on it or by calling GimpUi.PathEditor.set_dir_writable().

Fields

Inherited:

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

Class Details

class GimpUi.PathEditor(*args, **kwargs)
Bases:

Gtk.Box

Abstract:

No

Structure:

GimpUi.PathEditorClass

This widget is used to edit file search paths.

It shows a list of all directories which are in the search path. You can click a directory to select it. The widget provides a GimpUi.FileEntry to change the currently selected directory.

There are buttons to add or delete directories as well as “up” and “down” buttons to change the order in which the directories will be searched.

Whenever the user adds, deletes, changes or reorders a directory of the search path, the “path_changed” signal will be emitted.

classmethod new(title, path)
Parameters:
  • title (str) – The title of the Gtk.FileChooser dialog which can be popped up.

  • path (str or None) – The initial search path.

Returns:

A pointer to the new GimpUi.PathEditor widget.

Return type:

Gtk.Widget

Creates a new GimpUi.PathEditor widget.

The elements of the initial search path must be separated with the GLib.SEARCHPATH_SEPARATOR character.

get_dir_writable(directory)
Parameters:

directory (str) –

Return type:

bool

get_path()
Returns:

The search path the user has selected in the path editor.

Return type:

str

The elements of the returned search path string are separated with the GLib.SEARCHPATH_SEPARATOR character.

Note that you have to GLib.free() the returned string.

get_writable_path()
Return type:

str

set_dir_writable(directory, writable)
Parameters:
  • directory (str) –

  • writable (bool) –

set_path(path)
Parameters:

path (str) – The new path to set.

The elements of the initial search path must be separated with the GLib.SEARCHPATH_SEPARATOR character.

set_writable_path(path)
Parameters:

path (str) –

Signal Details

GimpUi.PathEditor.signals.path_changed(path_editor)
Signal Name:

path-changed

Flags:

RUN_FIRST

Parameters:

path_editor (GimpUi.PathEditor) – The object which received the signal

This signal is emitted whenever the user adds, deletes, modifies or reorders an element of the search path.

GimpUi.PathEditor.signals.writable_changed(path_editor)
Signal Name:

writable-changed

Flags:

RUN_FIRST

Parameters:

path_editor (GimpUi.PathEditor) – The object which received the signal

This signal is emitted whenever the “writable” column of a directory is changed, either by the user clicking on it or by calling GimpUi.PathEditor.set_dir_writable().