RE: [gnomemm] How to use persistent history with GnomeEntry?



> From: Christopher Smith [mailto:x xman org] 
> #include <memory>
> #include <glibmm.h>
> #include <libgnomeui/libgnomeui.h>
> class Gnome::UI::Entry;
> 
> std::auto_ptr<Gnome::UI::Entry>
> create_entry(const Glib::ustring& aHistoryID) {
>     GtkWidget* entryTemp = gnome_entry_new(aHistoryID.c_str());
>     GnomeEntry* gEntryTemp = GNOME_ENTRY(entryTemp);
>     return std::auto_ptr<Gnome::UI::Entry>(Glib::wrap(gEntryTemp));
> }

So, is the problem just that there is no 
  Entry::Entry(const Glib::ustring history_id)
Constructor?

It does look like we got the constructor wrong:
http://cvs.gnome.org/lxr/source/gnomemm/libgnomeuimm/libgnomeui/src/entry.hg
#42

It should be
  _WRAP_CONSTRUCTOR(Entry(const Glib::ustring history_id), gnome_entry_new)
Instead of
  _CTOR_DEFAULT()

I would like you to try that and submit a patch. Instructions are here:
http://www.gtkmm.org/bugs.shtml
Unfortunately we can not break the API in the libgnomeuimm 2.0.x series. See
my other email today about APIs and schedules.

But I would expect the default constructor to work also if you use
set_history_id() immediately after constructing.

Murray Cumming
www.murrayc.com
murrayc usa net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]