+2006-02-07 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * shell/ev-view-private.h:
+ * shell/ev-view.c: (ev_view_expose_event), (ev_view_set_loading),
+ (ev_view_set_document):
+ * shell/ev-view.h:
+ * shell/ev-window.c: (ev_window_load_job_cb),
+ (ev_window_xfer_job_cb), (ev_window_open_uri), (ev_window_dispose),
+ (ev_window_init):
+
+ Draw Loading message during xfer job. Fix for the bug #329495.
+
2006-02-03 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* comics/comics-document.c: (comics_regex_quote),
double scale;
int spacing;
+ gboolean loading;
gboolean continuous;
gboolean dual_page;
gboolean fullscreen;
GdkRectangle *page_area,
GtkBorder *border,
GdkRectangle *expose_area);
+static void draw_loading_text (EvView *view,
+ GdkRectangle *page_area,
+ GdkRectangle *expose_area);
/*** Callbacks ***/
static void find_changed_cb (EvDocument *document,
EvView *view = EV_VIEW (widget);
int i;
+ if (view->loading) {
+ draw_loading_text (view,
+ &(widget->allocation),
+ &(event->area));
+ }
+
if (view->document == NULL)
return FALSE;
}
}
+void
+ev_view_set_loading (EvView *view,
+ gboolean loading)
+{
+ view->loading = loading;
+ gtk_widget_queue_draw (GTK_WIDGET (view));
+}
+
void
ev_view_set_document (EvView *view,
EvDocument *document)
{
g_return_if_fail (EV_IS_VIEW (view));
+ view->loading = FALSE;
+
if (document != view->document) {
clear_caches (view);
GtkWidget* ev_view_new (void);
void ev_view_set_document (EvView *view,
EvDocument *document);
+void ev_view_set_loading (EvView *view,
+ gboolean loading);
/* Clipboard */
void ev_view_copy (EvView *view);
GtkWidget *find_bar;
GtkWidget *scrolled_window;
GtkWidget *view;
- GtkWidget *page_view;
GtkWidget *password_view;
GtkWidget *sidebar_thumbs;
GtkWidget *sidebar_links;
g_assert (document);
g_assert (document != ev_window->priv->document);
g_assert (job->uri);
+
+ ev_view_set_loading (EV_VIEW (ev_window->priv->view), FALSE);
if (ev_window->priv->password_document) {
g_object_unref (ev_window->priv->password_document);
if (job->error != NULL) {
unable_to_load (ev_window, job->error->message);
ev_window_clear_jobs (ev_window);
+ ev_view_set_loading (EV_VIEW (ev_window->priv->view), FALSE);
} else {
char *uri;
ev_window_close_dialogs (ev_window);
ev_window_clear_jobs (ev_window);
ev_window_clear_local_uri (ev_window);
+ ev_view_set_loading (EV_VIEW (ev_window->priv->view), TRUE);
ev_window->priv->xfer_job = ev_job_xfer_new (uri);
g_signal_connect (ev_window->priv->xfer_job,
priv->view = NULL;
}
- if (priv->page_view) {
- g_object_unref (priv->page_view);
- priv->page_view = NULL;
- }
-
if (priv->load_job || priv->xfer_job) {
ev_window_clear_jobs (window);
}
/* We own a ref on these widgets, as we can swap them in and out */
g_object_ref (ev_window->priv->view);
- //g_object_ref (ev_window->priv->page_view);
g_object_ref (ev_window->priv->password_view);
gtk_container_add (GTK_CONTAINER (ev_window->priv->scrolled_window),