renamed fd->pixbuf to fd->thumb_pixbuf
authorVladimir Nadvornik <nadvornik@suse.cz>
Sat, 21 Jun 2008 11:05:55 +0000 (11:05 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sat, 21 Jun 2008 11:05:55 +0000 (11:05 +0000)
src/filedata.c
src/search.c
src/thumb.c
src/thumb_standard.c
src/typedefs.h
src/view_file_icon.c
src/view_file_list.c

index f592a1e..687bbfd 100644 (file)
@@ -230,8 +230,8 @@ static gboolean file_data_check_changed_files_recursive(FileData *fd, struct sta
                {
                fd->size = st->st_size;
                fd->date = st->st_mtime;
-               if (fd->pixbuf) g_object_unref(fd->pixbuf);
-               fd->pixbuf = NULL;
+               if (fd->thumb_pixbuf) g_object_unref(fd->thumb_pixbuf);
+               fd->thumb_pixbuf = NULL;
                file_data_increment_version(fd);
                file_data_send_notification(fd, NOTIFY_TYPE_REREAD);
                ret = TRUE;
@@ -330,7 +330,7 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
 
        fd->size = st->st_size;
        fd->date = st->st_mtime;
-       fd->pixbuf = NULL;
+       fd->thumb_pixbuf = NULL;
        fd->sidecar_files = NULL;
        fd->ref = 1;
        fd->magick = 0x12345678;
@@ -465,7 +465,7 @@ static void file_data_free(FileData *fd)
        g_free(fd->original_path);
        g_free(fd->collate_key_name);
        g_free(fd->collate_key_name_nocase);
-       if (fd->pixbuf) g_object_unref(fd->pixbuf);
+       if (fd->thumb_pixbuf) g_object_unref(fd->thumb_pixbuf);
 
        g_assert(fd->sidecar_files == NULL); /* sidecar files must be freed before calling this */
 
index b2483c8..5b728a8 100644 (file)
@@ -495,7 +495,7 @@ static void search_result_append(SearchData *sd, MatchFileData *mfd)
        gtk_list_store_set(store, &iter,
                                SEARCH_COLUMN_POINTER, mfd,
                                SEARCH_COLUMN_RANK, mfd->rank,
-                               SEARCH_COLUMN_THUMB, fd->pixbuf,
+                               SEARCH_COLUMN_THUMB, fd->thumb_pixbuf,
                                SEARCH_COLUMN_NAME, fd->name,
                                SEARCH_COLUMN_SIZE, text_size,
                                SEARCH_COLUMN_DATE, text_from_time(fd->date),
@@ -710,7 +710,7 @@ static void search_result_thumb_set(SearchData *sd, FileData *fd, GtkTreeIter *i
                if (search_result_find_row(sd, fd, &iter_n) >= 0) iter = &iter_n;
                }
 
-       if (iter) gtk_list_store_set(store, iter, SEARCH_COLUMN_THUMB, fd->pixbuf, -1);
+       if (iter) gtk_list_store_set(store, iter, SEARCH_COLUMN_THUMB, fd->thumb_pixbuf, -1);
 }
 
 static void search_result_thumb_do(SearchData *sd)
@@ -758,9 +758,9 @@ static void search_result_thumb_step(SearchData *sd)
 
                length++;
                gtk_tree_model_get(store, &iter, SEARCH_COLUMN_POINTER, &mfd, SEARCH_COLUMN_THUMB, &pixbuf, -1);
-               if (pixbuf || mfd->fd->pixbuf)
+               if (pixbuf || mfd->fd->thumb_pixbuf)
                        {
-                       if (!pixbuf) gtk_list_store_set(GTK_LIST_STORE(store), &iter, SEARCH_COLUMN_THUMB, mfd->fd->pixbuf, -1);
+                       if (!pixbuf) gtk_list_store_set(GTK_LIST_STORE(store), &iter, SEARCH_COLUMN_THUMB, mfd->fd->thumb_pixbuf, -1);
                        row++;
                        mfd = NULL;
                        }
@@ -1407,9 +1407,9 @@ static void search_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
                }
 
        if (sd->thumb_enable &&
-           sd->click_fd && sd->click_fd->pixbuf)
+           sd->click_fd && sd->click_fd->thumb_pixbuf)
                {
-               dnd_set_drag_icon(widget, context, sd->click_fd->pixbuf, search_result_selection_count(sd, NULL));
+               dnd_set_drag_icon(widget, context, sd->click_fd->thumb_pixbuf, search_result_selection_count(sd, NULL));
                }
 }
 
index 4247ae4..5642724 100644 (file)
@@ -44,7 +44,7 @@ static gint thumb_loader_save_to_cache(ThumbLoader *tl)
        gint success = FALSE;
        mode_t mode = 0755;
 
-       if (!tl || !tl->fd || !tl->fd->pixbuf) return FALSE;
+       if (!tl || !tl->fd || !tl->fd->thumb_pixbuf) return FALSE;
 
        cache_dir = cache_get_location(CACHE_TYPE_THUMB, tl->fd->path, FALSE, &mode);
 
@@ -60,7 +60,7 @@ static gint thumb_loader_save_to_cache(ThumbLoader *tl)
                DEBUG_1("Saving thumb: %s", cache_path);
 
                pathl = path_from_utf8(cache_path);
-               success = pixbuf_to_file_as_png(tl->fd->pixbuf, pathl);
+               success = pixbuf_to_file_as_png(tl->fd->thumb_pixbuf, pathl);
                if (success)
                        {
                        struct utimbuf ut;
@@ -225,8 +225,8 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
                
                if (tl->fd)
                        {
-                       if (tl->fd->pixbuf) g_object_unref(tl->fd->pixbuf);
-                       tl->fd->pixbuf = gdk_pixbuf_scale_simple(pixbuf, w, h, (GdkInterpType)options->thumbnails.quality);
+                       if (tl->fd->thumb_pixbuf) g_object_unref(tl->fd->thumb_pixbuf);
+                       tl->fd->thumb_pixbuf = gdk_pixbuf_scale_simple(pixbuf, w, h, (GdkInterpType)options->thumbnails.quality);
                        }
                save = TRUE;
                }
@@ -234,9 +234,9 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
                {
                if (tl->fd)
                        {
-                       if (tl->fd->pixbuf) g_object_unref(tl->fd->pixbuf);
-                       tl->fd->pixbuf = pixbuf;
-                       gdk_pixbuf_ref(tl->fd->pixbuf);
+                       if (tl->fd->thumb_pixbuf) g_object_unref(tl->fd->thumb_pixbuf);
+                       tl->fd->thumb_pixbuf = pixbuf;
+                       gdk_pixbuf_ref(tl->fd->thumb_pixbuf);
                        }
                save = il->shrunk;
                }
@@ -391,9 +391,9 @@ gint thumb_loader_start(ThumbLoader *tl, FileData *fd)
 
        if (!cache_path && options->thumbnails.use_xvpics)
                {
-               if (tl->fd->pixbuf) g_object_unref(tl->fd->pixbuf);
-               tl->fd->pixbuf = get_xv_thumbnail(tl->fd->path, tl->max_w, tl->max_h);
-               if (tl->fd->pixbuf)
+               if (tl->fd->thumb_pixbuf) g_object_unref(tl->fd->thumb_pixbuf);
+               tl->fd->thumb_pixbuf = get_xv_thumbnail(tl->fd->path, tl->max_w, tl->max_h);
+               if (tl->fd->thumb_pixbuf)
                        {
                        thumb_loader_delay_done(tl);
                        return TRUE;
@@ -456,9 +456,9 @@ GdkPixbuf *thumb_loader_get_pixbuf(ThumbLoader *tl, gint with_fallback)
                return thumb_loader_std_get_pixbuf((ThumbLoaderStd *)tl, with_fallback);
                }
 
-       if (tl && tl->fd && tl->fd->pixbuf)
+       if (tl && tl->fd && tl->fd->thumb_pixbuf)
                {
-               pixbuf = tl->fd->pixbuf;
+               pixbuf = tl->fd->thumb_pixbuf;
                g_object_ref(pixbuf);
                }
        else if (with_fallback)
index 4967ef8..6c62814 100644 (file)
@@ -577,8 +577,8 @@ static void thumb_loader_std_done_cb(ImageLoader *il, gpointer data)
 
        if (tl->fd)
                {
-               if (tl->fd->pixbuf) g_object_unref(tl->fd->pixbuf);
-               tl->fd->pixbuf = thumb_loader_std_finish(tl, pixbuf, il->shrunk);
+               if (tl->fd->thumb_pixbuf) g_object_unref(tl->fd->thumb_pixbuf);
+               tl->fd->thumb_pixbuf = thumb_loader_std_finish(tl, pixbuf, il->shrunk);
                }
 
        if (tl->func_done) tl->func_done(tl, tl->data);
@@ -722,9 +722,9 @@ GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl, gint with_fallback)
 {
        GdkPixbuf *pixbuf;
 
-       if (tl && tl->fd && tl->fd->pixbuf)
+       if (tl && tl->fd && tl->fd->thumb_pixbuf)
                {
-               pixbuf = tl->fd->pixbuf;
+               pixbuf = tl->fd->thumb_pixbuf;
                g_object_ref(pixbuf);
                }
        else if (with_fallback)
index 51befa6..a02c55a 100644 (file)
@@ -446,7 +446,7 @@ struct _FileData {
        GList *sidecar_files;
        FileData *parent; /* parent file if this is a sidecar file, NULL otherwise */
        FileDataChangeInfo *change; /* for rename, move ... */
-       GdkPixbuf *pixbuf;
+       GdkPixbuf *thumb_pixbuf;
        gint ref;
        gint version; /* increased when any field in this structure is changed */
        gint user_orientation;
index 9a31de9..7ed274a 100644 (file)
@@ -528,7 +528,7 @@ static void vficon_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
 
        tip_unschedule(vf);
 
-       if (VFICON_INFO(vf, click_id) && VFICON_INFO(vf, click_id)->fd->pixbuf)
+       if (VFICON_INFO(vf, click_id) && VFICON_INFO(vf, click_id)->fd->thumb_pixbuf)
                {
                gint items;
 
@@ -537,7 +537,7 @@ static void vficon_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
                else
                        items = 1;
 
-               dnd_set_drag_icon(widget, context, VFICON_INFO(vf, click_id)->fd->pixbuf, items);
+               dnd_set_drag_icon(widget, context, VFICON_INFO(vf, click_id)->fd->thumb_pixbuf, items);
                }
 }
 
@@ -1806,7 +1806,7 @@ static gdouble vficon_thumb_progress(ViewFile *vf)
                FileData *fd = id->fd;
                work = work->next;
 
-               if (fd->pixbuf) done++;
+               if (fd->thumb_pixbuf) done++;
                count++;
                }
        DEBUG_1("thumb progress: %d of %d", done, count);
@@ -1901,7 +1901,7 @@ static gint vficon_thumb_next(ViewFile *vf)
                        while (!fd && list)
                                {
                                IconData *id = list->data;
-                               if (id && !id->fd->pixbuf) fd = id->fd;
+                               if (id && !id->fd->thumb_pixbuf) fd = id->fd;
                                list = list->next;
                                }
 
@@ -1920,7 +1920,7 @@ static gint vficon_thumb_next(ViewFile *vf)
                        FileData *fd_p = id->fd;
                        work = work->next;
 
-                       if (!fd_p->pixbuf) fd = fd_p;
+                       if (!fd_p->thumb_pixbuf) fd = fd_p;
                        }
                }
 
@@ -2263,7 +2263,7 @@ static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer
                {
                if (id)
                        {
-                       g_object_set(cell,      "pixbuf", id->fd->pixbuf,
+                       g_object_set(cell,      "pixbuf", id->fd->thumb_pixbuf,
                                                "text", id->fd->name,
                                                "cell-background-gdk", &color_bg,
                                                "cell-background-set", TRUE,
index 728aecc..274da40 100644 (file)
@@ -260,7 +260,7 @@ static void vflist_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
        vflist_color_set(vf, VFLIST_INFO(vf, click_fd), TRUE);
 
        if (VFLIST_INFO(vf, thumbs_enabled) &&
-           VFLIST_INFO(vf, click_fd) && VFLIST_INFO(vf, click_fd)->pixbuf)
+           VFLIST_INFO(vf, click_fd) && VFLIST_INFO(vf, click_fd)->thumb_pixbuf)
                {
                guint items;
 
@@ -269,7 +269,7 @@ static void vflist_dnd_begin(GtkWidget *widget, GdkDragContext *context, gpointe
                else
                        items = 1;
 
-               dnd_set_drag_icon(widget, context, VFLIST_INFO(vf, click_fd)->pixbuf, items);
+               dnd_set_drag_icon(widget, context, VFLIST_INFO(vf, click_fd)->thumb_pixbuf, items);
                }
 }
 
@@ -755,7 +755,7 @@ static void vflist_setup_iter(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *it
 
        gtk_tree_store_set(store, iter, FILE_COLUMN_POINTER, fd,
                                        FILE_COLUMN_VERSION, fd->version,
-                                       FILE_COLUMN_THUMB, fd->pixbuf,
+                                       FILE_COLUMN_THUMB, fd->thumb_pixbuf,
                                        FILE_COLUMN_MULTILINE, multiline,
                                        FILE_COLUMN_NAME, name_sidecars,
                                        FILE_COLUMN_SIZE, size,
@@ -983,7 +983,7 @@ static void vflist_thumb_progress_count(GList *list, gint *count, gint *done)
                FileData *fd = work->data;
                work = work->next;
 
-               if (fd->pixbuf) (*done)++;
+               if (fd->thumb_pixbuf) (*done)++;
                
                if (fd->sidecar_files) 
                        {
@@ -1038,7 +1038,7 @@ static void vflist_thumb_do(ViewFile *vf, ThumbLoader *tl, FileData *fd)
        if (!fd || vflist_find_row(vf, fd, &iter) < 0) return;
 
        store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview)));
-       gtk_tree_store_set(store, &iter, FILE_COLUMN_THUMB, fd->pixbuf, -1);
+       gtk_tree_store_set(store, &iter, FILE_COLUMN_THUMB, fd->thumb_pixbuf, -1);
 
        vflist_thumb_status(vf, vflist_thumb_progress(vf), _("Loading thumbs..."));
 }
@@ -1088,7 +1088,7 @@ static gint vflist_thumb_next(ViewFile *vf)
                while (!fd && valid && tree_view_row_get_visibility(GTK_TREE_VIEW(vf->listview), &iter, FALSE) == 0)
                        {
                        gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &fd, -1);
-                       if (fd->pixbuf) fd = NULL;
+                       if (fd->thumb_pixbuf) fd = NULL;
 
                        valid = gtk_tree_model_iter_next(store, &iter);
                        }
@@ -1102,7 +1102,7 @@ static gint vflist_thumb_next(ViewFile *vf)
                while (work && !fd)
                        {
                        FileData *fd_p = work->data;
-                       if (!fd_p->pixbuf)
+                       if (!fd_p->thumb_pixbuf)
                                fd = fd_p;
                        else
                                {
@@ -1111,7 +1111,7 @@ static gint vflist_thumb_next(ViewFile *vf)
                                while (work2 && !fd)
                                        {
                                        fd_p = work2->data;
-                                       if (!fd_p->pixbuf) fd = fd_p;
+                                       if (!fd_p->thumb_pixbuf) fd = fd_p;
                                        work2 = work2->next;
                                        }
                                }