[gthumb] [rename_series] the code %F returns the basename without extension



commit b9e881d641a68fc6c7ca910e533e9328707ab344
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jun 27 23:52:55 2010 +0200

    [rename_series] the code %F returns the basename without extension
    
    Fixes bug #622614

 extensions/rename_series/dlg-rename-series.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/extensions/rename_series/dlg-rename-series.c b/extensions/rename_series/dlg-rename-series.c
index b87a969..88a291b 100644
--- a/extensions/rename_series/dlg-rename-series.c
+++ b/extensions/rename_series/dlg-rename-series.c
@@ -255,7 +255,12 @@ template_eval_cb (const GMatchInfo *info,
 		g_free (uri);
 	}
 	else if (strcmp (match, "%F") == 0) {
-		r = g_file_get_basename (template_data->file_data->file);
+		char *basename;
+
+		basename = g_file_get_basename (template_data->file_data->file);
+		r = _g_uri_remove_extension (basename);
+
+		g_free (basename);
 	}
 	else if (strcmp (match, "%N") == 0) {
 		r = get_original_enum (template_data->file_data, match);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]