GNOME Bugzilla – Bug 595760
Gallery dialog should suggest file name
Last modified: 2009-11-24 11:18:28 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.
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.
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.
(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".
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.
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.
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?
By the way, what do you think about the idea of stripping the extension of the movie?
Sure, although it should be done in totem_get_short_title() and make sure we only strip "known" extensions.
Feel free to file a separate bug about the trimming of the extension.
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?
My bad, go for it.
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).