TeplApplicationWindow

TeplApplicationWindow — An extension of GtkApplicationWindow

Functions

Properties

GtkApplicationWindow * application-window Read / Write / Construct Only
GtkStatusbar * statusbar Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── TeplApplicationWindow

Includes

#include <tepl/tepl.h>

Description

TeplApplicationWindow extends the GtkApplicationWindow class.

Note that TeplApplicationWindow extends the GtkApplicationWindow class but without subclassing it, because several libraries might want to extend GtkApplicationWindow and an application needs to be able to use all those extensions at the same time.

Functions

tepl_application_window_get_from_gtk_application_window ()

TeplApplicationWindow *
tepl_application_window_get_from_gtk_application_window
                               (GtkApplicationWindow *gtk_window);

Returns the TeplApplicationWindow of gtk_window . The returned object is guaranteed to be the same for the lifetime of gtk_window .

Parameters

gtk_window

a GtkApplicationWindow.

 

Returns

the TeplApplicationWindow of gtk_window .

[transfer none]

Since: 2.0


tepl_application_window_get_application_window ()

GtkApplicationWindow *
tepl_application_window_get_application_window
                               (TeplApplicationWindow *tepl_window);

Parameters

tepl_window

a TeplApplicationWindow.

 

Returns

the GtkApplicationWindow of tepl_window .

[transfer none]

Since: 2.0


tepl_application_window_get_statusbar ()

GtkStatusbar *
tepl_application_window_get_statusbar (TeplApplicationWindow *tepl_window);

Parameters

tepl_window

a TeplApplicationWindow.

 

Returns

the “statusbar”.

[transfer none][nullable]

Since: 2.0


tepl_application_window_set_statusbar ()

void
tepl_application_window_set_statusbar (TeplApplicationWindow *tepl_window,
                                       GtkStatusbar *statusbar);

Sets the “statusbar” property.

Parameters

tepl_window

a TeplApplicationWindow.

 

statusbar

a GtkStatusbar, or NULL.

[nullable]

Since: 2.0


tepl_application_window_connect_menu_to_statusbar ()

void
tepl_application_window_connect_menu_to_statusbar
                               (TeplApplicationWindow *tepl_window,
                                TeplMenuShell *tepl_menu_shell);

Connect to the “menu-item-selected” and “menu-item-deselected” signals of tepl_menu_shell to push/pop the long description of GtkMenuItem's to the “statusbar”.

The long description is retrieved with tepl_menu_item_get_long_description(). So tepl_menu_item_set_long_description() must have been called, which is the case if the GtkMenuItem has been created with the functions available in TeplActionInfoStore.

Parameters

tepl_window

a TeplApplicationWindow.

 

tepl_menu_shell

a TeplMenuShell.

 

Since: 2.0


tepl_application_window_connect_recent_chooser_menu_to_statusbar ()

void
tepl_application_window_connect_recent_chooser_menu_to_statusbar
                               (TeplApplicationWindow *tepl_window,
                                GtkRecentChooserMenu *menu);

An alternative to gtk_recent_chooser_set_show_tips(). Shows the full path in the “statusbar” when a GtkMenuItem of menu is selected.

The full path is retrieved with tepl_utils_recent_chooser_menu_get_item_uri().

Parameters

tepl_window

a TeplApplicationWindow.

 

menu

a GtkRecentChooserMenu.

 

Since: 2.0


tepl_application_window_create_open_recent_menu_item ()

GtkWidget *
tepl_application_window_create_open_recent_menu_item
                               (TeplApplicationWindow *tepl_window);

Creates a GtkMenuItem with a simple and generic GtkRecentChooserMenu as submenu.

The GtkRecentChooser is configured to show files only recently used with the current application, as returned by g_get_application_name(). If recent files are added to the default GtkRecentManager with gtk_recent_manager_add_item(), the files will normally show up in the GtkRecentChooserMenu.

The GtkRecentChooserMenu is connected to the statusbar with tepl_application_window_connect_recent_chooser_menu_to_statusbar().

When the “item-activated” signal is emitted, tepl_application_open_simple() is called, so the GApplication must have the G_APPLICATION_HANDLES_OPEN flag set.

Parameters

tepl_window

a TeplApplicationWindow.

 

Returns

a new GtkMenuItem.

[transfer floating]

Since: 2.0

Types and Values

TeplApplicationWindow

typedef struct _TeplApplicationWindow TeplApplicationWindow;

Property Details

The “application-window” property

  “application-window”       GtkApplicationWindow *

The GtkApplicationWindow.

Flags: Read / Write / Construct Only

Since: 2.0


The “statusbar” property

  “statusbar”                GtkStatusbar *

The GtkStatusbar. NULL by default.

Flags: Read / Write

Since: 2.0