Top |
GtkApplicationWindow * | application-window | Read / Write / Construct Only |
GtkStatusbar * | statusbar | Read / Write |
AmtkApplicationWindow extends the GtkApplicationWindow class with a “statusbar” property and functions to show longer descriptions of GtkMenuItem's to the GtkStatusbar.
Note that AmtkApplicationWindow 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.
AmtkApplicationWindow *
amtk_application_window_get_from_gtk_application_window
(GtkApplicationWindow *gtk_window
);
Returns the AmtkApplicationWindow of gtk_window
. The returned object is
guaranteed to be the same for the lifetime of gtk_window
.
Since: 2.0
GtkApplicationWindow *
amtk_application_window_get_application_window
(AmtkApplicationWindow *amtk_window
);
Since: 2.0
GtkStatusbar *
amtk_application_window_get_statusbar (AmtkApplicationWindow *amtk_window
);
Since: 2.0
void amtk_application_window_set_statusbar (AmtkApplicationWindow *amtk_window
,GtkStatusbar *statusbar
);
Sets the “statusbar” property.
Since: 2.0
void amtk_application_window_connect_menu_to_statusbar (AmtkApplicationWindow *amtk_window
,GtkMenuShell *menu_shell
);
Connects to the “menu-item-selected” and
“menu-item-deselected” signals of menu_shell
to push/pop the
long description of GtkMenuItem's to the “statusbar”.
The long description is retrieved with amtk_menu_item_get_long_description()
.
So amtk_menu_item_set_long_description()
must have been called, which is the
case if the GtkMenuItem has been created with AmtkFactory.
Since: 2.0
void amtk_application_window_connect_recent_chooser_menu_to_statusbar (AmtkApplicationWindow *amtk_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
amtk_utils_recent_chooser_menu_get_item_uri()
.
Since: 2.0
GtkRecentChooserMenu *
amtk_application_window_create_open_recent_menu_base
(void
);
Creates the base of a simple and generic GtkRecentChooserMenu.
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.
Since: 5.6
GtkWidget *
amtk_application_window_create_open_recent_menu
(AmtkApplicationWindow *amtk_window
);
This function creates a GtkRecentChooserMenu with
amtk_application_window_create_open_recent_menu_base()
, and setup these
additional things:
The GtkRecentChooserMenu is connected to the statusbar with
amtk_application_window_connect_recent_chooser_menu_to_statusbar()
.
When the “item-activated” signal is emitted,
g_application_open()
is called (with an empty hint), so the GApplication
must have the G_APPLICATION_HANDLES_OPEN
flag set.
Since: 3.0
GtkWidget *
amtk_application_window_create_open_recent_menu_item
(AmtkApplicationWindow *amtk_window
);
Creates a GtkMenuItem with a simple and generic GtkRecentChooserMenu as
submenu. The GtkRecentChooserMenu is created with
amtk_application_window_create_open_recent_menu()
.
Since: 2.0
“application-window”
property“application-window” GtkApplicationWindow *
The GtkApplicationWindow.
Owner: AmtkApplicationWindow
Flags: Read / Write / Construct Only
Since: 2.0
“statusbar”
property“statusbar” GtkStatusbar *
The GtkStatusbar. NULL
by default.
Owner: AmtkApplicationWindow
Flags: Read / Write
Since: 2.0