Fixes to get Gnome FE to compile again.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2246 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Baruch Even 2001-07-16 12:11:27 +00:00
parent eb4a3c1005
commit 017e942e85
8 changed files with 39 additions and 26 deletions

View File

@ -1,3 +1,15 @@
2001-07-16 Baruch Even <baruch@lyx.org>
* Makefile.am:
* Dialogs.C: Removed Citation and Copyright dialogs from build. Left them
in repository until they get redone as About Dialog.
* FileDialog.C:
* Menubar_pimpl.C:
* Menubar_pimpl.h:
* mainapp.C:
* mainapp.h: Various fixed to get Gnome FE (FrontEnd) to compile again.
2001-07-13 Angus Leeming <a.leeming@ic.ac.uk>
Consistent use of Lsstream.h:

View File

@ -24,8 +24,6 @@
#include "ControlBibtex.h"
#include "ControlCharacter.h"
#include "ControlCitation.h"
#include "ControlCopyright.h"
#include "ControlCredits.h"
#include "ControlError.h"
#include "ControlInclude.h"
#include "ControlLog.h"
@ -35,8 +33,6 @@
#include "GUI.h"
#include "FormUrl.h"
#include "FormCredits.h"
#include "FormCopyright.h"
#include "FormError.h"
#include "FormTabularCreate.h"
/*
@ -74,8 +70,6 @@ SigC::Signal0<void> Dialogs::redrawGUI;
Dialogs::Dialogs(LyXView * lv)
{
add(new GUIUrl<FormUrl, gnomeBC>(*lv, *this));
add(new GUICredits<FormCredits, gnomeBC>(*lv, *this));
add(new GUICopyright<FormCopyright, gnomeBC>(*lv, *this));
add(new GUIError<FormError, gnomeBC>(*lv, *this));
add(new GUITabularCreate<FormTabularCreate, gnomeBC>(*lv, *this));

View File

@ -116,9 +116,9 @@ FileDialog::Select(string const & path, string const & mask,
private_->set_complete(mask);
private_->set_filename(path+suggested);
ProhibitInput(lv_->view());
lv_->prohibitInput();
string const filename = private_->exec();
AllowInput(lv_->view());
lv_->allowInput();
// Collect the info and return it for synchronous dialog.
return FileDialog::Result(Chosen, filename);

View File

@ -79,12 +79,8 @@ libgnome_la_SOURCES = \
GnomeBase.h \
GUIRunTime.C \
FileDialog.C \
FormCopyright.C \
FormCopyright.h \
FormTabularCreate.C \
FormTabularCreate.h \
FormCredits.C \
FormCredits.h \
FormError.C \
FormError.h \
FormUrl.C \
@ -94,6 +90,10 @@ libgnome_la_SOURCES = \
Timeout_pimpl.C \
Timeout_pimpl.h
# FormCopyright.C \
# FormCopyright.h \
# FormCredits.C \
# FormCredits.h \
# These still have to be added. Sooner or later. ARRae-20000411
# GUI_defaults.C \
# GUI_initialize.C \

View File

@ -22,6 +22,7 @@
#include "debug.h"
#include "LyXAction.h"
#include "lyxfunc.h"
#include "func_status.h"
#include "kbmap.h"
#include "bufferlist.h"
#include "lastfiles.h"
@ -232,7 +233,7 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
if (label.find(item.shortcut()) != string::npos)
label.insert(label.find(item.shortcut()), "_");
LyXFunc::func_status flag = owner_->getLyXFunc()->getStatus(item.action());
func_status::value_type flag = owner_->getLyXFunc()->getStatus(item.action());
Gnome::UI::Info gitem;
SigC::Slot0<void> cback = SigC::bind<int>(SigC::slot(this, &Menubar::Pimpl::callback),item.action());
@ -307,12 +308,13 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
}
// first handle optional entries.
if (item.optional() && (flag & LyXFunc::Disabled)) {
if (item.optional() && (flag & func_status::Disabled)) {
lyxerr[Debug::GUI]
<< "Skipping optional item " << item.label() << endl;
break;
}
if ((flag & LyXFunc::ToggleOn) || (flag & LyXFunc::ToggleOff))
if ((flag & func_status::ToggleOn) ||
(flag & func_status::ToggleOff))
gitem = Gnome::UI::ToggleItem(label, cback, lyxaction.helpText(item.action()));
Menus.push_back(gitem);
@ -384,19 +386,19 @@ void Menubar::Pimpl::update()
for (vector<GtkWidgetToAction>::const_iterator i = wid_act_.begin(); i != end; ++i)
{
GtkWidgetToAction wa = (*i);
LyXFunc::func_status flag = owner_->getLyXFunc()->getStatus(wa.action_);
func_status::value_type flag = owner_->getLyXFunc()->getStatus(wa.action_);
if ( flag & (LyXFunc::Disabled | LyXFunc::Unknown) ) gtk_widget_set_sensitive(wa.widget_, false);
if ( flag & (func_status::Disabled | func_status::Unknown) ) gtk_widget_set_sensitive(wa.widget_, false);
else gtk_widget_set_sensitive(wa.widget_, true);
if ( flag & LyXFunc::ToggleOn )
if ( flag & func_status::ToggleOn )
{
ignore_action_=true;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), true);
ignore_action_=false;
}
if ( flag & LyXFunc::ToggleOff )
if ( flag & func_status::ToggleOff )
{
ignore_action_=true;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), false);

View File

@ -19,6 +19,7 @@
#include "gettext.h"
#include "LString.h"
#include <gnome--/app.h>
#include <gnome--/app-helper.h>
#include "frontends/Menubar.h"
#include "commandtags.h"
#include "buffer.h"
@ -80,7 +81,7 @@ protected:
/// lists (toc, lof, lot, loa)
struct ListsHolder {
string path;
Gnome::UI::Array lst;
Gnome::UI::Array<Gnome::UI::Info> lst;
ListsHolder () { }
ListsHolder (const ListsHolder & a) { path = a.path; lst = a.lst; }
@ -95,7 +96,7 @@ private:
MenuBackend const * menubackend_;
///
string current_menu_name_;
Gnome::UI::Array Menu_;
Gnome::UI::Array<Gnome::UI::Info> Menu_;
///
bool ignore_action_;

View File

@ -53,7 +53,7 @@ void GLyxAppWin::init()
fm.push_back(Gnome::MenuItems::Open());
menus.push_back(Gnome::Menus::File(fm));
Gnome::UI::Array menu = menus;
GLyxAppWin::Array menu = menus;
gnome_app_create_menus(this->gtkobj(),
menu.gtkobj());
@ -86,7 +86,7 @@ void GLyxAppWin::init()
}
void GLyxAppWin::set_menu(Gnome::UI::Array &menu)
void GLyxAppWin::set_menu(Array &menu)
{
// clean up and install new menus
gnome_app_remove_menus(this->gtkobj(),"/",menusize_);
@ -95,7 +95,7 @@ void GLyxAppWin::set_menu(Gnome::UI::Array &menu)
menusize_ = menu.size();
}
void GLyxAppWin::update_menu(string path, int noelms, Gnome::UI::Array &menu)
void GLyxAppWin::update_menu(string path, int noelms, Array &menu)
{
// remove "noelms" items and install new items from "menu"
gnome_app_remove_menus(this->gtkobj(),path.c_str(),noelms);

View File

@ -13,6 +13,7 @@
#include <gnome--/app.h>
#include <gnome--/appbar.h>
#include <gnome--/app-helper.h>
#include <gtk--/frame.h>
#include <gtk--/accelgroup.h>
@ -26,15 +27,18 @@
class GLyxAppWin: public Gnome::App
{
public:
///
typedef Gnome::UI::Array<Gnome::UI::Info> Array;
GLyxAppWin();
~GLyxAppWin();
/// set menu of the window
void set_menu(Gnome::UI::Array &);
void set_menu(Array &);
/// update menu
void update_menu(string path,
int noelms,
Gnome::UI::Array &);
Array &);
/// add action area
void add_action(Gtk::Container &, string title, bool expand=false, Gtk::AccelGroup * acgr=0);
/// remove action area