Whitespaces cleanup.
authorLaurent Monin <geeqie@norz.org>
Mon, 25 Aug 2008 22:20:45 +0000 (22:20 +0000)
committerLaurent Monin <geeqie@norz.org>
Mon, 25 Aug 2008 22:20:45 +0000 (22:20 +0000)
37 files changed:
src/bar_info.c
src/bar_sort.c
src/cellrenderericon.c
src/compat.c
src/debug.c
src/editors.c
src/exif.c
src/exiv2.cc
src/filecache.c
src/filedata.c
src/format_canon.c
src/fullscreen.c
src/image-load.c
src/image-overlay.c
src/image.c
src/img-view.c
src/info.c
src/layout.c
src/layout_image.c
src/layout_util.c
src/lirc.c
src/main.c
src/pan-item.c
src/pixbuf-renderer.h
src/preferences.c
src/rcfile.c
src/remote.c
src/trash.c
src/typedefs.h
src/utilops.c
src/view_dir.c
src/view_dir_list.c
src/view_dir_tree.c
src/view_file.c
src/view_file_icon.c
src/view_file_list.c
src/window.c

index badd945..9da97a9 100644 (file)
@@ -273,7 +273,7 @@ static GList *remove_duplicate_strings_from_list(GList *list)
                        g_hash_table_insert(hashtable, (gpointer) key, GINT_TO_POINTER(1));
                        newlist = g_list_prepend(newlist, key);
                        }
-               work = work->next; 
+               work = work->next;
                }
 
        g_hash_table_destroy(hashtable);
@@ -434,7 +434,7 @@ gint comment_read(FileData *fd, GList **keywords, gchar **comment)
        res2 = comment_legacy_read(fd, &keywords2, &comment2);
 
        if (!res1 && !res2)
-               {
+               {
                return FALSE;
                }
 
index 102c592..5722f9d 100644 (file)
@@ -215,7 +215,7 @@ static void bar_sort_undo_folder(SortData *sd, GtkWidget *button)
                case BAR_SORT_COPY:
                        file_util_delete(file_data_new_simple(sd->undo_dest), NULL, button);
                        break;
-               default: 
+               default:
                        /* undo external command */
                        file_util_delete(file_data_new_simple(sd->undo_dest), NULL, button);
                        break;
@@ -286,7 +286,7 @@ static void bar_sort_bookmark_select_folder(SortData *sd, FileData *source, cons
                        list = NULL;
                        break;
                default:
-                       if (sd->action >= BAR_SORT_FILTER && sd->action < BAR_SORT_ACTION_COUNT) 
+                       if (sd->action >= BAR_SORT_FILTER && sd->action < BAR_SORT_ACTION_COUNT)
                                {
                                file_util_start_filter_from_filelist(sd->action - BAR_SORT_FILTER, list, path, sd->lw->window);
                                list = NULL;
index f712fa2..7ad8219 100644 (file)
@@ -262,7 +262,7 @@ gqv_cell_renderer_icon_class_init(GQvCellRendererIconClass *class)
                                                        0, 32,
                                                        0,
                                                        G_PARAM_READWRITE));
-       toggle_cell_signals[TOGGLED] = 
+       toggle_cell_signals[TOGGLED] =
                g_signal_new ("toggled",
                G_OBJECT_CLASS_TYPE (object_class),
                G_SIGNAL_RUN_LAST,
index ebe59c6..b2fdc52 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2008 The Geeqie Team
  *
  * Authors: Vladimir Nadvornik / Laurent Monin
- * 
+ *
  * This software is released under the GNU General Public License (GNU GPL).
  * Please read the included file COPYING for more information.
  * This software comes with no warranty of any kind, use at your own risk!
index 8548b49..c3858a2 100644 (file)
@@ -55,7 +55,7 @@ gint get_debug_level(void)
 
 void set_debug_level(gint new_level)
 {
-       debug_level = CLAMP(new_level, DEBUG_LEVEL_MIN, DEBUG_LEVEL_MAX);       
+       debug_level = CLAMP(new_level, DEBUG_LEVEL_MIN, DEBUG_LEVEL_MAX);
 }
 
 void debug_level_add(gint delta)
index 5011dd3..fa68ac1 100644 (file)
@@ -832,7 +832,7 @@ gboolean is_valid_editor_command(gint n)
 {
        return (n >= 0 && n < GQ_EDITOR_SLOTS
                && options->editor[n].command
-               && strlen(options->editor[n].command) > 0); 
+               && strlen(options->editor[n].command) > 0);
 }
 
 gint start_editor_from_filelist_full(gint n, GList *list, EditorCallback cb, gpointer data)
index 444af80..f1d5b5c 100644 (file)
@@ -1250,7 +1250,7 @@ ExifItem *exif_get_item(ExifData *exif, const gchar *key)
 
        work = exif->items;
        while (work)
-               {
+               {
                ExifItem *item;
 
                item = work->data;
index b49c61f..af562b6 100644 (file)
@@ -47,7 +47,7 @@
 
 
 extern "C" {
-#include <glib.h> 
+#include <glib.h>
 
 #include "main.h"
 #include "exif.h"
@@ -107,7 +107,7 @@ struct _ExifData
                        io.munmap();
                        if (!open) io.close();
                        }
-#endif         
+#endif
        }
        
        ~_ExifData()
@@ -255,20 +255,20 @@ ExifItem *exif_get_first_item(ExifData *exif)
 #if EXIV2_TEST_VERSION(0,16,0)
                exif->xmpIter = exif->xmpData().begin();
 #endif
-               if (exif->exifIter != exif->exifData().end()) 
+               if (exif->exifIter != exif->exifData().end())
                        {
                        const Exiv2::Metadatum *item = &*exif->exifIter;
                        exif->exifIter++;
                        return (ExifItem *)item;
                        }
-               if (exif->iptcIter != exif->iptcData().end()) 
+               if (exif->iptcIter != exif->iptcData().end())
                        {
                        const Exiv2::Metadatum *item = &*exif->iptcIter;
                        exif->iptcIter++;
                        return (ExifItem *)item;
                        }
 #if EXIV2_TEST_VERSION(0,16,0)
-               if (exif->xmpIter != exif->xmpData().end()) 
+               if (exif->xmpIter != exif->xmpData().end())
                        {
                        const Exiv2::Metadatum *item = &*exif->xmpIter;
                        exif->xmpIter++;
@@ -386,7 +386,7 @@ invalidTypeId, unsignedByte, asciiString, unsignedShort,
   signedShort, signedLong, signedRational, string,
   date, time, comment, directory,
   xmpText, xmpAlt, xmpBag, xmpSeq,
-  langAlt, lastTypeId 
+  langAlt, lastTypeId
 */
 
 static guint format_id_trans_tbl [] = {
@@ -482,10 +482,10 @@ gchar *exif_item_get_string(ExifItem *item, int idx)
                std::string str = em->toString(); // FIXME
 #endif
                if (idx == 0 && str == "") str = em->toString();
-               if (str.length() > 5 && str.substr(0, 5) == "lang=") 
+               if (str.length() > 5 && str.substr(0, 5) == "lang=")
                        {
-                       std::string::size_type pos = str.find_first_of(' ');
-                       if (pos != std::string::npos) str = str.substr(pos+1);
+                       std::string::size_type pos = str.find_first_of(' ');
+                       if (pos != std::string::npos) str = str.substr(pos+1);
                        }
 
                return g_strdup(str.c_str());
@@ -573,7 +573,7 @@ int exif_item_delete(ExifData *exif, ExifItem *item)
                                return 1;
                        }
                }
-#endif         
+#endif
                return 0;
        }
        catch (Exiv2::AnyError& e) {
@@ -605,19 +605,19 @@ unsigned char *exif_get_color_profile(ExifData *exif, guint *data_len)
 
 }
 
-/* This is a dirty hack to support raw file preview, bassed on 
+/* This is a dirty hack to support raw file preview, bassed on
 tiffparse.cpp from Exiv2 examples */
 
 class RawFile {
        public:
-    
+
        RawFile(int fd);
        ~RawFile();
-    
+
        const Exiv2::Value *find(uint16_t tag, uint16_t group);
-    
+
        unsigned long preview_offset();
-    
+
        private:
        int type;
        Exiv2::TiffComponent::AutoPtr rootDir;
@@ -664,8 +664,8 @@ RawFile::RawFile(int fd) : map_data(NULL), map_len(0), offset(0)
 #endif
 #if EXIV2_TEST_VERSION(0,13,0)
                case Exiv2::ImageType::raf:
-                       if (map_len < 84 + 4) throw Error(14);
-                       offset = getULong(map_data + 84, bigEndian);
+                       if (map_len < 84 + 4) throw Error(14);
+                       offset = getULong(map_data + 84, bigEndian);
                        return;
 #endif
                case Exiv2::ImageType::crw:
@@ -673,7 +673,7 @@ RawFile::RawFile(int fd) : map_data(NULL), map_len(0), offset(0)
                        // Parse the image, starting with a CIFF header component
                        Exiv2::CiffHeader::AutoPtr parseTree(new Exiv2::CiffHeader);
                        parseTree->read(map_data, map_len);
-                       CiffComponent *entry = parseTree->findComponent(0x2007, 0); 
+                       CiffComponent *entry = parseTree->findComponent(0x2007, 0);
                        if (entry) offset =  entry->pData() - map_data;
                        return;
                        }
@@ -688,7 +688,7 @@ RawFile::RawFile(int fd) : map_data(NULL), map_len(0), offset(0)
 
        rootDir = createFct(Tag::root, Group::none);
        if (0 == rootDir.get()) {
-               throw Error(1, "No root element defined in TIFF structure");
+               throw Error(1, "No root element defined in TIFF structure");
        }
        
        if (tiffHeader)
@@ -709,15 +709,15 @@ RawFile::RawFile(int fd) : map_data(NULL), map_len(0), offset(0)
        TiffRwState::AutoPtr state(new TiffRwState(tiffHeader ? tiffHeader->byteOrder() : littleEndian, 0, createFct));
 
        TiffReader reader(map_data,
-                      map_len,
-                      rootDir.get(),
-                      state);
+                         map_len,
+                         rootDir.get(),
+                         state);
 
        rootDir->accept(reader);
        
-       if (tiffHeader) 
+       if (tiffHeader)
                delete tiffHeader;
-       if (cr2Header) 
+       if (cr2Header)
                delete cr2Header;
 }
 
@@ -752,7 +752,7 @@ unsigned long RawFile::preview_offset(void)
                {
                val = find(0x111, Group::ifd0);
                if (val) return val->toLong();
-    
+
                return 0;
                }
        
@@ -761,7 +761,7 @@ unsigned long RawFile::preview_offset(void)
 
        val = find(0x201, Group::ifd0);
        if (val) return val->toLong();
-    
+
        val = find(0x201, Group::ignr); // for PEF files, originally it was probably ifd2
        if (val) return val->toLong();
 
@@ -809,5 +809,5 @@ extern "C" gint format_raw_img_exif_offsets_fd(int fd, const gchar *path,
 }
 
 
-#endif 
+#endif
 /* HAVE_EXIV2 */
index 008a654..582a4b8 100644 (file)
@@ -90,7 +90,7 @@ void file_cache_set_size(FileCacheData *fc, gulong size)
                {
                GList *prev;
                last_fe = work->data;
-               prev = work->prev; 
+               prev = work->prev;
                fc->list = g_list_delete_link(fc->list, work);
                work = prev;
                
@@ -146,7 +146,7 @@ static void file_cache_remove_fd(FileCacheData *fc, FileData *fd)
                {
                GList *current = work;
                fe = work->data;
-               work = work->next; 
+               work = work->next;
 
                if (fe->fd == fd)
                        {
index 2b11f8d..3692df4 100644 (file)
@@ -1052,8 +1052,8 @@ GList *filelist_recursive(FileData *dir_fd)
 /*
  * marks and orientation
  */
+
+
 gboolean file_data_get_mark(FileData *fd, gint n)
 {
        return !!(fd->marks & (1 << n));
@@ -1154,16 +1154,16 @@ gchar *file_data_sc_list_to_string(FileData *fd)
 }
 
 
-                               
-/* 
- * add FileDataChangeInfo (see typedefs.h) for the given operation 
+
+/*
+ * add FileDataChangeInfo (see typedefs.h) for the given operation
  * uses file_data_add_change_info
  *
  * fails if the fd->change already exists - change operations can't run in parallel
  * fd->change_info works as a lock
  *
  * dest can be NULL - in this case the current name is used for now, it will
- * be changed later 
+ * be changed later
  */
 
 /*
@@ -1174,7 +1174,7 @@ gchar *file_data_sc_list_to_string(FileData *fd)
             extension should remain (FIXME should we allow editing extension? it will make problems wth grouping)
            sidecar names are changed too, extensions are not changed
    DELETE
-   UPDATE - file size, date or grouping has been changed 
+   UPDATE - file size, date or grouping has been changed
 */
 
 gboolean file_data_add_ci(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest)
@@ -1202,7 +1202,7 @@ gboolean file_data_add_ci(FileData *fd, FileDataChangeType type, const gchar *sr
 
 static void file_data_planned_change_remove(FileData *fd)
 {
-       if (file_data_planned_change_hash && 
+       if (file_data_planned_change_hash &&
            (fd->change->type == FILEDATA_CHANGE_MOVE || fd->change->type == FILEDATA_CHANGE_RENAME))
                {
                if (g_hash_table_lookup(file_data_planned_change_hash, fd->change->dest) == fd)
@@ -1219,7 +1219,7 @@ static void file_data_planned_change_remove(FileData *fd)
                        }
                }
 }
+
 
 void file_data_free_ci(FileData *fd)
 {
@@ -1238,7 +1238,7 @@ void file_data_free_ci(FileData *fd)
        fd->change = NULL;
 }
 
+
 static gboolean file_data_sc_add_ci(FileData *fd, FileDataChangeType type)
 {
        GList *work;
@@ -1267,7 +1267,7 @@ static gboolean file_data_sc_add_ci(FileData *fd, FileDataChangeType type)
                work = work->next;
                }
                
-       return TRUE;    
+       return TRUE;
 }
 
 static gboolean file_data_sc_check_ci(FileData *fd, FileDataChangeType type)
@@ -1382,7 +1382,7 @@ static gboolean file_data_sc_add_ci_list_call_func(GList *fd_list, const gchar *
                {
                FileData *fd = work->data;
                
-               if (!func(fd, dest)) 
+               if (!func(fd, dest))
                        {
                        file_data_sc_revert_ci_list(work->prev);
                        return FALSE;
@@ -1427,7 +1427,7 @@ void file_data_sc_free_ci_list(GList *fd_list)
                }
 }
 
-/* 
+/*
  * update existing fd->change, it will be used from dialog callbacks for interactive editing
  * fails if fd->change does not exist or the change type does not match
  */
@@ -1496,7 +1496,7 @@ static void file_data_sc_update_ci(FileData *fd, const gchar *dest_path)
        
        if (fd->parent) fd = fd->parent;
        
-       if (!dest_path) 
+       if (!dest_path)
                {
                dest_path = fd->path;
                }
@@ -1603,7 +1603,7 @@ gint file_data_verify_ci(FileData *fd)
        if (!fd->change)
                {
                DEBUG_1("Change checked: no change info: %s", fd->path);
-               return ret; 
+               return ret;
                }
 
        if (!isname(fd->path))
@@ -1611,26 +1611,26 @@ gint file_data_verify_ci(FileData *fd)
                /* this probably should not happen */
                ret |= CHANGE_NO_SRC;
                DEBUG_1("Change checked: file does not exist: %s", fd->path);
-               return ret; 
+               return ret;
                }
                
        dir = remove_level_from_path(fd->path);
        
-       if (fd->change->type != FILEDATA_CHANGE_DELETE && 
+       if (fd->change->type != FILEDATA_CHANGE_DELETE &&
            !access_file(fd->path, R_OK))
                {
                ret |= CHANGE_NO_READ_PERM;
                DEBUG_1("Change checked: no read permission: %s", fd->path);
                }
        else if ((fd->change->type == FILEDATA_CHANGE_DELETE || fd->change->type == FILEDATA_CHANGE_MOVE) &&
-           !access_file(dir, W_OK))
+                !access_file(dir, W_OK))
                {
                ret |= CHANGE_NO_WRITE_PERM_DIR;
                DEBUG_1("Change checked: source dir is readonly: %s", fd->path);
                }
-       else if (fd->change->type != FILEDATA_CHANGE_COPY && 
-                fd->change->type != FILEDATA_CHANGE_UNSPECIFIED && 
-                !access_file(fd->path, W_OK)) 
+       else if (fd->change->type != FILEDATA_CHANGE_COPY &&
+                fd->change->type != FILEDATA_CHANGE_UNSPECIFIED &&
+                !access_file(fd->path, W_OK))
                {
                ret |= CHANGE_WARN_NO_WRITE_PERM;
                DEBUG_1("Change checked: no write permission: %s", fd->path);
@@ -1665,7 +1665,7 @@ gint file_data_verify_ci(FileData *fd)
 
                dest_dir = remove_level_from_path(fd->change->dest);
 
-               if (!isdir(dest_dir))           
+               if (!isdir(dest_dir))
                        {
                        ret |= CHANGE_NO_DEST_DIR;
                        DEBUG_1("Change checked: destination dir does not exist: %s -> %s", fd->path, fd->change->dest);
@@ -1707,7 +1707,7 @@ gint file_data_verify_ci(FileData *fd)
        return ret;
 }
 
+
 gint file_data_sc_verify_ci(FileData *fd)
 {
        GList *work;
@@ -1804,7 +1804,7 @@ gint file_data_sc_verify_ci_list(GList *list, gchar **desc)
 {
        GList *work;
        gint all_errors = 0;
-       gint common_errors = ~0; 
+       gint common_errors = ~0;
        gint num;
        gint *errors;
        gint i;
@@ -1875,11 +1875,11 @@ gint file_data_sc_verify_ci_list(GList *list, gchar **desc)
 
 /*
  * perform the change described by FileFataChangeInfo
- * it is used for internal operations, 
+ * it is used for internal operations,
  * this function actually operates with files on the filesystem
  * it should implement safe delete
  */
+
 static gboolean file_data_perform_move(FileData *fd)
 {
        g_assert(!strcmp(fd->change->source, fd->path));
@@ -2000,7 +2000,7 @@ gint file_data_sc_apply_ci(FileData *fd)
 /*
  * notify other modules about the change described by FileFataChangeInfo
  */
+
 /* might use file_maint_ functions for now, later it should be changed to a system of callbacks
    FIXME do we need the ignore_list? It looks like a workaround for ineffective
    implementation in view_file_list.c */
index 8cbb3b2..88bfef3 100644 (file)
@@ -524,7 +524,7 @@ EXIF_MARKER_LIST_END
 #endif
 
 static ExifMarker CanonExifMarkersList[] = {
-       { 1,    EXIF_FORMAT_SHORT_UNSIGNED, -1, "MkN.Canon.Settings1",          NULL, NULL },
+       { 1,    EXIF_FORMAT_SHORT_UNSIGNED, -1, "MkN.Canon.Settings1",          NULL, NULL },
        { 4,    EXIF_FORMAT_SHORT_UNSIGNED, -1, "MkN.Canon.Settings2",          NULL, NULL },
        { 6,    EXIF_FORMAT_STRING, -1,         "MkN.Canon.ImageType",          "Image type", NULL },
        { 7,    EXIF_FORMAT_STRING, -1,         "MkN.Canon.FirmwareVersion",    "Firmware version", NULL },
index 27e13f2..d84a5d2 100644 (file)
@@ -367,7 +367,7 @@ GList *fullscreen_prefs_list(void)
        display = gdk_display_get_default();
        number = gdk_display_get_n_screens(display);
 
-       for (i = 0; i < number ; i++)
+       for (i = 0; i < number; i++)
                {
                GdkScreen *screen;
                gint monitors;
index 7f533be..31a64c9 100644 (file)
@@ -71,7 +71,7 @@ static void image_loader_area_prepared_cb(GdkPixbufLoader *loader, gpointer data
        
        /* a workaround for http://bugzilla.gnome.org/show_bug.cgi?id=547669 */
        gchar *format = gdk_pixbuf_format_get_name(gdk_pixbuf_loader_get_format(loader));
-       if (strcmp(format, "svg") == 0) 
+       if (strcmp(format, "svg") == 0)
                {
                g_free(format);
                return;
index f439387..1280b44 100644 (file)
@@ -185,7 +185,7 @@ static gchar *keywords_to_string(FileData *fd)
                        {
                        gchar *kw = work->data;
                        work = work->next;
-                                       
+                       
                        if (!kw) continue;
                        if (!kwstr)
                                kwstr = g_string_new("");
@@ -278,7 +278,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                        }
                else
                        {
-                       /* 
+                       /*
                           keywords and comment can't be read between exif_read_fd and exif_free_fd calls
                           because fd->exif does not count references
                           on the other hand, it is OK to call it in the loop because it is cached
@@ -315,7 +315,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                                {
                                /* Display data between left and right parts of extra string
                                 * the data is expressed by a '*' character. A '*' may be escaped
-                                * by a \. You should escape all '*' characters, do not rely on the 
+                                * by a \. You should escape all '*' characters, do not rely on the
                                 * current implementation which only replaces the first unescaped '*'.
                                 * If no "*" is present, the extra string is just appended to data string.
                                 * Pango mark up is accepted in left and right parts.
@@ -361,7 +361,7 @@ static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *v
                                data = new_data;
                                }
                        g_free(extra);
-                       }       
+                       }
 
                g_string_erase(new, pos, end-start+1);
                if (data && *data)
@@ -448,7 +448,7 @@ static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
        gchar *text;
        GdkPixbuf *imgpixbuf = NULL;
        gboolean with_hist;
-               ImageWindow *imd = osd->imd;
+       ImageWindow *imd = osd->imd;
        FileData *fd = image_get_fd(imd);
 
        if (!fd) return NULL;
@@ -516,7 +516,7 @@ static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
                osd_template_insert(vars, "number", g_strdup_printf("%d", n), OSDT_NO_DUP);
                osd_template_insert(vars, "total", g_strdup_printf("%d", t), OSDT_NO_DUP);
                osd_template_insert(vars, "name", (gchar *) name, OSDT_NONE);
-               osd_template_insert(vars, "date", imd->image_fd ? ((gchar *) text_from_time(imd->image_fd->date)) : "", OSDT_NONE);
+               osd_template_insert(vars, "date", imd->image_fd ? ((gchar *) text_from_time(imd->image_fd->date)) : "", OSDT_NONE);
                osd_template_insert(vars, "size", imd->image_fd ? (text_from_size_abrev(imd->image_fd->size)) : g_strdup(""), OSDT_FREE);
                osd_template_insert(vars, "zoom", image_zoom_get_as_text(imd), OSDT_FREE);
        
@@ -577,7 +577,7 @@ static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
                        for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++)
                                {
                                g_string_append_printf(buf, file_data_get_mark(fd, mark) ? " <span background='#FF00FF'>%c</span>" : " %c", '1' + mark);
-                               }
+                               }
 
                        if (*text)
                                text2 = g_strdup_printf("%s\n%s", text, buf->str);
@@ -588,7 +588,7 @@ static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
                        text = text2;
                        }
 
-               if (with_hist)
+               if (with_hist)
                        {
                        gchar *escaped_histogram_label = g_markup_escape_text(histogram_label(osd->histogram), -1);
                        if (*text)
index 7585c7b..29f4f07 100644 (file)
@@ -1356,7 +1356,7 @@ static void image_notify_cb(FileData *fd, NotifyType type, gpointer data)
        ImageWindow *imd = data;
 
        if (!imd || !image_get_pixbuf(imd) ||
-           /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */ 
+           /* imd->il || */ /* loading in progress - do not check - it should start from the beginning anyway */
            !imd->image_fd || /* nothing to reload */
            imd->state == IMAGE_STATE_NONE /* loading not started, no need to reload */
            ) return;
index 67492f3..d16b670 100644 (file)
@@ -967,7 +967,7 @@ void view_window_new(FileData *fd)
                        }
                }
        else if (isdir(fd->path) && filelist_read(fd, &list, NULL))
-               {       
+               {
                list = filelist_sort_path(list);
                list = filelist_filter(list, FALSE);
                real_view_window_new(NULL, list, NULL, NULL);
index 720bf76..80f5d19 100644 (file)
@@ -97,7 +97,7 @@ static void info_tab_exif_image(InfoData *id, gpointer data)
                fd = NULL;
                }
        else
-                       {
+               {
                fd = id->image->image_fd;
                }
 
index 503d540..5e607f5 100644 (file)
@@ -1838,7 +1838,7 @@ void layout_free(LayoutWindow *lw)
 
        file_data_unregister_notify_func(layout_image_notify_cb, lw);
 
-       if (lw->dir_fd) 
+       if (lw->dir_fd)
                {
                file_data_unregister_real_time_monitor(lw->dir_fd);
                file_data_unref(lw->dir_fd);
index b69c14f..622f4a1 100644 (file)
@@ -970,14 +970,14 @@ void layout_image_set_index(LayoutWindow *lw, gint index)
                read_ahead_fd = layout_list_get_fd(lw, index + 1);
                }
 
-       if (layout_selection_count(lw, 0) > 1)
+       if (layout_selection_count(lw, 0) > 1)
                {
-               GList *x = layout_selection_list_by_index(lw);
-               GList *y;
-               GList *last;
+               GList *x = layout_selection_list_by_index(lw);
+               GList *y;
+               GList *last;
 
-               for (last = y = x; y; y = y->next)
-                       last = y;
+               for (last = y = x; y; y = y->next)
+                       last = y;
                for (y = x; y && (GPOINTER_TO_INT(y->data)) != index; y = y->next)
                        ;
 
@@ -986,7 +986,7 @@ void layout_image_set_index(LayoutWindow *lw, gint index)
                        gint newindex;
 
                        if ((index > old && (index != GPOINTER_TO_INT(last->data) || old != GPOINTER_TO_INT(x->data)))
-                           || (old == GPOINTER_TO_INT(last->data) && index == GPOINTER_TO_INT(x->data)))
+                           || (old == GPOINTER_TO_INT(last->data) && index == GPOINTER_TO_INT(x->data)))
                                {
                                if (y->next)
                                        newindex = GPOINTER_TO_INT(y->next->data);
@@ -999,7 +999,7 @@ void layout_image_set_index(LayoutWindow *lw, gint index)
                                        newindex = GPOINTER_TO_INT(y->prev->data);
                                else
                                        newindex = GPOINTER_TO_INT(last->data);
-                               }
+                               }
 
                        read_ahead_fd = layout_list_get_fd(lw, newindex);
                        }
index 30924e9..dc1772b 100644 (file)
@@ -110,7 +110,7 @@ gint layout_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
 
 /*
        if (event->type == GDK_KEY_PRESS && lw->full_screen &&
-           gtk_accel_groups_activate(G_OBJECT(lw->window), event->keyval, event->state))
+           gtk_accel_groups_activate(G_OBJECT(lw->window), event->keyval, event->state))
                return TRUE;
 */
 
index be44746..39bd084 100644 (file)
@@ -209,7 +209,7 @@ void layout_image_lirc_init(LayoutWindow *lw)
                }
        gio_chan = g_io_channel_unix_new(lirc_fd);
        input_tag = g_io_add_watch(gio_chan, G_IO_IN,
-                                  lirc_input_callback, lw);
+                                  lirc_input_callback, lw);
        fcntl(lirc_fd, F_SETOWN, getpid());
        flags = fcntl(lirc_fd, F_GETFL, 0);
        if (flags != -1) fcntl(lirc_fd, F_SETFL, flags|O_NONBLOCK);
index 45504f1..d62b142 100644 (file)
@@ -78,7 +78,7 @@ gint utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive)
 
        if (!case_sensitive)
                {
-               s1_t = g_utf8_casefold(s1, -1); 
+               s1_t = g_utf8_casefold(s1, -1);
                s2_t = g_utf8_casefold(s2, -1);
                }
 
@@ -113,17 +113,17 @@ gchar *expand_tilde(const gchar *filename)
                return g_strdup(filename);
 
        notilde = filename + 1;
-       slash = strchr(notilde, G_DIR_SEPARATOR);
+       slash = strchr(notilde, G_DIR_SEPARATOR);
        if (slash == notilde || !*notilde)
                {
                home = g_get_home_dir();
                if (!home)
                        return g_strdup(filename);
-               }
-       else
+               }
+       else
                {
                gchar *username;
-               struct passwd *passwd;
+               struct passwd *passwd;
 
                if (slash)
                        username = g_strndup(notilde, slash - notilde);
@@ -680,7 +680,7 @@ int main(int argc, char *argv[])
        bind_textdomain_codeset(PACKAGE, "UTF-8");
        textdomain(PACKAGE);
 #endif
-    
+
        /* setup random seed for random slideshow */
        srand(time(NULL));
 
index cd3c147..577ffc4 100644 (file)
@@ -797,7 +797,7 @@ GList *pan_item_find_by_fd(PanWindow *pw, PanItemType type, FileData *fd,
                             gint ignore_case, gint partial)
 {
        if (!fd) return NULL;
-       return pan_item_find_by_path(pw, type, fd->path, ignore_case, partial); 
+       return pan_item_find_by_path(pw, type, fd->path, ignore_case, partial);
 }
 
 
index e169029..053689b 100644 (file)
@@ -240,7 +240,7 @@ void pixbuf_renderer_set_color(PixbufRenderer *pr, GdkColor *color);
 
 /* overlay */
 typedef enum {
-       OVL_NORMAL      = 0, 
+       OVL_NORMAL      = 0,
        OVL_RELATIVE    = 1 << 0, /* x,y coordinates are relative, negative values start bottom right */
        /* OVL_HIDE_ON_SCROLL = 1 << 1*/ /* hide temporarily when scrolling (not yet implemented) */
 } OverlayRendererFlags;
index 8b072b9..7249f4d 100644 (file)
@@ -726,7 +726,7 @@ static void filter_remove_cb(GtkWidget *widget, gpointer data)
        FilterEntry *fe;
 
        if (!filter_store) return;
-               selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view));
+       selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(filter_view));
        if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) return;
        gtk_tree_model_get(GTK_TREE_MODEL(filter_store), &iter, 0, &fe, -1);
        if (!fe) return;
index 3e30d87..d292e16 100644 (file)
@@ -167,7 +167,7 @@ static void write_int_option(SecureSaveInfo *ssi, gchar *label, gint n)
 }
 
 static gboolean read_int_option(FILE *f, gchar *option, gchar *label, gchar *value, gint *n)
-{      
+{
        if (g_ascii_strcasecmp(option, label) != 0) return FALSE;
        if (!n) return FALSE;
 
@@ -882,7 +882,7 @@ static gboolean load_options_from(const gchar *utf8_path, ConfOptions *options)
                READ_UINT(histogram.last_log_mode);
 
                /* image overlay */
-               COMPAT_READ_UINT(image_overlay.common.enabled, image_overlay.common.state); /* 2008-05-12 */ 
+               COMPAT_READ_UINT(image_overlay.common.enabled, image_overlay.common.state); /* 2008-05-12 */
                READ_UINT(image_overlay.common.state);
                COMPAT_READ_BOOL(fullscreen.show_info, image_overlay.common.show_at_startup); /* 2008-04-21 */
                READ_BOOL(image_overlay.common.show_at_startup);
index 8ae077e..9547a7e 100644 (file)
@@ -516,7 +516,7 @@ static void gr_list_clear(const gchar *text, gpointer data)
                collection_unref(remote_data->command_collection);
                remote_data->command_collection = NULL;
                }
-}              
+}
 
 static void gr_list_add(const gchar *text, gpointer data)
 {
index ba4ab52..35a9573 100644 (file)
@@ -37,8 +37,8 @@ static gint file_util_safe_number(gint64 free_space)
        gint warned = FALSE;
        FileData *dir_fd;
 
-       dir_fd = file_data_new_simple(options->file_ops.safe_delete_path);
-       if (!filelist_read(dir_fd, &list, NULL)) 
+       dir_fd = file_data_new_simple(options->file_ops.safe_delete_path);
+       if (!filelist_read(dir_fd, &list, NULL))
                {
                file_data_unref(dir_fd);
                return 0;
index ff06387..9cda6aa 100644 (file)
@@ -370,7 +370,7 @@ struct _ImageWindow
        gint unknown;           /* failed to load image */
 
        ImageLoader *il;        /* FIXME - image loader should probably go to FileData, but it must first support
-                                  sending callbacks to multiple ImageWindows in parallel */
+                                  sending callbacks to multiple ImageWindows in parallel */
 
        gint has_frame;
 
@@ -465,7 +465,7 @@ struct _FileData {
        GdkPixbuf *thumb_pixbuf;
 
        GdkPixbuf *pixbuf; /* full-size image, only complete images, NULL during loading
-                             all FileData with non-NULL pixbuf are referenced by image_cache */
+                             all FileData with non-NULL pixbuf are referenced by image_cache */
 
        gint ref;
        gint version; /* increased when any field in this structure is changed */
index 1bee25a..fce6189 100644 (file)
@@ -533,7 +533,7 @@ static gint file_util_perform_ci_cb(gpointer resume_data, gint flags, GList *lis
        while (list)  /* be careful, file_util_perform_ci_internal can pass ud->flist as list */
                {
                FileData *fd = list->data;
-               list = list->next; 
+               list = list->next;
 
                if (!(flags & EDITOR_ERROR_MASK)) /* files were successfully deleted, call the maint functions */
                        {
@@ -558,7 +558,7 @@ static gint file_util_perform_ci_cb(gpointer resume_data, gint flags, GList *lis
 /*
  * Perform the operation described by FileDataChangeInfo on all files in the list
  * it is an alternative to start_editor_from_filelist_full, it should use similar interface
- */ 
+ */
 
 
 static void file_util_perform_ci_internal(UtilityData *ud)
@@ -824,24 +824,24 @@ static GdkPixbuf *file_util_get_error_icon(FileData *fd, GtkWidget *widget)
        
        if (!pb_warning)
                {
-               pb_warning = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU, NULL); 
+               pb_warning = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU, NULL);
                }
 
        if (!pb_error)
                {
-               pb_error = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU, NULL); 
+               pb_error = gtk_widget_render_icon(widget, GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU, NULL);
                }
 
        if (!pb_apply)
                {
-               pb_apply = gtk_widget_render_icon(widget, GTK_STOCK_APPLY, GTK_ICON_SIZE_MENU, NULL); 
+               pb_apply = gtk_widget_render_icon(widget, GTK_STOCK_APPLY, GTK_ICON_SIZE_MENU, NULL);
                }
        
        error = file_data_sc_verify_ci(fd);
        
        if (!error) return pb_apply;
 
-       if (error & CHANGE_ERROR_MASK) 
+       if (error & CHANGE_ERROR_MASK)
                {
                return pb_error;
                }
@@ -1100,10 +1100,10 @@ static void file_util_rename_preview_update(UtilityData *ud)
                        
                        gtk_tree_model_get(store, &iter, UTILITY_COLUMN_FD, &fd, -1);
                        file_data_sc_update_ci_rename(fd, dest);
-                       gtk_list_store_set(GTK_LIST_STORE(store), &iter, 
+                       gtk_list_store_set(GTK_LIST_STORE(store), &iter,
                                           UTILITY_COLUMN_PIXBUF, file_util_get_error_icon(fd, ud->listview),
-                                          UTILITY_COLUMN_DEST_PATH, fd->change->dest,
-                                          UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest),
+                                          UTILITY_COLUMN_DEST_PATH, fd->change->dest,
+                                          UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest),
                                           -1);
                        }
                return;
@@ -1144,7 +1144,7 @@ static void file_util_rename_preview_update(UtilityData *ud)
                        }
 
                file_data_sc_update_ci_rename(fd, dest);
-               gtk_list_store_set(GTK_LIST_STORE(store), &iter, 
+               gtk_list_store_set(GTK_LIST_STORE(store), &iter,
                                   UTILITY_COLUMN_PIXBUF, file_util_get_error_icon(fd, ud->listview),
                                   UTILITY_COLUMN_DEST_PATH, fd->change->dest,
                                   UTILITY_COLUMN_DEST_NAME, filename_from_path(fd->change->dest),
@@ -1285,7 +1285,7 @@ static void file_util_dialog_init_dest_folder(UtilityData *ud)
        GtkWidget *label;
        const gchar *stock_id;
 
-       if (ud->type == UTILITY_TYPE_COPY) 
+       if (ud->type == UTILITY_TYPE_COPY)
                {
                stock_id = GTK_STOCK_COPY;
                }
@@ -1900,7 +1900,7 @@ static void file_util_delete_dir_full(FileData *fd, GtkWidget *parent, UtilityPh
                ud->messages.question = _("Delete symbolic link?");
                ud->messages.desc_flist = "";
                ud->messages.desc_source_fd = _("This will delete the symbolic link.\n"
-                                               "The folder this link points to will not be deleted.");
+                                               "The folder this link points to will not be deleted.");
                ud->messages.fail = _("Link deletion failed");
 
                file_util_dialog_run(ud);
@@ -1972,7 +1972,7 @@ static void file_util_delete_dir_full(FileData *fd, GtkWidget *parent, UtilityPh
                ud->messages.question = _("Delete folder?");
                ud->messages.desc_flist = _("The folder contains these files:");
                ud->messages.desc_source_fd = _("This will delete the folder.\n"
-                                               "The contents of this folder will also be deleted.");
+                                               "The contents of this folder will also be deleted.");
                ud->messages.fail = _("File deletion failed");
                
                if (!file_util_delete_dir_prepare(ud, flist, dlist))
@@ -2078,7 +2078,7 @@ static gboolean file_util_rename_dir_prepare(UtilityData *ud, const char *new_pa
                }
 
        return ok;
-}      
+}
        
 
 static void file_util_rename_dir_full(FileData *fd, const char *new_path, GtkWidget *parent, UtilityPhase phase)
@@ -2125,7 +2125,7 @@ static void file_util_create_dir_full(FileData *fd, const char *dest_path, GtkWi
        ud->content_list = NULL;
        ud->parent = parent;
 
-       if (dest_path) 
+       if (dest_path)
                {
                ud->dest_path = g_strdup(dest_path);
                }
index 899cfb7..1ff4d7f 100644 (file)
@@ -637,7 +637,7 @@ GtkWidget *vd_pop_menu(ViewDir *vd, FileData *fd)
                                      G_CALLBACK(vd_pop_menu_delete_cb), vd);
 
        if (options->show_copy_path)
-               menu_item_add(menu, _("_Copy path"), 
+               menu_item_add(menu, _("_Copy path"),
                              G_CALLBACK(vd_pop_menu_copy_path_cb), vd);
 
        menu_item_add_divider(menu);
@@ -1082,7 +1082,7 @@ static void vd_notify_cb(FileData *fd, NotifyType type, gpointer data)
                if (vd_find_row(vd, base_fd, &iter))
                        {
                        vdtree_populate_path_by_iter(vd, &iter, TRUE, vd->dir_fd);
-                       } 
+                       }
 
                file_data_unref(base_fd);
                }
index 29ca17b..f188902 100644 (file)
@@ -228,7 +228,7 @@ static gint vdlist_populate(ViewDir *vd, gboolean clear)
                                        }
                                else
                                        {
-                                       match = filelist_sort_compare_filedata_full(fd, old_fd, SORT_NAME, TRUE); 
+                                       match = filelist_sort_compare_filedata_full(fd, old_fd, SORT_NAME, TRUE);
 
                                        if (match == 0) g_warning("multiple fd for the same path");
                                        }
index a60fbc8..b1f16d6 100644 (file)
@@ -444,7 +444,7 @@ gint vdtree_populate_path_by_iter(ViewDir *vd, GtkTreeIter *iter, gint force, Fi
                        vdtree_node_free(nd);
                        return FALSE;
                        }
-               if (!force && current_time - nd->last_update < 2) 
+               if (!force && current_time - nd->last_update < 2)
                        {
                        DEBUG_1("Too frequent update of %s", nd->fd->path);
                        return TRUE;
index d0df3b9..c84add4 100644 (file)
@@ -812,7 +812,7 @@ void vf_set_layout(ViewFile *vf, LayoutWindow *layout)
  * maintenance (for rename, move, remove)
  *-----------------------------------------------------------------------------
  */
+
 static gint vf_refresh_idle_cb(gpointer data)
 {
        ViewFile *vf = data;
index 9d2e22d..fde75e7 100644 (file)
@@ -382,7 +382,7 @@ static void vficon_mark_toggled_cb(GtkCellRendererToggle *cell, gchar *path_str,
 
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview));
        if (!path || !gtk_tree_model_get_iter(store, &row, path))
-               return;
+               return;
 
        gtk_tree_model_get(store, &row, FILE_COLUMN_POINTER, &list, -1);
 
index 98fa40f..9d553c1 100644 (file)
@@ -543,7 +543,7 @@ gint vflist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
                gtk_widget_grab_focus(widget);
 
 
-               /* returning FALSE and further processing of the event is needed for 
+               /* returning FALSE and further processing of the event is needed for
                   correct operation of the expander, to show the sidecar files.
                   It however resets the selection of multiple files. With this condition
                   it should work for both cases */
@@ -748,7 +748,7 @@ static void vflist_setup_iter(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *it
                                        FILE_COLUMN_SIZE, size,
                                        FILE_COLUMN_DATE, time,
 #define STORE_SET_IS_SLOW 1
-#if STORE_SET_IS_SLOW  
+#if STORE_SET_IS_SLOW
 /* this is 3x faster on a directory with 20000 files */
                                        FILE_COLUMN_MARKS + 0, file_data_get_mark(fd, 0),
                                        FILE_COLUMN_MARKS + 1, file_data_get_mark(fd, 1),
@@ -757,12 +757,12 @@ static void vflist_setup_iter(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *it
                                        FILE_COLUMN_MARKS + 4, file_data_get_mark(fd, 4),
                                        FILE_COLUMN_MARKS + 5, file_data_get_mark(fd, 5),
 #if FILEDATA_MARKS_SIZE != 6
-#error this needs to be updated  
+#error this needs to be updated
 #endif
 #endif
                                        FILE_COLUMN_COLOR, FALSE, -1);
 
-#if !STORE_SET_IS_SLOW                                 
+#if !STORE_SET_IS_SLOW
        {
        gint i;
        for (i = 0; i < FILEDATA_MARKS_SIZE; i++)
@@ -972,7 +972,7 @@ static void vflist_thumb_progress_count(GList *list, gint *count, gint *done)
 
                if (fd->thumb_pixbuf) (*done)++;
                
-               if (fd->sidecar_files) 
+               if (fd->sidecar_files)
                        {
                        vflist_thumb_progress_count(fd->sidecar_files, count, done);
                        }
@@ -1657,7 +1657,7 @@ static void vflist_populate_view(ViewFile *vf)
                {
                /* all selected files disappeared */
                vflist_select_closest(vf, selected->data);
-               }       
+               }
 
        filelist_free(selected);
        
@@ -1796,7 +1796,7 @@ static void vflist_listview_mark_toggled_cb(GtkCellRendererToggle *cell, gchar *
 
        store = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview)));
        if (!path || !gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, path))
-               return;
+               return;
 
        col_idx = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cell), "column_store_idx"));
 
@@ -1920,10 +1920,10 @@ ViewFile *vflist_new(ViewFile *vf, FileData *dir_fd)
 
        for (i = 0; i < FILEDATA_MARKS_SIZE; i++)
                {
-               vflist_listview_add_column_toggle(vf, i + FILE_COLUMN_MARKS, "");
-               g_assert(column == FILE_VIEW_COLUMN_MARKS + i);
-               column++;
-               }
+               vflist_listview_add_column_toggle(vf, i + FILE_COLUMN_MARKS, "");
+               g_assert(column == FILE_VIEW_COLUMN_MARKS + i);
+               column++;
+               }
 
        vflist_listview_add_column(vf, FILE_COLUMN_THUMB, "", TRUE, FALSE, FALSE);
        g_assert(column == FILE_VIEW_COLUMN_THUMB);
index 85f0383..75a558f 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2008 The Geeqie Team
  *
  * Authors: Vladimir Nadvornik / Laurent Monin
- * 
+ *
  * This software is released under the GNU General Public License (GNU GPL).
  * Please read the included file COPYING for more information.
  * This software comes with no warranty of any kind, use at your own risk!