Re: RecentInfo



On 7/31/06, Murray Cumming <murrayc murrayc com> wrote:
> OK, so the existing example works, but RecentManager::get_items()
> still segfaults when trying to construct a std::vector.

It works for me. I added this test code at the end of
ExampleWindow::on_menu_file_recent_files_dialog():

  typedef std::vector< Glib::RefPtr<Gtk::RecentInfo> > type_items;
  type_items items = dialog.get_items();
  for(type_items::iterator iter = items.begin(); iter != items.end();
++iter)
  {
    Glib::RefPtr<Gtk::RecentInfo> item = *iter;
    if(item)
      std::cout << "item: display_name=" << item->get_display_name() <<
std::endl;
  }

Maybe you could post your code somewhere or check it in if appropriate.
Then I could investigate.

Ahh, good to hear.  I'll look into it again when I get home tonight.
My code was just something I had hacked into the existing example to
try out the other functionality.  If I can't get it working I"ll throw
together a little example and let you know.

Actually there already is a RecentInfoTraits in recentchooser.hg and I
think I fixed it up during my last changes. I'm not sure who added it.

Actually, maybe it's wrong to call it a traits specialization. The
traits allow you to specify a specialization of the ListHandle.

OK, I guess I didn't look closely enough.  Sorry about that.  I'll
take a look tonight.
thanks
--
jonner



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