Big whitespaces cleanup:
authorLaurent Monin <geeqie@norz.org>
Sun, 20 Apr 2008 13:04:57 +0000 (13:04 +0000)
committerLaurent Monin <geeqie@norz.org>
Sun, 20 Apr 2008 13:04:57 +0000 (13:04 +0000)
- drop whitespaces at end of lines
- convert eight spaces to tab at start of lines
- drop spurious spaces mixed with tabs
- remove empty lines at end of files

81 files changed:
src/ClayRGB1998_icc.h
src/bar_exif.c
src/bar_info.c
src/bar_sort.c
src/cache.c
src/cache_maint.c
src/cellrenderericon.c
src/collect-dlg.c
src/collect-io.c
src/collect-table.c
src/collect.c
src/color-man.c
src/dupe.c
src/editors.c
src/editors.h
src/exif-common.c
src/exif-int.h
src/exif.c
src/exif.h
src/filelist.c
src/filelist.h
src/format_canon.c
src/format_canon.h
src/format_fuji.c
src/format_nikon.c
src/format_olympus.c
src/format_raw.c
src/fullscreen.c
src/globals.c
src/histogram.c
src/image-load.c
src/image-overlay.c
src/image.c
src/image.h
src/img-view.c
src/info.c
src/intl.h
src/layout.c
src/layout_config.c
src/layout_image.c
src/layout_util.c
src/main.c
src/main.h
src/md5-util.c
src/menu.c
src/pan-calendar.c
src/pan-item.c
src/pan-view.c
src/pixbuf-renderer.c
src/pixbuf-renderer.h
src/pixbuf_util.c
src/preferences.c
src/print.c
src/rcfile.c
src/remote.c
src/remote.h
src/search.c
src/secure_save.c
src/similar.c
src/similar.h
src/thumb.c
src/thumb_standard.c
src/typedefs.h
src/ui_bookmark.c
src/ui_fileops.c
src/ui_fileops.h
src/ui_menu.c
src/ui_menu.h
src/ui_misc.c
src/ui_misc.h
src/ui_pathsel.c
src/ui_spinner.c
src/ui_tabcomp.c
src/ui_tree_edit.c
src/ui_utildlg.c
src/utilops.c
src/view_dir.c
src/view_dir_list.c
src/view_dir_tree.c
src/view_file_icon.c
src/view_file_list.c

index fb0e6c8..fc14806 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * This file was generated from ClayRGB1998.icc, DO NOT EDIT 
- * http://www.argyllcms.com/ClayRGB1998.zip 
- */ 
+ * This file was generated from ClayRGB1998.icc, DO NOT EDIT
+ * http://www.argyllcms.com/ClayRGB1998.zip
+ */
 unsigned char ClayRGB1998_icc[] = {
   0x00, 0x00, 0x02, 0x44, 0x61, 0x72, 0x67, 0x6c, 0x02, 0x20, 0x00, 0x00,
   0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
index 1c0f875..70ed5fa 100644 (file)
@@ -58,8 +58,8 @@ ExifUI ExifUIList[]={
  */
 
 static void table_add_line_custom(GtkWidget *table, gint x, gint y,
-                                  const gchar *text1, const gchar *text2,
-                                  GtkWidget **label1, GtkWidget **label2)
+                                 const gchar *text1, const gchar *text2,
+                                 GtkWidget **label1, GtkWidget **label2)
 {
        GtkWidget *label;
        gchar *buf;
@@ -203,7 +203,7 @@ static void bar_exif_update(ExifBar *eb)
                        text = bar_exif_validate_text(text);
                        if (ExifUIList[i].current == EXIF_UI_IFSET
                            && (!text || !*text))
-                               {
+                               {
                                gtk_widget_hide(eb->labels[i]);
                                gtk_widget_hide(eb->keys[i]);
                                continue;
@@ -260,7 +260,7 @@ static void bar_exif_update(ExifBar *eb)
                GtkListStore *store;
                GtkTreeIter iter;
                ExifItem *item;
-               
+
                store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(eb->listview)));
                gtk_list_store_clear(store);
 
@@ -622,7 +622,7 @@ GtkWidget *bar_exif_new(gint show_title, FileData *fd, gint advanced, GtkWidget
                const gchar *text;
 
                text = exif_get_description_by_key(ExifUIList[i].key);
-               eb->labels[i] = table_add_line(table, 0, i, text, NULL, 
+               eb->labels[i] = table_add_line(table, 0, i, text, NULL,
                      &eb->keys[i]);
                }
 
index 675658e..f6b5241 100644 (file)
@@ -239,7 +239,7 @@ static gint comment_xmp_read(FileData *fd, GList **keywords, gchar **comment)
                ExifItem *item = exif_get_item(exif, comment_key);
                *comment = exif_item_get_string(item, 0);
                }
-       
+
        if (keywords)
                {
                ExifItem *item = exif_get_item(exif, keyword_key);
@@ -247,19 +247,19 @@ static gint comment_xmp_read(FileData *fd, GList **keywords, gchar **comment)
                int i = 0;
                GList *work = NULL;
                char *kw = NULL;
-               
+
                while (i < count && (kw = exif_item_get_string(item, i++)))
                        {
                        work = g_list_append(work, (gpointer) kw);
                        }
-               
+
                *keywords = work;
                }
-               
+
        exif_free(exif);
-       
+
        success = *comment || *keywords;
-       
+
        return success;
 }
 
@@ -271,13 +271,13 @@ static gint comment_xmp_write(FileData *fd, GList *keywords, const gchar *commen
        if (!exif) return FALSE;
 
        ExifItem *item = exif_get_item(exif, comment_key);
-       
-       if (item && !(comment && comment[0])) 
+
+       if (item && !(comment && comment[0]))
                {
-               exif_item_delete(exif, item); 
+               exif_item_delete(exif, item);
                item = NULL;
                }
-               
+
        if (!item && comment && comment[0]) item = exif_add_item(exif, comment_key);
        if (item) exif_item_set_string(item, comment);
 
@@ -287,24 +287,24 @@ static gint comment_xmp_write(FileData *fd, GList *keywords, const gchar *commen
                {
                exif_item_delete(exif, item);
                }
-       
+
        if (work)
                {
                item = exif_add_item(exif, keyword_key);
-               
+
                while (work)
                        {
                        gchar *kw = (gchar *) work->data;
                        work = work->next;
-               
+
                        exif_item_set_string(item, kw);
                        }
                }
-       
+
        success = exif_write(exif);
-               
+
        exif_free(exif);
-       
+
        return success;
 }
 
@@ -334,12 +334,12 @@ gint comment_read(FileData *fd, GList **keywords, gchar **comment)
 
        res1 = comment_xmp_read(fd, &keywords1, &comment1);
        res2 = comment_legacy_read(fd, &keywords2, &comment2);
-        
+
        if (!res1 && !res2)
                {
                return FALSE;
                }
-       
+
        if (keywords)
                {
                if (res1 && res2)
@@ -352,7 +352,7 @@ gint comment_read(FileData *fd, GList **keywords, gchar **comment)
                if (res1) string_list_free(keywords1);
                if (res2) string_list_free(keywords2);
                }
-               
+
 
        if (comment)
                {
@@ -363,7 +363,7 @@ gint comment_read(FileData *fd, GList **keywords, gchar **comment)
                }
        if (res1 && (!comment || *comment != comment1)) g_free(comment1);
        if (res2 && (!comment || *comment != comment2)) g_free(comment2);
-       
+
        return TRUE;
 }
 
@@ -372,10 +372,10 @@ static gchar *comment_pull(GtkWidget *textview)
 {
        GtkTextBuffer *buffer;
        GtkTextIter start, end;
-                                                                                                                    
+
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
        gtk_text_buffer_get_bounds(buffer, &start, &end);
-                                                                                                                    
+
        return gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
 }
 
@@ -426,7 +426,7 @@ GList *keyword_list_pull(GtkWidget *text_widget)
                        ptr++;
                        l++;
                        }
-       
+
                /* trim starting and ending whitespaces */
                while (l > 0 && g_ascii_isspace(*begin)) begin++, l--;
                while (l > 0 && g_ascii_isspace(begin[l-1])) l--;
@@ -434,7 +434,7 @@ GList *keyword_list_pull(GtkWidget *text_widget)
                if (l > 0)
                        {
                        gchar *keyword = g_strndup(begin, l);
-                       
+
                        /* only add if not already in the list */
                        if (keyword_list_find(list, keyword) == FALSE)
                                list = g_list_append(list, keyword);
@@ -1312,7 +1312,7 @@ GtkWidget *bar_info_new(FileData *fd, gint metadata_only, GtkWidget *bounding_wi
        bar_info_selection(bd->vbox, 0);
 
        bar_list = g_list_append(bar_list, bd);
-       
+
        return bd->vbox;
 }
 
index 3b76471..331d894 100644 (file)
@@ -617,7 +617,7 @@ GtkWidget *bar_sort_new(LayoutWindow *lw)
        sd->mode = -1;
        bar_sort_mode_sync(sd, bar_sort_mode_state);
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), sd->mode);
-       
+
        return sd->vbox;
 }
 
index 085b7f8..9a082fc 100644 (file)
@@ -23,7 +23,7 @@
  *-------------------------------------------------------------------
  * Cache data file format:
  *-------------------------------------------------------------------
- * 
+ *
  * SIMcache
  * #coment
  * Dimensions=[<width> x <height>]
@@ -31,8 +31,8 @@
  * Checksum=[<value>]
  * MD5sum=[<32 character ascii text digest>]
  * SimilarityGrid[32 x 32]=<3072 bytes of data (1024 pixels in RGB format, 1 pixel is 24bits)>
- * 
- * 
+ *
+ *
  * The first line (9 bytes) indicates it is a SIMcache format file. (new line char must exist)
  * Comment lines starting with a # are ignored up to a new line.
  * All data lines should end with a new line char.
index cb2785b..350d610 100644 (file)
@@ -174,15 +174,15 @@ static gint cache_maintain_home_cb(gpointer data)
 
                        just_done = TRUE;
                        still_have_a_file = FALSE;
-       
+
                        work = list;
                        while (work)
                                {
                                gchar *path_buf = work->data;
                                gchar *dot;
-       
+
                                dot = extension_find_dot(path_buf);
-       
+
                                if (dot) *dot = '\0';
                                if ((!cm->metadata && cm->clear) ||
                                    (strlen(path_buf) > base_length && !isfile(path_buf + base_length)) )
@@ -205,7 +205,7 @@ static gint cache_maintain_home_cb(gpointer data)
        if (cm->list && g_list_find(cm->done_list, cm->list->data) != NULL)
                {
                /* check if the dir is empty */
-               
+
                if (cm->list->data == path && just_done)
                        {
                        if (!still_have_a_file && !dlist && cm->list->next && !rmdir_utf8(path))
@@ -338,7 +338,7 @@ void cache_maintain_home(gint metadata, gint clear, GtkWidget *parent)
        cm->spinner = spinner_new(NULL, SPINNER_SPEED);
        gtk_box_pack_start(GTK_BOX(hbox), cm->spinner, FALSE, FALSE, 0);
        gtk_widget_show(cm->spinner);
-       
+
        gtk_widget_show(cm->gd->dialog);
 
        cm->idle_id = g_idle_add(cache_maintain_home_cb, cm);
@@ -538,7 +538,7 @@ void cache_maint_moved(FileData *fd)
                {
                gchar *buf;
                gchar *d;
-                                                                                                                    
+
                buf = cache_find_location(CACHE_TYPE_METADATA, src);
                d = cache_get_location(CACHE_TYPE_METADATA, dest, TRUE, NULL);
                cache_file_move(buf, d);
@@ -592,7 +592,7 @@ void cache_maint_copied(FileData *fd)
        if (cache_ensure_dir_exists(dest_base, mode))
                {
                gchar *path;
-                                                                                                                    
+
                path = cache_get_location(CACHE_TYPE_METADATA, fd->change->dest, TRUE, NULL);
                if (!copy_file(src_cache, path))
                        {
@@ -793,7 +793,7 @@ static void cache_manager_render_start_cb(GenericDialog *fd, gpointer data)
        if (!isdir(path))
                {
                warning_dialog(_("Invalid folder"),
-                               _("The specified folder can not be found."),
+                               _("The specified folder can not be found."),
                               GTK_STOCK_DIALOG_WARNING, cd->gd->dialog);
                }
        else
@@ -974,7 +974,7 @@ static void cache_manager_standard_clean_valid_cb(const gchar *path, gint valid,
 
                next_path = cd->list->data;
                cd->list = g_list_remove(cd->list, next_path);
-       
+
                cd->tl = thumb_loader_std_thumb_file_validate(next_path, cd->days,
                                                              cache_manager_standard_clean_valid_cb, cd);
                g_free(next_path);
index 14f12f1..b77d37b 100644 (file)
@@ -27,9 +27,9 @@
 #define FIXED_ICON_SIZE_MAX 512
 
 static void gqv_cell_renderer_icon_get_property(GObject                *object,
-                                               guint           param_id,
-                                               GValue          *value,
-                                               GParamSpec      *pspec);
+                                               guint           param_id,
+                                               GValue          *value,
+                                               GParamSpec      *pspec);
 static void gqv_cell_renderer_icon_set_property(GObject                *object,
                                                guint           param_id,
                                                const GValue    *value,
@@ -91,7 +91,7 @@ gqv_cell_renderer_icon_get_type (void)
                };
 
        cell_icon_type = g_type_register_static(GTK_TYPE_CELL_RENDERER,
-                                               "GQvCellRendererIcon",
+                                               "GQvCellRendererIcon",
                                                &cell_icon_info, 0);
        }
 
@@ -223,7 +223,7 @@ gqv_cell_renderer_icon_get_property(GObject *object,
                                    GParamSpec  *pspec)
 {
        GQvCellRendererIcon *cellicon = GQV_CELL_RENDERER_ICON (object);
-  
+
        switch (param_id)
                {
                case PROP_PIXBUF:
@@ -337,7 +337,7 @@ gqv_cell_renderer_icon_set_property(GObject         *object,
                                    GParamSpec          *pspec)
 {
        GQvCellRendererIcon *cellicon = GQV_CELL_RENDERER_ICON (object);
-  
+
        switch (param_id)
                {
                case PROP_PIXBUF:
@@ -433,7 +433,7 @@ gqv_cell_renderer_icon_get_layout(GQvCellRendererIcon *cellicon, GtkWidget *widg
 
 /**
  * gqv_cell_renderer_icon_new:
- * 
+ *
  * Creates a new #GQvCellRendererIcon. Adjust rendering
  * parameters using object properties. Object properties can be set
  * globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
@@ -441,7 +441,7 @@ gqv_cell_renderer_icon_get_layout(GQvCellRendererIcon *cellicon, GtkWidget *widg
  * can bind the "pixbuf" property on the cell renderer to a pixbuf value
  * in the model, thus rendering a different image in each row of the
  * #GtkTreeView.
- * 
+ *
  * Return value: the new cell renderer
  **/
 GtkCellRenderer *
@@ -605,7 +605,7 @@ gqv_cell_renderer_icon_render(GtkCellRenderer               *cell,
                PangoLayout *layout;
                PangoRectangle text_rect;
                GdkRectangle pix_rect;
-                GdkRectangle draw_rect;
+               GdkRectangle draw_rect;
 
                layout = gqv_cell_renderer_icon_get_layout(cellicon, widget, TRUE);
                pango_layout_get_pixel_extents(layout, NULL, &text_rect);
index cb30c77..0dd324d 100644 (file)
@@ -101,7 +101,7 @@ static void collection_save_cb(FileDialog *fd, gpointer data)
        const gchar *path;
 
        path = fd->dest_path;
-       
+
        if (!(strlen(path) > 7 && strncasecmp(path + (strlen(path) - 4), ".gqv", 4) == 0))
                {
                gchar *buf;
index c0492e6..4ec00be 100644 (file)
@@ -90,7 +90,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
        if (!path && !cd->path) return FALSE;
 
        if (!path) path = cd->path;
-       
+
        if (debug) printf("collection load: append=%d flush=%d only_geometry=%d path=%s\n",
                          append, flush, only_geometry, path);
 
@@ -128,7 +128,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
                                limit_failures = FALSE;
                                }
                        else if (strncmp(p, "#geometry:", 10 ) == 0 &&
-                                scan_geometry(p + 10, &cd->window_x, &cd->window_y, &cd->window_w, &cd->window_h))
+                                scan_geometry(p + 10, &cd->window_x, &cd->window_y, &cd->window_w, &cd->window_h))
                                {
                                has_geometry_header = TRUE;
                                cd->window_read = TRUE;
@@ -150,10 +150,10 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
                if (buf)
                        {
                        gint valid;
-                       
+
                        if (!flush)
                                changed |= collect_manager_process_action(entry, &buf);
-                       
+
                        valid = (buf[0] == '/' && collection_add_check(cd, file_data_new_simple(buf), FALSE, TRUE));
                        if (debug && !valid) printf("collection invalid file: %s\n", buf);
                        g_free(buf);
@@ -175,7 +175,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
                }
 
        if (debug) printf("collection files: total = %d fail = %d official=%d gqview=%d geometry=%d\n",
-                         total, fail, has_official_header, has_gqview_header, has_geometry_header); 
+                         total, fail, has_official_header, has_gqview_header, has_geometry_header);
 
        fclose(f);
        if (only_geometry) return has_geometry_header;
@@ -192,13 +192,13 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, Colle
                }
 
        cd->list = collection_list_sort(cd->list, cd->sort_method);
-       
+
        if (!flush && changed && success)
                collection_save_private(cd, path);
-               
+
        if (!flush)
                collect_manager_entry_reset(entry);
-       
+
        if (!append) cd->changed = FALSE;
 
        return success;
@@ -545,7 +545,7 @@ static CollectManagerEntry *collect_manager_get_entry(const gchar *path)
 
                entry = work->data;
                work = work->next;
-               if (strcmp(entry->path, path) == 0) 
+               if (strcmp(entry->path, path) == 0)
                        {
                        return entry;
                        }
@@ -558,9 +558,9 @@ static void collect_manager_entry_add_action(CollectManagerEntry *entry, Collect
 {
 
        CollectManagerAction *orig_action;
-       
-       entry->empty = FALSE; 
-       
+
+       entry->empty = FALSE;
+
        if (action->oldpath == NULL)
                {
                /* add file */
@@ -568,7 +568,7 @@ static void collect_manager_entry_add_action(CollectManagerEntry *entry, Collect
                        {
                        return;
                        }
-               
+
                orig_action = g_hash_table_lookup(entry->newpath_hash, action->newpath);
                if (orig_action)
                        {
@@ -588,7 +588,7 @@ static void collect_manager_entry_add_action(CollectManagerEntry *entry, Collect
                {
                /* new action with the same file */
                CollectManagerAction *new_action = collect_manager_action_new(orig_action->oldpath, action->newpath, action->type);
-               
+
                if (new_action->oldpath)
                        {
                        g_hash_table_steal(entry->oldpath_hash, orig_action->oldpath);
@@ -599,11 +599,11 @@ static void collect_manager_entry_add_action(CollectManagerEntry *entry, Collect
                        GList *work = g_list_find(entry->add_list, orig_action);
                        work->data = new_action;
                        }
-               
+
                g_hash_table_steal(entry->newpath_hash, orig_action->newpath);
-               if (new_action->newpath) 
+               if (new_action->newpath)
                        {
-                       g_hash_table_insert(entry->newpath_hash, new_action->newpath, new_action); 
+                       g_hash_table_insert(entry->newpath_hash, new_action->newpath, new_action);
                        }
                collect_manager_action_unref(orig_action);
                return;
@@ -618,11 +618,11 @@ static void collect_manager_entry_add_action(CollectManagerEntry *entry, Collect
                        action->oldpath, entry->path);
                return;
                }
-       
+
        g_hash_table_insert(entry->oldpath_hash, action->oldpath, action);
        if (action->newpath)
                {
-               g_hash_table_insert(entry->newpath_hash, action->newpath, action); 
+               g_hash_table_insert(entry->newpath_hash, action->newpath, action);
                }
        collect_manager_action_ref(action);
 }
@@ -631,7 +631,7 @@ static gint collect_manager_process_action(CollectManagerEntry *entry, gchar **p
 {
        gchar *path = *path_ptr;
        CollectManagerAction *action;
-       
+
        if (path == NULL)
                {
                /* get new files */
@@ -647,9 +647,9 @@ static gint collect_manager_process_action(CollectManagerEntry *entry, gchar **p
                *path_ptr = path;
                return (path != NULL);
                }
-               
+
        action = g_hash_table_lookup(entry->oldpath_hash, path);
-       
+
        if (action)
                {
                g_free(path);
index e9b5d1a..5ac11a8 100644 (file)
@@ -383,7 +383,7 @@ static void collection_table_select_region_util(CollectTable *ct, CollectInfo *s
                        {
                        info = work->data;
                        collection_table_select_util(ct, info, select);
-                       
+
                        if (work->data != end)
                                work = work->next;
                        else
@@ -680,7 +680,7 @@ static void collection_table_popup_remove_cb(GtkWidget *widget, gpointer data)
        GList *list;
 
        if (!ct->click_info) return;
-                                                                                                                               
+
        if (INFO_SELECTED(ct->click_info))
                {
                list = g_list_copy(ct->selection);
@@ -812,7 +812,7 @@ static GtkWidget *collection_table_popup_menu(CollectTable *ct, gint over_icon)
        menu_item_add_stock(menu, _("_Find duplicates..."), GTK_STOCK_FIND,
                        G_CALLBACK(collection_table_popup_find_dupes_cb), ct);
        menu_item_add_stock_sensitive(menu, _("Print..."), GTK_STOCK_PRINT, over_icon,
-                       G_CALLBACK(collection_table_popup_print_cb), ct);               
+                       G_CALLBACK(collection_table_popup_print_cb), ct);
 
        return menu;
 }
@@ -2010,7 +2010,7 @@ static void collection_table_dnd_get(GtkWidget *widget, GdkDragContext *context,
        if (!ct->click_info) return;
 
        selected = INFO_SELECTED(ct->click_info);
-       
+
        switch (info)
                {
                case TARGET_APP_COLLECTION_MEMBER:
@@ -2177,7 +2177,7 @@ static void collection_table_dnd_leave(GtkWidget *widget, GdkDragContext *contex
 
        collection_table_scroll(ct, FALSE);
 }
+
 static void collection_table_dnd_init(CollectTable *ct)
 {
        gtk_drag_source_set(ct->listview, GDK_BUTTON1_MASK | GDK_BUTTON2_MASK,
index cc3fe0d..f1def14 100644 (file)
@@ -98,7 +98,7 @@ gint collection_info_load_thumb(CollectInfo *ci)
 
        printf("collection_info_load_thumb not implemented!\n(because an instant thumb loader not implemented)");
        return FALSE;
-#if 0  
+#if 0
        if (create_thumbnail(ci->fd->path, &ci->pixmap, &ci->mask) < 0) return FALSE;
 
        if (ci->pixmap) gdk_pixmap_ref(ci->pixmap);
@@ -372,7 +372,7 @@ void collection_free(CollectionData *cd)
        collection_list = g_list_remove(collection_list, cd);
 
        g_hash_table_destroy(cd->existence);
-       
+
        g_free(cd->path);
        g_free(cd->name);
 
@@ -900,7 +900,7 @@ static gint collection_window_keypress(GtkWidget *widget, GdkEventKey *event, gp
                                if (!cw->cd->path)
                                        {
                                        collection_dialog_save_as(NULL, cw->cd);
-                                       }
+                                       }
                                else if (!collection_save(cw->cd, cw->cd->path))
                                        {
                                        printf("failed saving to collection path: %s\n", cw->cd->path);
@@ -1070,7 +1070,7 @@ static void collection_close_save_cb(GenericDialog *gd, gpointer data)
        generic_dialog_close(gd);
 
        if (!cw->cd->path)
-                {
+               {
                collection_dialog_save_close(NULL, cw->cd);
                return;
                }
index d52296f..377c535 100644 (file)
@@ -293,7 +293,7 @@ void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, g
        gint rs;
        gint i;
        gint pixbuf_width, pixbuf_height;
-       
+
 
        pixbuf_width = gdk_pixbuf_get_width(pixbuf);
        pixbuf_height = gdk_pixbuf_get_height(pixbuf);
@@ -312,7 +312,7 @@ void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, g
                guchar *pbuf;
 
                pbuf = pix + ((y + i) * rs);
-               
+
                cmsDoTransform(cc->transform, pbuf, pbuf, w);
                }
 
index 9871bc3..b6947a4 100644 (file)
@@ -141,7 +141,7 @@ static void dupe_window_update_progress(DupeWindow *dw, const gchar *status, gdo
                        {
                        new_time = msec_time() - dw->setup_time;
                        }
-               
+
                if (!force &&
                    value != 0.0 &&
                    dw->setup_count > 0 &&
@@ -199,7 +199,7 @@ static void dupe_window_update_progress(DupeWindow *dw, const gchar *status, gdo
                        {
                        status_text = NULL;
                        }
-               }       
+               }
        else
                {
                gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(dw->extra_label), 0.0);
@@ -214,7 +214,7 @@ static void widget_set_cursor(GtkWidget *widget, gint icon)
        GdkCursor *cursor;
 
        if (!widget->window) return;
+
        if (icon == -1)
                {
                cursor = NULL;
@@ -223,9 +223,9 @@ static void widget_set_cursor(GtkWidget *widget, gint icon)
                {
                cursor = gdk_cursor_new (icon);
                }
+
        gdk_window_set_cursor(widget->window, cursor);
+
        if (cursor) gdk_cursor_unref(cursor);
 }
 
@@ -797,7 +797,7 @@ static void dupe_match_unlink(DupeItem *a, DupeItem *b)
 static void dupe_match_link_clear(DupeItem *parent, gint unlink_children)
 {
        GList *work;
-                                                                                                                               
+
        work = parent->group;
        while (work)
                {
@@ -985,7 +985,7 @@ static GList *dupe_match_unlink_by_rank(DupeItem *child, DupeItem *parent, GList
                                list = g_list_remove(list, orphan);
                                }
                        }
-               
+
                rank = dupe_match_link_rank(child, parent);
                dupe_match_link_clear(parent, TRUE);
                dupe_match_link(child, parent, rank);
@@ -994,7 +994,7 @@ static GList *dupe_match_unlink_by_rank(DupeItem *child, DupeItem *parent, GList
        else
                {
                if (debug > 1) printf("unlinking %s and %s\n", child->fd->name, parent->fd->name);
-               
+
                dupe_match_unlink(child, parent);
                }
 
@@ -1083,7 +1083,7 @@ static GList *dupe_match_rank_sort(GList *source_list)
                        dupe_match_rank_update(di);
                        list = g_list_prepend(list, di);
                        }
-                       
+
                work = work->next;
                }
 
@@ -1097,7 +1097,7 @@ static void dupe_match_rank(DupeWindow *dw)
        list = dupe_match_rank_sort(dw->list);
 
        if (debug > 1) dupe_match_print_list(list);
-       
+
        if (debug) printf("Similar items: %d\n", g_list_length(list));
        list = dupe_match_group_trim(list, dw);
        if (debug) printf("Unique groups: %d\n", g_list_length(list));
@@ -1663,7 +1663,7 @@ static void dupe_item_remove(DupeWindow *dw, DupeItem *di)
                                {
                                DupeItem *new_parent;
                                DupeMatch *dm;
-                               
+
                                dm = parent->group->data;
                                new_parent = dm->di;
                                dupe_match_reparent(dw, parent, new_parent);
@@ -1813,7 +1813,7 @@ static void dupe_item_update(DupeWindow *dw, DupeItem *di)
                dw->second_drop = second;
                dupe_files_add(dw, NULL, NULL, fd, FALSE);
                dw->second_drop = FALSE;
-               
+
                file_data_unref(fd);
 */
                dupe_check_start(dw);
@@ -1853,7 +1853,7 @@ static void dupe_item_update_fd_in_list(DupeWindow *dw, FileData *fd, GList *wor
                {
                DupeItem *di = work->data;
 
-               if (di->fd == fd) 
+               if (di->fd == fd)
                        dupe_item_update(dw, di);
 
                work = work->next;
@@ -1887,7 +1887,7 @@ static GtkWidget *dupe_display_label(GtkWidget *vbox, const gchar *description,
        label = gtk_label_new(text);
        gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
        gtk_widget_show(label);
-       
+
        gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
        gtk_widget_show(hbox);
 
@@ -1898,7 +1898,7 @@ static void dupe_display_stats(DupeWindow *dw, DupeItem *di)
 {
        GenericDialog *gd;
        gchar *buf;
-       
+
        if (!di) return;
 
        gd = file_util_gen_dlg("Image thumbprint debug info", GQ_WMCLASS, "thumbprint",
@@ -1926,7 +1926,7 @@ static void dupe_display_stats(DupeWindow *dw, DupeItem *di)
                guchar *dp;
                gint rs;
                gint sp;
-               
+
                pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, 32, 32);
                rs = gdk_pixbuf_get_rowstride(pixbuf);
                d_pix = gdk_pixbuf_get_pixels(pixbuf);
@@ -1946,10 +1946,10 @@ static void dupe_display_stats(DupeWindow *dw, DupeItem *di)
                image = gtk_image_new_from_pixbuf(pixbuf);
                gtk_box_pack_start(GTK_BOX(gd->vbox), image, FALSE, FALSE, 0);
                gtk_widget_show(image);
-               
+
                gdk_pixbuf_unref(pixbuf);
                }
-       
+
        gtk_widget_show(gd->dialog);
 }
 
@@ -2653,7 +2653,7 @@ static void dupe_menu_setup(DupeWindow *dw)
 /* this overrides the low default of a GtkCellRenderer from 100 to CELL_HEIGHT_OVERRIDE, something sane for our purposes */
 
 #define CELL_HEIGHT_OVERRIDE 512
-                                                                                                                               
+
 void cell_renderer_height_override(GtkCellRenderer *renderer)
 {
        GParamSpec *spec;
@@ -2752,7 +2752,7 @@ static void dupe_listview_set_height(GtkWidget *listview, gint thumb)
        if (!column) return;
 
        gtk_tree_view_column_set_fixed_width(column, (thumb) ? options->thumbnails.max_width : 4);
-       
+
        list = gtk_tree_view_column_get_cell_renderers(column);
        if (!list) return;
        cell = list->data;
@@ -3104,7 +3104,7 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)
        dw->second_set = FALSE;
 
        dw->window = window_new(GTK_WINDOW_TOPLEVEL, "dupe", NULL, NULL, _("Find duplicates"));
-      
+
        geometry.min_width = 32;
        geometry.min_height = 32;
        geometry.base_width = DUPE_DEF_WIDTH;
@@ -3115,9 +3115,9 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)
        gtk_window_set_default_size(GTK_WINDOW(dw->window), DUPE_DEF_WIDTH, DUPE_DEF_HEIGHT);
 
        gtk_window_set_resizable(GTK_WINDOW(dw->window), TRUE);
-        gtk_container_set_border_width (GTK_CONTAINER (dw->window), 0);
+       gtk_container_set_border_width (GTK_CONTAINER (dw->window), 0);
 
-        g_signal_connect(G_OBJECT(dw->window), "delete_event",
+       g_signal_connect(G_OBJECT(dw->window), "delete_event",
                         G_CALLBACK(dupe_window_delete), dw);
        g_signal_connect(G_OBJECT(dw->window), "key_press_event",
                         G_CALLBACK(dupe_window_keypress_cb), dw);
@@ -3134,7 +3134,7 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)
        gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
        gtk_table_attach_defaults(GTK_TABLE(dw->table), scrolled, 0, 2, 0, 1);
-        gtk_widget_show(scrolled);
+       gtk_widget_show(scrolled);
 
        store = gtk_list_store_new(9, G_TYPE_POINTER, G_TYPE_STRING, GDK_TYPE_PIXBUF,
                                   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
@@ -3174,7 +3174,7 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)
        gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
        gtk_box_pack_start(GTK_BOX(dw->second_vbox), scrolled, TRUE, TRUE, 0);
-        gtk_widget_show(scrolled);
+       gtk_widget_show(scrolled);
 
        store = gtk_list_store_new(2, G_TYPE_POINTER, G_TYPE_STRING);
        dw->second_listview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
@@ -3188,7 +3188,7 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)
        dupe_listview_add_column(dw, dw->second_listview, 1, _("Compare to:"), FALSE, FALSE);
 
        gtk_container_add(GTK_CONTAINER(scrolled), dw->second_listview);
-        gtk_widget_show(dw->second_listview);
+       gtk_widget_show(dw->second_listview);
 
        dw->second_status_label = gtk_label_new("");
        gtk_box_pack_start(GTK_BOX(dw->second_vbox), dw->second_status_label, FALSE, FALSE, 0);
@@ -3221,8 +3221,8 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask)
        gtk_widget_show(button);
 
        status_box = gtk_hbox_new(FALSE, 0);
-        gtk_box_pack_start(GTK_BOX(vbox), status_box, FALSE, FALSE, 0);
-        gtk_widget_show(status_box);
+       gtk_box_pack_start(GTK_BOX(vbox), status_box, FALSE, FALSE, 0);
+       gtk_widget_show(status_box);
 
        frame = gtk_frame_new(NULL);
        gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
@@ -3355,14 +3355,14 @@ static GtkWidget *dupe_confirm_dir_list(DupeWindow *dw, GList *list)
  */
 
 static GtkTargetEntry dupe_drag_types[] = {
-        { "text/uri-list", 0, TARGET_URI_LIST },
-        { "text/plain", 0, TARGET_TEXT_PLAIN }
+       { "text/uri-list", 0, TARGET_URI_LIST },
+       { "text/plain", 0, TARGET_TEXT_PLAIN }
 };
 static gint n_dupe_drag_types = 2;
 
 static GtkTargetEntry dupe_drop_types[] = {
-        { TARGET_APP_COLLECTION_MEMBER_STRING, 0, TARGET_APP_COLLECTION_MEMBER },
-        { "text/uri-list", 0, TARGET_URI_LIST }
+       { TARGET_APP_COLLECTION_MEMBER_STRING, 0, TARGET_APP_COLLECTION_MEMBER },
+       { "text/uri-list", 0, TARGET_URI_LIST }
 };
 static gint n_dupe_drop_types = 2;
 
index 9bebfa8..c055013 100644 (file)
@@ -194,7 +194,7 @@ static EditorVerboseData *editor_verbose_window(EditorData *ed, const gchar *tex
        vd->spinner = spinner_new(NULL, SPINNER_SPEED);
        gtk_box_pack_start(GTK_BOX(hbox), vd->spinner, FALSE, FALSE, 0);
        gtk_widget_show(vd->spinner);
-       
+
        gtk_widget_show(vd->gd->dialog);
 
        ed->vd = vd;
@@ -276,12 +276,12 @@ static gchar *editor_command_path_parse(const FileData *fd, PathType type, const
        const gchar *p = NULL;
 
        string = g_string_new("");
-       
+
        if (type == PATH_FILE)
                {
                GList *ext_list = filter_to_list(extensions);
                GList *work = ext_list;
-               
+
                if (!work)
                        p = fd->path;
                else
@@ -290,21 +290,21 @@ static gchar *editor_command_path_parse(const FileData *fd, PathType type, const
                                {
                                gchar *ext = work->data;
                                work = work->next;
-                               
-                               if (strcmp(ext, "*") == 0 || 
+
+                               if (strcmp(ext, "*") == 0 ||
                                    strcasecmp(ext, fd->extension) == 0)
                                        {
                                        p = fd->path;
                                        break;
                                        }
-                               
+
                                GList *work2 = fd->sidecar_files;
-                               
+
                                while(work2)
                                        {
                                        FileData *sfd = work2->data;
                                        work2 = work2->next;
-                                       
+
                                        if (strcasecmp(ext, sfd->extension) == 0)
                                                {
                                                p = sfd->path;
@@ -379,17 +379,17 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
        const gchar *p = template;
        GString *result = NULL;
        gchar *extensions = NULL;
-       
+
        if (output)
                result = g_string_new("");
 
-       if (!template || template[0] == '\0') 
+       if (!template || template[0] == '\0')
                {
                flags |= EDITOR_ERROR_EMPTY;
                goto err;
                }
 
-       
+
        /* global flags */
        while (*p == '%')
                {
@@ -409,9 +409,9 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
                                break;
                        }
                }
-       
+
        /* command */
-       
+
        while (*p)
                {
                if (*p != '%')
@@ -424,7 +424,7 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
                        gchar *pathl = NULL;
 
                        p++;
-                       
+
                        /* for example "%f" or "%{.crw;.raw;.cr2}f" */
                        if (*p == '{')
                                {
@@ -435,12 +435,12 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
                                        flags |= EDITOR_ERROR_SYNTAX;
                                        goto err;
                                        }
-                               
+
                                extensions = g_strndup(p, end - p);
                                p = end + 1;
                                }
-                       
-                       switch (*p) 
+
+                       switch (*p)
                                {
                                case 'd':
                                        flags |= EDITOR_DEST;
@@ -454,13 +454,13 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
                                        if (output)
                                                {
                                                /* use the first file from the list */
-                                               if (!list || !list->data) 
+                                               if (!list || !list->data)
                                                        {
                                                        flags |= EDITOR_ERROR_NO_FILE;
                                                        goto err;
                                                        }
                                                pathl = editor_command_path_parse((FileData *)list->data, (*p == 'd') ? PATH_DEST : PATH_FILE, extensions);
-                                               if (!pathl) 
+                                               if (!pathl)
                                                        {
                                                        flags |= EDITOR_ERROR_NO_FILE;
                                                        goto err;
@@ -470,7 +470,7 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
                                                g_free(pathl);
                                                result = g_string_append_c(result, '"');
                                                }
-                                       break;  
+                                       break;
 
                                case 'f':
                                        flags |= EDITOR_SINGLE_COMMAND;
@@ -501,13 +501,13 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
                                                                }
                                                        work = work->next;
                                                        }
-                                               if (!ok) 
+                                               if (!ok)
                                                        {
                                                        flags |= EDITOR_ERROR_NO_FILE;
                                                        goto err;
                                                        }
                                                }
-                                       break;  
+                                       break;
                                default:
                                        flags |= EDITOR_ERROR_SYNTAX;
                                        goto err;
@@ -521,9 +521,9 @@ gint editor_command_parse(const gchar *template, GList *list, gchar **output)
        if (output) *output = g_string_free(result, FALSE);
        return flags;
 
-                       
+
 err:
-       if (output) 
+       if (output)
                {
                g_string_free(result, TRUE);
                *output = NULL;
@@ -537,7 +537,7 @@ static void editor_child_exit_cb (GPid pid, gint status, gpointer data)
        EditorData *ed = data;
        g_spawn_close_pid(pid);
        ed->pid = -1;
-       
+
        editor_command_next_finish(ed, status);
 }
 
@@ -549,15 +549,15 @@ static gint editor_command_one(const gchar *template, GList *list, EditorData *e
        FileData *fd = list->data;
        gchar *args[4];
        GPid pid;
-        gint standard_output;
-        gint standard_error;
+       gint standard_output;
+       gint standard_error;
        gboolean ok;
 
 
        ed->pid = -1;
 
        working_directory = remove_level_from_path(fd->path);
-       
+
        ed->flags = editor_command_parse(template, list, &command);
 
        ok = !(ed->flags & EDITOR_ERROR_MASK);
@@ -567,28 +567,28 @@ static gint editor_command_one(const gchar *template, GList *list, EditorData *e
        args[1] = COMMAND_OPT;
        args[2] = command;
        args[3] = NULL;
-       
+
        if (ok)
                {
-               ok = g_spawn_async_with_pipes(working_directory, args, NULL, 
+               ok = g_spawn_async_with_pipes(working_directory, args, NULL,
                                      G_SPAWN_DO_NOT_REAP_CHILD, /* GSpawnFlags */
-                                      NULL, NULL,
-                                      &pid, 
-                                     NULL, 
-                                     ed->vd ? &standard_output : NULL, 
-                                     ed->vd ? &standard_error : NULL, 
+                                     NULL, NULL,
+                                     &pid,
+                                     NULL,
+                                     ed->vd ? &standard_output : NULL,
+                                     ed->vd ? &standard_error : NULL,
                                      NULL);
-               
+
                if (!ok) ed->flags |= EDITOR_ERROR_CANT_EXEC;
                }
 
-       if (ok) 
+       if (ok)
                {
                g_child_watch_add(pid, editor_child_exit_cb, ed);
                ed->pid = pid;
                }
-       
-       
+
+
        if (ed->vd)
                {
 
@@ -601,9 +601,9 @@ static gint editor_command_one(const gchar *template, GList *list, EditorData *e
                        g_free(buf);
 
                        }
-               else 
+               else
                        {
-               
+
                        GIOChannel *channel_output;
                        GIOChannel *channel_error;
                        channel_output = g_io_channel_unix_new(standard_output);
@@ -621,9 +621,9 @@ static gint editor_command_one(const gchar *template, GList *list, EditorData *e
                        g_io_channel_unref(channel_error);
                        }
                }
-       
 
-       
+
+
        g_free(command);
        g_free(working_directory);
 
@@ -659,13 +659,13 @@ static gint editor_command_next_start(EditorData *ed)
                                }
                        }
 
-               if (!error) 
+               if (!error)
                        return 0;
                else
                        /* command was not started, call the finish immediately */
                        return editor_command_next_finish(ed, 0);
                }
-       
+
        /* everything is done */
        return editor_command_done(ed);
 }
@@ -747,14 +747,14 @@ void editor_resume(gpointer ed)
 }
 void editor_skip(gpointer ed)
 {
-       editor_command_done(ed);        
+       editor_command_done(ed);
 }
 
 static gint editor_command_start(const gchar *template, const gchar *text, GList *list, EditorCallback cb, gpointer data)
 {
        EditorData *ed;
        gint flags = editor_command_parse(template, NULL, NULL);
-       
+
        if (flags & EDITOR_ERROR_MASK) return flags & EDITOR_ERROR_MASK;
 
        ed = g_new0(EditorData, 1);
@@ -766,15 +766,15 @@ static gint editor_command_start(const gchar *template, const gchar *text, GList
        ed->stopping = FALSE;
        ed->callback = cb;
        ed->data =  data;
-       
+
        if ((flags & EDITOR_VERBOSE_MULTI) && list && list->next)
                flags |= EDITOR_VERBOSE;
-       
-       
+
+
        if (flags & EDITOR_VERBOSE)
                editor_verbose_window(ed, text);
-               
-       editor_command_next_start(ed); 
+
+       editor_command_next_start(ed);
        /* errors from editor_command_next_start will be handled via callback */
        return flags & EDITOR_ERROR_MASK;
 }
index 72f6ef6..d5836d9 100644 (file)
@@ -17,11 +17,11 @@ enum {
        EDITOR_KEEP_FS            = 0x00000001,
        EDITOR_VERBOSE            = 0x00000002,
        EDITOR_VERBOSE_MULTI      = 0x00000004,
-       
+
        EDITOR_DEST               = 0x00000100,
        EDITOR_FOR_EACH           = 0x00000200,
        EDITOR_SINGLE_COMMAND     = 0x00000400,
-       
+
        EDITOR_ERROR_EMPTY        = 0x00020000,
        EDITOR_ERROR_SYNTAX       = 0x00040000,
        EDITOR_ERROR_INCOMPATIBLE = 0x00080000,
@@ -31,7 +31,7 @@ enum {
        EDITOR_ERROR_SKIPPED      = 0x00800000,
 
        EDITOR_ERROR_MASK         = 0xffff0000
-       
+
 };
 
 /* return values from callback function */
@@ -39,12 +39,12 @@ enum {
        EDITOR_CB_CONTINUE = 0, /* continue multiple editor execution on remaining files*/
        EDITOR_CB_SKIP,         /* skip the remaining files */
        EDITOR_CB_SUSPEND       /* suspend execution, one of editor_resume or editor_skip
-                                  must be called later */
+                                  must be called later */
 };
 
 
 /*
-Callback is called even on skipped files, with the EDITOR_ERROR_SKIPPED flag set. 
+Callback is called even on skipped files, with the EDITOR_ERROR_SKIPPED flag set.
 It is a good place to call file_data_change_info_free().
 
 ed - pointer that can be used for editor_resume/editor_skip or NULL if all files were already processed
index 78c1987..be6c491 100644 (file)
@@ -90,7 +90,7 @@ static gchar *remove_common_prefix(gchar *s, gchar *t)
 
        for (i = 0; s[i] && t[i] && s[i] == t[i]; i++)
                ;
-       if (!i) 
+       if (!i)
                return t;
        if (s[i-1] == ' ' || !s[i])
                {
@@ -103,35 +103,35 @@ static gchar *remove_common_prefix(gchar *s, gchar *t)
 
 static double get_crop_factor(ExifData *exif)
 {
-        double res_unit_tbl[] = {0.0, 25.4, 25.4, 10.0, 1.0, 0.001 };
-
-        double xres = exif_get_rational_as_double(exif, "Exif.Photo.FocalPlaneXResolution");
-        double yres = exif_get_rational_as_double(exif, "Exif.Photo.FocalPlaneYResolution");
-        int res_unit;
-        int w, h;
-        double xsize, ysize, size, ratio;
-        
-        if (xres == 0.0 || yres == 0.0) return 0.0;
-        
-        if (!exif_get_integer(exif, "Exif.Photo.FocalPlaneResolutionUnit", &res_unit)) return 0.0;
-        if (res_unit < 1 || res_unit > 5) return 0.0;
-        
-        if (!exif_get_integer(exif, "Exif.Photo.PixelXDimension", &w)) return 0.0;
-        if (!exif_get_integer(exif, "Exif.Photo.PixelYDimension", &h)) return 0.0;
-        
-        xsize = w * res_unit_tbl[res_unit] / xres;
-        ysize = h * res_unit_tbl[res_unit] / yres;
-        
-        ratio = xsize / ysize;
-        
-        if (ratio < 0.5 || ratio > 2.0) return 0.0; /* reasonable ratio */
-        
-        size = sqrt(xsize * xsize + ysize * ysize);
-        
-        if (size < 1.0 || size > 100.0) return 0.0; /* reasonable sensor size in mm */
-        
-        return sqrt(36*36+24*24) / size;
-        
+       double res_unit_tbl[] = {0.0, 25.4, 25.4, 10.0, 1.0, 0.001 };
+
+       double xres = exif_get_rational_as_double(exif, "Exif.Photo.FocalPlaneXResolution");
+       double yres = exif_get_rational_as_double(exif, "Exif.Photo.FocalPlaneYResolution");
+       int res_unit;
+       int w, h;
+       double xsize, ysize, size, ratio;
+
+       if (xres == 0.0 || yres == 0.0) return 0.0;
+
+       if (!exif_get_integer(exif, "Exif.Photo.FocalPlaneResolutionUnit", &res_unit)) return 0.0;
+       if (res_unit < 1 || res_unit > 5) return 0.0;
+
+       if (!exif_get_integer(exif, "Exif.Photo.PixelXDimension", &w)) return 0.0;
+       if (!exif_get_integer(exif, "Exif.Photo.PixelYDimension", &h)) return 0.0;
+
+       xsize = w * res_unit_tbl[res_unit] / xres;
+       ysize = h * res_unit_tbl[res_unit] / yres;
+
+       ratio = xsize / ysize;
+
+       if (ratio < 0.5 || ratio > 2.0) return 0.0; /* reasonable ratio */
+
+       size = sqrt(xsize * xsize + ysize * ysize);
+
+       if (size < 1.0 || size > 100.0) return 0.0; /* reasonable sensor size in mm */
+
+       return sqrt(36*36+24*24) / size;
+
 }
 
 
@@ -177,12 +177,12 @@ do {                                    \
                        if (software[i] == ' ' && software[i+1] == ' ')
                                {
                                gint j;
-                               
+
                                for (j=1; software[i+j]; j++)
-                                       if (software[i+j] != ' ')
+                                       if (software[i+j] != ' ')
                                                break;
-                               memmove(software+i+1, software+i+j, strlen(software+i+j)+1);
-                               }
+                               memmove(software+i+1, software+i+j, strlen(software+i+j)+1);
+                               }
 
                model2 = remove_common_prefix(make, model);
                software2 = remove_common_prefix(model2, software);
@@ -237,7 +237,7 @@ do {                                    \
                        if (n > 1.0 && (int)n - ((int)(n/10))*10 == 1) n--;
 
                        return g_strdup_printf("%s%.0fs", n > 1.0 ? "1/" : "",
-                                                         n > 1.0 ? floor(n) : 1.0 / n);        
+                                                         n > 1.0 ? floor(n) : 1.0 / n);
                        }
                return NULL;
                }
@@ -274,22 +274,22 @@ do {                                    \
        if (strcmp(key, "fFocalLength35mmFilm") == 0)
                {
                gint n;
-                double f, c;
+               double f, c;
 
                if (exif_get_integer(exif, "Exif.Photo.FocalLengthIn35mmFilm", &n) && n != 0)
-                       {
-                        return g_strdup_printf("%d mm", n);
-                        }
-                        
-                f = exif_get_rational_as_double(exif, "Exif.Photo.FocalLength");
-                c = get_crop_factor(exif);
-                
-                if (f != 0.0 && c != 0.0)
-                        {
-                        return g_strdup_printf("%.0f mm", f * c);
-                        }
-
-                return NULL;
+                       {
+                       return g_strdup_printf("%d mm", n);
+                       }
+
+               f = exif_get_rational_as_double(exif, "Exif.Photo.FocalLength");
+               c = get_crop_factor(exif);
+
+               if (f != 0.0 && c != 0.0)
+                       {
+                       return g_strdup_printf("%.0f mm", f * c);
+                       }
+
+               return NULL;
                }
        if (strcmp(key, "fISOSpeedRating") == 0)
                {
@@ -395,8 +395,8 @@ do {                                    \
 
                        /* ColorSpace == 1 specifies sRGB per EXIF 2.2 */
                        if (!exif_get_integer(exif, "Exif.Photo.ColorSpace", &cs)) cs = 0;
-                       interop_index = exif_get_data_as_text(exif, "Exif.Iop.InteroperabilityIndex");                  
-                       
+                       interop_index = exif_get_data_as_text(exif, "Exif.Iop.InteroperabilityIndex");
+
                        if (cs == 1)
                                {
                                name = _("sRGB");
@@ -407,7 +407,7 @@ do {                                    \
                                name = _("AdobeRGB");
                                source = (cs == 2) ? "ColorSpace" : "Iop";
                                }
-                               
+
                        g_free(interop_index);
                        }
 
@@ -415,12 +415,12 @@ do {                                    \
                        {
                        source = _("embedded");
 #ifdef HAVE_LCMS
-       
+
                                {
                                unsigned char *data;
                                guint data_len;
                                cmsHPROFILE profile;
-               
+
                                data = (unsigned char *) exif_item_get_data(prof_item, &data_len);
                                if (data)
                                        {
index f4144c9..b2e4599 100644 (file)
@@ -3,7 +3,7 @@
  *  (C) 2006 John Ellis
  *
  *  Authors:
- *    Support for Exif file format, originally written by Eric Swalens.    
+ *    Support for Exif file format, originally written by Eric Swalens.
  *    Modified by Quy Tonthat
  *    Reimplemented with generic data storage by John Ellis
  *
index 06c0214..63f5a4f 100644 (file)
@@ -3,7 +3,7 @@
  *  (C) 2006 John Ellis
  *
  *  Authors:
- *    Support for Exif file format, originally written by Eric Swalens.    
+ *    Support for Exif file format, originally written by Eric Swalens.
  *    Modified by Quy Tonthat
  *
  *    Reimplemented with generic data storage by John Ellis (Nov 2003)
@@ -64,7 +64,7 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 #include <math.h>
+
 #include <glib.h>
 
 #include "intl.h"
@@ -317,8 +317,8 @@ static ExifTextList ExifSubjectRangeList[] = {
        EXIF_TEXT_LIST_END
 };
 
-/* 
-Tag names should match to exiv2 keys, http://www.exiv2.org/metadata.html 
+/*
+Tag names should match to exiv2 keys, http://www.exiv2.org/metadata.html
 Tags that don't match are not supported by exiv2 and should not be used anywhere in the code
 */
 
@@ -570,7 +570,7 @@ char *exif_item_get_description(ExifItem *item)
 
 const char *exif_item_get_format_name(ExifItem *item, gint brief)
 {
-       if (!item || !item->marker) return NULL; 
+       if (!item || !item->marker) return NULL;
        return (brief) ? ExifFormatList[item->format].short_name : ExifFormatList[item->format].description;
 }
 
@@ -1011,8 +1011,8 @@ gint exif_tiff_parse(ExifData *exif, unsigned char *tiff, guint size, ExifMarker
        FF:   1 byte standard marker identifier
        TT:   1 byte data type
        SSSS: 2 bytes in Motorola byte alignment for length of the data.
-             This value includes these 2 bytes in the count, making actual
-             length of NN... == SSSS - 2.
+            This value includes these 2 bytes in the count, making actual
+            length of NN... == SSSS - 2.
        NNN.: the data in this segment
  */
 
@@ -1179,7 +1179,7 @@ static gint exif_jpeg_parse(ExifData *exif,
 
 ExifItem *exif_get_first_item(ExifData *exif)
 {
-       if (exif->items) 
+       if (exif->items)
                {
                ExifItem *ret = (ExifItem *)exif->items->data;
                exif->current = exif->items->next;
@@ -1191,7 +1191,7 @@ ExifItem *exif_get_first_item(ExifData *exif)
 
 ExifItem *exif_get_next_item(ExifData *exif)
 {
-       if (exif->current) 
+       if (exif->current)
                {
                ExifItem *ret = (ExifItem *)exif->current->data;
                exif->current = exif->current->next;
@@ -1358,7 +1358,7 @@ ExifItem *exif_get_item(ExifData *exif, const gchar *key)
                item = work->data;
                work = work->next;
                if (item->marker->key && strcmp(key, item->marker->key) == 0) return item;
-                }
+               }
        return NULL;
 }
 
@@ -1646,5 +1646,5 @@ int exif_item_set_string(ExifItem *item, const char *str)
 
 
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
index b770c8d..cf27535 100644 (file)
@@ -3,7 +3,7 @@
  *  (C) 2006 John Ellis
  *
  *  Authors:
- *    Support for Exif file format, originally written by Eric Swalens.    
+ *    Support for Exif file format, originally written by Eric Swalens.
  *    Modified by Quy Tonthat
  *    Reimplemented with generic data storage by John Ellis
  *
index b20daa5..6ae5304 100644 (file)
@@ -53,7 +53,7 @@ static FilterEntry *filter_entry_new(const gchar *key, const gchar *description,
        fe->extensions = g_strdup(extensions);
        fe->enabled = enabled;
        fe->file_class = file_class;
-       
+
        return fe;
 }
 
@@ -174,7 +174,7 @@ void filter_add_defaults(void)
                gchar **extensions;
                GString *filter = NULL;
                gint i;
-               
+
                format = work->data;
                work = work->next;
 
@@ -221,7 +221,7 @@ void filter_add_defaults(void)
        filter_add_if_missing("ico", "Icon file", ".ico;.cur", FORMAT_CLASS_IMAGE, FALSE);
        filter_add_if_missing("ras", "Raster", ".ras", FORMAT_CLASS_IMAGE, FALSE);
        filter_add_if_missing("svg", "Scalable Vector Graphics", ".svg", FORMAT_CLASS_IMAGE, FALSE);
-       
+
        /* non-image files that might be desirable to show */
        filter_add_if_missing("xmp", "XMP sidecar", ".xmp", FORMAT_CLASS_META, TRUE);
 
@@ -299,7 +299,7 @@ void filter_rebuild(void)
 
                        ext = filter_to_list(fe->extensions);
                        if (ext) extension_list = g_list_concat(extension_list, ext);
-                       
+
                        if (fe->file_class >= 0 && fe->file_class < FILE_FORMAT_CLASSES)
                                {
                                ext = filter_to_list(fe->extensions);
@@ -374,7 +374,7 @@ void filter_write_list(SecureSaveInfo *ssi)
                {
                FilterEntry *fe = work->data;
                work = work->next;
-               
+
                gchar *extensions = escquote_value(fe->extensions);
                gchar *description = escquote_value(fe->description);
 
@@ -402,9 +402,9 @@ void filter_parse(const gchar *text)
 
        ext = quoted_value(p, &p);
        desc = quoted_value(p, &p);
-       
+
        file_class = strtol(p, NULL, 10);
-       
+
        if (file_class < 0 || file_class >= FILE_FORMAT_CLASSES) file_class = FORMAT_CLASS_UNKNOWN;
 
        if (key && key[0] == '#')
@@ -484,7 +484,7 @@ void sidecar_ext_parse(const gchar *text, gint quoted)
                }
        g_list_free(sidecar_ext_list);
        sidecar_ext_list = NULL;
-       
+
        if (quoted)
                value = quoted_value(text, NULL);
        else
@@ -493,7 +493,7 @@ void sidecar_ext_parse(const gchar *text, gint quoted)
        if (value == NULL) return;
 
        sidecar_ext_list = filter_to_list(value);
-       
+
        g_free(value);
 }
 
@@ -710,13 +710,13 @@ static void file_data_set_path(FileData *fd, const gchar *path)
 
        if (strcmp(fd->name, "..") == 0)
                {
-               gchar *dir = remove_level_from_path(path); 
+               gchar *dir = remove_level_from_path(path);
                g_free(fd->path);
                fd->path = remove_level_from_path(dir);
                g_free(dir);
                fd->name = "..";
                fd->extension = fd->name + 2;
-               return;         
+               return;
                }
        else if (strcmp(fd->name, ".") == 0)
                {
@@ -728,7 +728,7 @@ static void file_data_set_path(FileData *fd, const gchar *path)
                }
 
        fd->extension = extension_from_path(fd->path);
-       if (fd->extension == NULL) 
+       if (fd->extension == NULL)
                fd->extension = fd->name + strlen(fd->name);
 }
 
@@ -754,7 +754,7 @@ static void file_data_check_changed_files(FileData *fd, struct stat *st)
                        {
                        file_data_disconnect_sidecar_file(fd, sfd);
                        }
-                       
+
                file_data_check_changed_files(sfd, &st);
                work = work->next;
                }
@@ -767,10 +767,10 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
        FileData *fd;
 
        if (debug) printf("file_data_new: '%s' %d\n", path_utf8, check_sidecars);
-       
+
        if (!file_data_pool)
                file_data_pool = g_hash_table_new (g_str_hash, g_str_equal);
-       
+
        fd = g_hash_table_lookup(file_data_pool, path_utf8);
        if (fd)
                {
@@ -778,11 +778,11 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
                if (debug) printf("file_data_pool hit: '%s'\n", fd->path);
                return file_data_ref(fd);
                }
-       
+
        fd = g_new0(FileData, 1);
 
        file_data_set_path(fd, path_utf8);
-       
+
        fd->original_path = g_strdup(path_utf8);
        fd->size = st->st_size;
        fd->date = st->st_mtime;
@@ -790,10 +790,10 @@ static FileData *file_data_new(const gchar *path_utf8, struct stat *st, gboolean
        fd->sidecar_files = NULL;
        fd->ref = 1;
        fd->magick = 0x12345678;
-       
+
        g_hash_table_insert(file_data_pool, fd->original_path, fd);
-       
-       if (check_sidecars && sidecar_file_priority(fd->extension)) 
+
+       if (check_sidecars && sidecar_file_priority(fd->extension))
                file_data_check_sidecars(fd);
        return fd;
 }
@@ -804,19 +804,19 @@ static void file_data_check_sidecars(FileData *fd)
        GString *fname = g_string_new_len(fd->path, base_len);
        FileData *parent_fd = NULL;
        GList *work = sidecar_ext_get_list();
-       while (work) 
+       while (work)
                {
                /* check for possible sidecar files;
                   the sidecar files created here are referenced only via fd->sidecar_files or fd->parent,
                   they have fd->ref set to 0 and file_data unref must chack and free them all together
                   (using fd->ref would cause loops and leaks)
                */
-                  
+
                FileData *new_fd;
-               
+
                gchar *ext = work->data;
                work = work->next;
-               
+
                if (strcmp(ext, fd->extension) == 0)
                        {
                        new_fd = fd; /* processing the original file */
@@ -826,14 +826,14 @@ static void file_data_check_sidecars(FileData *fd)
                        struct stat nst;
                        g_string_truncate(fname, base_len);
                        g_string_append(fname, ext);
-               
+
                        if (!stat_utf8(fname->str, &nst))
                                continue;
-                                
+
                        new_fd = file_data_new(fname->str, &nst, FALSE);
                        new_fd->ref--; /* do not use ref here */
                        }
-                       
+
                if (!parent_fd)
                        parent_fd = new_fd; /* parent is the one with the highest prio, found first */
                else
@@ -877,7 +877,7 @@ FileData *file_data_merge_sidecar_files(FileData *target, FileData *source)
 {
        GList *work;
        file_data_add_sidecar_file(target, source);
-       
+
        work = source->sidecar_files;
        while (work)
                {
@@ -889,7 +889,7 @@ FileData *file_data_merge_sidecar_files(FileData *target, FileData *source)
        g_list_free(source->sidecar_files);
        source->sidecar_files = NULL;
 
-       target->sidecar_files = filelist_sort(target->sidecar_files, SORT_NAME, TRUE);  
+       target->sidecar_files = filelist_sort(target->sidecar_files, SORT_NAME, TRUE);
        return target;
 }
 
@@ -909,7 +909,7 @@ static void file_data_free(FileData *fd)
 {
        g_assert(fd->magick == 0x12345678);
        g_assert(fd->ref == 0);
-       
+
        g_hash_table_remove(file_data_pool, fd->original_path);
 
        g_free(fd->path);
@@ -919,7 +919,7 @@ static void file_data_free(FileData *fd)
 
        g_assert(fd->sidecar_files == NULL); /* sidecar files must be freed before calling this */
 
-       file_data_change_info_free(NULL, fd);   
+       file_data_change_info_free(NULL, fd);
        g_free(fd);
 }
 
@@ -927,19 +927,19 @@ void file_data_unref(FileData *fd)
 {
        if (fd == NULL) return;
        g_assert(fd->magick == 0x12345678);
-       
+
        fd->ref--;
        if (debug) printf("file_data_unref (%d): '%s'\n", fd->ref, fd->path);
 
        if (fd->ref == 0)
                {
                FileData *parent = fd->parent ? fd->parent : fd;
-               
+
                GList *work;
-       
+
                if (parent->ref > 0)
                        return;
-               
+
                work = parent->sidecar_files;
                while (work)
                        {
@@ -948,11 +948,11 @@ void file_data_unref(FileData *fd)
                                return;
                        work = work->next;
                        }
-               
+
                /* none of parent/children is referenced, we can free everything */
-               
+
                if (debug) printf("file_data_unref: deleting '%s', parent '%s'\n", fd->path, parent->path);
-               
+
                work = parent->sidecar_files;
                while (work)
                        {
@@ -960,12 +960,12 @@ void file_data_unref(FileData *fd)
                        file_data_free(sfd);
                        work = work->next;
                        }
-               
+
                g_list_free(parent->sidecar_files);
                parent->sidecar_files = NULL;
-               
+
                file_data_free(parent);
-               
+
                }
 }
 
@@ -993,7 +993,7 @@ gint file_data_compare_name_without_ext(FileData *fd1, FileData *fd2)
 
        if (len1 < len2) return -1;
        if (len1 > len2) return 1;
-       
+
        return strncmp(fd1->name, fd2->name, len1);
 }
 
@@ -1014,9 +1014,9 @@ gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const
 {
 
        FileDataChangeInfo *fdci;
-       
+
        if (fd->change) return FALSE;
-       
+
        fdci = g_new0(FileDataChangeInfo, 1);
 
        fdci->type = type;
@@ -1025,10 +1025,10 @@ gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const
                fdci->source = g_strdup(src);
        else
                fdci->source = g_strdup(fd->path);
-               
+
        if (dest)
                fdci->dest = g_strdup(dest);
-               
+
        fd->change = fdci;
        return TRUE;
 }
@@ -1037,22 +1037,22 @@ void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd)
 {
        if (!fdci && fd)
                fdci = fd->change;
-       
+
        if (!fdci)
                return;
-       
+
        g_free(fdci->source);
        g_free(fdci->dest);
-       
+
        g_free(fdci);
-       
+
        if (fd)
                fd->change = NULL;
 }
 
 
 
-       
+
 /*
  *-----------------------------------------------------------------------------
  * sidecar file info struct
@@ -1068,15 +1068,15 @@ static gint sidecar_file_priority(const gchar *path)
        GList *work;
        if (extension == NULL)
                return 0;
-       
+
        work = sidecar_ext_get_list();
-       
+
        while (work) {
                gchar *ext = work->data;
                work = work->next;
                if (strcmp(extension, ext) == 0) return i;
                i++;
-       }       
+       }
        return 0;
 }
 
@@ -1182,13 +1182,13 @@ static GList *filelist_filter_out_sidecars(GList *flist)
 {
        GList *work = flist;
        GList *flist_filtered = NULL;
-       
+
        while (work)
                {
                FileData *fd = work->data;
                work = work->next;
                if (fd->parent) /* remove fd's that are children */
-                       file_data_unref(fd);                                            
+                       file_data_unref(fd);
                else
                        flist_filtered = g_list_prepend(flist_filtered, fd);
                }
@@ -1230,7 +1230,7 @@ static gint filelist_read_real(const gchar *path, GList **files, GList **dirs, g
                if (options->file_filter.show_hidden_files || !ishidden(name))
                        {
                        gchar *filepath = g_strconcat(pathl, "/", name, NULL);
-                       if ((follow_symlinks ? 
+                       if ((follow_symlinks ?
                                stat(filepath, &ent_sbuf) :
                                lstat(filepath, &ent_sbuf)) >= 0)
                                {
@@ -1304,13 +1304,13 @@ GList *filelist_copy(GList *list)
        while (work)
                {
                FileData *fd;
+
                fd = work->data;
                work = work->next;
+
                new_list = g_list_prepend(new_list, file_data_ref(fd));
                }
+
        return g_list_reverse(new_list);
 }
 
@@ -1323,13 +1323,13 @@ GList *filelist_from_path_list(GList *list)
        while (work)
                {
                gchar *path;
+
                path = work->data;
                work = work->next;
+
                new_list = g_list_prepend(new_list, file_data_new_simple(path));
                }
+
        return g_list_reverse(new_list);
 }
 
@@ -1342,13 +1342,13 @@ GList *filelist_to_path_list(GList *list)
        while (work)
                {
                FileData *fd;
+
                fd = work->data;
                work = work->next;
+
                new_list = g_list_prepend(new_list, g_strdup(fd->path));
                }
+
        return g_list_reverse(new_list);
 }
 
index 18fa1ec..81bcaa5 100644 (file)
@@ -42,7 +42,7 @@ void filter_parse(const gchar *text);
 
 void sidecar_ext_parse(const gchar *text, gint quoted);
 void sidecar_ext_write(SecureSaveInfo *ssi);
-char *sidecar_ext_to_string(); 
+char *sidecar_ext_to_string();
 void sidecar_ext_add_defaults();
 
 gint ishidden(const gchar *name);
index b87bbd3..7e46704 100644 (file)
@@ -9,7 +9,7 @@
  *
  * Code to add support for Canon CR2 and CRW files, version 0.2
  *
- * Developed by Daniel M. German, dmgerman at uvic.ca 
+ * Developed by Daniel M. German, dmgerman at uvic.ca
  *
  * you can find the sources for this patch at http://turingmachine.org/~dmg/libdcraw/gqview/
  *
@@ -218,7 +218,7 @@ gint format_canon_raw_crw(unsigned char *data, const guint len,
                        guint jpeg_offset;
 
                        jpeg_offset = block_offset + record_offset;
-                       if (len < jpeg_offset + record_length ||
+                       if (len < jpeg_offset + record_length ||
                            record_length < 4 ||
                            memcmp(data + jpeg_offset, "\xff\xd8\xff\xdb", 4) != 0)
                                {
@@ -630,5 +630,5 @@ gint format_canon_makernote(ExifData *exif, unsigned char *tiff, guint offset,
 }
 
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
index ba5241a..e94d560 100644 (file)
@@ -9,7 +9,7 @@
  *
  * Code to add support for Canon CR2 and CRW files, version 0.2
  *
- * Developed by Daniel M. German, dmgerman at uvic.ca 
+ * Developed by Daniel M. German, dmgerman at uvic.ca
  *
  * you can find the sources for this patch at http://turingmachine.org/~dmg/libdcraw/gqview/
  *
index f13b757..fc65cab 100644 (file)
@@ -202,5 +202,5 @@ gint format_fuji_makernote(ExifData *exif, unsigned char *tiff, guint offset,
        return TRUE;
 }
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
index dc40948..67042bc 100644 (file)
@@ -444,5 +444,5 @@ gint format_nikon_makernote(ExifData *exif, unsigned char *tiff, guint offset,
        return TRUE;
 }
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
index 9aea844..dab730f 100644 (file)
@@ -381,5 +381,5 @@ gint format_olympus_makernote(ExifData *exif, unsigned char *tiff, guint offset,
 }
 
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
index 7f616d2..652b46e 100644 (file)
@@ -339,7 +339,7 @@ gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
        /* FIXME:
         * when the target is a tiff file it should be mmaped prior to format_raw_find as
         * the make field data may not always be within header_data + header_len
-        */ 
+        */
        entry = format_raw_find(header_data, header_len);
 
        if (!entry || !entry->func_parse) return FALSE;
@@ -566,6 +566,6 @@ gint format_debug_tiff_raw(unsigned char *data, const guint len,
 }
 #endif
 
-#endif 
+#endif
 /* not HAVE_EXIV2 */
 
index a44537b..a607934 100644 (file)
@@ -435,7 +435,7 @@ void fullscreen_prefs_list_free(GList *list)
                ScreenData *sd = work->data;
                work = work->next;
 
-               g_free(sd->description);        
+               g_free(sd->description);
                g_free(sd);
                }
 
index 4efd562..94fde06 100644 (file)
@@ -22,38 +22,38 @@ ConfOptions *init_options(ConfOptions *options)
        if (!options) options = g_new0(ConfOptions, 1);
 
        options->collections.rectangular_selection = FALSE;
-       
+
        options->color_profile.enabled = FALSE;
        options->color_profile.input_type = 0;
        options->color_profile.screen_file = NULL;
        options->color_profile.screen_type = 0;
        options->color_profile.use_image = TRUE;
-       
+
        options->duplicates_similarity_threshold = 99;
        options->enable_metadata_dirs = FALSE;
-       
+
        options->file_filter.disable = FALSE;
        options->file_filter.show_dot_directory = FALSE;
        options->file_filter.show_hidden_files = FALSE;
-       
+
        options->file_ops.confirm_delete = TRUE;
        options->file_ops.enable_delete_key = TRUE;
        options->file_ops.enable_in_place_rename = TRUE;
        options->file_ops.safe_delete_enable = FALSE;
        options->file_ops.safe_delete_folder_maxsize = 128;
        options->file_ops.safe_delete_path = NULL;
-       
+
        options->file_sort.ascending = TRUE;
        options->file_sort.case_sensitive = FALSE;
        options->file_sort.method = SORT_NAME;
-       
+
        options->fullscreen.above = FALSE;
        options->fullscreen.clean_flip = FALSE;
        options->fullscreen.disable_saver = TRUE;
        options->fullscreen.info = NULL;
        options->fullscreen.screen = -1;
        options->fullscreen.show_info = TRUE;
-       
+
        memset(&options->image.border_color, 0, sizeof(options->image.border_color));
        options->image.dither_quality = (gint)GDK_RGB_DITHER_NORMAL;
        options->image.enable_read_ahead = TRUE;
@@ -97,21 +97,21 @@ ConfOptions *init_options(ConfOptions *options)
        options->layout.tools_hidden = FALSE;
        options->layout.tools_restore_state = FALSE;
        options->layout.view_as_icons = FALSE;
-       
+
        options->lazy_image_sync = FALSE;
        options->mousewheel_scrolls = FALSE;
        options->open_recent_list_maxsize = 10;
        options->place_dialogs_under_mouse = FALSE;
        options->progressive_key_scrolling = FALSE;
        options->show_icon_names = TRUE;
-       
+
        options->slideshow.delay = 150;
        options->slideshow.random = FALSE;
        options->slideshow.repeat = FALSE;
-       
+
        options->startup_path_enable = FALSE;
        options->startup_path = NULL;
-       
+
        options->thumbnails.cache_into_dirs = FALSE;
        options->thumbnails.enable_caching = TRUE;
        options->thumbnails.fast = TRUE;
@@ -120,7 +120,7 @@ ConfOptions *init_options(ConfOptions *options)
        options->thumbnails.quality = (gint)GDK_INTERP_TILES;
        options->thumbnails.spec_standard = TRUE;
        options->thumbnails.use_xvpics = TRUE;
-       
+
        options->tree_descend_subdirs = FALSE;
        options->update_on_time_change = TRUE;
 
index fe393c1..a79c983 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #define HISTOGRAM_SIZE 256
+
 struct _Histogram {
        gulong histmap[HISTOGRAM_SIZE*4];
        gint histogram_chan;
@@ -35,7 +35,7 @@ Histogram *histogram_new()
 {
        Histogram *histogram;
 
-        histogram = g_new0(Histogram, 1);
+       histogram = g_new0(Histogram, 1);
        histogram->histogram_chan = HCHAN_RGB;
        histogram->histogram_logmode = 1;
 
@@ -80,23 +80,25 @@ const gchar *histogram_label(Histogram *histogram)
        if (!histogram) return NULL;
 
        if (histogram->histogram_logmode)
-                       switch (histogram->histogram_chan) {
+                       switch (histogram->histogram_chan)
+                       {
                        case HCHAN_R:   t1 = _("logarithmical histogram on red"); break;
-                        case HCHAN_G:   t1 = _("logarithmical histogram on green"); break;
-                        case HCHAN_B:   t1 = _("logarithmical histogram on blue"); break;
-                        case HCHAN_VAL: t1 = _("logarithmical histogram on value"); break;
-                        case HCHAN_RGB: t1 = _("logarithmical histogram on RGB"); break;
-                        case HCHAN_MAX: t1 = _("logarithmical histogram on max value"); break;
-                        }
-                else
-                        switch (histogram->histogram_chan) {
-                        case HCHAN_R:   t1 = _("linear histogram on red"); break;
-                        case HCHAN_G:   t1 = _("linear histogram on green"); break;
-                        case HCHAN_B:   t1 = _("linear histogram on blue"); break;
-                        case HCHAN_VAL: t1 = _("linear histogram on value"); break;
-                        case HCHAN_RGB: t1 = _("linear histogram on RGB"); break;
-                        case HCHAN_MAX: t1 = _("linear histogram on max value"); break;
-                        }
+                       case HCHAN_G:   t1 = _("logarithmical histogram on green"); break;
+                       case HCHAN_B:   t1 = _("logarithmical histogram on blue"); break;
+                       case HCHAN_VAL: t1 = _("logarithmical histogram on value"); break;
+                       case HCHAN_RGB: t1 = _("logarithmical histogram on RGB"); break;
+                       case HCHAN_MAX: t1 = _("logarithmical histogram on max value"); break;
+                       }
+               else
+                       switch (histogram->histogram_chan)
+                       {
+                       case HCHAN_R:   t1 = _("linear histogram on red"); break;
+                       case HCHAN_G:   t1 = _("linear histogram on green"); break;
+                       case HCHAN_B:   t1 = _("linear histogram on blue"); break;
+                       case HCHAN_VAL: t1 = _("linear histogram on value"); break;
+                       case HCHAN_RGB: t1 = _("linear histogram on RGB"); break;
+                       case HCHAN_MAX: t1 = _("linear histogram on max value"); break;
+                       }
        return t1;
 }
 
@@ -183,7 +185,7 @@ gint histogram_draw(Histogram *histogram, GdkPixbuf *pixbuf, gint x, gint y, gin
                        v[2] += histogram->histmap[ii + j + 2*HISTOGRAM_SIZE]; // b
                        v[3] += histogram->histmap[ii + j + 3*HISTOGRAM_SIZE]; // value, max
                        }
-               
+
                for (j=0; j<4; j++)
                        {
                        gint r = rplus;
@@ -195,7 +197,7 @@ gint histogram_draw(Histogram *histogram, GdkPixbuf *pixbuf, gint x, gint y, gin
 
                        for (k=1; k<4; k++)
                                if (v[k] > v[max2]) max2 = k;
-       
+
                        switch (max2)
                        {
                        case HCHAN_R: rplus = r = 255; break;
@@ -210,11 +212,11 @@ gint histogram_draw(Histogram *histogram, GdkPixbuf *pixbuf, gint x, gint y, gin
                        case HCHAN_R: g = 0; b = 0; break;
                        case HCHAN_G: r = 0; b = 0; break;
                        case HCHAN_B: r = 0; g = 0; break;
-                       case HCHAN_RGB: 
+                       case HCHAN_RGB:
                                if (r == 255 && g == 255 && b == 255) {
-                                       r = 0; 
-                                       g = 0; 
-                                       b = 0; 
+                                       r = 0;
+                                       g = 0;
+                                       b = 0;
                                }
                                break;
                        }
@@ -225,11 +227,11 @@ gint histogram_draw(Histogram *histogram, GdkPixbuf *pixbuf, gint x, gint y, gin
                                pt = ((float)log(v[max2])) / logmax * (height - 1);
                        else
                                pt = ((float)v[max2])/ max * (height - 1);
-                       if (histogram->histogram_chan >= HCHAN_RGB 
+                       if (histogram->histogram_chan >= HCHAN_RGB
                            || max2 == histogram->histogram_chan)
-                               pixbuf_draw_line(pixbuf, 
+                               pixbuf_draw_line(pixbuf,
                                        x, y, width, height,
-                                       x + i, y + height, x + i, y + height-pt, 
+                                       x + i, y + height, x + i, y + height-pt,
                                        r, g, b, 255);
                        v[max2] = -1;
                        }
index 1571cce..9f702d0 100644 (file)
@@ -84,7 +84,7 @@ static void image_loader_size_cb(GdkPixbufLoader *loader,
                n++;
                }
        g_strfreev(mime_types);
-       
+
        if (!scale) return;
 
        if (width > il->requested_width || height > il->requested_height)
@@ -103,7 +103,7 @@ static void image_loader_size_cb(GdkPixbufLoader *loader,
                        nw = (gdouble)nh / height * width;
                        if (nw < 1) nw = 1;
                        }
-               
+
                gdk_pixbuf_loader_set_size(loader, nw, nh);
                il->shrunk = TRUE;
                }
@@ -214,7 +214,7 @@ static gint image_loader_begin(ImageLoader *il)
        unsigned int offset = 0;
 
        if (!il->loader || il->pixbuf) return FALSE;
-       
+
        b = read(il->load_fd, il->read_buffer, il->read_buffer_size);
 
        if (b > 0 &&
@@ -294,7 +294,7 @@ static gint image_loader_setup(ImageLoader *il)
 
        il->loader = gdk_pixbuf_loader_new();
        g_signal_connect(G_OBJECT(il->loader), "area_updated",
-                        G_CALLBACK(image_loader_area_cb), il);
+                        G_CALLBACK(image_loader_area_cb), il);
        g_signal_connect(G_OBJECT(il->loader), "size_prepared",
                         G_CALLBACK(image_loader_size_cb), il);
 
index 2d54cda..8854d31 100644 (file)
@@ -85,14 +85,14 @@ static OSDIcon osd_icons[] = {
 #define HIST_PREPARE(imd, lw)                          \
        LayoutWindow *lw = NULL;                        \
        if (imd)                                        \
-               lw = layout_find_by_image(imd);
+              lw = layout_find_by_image(imd);
 
 void image_osd_histogram_onoff_toggle(ImageWindow *imd, gint x)
 {
        HIST_PREPARE(imd, lw)
-       if (lw) 
+       if (lw)
                {
-               lw->histogram_enabled = !!(x);
+               lw->histogram_enabled = !!(x);
                if (lw->histogram_enabled && !lw->histogram)
                        lw->histogram = histogram_new();
                }
@@ -107,15 +107,15 @@ gint image_osd_histogram_onoff_status(ImageWindow *imd)
 void image_osd_histogram_chan_toggle(ImageWindow *imd)
 {
        HIST_PREPARE(imd, lw)
-       if (lw && lw->histogram) 
-               histogram_set_channel(lw->histogram, (histogram_get_channel(lw->histogram) +1)%HCHAN_COUNT);
+       if (lw && lw->histogram)
+              histogram_set_channel(lw->histogram, (histogram_get_channel(lw->histogram) +1)%HCHAN_COUNT);
 }
 
 void image_osd_histogram_log_toggle(ImageWindow *imd)
 {
        HIST_PREPARE(imd,lw)
-       if (lw && lw->histogram) 
-               histogram_set_mode(lw->histogram, !histogram_get_mode(lw->histogram));
+       if (lw && lw->histogram)
+              histogram_set_mode(lw->histogram, !histogram_get_mode(lw->histogram));
 }
 
 
@@ -134,7 +134,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
        ExifData *exif;
 
        if (!str || !*str) return g_strdup("");
-       
+
        new = g_string_new(str);
 
        exif = exif_read_fd(imd->image_fd, FALSE);
@@ -154,7 +154,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                end = strchr(start+1, delim);
                if (!end)
                        break;
-               
+
                for (p = end; p > start; p--)
                        {
                        if (*p == ':' && was_digit)
@@ -180,7 +180,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                        g_free(data);
                        data = new_data;
                        }
-               
+
                g_string_erase(new, pos, end-start+1);
                if (data)
                        g_string_insert(new, pos, data);
@@ -199,7 +199,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                g_free(name);
                g_free(data);
                }
-       
+
        /* search and destroy empty lines */
        end = new->str;
        while ((start = strchr(end, '\n')))
@@ -312,15 +312,15 @@ static GdkPixbuf *image_osd_info_render(ImageWindow *imd)
                if (!lw)
                        lw = layout_find_by_image(imd);
 
-               if (imgpixbuf && lw->histogram && lw->histogram_enabled 
-                             && (!imd->il || imd->il->done)) 
+               if (imgpixbuf && lw->histogram && lw->histogram_enabled
+                             && (!imd->il || imd->il->done))
                        with_hist=1;
 
                g_hash_table_insert(vars, "width", g_strdup_printf("%d", w));
                g_hash_table_insert(vars, "height", g_strdup_printf("%d", h));
                g_hash_table_insert(vars, "res", g_strdup_printf("%d Ã— %d", w, h));
                }
-  
+
        g_hash_table_insert(vars, "collection", g_strdup(ct));
        g_hash_table_insert(vars, "number", g_strdup_printf("%d", n));
        g_hash_table_insert(vars, "total", g_strdup_printf("%d", t));
@@ -352,7 +352,7 @@ static GdkPixbuf *image_osd_info_render(ImageWindow *imd)
                gint mark;
                gchar *text2;
 
-               for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++) 
+               for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++)
                        {
                        active_marks += fd->marks[mark];
                        }
@@ -361,8 +361,8 @@ static GdkPixbuf *image_osd_info_render(ImageWindow *imd)
                if (active_marks > 0)
                        {
                        GString *buf = g_string_sized_new(FILEDATA_MARKS_SIZE * 2);
-               
-                       for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++) 
+
+                       for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++)
                                {
                                g_string_append_printf(buf, fd->marks[mark] ? " <span background='#FF00FF'>%c</span>" : " %c", '1' + mark);
                                }
@@ -391,7 +391,7 @@ static GdkPixbuf *image_osd_info_render(ImageWindow *imd)
        layout = gtk_widget_create_pango_layout(imd->pr, NULL);
        pango_layout_set_markup(layout, text, -1);
        g_free(text);
-    
+
        pango_layout_get_pixel_size(layout, &width, &height);
        /* with empty text width is set to 0, but not height) */
        if (width == 0)
@@ -420,10 +420,10 @@ static GdkPixbuf *image_osd_info_render(ImageWindow *imd)
                pixbuf_pixel_set(pixbuf, width - 1, 0, 0, 0, 0, 0);
                pixbuf_pixel_set(pixbuf, 0, height - 1, 0, 0, 0, 0);
                pixbuf_pixel_set(pixbuf, width - 1, height - 1, 0, 0, 0, 0);
-       
+
                if (with_hist)
                        histogram_draw(lw->histogram, pixbuf, 5, height - HISTOGRAM_HEIGHT - 5 , width - 10, HISTOGRAM_HEIGHT);
-               
+
                pixbuf_draw_layout(pixbuf, layout, imd->pr, 5, 5, 0, 0, 0, 255);
        }
 
index a99268b..e024f6c 100644 (file)
@@ -75,7 +75,7 @@ static void image_drag_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer da
        gint width, height;
 
        pixbuf_renderer_get_scaled_size(pr, &width, &height);
-       
+
        if (imd->func_drag)
                {
                imd->func_drag(imd, event->button, event->time,
@@ -120,8 +120,8 @@ static void image_complete_util(ImageWindow *imd, gint preload)
        if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return;
 
        if (debug) printf("%s image load completed \"%s\" (%s)\n", get_exec_time(),
-                         (preload) ? (imd->read_ahead_fd ? imd->read_ahead_fd->path : "null") : 
-                                     (imd->image_fd ? imd->image_fd->path : "null"),
+                         (preload) ? (imd->read_ahead_fd ? imd->read_ahead_fd->path : "null") :
+                                     (imd->image_fd ? imd->image_fd->path : "null"),
                          (preload) ? "preload" : "current");
 
        if (!preload) imd->completed = TRUE;
@@ -350,8 +350,8 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
                input_type = COLOR_PROFILE_FILE;
                input_file = options->color_profile.input_file[n];
                }
-       else if (imd->color_profile_input >= COLOR_PROFILE_SRGB && 
-                imd->color_profile_input <  COLOR_PROFILE_FILE)
+       else if (imd->color_profile_input >= COLOR_PROFILE_SRGB &&
+                imd->color_profile_input <  COLOR_PROFILE_FILE)
                {
                input_type = imd->color_profile_input;
                input_file = NULL;
@@ -388,8 +388,8 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
 
                        /* ColorSpace == 1 specifies sRGB per EXIF 2.2 */
                        if (!exif_get_integer(exif, "Exif.Photo.ColorSpace", &cs)) cs = 0;
-                       interop_index = exif_get_data_as_text(exif, "Exif.Iop.InteroperabilityIndex");                  
-                       
+                       interop_index = exif_get_data_as_text(exif, "Exif.Iop.InteroperabilityIndex");
+
                        if (cs == 1)
                                {
                                input_type = COLOR_PROFILE_SRGB;
@@ -406,7 +406,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
 
                                if (debug) printf("Found EXIF ColorSpace of AdobeRGB\n");
                                }
-                               
+
                        g_free(interop_index);
                        }
                }
@@ -417,7 +417,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
                guint data_len;
                if (debug) printf("Found embedded color profile\n");
                imd->color_profile_from_image = COLOR_PROFILE_MEM;
-               
+
                data = (unsigned char *) exif_item_get_data(item, &data_len);
 
                cm = color_man_new_embedded(run_in_bg ? imd : NULL, NULL,
@@ -425,7 +425,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
                                            screen_type, screen_file);
                g_free(data);
                }
-       else 
+       else
                {
                cm = color_man_new(run_in_bg ? imd : NULL, NULL,
                                   input_type, input_file,
@@ -441,7 +441,7 @@ static gint image_post_process_color(ImageWindow *imd, gint start_row, ExifData
                        }
 
                imd->cm = (gpointer)cm;
-#if 0          
+#if 0
                if (run_in_bg) color_man_start_bg(imd->cm, image_post_process_color_cb, imd);
 #endif
                return TRUE;
@@ -472,7 +472,7 @@ static void image_post_process(ImageWindow *imd, gint clamp)
                        {
                        gint rotate = TRUE;
 
-                       /* see http://jpegclub.org/exif_orientation.html 
+                       /* see http://jpegclub.org/exif_orientation.html
                          1        2       3      4         5            6           7          8
 
                        888888  888888      88  88      8888888888  88                  88  8888888888
@@ -543,7 +543,7 @@ static void image_post_process(ImageWindow *imd, gint clamp)
 static void image_post_process_tile_color_cb(PixbufRenderer *pr, GdkPixbuf **pixbuf, gint x, gint y, gint w, gint h, gpointer data)
 {
        ImageWindow *imd = (ImageWindow *)data;
-        if (imd->cm) color_man_correct_region(imd->cm, *pixbuf, x, y, w, h);
+       if (imd->cm) color_man_correct_region(imd->cm, *pixbuf, x, y, w, h);
        if (imd->desaturate) pixbuf_desaturate_rect(*pixbuf, x, y, w, h);
 
 }
@@ -557,11 +557,11 @@ void image_alter(ImageWindow *imd, AlterType type)
        const static gint mirror[]       = {1,   2, 1, 4, 3, 6, 5, 8, 7};
        const static gint flip[]         = {1,   4, 3, 2, 1, 8, 7, 6, 5};
 
-       
+
        if (!imd || !imd->pr) return;
-       
+
        if (imd->orientation < 1 || imd->orientation > 8) imd->orientation = 1;
-       
+
        switch (type)
                {
                case ALTER_ROTATE_90:
@@ -603,7 +603,7 @@ void image_alter(ImageWindow *imd, AlterType type)
                }
 
        pixbuf_renderer_set_orientation((PixbufRenderer *)imd->pr, imd->orientation);
-       if (imd->cm || imd->desaturate) 
+       if (imd->cm || imd->desaturate)
                pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, image_post_process_tile_color_cb, (gpointer) imd, (imd->cm != NULL) );
        else
                pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, NULL, NULL, TRUE);
@@ -704,7 +704,7 @@ static void image_post_buffer_set(ImageWindow *imd, FileData *fd, GdkPixbuf *pix
        if (fd && pixbuf)
                {
                imd->prev_fd = file_data_ref(fd);
-                       
+
                g_object_ref(pixbuf);
                imd->prev_pixbuf = pixbuf;
                imd->prev_color_row = color_row;
@@ -1101,7 +1101,7 @@ static void image_focus_paint(ImageWindow *imd, gint has_focus, GdkRectangle *ar
                gtk_paint_focus (widget->style, widget->window, GTK_STATE_ACTIVE,
                                 area, widget, "image_window",
                                 widget->allocation.x, widget->allocation.y,
-                                widget->allocation.width - 1, widget->allocation.height - 1);  
+                                widget->allocation.width - 1, widget->allocation.height - 1);
                }
        else
                {
@@ -1167,7 +1167,7 @@ static gint image_scroll_cb(GtkWidget *widget, GdkEventScroll *event, gpointer d
 
        if (imd->func_scroll &&
            event && event->type == GDK_SCROLL)
-               {
+               {
                imd->func_scroll(imd, event->direction, event->time,
                                 event->x, event->y, event->state, imd->data_scroll);
                return TRUE;
@@ -1310,13 +1310,13 @@ void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom)
                imd->orientation = imd->image_fd->user_orientation;
        else if (options->image.exif_rotate_enable)
                read_exif_for_orientation = TRUE;
-       
+
        if (read_exif_for_color_profile || read_exif_for_orientation)
                {
                gint orientation;
 
                exif = exif_read_fd(imd->image_fd, read_exif_for_color_profile);
-               
+
                if (exif && read_exif_for_orientation)
                        {
                        if (exif_get_integer(exif, "Exif.Image.Orientation", &orientation))
@@ -1328,7 +1328,7 @@ void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom)
                }
 
        pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, NULL, NULL, FALSE);
-       if (imd->cm) 
+       if (imd->cm)
                {
                color_man_free(imd->cm);
                imd->cm = NULL;
@@ -1345,12 +1345,12 @@ void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom)
 //                     image_state_set(imd, IMAGE_STATE_COLOR_ADJ);
                        }
                }
-               
+
        exif_free(exif);
 
-       if (imd->cm || imd->desaturate) 
+       if (imd->cm || imd->desaturate)
                pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, image_post_process_tile_color_cb, (gpointer) imd, (imd->cm != NULL) );
-               
+
        image_state_set(imd, IMAGE_STATE_IMAGE);
 }
 
@@ -1464,13 +1464,13 @@ void image_change_from_image(ImageWindow *imd, ImageWindow *source)
        imd->completed = source->completed;
        imd->state = source->state;
        source->state = IMAGE_STATE_NONE;
-       
+
        imd->orientation = source->orientation;
        imd->desaturate = source->desaturate;
 
        pixbuf_renderer_move(PIXBUF_RENDERER(imd->pr), PIXBUF_RENDERER(source->pr));
 
-       if (imd->cm || imd->desaturate) 
+       if (imd->cm || imd->desaturate)
                pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, image_post_process_tile_color_cb, (gpointer) imd, (imd->cm != NULL) );
        else
                pixbuf_renderer_set_post_process_func((PixbufRenderer *)imd->pr, NULL, NULL, TRUE);
@@ -1680,7 +1680,7 @@ static gint image_auto_refresh_cb(gpointer data)
 {
        ImageWindow *imd = data;
        time_t newtime;
-       
+
        if (!imd || !image_get_pixbuf(imd) ||
            imd->il || !imd->image_fd ||
            !options->update_on_time_change) return TRUE;
@@ -1846,7 +1846,7 @@ void image_select(ImageWindow *imd, gboolean select)
 {
        if (imd->has_frame)
                {
-               if (select) 
+               if (select)
                        {
                        gtk_widget_set_state(imd->widget, GTK_STATE_SELECTED);
                        gtk_widget_set_state(imd->pr, GTK_STATE_NORMAL); /* do not propagate */
@@ -1862,7 +1862,7 @@ void image_set_selectable(ImageWindow *imd, gboolean selectable)
 {
        if (imd->has_frame)
                {
-               if (selectable) 
+               if (selectable)
                        {
                        gtk_frame_set_shadow_type(GTK_FRAME(imd->frame), GTK_SHADOW_NONE);
                        gtk_container_set_border_width (GTK_CONTAINER (imd->frame), 4);
@@ -1948,16 +1948,16 @@ static void image_destroy_cb(GtkObject *widget, gpointer data)
 gboolean selectable_frame_expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 {
        gtk_paint_flat_box(widget->style,
-                           widget->window,
-                          widget->state,
+                          widget->window,
+                          widget->state,
                           GTK_FRAME (widget)->shadow_type,
-                           NULL,
-                           widget,
-                           NULL,
-                          widget->allocation.x + 3, widget->allocation.y + 3, 
-                          widget->allocation.width - 6, widget->allocation.height - 6); 
+                          NULL,
+                          widget,
+                          NULL,
+                          widget->allocation.x + 3, widget->allocation.y + 3,
+                          widget->allocation.width - 6, widget->allocation.height - 6);
+
+
        return FALSE;
 }
 
@@ -1965,11 +1965,11 @@ gboolean selectable_frame_expose_cb (GtkWidget *widget, GdkEventExpose *event, g
 void image_set_frame(ImageWindow *imd, gboolean frame)
 {
        frame = !!frame;
-       
+
        if (frame == imd->has_frame) return;
-       
+
        gtk_widget_hide(imd->pr);
-       
+
        if (frame)
                {
                imd->frame = gtk_frame_new(NULL);
@@ -1977,8 +1977,8 @@ void image_set_frame(ImageWindow *imd, gboolean frame)
                if (imd->has_frame != -1) gtk_container_remove(GTK_CONTAINER(imd->widget), imd->pr);
                gtk_container_add(GTK_CONTAINER(imd->frame), imd->pr);
                gtk_widget_unref(imd->pr);
-               g_signal_connect (G_OBJECT (imd->frame), "expose_event",  
-                    G_CALLBACK (selectable_frame_expose_cb), NULL);
+               g_signal_connect (G_OBJECT (imd->frame), "expose_event",
+                   G_CALLBACK (selectable_frame_expose_cb), NULL);
 
                GTK_WIDGET_SET_FLAGS(imd->frame, GTK_CAN_FOCUS);
                g_signal_connect(G_OBJECT(imd->frame), "focus_in_event",
@@ -1996,7 +1996,7 @@ void image_set_frame(ImageWindow *imd, gboolean frame)
        else
                {
                gtk_widget_ref(imd->pr);
-               if (imd->frame) 
+               if (imd->frame)
                        {
                        gtk_container_remove(GTK_CONTAINER(imd->frame), imd->pr);
                        gtk_widget_destroy(imd->frame);
@@ -2007,7 +2007,7 @@ void image_set_frame(ImageWindow *imd, gboolean frame)
                }
 
        gtk_widget_show(imd->pr);
-       
+
        imd->has_frame = frame;
 }
 
@@ -2054,14 +2054,14 @@ ImageWindow *image_new(gint frame)
 
        imd->func_button = NULL;
        imd->func_scroll = NULL;
-       
+
        imd->orientation = 1;
 
        imd->pr = GTK_WIDGET(pixbuf_renderer_new());
 
        image_options_set(imd);
 
-       
+
        imd->widget = gtk_vbox_new(0, 0);
 
        image_set_frame(imd, frame);
index cad9529..45a8748 100644 (file)
@@ -31,7 +31,7 @@ void image_set_drag_func(ImageWindow *imd,
        gpointer data);
 void image_set_scroll_func(ImageWindow *imd,
        void (*func)(ImageWindow *, GdkScrollDirection direction, guint32 time, gdouble x, gdouble y, guint state, gpointer),
-        gpointer data);
+       gpointer data);
 void image_set_scroll_notify_func(ImageWindow *imd,
                                  void (*func)(ImageWindow *imd, gint x, gint y, gint width, gint height, gpointer data),
                                  gpointer data);
index 1e3c2f2..76059c1 100644 (file)
@@ -71,7 +71,7 @@ static void view_window_dnd_init(ViewWindow *vw);
  *-----------------------------------------------------------------------------
  * misc
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static ImageWindow *view_window_active_image(ViewWindow *vw)
 {
@@ -136,7 +136,7 @@ static void view_collection_step(ViewWindow *vw, gint next)
 
                if (read_ahead_info) image_prebuffer_set(imd, read_ahead_info->fd);
                }
-       
+
 }
 
 static void view_collection_step_to_end(ViewWindow *vw, gint last)
@@ -471,7 +471,7 @@ static gint view_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpoi
                                break;
                        }
                }
-       else 
+       else
                {
                stop_signal = TRUE;
                switch (event->keyval)
@@ -593,7 +593,7 @@ static gint view_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpoi
  *-----------------------------------------------------------------------------
  * view window main routines
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void button_cb(ImageWindow *imd, gint button, guint32 time,
                      gdouble x, gdouble y, guint state, gpointer data)
@@ -853,7 +853,7 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat
        gtk_window_set_geometry_hints(GTK_WINDOW(vw->window), NULL, &geometry, GDK_HINT_MIN_SIZE);
 
        gtk_window_set_resizable(GTK_WINDOW(vw->window), TRUE);
-        gtk_container_set_border_width(GTK_CONTAINER(vw->window), 0);
+       gtk_container_set_border_width(GTK_CONTAINER(vw->window), 0);
 
        vw->imd = image_new(FALSE);
 
@@ -969,7 +969,7 @@ void view_window_new(FileData *fd)
                                         G_CALLBACK(view_window_collection_unref_cb), cd);
                        }
                }
-       else if (isdir(fd->path)) 
+       else if (isdir(fd->path))
                {
                GList *list = NULL;
 
@@ -1057,7 +1057,7 @@ gint view_window_find_image(ImageWindow *imd, gint *index, gint *total)
  *-----------------------------------------------------------------------------
  * view window menu routines and callbacks
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void view_new_window_cb(GtkWidget *widget, gpointer data)
 {
@@ -1244,13 +1244,13 @@ static void view_set_layout_path_cb(GtkWidget *widget, gpointer data)
        LayoutWindow *lw;
        const gchar *path;
        ImageWindow *imd;
-       
+
        imd = view_window_active_image(vw);
 
        if (!imd || !imd->image_fd) return;
        path = imd->image_fd->path;
        if (!path) return;
-       
+
        lw = layout_find_by_image_fd(imd);
        if (lw)
                layout_set_path(lw, path);
@@ -1424,8 +1424,8 @@ static void view_dir_list_skip(GtkWidget *widget, gpointer data)
 static void view_dir_list_destroy(GtkWidget *widget, gpointer data)
 {
        CViewConfirmD *d = data;
-        filelist_free(d->list);
-        g_free(d);
+       filelist_free(d->list);
+       g_free(d);
 }
 
 static GtkWidget *view_confirm_dir_list(ViewWindow *vw, GList *list)
@@ -1596,7 +1596,7 @@ static void view_window_dnd_init(ViewWindow *vw)
        gtk_drag_dest_set(imd->pr,
                          GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
                          dnd_file_drop_types, dnd_file_drop_types_count,
-                          GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
+                         GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
        g_signal_connect(G_OBJECT(imd->pr), "drag_data_received",
                         G_CALLBACK(view_window_get_dnd_data), vw);
 }
index 3594a4a..bd564da 100644 (file)
@@ -566,7 +566,7 @@ static void info_notebook_reordered_cb(GtkNotebook *notebook, GtkWidget *child,
                                t->pos = pos;
                                break;
                                }
-                       }       
+                       }
        }
 }
 
index ca3882f..93584e9 100644 (file)
@@ -16,7 +16,7 @@
 #  define gettext(String) (String)
 #  define dgettext(Domain,String) (String)
 #  define dcgettext(Domain,String,Type) (String)
-#  define bindtextdomain(Domain,Directory) (Domain) 
+#  define bindtextdomain(Domain,Directory) (Domain)
 #  define bind_textdomain_codeset(Domain,String) (Domain)
 #endif /* ENABLE_NLS */
 
index 7815e2c..c2b1444 100644 (file)
@@ -96,7 +96,7 @@ LayoutWindow *layout_find_by_image_fd(ImageWindow *imd)
                work = work->next;
                if (lw->image->image_fd == imd->image_fd)
                        return lw;
-               
+
                }
 
        return NULL;
@@ -124,7 +124,7 @@ static void layout_path_entry_changed_cb(GtkWidget *widget, gpointer data)
 
        layout_set_path(lw, buf);
 
-        g_free(buf);
+       g_free(buf);
 }
 
 static void layout_path_entry_tab_cb(const gchar *path, gpointer data)
@@ -269,7 +269,7 @@ static void layout_sort_button_press_cb(GtkWidget *widget, gpointer data)
        g_object_ref_sink(G_OBJECT(menu));
 #endif
 
-        /* ascending option */
+       /* ascending option */
        menu_item_add_divider(menu);
        menu_item_add_check(menu, _("Ascending"), lw->sort_ascend, G_CALLBACK(layout_sort_menu_ascend_cb), lw);
 
@@ -295,11 +295,11 @@ static GtkWidget *layout_sort_button(LayoutWindow *lw)
        GtkWidget *button;
 
        button = gtk_button_new_with_label(sort_type_get_text(lw->sort_method));
-        g_signal_connect(G_OBJECT(button), "clicked",
+       g_signal_connect(G_OBJECT(button), "clicked",
                         G_CALLBACK(layout_sort_button_press_cb), lw);
-        gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
+       gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
 
-        return button;
+       return button;
 }
 
 /*
@@ -755,7 +755,7 @@ static GtkWidget *layout_list_new(LayoutWindow *lw)
        vflist_set_thumb_status_func(lw->vfl, layout_list_thumb_cb, lw);
 
        vflist_marks_set(lw->vfl, lw->marks_enabled);
-       
+
        return lw->vfl->widget;
 }
 
@@ -913,7 +913,7 @@ void layout_selection_to_mark(LayoutWindow *lw, gint mark, SelectionToMarkMode m
 
        if (lw->vfl) vflist_selection_to_mark(lw->vfl, mark, mode);
        if (lw->vfi) vficon_selection_to_mark(lw->vfi, mark, mode);
-       
+
        layout_status_update_info(lw, NULL); /* osd in fullscreen mode */
 }
 
@@ -1350,7 +1350,7 @@ static void layout_tools_setup(LayoutWindow *lw, GtkWidget *tools, GtkWidget *fi
 
                gtk_window_set_resizable(GTK_WINDOW(lw->tools), TRUE);
                gtk_container_set_border_width(GTK_CONTAINER(lw->tools), 0);
-       
+
                new_window = TRUE;
                }
        else
@@ -1486,7 +1486,7 @@ void layout_split_change(LayoutWindow *lw, ImageSplitMode mode)
                if (lw->split_images[i])
                        {
                        gtk_widget_hide(lw->split_images[i]->widget);
-                       if (lw->split_images[i]->widget->parent != lw->utility_box) 
+                       if (lw->split_images[i]->widget->parent != lw->utility_box)
                                gtk_container_remove(GTK_CONTAINER(lw->split_images[i]->widget->parent), lw->split_images[i]->widget);
                        }
                }
@@ -1520,7 +1520,7 @@ static void layout_grid_setup(LayoutWindow *lw)
        priority_location = layout_grid_compass(lw);
 
        image = layout_image_setup_split(lw, lw->split_mode);
-       
+
        tools = layout_tools_new(lw);
        files = layout_list_new(lw);
 
@@ -1725,7 +1725,7 @@ void layout_colors_update(void)
                {
                LayoutWindow *lw = work->data;
                work = work->next;
-               
+
                if (!lw->image) continue;
                image_background_set_color(lw->image, options->image.use_custom_border_color ? &options->image.border_color : NULL);
                }
@@ -1857,7 +1857,7 @@ void layout_free(LayoutWindow *lw)
        layout_bars_close(lw);
 
        gtk_widget_destroy(lw->window);
-       
+
        histogram_free(lw->histogram);
 
        g_free(lw->path);
index 337213d..68581c9 100644 (file)
@@ -134,9 +134,9 @@ static gint layout_config_list_order_get(LayoutConfig *lc, gint n)
        GtkTreeIter iter;
        gint valid;
        gint c = 0;
-                                                                                                                               
+
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(lc->listview));
-                                                                                                                               
+
        valid = gtk_tree_model_get_iter_first(store, &iter);
        while (valid)
                {
@@ -198,7 +198,7 @@ static void layout_config_widget_click_cb(GtkWidget *widget, gpointer data)
        LayoutConfig *lc;
 
        lc = g_object_get_data(G_OBJECT(widget), "layout_config");
-       
+
        if (lc) lc->style = GPOINTER_TO_INT(data);
 }
 
@@ -259,7 +259,7 @@ static GtkWidget *layout_config_widget(GtkWidget *group, GtkWidget *box, gint st
        gtk_widget_show(table);
 
        gtk_widget_show(group);
-       
+
        return group;
 }
 
@@ -356,12 +356,12 @@ GtkWidget *layout_config_new(void)
                gtk_list_store_append(store, &iter);
                gtk_list_store_set(store, &iter, COLUMN_TEXT, _(layout_titles[i]), COLUMN_KEY, i, -1);
                }
-       
+
        gtk_container_add(GTK_CONTAINER(scrolled), lc->listview);
        gtk_widget_show(lc->listview);
 
        pref_label_new(lc->box, _("(drag to change order)"));
-       
+
        return lc->box;
 }
 
index cf9b881..8e681d3 100644 (file)
@@ -716,7 +716,7 @@ static void li_set_layout_path_cb(GtkWidget *widget, gpointer data)
        const gchar *path;
 
        if (!layout_valid(&lw)) return;
-       
+
        path = layout_image_get_path(lw);
        if (path) layout_set_path(lw, path);
 }
@@ -765,7 +765,7 @@ static GtkWidget *layout_image_pop_menu(LayoutWindow *lw)
 
        item = menu_item_add_stock(menu, _("View in _new window"), GTK_STOCK_NEW, G_CALLBACK(li_pop_menu_new_cb), lw);
        if (!path || fullscreen) gtk_widget_set_sensitive(item, FALSE);
-       
+
        item = menu_item_add(menu, _("_Go to directory view"), G_CALLBACK(li_set_layout_path_cb), lw);
        if (!path || li_check_if_current_path(lw, path)) gtk_widget_set_sensitive(item, FALSE);
 
@@ -797,7 +797,7 @@ static GtkWidget *layout_image_pop_menu(LayoutWindow *lw)
                        }
                }
        else
-                {
+               {
                menu_item_add(menu, _("_Start slideshow"), G_CALLBACK(li_pop_menu_slide_start_cb), lw);
                item = menu_item_add(menu, _("Pause slides_how"), G_CALLBACK(li_pop_menu_slide_pause_cb), lw);
                gtk_widget_set_sensitive(item, FALSE);
@@ -850,9 +850,9 @@ static void layout_image_dnd_receive(GtkWidget *widget, GdkDragContext *context,
 {
        LayoutWindow *lw = data;
        gint i;
-       
-       
-       for (i=0; i < MAX_SPLIT_IMAGES; i++) 
+
+
+       for (i=0; i < MAX_SPLIT_IMAGES; i++)
                {
                if (lw->split_images[i] && lw->split_images[i]->pr == widget)
                        break;
@@ -930,9 +930,9 @@ static void layout_image_dnd_get(GtkWidget *widget, GdkDragContext *context,
        LayoutWindow *lw = data;
        FileData *fd;
        gint i;
-       
-       
-       for (i=0; i < MAX_SPLIT_IMAGES; i++) 
+
+
+       for (i=0; i < MAX_SPLIT_IMAGES; i++)
                {
                if (lw->split_images[i] && lw->split_images[i]->pr == widget)
                        break;
@@ -1021,7 +1021,7 @@ static void layout_image_dnd_init(LayoutWindow *lw, gint i)
        gtk_drag_dest_set(imd->pr,
                          GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
                          dnd_file_drop_types, dnd_file_drop_types_count,
-                          GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
+                         GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
        g_signal_connect(G_OBJECT(imd->pr), "drag_data_received",
                         G_CALLBACK(layout_image_dnd_receive), lw);
 }
@@ -1060,7 +1060,7 @@ void layout_image_zoom_adjust(LayoutWindow *lw, gdouble increment)
 
        for (i=0; i < MAX_SPLIT_IMAGES; i++)
                {
-               if (lw->split_images[i] && lw->split_images[i] != lw->image && lw->connect_zoom) 
+               if (lw->split_images[i] && lw->split_images[i] != lw->image && lw->connect_zoom)
                        image_zoom_adjust(lw->split_images[i], increment); ;
                }
 }
@@ -1074,7 +1074,7 @@ void layout_image_zoom_set(LayoutWindow *lw, gdouble zoom)
 
        for (i=0; i < MAX_SPLIT_IMAGES; i++)
                {
-               if (lw->split_images[i] && lw->split_images[i] != lw->image && lw->connect_zoom) 
+               if (lw->split_images[i] && lw->split_images[i] != lw->image && lw->connect_zoom)
                        image_zoom_set(lw->split_images[i], zoom);
                }
 }
@@ -1203,7 +1203,7 @@ void layout_image_set_index(LayoutWindow *lw, gint index)
 
                        if ((index > old && (index != (gint) last->data || old != (gint) x->data))
                            || (old == (gint) last->data && index == (gint) x->data))
-                               {
+                               {
                                if (y->next)
                                        newindex = (gint) y->next->data;
                                else
@@ -1219,7 +1219,7 @@ void layout_image_set_index(LayoutWindow *lw, gint index)
 
                        read_ahead_fd = layout_list_get_fd(lw, newindex);
                        }
-                       
+
                while (x)
                        x = g_list_remove(x, x->data);
                }
@@ -1342,10 +1342,10 @@ void layout_image_next(LayoutWindow *lw)
                        ;
                if (y)
                        {
-                       if (y->next) 
-                               layout_image_set_index(lw, (gint) y->next->data);
-                       else
-                               layout_image_set_index(lw, (gint) x->data);
+                       if (y->next)
+                               layout_image_set_index(lw, (gint) y->next->data);
+                       else
+                               layout_image_set_index(lw, (gint) x->data);
                        }
                while (x)
                        x = g_list_remove(x, x->data);
@@ -1415,7 +1415,7 @@ void layout_image_prev(LayoutWindow *lw)
                        ;
                if (y)
                        {
-                       if (y->prev)
+                       if (y->prev)
                                layout_image_set_index(lw, (gint) y->prev->data);
                        else
                                layout_image_set_index(lw, (gint) last->data);
@@ -1522,8 +1522,8 @@ void layout_image_last(LayoutWindow *lw)
 static gint image_idx(LayoutWindow *lw, ImageWindow *imd)
 {
        gint i;
-       
-       for (i=0; i < MAX_SPLIT_IMAGES; i++) 
+
+       for (i=0; i < MAX_SPLIT_IMAGES; i++)
                {
                if (lw->split_images[i] == imd)
                        break;
@@ -1569,7 +1569,7 @@ static void layout_image_scroll_cb(ImageWindow *imd, GdkScrollDirection directio
        LayoutWindow *lw = data;
 
        gint i = image_idx(lw, imd);
-       
+
        if (i != -1)
                {
                printf("image activate scroll %d\n", i);
@@ -1637,14 +1637,14 @@ static void layout_image_drag_cb(ImageWindow *imd, gint button, guint32 time,
        for (i=0; i < MAX_SPLIT_IMAGES; i++)
                {
                if (lw->split_images[i] && lw->split_images[i] != imd)
-                       if (lw->connect_scroll) 
+                       if (lw->connect_scroll)
                                {
                                gdouble sx, sy;
                                if (state & GDK_CONTROL_MASK)
                                        {
                                        image_get_scroll_center(imd, &sx, &sy);
                                        }
-                               else 
+                               else
                                        {
                                        image_get_scroll_center(lw->split_images[i], &sx, &sy);
                                        sx += dx;
@@ -1661,7 +1661,7 @@ static void layout_image_button_inactive_cb(ImageWindow *imd, gint button, guint
        LayoutWindow *lw = data;
        GtkWidget *menu;
        gint i = image_idx(lw, imd);
-       
+
        if (i != -1)
                {
                layout_image_activate(lw, i);
@@ -1689,7 +1689,7 @@ static void layout_image_drag_inactive_cb(ImageWindow *imd, gint button, guint32
        LayoutWindow *lw = data;
 
        gint i = image_idx(lw, imd);
-       
+
        if (i != -1)
                {
                layout_image_activate(lw, i);
@@ -1727,7 +1727,7 @@ static void layout_image_update_cb(ImageWindow *imd, gpointer data)
 
 GtkWidget *layout_image_new(LayoutWindow *lw, gint i)
 {
-       if (!lw->split_images[i]) 
+       if (!lw->split_images[i])
                {
                lw->split_images[i] = image_new(TRUE);
 
@@ -1764,7 +1764,7 @@ void layout_image_deactivate(LayoutWindow *lw, gint i)
 void layout_image_activate(LayoutWindow *lw, gint i)
 {
        FileData *fd;
-       
+
        if (!lw->split_images[i]) return;
 
        /* deactivate currently active */
@@ -1773,7 +1773,7 @@ void layout_image_activate(LayoutWindow *lw, gint i)
 
        lw->image = lw->split_images[i];
        lw->active_split_image = i;
-       
+
        image_set_update_func(lw->image, layout_image_update_cb, lw);
        layout_image_set_buttons(lw);
        image_set_drag_func(lw->image, layout_image_drag_cb, lw);
@@ -1790,7 +1790,7 @@ void layout_image_activate(LayoutWindow *lw, gint i)
 
        fd = image_get_fd(lw->image);
 
-        if (fd)
+       if (fd)
                {
 //             layout_list_sync_path(lw, path);
                layout_set_path(lw, fd->path);
@@ -1801,7 +1801,7 @@ void layout_image_activate(LayoutWindow *lw, gint i)
 GtkWidget *layout_image_setup_split_none(LayoutWindow *lw)
 {
        gint i;
-       
+
        lw->split_mode = SPLIT_NONE;
 
        if (!lw->split_images[0])
@@ -1816,7 +1816,7 @@ GtkWidget *layout_image_setup_split_none(LayoutWindow *lw)
                image_set_frame(lw->split_images[0], (!lw->tools_float && !lw->tools_hidden));
                image_set_selectable(lw->split_images[0], 0);
                }
-               
+
        for (i=1; i < MAX_SPLIT_IMAGES; i++)
                {
                if (lw->split_images[i])
@@ -1828,9 +1828,9 @@ GtkWidget *layout_image_setup_split_none(LayoutWindow *lw)
 
 
        layout_image_activate(lw, 0);
-       
+
        lw->split_image_widget = lw->split_images[0]->widget;
-                       
+
        return lw->split_image_widget;
 }
 
@@ -1840,7 +1840,7 @@ GtkWidget *layout_image_setup_split_hv(LayoutWindow *lw, gboolean horizontal)
        gint i;
 
        lw->split_mode = horizontal ? SPLIT_HOR : SPLIT_VERT;
-       
+
        if (!lw->split_images[0])
                {
                layout_image_new(lw, 0);
@@ -1856,7 +1856,7 @@ GtkWidget *layout_image_setup_split_hv(LayoutWindow *lw, gboolean horizontal)
                if (lw->image)
                        {
                        gdouble sx, sy;
-                       image_change_fd(lw->split_images[1], 
+                       image_change_fd(lw->split_images[1],
                                image_get_fd(lw->image), image_zoom_get(lw->image));
                        image_get_scroll_center(lw->image, &sx, &sy);
                        image_set_scroll_center(lw->split_images[1], sx, sy);
@@ -1870,7 +1870,7 @@ GtkWidget *layout_image_setup_split_hv(LayoutWindow *lw, gboolean horizontal)
                image_set_selectable(lw->split_images[1], 1);
                }
 
-       
+
        for (i=2; i < MAX_SPLIT_IMAGES; i++)
                {
                if (lw->split_images[i])
@@ -1880,7 +1880,7 @@ GtkWidget *layout_image_setup_split_hv(LayoutWindow *lw, gboolean horizontal)
                        }
                }
 
-        if (!lw->image || lw->active_split_image < 0 || lw->active_split_image > 1)
+       if (!lw->image || lw->active_split_image < 0 || lw->active_split_image > 1)
                {
                layout_image_activate(lw, 0);
                }
@@ -1893,13 +1893,13 @@ GtkWidget *layout_image_setup_split_hv(LayoutWindow *lw, gboolean horizontal)
 
        gtk_paned_pack1 (GTK_PANED (paned), lw->split_images[0]->widget, TRUE, TRUE);
        gtk_paned_pack2 (GTK_PANED (paned), lw->split_images[1]->widget, TRUE, TRUE);
-       
+
        gtk_widget_show (lw->split_images[0]->widget);
        gtk_widget_show (lw->split_images[1]->widget);
-       
+
 
        lw->split_image_widget = paned;
-                       
+
        return lw->split_image_widget;
 
 }
@@ -1910,7 +1910,7 @@ GtkWidget *layout_image_setup_split_quad(LayoutWindow *lw)
        GtkWidget *vpaned1;
        GtkWidget *vpaned2;
        gint i;
-       
+
        lw->split_mode = SPLIT_QUAD;
 
        if (!lw->split_images[0])
@@ -1935,7 +1935,7 @@ GtkWidget *layout_image_setup_split_quad(LayoutWindow *lw)
                        if (lw->image)
                                {
                                gdouble sx, sy;
-                               image_change_fd(lw->split_images[i], 
+                               image_change_fd(lw->split_images[i],
                                        image_get_fd(lw->image), image_zoom_get(lw->image));
                                image_get_scroll_center(lw->image, &sx, &sy);
                                image_set_scroll_center(lw->split_images[i], sx, sy);
@@ -1958,7 +1958,7 @@ GtkWidget *layout_image_setup_split_quad(LayoutWindow *lw)
                }
 
 
-        if (!lw->image || lw->active_split_image < 0 || lw->active_split_image > 3)
+       if (!lw->image || lw->active_split_image < 0 || lw->active_split_image > 3)
                {
                layout_image_activate(lw, 0);
                }
@@ -1976,15 +1976,15 @@ GtkWidget *layout_image_setup_split_quad(LayoutWindow *lw)
        gtk_paned_pack1 (GTK_PANED (hpaned), vpaned1, TRUE, TRUE);
        gtk_paned_pack2 (GTK_PANED (hpaned), vpaned2, TRUE, TRUE);
 
-       
+
        for (i=0; i < 4; i++)
                gtk_widget_show (lw->split_images[i]->widget);
        gtk_widget_show (vpaned1);
        gtk_widget_show (vpaned2);
-       
+
 
        lw->split_image_widget = hpaned;
-                       
+
        return lw->split_image_widget;
 
 }
@@ -1993,7 +1993,7 @@ GtkWidget *layout_image_setup_split(LayoutWindow *lw, ImageSplitMode mode)
 {
        switch (mode)
                {
-               case SPLIT_HOR: 
+               case SPLIT_HOR:
                        return layout_image_setup_split_hv(lw, TRUE);
                case SPLIT_VERT:
                        return layout_image_setup_split_hv(lw, FALSE);
index 1587039..a78c6b9 100644 (file)
@@ -175,8 +175,8 @@ void layout_keyboard_init(LayoutWindow *lw, GtkWidget *window)
  * menu callbacks
  *-----------------------------------------------------------------------------
  */
+
+
 static GtkWidget *layout_window(LayoutWindow *lw)
 {
        return lw->full_screen ? lw->full_screen->window : lw->window;
@@ -472,7 +472,7 @@ static void layout_menu_split_cb(GtkRadioAction *action, GtkRadioAction *current
                layout_image_full_screen_stop(lw);
 
        ImageSplitMode mode = gtk_radio_action_get_current_value(action);
-       
+
        if (mode == lw->split_mode) mode = 0; /* toggle back */
 
        layout_split_change(lw, mode);
@@ -552,7 +552,7 @@ static void layout_menu_overlay_cb(GtkAction *action, gpointer data)
                {
                if (image_osd_histogram_onoff_status(lw->image))
                        {
-                       image_osd_histogram_onoff_toggle(lw->image, 0);
+                       image_osd_histogram_onoff_toggle(lw->image, 0);
                        layout_image_overlay_update(lw);
                        }
                else
@@ -709,7 +709,7 @@ static void layout_menu_about_cb(GtkAction *action, gpointer data)
  *-----------------------------------------------------------------------------
  * select menu
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void layout_menu_select_all_cb(GtkAction *action, gpointer data)
 {
@@ -739,7 +739,7 @@ static void layout_menu_set_mark_sel_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_selection_to_mark(lw, mark, STM_MODE_SET);
 }
 
@@ -749,7 +749,7 @@ static void layout_menu_res_mark_sel_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_selection_to_mark(lw, mark, STM_MODE_RESET);
 }
 
@@ -759,7 +759,7 @@ static void layout_menu_toggle_mark_sel_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_selection_to_mark(lw, mark, STM_MODE_TOGGLE);
 }
 
@@ -769,7 +769,7 @@ static void layout_menu_sel_mark_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_mark_to_selection(lw, mark, MTS_MODE_SET);
 }
 
@@ -779,7 +779,7 @@ static void layout_menu_sel_mark_or_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_mark_to_selection(lw, mark, MTS_MODE_OR);
 }
 
@@ -789,7 +789,7 @@ static void layout_menu_sel_mark_and_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_mark_to_selection(lw, mark, MTS_MODE_AND);
 }
 
@@ -799,7 +799,7 @@ static void layout_menu_sel_mark_minus_cb(GtkAction *action, gpointer data)
        gint mark = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action), "mark_num"));
        g_assert(mark >= 1 && mark <= FILEDATA_MARKS_SIZE);
        mark--;
-       
+
        layout_mark_to_selection(lw, mark, MTS_MODE_MINUS);
 }
 
@@ -808,7 +808,7 @@ static void layout_menu_sel_mark_minus_cb(GtkAction *action, gpointer data)
  *-----------------------------------------------------------------------------
  * go menu
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void layout_menu_image_first_cb(GtkAction *action, gpointer data)
 {
@@ -839,7 +839,7 @@ static void layout_menu_image_last_cb(GtkAction *action, gpointer data)
  *-----------------------------------------------------------------------------
  * edit menu
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void layout_menu_edit_cb(GtkAction *action, gpointer data)
 {
@@ -1001,7 +1001,7 @@ void layout_recent_add_path(const gchar *path)
  *-----------------------------------------------------------------------------
  * menu
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 #define CB G_CALLBACK
 
@@ -1055,7 +1055,7 @@ static GtkActionEntry menu_entries[] = {
   { "Editor7",         NULL,           "editor7",              NULL,           NULL,   CB(layout_menu_edit_cb) },
   { "Editor8",         NULL,           "editor8",              NULL,           NULL,   CB(layout_menu_edit_cb) },
   { "Editor9",         NULL,           "editor9",              NULL,           NULL,   CB(layout_menu_edit_cb) },
-  
+
   { "RotateCW",                NULL,   N_("_Rotate clockwise"),        "bracketright", NULL,   CB(layout_menu_alter_90_cb) },
   { "RotateCCW",       NULL,   N_("Rotate _counterclockwise"), "bracketleft",  NULL,   CB(layout_menu_alter_90cc_cb) },
   { "Rotate180",       NULL,           N_("Rotate 1_80"),      "<shift>R",     NULL,   CB(layout_menu_alter_180_cb) },
@@ -1113,7 +1113,7 @@ static GtkActionEntry menu_entries[] = {
 
 static GtkToggleActionEntry menu_toggle_entries[] = {
   { "Thumbnails",      NULL,           N_("_Thumbnails"),      "T",            NULL,   CB(layout_menu_thumb_cb) },
-  { "ShowMarks",        NULL,          N_("Show _Marks"),      "M",            NULL,   CB(layout_menu_marks_cb) },  
+  { "ShowMarks",        NULL,          N_("Show _Marks"),      "M",            NULL,   CB(layout_menu_marks_cb) },
   { "FloatTools",      NULL,           N_("_Float file list"), "L",            NULL,   CB(layout_menu_float_cb) },
   { "HideToolbar",     NULL,           N_("Hide tool_bar"),    NULL,           NULL,   CB(layout_menu_toolbar_cb) },
   { "SBarKeywords",    NULL,           N_("_Keywords"),        "<control>K",   NULL,   CB(layout_menu_bar_info_cb) },
@@ -1315,7 +1315,7 @@ static void layout_actions_setup_marks(LayoutWindow *lw)
                                "<ui>"
                                "  <menubar name='MainMenu'>"
                                "    <menu action='SelectMenu'>");
-       
+
        for (mark = 1; mark <= FILEDATA_MARKS_SIZE; mark++)
                {
                layout_actions_setup_mark(lw, mark, "Mark%d",           _("Mark _%d"), NULL, NULL);
@@ -1423,7 +1423,7 @@ GtkWidget *layout_actions_menu_bar(LayoutWindow *lw)
  *-----------------------------------------------------------------------------
  * toolbar
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void layout_button_thumb_cb(GtkWidget *widget, gpointer data)
 {
@@ -1658,7 +1658,7 @@ static GList *layout_bar_info_list_cb(gpointer data)
 static void layout_bar_info_new(LayoutWindow *lw)
 {
        if (!lw->utility_box) return;
-                                                                                                                    
+
        lw->bar_info = bar_info_new(layout_image_get_fd(lw), FALSE, lw->utility_box);
        bar_info_set_selection_func(lw->bar_info, layout_bar_info_list_cb, lw);
        bar_info_selection(lw->bar_info, layout_selection_count(lw, NULL) - 1);
@@ -1670,7 +1670,7 @@ static void layout_bar_info_new(LayoutWindow *lw)
        gtk_box_pack_start(GTK_BOX(lw->utility_box), lw->bar_info, FALSE, FALSE, 0);
        gtk_widget_show(lw->bar_info);
 }
-                                                                                                                    
+
 static void layout_bar_info_close(LayoutWindow *lw)
 {
        if (lw->bar_info)
@@ -1752,7 +1752,7 @@ static void layout_bar_exif_new(LayoutWindow *lw)
                         G_CALLBACK(layout_bar_exif_destroyed), lw);
        g_signal_connect(G_OBJECT(lw->bar_exif), "size_allocate",
                         G_CALLBACK(layout_bar_exif_sized), lw);
-        lw->bar_exif_enabled = TRUE;
+       lw->bar_exif_enabled = TRUE;
 
        if (lw->bar_exif_size < 1) lw->bar_exif_size = SIDEBAR_WIDTH;
        gtk_widget_set_size_request(lw->bar_exif, lw->bar_exif_size, -1);
@@ -1768,7 +1768,7 @@ static void layout_bar_exif_close(LayoutWindow *lw)
                bar_exif_close(lw->bar_exif);
                lw->bar_exif = NULL;
                }
-        lw->bar_exif_enabled = FALSE;
+       lw->bar_exif_enabled = FALSE;
 }
 
 void layout_bar_exif_toggle(LayoutWindow *lw)
index 7842cc1..bb487b5 100644 (file)
@@ -51,7 +51,7 @@ static CollectionData *command_collection = NULL;
  *-----------------------------------------------------------------------------
  * misc (public)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 GtkWidget *window_new(GtkWindowType type, const gchar *name, const gchar *icon,
                      const gchar *icon_file, const gchar *subtitle)
@@ -61,7 +61,7 @@ GtkWidget *window_new(GtkWindowType type, const gchar *name, const gchar *icon,
 
        window = gtk_window_new(type);
        if (!window) return NULL;
-       
+
        if (subtitle)
                {
                title = g_strdup_printf("%s - %s", subtitle, GQ_APPNAME);
@@ -70,7 +70,7 @@ GtkWidget *window_new(GtkWindowType type, const gchar *name, const gchar *icon,
                {
                title = g_strdup_printf("%s", GQ_APPNAME);
                }
-       
+
        gtk_window_set_title(GTK_WINDOW(window), title);
        g_free(title);
 
@@ -150,11 +150,11 @@ const gchar *get_exec_time()
        static struct timeval delta = {0, 0};
 
        gettimeofday(&tv, NULL);
-       
+
        if (start_tv.tv_sec == 0) start_tv = tv;
-       
+
        tv.tv_sec -= start_tv.tv_sec;
-       if (tv.tv_usec >= start_tv.tv_usec) 
+       if (tv.tv_usec >= start_tv.tv_usec)
                tv.tv_usec -= start_tv.tv_usec;
        else
                {
@@ -168,7 +168,7 @@ const gchar *get_exec_time()
        started = 1;
 
        g_snprintf(timestr, sizeof(timestr), "%5d.%06d (+%05d.%06d)", (int)tv.tv_sec, (int)tv.tv_usec, (int)delta.tv_sec, (int)delta.tv_usec);
-       
+
        return timestr;
 }
 
@@ -295,7 +295,7 @@ static void help_browser_run(void)
  *-----------------------------------------------------------------------------
  * help window
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static GtkWidget *help_window = NULL;
 
@@ -322,7 +322,7 @@ void help_window_show(const gchar *key)
        {
        gchar *title = g_strdup_printf("%s - %s", _("Help"), GQ_APPNAME);
        help_window = help_window_new(title, GQ_WMCLASS, "help",
-                                      GQ_HELPDIR "/README", key);
+                                     GQ_HELPDIR "/README", key);
        g_free(title);
        }
        g_signal_connect(G_OBJECT(help_window), "destroy",
@@ -582,7 +582,7 @@ static RemoteCommandEntry remote_commands[] = {
        { "-n", "--next",               gr_image_next,          FALSE, FALSE, N_("next image") },
        { "-b", "--back",               gr_image_prev,          FALSE, FALSE, N_("previous image") },
        { NULL, "--first",              gr_image_first,         FALSE, FALSE, N_("first image") },
-        { NULL, "--last",               gr_image_last,          FALSE, FALSE, N_("last image") },
+       { NULL, "--last",               gr_image_last,          FALSE, FALSE, N_("last image") },
        { "-f", "--fullscreen",         gr_fullscreen_toggle,   FALSE, TRUE,  N_("toggle full screen") },
        { "-fs","--fullscreen-start",   gr_fullscreen_start,    FALSE, FALSE, N_("start full screen") },
        { "-fS","--fullscreen-stop",    gr_fullscreen_stop,     FALSE, FALSE, N_("stop full screen") },
@@ -860,7 +860,7 @@ static void remote_control(const gchar *arg_exec, GList *remote_list, const gcha
  *-----------------------------------------------------------------------------
  * command line parser (private) hehe, who needs popt anyway?
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static gint startup_blank = FALSE;
 static gint startup_full_screen = FALSE;
@@ -869,7 +869,7 @@ static gint startup_command_line_collection = FALSE;
 
 
 static void parse_command_line_add_file(const gchar *file_path, gchar **path, gchar **file,
-                                       GList **list, GList **collection_list)
+                                       GList **list, GList **collection_list)
 {
        gchar *path_parsed;
 
@@ -926,7 +926,7 @@ static void parse_command_line_add_dir(const gchar *dir, gchar **path, gchar **f
 static void parse_command_line_process_dir(const gchar *dir, gchar **path, gchar **file,
                                           GList **list, gchar **first_dir)
 {
-       
+
        if (!*list && !*first_dir)
                {
                *first_dir = g_strdup(dir);
@@ -946,7 +946,7 @@ static void parse_command_line_process_dir(const gchar *dir, gchar **path, gchar
 static void parse_command_line_process_file(const gchar *file_path, gchar **path, gchar **file,
                                            GList **list, GList **collection_list, gchar **first_dir)
 {
-       
+
        if (*first_dir)
                {
                parse_command_line_add_dir(*first_dir, path, file, list);
@@ -1081,13 +1081,13 @@ static void parse_command_line(int argc, char *argv[], gchar **path, gchar **fil
 #endif
                                print_term(_("  -v, --version              print version info\n"));
                                print_term(_("  -h, --help                 show this message\n\n"));
-                               
+
 #if 0
                                /* these options are not officially supported!
                                 * only for testing new features, no need to translate them */
                                print_term(  "  --alternate                use alternate similarity algorithm\n");
 #endif
-                               
+
                                exit (0);
                                }
                        else if (!remote_do)
@@ -1140,7 +1140,7 @@ static void parse_command_line_for_debug_option(int argc, char *argv[])
        if (argc > 1)
                {
                gint i;
+
                for (i = 1; i < argc; i++)
                        {
                        const gchar *cmd_line = argv[i];
@@ -1169,7 +1169,7 @@ static void parse_command_line_for_debug_option(int argc, char *argv[])
  *-----------------------------------------------------------------------------
  * startup, init, and exit
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 #define RC_HISTORY_NAME "history"
 
@@ -1199,7 +1199,7 @@ static void check_for_home_path(gchar *path)
        if (!isdir(buf))
                {
                printf_term(_("Creating %s dir:%s\n"), GQ_APPNAME, buf);
-       
+
                if (!mkdir_utf8(buf, 0755))
                        {
                        printf_term(_("Could not create dir:%s\n"), buf);
@@ -1372,7 +1372,7 @@ int main (int argc, char *argv[])
 
        /* init execution time counter*/
        get_exec_time();
-       
+
        /* setup locale, i18n */
        gtk_set_locale();
        bindtextdomain(PACKAGE, GQ_LOCALEDIR);
@@ -1380,7 +1380,7 @@ int main (int argc, char *argv[])
        textdomain(PACKAGE);
 
        /* setup random seed for random slideshow */
-        srand(time(NULL));
+       srand(time(NULL));
 
 #if 1
        printf("%s %s, This is an alpha release.\n", GQ_APPNAME, VERSION);
@@ -1413,7 +1413,7 @@ int main (int argc, char *argv[])
        keys_load();
        filter_add_defaults();
        filter_rebuild();
-       
+
        buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL);
        bufl = path_from_utf8(buf);
        gtk_accel_map_load(bufl);
index f8b388b..4f59dee 100644 (file)
 
 
 #define DEFAULT_OVERLAY_INFO   "%collection%(%number%/%total%) [%zoom%] <b>%name%</b>\n" \
-                               "%res%|%date%|%size%\n" \
+                               "%res%|%date%|%size%\n" \
                                "%fAperture%|%fShutterSpeed%|%fISOSpeedRating%|%fFocalLength%|%fExposureBias%\n" \
                                "%fCamera%|%fFlash%" \
 
index 2f54a18..278f726 100644 (file)
@@ -45,7 +45,7 @@ static union _endian { gint i; gchar b[4]; } *_endian = (union _endian *)&_ie;
 /*
  * Note: this code is harmless on little-endian machines.
  */
-static void 
+static void
 _byte_reverse (guchar *buf, guint32 longs)
 {
        guint32 t;
@@ -59,26 +59,26 @@ _byte_reverse (guchar *buf, guint32 longs)
 
 /**
  * md5_init: Initialise an md5 context object
- * @ctx: md5 context 
- * 
- * Initialise an md5 buffer. 
+ * @ctx: md5 context
+ *
+ * Initialise an md5 buffer.
  *
  **/
-void 
+void
 md5_init (MD5Context *ctx)
 {
        ctx->buf[0] = 0x67452301;
        ctx->buf[1] = 0xefcdab89;
        ctx->buf[2] = 0x98badcfe;
        ctx->buf[3] = 0x10325476;
-       
+
        ctx->bits[0] = 0;
        ctx->bits[1] = 0;
-       
-       if (IS_BIG_ENDIAN())    
-               ctx->doByteReverse = 1;         
-       else 
-               ctx->doByteReverse = 0; 
+
+       if (IS_BIG_ENDIAN())
+               ctx->doByteReverse = 1;
+       else
+               ctx->doByteReverse = 0;
 }
 
 
@@ -88,29 +88,29 @@ md5_init (MD5Context *ctx)
  * @ctx: conetxt object used for md5 computaion
  * @buf: buffer to add
  * @len: buffer length
- * 
+ *
  * Update context to reflect the concatenation of another buffer full
  * of bytes. Use this to progressively construct an md5 hash.
  **/
-void 
+void
 md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
 {
        guint32 t;
-       
+
        /* Update bitcount */
-       
+
        t = ctx->bits[0];
        if ((ctx->bits[0] = t + ((guint32) len << 3)) < t)
                ctx->bits[1]++;         /* Carry from low to high */
        ctx->bits[1] += len >> 29;
-       
+
        t = (t >> 3) & 0x3f;    /* Bytes already in shsInfo->data */
-       
+
        /* Handle any leading odd-sized chunks */
-       
+
        if (t) {
                guchar *p = (guchar *) ctx->in + t;
-               
+
                t = 64 - t;
                if (len < t) {
                        memcpy (p, buf, len);
@@ -124,7 +124,7 @@ md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
                len -= t;
        }
        /* Process data in 64-byte chunks */
-       
+
        while (len >= 64) {
                memcpy (ctx->in, buf, 64);
                if (ctx->doByteReverse)
@@ -133,9 +133,9 @@ md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
                buf += 64;
                len -= 64;
        }
-       
+
        /* Handle any remaining bytes of data. */
-       
+
        memcpy (ctx->in, buf, len);
 }
 
@@ -144,33 +144,33 @@ md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
 
 
 /*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 /**
  * md5_final: copy the final md5 hash to a bufer
  * @digest: 16 bytes buffer
  * @ctx: context containing the calculated md5
- * 
+ *
  * copy the final md5 hash to a bufer
  **/
-void 
+void
 md5_final (MD5Context *ctx, guchar digest[16])
 {
        guint32 count;
        guchar *p;
-       
+
        /* Compute number of bytes mod 64 */
        count = (ctx->bits[0] >> 3) & 0x3F;
-       
+
        /* Set the first char of padding to 0x80.  This is safe since there is
           always at least one byte free */
        p = ctx->in + count;
        *p++ = 0x80;
-       
+
        /* Bytes of padding needed to make 64 bytes */
        count = 64 - 1 - count;
-       
+
        /* Pad out to 56 mod 64 */
        if (count < 8) {
                /* Two lots of padding:  Pad the first block to 64 bytes */
@@ -178,7 +178,7 @@ md5_final (MD5Context *ctx, guchar digest[16])
                if (ctx->doByteReverse)
                        _byte_reverse (ctx->in, 16);
                md5_transform (ctx->buf, (guint32 *) ctx->in);
-               
+
                /* Now fill the next block with 56 bytes */
                memset (ctx->in, 0, 56);
        } else {
@@ -187,11 +187,11 @@ md5_final (MD5Context *ctx, guchar digest[16])
        }
        if (ctx->doByteReverse)
                _byte_reverse (ctx->in, 14);
-       
+
        /* Append length in bits and transform */
        ((guint32 *) ctx->in)[14] = ctx->bits[0];
        ((guint32 *) ctx->in)[15] = ctx->bits[1];
-       
+
        md5_transform (ctx->buf, (guint32 *) ctx->in);
        if (ctx->doByteReverse)
                _byte_reverse ((guchar *) ctx->buf, 4);
@@ -218,16 +218,16 @@ md5_final (MD5Context *ctx, guchar digest[16])
  * reflect the addition of 16 longwords of new data.  md5_Update blocks
  * the data and converts bytes into longwords for this routine.
  */
-static void 
+static void
 md5_transform (guint32 buf[4], const guint32 in[16])
 {
        register guint32 a, b, c, d;
-       
+
        a = buf[0];
        b = buf[1];
        c = buf[2];
        d = buf[3];
-       
+
        MD5STEP (F1, a, b, c, d, in[0] + 0xd76aa478, 7);
        MD5STEP (F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
        MD5STEP (F1, c, d, a, b, in[2] + 0x242070db, 17);
@@ -244,7 +244,7 @@ md5_transform (guint32 buf[4], const guint32 in[16])
        MD5STEP (F1, d, a, b, c, in[13] + 0xfd987193, 12);
        MD5STEP (F1, c, d, a, b, in[14] + 0xa679438e, 17);
        MD5STEP (F1, b, c, d, a, in[15] + 0x49b40821, 22);
-       
+
        MD5STEP (F2, a, b, c, d, in[1] + 0xf61e2562, 5);
        MD5STEP (F2, d, a, b, c, in[6] + 0xc040b340, 9);
        MD5STEP (F2, c, d, a, b, in[11] + 0x265e5a51, 14);
@@ -261,7 +261,7 @@ md5_transform (guint32 buf[4], const guint32 in[16])
        MD5STEP (F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
        MD5STEP (F2, c, d, a, b, in[7] + 0x676f02d9, 14);
        MD5STEP (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-       
+
        MD5STEP (F3, a, b, c, d, in[5] + 0xfffa3942, 4);
        MD5STEP (F3, d, a, b, c, in[8] + 0x8771f681, 11);
        MD5STEP (F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
@@ -278,7 +278,7 @@ md5_transform (guint32 buf[4], const guint32 in[16])
        MD5STEP (F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
        MD5STEP (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
        MD5STEP (F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-       
+
        MD5STEP (F4, a, b, c, d, in[0] + 0xf4292244, 6);
        MD5STEP (F4, d, a, b, c, in[7] + 0x432aff97, 10);
        MD5STEP (F4, c, d, a, b, in[14] + 0xab9423a7, 15);
@@ -295,7 +295,7 @@ md5_transform (guint32 buf[4], const guint32 in[16])
        MD5STEP (F4, d, a, b, c, in[11] + 0xbd3af235, 10);
        MD5STEP (F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
        MD5STEP (F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-       
+
        buf[0] += a;
        buf[1] += b;
        buf[2] += c;
@@ -310,19 +310,19 @@ md5_transform (guint32 buf[4], const guint32 in[16])
  * @buffer: byte buffer
  * @buffer_size: buffer size (in bytes)
  * @digest: 16 bytes buffer receiving the hash code.
- * 
- * Get the md5 hash of a buffer. The result is put in 
+ *
+ * Get the md5 hash of a buffer. The result is put in
  * the 16 bytes buffer @digest .
  **/
 void
 md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16])
-{      
+{
        MD5Context ctx;
 
        md5_init (&ctx);
        md5_update (&ctx, buffer, buffer_size);
        md5_final (&ctx, digest);
-       
+
 }
 
 /* modified for GQView, starting here */
@@ -332,12 +332,12 @@ md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16])
  * @filename: file name
  * @digest: 16 bytes buffer receiving the hash code.
  * @return: TRUE on success
- * 
- * Get the md5 hash of a file. The result is put in 
+ *
+ * Get the md5 hash of a file. The result is put in
  * the 16 bytes buffer @digest .
  **/
 gboolean md5_get_digest_from_file(const gchar *path, guchar digest[16])
-{      
+{
        MD5Context ctx;
        guchar tmp_buf[1024];
        gint nb_bytes_read;
@@ -348,12 +348,12 @@ gboolean md5_get_digest_from_file(const gchar *path, guchar digest[16])
        if (!fp) return FALSE;
 
        md5_init(&ctx);
-       
+
        while ((nb_bytes_read = fread (tmp_buf, sizeof (guchar), sizeof(tmp_buf), fp)) > 0)
                {
                md5_update (&ctx, tmp_buf, nb_bytes_read);
                }
-       
+
        success = (ferror(fp) == 0);
        fclose(fp);
        if (!success) return FALSE;
index 4fdebac..a4f470e 100644 (file)
@@ -33,7 +33,7 @@ static GtkWidget *real_submenu_add_alter(GtkWidget *menu, GCallback func, gpoint
  *-----------------------------------------------------------------------------
  * menu utils
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static GtkWidget *add_menu_item(GtkWidget *menu, gchar *label, GtkAccelGroup *accel_group,
                                guint accel_key, guint accel_mods, GCallback func, gpointer data)
@@ -60,7 +60,7 @@ gpointer submenu_item_get_data(GtkWidget *menu)
  *-----------------------------------------------------------------------------
  * edit menu
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void add_edit_items(GtkWidget *menu, GCallback func, GtkAccelGroup *accel_grp)
 {
@@ -232,7 +232,7 @@ static void submenu_add_alter_item(GtkWidget *menu, GCallback func, AlterType ty
                {
                add_menu_item(menu, alter_type_get_text(type), accel_group,
                              accel_key, accel_mods, func, GINT_TO_POINTER((gint)type));
-               
+
                }
        else
                {
index cabda93..6e7efd3 100644 (file)
@@ -59,7 +59,7 @@ void pan_calendar_update(PanWindow *pw, PanItem *pi_day)
        gint x, y, w, h;
        gint grid;
        gint column;
-       
+
        while ((pi = pan_item_find_by_key(pw, PAN_ITEM_NONE, "day_bubble"))) pan_item_remove(pw, pi);
 
        if (!pi_day || pi_day->type != PAN_ITEM_BOX ||
@@ -324,13 +324,13 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
                        char fake_path[20];
 
                        dt = pan_date_to_time(year, month, day);
-                       
-                       /* 
-                        * Create a FileData entry that represents the given day. 
+
+                       /*
+                        * Create a FileData entry that represents the given day.
                         * It does not correspond to any real file
-                        */ 
-                         
-                       g_snprintf(fake_path, sizeof(fake_path), "//%04d-%02d-%02d", year, month, day); 
+                        */
+
+                       g_snprintf(fake_path, sizeof(fake_path), "//%04d-%02d-%02d", year, month, day);
                        fd = file_data_new_simple(fake_path);
                        fd->date = dt;
                        pi_day = pan_item_box_new(pw, fd, x, y, PAN_CAL_DAY_WIDTH, PAN_CAL_DAY_HEIGHT,
index 5beec57..4d96246 100644 (file)
@@ -358,7 +358,7 @@ static PangoLayout *pan_item_text_layout(PanItem *pi, GtkWidget *widget)
                {
                PangoAttrList *pal;
                PangoAttribute *pa;
-               
+
                pal = pango_attr_list_new();
                if (pi->text_attr & PAN_TEXT_ATTR_BOLD)
                        {
index 1600084..2f8a44a 100644 (file)
@@ -410,7 +410,7 @@ static void pan_window_dispose_tile_cb(PixbufRenderer *pr, gint x, gint y,
  *-----------------------------------------------------------------------------
  * misc
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void pan_window_message(PanWindow *pw, const gchar *text)
 {
@@ -686,7 +686,7 @@ void pan_cache_sync_date(PanWindow *pw, GList *list)
                while (needle)
                        {
                        PanCacheData *pc;
-                       
+
                        pc = needle->data;
                        if (pc->fd == fd)
                                {
@@ -1444,7 +1444,7 @@ static void pan_info_add_exif(PanTextAlignment *ta, FileData *fd)
                gchar *text;
 
                if (ExifUIList[i].current == EXIF_UI_OFF) continue;
-               
+
                text = exif_get_data_as_text(exif, ExifUIList[i].key);
                text = bar_exif_validate_text(text);
                if (ExifUIList[i].current == EXIF_UI_IFSET && (!text || !*text))
@@ -2009,7 +2009,7 @@ static void pan_search_toggle_visible(PanWindow *pw, gint enable)
  *-----------------------------------------------------------------------------
  * main window
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void button_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
 {
@@ -2369,7 +2369,7 @@ static void pan_window_new_real(const gchar *path)
        gtk_window_set_geometry_hints(GTK_WINDOW(pw->window), NULL, &geometry, GDK_HINT_MIN_SIZE);
 
        gtk_window_set_resizable(GTK_WINDOW(pw->window), TRUE);
-        gtk_container_set_border_width(GTK_CONTAINER(pw->window), 0);
+       gtk_container_set_border_width(GTK_CONTAINER(pw->window), 0);
 
        vbox = gtk_vbox_new(FALSE, 0);
        gtk_container_add(GTK_CONTAINER(pw->window), vbox);
@@ -2597,7 +2597,7 @@ static gint pan_warning(const gchar *path)
        group = pref_box_new(group, TRUE, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
 
        ct_button = pref_checkbox_new_int(group, _("Cache thumbnails"),
-                                         options->thumbnails.enable_caching, &options->thumbnails.enable_caching);
+                                         options->thumbnails.enable_caching, &options->thumbnails.enable_caching);
        button = pref_checkbox_new_int(group, _("Use shared thumbnail cache"),
                                       options->thumbnails.spec_standard, &options->thumbnails.spec_standard);
        pref_checkbox_link_sensitivity(ct_button, button);
@@ -2822,8 +2822,8 @@ static GtkWidget *pan_popup_menu(PanWindow *pw)
        menu_item_add_check(menu, _("_Show Exif information"), pw->info_includes_exif,
                            G_CALLBACK(pan_info_toggle_exif_cb), pw);
        item = menu_item_add(menu, _("Show im_age"), NULL, NULL);
-        submenu = gtk_menu_new();
-        gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
+       submenu = gtk_menu_new();
+       gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
 
        item = menu_item_add_check(submenu, _("_None"), (pw->info_image_size == PAN_IMAGE_SIZE_THUMB_NONE),
                                   G_CALLBACK(pan_info_toggle_image_cb), pw);
@@ -2848,8 +2848,8 @@ static GtkWidget *pan_popup_menu(PanWindow *pw)
        item = menu_item_add_check(submenu, _("1:10 (10%)"), (pw->info_image_size == PAN_IMAGE_SIZE_10),
                                   G_CALLBACK(pan_info_toggle_image_cb), pw);
        g_object_set_data(G_OBJECT(item), INFO_IMAGE_SIZE_KEY, GINT_TO_POINTER(PAN_IMAGE_SIZE_10));
-       
-       
+
+
 
        menu_item_add_divider(menu);
 
@@ -2957,7 +2957,7 @@ static void pan_window_dnd_init(PanWindow *pw)
        gtk_drag_dest_set(widget,
                          GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP,
                          dnd_file_drop_types, dnd_file_drop_types_count,
-                          GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
+                         GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK);
        g_signal_connect(G_OBJECT(widget), "drag_data_received",
                         G_CALLBACK(pan_window_get_dnd_data), pw);
 }
index 722fea7..af038d3 100644 (file)
@@ -27,7 +27,7 @@
 
 #ifdef GQ_BUILD
        #include "pixbuf_util.h"
-       
+
        /* for debug */
        #include "main.h"
 #endif
@@ -400,7 +400,7 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
                                                          150,
                                                          100,
                                                          G_PARAM_READABLE | G_PARAM_WRITABLE));
-       
+
        g_object_class_install_property(gobject_class,
                                        PROP_AUTOFIT_LIMIT,
                                        g_param_spec_boolean("autofit_limit",
@@ -420,7 +420,7 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
                                                          G_PARAM_READABLE | G_PARAM_WRITABLE));
 
 
-       signals[SIGNAL_ZOOM] = 
+       signals[SIGNAL_ZOOM] =
                g_signal_new("zoom",
                             G_OBJECT_CLASS_TYPE(gobject_class),
                             G_SIGNAL_RUN_LAST,
@@ -430,7 +430,7 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
                             G_TYPE_NONE, 1,
                             G_TYPE_DOUBLE);
 
-       signals[SIGNAL_CLICKED] = 
+       signals[SIGNAL_CLICKED] =
                g_signal_new("clicked",
                             G_OBJECT_CLASS_TYPE(gobject_class),
                             G_SIGNAL_RUN_LAST,
@@ -440,7 +440,7 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
                             G_TYPE_NONE, 1,
                             GDK_TYPE_EVENT);
 
-       signals[SIGNAL_SCROLL_NOTIFY] = 
+       signals[SIGNAL_SCROLL_NOTIFY] =
                g_signal_new("scroll-notify",
                             G_OBJECT_CLASS_TYPE(gobject_class),
                             G_SIGNAL_RUN_LAST,
@@ -449,7 +449,7 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
                             g_cclosure_marshal_VOID__VOID,
                             G_TYPE_NONE, 0);
 
-       signals[SIGNAL_RENDER_COMPLETE] = 
+       signals[SIGNAL_RENDER_COMPLETE] =
                g_signal_new("render-complete",
                             G_OBJECT_CLASS_TYPE(gobject_class),
                             G_SIGNAL_RUN_LAST,
@@ -458,7 +458,7 @@ static void pixbuf_renderer_class_init(PixbufRendererClass *class)
                             g_cclosure_marshal_VOID__VOID,
                             G_TYPE_NONE, 0);
 
-       signals[SIGNAL_DRAG] = 
+       signals[SIGNAL_DRAG] =
                g_signal_new("drag",
                             G_OBJECT_CLASS_TYPE(gobject_class),
                             G_SIGNAL_RUN_LAST,
@@ -981,7 +981,7 @@ static OverlayData *pr_overlay_find(PixbufRenderer *pr, gint id)
 }
 
 gint pixbuf_renderer_overlay_add(PixbufRenderer *pr, GdkPixbuf *pixbuf, gint x, gint y,
-                                gint relative, gint always)
+                                gint relative, gint always)
 {
        OverlayData *od;
        gint id;
@@ -2016,8 +2016,8 @@ static void pr_tile_prepare(PixbufRenderer *pr, ImageTile *it)
                it->size += size;
                pr->tile_cache_size += size;
                }
-       
-       if ((pr->zoom != 1.0 || pr->source_tiles_enabled || (pr->pixbuf && gdk_pixbuf_get_has_alpha(pr->pixbuf)) || 
+
+       if ((pr->zoom != 1.0 || pr->source_tiles_enabled || (pr->pixbuf && gdk_pixbuf_get_has_alpha(pr->pixbuf)) ||
             pr->orientation != EXIF_ORIENTATION_TOP_LEFT || pr->func_post_process) && !it->pixbuf)
                {
                GdkPixbuf *pixbuf;
@@ -2051,11 +2051,11 @@ static void pr_tile_prepare(PixbufRenderer *pr, ImageTile *it)
  * drawing
  *-------------------------------------------------------------------
  */
+
 
 static void pr_tile_coords_map_orientation(PixbufRenderer *pr,
-                                     double tile_x, double tile_y, /* coordinates of the tile */
-                                    gint image_w, gint image_h, 
+                                    double tile_x, double tile_y, /* coordinates of the tile */
+                                    gint image_w, gint image_h,
                                     double tile_w, double tile_h,
                                     double *res_x, double *res_y)
 {
@@ -2101,8 +2101,8 @@ static void pr_tile_coords_map_orientation(PixbufRenderer *pr,
                        /* The other values are out of range */
                        break;
                }
-//     printf("tile coord y:%f, ih:%d, th:%f ry:%f\n", tile_y, image_h, tile_h, *res_x); 
-} 
+//     printf("tile coord y:%f, ih:%d, th:%f ry:%f\n", tile_y, image_h, tile_h, *res_x);
+}
 
 static void pr_tile_region_map_orientation(PixbufRenderer *pr,
                                     gint area_x, gint area_y, /* coordinates of the area inside tile */
@@ -2164,8 +2164,8 @@ static void pr_tile_region_map_orientation(PixbufRenderer *pr,
                        /* The other values are out of range */
                        break;
                }
-//     printf("inside y:%d, th:%d, ah:%d ry:%d\n", area_y, tile_h, area_h, *res_x); 
-} 
+//     printf("inside y:%d, th:%d, ah:%d ry:%d\n", area_y, tile_h, area_h, *res_x);
+}
 
 static void pr_coords_map_orientation_reverse(PixbufRenderer *pr,
                                     gint area_x, gint area_y,
@@ -2227,7 +2227,7 @@ static void pr_coords_map_orientation_reverse(PixbufRenderer *pr,
                        /* The other values are out of range */
                        break;
                }
-} 
+}
 
 
 static GdkPixbuf *pr_get_spare_tile(PixbufRenderer *pr)
@@ -2248,7 +2248,7 @@ static void pr_tile_rotate_90_clockwise(PixbufRenderer *pr, GdkPixbuf **tile, gi
        guchar *ip, *spi, *dpi;
        gint i, j;
        gint tw = pr->tile_width;
-               
+
        srs = gdk_pixbuf_get_rowstride(src);
        s_pix = gdk_pixbuf_get_pixels(src);
        spi = s_pix + (x * COLOR_BYTES);
@@ -2269,7 +2269,7 @@ static void pr_tile_rotate_90_clockwise(PixbufRenderer *pr, GdkPixbuf **tile, gi
                        sp += COLOR_BYTES;
                        }
                }
-       
+
        pr->spare_tile = src;
        *tile = dest;
 }
@@ -2284,7 +2284,7 @@ static void pr_tile_rotate_90_counter_clockwise(PixbufRenderer *pr, GdkPixbuf **
        guchar *ip, *spi, *dpi;
        gint i, j;
        gint th = pr->tile_height;
-       
+
        srs = gdk_pixbuf_get_rowstride(src);
        s_pix = gdk_pixbuf_get_pixels(src);
        spi = s_pix + (x * COLOR_BYTES);
@@ -2305,7 +2305,7 @@ static void pr_tile_rotate_90_counter_clockwise(PixbufRenderer *pr, GdkPixbuf **
                        sp += COLOR_BYTES;
                        }
                }
-       
+
        pr->spare_tile = src;
        *tile = dest;
 }
@@ -2379,7 +2379,7 @@ static void pr_tile_mirror_and_flip(PixbufRenderer *pr, GdkPixbuf **tile, gint x
                        dp -= COLOR_BYTES;
                        }
                }
-       
+
        pr->spare_tile = src;
        *tile = dest;
 }
@@ -2524,11 +2524,11 @@ static void pr_tile_render(PixbufRenderer *pr, ImageTile *it,
                double src_x, src_y;
                gint pb_x, pb_y;
                gint pb_w, pb_h;
-               pr_tile_coords_map_orientation(pr, it->x, it->y, 
-                                           pr->image_width, pr->image_height, 
+               pr_tile_coords_map_orientation(pr, it->x, it->y,
+                                           pr->image_width, pr->image_height,
                                            pr->tile_width, pr->tile_height,
                                            &src_x, &src_y);
-               pr_tile_region_map_orientation(pr, x, y, 
+               pr_tile_region_map_orientation(pr, x, y,
                                            pr->tile_width, pr->tile_height,
                                            w, h,
                                            &pb_x, &pb_y,
@@ -2547,8 +2547,8 @@ static void pr_tile_render(PixbufRenderer *pr, ImageTile *it,
                        }
                else
                        {
-                       
-                       
+
+
                        if (pr->orientation == EXIF_ORIENTATION_TOP_LEFT && !(pr->func_post_process && !(pr->post_process_slow && fast)))
                                {
                                /* faster, simple, base orientation, no postprocessing */
@@ -2563,7 +2563,7 @@ static void pr_tile_render(PixbufRenderer *pr, ImageTile *it,
                        else
                                {
                                gdk_pixbuf_copy_area(pr->pixbuf,
-                                                    src_x + pb_x, src_y + pb_y,
+                                                    src_x + pb_x, src_y + pb_y,
                                                     pb_w, pb_h,
                                                     it->pixbuf,
                                                     pb_x, pb_y);
@@ -2584,11 +2584,11 @@ static void pr_tile_render(PixbufRenderer *pr, ImageTile *it,
                scale_x = (double)pr->width / pr->image_width;
                scale_y = (double)pr->height / pr->image_height;
 
-               pr_tile_coords_map_orientation(pr, it->x / scale_x, it->y /scale_y , 
-                                           pr->image_width, pr->image_height, 
+               pr_tile_coords_map_orientation(pr, it->x / scale_x, it->y /scale_y ,
+                                           pr->image_width, pr->image_height,
                                            pr->tile_width / scale_x , pr->tile_height / scale_y,
                                            &src_x, &src_y);
-               pr_tile_region_map_orientation(pr, x, y, 
+               pr_tile_region_map_orientation(pr, x, y,
                                            pr->tile_width, pr->tile_height,
                                            w, h,
                                            &pb_x, &pb_y,
@@ -2623,10 +2623,10 @@ static void pr_tile_render(PixbufRenderer *pr, ImageTile *it,
 
        if (draw && it->pixbuf && !it->blank)
                {
-               
+
                if (pr->func_post_process && !(pr->post_process_slow && fast))
                        pr->func_post_process(pr, &it->pixbuf, x, y, w, h, pr->post_process_user_data);
-               
+
                gdk_draw_pixbuf(it->pixmap,
                                box->style->fg_gc[GTK_WIDGET_STATE(box)],
                                it->pixbuf,
@@ -3168,7 +3168,7 @@ static gint pr_zoom_clamp(PixbufRenderer *pr, gdouble zoom,
                                h = h * factor + 0.5;
                                scale = scale * factor;
                                }
-                       
+
                        if (w < 1) w = 1;
                        if (h < 1) h = 1;
                        }
@@ -3509,7 +3509,7 @@ void pixbuf_renderer_scroll_to_point(PixbufRenderer *pr, gint x, gint y,
 void pixbuf_renderer_get_scroll_center(PixbufRenderer *pr, gdouble *x, gdouble *y)
 {
        gint src_x, src_y;
-       
+
        src_x = pr->x_scroll + pr->vis_width / 2;
        src_y = pr->y_scroll + pr->vis_height / 2;
 
@@ -3526,7 +3526,7 @@ void pixbuf_renderer_set_scroll_center(PixbufRenderer *pr, gdouble x, gdouble y)
 
        pr->subpixel_x_scroll = dst_x - (int)dst_x;
        pr->subpixel_y_scroll = dst_y - (int)dst_y;
-       
+
        pixbuf_renderer_scroll(pr, (int)dst_x, (int)dst_y);
 }
 
@@ -3750,7 +3750,7 @@ static void pr_pixbuf_sync(PixbufRenderer *pr, gdouble zoom)
 
                return;
                }
-               
+
        pr_pixbuf_size_sync(pr);
        pr_zoom_sync(pr, zoom, TRUE, TRUE, FALSE, 0, 0);
 }
@@ -3801,7 +3801,7 @@ gint pixbuf_renderer_get_orientation(PixbufRenderer *pr)
 void pixbuf_renderer_set_post_process_func(PixbufRenderer *pr, PixbufRendererPostProcessFunc func, gpointer user_data, gint slow)
 {
        g_return_if_fail(IS_PIXBUF_RENDERER(pr));
-       
+
        pr->func_post_process = func;
        pr->post_process_user_data = user_data;
        pr->post_process_slow = func && slow;
@@ -3877,7 +3877,7 @@ void pixbuf_renderer_area_changed(PixbufRenderer *pr, gint src_x, gint src_y, gi
 
        g_return_if_fail(IS_PIXBUF_RENDERER(pr));
 
-        pr_coords_map_orientation_reverse(pr,
+       pr_coords_map_orientation_reverse(pr,
                                     src_x, src_y,
                                     pr->image_width, pr->image_height,
                                     src_w, src_h,
index 8dd4e67..ab875b9 100644 (file)
@@ -123,7 +123,7 @@ struct _PixbufRenderer
 
        PixbufRendererTileRequestFunc func_tile_request;
        PixbufRendererTileDisposeFunc func_tile_dispose;
-       
+
        gpointer func_tile_data;
 
        PixbufRendererPostProcessFunc func_post_process;
@@ -148,7 +148,7 @@ struct _PixbufRenderer
        GdkPixmap *overlay_buffer;
 
        GdkPixbuf *spare_tile;
-       
+
        gint orientation;
 };
 
index ea3b914..a87a74d 100644 (file)
@@ -189,7 +189,7 @@ static void pixbuf_copy_block_rotate(guchar *src, gint src_row_stride, gint x, g
                        if (bytes_per_pixel == 4) *(dp) = *(sp++);      /* a */
                        }
                }
-       
+
 }
 
 static void pixbuf_copy_block(guchar *src, gint src_row_stride, gint w, gint h,
@@ -221,15 +221,15 @@ GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gint counter_clockwise)
        gint sw, sh, srs;
        gint dw, dh, drs;
        guchar *s_pix;
-        guchar *d_pix;
+       guchar *d_pix;
 #if 0
        guchar *sp;
-        guchar *dp;
+       guchar *dp;
 #endif
        gint i, j;
        gint a;
        GdkPixbuf *buffer;
-        guchar *b_pix;
+       guchar *b_pix;
        gint brs;
        gint w, h;
 
@@ -323,9 +323,9 @@ GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gint mirror, gint flip)
        gint w, h, srs;
        gint drs;
        guchar *s_pix;
-        guchar *d_pix;
+       guchar *d_pix;
        guchar *sp;
-        guchar *dp;
+       guchar *dp;
        gint i, j;
        gint a;
 
@@ -415,7 +415,7 @@ void pixbuf_draw_rect_fill(GdkPixbuf *pb,
        prs = gdk_pixbuf_get_rowstride(pb);
        p_pix = gdk_pixbuf_get_pixels(pb);
 
-        for (i = 0; i < h; i++)
+       for (i = 0; i < h; i++)
                {
                pp = p_pix + (y + i) * prs + (x * (p_alpha ? 4 : 3));
                for (j = 0; j < w; j++)
@@ -468,7 +468,7 @@ void pixbuf_set_rect_fill(GdkPixbuf *pb,
        prs = gdk_pixbuf_get_rowstride(pb);
        p_pix = gdk_pixbuf_get_pixels(pb);
 
-        for (i = 0; i < h; i++)
+       for (i = 0; i < h; i++)
                {
                pp = p_pix + (y + i) * prs + (x * (p_alpha ? 4 : 3));
                for (j = 0; j < w; j++)
@@ -504,13 +504,13 @@ void pixbuf_pixel_set(GdkPixbuf *pb, gint x, gint y, gint r, gint g, gint b, gin
        guchar *p;
 
        if (x < 0 || x >= gdk_pixbuf_get_width(pb) ||
-            y < 0 || y >= gdk_pixbuf_get_height(pb)) return;
+           y < 0 || y >= gdk_pixbuf_get_height(pb)) return;
 
        buf = gdk_pixbuf_get_pixels(pb);
        has_alpha = gdk_pixbuf_get_has_alpha(pb);
        rowstride = gdk_pixbuf_get_rowstride(pb);
 
-        p = buf + (y * rowstride) + (x * (has_alpha ? 4 : 3));
+       p = buf + (y * rowstride) + (x * (has_alpha ? 4 : 3));
        *p = r; p++;
        *p = g; p++;
        *p = b; p++;
@@ -1018,7 +1018,7 @@ void pixbuf_draw_line(GdkPixbuf *pb,
 
 static void pixbuf_draw_fade_linear(guchar *p_pix, gint prs, gint p_alpha,
                                    gint s, gint vertical, gint border,
-                                   gint x1, gint y1, gint x2, gint y2,
+                                   gint x1, gint y1, gint x2, gint y2,
                                    guint8 r, guint8 g, guint8 b, guint8 a)
 {
        guchar *pp;
@@ -1047,7 +1047,7 @@ static void pixbuf_draw_fade_linear(guchar *p_pix, gint prs, gint p_alpha,
 
 static void pixbuf_draw_fade_radius(guchar *p_pix, gint prs, gint p_alpha,
                                    gint sx, gint sy, gint border,
-                                   gint x1, gint y1, gint x2, gint y2,
+                                   gint x1, gint y1, gint x2, gint y2,
                                    guint8 r, guint8 g, guint8 b, guint8 a)
 {
        guchar *pp;
@@ -1211,7 +1211,7 @@ void pixbuf_desaturate_rect(GdkPixbuf *pb,
        prs = gdk_pixbuf_get_rowstride(pb);
        p_pix = gdk_pixbuf_get_pixels(pb);
 
-        for (i = 0; i < h; i++)
+       for (i = 0; i < h; i++)
                {
                pp = p_pix + (y + i) * prs + (x * (p_alpha ? 4 : 3));
                for (j = 0; j < w; j++)
index eab7a11..8eb05de 100644 (file)
@@ -102,7 +102,7 @@ static GtkWidget *sidecar_ext_entry;
  *-----------------------------------------------------------------------------
  * option widget callbacks (private)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void startup_path_set_current(GtkWidget *widget, gpointer data)
 {
@@ -142,7 +142,7 @@ static void slideshow_delay_cb(GtkWidget *spin, gpointer data)
  *-----------------------------------------------------------------------------
  * sync progam to config window routine (private)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void config_window_apply(void)
 {
@@ -228,7 +228,7 @@ static void config_window_apply(void)
        options->collections.rectangular_selection = c_options->collections.rectangular_selection;
 
        options->image.tile_cache_max = c_options->image.tile_cache_max;
-       
+
        options->image.read_buffer_size = c_options->image.read_buffer_size;
        options->image.idle_read_loop_count = c_options->image.idle_read_loop_count;
 
@@ -332,7 +332,7 @@ static void config_window_apply(void)
  *-----------------------------------------------------------------------------
  * config window main button callbacks (private)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void config_window_close_cb(GtkWidget *widget, gpointer data)
 {
@@ -362,7 +362,7 @@ static void config_window_apply_cb(GtkWidget *widget, gpointer data)
  *-----------------------------------------------------------------------------
  * config window setup (private)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void exif_item_cb(GtkWidget *combo, gpointer data)
 {
@@ -370,7 +370,7 @@ static void exif_item_cb(GtkWidget *combo, gpointer data)
        *option = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
 }
 
-static void exif_item(GtkWidget *table, gint column, gint row, 
+static void exif_item(GtkWidget *table, gint column, gint row,
                      const gchar *text, gint option, gint *option_c)
 {
        GtkWidget *combo;
@@ -381,7 +381,7 @@ static void exif_item(GtkWidget *table, gint column, gint row,
 
        combo = gtk_combo_box_new_text();
 
-       /* note: the order is important, it must match the values of 
+       /* note: the order is important, it must match the values of
         * EXIF_UI_OFF, _IFSET, _ON */
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Never"));
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("If set"));
@@ -392,7 +392,7 @@ static void exif_item(GtkWidget *table, gint column, gint row,
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(exif_item_cb), option_c);
 
-       gtk_table_attach(GTK_TABLE(table), combo, 
+       gtk_table_attach(GTK_TABLE(table), combo,
                         column + 1, column + 2, row, row + 1,
                         GTK_EXPAND | GTK_FILL, 0, 0, 0);
        gtk_widget_show(combo);
@@ -521,7 +521,7 @@ static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *
                buf = g_strdup_printf("%d x %d", w, h);
                gtk_combo_box_append_text(GTK_COMBO_BOX(combo), buf);
                g_free(buf);
-       
+
                if (w == options->thumbnails.max_width && h == options->thumbnails.max_height) current = i;
                }
 
@@ -1089,7 +1089,7 @@ static void config_tab_filtering(GtkWidget *notebook)
        gtk_tree_view_column_pack_start(column, renderer, FALSE);
        gtk_tree_view_column_set_cell_data_func(column, renderer, filter_set_func,
                                                GINT_TO_POINTER(FE_ENABLE), NULL);
-       
+
        renderer = gtk_cell_renderer_text_new();
        g_signal_connect(G_OBJECT(renderer), "edited",
                         G_CALLBACK(filter_store_ext_edit_cb), filter_store);
@@ -1168,7 +1168,7 @@ static void config_tab_editors(GtkWidget *notebook)
                if (i < GQ_EDITOR_GENERIC_SLOTS)
                        {
                        gchar *buf;
-                       
+
                        buf = g_strdup_printf("%d", i+1);
                        pref_table_label(table, 0, i+1, buf, 1.0);
                        g_free(buf);
@@ -1183,7 +1183,7 @@ static void config_tab_editors(GtkWidget *notebook)
                        entry = gtk_label_new(options->editor_name[i]);
                        gtk_misc_set_alignment(GTK_MISC(entry), 0.0, 0.5);
                        }
-               
+
                gtk_table_attach(GTK_TABLE (table), entry, 1, 2, i+1, i+2,
                                 GTK_FILL | GTK_SHRINK, 0, 0, 0);
                gtk_widget_show(entry);
@@ -1243,10 +1243,10 @@ static void config_tab_properties(GtkWidget *notebook)
        gtk_container_add(GTK_CONTAINER(viewport), vbox);
        gtk_widget_show(vbox);
 
-       group = pref_group_new(vbox, FALSE, _("Exif"), 
+       group = pref_group_new(vbox, FALSE, _("Exif"),
                               GTK_ORIENTATION_VERTICAL);
-       
-       
+
+
        pref_spacer(group, PREF_PAD_INDENT - PREF_PAD_SPACE);
        label = pref_label_new(group, _("What to show in properties dialog:"));
        gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
@@ -1256,8 +1256,8 @@ static void config_tab_properties(GtkWidget *notebook)
        for (i = 0; ExifUIList[i].key; i++)
                {
                const gchar *title;
-         
-               title = exif_get_description_by_key(ExifUIList[i].key);
+
+               title = exif_get_description_by_key(ExifUIList[i].key);
                exif_item(table, 0, i, title, ExifUIList[i].current,
                          &ExifUIList[i].temp);
                }
@@ -1379,7 +1379,7 @@ static void config_tab_advanced(GtkWidget *notebook)
 
        pref_spacer(hbox, PREF_PAD_INDENT - PREF_PAD_GAP);
        spin = pref_spin_new_int(hbox, _("Maximum size:"), _("MB"),
-                                0, 2048, 1, options->file_ops.safe_delete_folder_maxsize, &c_options->file_ops.safe_delete_folder_maxsize);
+                                0, 2048, 1, options->file_ops.safe_delete_folder_maxsize, &c_options->file_ops.safe_delete_folder_maxsize);
 #if GTK_CHECK_VERSION(2,12,0)
        gtk_widget_set_tooltip_markup(spin, _("Set to 0 for unlimited size"));
 #endif
@@ -1426,11 +1426,11 @@ static void config_tab_advanced(GtkWidget *notebook)
 
        pref_spin_new_int(group, _("Offscreen cache size (Mb per image):"), NULL,
                          0, 128, 1, options->image.tile_cache_max, &c_options->image.tile_cache_max);
-       
+
        pref_spin_new_int(group, _("Image read buffer size (bytes):"), NULL,
                          IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX, 512,
                          options->image.read_buffer_size, &c_options->image.read_buffer_size);
-       
+
        pref_spin_new_int(group, _("Image idle loop read count:"), NULL,
                          IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX, 1,
                          options->image.idle_read_loop_count, &c_options->image.idle_read_loop_count);
@@ -1516,7 +1516,7 @@ static void config_window_create(void)
        gtk_window_set_type_hint(GTK_WINDOW(configwindow), GDK_WINDOW_TYPE_HINT_DIALOG);
        g_signal_connect(G_OBJECT (configwindow), "delete_event",
                         G_CALLBACK(config_window_delete), NULL);
-       gtk_window_set_default_size(GTK_WINDOW(configwindow), CONFIG_WINDOW_DEF_WIDTH, CONFIG_WINDOW_DEF_HEIGHT);                
+       gtk_window_set_default_size(GTK_WINDOW(configwindow), CONFIG_WINDOW_DEF_WIDTH, CONFIG_WINDOW_DEF_HEIGHT);
        gtk_window_set_resizable(GTK_WINDOW(configwindow), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(configwindow), PREF_PAD_BORDER);
 
@@ -1577,7 +1577,7 @@ static void config_window_create(void)
  *-----------------------------------------------------------------------------
  * config window show (public)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 void show_config_window(void)
 {
index fde8576..4011f5f 100644 (file)
@@ -1222,7 +1222,7 @@ static void print_job_ps_page_image_pixel(FILE *f, guchar *pix)
        text[6] = '\0';
 
        fprintf(f, text);
-}                                                                                                                         
+}
 static gint print_job_ps_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
                                    gdouble x, gdouble y, gdouble w, gdouble h,
                                    gdouble offx, gdouble offy)
@@ -1581,10 +1581,10 @@ static gint print_job_rgb_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
        dw = (gdouble)gdk_pixbuf_get_width(pw->job_pixbuf);
        dh = (gdouble)gdk_pixbuf_get_height(pw->job_pixbuf);
 
-        if (clip_region(x, y, w, h,
-                        0.0, 0.0, dw, dh,
-                        &rx, &ry, &rw, &rh))
-                {
+       if (clip_region(x, y, w, h,
+                       0.0, 0.0, dw, dh,
+                       &rx, &ry, &rw, &rh))
+               {
                gdk_pixbuf_composite(pixbuf, pw->job_pixbuf, rx, ry, rw, rh,
                                     x + offx, y + offy,
                                     w / sw, h / sh,
@@ -1776,8 +1776,8 @@ static gint print_job_preview_page_done(PrintWindow *pw)
 }
 
 static gint print_job_preview_page_image(PrintWindow *pw, GdkPixbuf *pixbuf,
-                                        gdouble x, gdouble y, gdouble w, gdouble h,
-                                        gdouble offx, gdouble offy)
+                                        gdouble x, gdouble y, gdouble w, gdouble h,
+                                        gdouble offx, gdouble offy)
 {
        gdouble sw, sh;
        gdouble dw, dh;
@@ -2271,7 +2271,7 @@ static void print_job_render_proof_loader_done(ImageLoader *il, gpointer data)
        x = x + icon_w / 2;
        y = y + icon_h + (pw->proof_height - icon_h) / 2 + PRINT_TEXT_PADDING;
 
-       success = (success && 
+       success = (success &&
                   print_job_text_image(pw, pw->job_loader->fd->path, x, y, icon_w + PRINT_PROOF_MARGIN * 2, w, h, TRUE));
 
        if (!success)
@@ -3421,7 +3421,7 @@ void print_window_new(FileData *fd, GList *selection, GList *list, GtkWidget *pa
        label = pref_table_label(table, 0, 1, _("Proof size:"), 1.0);
        pw->proof_group = pref_table_box(table, 1, 1, GTK_ORIENTATION_HORIZONTAL, NULL);
        pref_link_sensitivity(label, pw->proof_group);
-       
+
        pw->proof_width_spin = pref_spin_new(pw->proof_group, NULL, NULL,
                                             0.0, 50.0, 0.1, 3, 0.0,
                                             G_CALLBACK(print_proof_size_cb), pw);
index d901564..e766b85 100644 (file)
  *-----------------------------------------------------------------------------
  * line write/parse routines (private)
  *-----------------------------------------------------------------------------
- */ 
-/* 
+ */
+
+/*
    returns text without quotes or NULL for empty or broken string
    any text up to first '"' is skipped
    tail is set to point at the char after the second '"'
-   or at the ending \0 
-   
+   or at the ending \0
+
 */
 
 gchar *quoted_value(const gchar *text, const gchar **tail)
@@ -42,9 +42,9 @@ gchar *quoted_value(const gchar *text, const gchar **tail)
        gint c = 0;
        gint l = strlen(text);
        gchar *retval = NULL;
-       
+
        if (tail) *tail = text;
-       
+
        if (l == 0) return retval;
 
        while (c < l && text[c] !='"') c++;
@@ -64,7 +64,7 @@ gchar *quoted_value(const gchar *text, const gchar **tail)
                        if (e - c > 0)
                                {
                                gchar *substring = g_strndup(ptr, e - c);
-                               
+
                                if (substring)
                                        {
                                        retval = g_strcompress(substring);
@@ -93,7 +93,7 @@ gchar *quoted_value(const gchar *text, const gchar **tail)
 gchar *escquote_value(const gchar *text)
 {
        gchar *e;
-       
+
        if (!text) return g_strdup("\"\"");
 
        e = g_strescape(text, "");
@@ -257,7 +257,7 @@ static void read_bool_option(FILE *f, gchar *option, gchar *label, gchar *value,
  *-----------------------------------------------------------------------------
  * save configuration (public)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 void save_options(void)
 {
@@ -277,7 +277,7 @@ void save_options(void)
                g_free(rc_path);
                return;
                }
-       
+
 #define WRITE_BOOL(_name_) write_bool_option(ssi, #_name_, options->_name_)
 #define WRITE_INT(_name_) write_int_option(ssi, #_name_, options->_name_)
 #define WRITE_UINT(_name_) write_uint_option(ssi, #_name_, options->_name_)
@@ -330,7 +330,7 @@ void save_options(void)
        WRITE_CHAR(file_ops.safe_delete_path);
        WRITE_INT(file_ops.safe_delete_folder_maxsize);
 
-       
+
        WRITE_SUBTITLE("Layout Options");
 
        WRITE_INT(layout.style);
@@ -369,7 +369,7 @@ void save_options(void)
 
 
        WRITE_SUBTITLE("Image Options");
-       
+
        secure_fprintf(ssi, "# image.zoom_mode possible values are:\n"
                            "#   original\n"
                            "#   fit\n"
@@ -419,7 +419,7 @@ void save_options(void)
        WRITE_BOOL(file_sort.ascending);
        WRITE_BOOL(file_sort.case_sensitive);
 
-       
+
        WRITE_SUBTITLE("Fullscreen Options");
 
        WRITE_INT(fullscreen.screen);
@@ -449,7 +449,7 @@ void save_options(void)
        WRITE_SEPARATOR();
 
        filter_write_list(ssi);
-       
+
 
        WRITE_SUBTITLE("Sidecars Options");
 
@@ -460,7 +460,7 @@ void save_options(void)
 
 #ifndef HAVE_LCMS
        secure_fprintf(ssi, "# NOTICE: %s was not built with support for color profiles,\n"
-                           "#         color profile options will have no effect.\n\n", GQ_APPNAME);
+                           "#         color profile options will have no effect.\n\n", GQ_APPNAME);
 #endif
 
        WRITE_BOOL(color_profile.enabled);
@@ -518,7 +518,7 @@ void save_options(void)
        secure_fprintf(ssi, "#                         end of config file                         #\n");
        secure_fprintf(ssi, "######################################################################\n");
 
-       
+
        if (secure_close(ssi))
                {
                printf_term(_("error saving config file: %s\nerror: %s\n"), rc_path,
@@ -534,7 +534,7 @@ void save_options(void)
  *-----------------------------------------------------------------------------
  * load configuration (public)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 void load_options(void)
 {
@@ -595,7 +595,7 @@ void load_options(void)
                READ_BOOL(tree_descend_subdirs);
                READ_BOOL(lazy_image_sync);
                READ_BOOL(update_on_time_change);
-       
+
                READ_BOOL(startup_path_enable);
                READ_CHAR(startup_path);
 
@@ -606,7 +606,7 @@ void load_options(void)
                READ_BOOL(enable_metadata_dirs);
 
                READ_BOOL(mousewheel_scrolls);
-       
+
                READ_INT(open_recent_list_maxsize);
 
                READ_BOOL(place_dialogs_under_mouse);
@@ -645,14 +645,14 @@ void load_options(void)
 
                /* image options */
                if (strcasecmp(option, "image.zoom_mode") == 0)
-                        {
-                        if (strcasecmp(value, "original") == 0)
+                       {
+                       if (strcasecmp(value, "original") == 0)
                                options->image.zoom_mode = ZOOM_RESET_ORIGINAL;
-                        else if (strcasecmp(value, "fit") == 0)
+                       else if (strcasecmp(value, "fit") == 0)
                                options->image.zoom_mode = ZOOM_RESET_FIT_WINDOW;
-                        else if (strcasecmp(value, "dont_change") == 0)
+                       else if (strcasecmp(value, "dont_change") == 0)
                                options->image.zoom_mode = ZOOM_RESET_NONE;
-                        }
+                       }
                READ_BOOL(image.zoom_2pass);
                READ_BOOL(image.zoom_to_fit_allow_expand);
                READ_BOOL(image.fit_window_to_image);
@@ -671,7 +671,7 @@ void load_options(void)
                READ_COLOR(image.border_color);
                READ_INT_CLAMP(image.read_buffer_size, IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX);
                READ_INT_CLAMP(image.idle_read_loop_count, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX);
-               
+
 
                /* thumbnails options */
                READ_INT_CLAMP(thumbnails.max_width, 16, 512);
@@ -730,7 +730,7 @@ void load_options(void)
                        {
                        sidecar_ext_parse(value_all, TRUE);
                        }
-               
+
                /* Color Profiles */
 
                READ_BOOL(color_profile.enabled);
@@ -738,16 +738,16 @@ void load_options(void)
                READ_INT(color_profile.input_type);
 
                if (strncasecmp(option, "color_profile.input_file_", 25) == 0)
-                        {
-                        i = strtol(option + 25, NULL, 0) - 1;
+                       {
+                       i = strtol(option + 25, NULL, 0) - 1;
                        if (i >= 0 && i < COLOR_PROFILE_INPUTS)
                                {
                                read_char_option(f, option, option, value, &options->color_profile.input_file[i]);
                                }
                        }
                if (strncasecmp(option, "color_profile.input_name_", 25) == 0)
-                        {
-                        i = strtol(option + 25, NULL, 0) - 1;
+                       {
+                       i = strtol(option + 25, NULL, 0) - 1;
                        if (i >= 0 && i < COLOR_PROFILE_INPUTS)
                                {
                                read_char_option(f, option, option, value, &options->color_profile.input_name[i]);
@@ -768,7 +768,7 @@ void load_options(void)
                                i--;
                                g_free(options->editor_name[i]);
                                g_free(options->editor_command[i]);
-                               
+
                                options->editor_name[i] = quoted_value(value_all, &ptr);
                                options->editor_command[i] = quoted_value(ptr, NULL);
                                }
@@ -780,7 +780,7 @@ void load_options(void)
                        for (i = 0; ExifUIList[i].key; i++)
                                if (0 == strcasecmp(option + 13, ExifUIList[i].key))
                                        ExifUIList[i].current = strtol(value, NULL, 10);
-                       }
+                       }
                }
 
        fclose(f);
index b5e1d19..96dff1b 100644 (file)
@@ -254,11 +254,11 @@ RemoteConnection *remote_client_open(const gchar *path)
        sun_path_len = MIN(strlen(path) + 1, UNIX_PATH_MAX);
        strncpy(addr.sun_path, path, sun_path_len);
        if (connect(fd, &addr, sizeof(addr)) == -1)
-               {
+               {
                if (debug) printf("error connecting to socket: %s\n", strerror(errno));
-               close(fd);
-               return NULL;
-               }
+               close(fd);
+               return NULL;
+               }
 
        rc = g_new0(RemoteConnection, 1);
        rc->server = FALSE;
@@ -266,7 +266,7 @@ RemoteConnection *remote_client_open(const gchar *path)
        rc->path = g_strdup(path);
 
        /* this might fix the freezes on freebsd, solaris, etc. - completely untested */
-       remote_client_send(rc, "\n"); 
+       remote_client_send(rc, "\n");
 
        return rc;
 }
index b21bb40..d63f655 100644 (file)
@@ -29,8 +29,8 @@ struct _RemoteConnection {
 
        GList *clients;
 };
-                                                                                                                        
-                                                                                                                        
+
+
 RemoteConnection *remote_server_open(const gchar *path);
 void remote_server_subscribe(RemoteConnection *rc, RemoteReadFunc *func, gpointer data);
 
index cecd35c..bf7a377 100644 (file)
@@ -402,7 +402,7 @@ static gint search_result_selection_util(SearchData *sd, gint64 *bytes, GList **
 
                        if (list) plist = g_list_prepend(plist, file_data_ref(mfd->fd));
                        }
-                       
+
                work = work->next;
                }
        g_list_foreach(slist, (GFunc)gtk_tree_path_free, NULL);
@@ -912,7 +912,7 @@ static void sr_menu_collection_cb(GtkWidget *widget, gpointer data)
 static void sr_menu_print_cb(GtkWidget *widget, gpointer data)
 {
        SearchData *sd = data;
-       
+
        print_window_new(sd->click_fd, search_result_selection_list(sd),
                         search_result_get_filelist(sd), sd->window);
 }
@@ -1295,7 +1295,7 @@ static gint search_result_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpo
                                break;
                        }
                }
-               
+
        return stop_signal;
 }
 
@@ -1410,7 +1410,7 @@ static void search_dnd_init(SearchData *sd)
        g_signal_connect(G_OBJECT(sd->result_view), "drag_end",
                         G_CALLBACK(search_dnd_end), sd);
 #endif
-                       
+
 }
 
 /*
@@ -1530,7 +1530,7 @@ static void search_file_load_process(SearchData *sd, CacheData *cd)
 
 static void search_file_load_done_cb(ImageLoader *il, gpointer data)
 {
-        SearchData *sd = data;
+       SearchData *sd = data;
        search_file_load_process(sd, sd->img_cd);
 }
 
@@ -1626,7 +1626,7 @@ static gint search_file_do_extra(SearchData *sd, FileData *fd, gint *match,
                                value = (gint)result;
                                }
                        }
-                   
+
                if (simval) *simval = value;
                }
 
@@ -2050,7 +2050,7 @@ static void search_start(SearchData *sd)
                        image_loader_free(sd->img_loader);
                        sd->img_loader = NULL;
                        }
-                       
+
                }
 
        sd->search_idle_id = g_idle_add(search_step_cb, sd);
index 7f73aa4..d7d238b 100644 (file)
@@ -267,7 +267,7 @@ secure_close(SecureSaveInfo *ssi)
                 * more..).  */
 #ifndef NO_UNIX_SOFTLINKS
                if (g_lstat(ssi->file_name, &st) == 0)
-#else  
+#else
                if (g_stat(ssi->file_name, &st) == 0)
 #endif
                        {
index 1998e81..e71a371 100644 (file)
@@ -181,7 +181,7 @@ void image_sim_alternate_processing(ImageSimilarityData *sd)
 #endif
 
        if (!alternate_enabled) return;
-       
+
        image_sim_channel_norm(sd->avg_r, sizeof(sd->avg_r));
        image_sim_channel_norm(sd->avg_g, sizeof(sd->avg_g));
        image_sim_channel_norm(sd->avg_b, sizeof(sd->avg_b));
@@ -194,7 +194,7 @@ void image_sim_alternate_processing(ImageSimilarityData *sd)
        for (i = 0; i < sizeof(sd->avg_r); i++)
                {
                guint8 n;
-               
+
                n = (guint8)((gint)(sd->avg_r[i] + sd->avg_g[i] + sd->avg_b[i]) / 3);
                sd->avg_r[i] = sd->avg_g[i] = sd->avg_b[i] = n;
                }
index ea6d049..13a015e 100644 (file)
 typedef struct _ImageSimilarityData ImageSimilarityData;
 struct _ImageSimilarityData
 {
-        guint8 avg_r[1024];
-        guint8 avg_g[1024];
-        guint8 avg_b[1024];
+       guint8 avg_r[1024];
+       guint8 avg_g[1024];
+       guint8 avg_b[1024];
 
-        gint filled;
+       gint filled;
 };
 
 
index 227df2e..c0d0966 100644 (file)
@@ -88,7 +88,7 @@ static gint thumb_loader_mark_failure(ThumbLoader *tl)
        gchar *cache_dir;
        gint success = FALSE;
        mode_t mode = 0755;
-       
+
        if (!tl) return FALSE;
 
        cache_dir = cache_get_location(CACHE_TYPE_THUMB, tl->path, FALSE, &mode);
@@ -292,7 +292,7 @@ void thumb_loader_set_callbacks(ThumbLoader *tl,
 
 void thumb_loader_set_cache(ThumbLoader *tl, gint enable_cache, gint local, gint retry_failed)
 {
-        if (!tl) return;
+       if (!tl) return;
 
        if (tl->standard_loader)
                {
@@ -387,7 +387,7 @@ gint thumb_loader_start(ThumbLoader *tl, const gchar *path)
                        {
                        thumb_loader_mark_failure(tl);
                        }
-               
+
                image_loader_free(tl->il);
                tl->il = NULL;
                return FALSE;
@@ -649,7 +649,7 @@ static GdkPixbuf *get_xv_thumbnail(gchar *thumb_filename, gint max_w, gint max_h
                        pixbuf = gdk_pixbuf_scale_simple(tmp, width, height, GDK_INTERP_NEAREST);
                        gdk_pixbuf_unref(tmp);
                        }
-       
+
                return pixbuf;
                }
 
index 929a971..3c782ee 100644 (file)
@@ -1024,7 +1024,7 @@ static void thumb_std_maint_move_step(TMaintMove *tm)
                }
 
        folder = (tm->pass == 1) ? THUMB_FOLDER_NORMAL : THUMB_FOLDER_LARGE;
-       
+
        g_free(tm->thumb_path);
        tm->thumb_path = thumb_std_cache_path(tm->source, tm->source_uri, FALSE, folder);
        tm->tl = thumb_loader_std_thumb_file_validate(tm->thumb_path, 0,
index 833b57b..a6ebb6b 100644 (file)
@@ -443,13 +443,13 @@ struct _LayoutWindow
        ImageWindow *image;
 
        ImageWindow *split_images[MAX_SPLIT_IMAGES];
-        ImageSplitMode split_mode;
+       ImageSplitMode split_mode;
        gint active_split_image;
 
-        GtkWidget *split_image_widget;
-       
+       GtkWidget *split_image_widget;
+
        gint connect_zoom, connect_scroll;
-       
+
        /* tools window (float) */
 
        GtkWidget *tools;
@@ -466,7 +466,7 @@ struct _LayoutWindow
        GtkWidget *thumb_button;
        gint thumbs_enabled;
        gint marks_enabled;
-    
+
        /* dir view */
 
        LayoutLocation dir_location;
@@ -557,7 +557,7 @@ struct _ViewDir
 
        void (*dnd_drop_update_func)(ViewDir *vd);
        void (*dnd_drop_leave_func)(ViewDir *vd);
-       
+
        LayoutWindow *layout;
 
        GtkWidget *popup;
@@ -593,7 +593,7 @@ struct _ViewFileList
        gint thumbs_enabled;
        gint marks_enabled;
        gint active_mark;
-    
+
        /* thumb updates */
        gint thumbs_running;
        gint thumbs_count;
@@ -649,7 +649,7 @@ struct _ViewFileIcon
        gint sync_idle_id;
 
        /* thumbs */
-       
+
        gint thumbs_running;
        GList *thumbs_list;
        gint thumbs_count;
@@ -756,7 +756,7 @@ struct _ConfOptions
        /* file ops */
        struct {
                gint enable_in_place_rename;
-               
+
                gint confirm_delete;
                gint enable_delete_key;
                gint safe_delete_enable;
@@ -850,7 +850,7 @@ struct _ConfOptions
 
                gint view_as_icons;
                DirViewType dir_view_type;
-               
+
                gint show_thumbnails;
                gint show_marks;
 
index 56c0cae..5d7e4fa 100644 (file)
@@ -508,7 +508,7 @@ static gchar *bookmark_string(const gchar *name, const gchar *path, const gchar
                {
                return g_strdup_printf("%s"MARKER_PATH"%s"MARKER_ICON"%s", name, path, icon);
                }
-       
+
        return g_strdup_printf("%s"MARKER_PATH"%s", name, path);
 }
 
@@ -576,7 +576,7 @@ static void bookmark_edit(const gchar *key, const gchar *text, GtkWidget *parent
        GtkWidget *table;
        GtkWidget *label;
        const gchar *icon;
-       
+
        if (!key) key = "bookmarks";
 
        p = g_new0(BookPropData, 1);
@@ -619,7 +619,7 @@ static void bookmark_edit(const gchar *key, const gchar *text, GtkWidget *parent
        icon = p->bb->icon;
        if (!icon) icon = "";
        label = tab_completion_new_with_history(&p->icon_entry, icon,
-                                               "bookmark_icons", -1, NULL, NULL);
+                                               "bookmark_icons", -1, NULL, NULL);
        tab_completion_add_select_button(p->icon_entry, _("Select icon"), FALSE);
        gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 2, 3);
        generic_dialog_attach_default(gd, p->icon_entry);
@@ -684,7 +684,7 @@ static void bookmark_menu_down_cb(GtkWidget *widget, gpointer data)
 static void bookmark_menu_remove_cb(GtkWidget *widget, gpointer data)
 {
        BookMarkData *bm = data;
-       
+
        if (!bm->active_button) return;
 
        history_list_item_remove(bm->key, bm->active_button->key);
@@ -738,7 +738,7 @@ static gint bookmark_press_cb(GtkWidget *button, GdkEventButton *event, gpointer
        if (event->button != 3) return FALSE;
 
        bookmark_menu_popup(bm, button, event->button, event->time, FALSE);
-       
+
        return TRUE;
 }
 
@@ -787,7 +787,7 @@ static void bookmark_drag_set_data(GtkWidget *button,
 
        b = g_object_get_data(G_OBJECT(button), "bookbuttondata");
        if (!b) return;
-       
+
        list = g_list_append(list, b->path);
 
        switch (info)
@@ -816,7 +816,7 @@ static void bookmark_drag_begin(GtkWidget *button, GdkDragContext *context, gpoi
        gint x, y;
 
        pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
-                               button->allocation.width, button->allocation.height);
+                               button->allocation.width, button->allocation.height);
        gdk_pixbuf_get_from_drawable(pixbuf, button->window, NULL,
                                     button->allocation.x, button->allocation.y,
                                     0, 0, button->allocation.width, button->allocation.height);
@@ -824,7 +824,7 @@ static void bookmark_drag_begin(GtkWidget *button, GdkDragContext *context, gpoi
        gdk_window_get_pointer(button->window, &x, &y, &mask);
 
        gtk_drag_set_icon_pixbuf(context, pixbuf,
-                                x - button->allocation.x, y - button->allocation.y);
+                                x - button->allocation.x, y - button->allocation.y);
        g_object_unref(pixbuf);
 }
 
@@ -833,7 +833,7 @@ static void bookmark_populate(BookMarkData *bm)
        GtkBox *box;
        GList *work;
        GList *children;
-       
+
        box = GTK_BOX(bm->box);
        children = gtk_container_get_children(GTK_CONTAINER(box));
        work = children;
@@ -869,7 +869,7 @@ static void bookmark_populate(BookMarkData *bm)
                while (work && work->next)
                        {
                        gchar *name;
-                       
+
                        name = work->data;
                        work = work->next;
                        path = work->data;
@@ -929,7 +929,7 @@ static void bookmark_populate(BookMarkData *bm)
                                else
                                        {
                                        b->image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE,
-                                                                           GTK_ICON_SIZE_BUTTON);
+                                                                           GTK_ICON_SIZE_BUTTON);
                                        }
                                }
                        else
@@ -966,9 +966,9 @@ static void bookmark_populate(BookMarkData *bm)
 static void bookmark_populate_all(const gchar *key)
 {
        GList *work;
-       
+
        if (!key) return;
-       
+
        work = bookmark_widget_list;
        while (work)
                {
@@ -1036,7 +1036,7 @@ GtkWidget *bookmark_list_new(const gchar *key,
 {
        GtkWidget *scrolled;
        BookMarkData *bm;
-       
+
        if (!key) key = "bookmarks";
 
        bm = g_new0(BookMarkData, 1);
@@ -1262,7 +1262,7 @@ void history_combo_append_history(GtkWidget *widget, const gchar *text)
  */
 static gint escape_char_list[] = {
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1,   /*   0 */
-       1, 1, 1, 1, 1, 1, 1, 1, 1, 1,   /*  10 */ 
+       1, 1, 1, 1, 1, 1, 1, 1, 1, 1,   /*  10 */
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1,   /*  20 */
 /*          spc !  "  #  $  %  &  '           */
        1, 1, 0, 0, 1, 1, 0, 1, 0, 0,   /*  30 */
@@ -1309,7 +1309,7 @@ gchar *uri_text_escape(const gchar *text)
        const gchar *p;
 
        if (!text) return NULL;
-       
+
        string = g_string_new("");
 
        p = text;
index 25ddc4b..2808315 100644 (file)
@@ -34,7 +34,7 @@
  *-----------------------------------------------------------------------------
  * generic file information and manipulation routines (public)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 
 
@@ -226,28 +226,28 @@ gint isfile(const gchar *s)
 gint isdir(const gchar *s)
 {
        struct stat st;
-   
+
        return (stat_utf8(s ,&st) && S_ISDIR(st.st_mode));
 }
 
 gint islink(const gchar *s)
 {
        struct stat st;
-   
+
        return (lstat_utf8(s ,&st) && S_ISLNK(st.st_mode));
 }
 
 gint64 filesize(const gchar *s)
 {
        struct stat st;
-   
+
        if (!stat_utf8(s, &st)) return 0;
        return (gint)st.st_size;
 }
 
 time_t filetime(const gchar *s)
 {
-        struct stat st;
+       struct stat st;
 
        if (!stat_utf8(s, &st)) return 0;
        return st.st_mtime;
@@ -611,13 +611,13 @@ GList *path_list_copy(GList *list)
        while (work)
                {
                gchar *path;
+
                path = work->data;
                work = work->next;
+
                new_list = g_list_prepend(new_list, g_strdup(path));
                }
+
        return g_list_reverse(new_list);
 }
 
index b25f8c1..c369f82 100644 (file)
@@ -28,7 +28,7 @@ void print_term(const gchar *text_utf8);
                gchar *msg = g_strdup_printf(__VA_ARGS__); \
                print_term(msg); \
                g_free(msg); \
-       } while (0) 
+       } while (0)
 
 gchar *path_to_utf8(const gchar *path);
 gchar *path_from_utf8(const gchar *path);
index f08b5d3..8991695 100644 (file)
@@ -27,7 +27,7 @@
  *-----------------------------------------------------------------------------
  * menu items
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void menu_item_finish(GtkWidget *menu, GtkWidget *item, GCallback func, gpointer data)
 {
@@ -80,7 +80,7 @@ GtkWidget *menu_item_add_stock_sensitive(GtkWidget *menu, const gchar *label, co
 
        item = menu_item_add_stock(menu, label, stock_id, func, data);
        gtk_widget_set_sensitive(item, sensitive);
-       
+
        return item;
 }
 
@@ -116,8 +116,8 @@ void menu_item_add_divider(GtkWidget *menu)
 {
        GtkWidget *item = gtk_menu_item_new();
        gtk_widget_set_sensitive(item, FALSE);
-        gtk_menu_shell_append(GTK_MENU_SHELL(menu),item);
-        gtk_widget_show(item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),item);
+       gtk_widget_show(item);
 }
 
 GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label,
@@ -133,7 +133,7 @@ GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label,
  *-----------------------------------------------------------------------------
  * popup menus
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void popup_menu_short_lived_cb(GtkWidget *widget, gpointer data)
 {
@@ -167,7 +167,7 @@ gint popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height)
        gint adjusted = FALSE;
        gint w, h;
        gint xw, xh;
-       
+
        w = GTK_WIDGET(menu)->requisition.width;
        h = GTK_WIDGET(menu)->requisition.height;
        xw = gdk_screen_width();
index 90a2df3..3cb444b 100644 (file)
@@ -31,7 +31,7 @@ void menu_item_add_divider(GtkWidget *menu);
 
 /* use to avoid mnemonics, for example filenames */
 GtkWidget *menu_item_add_simple(GtkWidget *menu, const gchar *label,
-                                GCallback func, gpointer data);
+                               GCallback func, gpointer data);
 
 GtkWidget *popup_menu_short_lived(void);
 
index a2a2bbf..6d43e02 100644 (file)
@@ -1083,7 +1083,7 @@ GtkWidget *date_selection_new(void)
 
        return ds->box;
 }
-                                                                                                                        
+
 void date_selection_set(GtkWidget *widget, gint day, gint month, gint year)
 {
        DateSelection *ds;
@@ -1108,7 +1108,7 @@ void date_selection_get(GtkWidget *widget, gint *day, gint *month, gint *year)
        if (month) *month = gtk_spin_button_get_value(GTK_SPIN_BUTTON(ds->spin_m));
        if (year) *year = gtk_spin_button_get_value(GTK_SPIN_BUTTON(ds->spin_y));
 }
-                                                                                                                        
+
 void date_selection_time_set(GtkWidget *widget, time_t t)
 {
        struct tm *lt;
@@ -1506,7 +1506,7 @@ static gint pref_list_get(const gchar *group, const gchar *key, const gchar *mar
 
        g_free(token);
 
-       return ret; 
+       return ret;
 }
 
 static void pref_list_set(const gchar *group, const gchar *key, const gchar *marker, const gchar *text)
@@ -1626,7 +1626,7 @@ GtkWidget *pref_color_button_new(GtkWidget *parent_box,
                                 GCallback func, gpointer data)
 {
        GtkWidget *button;
-       
+
        if (color)
                {
                button = gtk_color_button_new_with_color(color);
@@ -1648,7 +1648,7 @@ GtkWidget *pref_color_button_new(GtkWidget *parent_box,
 
                hbox = gtk_hbox_new(TRUE, 0);
                gtk_box_pack_start(GTK_BOX(parent_box), hbox, TRUE, TRUE, 0);
-               
+
                gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
                gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
 
@@ -1658,6 +1658,6 @@ GtkWidget *pref_color_button_new(GtkWidget *parent_box,
                {
                gtk_widget_show(button);
                }
-       
+
        return button;
 }
index 68fbb95..38739a6 100644 (file)
@@ -165,8 +165,8 @@ GtkWidget *sizer_new(GtkWidget *parent, GtkWidget *bounding_widget,
                     SizerPositionType position);
 
 void sizer_set_limits(GtkWidget *sizer,
-                      gint hsize_min, gint hsize_max,
-                      gint vsize_min, gint vsize_max);
+                     gint hsize_min, gint hsize_max,
+                     gint vsize_min, gint vsize_max);
 
 
 void pref_list_int_set(const gchar *group, const gchar *key, gint value);
@@ -181,8 +181,8 @@ gint pref_list_string_get(const gchar *group, const gchar *key, const gchar **re
 
 void pref_color_button_set_cb(GtkWidget *widget, gpointer data);
 GtkWidget *pref_color_button_new(GtkWidget *parent_box,
-                                const gchar *title, const GdkColor *color,
-                                GCallback func, gpointer data);
+                                const gchar *title, const GdkColor *color,
+                                GCallback func, gpointer data);
 
 
 #endif
index 808a677..1da6e4e 100644 (file)
@@ -93,7 +93,7 @@ static void dest_view_delete_dlg_cancel(GenericDialog *gd, gpointer data);
  *-----------------------------------------------------------------------------
  * (private)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void dest_free_data(GtkWidget *widget, gpointer data)
 {
@@ -180,10 +180,10 @@ static void dest_populate(Dest_Data *dd, const gchar *path)
                {
                if (!options->file_filter.show_dot_directory
                    && dir->d_name[0] == '.' && dir->d_name[1] == '\0')
-                       continue;
+                       continue;
                if (dir->d_name[0] == '.' && dir->d_name[1] == '.' && dir->d_name[2] == '\0'
                    && pathl[0] == '/' && pathl[1] == '\0')
-                       continue; /* no .. for root directory */
+                       continue; /* no .. for root directory */
                if (dd->show_hidden || !is_hidden(dir->d_name))
                        {
                        gchar *name = dir->d_name;
@@ -231,7 +231,7 @@ static void dest_populate(Dest_Data *dd, const gchar *path)
                        {
                        filepath = concat_dir_and_file(path, list->data);
                        }
-               
+
                gtk_list_store_append(store, &iter);
                gtk_list_store_set(store, &iter, 0, list->data, 1, filepath, -1);
 
@@ -249,13 +249,13 @@ static void dest_populate(Dest_Data *dd, const gchar *path)
 
                list = file_list;
                while (list)
-                       {
+                       {
                        GtkTreeIter iter;
                        gchar *filepath;
                        const gchar *name = list->data;
 
                        filepath = concat_dir_and_file(path, name);
-               
+
                        gtk_list_store_append(store, &iter);
                        gtk_list_store_set(store, &iter, 0, name, 1, filepath, -1);
 
@@ -518,7 +518,7 @@ static void dest_view_delete(Dest_Data *dd, GtkTreeView *view)
        model = gtk_tree_view_get_model(view);
        gtk_tree_model_get_iter(model, &iter, dd->right_click_path);
        gtk_tree_model_get(model, &iter, 1, &path, -1);
-       
+
        if (!path) return;
 
        dl = g_new(DestDel_Data, 1);
@@ -625,7 +625,7 @@ static gint dest_popup_menu(Dest_Data *dd, GtkTreeView *view,
                gtk_tree_model_get(model, &iter, 0, &text, -1);
 
                if (!text) return FALSE;
-              
+
                normal_dir = (strcmp(text, ".") == 0 || strcmp(text, "..") == 0);
 
                menu = popup_menu_short_lived();
@@ -726,7 +726,7 @@ static gboolean dest_keypress_cb(GtkWidget *view, GdkEventKey *event, gpointer d
 
        return FALSE;
 }
-       
+
 static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
 {
        Dest_Data *dd = data;
@@ -786,7 +786,7 @@ static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
  *-----------------------------------------------------------------------------
  * destination widget file selection, traversal, view options
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void dest_select_cb(GtkTreeSelection *selection, gpointer data)
 {
@@ -1008,14 +1008,14 @@ static void dest_bookmark_select_cb(const gchar *path, gpointer data)
        else if (isfile(path) && dd->f_view)
                {
                gtk_entry_set_text(GTK_ENTRY(dd->entry), path);
-               }       
+               }
 }
 
 /*
  *-----------------------------------------------------------------------------
  * destination widget setup routines (public)
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 GtkWidget *path_selection_new_with_files(GtkWidget *entry, const gchar *path,
                                         const gchar *filter, const gchar *filter_desc)
@@ -1129,7 +1129,7 @@ GtkWidget *path_selection_new_with_files(GtkWidget *entry, const gchar *path,
                         G_CALLBACK(dest_activate_cb), dd);
        g_signal_connect(G_OBJECT(dd->d_view), "destroy",
                         G_CALLBACK(dest_free_data), dd);
-       
+
        if (filter)
                {
                GtkListStore *store;
@@ -1254,7 +1254,7 @@ void path_selection_sync_to_entry(GtkWidget *entry)
        if (!dd) return;
 
        path = gtk_entry_get_text(GTK_ENTRY(entry));
-       
+
        if (isdir(path) && (!dd->path || strcmp(path, dd->path) != 0))
                {
                dest_populate(dd, path);
index 98cd9a9..a9e4542 100644 (file)
 #  include "config.h"
 #endif
 #include "intl.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include <gtk/gtk.h>
 
 #include "ui_spinner.h"
index 2a49579..e499598 100644 (file)
@@ -99,30 +99,30 @@ static void tab_completion_free_list(TabCompData *td)
 
 static void tab_completion_read_dir(TabCompData *td, const gchar *path)
 {
-        DIR *dp;
-        struct dirent *dir;
-        GList *list = NULL;
+       DIR *dp;
+       struct dirent *dir;
+       GList *list = NULL;
        gchar *pathl;
 
        tab_completion_free_list(td);
 
        pathl = path_from_utf8(path);
-        dp = opendir(pathl);
+       dp = opendir(pathl);
        g_free(pathl);
        if (!dp)
-                {
-                /* dir not found */
-                return;
-                }
-        while ((dir = readdir(dp)) != NULL)
-                {
+               {
+               /* dir not found */
+               return;
+               }
+       while ((dir = readdir(dp)) != NULL)
+               {
                gchar *name = dir->d_name;
                if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0)
                        {
                        list = g_list_prepend(list, path_to_utf8(name));
                        }
                }
-        closedir(dp);
+       closedir(dp);
 
        td->dir_path = g_strdup(path);
        td->file_list = list;
@@ -204,7 +204,7 @@ static gint tab_completion_popup_key_press(GtkWidget *widget, GdkEventKey *event
                gtk_menu_popdown(GTK_MENU(widget));
                /* doing this does not emit the "selection done" signal, unref it ourselves */
                gtk_widget_unref(widget);
-                       
+
                return TRUE;
                }
 
@@ -344,7 +344,7 @@ static void tab_completion_popup_list(TabCompData *td, GList *list)
 
 static gint simple_sort(gconstpointer a, gconstpointer b)
 {
-        return CASE_SORT((gchar *)a, (gchar *)b);
+       return CASE_SORT((gchar *)a, (gchar *)b);
 }
 
 #endif
@@ -549,7 +549,7 @@ static gint tab_completion_key_pressed(GtkWidget *widget, GdkEventKey *event, gp
 
        switch (event->keyval)
                {
-                case GDK_Tab:
+               case GDK_Tab:
                        if (!(event->state & GDK_CONTROL_MASK))
                                {
                                if (tab_completion_do(td))
index 4ab8682..6aec001 100644 (file)
@@ -296,7 +296,7 @@ gint tree_view_get_cell_origin(GtkTreeView *widget, GtkTreePath *tpath, gint col
                g_list_free(renderers);
 
                if (!cell) return FALSE;
-               
+
                if (!gtk_tree_view_column_cell_get_position(tv_column, cell, &cell_x, &cell_width))
                        {
                        cell_x = 0;
@@ -342,9 +342,9 @@ void tree_view_get_cell_clamped(GtkTreeView *widget, GtkTreePath *tpath, gint co
 gint tree_view_row_get_visibility(GtkTreeView *widget, GtkTreeIter *iter, gint fully_visible)
 {
        GtkTreeModel *store;
-       GtkTreePath *tpath;     
+       GtkTreePath *tpath;
        gint cx, cy;
-                                                                                                                               
+
        GdkRectangle vrect;
        GdkRectangle crect;
 
@@ -448,10 +448,10 @@ gint tree_view_move_cursor_away(GtkTreeView *widget, GtkTreeIter *iter, gint onl
 gint tree_path_to_row(GtkTreePath *tpath)
 {
        gint *indices;
-                                                                                                                    
+
        indices = gtk_tree_path_get_indices(tpath);
        if (indices) return indices[0];
-                                                                                                                    
+
        return -1;
 }
 
index 3d818a4..5e890b4 100644 (file)
@@ -36,7 +36,7 @@
  *-----------------------------------------------------------------------------
  * generic dialog
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 void generic_dialog_close(GenericDialog *gd)
 {
@@ -112,7 +112,7 @@ static void generic_dialog_show_cb(GtkWidget *widget, gpointer data)
 {
        GenericDialog *gd = data;
        if (gd->cancel_button)
-               {
+               {
                gtk_box_reorder_child(GTK_BOX(gd->hbox), gd->cancel_button, -1);
                }
 
@@ -262,7 +262,7 @@ static void generic_dialog_setup(GenericDialog *gd,
        gtk_widget_show(gd->hbox);
 
        if (gd->cancel_cb)
-               {
+               {
                gd->cancel_button = generic_dialog_add_button(gd, GTK_STOCK_CANCEL, NULL, gd->cancel_cb, TRUE);
                }
        else
@@ -295,7 +295,7 @@ GenericDialog *generic_dialog_new(const gchar *title,
  *-----------------------------------------------------------------------------
  * simple warning dialog
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void warning_dialog_ok_cb(GenericDialog *gd, gpointer data)
 {
@@ -321,7 +321,7 @@ GenericDialog *warning_dialog(const gchar *heading, const gchar *text,
  *-----------------------------------------------------------------------------
  * generic file ops dialog routines
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 void file_dialog_close(FileDialog *fdlg)
 {
index 97fcc22..60993cc 100644 (file)
@@ -202,7 +202,7 @@ static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box,
        /* only the first image is stored (for use in gd_image_set) */
        g_object_set_data(G_OBJECT(gd->dialog), "img_image", imd);
        g_object_set_data(G_OBJECT(gd->dialog), "img_label", label);
-               
+
 
        /* image 2 */
 
@@ -234,7 +234,7 @@ static void generic_dialog_image_set(GenericDialog *gd, FileData *fd)
 {
        ImageWindow *imd;
        GtkWidget *label;
-       
+
        imd = g_object_get_data(G_OBJECT(gd->dialog), "img_image");
        label = g_object_get_data(G_OBJECT(gd->dialog), "img_label");
 
@@ -340,7 +340,7 @@ static gint copy_file_ext_cb(gpointer ed, gint flags, GList *list, gpointer data
                {
                FileData *fd = list->data;
                gchar *title = _("Error copying file");
-               gchar *text = g_strdup_printf(_("%s\nUnable to copy file:\n%s\nto:\n%s"), editor_get_error_str(flags), fd->name, fd->change->dest); 
+               gchar *text = g_strdup_printf(_("%s\nUnable to copy file:\n%s\nto:\n%s"), editor_get_error_str(flags), fd->name, fd->change->dest);
                file_util_warning_dialog(title, text, GTK_STOCK_DIALOG_ERROR, NULL);
                g_free(text);
                }
@@ -374,7 +374,7 @@ gint copy_file_ext(FileData *fd)
                }
 
        file_data_change_info_free(NULL, fd);
-               
+
        return ok;
 }
 
@@ -384,7 +384,7 @@ static gint move_file_ext_cb(gpointer ed, gint flags, GList *list, gpointer data
                {
                FileData *fd = list->data;
                gchar *title = _("Error moving file");
-               gchar *text = g_strdup_printf(_("%s\nUnable to move file:\n%s\nto:\n%s"), editor_get_error_str(flags), fd->name, fd->change->dest); 
+               gchar *text = g_strdup_printf(_("%s\nUnable to move file:\n%s\nto:\n%s"), editor_get_error_str(flags), fd->name, fd->change->dest);
                file_util_warning_dialog(title, text, GTK_STOCK_DIALOG_ERROR, NULL);
                g_free(text);
                }
@@ -410,8 +410,8 @@ gint move_file_ext(FileData *fd)
        g_assert(fd->change);
        if (options->editor_command[CMD_MOVE])
                {
-               ok = !start_editor_from_file_full(CMD_MOVE, fd, move_file_ext_cb, NULL); 
-               if (ok) return ok; /* that's all for now, let's continue in callback */ 
+               ok = !start_editor_from_file_full(CMD_MOVE, fd, move_file_ext_cb, NULL);
+               if (ok) return ok; /* that's all for now, let's continue in callback */
                }
        else
                ok = move_file(fd->change->source, fd->change->dest);
@@ -423,7 +423,7 @@ gint move_file_ext(FileData *fd)
                }
 
        file_data_change_info_free(NULL, fd);
-               
+
        return ok;
 }
 
@@ -433,7 +433,7 @@ static gint rename_file_ext_cb(gpointer ed, gint flags, GList *list, gpointer da
                {
                FileData *fd = list->data;
                gchar *title = _("Error renaming file");
-               gchar *text = g_strdup_printf(_("%s\nUnable to rename file:\n%s\nto:\n%s"), editor_get_error_str(flags), fd->name, fd->change->dest); 
+               gchar *text = g_strdup_printf(_("%s\nUnable to rename file:\n%s\nto:\n%s"), editor_get_error_str(flags), fd->name, fd->change->dest);
                file_util_warning_dialog(title, text, GTK_STOCK_DIALOG_ERROR, NULL);
                g_free(text);
                }
@@ -462,15 +462,15 @@ gint rename_file_ext(FileData *fd)
                }
        else
                ok = rename_file(fd->change->source, fd->change->dest);
-                       
+
        if (ok)
                {
                file_data_do_change(fd);
                file_maint_renamed(fd);
                }
-               
+
        file_data_change_info_free(NULL, fd);
-               
+
        return ok;
 }
 
@@ -1311,7 +1311,7 @@ static gint file_util_safe_number(gint64 free_space)
                {
                FileData *fd;
                gint v;
-              
+
                fd = work->data;
                work = work->next;
 
@@ -1510,12 +1510,12 @@ static gint file_util_delete_ext_cb(gpointer resume_data, gint flags, GList *lis
        if ((flags & EDITOR_ERROR_MASK) && !(flags & EDITOR_ERROR_SKIPPED))
                {
                        GString *msg = g_string_new(editor_get_error_str(flags));
-                       g_string_append(msg,_("\nUnable to delete file by external command:\n")); 
+                       g_string_append(msg,_("\nUnable to delete file by external command:\n"));
                        GenericDialog *d;
                        while (list)
                                {
                                FileData *fd = list->data;
-                               
+
                                g_string_append(msg, fd->path);
                                g_string_append(msg, "\n");
                                list = list->next;
@@ -1540,15 +1540,15 @@ static gint file_util_delete_ext_cb(gpointer resume_data, gint flags, GList *lis
                                }
                        g_string_free(msg, TRUE);
                }
-       
-       
+
+
                {
                while (list)
                        {
                        FileData *fd = list->data;
                        if (flags & EDITOR_ERROR_MASK)
                                /* an error occured -> no change -> delete change info */
-                               file_data_change_info_free(NULL, fd); 
+                               file_data_change_info_free(NULL, fd);
                        else
                                /* files were successfully deleted, call the maint functions and keep the change info forever */
                                file_maint_removed(fd, list);
@@ -1589,14 +1589,14 @@ static void file_util_delete_multiple_ok_cb(GenericDialog *gd, gpointer data)
                        file_data_add_change_info(fd, FILEDATA_CHANGE_DELETE, NULL, NULL);
                        work = work->next;
                        }
-               
+
                if ((flags = start_editor_from_filelist_full(CMD_DELETE, source_list, file_util_delete_ext_cb, NULL)))
                        {
-                       gchar *text = g_strdup_printf(_("%s\nUnable to delete files by external command.\n"), editor_get_error_str(flags)); 
+                       gchar *text = g_strdup_printf(_("%s\nUnable to delete files by external command.\n"), editor_get_error_str(flags));
                        file_util_warning_dialog(_("File deletion failed"), text, GTK_STOCK_DIALOG_ERROR, NULL);
                        g_free(text);
                        }
-               
+
                filelist_free(source_list);
                return;
                }
@@ -1630,7 +1630,7 @@ static void file_util_delete_multiple_ok_cb(GenericDialog *gd, gpointer data)
                        else
                                {
                                gchar *text;
-                               
+
                                text = g_strdup_printf(_("Unable to delete file:\n%s"), fd->path);
                                file_util_warning_dialog(_("Delete failed"), text, GTK_STOCK_DIALOG_ERROR, NULL);
                                g_free(text);
@@ -1763,7 +1763,7 @@ static void file_util_delete_multiple(GList *source_list, GtkWidget *parent)
                gd = file_util_gen_dlg(title, GQ_WMCLASS, "dlg_confirm", parent, TRUE,
                                       file_util_delete_multiple_cancel_cb, source_list);
                g_free(title);
-               
+
                generic_dialog_add_message(gd, NULL, _("Delete multiple files"), NULL);
 
                generic_dialog_add_image(gd, NULL, NULL, NULL, NULL, NULL, TRUE);
@@ -2254,7 +2254,7 @@ static void file_util_rename_multiple_auto(RenameDataMult *rd)
                        {
                        dest = g_strdup_printf("%s/%s%0*d%s", base, front, padding, n, end);
                        }
-                       
+
                if (!file_data_add_change_info(fd, FILEDATA_CHANGE_RENAME, fd->path, dest) ||
                    !rename_file_ext(fd))
                        {
@@ -2399,7 +2399,7 @@ static void file_util_rename_multiple_preview_update(RenameDataMult *rd)
                if (rd->rename_type == RENAME_TYPE_FORMATTED)
                        {
                        FileData *fd;
-       
+
                        gtk_tree_model_get(store, &iter, RENAME_COLUMN_FD, &fd, -1);
                        dest = file_util_rename_multiple_auto_format_name(format, fd->name, n);
 //                     file_data_unref(fd);
@@ -2505,13 +2505,13 @@ static GtkTreeViewColumn *file_util_rename_multiple_add_column(RenameDataMult *r
        GtkCellRenderer *renderer;
 
        column = gtk_tree_view_column_new();
-        gtk_tree_view_column_set_title(column, text);
-        gtk_tree_view_column_set_min_width(column, 4);
-        gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_GROW_ONLY);
-        renderer = gtk_cell_renderer_text_new();
-        gtk_tree_view_column_pack_start(column, renderer, TRUE);
-        gtk_tree_view_column_add_attribute(column, renderer, "text", n);
-        gtk_tree_view_append_column(GTK_TREE_VIEW(rd->listview), column);
+       gtk_tree_view_column_set_title(column, text);
+       gtk_tree_view_column_set_min_width(column, 4);
+       gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_GROW_ONLY);
+       renderer = gtk_cell_renderer_text_new();
+       gtk_tree_view_column_pack_start(column, renderer, TRUE);
+       gtk_tree_view_column_add_attribute(column, renderer, "text", n);
+       gtk_tree_view_append_column(GTK_TREE_VIEW(rd->listview), column);
 
        return column;
 }
@@ -2543,7 +2543,7 @@ static void file_util_rename_multiple_do(GList *source_list, GtkWidget *parent)
        gchar *title;
 
        rd = g_new0(RenameDataMult, 1);
-       
+
        title = g_strdup_printf("%s -%s", _("Rename"), GQ_APPNAME);
        rd->fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_rename", parent,
                                      file_util_rename_multiple_close_cb, rd);
@@ -2563,7 +2563,7 @@ static void file_util_rename_multiple_do(GList *source_list, GtkWidget *parent)
        pane = gtk_hpaned_new();
        gtk_box_pack_start(GTK_BOX(vbox), pane, TRUE, TRUE, 0);
        gtk_widget_show(pane);
-       
+
        scrolled = gtk_scrolled_window_new(NULL, NULL);
        gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrolled),
@@ -2585,7 +2585,7 @@ static void file_util_rename_multiple_do(GList *source_list, GtkWidget *parent)
        file_util_rename_multiple_add_column(rd, _("Original Name"), RENAME_COLUMN_NAME);
        column = file_util_rename_multiple_add_column(rd, _("Preview"), RENAME_COLUMN_PREVIEW);
        gtk_tree_view_column_set_visible(column, FALSE);
-       
+
        gtk_tree_view_set_reorderable(GTK_TREE_VIEW(rd->listview), TRUE);
        g_signal_connect(G_OBJECT(store), "row_changed",
                         G_CALLBACK(file_util_rename_multiple_preview_order_cb), rd);
@@ -2662,7 +2662,7 @@ static void file_util_rename_multiple_do(GList *source_list, GtkWidget *parent)
                         G_CALLBACK(file_util_rename_multiple_preview_entry_cb), rd);
        gtk_box_pack_start(GTK_BOX(box2), combo, TRUE, TRUE, 0);
        gtk_widget_show(combo);
-       
+
        box2 = furm_simple_vlabel(hbox, _("Start #"), FALSE);
 
        rd->auto_spin_start = pref_spin_new(box2, NULL, NULL,
@@ -2694,7 +2694,7 @@ static void file_util_rename_multiple_do(GList *source_list, GtkWidget *parent)
                         G_CALLBACK(file_util_rename_multiple_preview_entry_cb), rd);
        gtk_box_pack_start(GTK_BOX(box2), combo, TRUE, TRUE, 0);
        gtk_widget_show(combo);
-       
+
        box2 = furm_simple_vlabel(hbox, _("Start #"), FALSE);
 
        rd->format_spin = pref_spin_new(box2, NULL, NULL,
@@ -2805,7 +2805,7 @@ static void file_util_rename_single_do(FileData *source_fd, GtkWidget *parent)
 
        title = g_strdup_printf("%s -%s", _("Rename"), GQ_APPNAME);
        fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_rename", parent,
-                                 file_util_rename_single_close_cb, NULL);
+                                 file_util_rename_single_close_cb, NULL);
        g_free(title);
 
        generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, _("Rename file"), NULL);
@@ -2930,7 +2930,7 @@ void file_util_create_dir(const gchar *path, GtkWidget *parent)
 
        title = g_strdup_printf("%s -%s", _("New folder"), GQ_APPNAME);
        fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_newdir", parent,
-                                 file_util_create_dir_close_cb, NULL);
+                                 file_util_create_dir_close_cb, NULL);
        g_free(title);
 
        text = g_strdup_printf(_("Create folder in:\n%s\nnamed:"), path);
index 6f85aa9..591383b 100644 (file)
@@ -46,7 +46,7 @@ static void vd_destroy_cb(GtkWidget *widget, gpointer data)
        case DIRVIEW_LIST: vdlist_destroy_cb(widget, data); break;
        case DIRVIEW_TREE: vdtree_destroy_cb(widget, data); break;
        }
-       
+
        if (vd->pf) folder_icons_free(vd->pf);
        if (vd->drop_list) filelist_free(vd->drop_list);
 
@@ -87,7 +87,7 @@ ViewDir *vd_new(DirViewType type, const gchar *path)
        }
 
        gtk_container_add(GTK_CONTAINER(vd->widget), vd->view);
-       
+
        vd_dnd_init(vd);
 
        g_signal_connect(G_OBJECT(vd->view), "row_activated",
@@ -107,12 +107,12 @@ ViewDir *vd_new(DirViewType type, const gchar *path)
 
        return vd;
 }
-       
+
 void vd_set_select_func(ViewDir *vd,
-                        void (*func)(ViewDir *vd, const gchar *path, gpointer data), gpointer data)
+                       void (*func)(ViewDir *vd, const gchar *path, gpointer data), gpointer data)
 {
-        vd->select_func = func;
-        vd->select_data = data;
+       vd->select_func = func;
+       vd->select_data = data;
 }
 
 void vd_set_layout(ViewDir *vd, LayoutWindow *layout)
@@ -347,7 +347,7 @@ GtkWidget *vd_drop_menu(ViewDir *vd, gint active)
  *-----------------------------------------------------------------------------
  * pop-up menu
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 static void vd_pop_menu_up_cb(GtkWidget *widget, gpointer data)
 {
@@ -526,7 +526,7 @@ static void vd_pop_menu_new_cb(GtkWidget *widget, gpointer data)
 static void vd_pop_menu_rename_cb(GtkWidget *widget, gpointer data)
 {
        ViewDir *vd = data;
-       
+
        vd_rename_by_data(vd, vd->click_fd);
 }
 
@@ -551,8 +551,8 @@ GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd)
                        /* ignore .. and . */
                        rename_delete_active = (new_folder_active && fd &&
                                strcmp(fd->name, ".") != 0 &&
-                               strcmp(fd->name, "..") != 0 &&
-                               access_file(fd->path, W_OK | X_OK));
+                               strcmp(fd->name, "..") != 0 &&
+                               access_file(fd->path, W_OK | X_OK));
                        };
                        break;
                case DIRVIEW_TREE:
@@ -600,10 +600,10 @@ GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd)
                                      G_CALLBACK(vd_pop_menu_delete_cb), vd);
 
        menu_item_add_divider(menu);
-       
+
        item = menu_item_add(menu, _("_View as"), NULL, NULL);
        submenu = gtk_menu_new();
-        gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
+       gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu);
 
        for (i = 0; i < G_N_ELEMENTS(menu_view_dir_radio_entries); i++)
                {
@@ -801,7 +801,7 @@ static gint vd_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer
 static gint vd_dnd_drop_motion(GtkWidget *widget, GdkDragContext *context,
                                   gint x, gint y, guint time, gpointer data)
 {
-        ViewDir *vd = data;
+       ViewDir *vd = data;
 
        vd->click_fd = NULL;
 
index 0292805..592369a 100644 (file)
@@ -117,7 +117,7 @@ static void vdlist_scroll_to_row(ViewDir *vd, FileData *fd, gfloat y_align)
  *-----------------------------------------------------------------------------
  * main
  *-----------------------------------------------------------------------------
- */ 
+ */
 
 void vdlist_select_row(ViewDir *vd, FileData *fd)
 {
@@ -228,15 +228,15 @@ gint vdlist_set_path(ViewDir *vd, const gchar *path)
 
        if (strcmp(vd->path, "/") != 0)
                {
-               filepath = g_strconcat(vd->path, "/", "..", NULL); 
+               filepath = g_strconcat(vd->path, "/", "..", NULL);
                fd = file_data_new_simple(filepath);
                VDLIST_INFO(vd, list) = g_list_prepend(VDLIST_INFO(vd, list), fd);
                g_free(filepath);
                }
-       
+
        if (options->file_filter.show_dot_directory)
                {
-               filepath = g_strconcat(vd->path, "/", ".", NULL); 
+               filepath = g_strconcat(vd->path, "/", ".", NULL);
                fd = file_data_new_simple(filepath);
                VDLIST_INFO(vd, list) = g_list_prepend(VDLIST_INFO(vd, list), fd);
                g_free(filepath);
@@ -286,7 +286,7 @@ gint vdlist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
        ViewDir *vd = data;
        GtkTreePath *tpath;
-       
+
        if (event->keyval != GDK_Menu) return FALSE;
 
        gtk_tree_view_get_cursor(GTK_TREE_VIEW(vd->view), &tpath, NULL);
@@ -298,7 +298,7 @@ gint vdlist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
                store = gtk_tree_view_get_model(GTK_TREE_VIEW(widget));
                gtk_tree_model_get_iter(store, &iter, tpath);
                gtk_tree_model_get(store, &iter, DIR_COLUMN_POINTER, &vd->click_fd, -1);
-               
+
                gtk_tree_path_free(tpath);
                }
        else
index 3d2dc33..fea8d4f 100644 (file)
@@ -434,7 +434,7 @@ static gint vdtree_populate_path_by_iter(ViewDir *vd, GtkTreeIter *iter, gint fo
        if (!nd) return FALSE;
 
        current_time = time(NULL);
-       
+
        if (nd->expanded)
                {
                if (!force && current_time - nd->last_update < 10) return TRUE;
@@ -650,7 +650,7 @@ FileData *vdtree_populate_path(ViewDir *vd, const gchar *path, gint expand, gint
 static gint selection_is_ok = FALSE;
 
 static gboolean vdtree_select_cb(GtkTreeSelection *selection, GtkTreeModel *store, GtkTreePath *tpath,
-                                 gboolean path_currently_selected, gpointer data)
+                                gboolean path_currently_selected, gpointer data)
 {
        return selection_is_ok;
 }
@@ -659,7 +659,7 @@ void vdtree_select_row(ViewDir *vd, FileData *fd)
 {
        GtkTreeSelection *selection;
        GtkTreeIter iter;
-                                                                                                                               
+
        if (!vd_find_row(vd, fd, &iter)) return;
        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(vd->view));
 
@@ -672,10 +672,10 @@ void vdtree_select_row(ViewDir *vd, FileData *fd)
 
        vdtree_expand_by_iter(vd, &iter, TRUE);
 
-        if (fd && vd->select_func)
-                {
-                vd->select_func(vd, fd->path, vd->select_data);
-                }
+       if (fd && vd->select_func)
+               {
+               vd->select_func(vd, fd->path, vd->select_data);
+               }
 }
 
 gint vdtree_set_path(ViewDir *vd, const gchar *path)
@@ -940,7 +940,7 @@ ViewDir *vdtree_new(ViewDir *vd, const gchar *path)
 
        VDTREE_INFO(vd, drop_expand_id) = -1;
        VDTREE_INFO(vd, busy_ref) = 0;
-       
+
        vd->dnd_drop_leave_func = vdtree_dnd_drop_expand_cancel;
        vd->dnd_drop_update_func = vdtree_dnd_drop_expand;
 
index a1d45a8..cfb82ae 100644 (file)
@@ -96,7 +96,7 @@ static gint iconlist_read(const gchar *path, GList **list)
                IconData *id;
 
                fd = work->data;
-               g_assert(fd->magick == 0x12345678); 
+               g_assert(fd->magick == 0x12345678);
                id = g_new0(IconData, 1);
 
                id->selected = SELECTION_NONE;
@@ -120,10 +120,10 @@ static void iconlist_free(GList *list)
                IconData *id = work->data;
                file_data_unref(id->fd);
                g_free(id);
-                work = work->next;                                                                                                    
-                }                                                                                                                     
-                                                                                                                                      
-        g_list_free(list);                                                                                                            
+               work = work->next;
+               }
+
+       g_list_free(list);
 
 }
 
@@ -202,7 +202,7 @@ static void vficon_pop_menu_view_cb(GtkWidget *widget, gpointer data)
        if (vfi->click_id->selected & SELECTION_SELECTED)
                {
                GList *list;
-               
+
                list = vficon_selection_get_list(vfi);
                view_window_new_from_list(list);
                filelist_free(list);
@@ -247,7 +247,7 @@ static void vficon_pop_menu_sort_cb(GtkWidget *widget, gpointer data)
        SortType type;
 
        if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return;
-       
+
        vfi = submenu_item_get_data(widget);
        if (!vfi) return;
 
@@ -300,7 +300,7 @@ static void vficon_pop_menu_refresh_cb(GtkWidget *widget, gpointer data)
 
 static void vficon_popup_destroy_cb(GtkWidget *widget, gpointer data)
 {
-       ViewFileIcon *vfi = data;                                                                                                                               
+       ViewFileIcon *vfi = data;
        vficon_selection_remove(vfi, vfi->click_id, SELECTION_PRELIGHT, NULL);
        vfi->click_id = NULL;
        vfi->popup = NULL;
@@ -376,10 +376,10 @@ static void vficon_send_layout_select(ViewFileIcon *vfi, IconData *id)
        if (!vfi->layout || !id || !id->fd) return;
 
        sel_fd = id->fd;
-       
+
        cur_fd = layout_image_get_fd(vfi->layout);
        if (sel_fd == cur_fd) return; /* no change */
-       
+
        if (options->image.enable_read_ahead)
                {
                gint row;
@@ -877,7 +877,7 @@ static void vficon_select_region_util(ViewFileIcon *vfi, IconData *start, IconDa
                        {
                        id = work->data;
                        vficon_select_util(vfi, id, select);
-                       
+
                        if (work->data != end)
                                work = work->next;
                        else
@@ -932,7 +932,7 @@ gint vficon_selection_count(ViewFileIcon *vfi, gint64 *bytes)
                        {
                        IconData *id = work->data;
                        FileData *fd = id->fd;
-                       g_assert(fd->magick == 0x12345678); 
+                       g_assert(fd->magick == 0x12345678);
                        b += fd->size;
 
                        work = work->next;
@@ -954,7 +954,7 @@ GList *vficon_selection_get_list(ViewFileIcon *vfi)
                {
                IconData *id = work->data;
                FileData *fd = id->fd;
-               g_assert(fd->magick == 0x12345678); 
+               g_assert(fd->magick == 0x12345678);
 
                list = g_list_prepend(list, file_data_ref(fd));
 
@@ -971,7 +971,7 @@ GList *vficon_selection_get_list_by_index(ViewFileIcon *vfi)
        GList *list = NULL;
        GList *work;
 
-       work = vfi->selection;  
+       work = vfi->selection;
        while (work)
                {
                list = g_list_prepend(list, GINT_TO_POINTER(g_list_index(vfi->list, work->data)));
@@ -1039,12 +1039,12 @@ void vficon_mark_to_selection(ViewFileIcon *vfi, gint mark, MarkToSelectionMode
                FileData *fd = id->fd;
                gboolean mark_val, selected;
 
-               g_assert(fd->magick == 0x12345678); 
+               g_assert(fd->magick == 0x12345678);
 
                mark_val = fd->marks[mark];
                selected = (id->selected & SELECTION_SELECTED);
-               
-               switch (mode) 
+
+               switch (mode)
                        {
                        case MTS_MODE_SET: selected = mark_val;
                                break;
@@ -1055,7 +1055,7 @@ void vficon_mark_to_selection(ViewFileIcon *vfi, gint mark, MarkToSelectionMode
                        case MTS_MODE_MINUS: selected = !mark_val & selected;
                                break;
                        }
-               
+
                vficon_select_util(vfi, id, selected);
 
                work = work->next;
@@ -1074,7 +1074,7 @@ void vficon_selection_to_mark(ViewFileIcon *vfi, gint mark, SelectionToMarkMode
        while (work)
                {
                FileData *fd = work->data;
-               
+
                switch (mode)
                        {
                        case STM_MODE_SET: fd->marks[mark] = 1;
@@ -1084,7 +1084,7 @@ void vficon_selection_to_mark(ViewFileIcon *vfi, gint mark, SelectionToMarkMode
                        case STM_MODE_TOGGLE: fd->marks[mark] = !fd->marks[mark];
                                break;
                        }
-                       
+
                work = work->next;
                }
        filelist_free(slist);
@@ -1442,7 +1442,7 @@ static gint vficon_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer
        IconData *id;
 
        tip_unschedule(vfi);
-       
+
        id = vficon_find_data_by_coord(vfi, (gint)bevent->x, (gint)bevent->y, &iter);
 
        vfi->click_id = id;
@@ -1500,7 +1500,7 @@ static gint vficon_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointe
            id && vfi->click_id == id)
                {
                vficon_set_focus(vfi, id);
-               
+
                if (bevent->state & GDK_CONTROL_MASK)
                        {
                        gint select;
@@ -1765,7 +1765,7 @@ static void vficon_sync(ViewFileIcon *vfi)
                        {
                        list = vficon_add_row(vfi, &iter);
                        }
-               
+
                while (list)
                        {
                        IconData *id;
@@ -2028,7 +2028,7 @@ static void vficon_thumb_update(ViewFileIcon *vfi)
 FileData *vficon_index_get_data(ViewFileIcon *vfi, gint row)
 {
        IconData *id;
-       
+
        id = g_list_nth_data(vfi->list, row);
        return id ? id->fd : NULL;
 }
@@ -2037,7 +2037,7 @@ gchar *vficon_index_get_path(ViewFileIcon *vfi, gint row)
 {
        FileData *fd;
        IconData *id;
-       
+
        id = g_list_nth_data(vfi->list, row);
        fd = id ? id->fd : NULL;
 
@@ -2113,7 +2113,7 @@ gint vficon_count(ViewFileIcon *vfi, gint64 *bytes)
                work = vfi->list;
                while (work)
                        {
-                       
+
                        IconData *id = work->data;
                        FileData *fd = id->fd;
                        work = work->next;
@@ -2173,12 +2173,12 @@ static gint vficon_refresh_real(ViewFileIcon *vfi, gint keep_position)
                {
                IconData *id;
                FileData *fd;
-               
+
                GList *needle;
 
                id = work->data;
                fd = id->fd;
-               
+
                needle = vfi->list;
                while (needle)
                        {
@@ -2257,11 +2257,11 @@ static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer
        vfi = cd->vfi;
 
        gtk_tree_model_get(tree_model, iter, FILE_COLUMN_POINTER, &list, -1);
-       
+
        id = g_list_nth_data(list, cd->number);
-       
+
        if (id) g_assert(id->fd->magick == 0x12345678);
-       
+
        style = gtk_widget_get_style(vfi->listview);
        if (id && id->selected & SELECTION_SELECTED)
                {
@@ -2283,7 +2283,7 @@ static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer
                }
 
        if (GQV_IS_CELL_RENDERER_ICON(cell))
-                {
+               {
                if (id)
                        {
                        g_object_set(cell,      "pixbuf", id->fd->pixbuf,
@@ -2301,7 +2301,7 @@ static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer
                                                "cell-background-set", FALSE,
                                                "foreground-set", FALSE,
                                                "has-focus", FALSE, NULL);
-                       }       
+                       }
                }
 }
 
@@ -2644,14 +2644,14 @@ gint vficon_maint_removed(ViewFileIcon *vfi, FileData *fd, GList *ignore_list)
 
                                ignore_id = work->data;
                                ignore_fd = ignore_id->fd;
-                               g_assert(ignore_fd->magick == 0x12345678); 
+                               g_assert(ignore_fd->magick == 0x12345678);
                                work = work->next;
 
                                tmp = ignore_list;
                                while (tmp && !match)
                                        {
                                        FileData *ignore_list_fd = tmp->data;
-                                       g_assert(ignore_list_fd->magick == 0x12345678); 
+                                       g_assert(ignore_list_fd->magick == 0x12345678);
                                        tmp = tmp->next;
 
                                        if (ignore_list_fd == ignore_fd)
index d501965..1a2afb9 100644 (file)
@@ -91,7 +91,7 @@ static gint vflist_find_row(ViewFileList *vfl, FileData *fd, GtkTreeIter *iter)
 {
        GtkTreeModel *store;
        ViewFileListFindRowData data = {fd, iter, 0, 0};
-       
+
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(vfl->listview));
        gtk_tree_model_foreach(store, vflist_find_row_cb, &data);
 
@@ -112,15 +112,15 @@ static gint vflist_find_sidecar_list_idx(GList *work, FileData *fd)
                {
                FileData *fd_p = work->data;
                if (fd == fd_p) return i;
-               
+
                i++;
 
                GList *work2 = fd_p->sidecar_files;
                while (work2)
                        {
-                       fd_p = work2->data; 
+                       fd_p = work2->data;
                        if (fd == fd_p) return i;
-                       
+
                        i++;
                        work2 = work2->next;
                        }
@@ -188,7 +188,7 @@ static gint vflist_column_idx(ViewFileList *vfl, gint store_idx)
                work = work->next;
                i++;
                }
-    
+
        g_list_free(columns);
        return i;
 }
@@ -394,7 +394,7 @@ static void vflist_pop_menu_sort_cb(GtkWidget *widget, gpointer data)
        SortType type;
 
        if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return;
-       
+
        vfl = submenu_item_get_data(widget);
        if (!vfl) return;
 
@@ -530,31 +530,31 @@ static GtkWidget *vflist_pop_menu(ViewFileList *vfl, FileData *fd, gint col_idx)
                gchar *str_sel_mark_or = g_strdup_printf(_("_Add mark %d"), mark + 1);
                gchar *str_sel_mark_and = g_strdup_printf(_("_Intersection with mark %d"), mark + 1);
                gchar *str_sel_mark_minus = g_strdup_printf(_("_Unselect mark %d"), mark + 1);
-               
-               
+
+
                vfl->active_mark = mark;
                menu_item_add_sensitive(menu, str_set_mark, active,
-                                       G_CALLBACK(vflist_pop_menu_set_mark_sel_cb), vfl);
-       
+                                       G_CALLBACK(vflist_pop_menu_set_mark_sel_cb), vfl);
+
                menu_item_add_sensitive(menu, str_res_mark, active,
-                                       G_CALLBACK(vflist_pop_menu_res_mark_sel_cb), vfl);
-       
+                                       G_CALLBACK(vflist_pop_menu_res_mark_sel_cb), vfl);
+
                menu_item_add_sensitive(menu, str_toggle_mark, active,
-                                       G_CALLBACK(vflist_pop_menu_toggle_mark_sel_cb), vfl);
+                                       G_CALLBACK(vflist_pop_menu_toggle_mark_sel_cb), vfl);
 
                menu_item_add_divider(menu);
-       
+
                menu_item_add_sensitive(menu, str_sel_mark, active,
-                                       G_CALLBACK(vflist_pop_menu_sel_mark_cb), vfl);
+                                       G_CALLBACK(vflist_pop_menu_sel_mark_cb), vfl);
                menu_item_add_sensitive(menu, str_sel_mark_or, active,
-                                       G_CALLBACK(vflist_pop_menu_sel_mark_or_cb), vfl);
+                                       G_CALLBACK(vflist_pop_menu_sel_mark_or_cb), vfl);
                menu_item_add_sensitive(menu, str_sel_mark_and, active,
-                                       G_CALLBACK(vflist_pop_menu_sel_mark_and_cb), vfl);
+                                       G_CALLBACK(vflist_pop_menu_sel_mark_and_cb), vfl);
                menu_item_add_sensitive(menu, str_sel_mark_minus, active,
-                                       G_CALLBACK(vflist_pop_menu_sel_mark_minus_cb), vfl);
-       
+                                       G_CALLBACK(vflist_pop_menu_sel_mark_minus_cb), vfl);
+
                menu_item_add_divider(menu);
-               
+
                g_free(str_set_mark);
                g_free(str_res_mark);
                g_free(str_toggle_mark);
@@ -631,14 +631,14 @@ static gint vflist_row_rename_cb(TreeEditData *td, const gchar *old, const gchar
                file_util_warning_dialog(_("Error renaming file"), text, GTK_STOCK_DIALOG_ERROR, vfl->listview);
                g_free(text);
                }
-       else 
+       else
                {
                gint row = vflist_index_by_path(vfl, old_path);
-               if (row >= 0) 
+               if (row >= 0)
                        {
                        GList *work = g_list_nth(vfl->list, row);
                        FileData *fd = work->data;
-                       
+
                        if (!file_data_add_change_info(fd, FILEDATA_CHANGE_RENAME, old_path, new_path) || !rename_file_ext(fd))
                                {
                                gchar *text = g_strdup_printf(_("Unable to rename file:\n%s\nto:\n%s"), old, new);
@@ -708,17 +708,17 @@ static gint vflist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer
        FileData *fd = NULL;
        GtkTreeViewColumn *column;
        gint col_idx = 0;
-    
+
        if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), bevent->x, bevent->y,
                                          &tpath, &column, NULL, NULL))
                {
                GtkTreeModel *store;
                col_idx = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(column), "column_store_idx"));
-        
+
                if (bevent->button == 1 &&
                    col_idx >= FILE_COLUMN_MARKS && col_idx <= FILE_COLUMN_MARKS_LAST)
                        return FALSE;
-        
+
                store = gtk_tree_view_get_model(GTK_TREE_VIEW(widget));
 
                gtk_tree_model_get_iter(store, &iter, tpath);
@@ -841,10 +841,10 @@ static void vflist_select_image(ViewFileList *vfl, FileData *sel_fd)
        gint row;
        FileData *cur_fd;
        if (!sel_fd) return;
-       
+
        cur_fd = layout_image_get_fd(vfl->layout);
        if (sel_fd == cur_fd) return; /* no change */
-       
+
        row = g_list_index(vfl->list, sel_fd);
        // FIXME sidecar data
 
@@ -925,7 +925,7 @@ static gboolean vflist_select_cb(GtkTreeSelection *selection, GtkTreeModel *stor
 
 /*
 static gboolean vflist_dummy_select_cb(GtkTreeSelection *selection, GtkTreeModel *store, GtkTreePath *tpath,
-                                       gboolean path_currently_selected, gpointer data)
+                                       gboolean path_currently_selected, gpointer data)
 {
        return TRUE;
 }
@@ -941,7 +941,7 @@ static void vflist_setup_iter(ViewFileList *vfl, GtkTreeStore *store, GtkTreeIte
        if (fd->sidecar_files)
                sidecars = sidecar_file_data_list_to_string(fd);
        size = text_from_size(fd->size);
-       
+
        gtk_tree_store_set(store, iter, FILE_COLUMN_POINTER, fd,
                                        FILE_COLUMN_THUMB, (vfl->thumbs_enabled) ? fd->pixbuf : NULL,
                                        FILE_COLUMN_NAME, fd->name,
@@ -966,10 +966,10 @@ static void vflist_setup_iter_with_sidecars(ViewFileList *vfl, GtkTreeStore *sto
        vflist_setup_iter(vfl, store, iter, fd);
 
 
-       /* this is almost the same code as in vflist_populate_view 
+       /* this is almost the same code as in vflist_populate_view
           maybe it should be made more generic and used in both places */
-       
-       
+
+
        valid = gtk_tree_model_iter_children(GTK_TREE_MODEL(store), &s_iter, iter);
 
        work = fd->sidecar_files;
@@ -982,11 +982,11 @@ static void vflist_setup_iter_with_sidecars(ViewFileList *vfl, GtkTreeStore *sto
                while (!done)
                        {
                        FileData *old_sfd = NULL;
-            
+
                        if (valid)
                                {
                                gtk_tree_model_get(GTK_TREE_MODEL(store), &s_iter, FILE_COLUMN_POINTER, &old_sfd, -1);
-                               
+
                                if (sfd == old_sfd)
                                        {
                                        match = 0;
@@ -996,7 +996,7 @@ static void vflist_setup_iter_with_sidecars(ViewFileList *vfl, GtkTreeStore *sto
                                        match = filelist_sort_compare_filedata_full(sfd, old_sfd, SORT_NAME, TRUE);
                                        }
                                }
-                                       
+
                        else
                                {
                                match = -1;
@@ -1005,7 +1005,7 @@ static void vflist_setup_iter_with_sidecars(ViewFileList *vfl, GtkTreeStore *sto
                        if (match < 0)
                                {
                                GtkTreeIter new;
-                               
+
                                if (valid)
                                        {
                                        gtk_tree_store_insert_before(store, &new, iter, &s_iter);
@@ -1014,7 +1014,7 @@ static void vflist_setup_iter_with_sidecars(ViewFileList *vfl, GtkTreeStore *sto
                                        {
                                        gtk_tree_store_append(store, &new, iter);
                                        }
-                               
+
                                vflist_setup_iter(vfl, store, &new, sfd);
 
                                done = TRUE;
@@ -1066,9 +1066,9 @@ void vflist_sort_set(ViewFileList *vfl, SortType type, gint ascend)
        vfl->sort_ascend = ascend;
 
        vfl->list = filelist_sort(vfl->list, vfl->sort_method, vfl->sort_ascend);
-       
+
        new_order = g_malloc(i * sizeof(gint));
-       
+
        work = vfl->list;
        i = 0;
        while (work)
@@ -1078,10 +1078,10 @@ void vflist_sort_set(ViewFileList *vfl, SortType type, gint ascend)
                i++;
                work = work->next;
                }
-       
+
        store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vfl->listview)));
        gtk_tree_store_reorder(store, NULL, new_order);
-       
+
        g_free(new_order);
        g_hash_table_destroy(fd_idx_hash);
 }
@@ -1117,7 +1117,7 @@ static void vflist_thumb_cleanup(ViewFileList *vfl)
 
 static void vflist_thumb_stop(ViewFileList *vfl)
 {
-        if (vfl->thumbs_running) vflist_thumb_cleanup(vfl);
+       if (vfl->thumbs_running) vflist_thumb_cleanup(vfl);
 }
 
 static void vflist_thumb_do(ViewFileList *vfl, ThumbLoader *tl, FileData *fd)
@@ -1195,15 +1195,15 @@ static gint vflist_thumb_next(ViewFileList *vfl)
                while (work && !fd)
                        {
                        FileData *fd_p = work->data;
-                       if (!fd_p->pixbuf) 
+                       if (!fd_p->pixbuf)
                                fd = fd_p;
                        else
                                {
                                GList *work2 = fd_p->sidecar_files;
-                               
+
                                while (work2 && !fd)
                                        {
-                                       fd_p = work2->data; 
+                                       fd_p = work2->data;
                                        if (!fd_p->pixbuf) fd = fd_p;
                                        work2 = work2->next;
                                        }
@@ -1542,23 +1542,23 @@ void vflist_mark_to_selection(ViewFileList *vfl, gint mark, MarkToSelectionMode
        GtkTreeIter iter;
        GtkTreeSelection *selection;
        gint valid;
-       
+
        g_assert(mark >= 0 && mark < FILEDATA_MARKS_SIZE);
 
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(vfl->listview));
        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(vfl->listview));
-       
+
        valid = gtk_tree_model_get_iter_first(store, &iter);
        while (valid)
                {
                FileData *fd;
                gboolean mark_val, selected;
                gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &fd, -1);
-               
+
                mark_val = fd->marks[mark];
                selected = gtk_tree_selection_iter_is_selected(selection, &iter);
-               
-               switch (mode) 
+
+               switch (mode)
                        {
                        case MTS_MODE_SET: selected = mark_val;
                                break;
@@ -1569,7 +1569,7 @@ void vflist_mark_to_selection(ViewFileList *vfl, gint mark, MarkToSelectionMode
                        case MTS_MODE_MINUS: selected = !mark_val & selected;
                                break;
                        }
-               
+
                if (selected)
                        gtk_tree_selection_select_iter(selection, &iter);
                else
@@ -1599,7 +1599,7 @@ void vflist_selection_to_mark(ViewFileList *vfl, gint mark, SelectionToMarkMode
 
                gtk_tree_model_get_iter(store, &iter, tpath);
                gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &fd, -1);
-               
+
                switch (mode)
                        {
                        case STM_MODE_SET: fd->marks[mark] = 1;
@@ -1609,8 +1609,8 @@ void vflist_selection_to_mark(ViewFileList *vfl, gint mark, SelectionToMarkMode
                        case STM_MODE_TOGGLE: fd->marks[mark] = !fd->marks[mark];
                                break;
                        }
-                       
-               gtk_tree_store_set(GTK_TREE_STORE(store), &iter, FILE_COLUMN_MARKS + mark, fd->marks[mark], -1); 
+
+               gtk_tree_store_set(GTK_TREE_STORE(store), &iter, FILE_COLUMN_MARKS + mark, fd->marks[mark], -1);
 
                work = work->next;
                }
@@ -1687,11 +1687,11 @@ static void vflist_populate_view(ViewFileList *vfl)
                while (!done)
                        {
                        FileData *old_fd = NULL;
-            
+
                        if (valid)
                                {
                                gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &old_fd, -1);
-                               
+
                                if (fd == old_fd)
                                        {
                                        match = 0;
@@ -1703,7 +1703,7 @@ static void vflist_populate_view(ViewFileList *vfl)
                                                match = -1; /* probably should not happen*/
                                        }
                                }
-                                       
+
                        else
                                {
                                match = -1;
@@ -1712,7 +1712,7 @@ static void vflist_populate_view(ViewFileList *vfl)
                        if (match < 0)
                                {
                                GtkTreeIter new;
-                               
+
                                if (valid)
                                        {
                                        gtk_tree_store_insert_before(store, &new, NULL, &iter);
@@ -1875,18 +1875,18 @@ static void vflist_listview_mark_toggled(GtkCellRendererToggle *cell, gchar *pat
        FileData *fd;
        gboolean mark;
        guint col_idx;
+
        if (!path || !gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, path))
                return;
 
        col_idx = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(cell), "column_store_idx"));
-    
+
        g_assert(col_idx >= FILE_COLUMN_MARKS && col_idx <= FILE_COLUMN_MARKS_LAST);
-    
+
        gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &fd, col_idx, &mark, -1);
        mark = !mark;
        fd->marks[col_idx - FILE_COLUMN_MARKS] = mark;
-        
+
        gtk_tree_store_set(store, &iter, col_idx, mark, -1);
        gtk_tree_path_free(path);
 }
@@ -1897,7 +1897,7 @@ static void vflist_listview_add_column_toggle(ViewFileList *vfl, gint n, const g
        GtkCellRenderer *renderer;
        GtkTreeStore *store;
        gint index;
-    
+
        store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vfl->listview)));
 
        renderer = gtk_cell_renderer_toggle_new();
@@ -1906,12 +1906,12 @@ static void vflist_listview_add_column_toggle(ViewFileList *vfl, gint n, const g
        gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
        g_object_set_data (G_OBJECT (column), "column_store_idx", GUINT_TO_POINTER(n));
        g_object_set_data (G_OBJECT (renderer), "column_store_idx", GUINT_TO_POINTER(n));
+
        index = gtk_tree_view_append_column(GTK_TREE_VIEW(vfl->listview), column);
        gtk_tree_view_column_set_fixed_width(column, 16);
        gtk_tree_view_column_set_visible(column, vfl->marks_enabled);
 
-        
+
        g_signal_connect(G_OBJECT(renderer), "toggled", G_CALLBACK(vflist_listview_mark_toggled), store);
 }
 
@@ -1968,7 +1968,7 @@ ViewFileList *vflist_new(const gchar *path, gint thumbs)
 
        GType flist_types[FILE_COLUMN_COUNT];
        int i;
-    
+
        vfl = g_new0(ViewFileList, 1);
 
        vfl->path = NULL;
@@ -2006,7 +2006,7 @@ ViewFileList *vflist_new(const gchar *path, gint thumbs)
                flist_types[i] = G_TYPE_BOOLEAN;
 
        store = gtk_tree_store_newv(FILE_COLUMN_COUNT, flist_types);
-                               
+
        vfl->listview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
        g_object_unref(store);
 
@@ -2028,7 +2028,7 @@ ViewFileList *vflist_new(const gchar *path, gint thumbs)
        vflist_listview_add_column(vfl, FILE_COLUMN_SIZE, _("Size"), FALSE, TRUE, FALSE);
        vflist_listview_add_column(vfl, FILE_COLUMN_DATE, _("Date"), FALSE, TRUE, FALSE);
 
-            
+
        g_signal_connect(G_OBJECT(vfl->listview), "key_press_event",
                         G_CALLBACK(vflist_press_key_cb), vfl);
 
@@ -2036,13 +2036,13 @@ ViewFileList *vflist_new(const gchar *path, gint thumbs)
        gtk_widget_show(vfl->listview);
 
        vflist_dnd_init(vfl);
-    
+
        g_signal_connect(G_OBJECT(vfl->listview), "button_press_event",
                         G_CALLBACK(vflist_press_cb), vfl);
        g_signal_connect(G_OBJECT(vfl->listview), "button_release_event",
                         G_CALLBACK(vflist_release_cb), vfl);
-    
-    
+
+
        if (path) vflist_set_path(vfl, path);
 
        return vfl;
@@ -2074,24 +2074,24 @@ void vflist_thumb_set(ViewFileList *vfl, gint enable)
 void vflist_marks_set(ViewFileList *vfl, gint enable)
 {
        GList *columns, *work;
-    
+
        if (vfl->marks_enabled == enable) return;
 
        vfl->marks_enabled = enable;
-    
+
        columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(vfl->listview));
-       
+
        work = columns;
        while (work)
                {
                GtkTreeViewColumn *column = work->data;
                gint col_idx = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(column), "column_store_idx"));
                work = work->next;
-               
-               if (col_idx <= FILE_COLUMN_MARKS_LAST && col_idx >= FILE_COLUMN_MARKS)                                                                                             
+
+               if (col_idx <= FILE_COLUMN_MARKS_LAST && col_idx >= FILE_COLUMN_MARKS)
                        gtk_tree_view_column_set_visible(column, enable);
                }
-    
+
        g_list_free(columns);
        //vflist_refresh(vfl);
 }