Tepl.File¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r/w/c |
|||
r |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Tepl.File(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod chooser_set_modal(chooser, modal)¶
- Parameters:
chooser (
Gtk.FileChooser
) – aGtk.FileChooser
.modal (
bool
) – the new value.
Calls either
Gtk.NativeDialog.set_modal
() orGtk.Window.set_modal
() depending on the chooser type.New in version 5.0.
- classmethod chooser_set_parent(chooser, parent)¶
- Parameters:
chooser (
Gtk.FileChooser
) – aGtk.FileChooser
.parent (
Gtk.Window
orNone
) – aGtk.Window
, orNone
.
Sets or unsets a parent
Gtk.Window
for the chooser dialog. It calls the right functions depending on the type of chooser.New in version 5.0.
- classmethod chooser_show(chooser)¶
- Parameters:
chooser (
Gtk.FileChooser
) – aGtk.FileChooser
.
Calls
Gtk.NativeDialog.show
() orGtk.Window.present
() depending on the type of chooser.New in version 5.0.
- add_uri_to_recent_manager()¶
If the
Tepl.File
:location
isn’tNone
, adds its URI to the defaultGtk.RecentManager
withGtk.RecentManager.add_item
().New in version 4.0.
- get_full_name()¶
- Returns:
the value of the
Tepl.File
:full-name
property. Free withGLib.free
().- Return type:
New in version 6.4.
- get_location()¶
-
New in version 1.0.
- get_newline_type()¶
- Returns:
the value of the
Tepl.File
:newline-type
property.- Return type:
New in version 1.0.
- get_short_name()¶
- Returns:
the value of the
Tepl.File
:short-name
property. Free withGLib.free
().- Return type:
New in version 5.0.
Property Details¶
- Tepl.File.props.full_name¶
-
Convenience property for the full name of a
Tepl.File
.When the
Tepl.File
:location
isNone
, this property has the same value as theTepl.File
:short-name
.When the
Tepl.File
:location
is notNone
, this property contains the full path to the location. It uses:
- Tepl.File.props.location¶
-
The location.
New in version 1.0.
- Tepl.File.props.newline_type¶
- Name:
newline-type
- Type:
- Default Value:
- Flags:
The line ending type.
New in version 1.0.
- Tepl.File.props.short_name¶
-
The file short name.
When the
Tepl.File
:location
isNone
, this property contains by default “Untitled File N” (translated), with N the Nth untitled file of the application, starting at 1. When an untitled file is closed (when theTepl.File
is freed) or itsTepl.File
:location
is set, its untitled number is released and can be used by a later file.See tepl_file_set_untitled_file_callback() to customize the string. Other examples: “Unsaved” instead of “Untitled”, or “Document” instead of “File”.
When the
Tepl.File
:location
is notNone
, this property contains the display-name (seeGio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
). However, requesting the display-name can take some time (for example for a remote file with a slow network connection). When theTepl.File
:location
property is set, the display-name is fetched asynchronously. When the display-name is available, this property is notified. In the meantime – after theTepl.File
:location
is set but before receiving the display-name – a fallback implementation is used that does no blocking I/O (but it may return a different result compared to the real display-name).New in version 1.0.