Re: [glade--] glademm generated filechooserdialog code broken?
Christof Petig <[email protected]> Fri, 02 Jul 2004 14:55:13 +0200
| Newsgroups | gmane.comp.gnome.glademm |
|---|---|
| Organization | Adolf Petig GmbH & Co. KG |
| Message-ID | <[email protected]> |
Johan Kohler schrieb:
> Hi,
> I used Glade-2.0 (glademm-2.4) to generate C++ code for a window and a
> filechooserdialog and get the following error:
>
> ---- relevant build messages (line numbers added for referencing) ----
> imageviewer.cc: In function `int main(int, char**)':
> imageviewer.cc:23: error: no matching function for call to
> `filechooserdialog1
> ::filechooserdialog1()'
> filechooserdialog1.hh:16: error: candidates are:
> filechooserdialog1::filechooserdialog1(const filechooserdialog1&)
> filechooserdialog1.hh:19: error:
> filechooserdialog1::filechooserdialog1(GlademmData*)
> ---- end build messages ---
>
> Relevant source code follows:
>
> ---- begin code excerpt ----
> imageviewer.cc:
> 23 filechooserdialog1 *filechooserdialog1 = new class
> filechooserdialog1();
>
> filechooserdialog1.hh:
> 15 class filechooserdialog1 : public filechooserdialog1_glade
> 16 {
> 17 public:
> 18
> 19 filechooserdialog1(GlademmData *gmm_data) :
> filechooserdialog1_glade(gmm_data)
> 20 {
> 21 }
> ---- end code excerpt ---
>
> Could someone explain the purpose of GlademmData, and how to fix this?
GlademmData contains the accelerator pointer. Since every toplevel
window has exactly one Glib::RefPtr<Gtk::AccelGroup> you have to pass it
to subwidgets (if they ever might plan to use accelerators).
Normally every widget derived from Gtk::Window does not have a
GlademmData * argument to the ctor.
So I think that glademm does not yet know that FileChooserDialog is a
descendant of Dialog (and Window) and treats it like a label [defaul].
Simply take src/writers/fileselection.cc as a template to create
filechoserdialog.cc (should be about 2-20 min work). Once it works send
it to me and I'll put it into the mainline sources. [IIRC
filechooserdialog is brand new 2.4 stuff]
If you run into trouble feel free to contact me again
Christof
_______________________________________________
glademm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/glademm-list
signature.asc
(application/pgp-signature, 251 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFA5Vs2ng+R+0ucfO0RAr8lAJ9LmQZPMLjOGKH5B8a5ArnxB7xl1gCfdKkS FbbgeiZBles9Quoh7UNSBj4= =WrxU -----END PGP SIGNATURE-----