Author: post
Date: 2010-01-18 16:59:15 +0100 (Mon, 18 Jan 2010)
New Revision: 3027

Modified:
   branches/rawstudio-ng-color/librawstudio/rs-tiff.c
   branches/rawstudio-ng-color/librawstudio/rs-tiff.h
Log:
Add helper to get TIFF filename without path.

Modified: branches/rawstudio-ng-color/librawstudio/rs-tiff.c
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-tiff.c  2010-01-17 22:43:34 UTC 
(rev 3026)
+++ branches/rawstudio-ng-color/librawstudio/rs-tiff.c  2010-01-18 15:59:15 UTC 
(rev 3027)
@@ -1,5 +1,6 @@
 #include <rawstudio.h>
 #include <sys/stat.h>
+#include <string.h>
 #include "rs-tiff.h"
 
 G_DEFINE_TYPE (RSTiff, rs_tiff, G_TYPE_OBJECT)
@@ -161,6 +162,14 @@
        return tiff->filename;
 }
 
+const gchar *
+rs_tiff_get_filename_nopath(RSTiff *tiff)
+{
+       g_assert(RS_IS_TIFF(tiff));
+
+       return strrchr(tiff->filename,'/') + 1;
+}
+
 RSTiffIfdEntry *
 rs_tiff_get_ifd_entry(RSTiff *tiff, guint ifd_num, gushort tag)
 {

Modified: branches/rawstudio-ng-color/librawstudio/rs-tiff.h
===================================================================
--- branches/rawstudio-ng-color/librawstudio/rs-tiff.h  2010-01-17 22:43:34 UTC 
(rev 3026)
+++ branches/rawstudio-ng-color/librawstudio/rs-tiff.h  2010-01-18 15:59:15 UTC 
(rev 3027)
@@ -58,6 +58,9 @@
 const gchar *
 rs_tiff_get_filename(RSTiff *tiff);
 
+const gchar *
+rs_tiff_get_filename_nopath(RSTiff *tiff);
+
 RSTiffIfdEntry *
 rs_tiff_get_ifd_entry(RSTiff *tiff, guint ifd_num, gushort tag);
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to