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 676566 - Window title becomes "Untitled" after exporting without saving
Window title becomes "Untitled" after exporting without saving
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.8.0
Other All
: Normal trivial
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2012-05-22 14:34 UTC by Ari Pollak
Modified: 2012-07-17 21:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixing title bug (3.33 KB, patch)
2012-06-27 18:17 UTC, Hartmut Kuhse
rejected Details | Review

Description Ari Pollak 2012-05-22 14:34:16 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) ...";
Comment 1 Hartmut Kuhse 2012-06-27 18:17:12 UTC
Created attachment 217436 [details] [review]
fixing title bug

Patch fixing this bug.
Also fixed: Bug 675414
Comment 2 Hartmut Kuhse 2012-06-27 19:30:56 UTC
also fixed: Bug 678249
Comment 3 Michael Natterer 2012-07-13 22:16:14 UTC
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 4 Michael Natterer 2012-07-13 22:17:47 UTC
Comment on attachment 217436 [details] [review]
fixing title bug

Thanks for the patch, but as said above, the problem is unfortunately not that local.
Comment 5 Michael Natterer 2012-07-17 21:03:53 UTC
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(-)