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);
res2 = comment_legacy_read(fd, &keywords2, &comment2);
if (!res1 && !res2)
- {
+ {
return FALSE;
}
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;
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;
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,
* 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!
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)
{
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)
work = exif->items;
while (work)
- {
+ {
ExifItem *item;
item = work->data;
extern "C" {
-#include <glib.h>
+#include <glib.h>
#include "main.h"
#include "exif.h"
io.munmap();
if (!open) io.close();
}
-#endif
+#endif
}
~_ExifData()
#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++;
signedShort, signedLong, signedRational, string,
date, time, comment, directory,
xmpText, xmpAlt, xmpBag, xmpSeq,
- langAlt, lastTypeId
+ langAlt, lastTypeId
*/
static guint format_id_trans_tbl [] = {
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());
return 1;
}
}
-#endif
+#endif
return 0;
}
catch (Exiv2::AnyError& e) {
}
-/* 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;
#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:
// 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;
}
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)
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;
}
{
val = find(0x111, Group::ifd0);
if (val) return val->toLong();
-
+
return 0;
}
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();
}
-#endif
+#endif
/* HAVE_EXIV2 */
{
GList *prev;
last_fe = work->data;
- prev = work->prev;
+ prev = work->prev;
fc->list = g_list_delete_link(fc->list, work);
work = prev;
{
GList *current = work;
fe = work->data;
- work = work->next;
+ work = work->next;
if (fe->fd == fd)
{
/*
* marks and orientation
*/
-
-
+
+
gboolean file_data_get_mark(FileData *fd, gint n)
{
return !!(fd->marks & (1 << n));
}
-
-/*
- * 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
*/
/*
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)
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)
}
}
}
-
+
void file_data_free_ci(FileData *fd)
{
fd->change = NULL;
}
-
+
static gboolean file_data_sc_add_ci(FileData *fd, FileDataChangeType type)
{
GList *work;
work = work->next;
}
- return TRUE;
+ return TRUE;
}
static gboolean file_data_sc_check_ci(FileData *fd, FileDataChangeType type)
{
FileData *fd = work->data;
- if (!func(fd, dest))
+ if (!func(fd, dest))
{
file_data_sc_revert_ci_list(work->prev);
return FALSE;
}
}
-/*
+/*
* 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
*/
if (fd->parent) fd = fd->parent;
- if (!dest_path)
+ if (!dest_path)
{
dest_path = fd->path;
}
if (!fd->change)
{
DEBUG_1("Change checked: no change info: %s", fd->path);
- return ret;
+ return ret;
}
if (!isname(fd->path))
/* 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);
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);
return ret;
}
-
+
gint file_data_sc_verify_ci(FileData *fd)
{
GList *work;
{
GList *work;
gint all_errors = 0;
- gint common_errors = ~0;
+ gint common_errors = ~0;
gint num;
gint *errors;
gint i;
/*
* 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));
/*
* 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 */
#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 },
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;
/* 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;
{
gchar *kw = work->data;
work = work->next;
-
+
if (!kw) continue;
if (!kwstr)
kwstr = g_string_new("");
}
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
{
/* 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.
data = new_data;
}
g_free(extra);
- }
+ }
g_string_erase(new, pos, end-start+1);
if (data && *data)
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;
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);
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);
text = text2;
}
- if (with_hist)
+ if (with_hist)
{
gchar *escaped_histogram_label = g_markup_escape_text(histogram_label(osd->histogram), -1);
if (*text)
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;
}
}
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);
fd = NULL;
}
else
- {
+ {
fd = id->image->image_fd;
}
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);
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)
;
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);
newindex = GPOINTER_TO_INT(y->prev->data);
else
newindex = GPOINTER_TO_INT(last->data);
- }
+ }
read_ahead_fd = layout_list_get_fd(lw, newindex);
}
/*
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;
*/
}
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);
if (!case_sensitive)
{
- s1_t = g_utf8_casefold(s1, -1);
+ s1_t = g_utf8_casefold(s1, -1);
s2_t = g_utf8_casefold(s2, -1);
}
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);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
#endif
-
+
/* setup random seed for random slideshow */
srand(time(NULL));
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);
}
/* 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;
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;
}
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;
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);
collection_unref(remote_data->command_collection);
remote_data->command_collection = NULL;
}
-}
+}
static void gr_list_add(const gchar *text, gpointer data)
{
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;
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;
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 */
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 */
{
/*
* 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)
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;
}
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;
}
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),
GtkWidget *label;
const gchar *stock_id;
- if (ud->type == UTILITY_TYPE_COPY)
+ if (ud->type == UTILITY_TYPE_COPY)
{
stock_id = GTK_STOCK_COPY;
}
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);
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))
}
return ok;
-}
+}
static void file_util_rename_dir_full(FileData *fd, const char *new_path, GtkWidget *parent, UtilityPhase phase)
ud->content_list = NULL;
ud->parent = parent;
- if (dest_path)
+ if (dest_path)
{
ud->dest_path = g_strdup(dest_path);
}
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);
if (vd_find_row(vd, base_fd, &iter))
{
vdtree_populate_path_by_iter(vd, &iter, TRUE, vd->dir_fd);
- }
+ }
file_data_unref(base_fd);
}
}
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");
}
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;
* maintenance (for rename, move, remove)
*-----------------------------------------------------------------------------
*/
-
+
static gint vf_refresh_idle_cb(gpointer data)
{
ViewFile *vf = data;
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);
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 */
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),
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++)
if (fd->thumb_pixbuf) (*done)++;
- if (fd->sidecar_files)
+ if (fd->sidecar_files)
{
vflist_thumb_progress_count(fd->sidecar_files, count, done);
}
{
/* all selected files disappeared */
vflist_select_closest(vf, selected->data);
- }
+ }
filelist_free(selected);
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"));
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);
* 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!