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 141535 - Save as file extension problem
Save as file extension problem
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.0.x
Other All
: Normal minor
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-05-01 00:05 UTC by simon
Modified: 2004-07-16 21:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against 2.0.1: file type set to automatic when file open/save as/save a copy dialog is opened (4.70 KB, patch)
2004-05-17 21:15 UTC, Philip L
none Details | Review
patch against 2.0.1 with requested changes (3.23 KB, patch)
2004-05-19 06:27 UTC, Philip L
none Details | Review
revised patch (3.31 KB, patch)
2004-05-19 11:12 UTC, Sven Neumann
none Details | Review

Description simon 2004-05-01 00:05:56 UTC
Win2000
GTK2.2.4
Gimp2.0.1

To reproduce:
1. Open jpeg(any will do) file
2. File -> Save as Gimp(xcf)
3. Open another jpeg(or same jpeg)
2. File -> Save as... XCF is already be selected but my filename stays as 
jpeg.  I have to change to another extension and back to xcf to save as Gimp 
file.  The filename should match the file type selected(xcf in this particular 
case). Or the "by extension" selection should be default all the time.
Comment 1 Sven Neumann 2004-05-01 11:26:45 UTC
Simple rule is to not use the file type menu at all. I agree that it should
always default to "by extension".
Comment 2 Philip L 2004-05-17 21:15:17 UTC
Created attachment 27793 [details] [review]
patch against 2.0.1: file type set to automatic when file open/save as/save a copy dialog is opened

This may not be terribly helpful. It works fine with 2.0.1, but the same code
seems to do nothing with the current cvs, even though it uses the same widgets
for the list of file types.
Comment 3 Sven Neumann 2004-05-18 10:19:37 UTC
Don't worry about CVS HEAD, the file chooser is going to undergo further changes
anyway.

Your patch is not going to be accepted though, at least not w/o changes. I'd
like to avoid to introduce gimp_file_dialog_set_format() and we will certainly
not accept an API that takes a guint index_ as parameter for the file format.
I'd suggest that we simply set the option_menu to index 0 from
gimp_file_dialog_set_uri() and gimp_file_dialog_set_image().

I also don't understand why your patch activates the menu item
Comment 4 Philip L 2004-05-18 17:36:50 UTC
In this case, option_menu_set_history only selects the item superficially, and
it has to be activated for the GIMP to use the selected format. My guess is that
this is because it switches formats on a signal, rather than finding out which
item is selected.
Comment 5 Philip L 2004-05-19 06:27:20 UTC
Created attachment 27828 [details] [review]
patch against 2.0.1 with requested changes
Comment 6 Sven Neumann 2004-05-19 11:12:24 UTC
Created attachment 27839 [details] [review]
revised patch
Comment 7 Sven Neumann 2004-05-19 11:13:18 UTC
I've attached a cleaned up version of your suggested change. Should IMHO be
applied but I wouldn't mind to get a second opinion on the changed behaviour.
Comment 8 Dave Neary 2004-05-27 15:50:26 UTC
Looks good to me. This seems like the right thing to do.

Cheers,
Dave.
Comment 9 Sven Neumann 2004-05-29 11:52:54 UTC
schumaml says that the patch doesn't work for him in win32. I am clueless on how
that can be but this keeps me from applying the patch right now...
Comment 10 Michael Schumacher 2004-05-29 12:18:38 UTC
Seems to work for me now.
Comment 11 Sven Neumann 2004-05-29 12:33:53 UTC
Committed to gimp-2-0:

2004-05-29  Sven Neumann  <sven@gimp.org>
 
        * app/widgets/gimpfiledialog.[ch]: reset the file type menu to "By
        Extension". Based on a patch from Philip Lafleur (bug #141535).

Bumping milestone to 2.2 since we need a similar change in the HEAD branch.
Comment 12 Sven Neumann 2004-07-16 21:49:23 UTC
2004-07-16  Sven Neumann  <sven@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpfileprocview.[ch]: added new widget that offers
	a treeview on file procedures.

	* app/widgets/gimpfiledialog.[ch]: replaced the file type option
	menu with the new GimpFileProcView widget.
	(gimp_file_dialog_set_image): reset the file type to Automatic
	(fixes bug #141535).