Commit a945ec88 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

[shell] Add ev_application_get_n_windows()

parent df0507d9
......@@ -1051,6 +1051,24 @@ ev_application_has_window (EvApplication *application)
return retval;
}
guint
ev_application_get_n_windows (EvApplication *application)
{
GList *l, *toplevels;
guint retval = 0;
toplevels = gtk_window_list_toplevels ();
for (l = toplevels; l != NULL; l = l->next) {
if (EV_IS_WINDOW (l->data))
retval++;
}
g_list_free (toplevels);
return retval;
}
const gchar *
ev_application_get_uri (EvApplication *application)
{
......
......@@ -67,6 +67,7 @@ void ev_application_open_uri_list (EvApplication *application,
guint32 timestamp);
GDBusConnection *ev_application_get_dbus_connection (EvApplication *application);
gboolean ev_application_has_window (EvApplication *application);
guint ev_application_get_n_windows (EvApplication *application);
const gchar * ev_application_get_uri (EvApplication *application);
GObject *ev_application_get_media_keys (EvApplication *application);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment