After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595760 - Gallery dialog should suggest file name
Gallery dialog should suggest file name
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-09-20 16:46 UTC by Robin Stocker
Modified: 2009-11-24 11:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
suggest name for gallery (2.02 KB, patch)
2009-09-20 16:48 UTC, Robin Stocker
committed Details | Review
add movie title to suggested name (6.11 KB, patch)
2009-11-04 21:25 UTC, Robin Stocker
needs-work Details | Review
add movie title to suggested name (2) (6.42 KB, patch)
2009-11-21 18:36 UTC, Robin Stocker
committed Details | Review

Description Robin Stocker 2009-09-20 16:46:08 UTC
At the moment, when saving a gallery, the file name entry is just blank. It should suggest a file name just the same as the screenshot dialog does.
Comment 1 Robin Stocker 2009-09-20 16:48:53 UTC
Created attachment 143536 [details] [review]
suggest name for gallery

This fixes it. It also uses GFile to get the URI instead of prepending "file://" in totem_screenshot_plugin_setup_file_chooser.
Comment 2 Robin Stocker 2009-09-20 16:50:54 UTC
Just an additional idea: maybe we should add a separate string for "Gallery" instead of also using "Screenshot". Or maybe use the basename of the movie itself.
Comment 3 Philip Withnall 2009-09-27 14:07:53 UTC
(In reply to comment #2)
> Just an additional idea: maybe we should add a separate string for "Gallery"
> instead of also using "Screenshot". Or maybe use the basename of the movie
> itself.

gnome-screenshot uses "Screenshot-[window name].png", so I suggest we use "Screenshot-[movie name].png" and "Gallery-[movie name].png".
Comment 4 Robin Stocker 2009-11-04 21:25:51 UTC
Created attachment 146952 [details] [review]
add movie title to suggested name

Ok, this patch (to be applied on top of the first) adds the movie title to the suggested name and uses "Gallery" and "Screenshot".

The title is obtained through totem_get_short_title. This results in ugly names such as "Screenshot-Movie 1.avi-1.png" (notice the ".avi"). Is there a function which gets the "title" either from the metadata or from the file name minus the extension? Would that make sense as an addition to totem? This title could also be used in the window, where showing the file extension is also unnecessary IMHO.
Comment 5 Bastien Nocera 2009-11-16 10:45:10 UTC
Review of attachment 146952 [details] [review]:

Rest looks good.

::: src/plugins/screenshot/totem-gallery.c
@@ +110,2 @@
 	/* Translators: the argument is a screenshot number, used to prevent overwriting files. Just translate "Screenshot", and not the ".jpg". */
+	uri = totem_screenshot_plugin_setup_file_chooser (N_("Gallery-%s-%d.jpg"), movie_title);

Please update the translators comment here with at least one example.
Comment 6 Robin Stocker 2009-11-21 18:36:25 UTC
Created attachment 148240 [details] [review]
add movie title to suggested name (2)

Corrected the translator comment and added an example. Is this what you meant?
Comment 7 Robin Stocker 2009-11-21 18:37:06 UTC
By the way, what do you think about the idea of stripping the extension of the movie?
Comment 8 Bastien Nocera 2009-11-23 12:35:24 UTC
Sure, although it should be done in totem_get_short_title() and make sure we only strip "known" extensions.
Comment 9 Bastien Nocera 2009-11-23 12:43:10 UTC
Feel free to file a separate bug about the trimming of the extension.
Comment 10 Robin Stocker 2009-11-23 18:37:40 UTC
It looks like you just committed the first part of the patch. You didn't really commit "add movie title to suggested name", which was meant to be committed after the first part. Can I commit it?
Comment 11 Bastien Nocera 2009-11-23 19:12:06 UTC
My bad, go for it.
Comment 12 Robin Stocker 2009-11-24 11:17:50 UTC
Comment on attachment 148240 [details] [review]
add movie title to suggested name (2)

Committed with a small fix in make_filename_for_dir (also pass movie_title to the second g_strdup_printf).