-// -*- C++ -*-
/* This file is part of
* ======================================================
*
#include <gtk--/menu.h>
-using SigC::slot;
-using SigC::bind;
-
using std::endl;
// temporary solution for LyXView
void Menubar::Pimpl::set(string const & menu_name)
{
// if (current_menu_name_ != menu_name) // disabled until Lastfiles and Documents are added dynamically to menu
- {
+ //{
current_menu_name_ = menu_name;
// clean up the lists
// update state of the items
update();
updateAllLists();
- }
+ //}
}
void Menubar::Pimpl::updateAllLists()
{
+#ifdef WITH_WARNINGS
+#warning Implement me! (be 20010324)
+#endif
+#if 0
// update lists
if (toc_.size() > 0)
{
vector<Buffer::TocItem> toclist = (owner_->view()->buffer()->getTocList())[Buffer::TOC_TOC];
updateList(&toclist, &toc_);
}
+#endif
}
int const max_number_of_items = 25;
+
void Menubar::Pimpl::updateList(vector<Buffer::TocItem> * toclist, vector<ListsHolder> * pgui)
{
vector<ListsHolder> & gui = *pgui;
string label;
menu.push_back(Gnome::UI::Item(Gnome::UI::Icon(GNOME_STOCK_MENU_REFRESH),
- _("Refresh"), slot(this, &Menubar::Pimpl::updateAllLists)));
+ _("Refresh"), SigC::slot(this, &Menubar::Pimpl::updateAllLists)));
if (toclist->size() > max_number_of_items)
composeTocUIInfo(menu, *toclist, toclist->begin(), 0);
label = string(4*(*it).depth,' ')+(*it).str;
menu.push_back(Gnome::UI::Item(label,
- bind<Buffer::TocItem>(slot(this, &Menubar::Pimpl::callbackToc), (*it)),
+ SigC::bind<Buffer::TocItem>(SigC::slot(this, &Menubar::Pimpl::callbackToc), (*it)),
label));
}
}
{
label = (*it).str;
menu.push_back(Gnome::UI::Item(label,
- bind<Buffer::TocItem>(slot(this, &Menubar::Pimpl::callbackToc), (*it)),
+ SigC::bind<Buffer::TocItem>(SigC::slot(this, &Menubar::Pimpl::callbackToc), (*it)),
label));
}
else
{
label = (*it).str;
submenu.push_back(Gnome::UI::Item(label,
- bind<Buffer::TocItem>(slot(this, &Menubar::Pimpl::callbackToc), (*it)),
+ SigC::bind<Buffer::TocItem>(SigC::slot(this, &Menubar::Pimpl::callbackToc), (*it)),
label));
++it;
}
LyXFunc::func_status flag = owner_->getLyXFunc()->getStatus(item.action());
Gnome::UI::Info gitem;
- SigC::Slot0<void> cback = bind<int>(slot(this, &Menubar::Pimpl::callback),item.action());
+ SigC::Slot0<void> cback = SigC::bind<int>(SigC::slot(this, &Menubar::Pimpl::callback),item.action());
{
using namespace Gnome::MenuItems;
action = static_cast<kb_action>(ac);
switch(action) {
- case LFUN_MENUOPEN:
+ case LFUN_FILE_OPEN:
gitem = Open(cback);
break;
case LFUN_QUIT:
case LFUN_MENUWRITE:
gitem = Save(cback);
break;
- case LFUN_MENUWRITEAS:
+ case LFUN_WRITEAS:
gitem = SaveAs(cback);
break;
case LFUN_BUFFER_PRINT: