/*
* Geeqie
* (C) 2006 John Ellis
- * Copyright (C) 2008 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
*
* Author: John Ellis
*
PanItem *pi;
pi = g_new0(PanItem, 1);
+
pi->type = PAN_ITEM_THUMB;
pi->fd = fd;
pi->x = x;
pi->width = PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2;
pi->height = PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2;
- pi->pixbuf = NULL;
-
- pi->queued = FALSE;
-
pw->list = g_list_prepend(pw->list, pi);
return pi;
&rx, &ry, &rw, &rh))
{
gdk_pixbuf_composite(pi->pixbuf, pixbuf, rx - x, ry - y, rw, rh,
- (double) tx - x,
- (double) ty - y,
+ (gdouble) tx - x,
+ (gdouble) ty - y,
1.0, 1.0, GDK_INTERP_NEAREST,
255);
}
if (pi->pixbuf)
{
gdk_pixbuf_composite(pi->pixbuf, pixbuf, rx - x, ry - y, rw, rh,
- (double) pi->x - x,
- (double) pi->y - y,
+ (gdouble) pi->x - x,
+ (gdouble) pi->y - y,
1.0, 1.0, GDK_INTERP_NEAREST,
pi->color_a);
}
/* when ignore_case and partial are TRUE, path should be converted to lower case */
static GList *pan_item_find_by_path_l(GList *list, GList *search_list,
PanItemType type, const gchar *path,
- gint ignore_case, gint partial)
+ gboolean ignore_case, gboolean partial)
{
GList *work;
pi = work->data;
if ((pi->type == type || type == PAN_ITEM_NONE) && pi->fd)
{
- gint match = FALSE;
+ gboolean match = FALSE;
if (path[0] == G_DIR_SEPARATOR)
{
}
else if (ignore_case)
{
- if (strcasecmp(path, pi->fd->name) == 0) match = TRUE;
+ if (g_ascii_strcasecmp(path, pi->fd->name) == 0) match = TRUE;
}
else
{
/* when ignore_case and partial are TRUE, path should be converted to lower case */
GList *pan_item_find_by_path(PanWindow *pw, PanItemType type, const gchar *path,
- gint ignore_case, gint partial)
+ gboolean ignore_case, gboolean partial)
{
GList *list = NULL;
return g_list_reverse(list);
}
+GList *pan_item_find_by_fd(PanWindow *pw, PanItemType type, FileData *fd,
+ gboolean ignore_case, gboolean partial)
+{
+ if (!fd) return NULL;
+ return pan_item_find_by_path(pw, type, fd->path, ignore_case, partial);
+}
+
+
static PanItem *pan_item_find_by_coord_l(GList *list, PanItemType type, gint x, gint y, const gchar *key)
{
GList *work;
ta = g_new0(PanTextAlignment, 1);
ta->pw = pw;
- ta->column1 = NULL;
- ta->column2 = NULL;
ta->x = x;
ta->y = y;
ta->key = g_strdup(key);
y += height;
}
}
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */