summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-screenshot/mate-screenshot.c44
-rw-r--r--mate-screenshot/mate-screenshot.ui2
2 files changed, 18 insertions, 28 deletions
diff --git a/mate-screenshot/mate-screenshot.c b/mate-screenshot/mate-screenshot.c
index 03b23e54..3e121f00 100644
--- a/mate-screenshot/mate-screenshot.c
+++ b/mate-screenshot/mate-screenshot.c
@@ -883,43 +883,33 @@ static char *
build_uri (AsyncExistenceJob *job)
{
char *retval, *file_name;
+ char *timestamp;
+ GDateTime *d;
- if (window_title)
+ d = g_date_time_new_now_local ();
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 24-hours format (eg, like
+ * in France: 20:10). */
+ timestamp = g_date_time_format (d, _("%Y-%m-%d %H:%M:%S"));
+ g_date_time_unref (d);
+
+ if (job->iteration == 0)
{
/* translators: this is the name of the file that gets made up
- * with the screenshot if a specific window is taken */
- if (job->iteration == 0)
- {
- file_name = g_strdup_printf (_("Screenshot-%s.png"), window_title);
- }
- else
- {
- /* translators: this is the name of the file that gets
- * made up with the screenshot if a specific window is
- * taken */
- file_name = g_strdup_printf (_("Screenshot-%s-%d.png"),
- window_title, job->iteration);
- }
+ * with the screenshot if the entire screen is taken */
+ file_name = g_strdup_printf (_("Screenshot at %s.png"), timestamp);
}
else
{
- if (job->iteration == 0)
- {
- /* 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 (_("Screenshot.png"));
- }
- 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-%d.png"), job->iteration);
- }
+ /* 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 at %s - %d.png"), timestamp, job->iteration);
}
retval = g_build_filename (job->base_uris[job->type], file_name, NULL);
g_free (file_name);
+ g_free (timestamp);
return retval;
}
diff --git a/mate-screenshot/mate-screenshot.ui b/mate-screenshot/mate-screenshot.ui
index 942897b3..80382ed4 100644
--- a/mate-screenshot/mate-screenshot.ui
+++ b/mate-screenshot/mate-screenshot.ui
@@ -190,7 +190,7 @@
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">True</property>
- <property name="width_chars">24</property>
+ <property name="width_chars">32</property>
</object>
<packing>
<property name="left_attach">1</property>