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 154486 - FileChooserDialog buttons should have reasonable default.
FileChooserDialog buttons should have reasonable default.
Status: RESOLVED WONTFIX
Product: pygtk
Classification: Bindings
Component: gtk
2.3.x/2.4.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-04 18:17 UTC by Nick Lassonde
Modified: 2006-04-02 19:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (4.12 KB, patch)
2005-01-22 19:12 UTC, Gustavo Carneiro
none Details | Review

Description Nick Lassonde 2004-10-04 18:17:05 UTC
When creating a FileChooserDialog, it really should default to having OK and
Cancel buttons, since almost every single dialog wants those, and not no buttons
as is the current default.

So change the current definition from:
  gtk.FileChoose  gtk.FileChooserDialog(title=None, parent=None,
action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=None,
backend=None)rDialog(title=None, parent=None,
action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=(gtk.STOCK_CANCEL,
gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK), backend=None)
to:
Comment 1 Gautier Portet 2005-01-12 04:19:51 UTC
this is extremely annoying, since it breaks every glade applications which try
to use FileChooserDialog...
Comment 2 Gustavo Carneiro 2005-01-22 19:12:35 UTC
Created attachment 36384 [details] [review]
fix

Problem is that tp_new was not being called, then I discovered a couple of
other minor issues.
Comment 3 Gustavo Carneiro 2005-01-22 19:35:58 UTC
oops, wrong bug report! :P
Comment 4 Gian Mario Tagliaretti 2005-03-27 20:48:24 UTC
I think this kind of requests should be reported to gtk+ not to pygtk product.
Don't forget that pygtk wraps gtk+ widgets, cannot this bug be closed or at
least moved to gtk?
Comment 5 Gustavo Carneiro 2005-03-27 20:58:21 UTC
Sorry, this can't be fixed.  We are not allowed to break the API, and changing
defaults is breaking the API.
Comment 6 Johan (not receiving bugmail) Dahlin 2005-03-29 13:02:41 UTC
Well, we can if we really want to, but we have to ask for permission from the
release team. I think this particular change is a good one.

It'll change the following code though, which I do not thing is very common:

  fc = gtk.FileChooser()
  fc.add_buttons(gtk.STOCK_OPEN, gtk.RESPONSE_OK)

But that can also be fixed, by checking how many buttons there are in the dialog
before adding.
Comment 7 Gustavo Carneiro 2005-03-29 13:08:35 UTC
Note: even if we get permission, we shouldn't change this within a stable
series, only for 2.8 version.
Comment 8 Gustavo Noronha (kov) 2005-09-27 15:16:46 UTC
doesn't seem to have happened for 2.8, either; I've reproduced the same problem
on my instalation of pygtk2.8; this seems to cause problems for gazpacho, too,
btw (there is a very similar bug WRT this filled for gazpacho)
Comment 9 Johan (not receiving bugmail) Dahlin 2006-04-02 19:34:20 UTC
Sorry, this can't be fixed without breaking the API.
I'm closing this as WONTFIX.