RecentFilter issue
- From: Guillaume Brocker <guillaume brocker digital-trainers com>
- To: gtkmm-list gnome org
- Subject: RecentFilter issue
- Date: Thu, 17 Apr 2008 10:37:18 +0200
Hi !
I'm using RecentManager and RecentChooserMenu classes. Everything works
but the chooser also shows items posted by other applications. To
restrict recent items only to those posted by my application, I added a
RencentFilter to the RecentChooserMenu, but now the chooser is empty.
I'm using gtkmm 2.10, on windows. A sample of my code is provided in the
attachment.
Thank you.
Guillaume
Gtk::Widget * recentWidget = m_uiManager->get_widget("/MenuBar/MenuFile/Recent");
Gtk::MenuItem * recentMenuItem = dynamic_cast< Gtk::MenuItem * >( recentWidget );
Gtk::RecentChooserMenu * recentChooserMenu = Gtk::manage( new Gtk::RecentChooserMenu(Gtk::RecentManager::get_default()) );
Gtk::RecentFilter * recentFilter = Gtk::manage( new Gtk::RecentFilter() );
recentMenuItem->set_submenu( * recentChooserMenu );
recentMenuItem->property_visible() = true;
recentFilter->add_application( Glib::get_application_name() );
recentChooserMenu->add_filter( *recentFilter );
recentChooserMenu->set_filter( *recentFilter );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]