From 3e562332b4acf4f66e2721b12bc8a31379b45815 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Wed, 24 Apr 2013 15:45:05 +0200 Subject: [PATCH 1/3] Build more convenient filenames (no ':' or ' ') Bug: https://bugzilla.gnome.org/show_bug.cgi?id=698740 --- src/screenshot-filename-builder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screenshot-filename-builder.c b/src/screenshot-filename-builder.c index b1d8e53..4e5c62a 100644 --- a/src/screenshot-filename-builder.c +++ b/src/screenshot-filename-builder.c @@ -132,7 +132,7 @@ build_path (AsyncExistenceJob *job) GDateTime *d; d = g_date_time_new_now_local (); - origin = g_date_time_format (d, "%Y-%m-%d %H:%M:%S"); + origin = g_date_time_format (d, "%Y-%m-%d-%H%M%S"); g_date_time_unref (d); } else @@ -142,14 +142,14 @@ build_path (AsyncExistenceJob *job) { /* translators: this is the name of the file that gets made up * with the screenshot if the entire screen is taken */ - file_name = g_strdup_printf (_("Screenshot from %s.%s"), origin, file_type); + file_name = g_strdup_printf (_("Screenshot-from-%s.%s"), origin, file_type); } else { /* translators: this is the name of the file that gets * made up with the screenshot if the entire screen is * taken */ - file_name = g_strdup_printf (_("Screenshot from %s - %d.%s"), origin, job->iteration, file_type); + file_name = g_strdup_printf (_("Screenshot-from-%s-%d.%s"), origin, job->iteration, file_type); } retval = g_build_filename (base_path, file_name, NULL); -- 2.4.0 From 840603fb31dfde18aeff5dab89a704754082d86c Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 28 Jan 2015 12:40:34 +0000 Subject: [PATCH 2/3] filename-builder: reintroduce spaces in file names In commit 51485cf6bf8a8794150be0b8dff61fd573ae1512 we removed colons and spaces from the screenshot default filenames, but removing spaces is not really needed for the purpose of the patch (compatibility with FAT filesystems) and it looks bad. Bring spaces back. --- src/screenshot-filename-builder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/screenshot-filename-builder.c b/src/screenshot-filename-builder.c index 4e5c62a..9d8ee76 100644 --- a/src/screenshot-filename-builder.c +++ b/src/screenshot-filename-builder.c @@ -132,7 +132,7 @@ build_path (AsyncExistenceJob *job) GDateTime *d; d = g_date_time_new_now_local (); - origin = g_date_time_format (d, "%Y-%m-%d-%H%M%S"); + origin = g_date_time_format (d, "%Y-%m-%d %H%M%S"); g_date_time_unref (d); } else @@ -142,14 +142,14 @@ build_path (AsyncExistenceJob *job) { /* translators: this is the name of the file that gets made up * with the screenshot if the entire screen is taken */ - file_name = g_strdup_printf (_("Screenshot-from-%s.%s"), origin, file_type); + file_name = g_strdup_printf (_("Screenshot from %s.%s"), origin, file_type); } else { /* translators: this is the name of the file that gets * made up with the screenshot if the entire screen is * taken */ - file_name = g_strdup_printf (_("Screenshot-from-%s-%d.%s"), origin, job->iteration, file_type); + file_name = g_strdup_printf (_("Screenshot from %s - %d.%s"), origin, job->iteration, file_type); } retval = g_build_filename (base_path, file_name, NULL); -- 2.4.0 From 170b6ad5e7c8294f725e53102b63a6e587c5da40 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 28 Jan 2015 12:43:58 +0000 Subject: [PATCH 3/3] filename-builder: use dash for time format separator We can't use colons, but a separator here still looks nice. Use a dash. --- src/screenshot-filename-builder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screenshot-filename-builder.c b/src/screenshot-filename-builder.c index 9d8ee76..89df3e0 100644 --- a/src/screenshot-filename-builder.c +++ b/src/screenshot-filename-builder.c @@ -132,7 +132,7 @@ build_path (AsyncExistenceJob *job) GDateTime *d; d = g_date_time_new_now_local (); - origin = g_date_time_format (d, "%Y-%m-%d %H%M%S"); + origin = g_date_time_format (d, "%Y-%m-%d %H-%M-%S"); g_date_time_unref (d); } else -- 2.4.0