set_statusbar(status_);
+ accel_ = 0;
+
// initial (dummy) menu
vector<Gnome::UI::Info> menus, fm;
fm.push_back(Gnome::MenuItems::Open());
// temporary main widget
Gtk::HBox * h = manage( new Gtk::HBox() );
Gnome::Pixmap * p;
- p = Gtk::wrap( GNOME_PIXMAP( gnome_stock_pixmap_widget(NULL, GNOME_STOCK_PIXMAP_ABOUT) ) );
+ p = Gtk::wrap( GNOME_PIXMAP( gnome_stock_pixmap_widget(0, GNOME_STOCK_PIXMAP_ABOUT) ) );
h->children().push_back( Gtk::Box_Helpers::Element( *p ) );
h->children().push_back( *(manage(new Gtk::Label("Waiting for LyXView port"))) );
}
// clean up first, then add new action widget and finally, disable main view
-void GLyxAppWin::add_action(Gtk::Container &action, string title, bool expand)
+void GLyxAppWin::add_action(Gtk::Container &action, string title, bool expand, Gtk::AccelGroup * acgr)
{
remove_action();
box_.children().push_back( Gtk::Box_Helpers::Element( *frame, expand ) );
box_.show_all();
+ accel_ = acgr;
+ if (accel_ != 0) add_accel_group(*accel_);
+
view_->set_sensitive(false);
action_mode = true;
}
void GLyxAppWin::remove_action()
{
+ if (accel_ != 0)
+ {
+ remove_accel_group(*accel_);
+ accel_ = 0;
+ }
+
while ( box_.children().size() > 2 )
{
box_.children().pop_back();
}
-
+
view_->set_sensitive(true);
action_mode = false;
}