summaryrefslogtreecommitdiff
path: root/shell/ev-sidebar-thumbnails.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r--shell/ev-sidebar-thumbnails.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 3d17d692..905b95aa 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -99,11 +99,11 @@ static void thumbnail_job_completed_callback (EvJobThumbnail
EvSidebarThumbnails *sidebar_thumbnails);
static void adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails);
-G_DEFINE_TYPE_EXTENDED (EvSidebarThumbnails,
- ev_sidebar_thumbnails,
+G_DEFINE_TYPE_EXTENDED (EvSidebarThumbnails,
+ ev_sidebar_thumbnails,
GTK_TYPE_BOX,
- 0,
- G_IMPLEMENT_INTERFACE (EV_TYPE_SIDEBAR_PAGE,
+ 0,
+ G_IMPLEMENT_INTERFACE (EV_TYPE_SIDEBAR_PAGE,
ev_sidebar_thumbnails_page_iface_init))
#define EV_SIDEBAR_THUMBNAILS_GET_PRIVATE(object) \
@@ -252,12 +252,12 @@ static void
ev_sidebar_thumbnails_dispose (GObject *object)
{
EvSidebarThumbnails *sidebar_thumbnails = EV_SIDEBAR_THUMBNAILS (object);
-
+
if (sidebar_thumbnails->priv->loading_icons) {
g_hash_table_destroy (sidebar_thumbnails->priv->loading_icons);
sidebar_thumbnails->priv->loading_icons = NULL;
}
-
+
if (sidebar_thumbnails->priv->list_store) {
ev_sidebar_thumbnails_clear_model (sidebar_thumbnails);
g_object_unref (sidebar_thumbnails->priv->list_store);
@@ -296,7 +296,7 @@ ev_sidebar_thumbnails_map (GtkWidget *widget)
sidebar = EV_SIDEBAR_THUMBNAILS (widget);
GTK_WIDGET_CLASS (ev_sidebar_thumbnails_parent_class)->map (widget);
-
+
adjustment_changed_cb (sidebar);
}
@@ -367,7 +367,7 @@ ev_sidebar_thumbnails_get_loading_icon (EvSidebarThumbnails *sidebar_thumbnails,
} else {
g_free (key);
}
-
+
return icon;
}
@@ -512,12 +512,12 @@ update_visible_range (EvSidebarThumbnails *sidebar_thumbnails,
/* Clear the areas we no longer display */
if (old_start_page >= 0 && old_start_page < start_page)
cancel_running_jobs (sidebar_thumbnails, old_start_page, MIN (start_page - 1, old_end_page));
-
+
if (old_end_page > 0 && old_end_page > end_page)
cancel_running_jobs (sidebar_thumbnails, MAX (end_page + 1, old_start_page), old_end_page);
add_range (sidebar_thumbnails, start_page, end_page);
-
+
priv->start_page = start_page;
priv->end_page = end_page;
}
@@ -543,7 +543,7 @@ adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails)
return;
value = gtk_adjustment_get_value (priv->vadjustment);
-
+
if (priv->tree_view) {
if (! gtk_widget_get_realized (priv->tree_view))
return;
@@ -607,7 +607,7 @@ ev_sidebar_thumbnails_fill_model (EvSidebarThumbnails *sidebar_thumbnails)
prev_width = width;
prev_height = height;
-
+
gtk_list_store_append (priv->list_store, &iter);
gtk_list_store_set (priv->list_store, &iter,
COLUMN_PAGE_STRING, page_string,
@@ -775,7 +775,7 @@ ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails)
GUINT_TO_POINTER (signal_id));
priv->swindow = gtk_scrolled_window_new (NULL, NULL);
-
+
/* We actually don't want GTK_POLICY_AUTOMATIC for horizontal scrollbar here
* it's just a workaround for bug #449462 (GTK2 only)
*/
@@ -999,29 +999,29 @@ ev_sidebar_thumbnails_set_model (EvSidebarPage *sidebar_page,
}
static gboolean
-ev_sidebar_thumbnails_clear_job (GtkTreeModel *model,
+ev_sidebar_thumbnails_clear_job (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
EvJob *job;
-
+
gtk_tree_model_get (model, iter, COLUMN_JOB, &job, -1);
-
+
if (job != NULL) {
ev_job_cancel (job);
g_signal_handlers_disconnect_by_func (job, thumbnail_job_completed_callback, data);
g_object_unref (job);
}
-
- return FALSE;
+
+ return FALSE;
}
-static void
+static void
ev_sidebar_thumbnails_clear_model (EvSidebarThumbnails *sidebar_thumbnails)
{
EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
-
+
gtk_tree_model_foreach (GTK_TREE_MODEL (priv->list_store), ev_sidebar_thumbnails_clear_job, sidebar_thumbnails);
gtk_list_store_clear (priv->list_store);
}