2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ====================================================== */
12 #include <gnome--/main.h>
13 #include <gtk--/accelgroup.h>
22 GLyxAppWin::GLyxAppWin() :
23 Gnome::App("GnomeLyX","LyX Gnomified"),
24 status_(false, true, GNOME_PREFERENCES_NEVER)
30 GLyxAppWin::~GLyxAppWin()
34 void GLyxAppWin::init()
37 set_policy(false, true, false);
38 set_default_size(250, 350);
39 set_wmclass("lyx", "GnomeLyX");
41 frame_.set_shadow_type(GTK_SHADOW_IN);
45 set_statusbar(status_);
47 // initial (dummy) menu
48 vector<Gnome::UI::Info> menus, fm;
49 fm.push_back(Gnome::MenuItems::Open());
50 menus.push_back(Gnome::Menus::File(fm));
52 Gnome::UI::Array menu = menus;
53 gnome_app_create_menus(this->gtkobj(),
56 menusize_ = menu.size();
60 void GLyxAppWin::set_menu(Gnome::UI::Array &menu)
62 // clean up and install new menus
63 gnome_app_remove_menus(this->gtkobj(),"/",menusize_);
64 gnome_app_insert_menus(this->gtkobj(), "", menu.gtkobj());
65 gnome_app_install_menu_hints(this->gtkobj(), menu.gtkobj());
66 menusize_ = menu.size();