fd->magick = FD_MAGICK;
fd->exifdate = 0;
fd->rating = 0;
+ fd->format_class = filter_file_get_class(path_utf8);
if (disable_sidecars) fd->disable_grouping = TRUE;
return !!filter_name_find(file_class_extension_list[file_class], name);
}
+FileFormatClass filter_file_get_class(const gchar *name)
+{
+ if (filter_file_class(name, FORMAT_CLASS_IMAGE)) return FORMAT_CLASS_IMAGE;
+ if (filter_file_class(name, FORMAT_CLASS_RAWIMAGE)) return FORMAT_CLASS_RAWIMAGE;
+ if (filter_file_class(name, FORMAT_CLASS_META)) return FORMAT_CLASS_META;
+ if (filter_file_class(name, FORMAT_CLASS_VIDEO)) return FORMAT_CLASS_VIDEO;
+ return FORMAT_CLASS_UNKNOWN;
+}
+
gboolean filter_name_is_writable(const gchar *name)
{
return !!filter_name_find(file_writable_list, name);
const gchar *registered_extension_from_path(const gchar *name);
gboolean filter_name_exists(const gchar *name);
gboolean filter_file_class(const gchar *name, FileFormatClass file_class);
+FileFormatClass filter_file_get_class(const gchar *name);
gboolean filter_name_is_writable(const gchar *name);
gboolean filter_name_allow_sidecar(const gchar *name);
geeqie_logo.png \
scroller.png \
sheet_broken.png \
+ sheet_metadata.png \
+ sheet_unknown.png \
+ sheet_video.png \
icon_float.png \
icon_thumb.png \
icon_book.png \
icon_thumb $(srcdir)/icon_thumb.png \
icon_scroller $(srcdir)/scroller.png \
icon_broken $(srcdir)/sheet_broken.png \
+ icon_metadata $(srcdir)/sheet_metadata.png \
+ icon_unknown $(srcdir)/sheet_unknown.png \
+ icon_video $(srcdir)/sheet_video.png \
icon_book $(srcdir)/icon_book.png \
icon_config $(srcdir)/icon_config.png \
icon_tools $(srcdir)/icon_tools.png \
icon_view.svg \
sheet_blank.svg \
sheet_broken.svg \
+ sheet_metadata.svg \
+ sheet_unknown.svg \
+ sheet_video.svg \
spinner_orbit.svg
EXTRA_DIST = $(svg_images)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg1"
+ sodipodi:version="0.32"
+ inkscape:version="0.92.1 r"
+ width="256.00000pt"
+ height="256.00000pt"
+ sodipodi:docname="sheet_metadata.svg"
+ version="1.1"
+ inkscape:export-filename="/home/tomaszg/src/geeqie/geeqie.org/src/icons/svg/sheet_blankx.svg.png"
+ inkscape:export-xdpi="13.5"
+ inkscape:export-ydpi="13.5">
+ <metadata
+ id="metadata883">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="162.82316"
+ inkscape:cy="169.784"
+ inkscape:window-width="2554"
+ inkscape:window-height="1384"
+ showgrid="true"
+ gridtolerance="1.0000000pt"
+ snaptoguides="false"
+ guidetolerance="5.0000000pt"
+ snaptogrid="true"
+ inkscape:window-x="3"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1">
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0"
+ originy="0"
+ spacingx="14.222222"
+ spacingy="14.222222"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <path
+ style="fill:#f5f5e6;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5.33333349;stroke-linejoin:round"
+ d="M 53.333333,21.333333 V 314.66667 H 293.33333 V 128 c 0,-7.33333 0,-13.33333 -2.66666,-22 L 237.33333,26 c -10.66666,-4.666667 -18.66666,-4.666667 -24,-4.666667 z"
+ id="path826"
+ sodipodi:nodetypes="cccccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:0.25619836;fill-rule:evenodd;stroke:none;stroke-width:5.33333349;stroke-linejoin:round"
+ d="m 292,107.33333 v 0 L 238.66667,27.333333 230.51878,90.228764 C 248.96977,98.444445 269.30637,107.33333 292,107.33333 Z"
+ id="path829"
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#fafaeb;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.66666675;stroke-linejoin:round;stroke-dasharray:none"
+ d="M 225.33333,80.666667 C 252,84.84151 265.33333,83.966498 292,107.33333 L 238.66667,27.333333 c 0,31.919914 -8.88889,35.555556 -13.33334,53.333334 z"
+ id="path828"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot831"
+ style="font-style:italic;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42.66666794px;line-height:125%;font-family:FreeMono;-inkscape-font-specification:'FreeMono Italic';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#003380;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="translate(-16.906653,49.002012)"><flowRegion
+ id="flowRegion833"
+ style="font-size:42.66666794px;fill:#003380"><rect
+ id="rect835"
+ width="189.33333"
+ height="190"
+ x="75"
+ y="60.333332"
+ style="font-size:42.66666794px;fill:#003380" /></flowRegion><flowPara
+ id="flowPara837"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:64px;font-family:FreeMono;-inkscape-font-specification:'FreeMono Bold';fill:#003380">0101 0110 1011 0101 0101</flowPara></flowRoot></svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg1"
+ sodipodi:version="0.32"
+ inkscape:version="0.92.1 r"
+ width="256.00000pt"
+ height="256.00000pt"
+ sodipodi:docname="sheet_unknown.svg"
+ version="1.1"
+ inkscape:export-filename="/home/tomaszg/src/geeqie/geeqie.org/src/icons/sheet_unknown.png"
+ inkscape:export-xdpi="13.5"
+ inkscape:export-ydpi="13.5">
+ <metadata
+ id="metadata883">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="162.82316"
+ inkscape:cy="169.784"
+ inkscape:window-width="2554"
+ inkscape:window-height="1384"
+ showgrid="true"
+ gridtolerance="1.0000000pt"
+ snaptoguides="false"
+ guidetolerance="5.0000000pt"
+ snaptogrid="true"
+ inkscape:window-x="3"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1">
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0"
+ originy="0"
+ spacingx="14.222222"
+ spacingy="14.222222"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <path
+ style="fill:#f5f5e6;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5.33333349;stroke-linejoin:round"
+ d="M 53.333333,21.333333 V 314.66667 H 293.33333 V 128 c 0,-7.33333 0,-13.33333 -2.66666,-22 L 237.33333,26 c -10.66666,-4.666667 -18.66666,-4.666667 -24,-4.666667 z"
+ id="path826"
+ sodipodi:nodetypes="cccccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:0.25619836;fill-rule:evenodd;stroke:none;stroke-width:5.33333349;stroke-linejoin:round"
+ d="m 292,107.33333 v 0 L 238.66667,27.333333 230.51878,90.228764 C 248.96977,98.444445 269.30637,107.33333 292,107.33333 Z"
+ id="path829"
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#fafaeb;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.66666675;stroke-linejoin:round;stroke-dasharray:none"
+ d="M 225.33333,80.666667 C 252,84.84151 265.33333,83.966498 292,107.33333 L 238.66667,27.333333 c 0,31.919914 -8.88889,35.555556 -13.33334,53.333334 z"
+ id="path828"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot831"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:42.66666794px;line-height:125%;font-family:FreeMono;-inkscape-font-specification:'FreeMono Bold';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="translate(-15.163317,80.274016)"><flowRegion
+ id="flowRegion833"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:42.66666794px;font-family:FreeMono;-inkscape-font-specification:'FreeMono Bold';fill:#000000"><rect
+ id="rect835"
+ width="189.33333"
+ height="190"
+ x="75"
+ y="60.333332"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:42.66666794px;font-family:FreeMono;-inkscape-font-specification:'FreeMono Bold';fill:#000000" /></flowRegion><flowPara
+ id="flowPara837"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:85.33333588px;font-family:FreeMono;-inkscape-font-specification:'FreeMono Bold';fill:#000000">???</flowPara></flowRoot></svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg1"
+ sodipodi:version="0.32"
+ inkscape:version="0.92.1 r"
+ width="256.00000pt"
+ height="256.00000pt"
+ sodipodi:docname="sheet_video.svg"
+ version="1.1"
+ inkscape:export-filename="/home/tomaszg/src/geeqie/geeqie.org/src/icons/sheet_video.png"
+ inkscape:export-xdpi="13.5"
+ inkscape:export-ydpi="13.5">
+ <metadata
+ id="metadata883">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="148.42568"
+ inkscape:cy="222.41884"
+ inkscape:window-width="2554"
+ inkscape:window-height="1384"
+ showgrid="true"
+ gridtolerance="1.0000000pt"
+ snaptoguides="false"
+ guidetolerance="5.0000000pt"
+ snaptogrid="true"
+ inkscape:window-x="3"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1">
+ <inkscape:grid
+ id="GridFromPre046Settings"
+ type="xygrid"
+ originx="0"
+ originy="0"
+ spacingx="14.222222"
+ spacingy="14.222222"
+ color="#3f3fff"
+ empcolor="#3f3fff"
+ opacity="0.15"
+ empopacity="0.38"
+ empspacing="5" />
+ </sodipodi:namedview>
+ <path
+ style="fill:#f5f5e6;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5.33333349;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M 53.333333,21.333333 V 314.66667 H 293.33333 V 128 c 0,-7.33333 0,-13.33333 -2.66666,-22 L 237.33333,26 c -10.66666,-4.666667 -18.66666,-4.666667 -24,-4.666667 z"
+ id="path826"
+ sodipodi:nodetypes="cccccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:0.25619836;fill-rule:evenodd;stroke:none;stroke-width:5.33333349;stroke-linejoin:round"
+ d="m 292,107.33333 v 0 L 238.66667,27.333333 230.51878,90.228764 C 248.96977,98.444445 269.30637,107.33333 292,107.33333 Z"
+ id="path829"
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#fafaeb;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.66666675;stroke-linejoin:round;stroke-dasharray:none"
+ d="M 225.33333,80.666667 C 252,84.84151 265.33333,83.966498 292,107.33333 L 238.66667,27.333333 c 0,31.919914 -8.88889,35.555556 -13.33334,53.333334 z"
+ id="path828"
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0" />
+ <circle
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#e6f3f5;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5.33300018;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker:none;enable-background:accumulate"
+ id="path1502"
+ cx="173.33333"
+ cy="195.55556"
+ r="81.777779" />
+ <path
+ style="fill:#808080;fill-rule:evenodd;stroke:#000000;stroke-width:5.33300018;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 139.11112,124.55556 V 266.77778 L 252.16667,194.66667 Z"
+ id="path1506"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+</svg>
{
GdkPixbuf *pixbuf;
- pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
+ switch (imd->image_fd->format_class)
+ {
+ case FORMAT_CLASS_UNKNOWN:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_UNKNOWN);
+ break;
+ case FORMAT_CLASS_META:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_METADATA);
+ break;
+ case FORMAT_CLASS_VIDEO:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_VIDEO);
+ break;
+ default:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
+ }
+
image_change_pixbuf(imd, pixbuf, image_zoom_get(imd), FALSE);
g_object_unref(pixbuf);
{ PIXBUF_INLINE_FOLDER_UP, folder_up },
{ PIXBUF_INLINE_SCROLLER, icon_scroller },
{ PIXBUF_INLINE_BROKEN, icon_broken },
+ { PIXBUF_INLINE_METADATA, icon_metadata },
+ { PIXBUF_INLINE_UNKNOWN, icon_unknown },
+ { PIXBUF_INLINE_VIDEO, icon_video },
{ PIXBUF_INLINE_ICON, gqview_icon },
{ PIXBUF_INLINE_LOGO, geeqie_logo },
{ PIXBUF_INLINE_ICON_FLOAT, icon_float },
GdkPixbuf *pixbuf_fallback(FileData *fd, gint requested_width, gint requested_height)
{
- GdkPixbuf *pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN); /* FIXME use different images according to FORMAT_CLASS */
+ GdkPixbuf *pixbuf;
+
+ switch (fd->format_class)
+ {
+ case FORMAT_CLASS_UNKNOWN:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_UNKNOWN);
+ break;
+ case FORMAT_CLASS_META:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_METADATA);
+ break;
+ case FORMAT_CLASS_VIDEO:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_VIDEO);
+ break;
+ default:
+ pixbuf = pixbuf_inline(PIXBUF_INLINE_BROKEN);
+ }
if (requested_width && requested_height)
{
#define PIXBUF_INLINE_FOLDER_UP "folder_up"
#define PIXBUF_INLINE_SCROLLER "scroller"
#define PIXBUF_INLINE_BROKEN "broken"
+#define PIXBUF_INLINE_METADATA "metadata"
+#define PIXBUF_INLINE_UNKNOWN "unknown"
+#define PIXBUF_INLINE_VIDEO "video"
#define PIXBUF_INLINE_ICON "icon"
#define PIXBUF_INLINE_LOGO "logo"
N_("Unknown"),
N_("Image"),
N_("RAW Image"),
- N_("Metadata")
+ N_("Metadata"),
+ N_("Video")
};
/* config memory values */
FORMAT_CLASS_IMAGE,
FORMAT_CLASS_RAWIMAGE,
FORMAT_CLASS_META,
+ FORMAT_CLASS_VIDEO,
FILE_FORMAT_CLASSES
} FileFormatClass;
const gchar *name;
const gchar *extension;
gchar *extended_extension;
+ FileFormatClass format_class;
gchar *collate_key_name;
gchar *collate_key_name_nocase;
gint64 size;