GNOME Bugzilla – Bug 676566
Window title becomes "Untitled" after exporting without saving
Last modified: 2012-07-17 21:03:53 UTC
Originally from http://bugs.debian.org/673898: 1. Open a non-XCF image, say foo.png. 2. Export the image as foo.png 3. Note that window title becomes "Untitled (exported) ..." According to http://gui.gimp.org/index.php/Save_%2B_export_specification: "After a successful export, if there is nodocument–to–file association, the title of the image window shall be set to “[<filename>] (exported)-X.Y etc, etc.” where the <filename> is the name (minus extension) of the file exported to;" According to the spec, the window title at this point should really be "foo (exported) ...";
Created attachment 217436 [details] [review] fixing title bug Patch fixing this bug. Also fixed: Bug 675414
also fixed: Bug 678249
Unfortunately, the problem is much bigger that that: we say "Untitled" in a lot of places where we should use the imported or exported URI's basename. I'm looking into this, and the fix to the image title will probably boil down to using a different GimpImage API.
Comment on attachment 217436 [details] [review] fixing title bug Thanks for the patch, but as said above, the problem is unfortunately not that local.
Fixed in master and gimp-2-8: commit f4ce57aa9709e492666c16259e81625a3e4a7796 Author: Michael Natterer <mitch@gimp.org> Date: Tue Jul 17 22:52:49 2012 +0200 Bug 676566 - Window title becomes "Untitled" after exporting without saving Fix this and other issues more globally by moving the logic that formats the image's display name into the GimpImage object, and return the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)" from gimp_image_get_display_name(). Also add gimp_image_get_display_path() which returns the full path instead. Use the two functions for formatting the image title, and apply various other fixes that make sure the UI always uses the same string to identify the image. Call gimp_object_name_changed() whenever the save/export status changes, so the image's cached display name and path get cleared. (cherry picked from commit 220b28677be00ec407ff7f274e395ad934be27af) app/actions/debug-commands.c | 4 +- app/actions/file-commands.c | 6 +-- app/actions/windows-actions.c | 18 ++----- app/core/gimpimage-private.h | 1 + app/core/gimpimage.c | 133 ++++++++++++++++++++++++++++++++++++++++++---- app/core/gimpimage.h | 1 + app/display/gimpdisplayshell-title.c | 93 ++------------------------------ app/file/file-open.c | 6 +-- app/file/file-save.c | 2 + app/pdb/image-cmds.c | 7 ++- tools/pdbgen/pdb/image.pdb | 7 ++- 11 files changed, 153 insertions(+), 125 deletions(-)