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 149388 - FileChooserDialog does not have any action buttons
FileChooserDialog does not have any action buttons
Status: RESOLVED INVALID
Product: gtkmm
Classification: Bindings
Component: general
2.4
Other Linux
: Normal major
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-08-05 12:55 UTC by Sven Grottke
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample code to reproduce this bug (209 bytes, text/plain)
2004-08-05 12:57 UTC, Sven Grottke
Details
updated gtkmm example (325 bytes, text/plain)
2004-08-06 09:07 UTC, Sven Grottke
Details
working gtk+ example (437 bytes, text/plain)
2004-08-06 09:07 UTC, Sven Grottke
Details

Description Sven Grottke 2004-08-05 12:55:42 UTC
I'm using gtkmm 2.4.4 with glibm 2.4.3 and libsigc++ 2.0.3, running on a SuSE
9.0 with gcc 3.3.1. When I create and run any FileChooserDialog widget, it is
missing the buttons for actually doint something (Open/Save/Cancel). Everything
else is working fine (navigation etc.), I just can't choose a file.
FileChooserDialogs created with glade or directly from Gtk+ seem to work, so I
figure it's either a problem with gtkmm or with me. I will provide a sample file.
Comment 1 Sven Grottke 2004-08-05 12:57:31 UTC
Created attachment 30236 [details]
sample code to reproduce this bug

The promised sample code.
Comment 2 Murray Cumming 2004-08-06 07:18:35 UTC
I don't believe that FileChoosers created in C with GTK+ have any action buttons
by default - maybe you have a C test case that shows that.
Comment 3 Sven Grottke 2004-08-06 09:01:48 UTC
It's not created with any default buttons, you have to pass a list of buttons in
gtk_file_chooser_dialog_new() instead. But there's no way to do this in the
gtkmm widget, the constructor does not take arguments other than parent window,
title and action. Do I have to add them separately using Dialog::add_button()? I
tried this, the buttons are displayed and even activated when I double-click on
a file, but the dialog doesn't return from run() anyways. I will post both a
working GTK+ and the updated non-working gtkmm example.
Comment 4 Sven Grottke 2004-08-06 09:07:30 UTC
Created attachment 30270 [details]
updated gtkmm example
Comment 5 Sven Grottke 2004-08-06 09:07:59 UTC
Created attachment 30271 [details]
working gtk+ example
Comment 6 Murray Cumming 2004-08-06 20:41:28 UTC
In your GTK+ example, you are specifying the buttons in your call to
gtk_file_chooser_dialog_new(), in the C ... arguments. The equivalent in our C++
API is to use add_button().

Please reopen this bug if I have misunderstood.
Comment 7 Sven Grottke 2004-08-09 10:33:34 UTC
You are right, it works fine this way. My mistake, sorry. Is there any way a
constructor will be added that mirrors the Gtk+ gtk_file_chooser_dialog_new()
function w/o the need to use add_button()? Similarly, it would be helpful to
have an additional constructor for FileFilter like this: FileFilter(const
ustring& name, const ustring& pattern), at the moment one has to write 4 lines
of code to add a single filter to a FileChooser which is really annoying. If you
wish I could file a new 'enhancement' bug for this to separate it from this one.