Re: [evince] How to know when the evince-view has finished loading?



On Fri, Apr 12, 2013 at 11:52 PM, Ajay Garg <ajaygargnsit gmail com> wrote:
Found a workaround.

Querying "evince.View().get_visible()" at regular intervals, seems to work -
after the view is loaded, it returns True.

I don't quite recall what the syntax looks like on python, but I
believe you want to watch the "is-loading" property of the EvView.

https://developer.gnome.org/libevview/stable/libevview-ev-view.html#EvView--is-loading

In C:

g_signal_connect(view, "notify::is-loading",
                 G_CALLBACK(my_loading_callback), data);

In the callback:

gboolean loading;
g_object_get(view, "is-loading", &loading, NULL);
if (!loading)
    do_stuff_with_loaded_document();

--
Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]