Tepl.Application

g GObject.Object GObject.Object Tepl.Application Tepl.Application GObject.Object->Tepl.Application

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_default ()

class

get_from_gtk_application (gtk_app)

get_active_main_window ()

get_app_action_info_store ()

get_application ()

get_tepl_action_info_store ()

handle_activate ()

handle_metadata ()

handle_open ()

open_simple (file)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

application

Gtk.Application

r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Tepl.Application(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Tepl.ApplicationClass

classmethod get_default()
Returns:

the default Tepl.Application.

Return type:

Tepl.Application

Convenience function that calls Gio.Application.get_default() followed by Tepl.Application.get_from_gtk_application(). The object returned by Gio.Application.get_default() must be a Gtk.Application.

New in version 2.0.

classmethod get_from_gtk_application(gtk_app)
Parameters:

gtk_app (Gtk.Application) – a Gtk.Application.

Returns:

the Tepl.Application of gtk_app.

Return type:

Tepl.Application

Returns the Tepl.Application of gtk_app. The returned object is guaranteed to be the same for the lifetime of gtk_app.

New in version 2.0.

get_active_main_window()
Returns:

the active main Gtk.ApplicationWindow, or None.

Return type:

Gtk.ApplicationWindow or None

Like Gtk.Application.get_active_window(), but returns the main window in the sense of Tepl.ApplicationWindow.is_main_window().

New in version 4.0.

get_app_action_info_store()
Returns:

the Amtk.ActionInfoStore reserved for the application.

Return type:

Amtk.ActionInfoStore

Returns an initially empty Amtk.ActionInfoStore reserved for the application-specific actions. Libraries should not add Amtk.ActionInfo's to this store. Libraries should provide their own store if they want to share Amtk.ActionInfo's.

New in version 2.0.

get_application()
Returns:

the Gtk.Application of self.

Return type:

Gtk.Application

New in version 2.0.

get_tepl_action_info_store()
Returns:

the Amtk.ActionInfoStore of the Tepl library.

Return type:

Amtk.ActionInfoStore

The returned Amtk.ActionInfoStore contains Amtk.ActionInfo's for all the Gio.Action's listed in the ‘class description of TeplApplicationWindow [tepl-application-window-gactions]’ and the ‘class description of TeplApplication [tepl-application-gactions]’.

New in version 3.0.

handle_activate()

Connects a generic function handler for the Gio.Application ::activate signal.

If no main windows exist, it creates one with Tepl.AbstractFactory.create_main_window(). If a main window already exists, it calls Gtk.Window.present() on the most recently focused window of the application.

New in version 4.0.

handle_metadata()

This function:

It gets the Gio.File by calling Tepl.AbstractFactory.create_metadata_manager_file().

New in version 5.0.

handle_open()

Connects a generic function handler for the Gio.Application ::open signal.

It calls Tepl.ApplicationWindow.open_file() for each Gio.File to open, on the active main window as returned by Tepl.Application.get_active_main_window(). If the active main window is None, it creates one with Tepl.AbstractFactory.create_main_window().

New in version 4.0.

open_simple(file)
Parameters:

file (Gio.File) – a Gio.File.

Calls Gio.Application.open() with a single file and an empty hint.

New in version 2.0.

Property Details

Tepl.Application.props.application
Name:

application

Type:

Gtk.Application

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The Gtk.Application.

New in version 2.0.