mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
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:
parent
eb4a3c1005
commit
017e942e85
@ -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>
|
2001-07-13 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
Consistent use of Lsstream.h:
|
Consistent use of Lsstream.h:
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
#include "ControlBibtex.h"
|
#include "ControlBibtex.h"
|
||||||
#include "ControlCharacter.h"
|
#include "ControlCharacter.h"
|
||||||
#include "ControlCitation.h"
|
#include "ControlCitation.h"
|
||||||
#include "ControlCopyright.h"
|
|
||||||
#include "ControlCredits.h"
|
|
||||||
#include "ControlError.h"
|
#include "ControlError.h"
|
||||||
#include "ControlInclude.h"
|
#include "ControlInclude.h"
|
||||||
#include "ControlLog.h"
|
#include "ControlLog.h"
|
||||||
@ -35,8 +33,6 @@
|
|||||||
#include "GUI.h"
|
#include "GUI.h"
|
||||||
|
|
||||||
#include "FormUrl.h"
|
#include "FormUrl.h"
|
||||||
#include "FormCredits.h"
|
|
||||||
#include "FormCopyright.h"
|
|
||||||
#include "FormError.h"
|
#include "FormError.h"
|
||||||
#include "FormTabularCreate.h"
|
#include "FormTabularCreate.h"
|
||||||
/*
|
/*
|
||||||
@ -74,8 +70,6 @@ SigC::Signal0<void> Dialogs::redrawGUI;
|
|||||||
Dialogs::Dialogs(LyXView * lv)
|
Dialogs::Dialogs(LyXView * lv)
|
||||||
{
|
{
|
||||||
add(new GUIUrl<FormUrl, gnomeBC>(*lv, *this));
|
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 GUIError<FormError, gnomeBC>(*lv, *this));
|
||||||
add(new GUITabularCreate<FormTabularCreate, gnomeBC>(*lv, *this));
|
add(new GUITabularCreate<FormTabularCreate, gnomeBC>(*lv, *this));
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ FileDialog::Select(string const & path, string const & mask,
|
|||||||
private_->set_complete(mask);
|
private_->set_complete(mask);
|
||||||
private_->set_filename(path+suggested);
|
private_->set_filename(path+suggested);
|
||||||
|
|
||||||
ProhibitInput(lv_->view());
|
lv_->prohibitInput();
|
||||||
string const filename = private_->exec();
|
string const filename = private_->exec();
|
||||||
AllowInput(lv_->view());
|
lv_->allowInput();
|
||||||
|
|
||||||
// Collect the info and return it for synchronous dialog.
|
// Collect the info and return it for synchronous dialog.
|
||||||
return FileDialog::Result(Chosen, filename);
|
return FileDialog::Result(Chosen, filename);
|
||||||
|
@ -79,12 +79,8 @@ libgnome_la_SOURCES = \
|
|||||||
GnomeBase.h \
|
GnomeBase.h \
|
||||||
GUIRunTime.C \
|
GUIRunTime.C \
|
||||||
FileDialog.C \
|
FileDialog.C \
|
||||||
FormCopyright.C \
|
|
||||||
FormCopyright.h \
|
|
||||||
FormTabularCreate.C \
|
FormTabularCreate.C \
|
||||||
FormTabularCreate.h \
|
FormTabularCreate.h \
|
||||||
FormCredits.C \
|
|
||||||
FormCredits.h \
|
|
||||||
FormError.C \
|
FormError.C \
|
||||||
FormError.h \
|
FormError.h \
|
||||||
FormUrl.C \
|
FormUrl.C \
|
||||||
@ -94,6 +90,10 @@ libgnome_la_SOURCES = \
|
|||||||
Timeout_pimpl.C \
|
Timeout_pimpl.C \
|
||||||
Timeout_pimpl.h
|
Timeout_pimpl.h
|
||||||
|
|
||||||
|
# FormCopyright.C \
|
||||||
|
# FormCopyright.h \
|
||||||
|
# FormCredits.C \
|
||||||
|
# FormCredits.h \
|
||||||
# These still have to be added. Sooner or later. ARRae-20000411
|
# These still have to be added. Sooner or later. ARRae-20000411
|
||||||
# GUI_defaults.C \
|
# GUI_defaults.C \
|
||||||
# GUI_initialize.C \
|
# GUI_initialize.C \
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
#include "lyxfunc.h"
|
#include "lyxfunc.h"
|
||||||
|
#include "func_status.h"
|
||||||
#include "kbmap.h"
|
#include "kbmap.h"
|
||||||
#include "bufferlist.h"
|
#include "bufferlist.h"
|
||||||
#include "lastfiles.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)
|
if (label.find(item.shortcut()) != string::npos)
|
||||||
label.insert(label.find(item.shortcut()), "_");
|
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;
|
Gnome::UI::Info gitem;
|
||||||
SigC::Slot0<void> cback = SigC::bind<int>(SigC::slot(this, &Menubar::Pimpl::callback),item.action());
|
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.
|
// first handle optional entries.
|
||||||
if (item.optional() && (flag & LyXFunc::Disabled)) {
|
if (item.optional() && (flag & func_status::Disabled)) {
|
||||||
lyxerr[Debug::GUI]
|
lyxerr[Debug::GUI]
|
||||||
<< "Skipping optional item " << item.label() << endl;
|
<< "Skipping optional item " << item.label() << endl;
|
||||||
break;
|
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()));
|
gitem = Gnome::UI::ToggleItem(label, cback, lyxaction.helpText(item.action()));
|
||||||
|
|
||||||
Menus.push_back(gitem);
|
Menus.push_back(gitem);
|
||||||
@ -384,19 +386,19 @@ void Menubar::Pimpl::update()
|
|||||||
for (vector<GtkWidgetToAction>::const_iterator i = wid_act_.begin(); i != end; ++i)
|
for (vector<GtkWidgetToAction>::const_iterator i = wid_act_.begin(); i != end; ++i)
|
||||||
{
|
{
|
||||||
GtkWidgetToAction wa = (*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);
|
else gtk_widget_set_sensitive(wa.widget_, true);
|
||||||
|
|
||||||
if ( flag & LyXFunc::ToggleOn )
|
if ( flag & func_status::ToggleOn )
|
||||||
{
|
{
|
||||||
ignore_action_=true;
|
ignore_action_=true;
|
||||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), true);
|
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), true);
|
||||||
ignore_action_=false;
|
ignore_action_=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( flag & LyXFunc::ToggleOff )
|
if ( flag & func_status::ToggleOff )
|
||||||
{
|
{
|
||||||
ignore_action_=true;
|
ignore_action_=true;
|
||||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), false);
|
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), false);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "LString.h"
|
#include "LString.h"
|
||||||
#include <gnome--/app.h>
|
#include <gnome--/app.h>
|
||||||
|
#include <gnome--/app-helper.h>
|
||||||
#include "frontends/Menubar.h"
|
#include "frontends/Menubar.h"
|
||||||
#include "commandtags.h"
|
#include "commandtags.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
@ -80,7 +81,7 @@ protected:
|
|||||||
/// lists (toc, lof, lot, loa)
|
/// lists (toc, lof, lot, loa)
|
||||||
struct ListsHolder {
|
struct ListsHolder {
|
||||||
string path;
|
string path;
|
||||||
Gnome::UI::Array lst;
|
Gnome::UI::Array<Gnome::UI::Info> lst;
|
||||||
|
|
||||||
ListsHolder () { }
|
ListsHolder () { }
|
||||||
ListsHolder (const ListsHolder & a) { path = a.path; lst = a.lst; }
|
ListsHolder (const ListsHolder & a) { path = a.path; lst = a.lst; }
|
||||||
@ -95,7 +96,7 @@ private:
|
|||||||
MenuBackend const * menubackend_;
|
MenuBackend const * menubackend_;
|
||||||
///
|
///
|
||||||
string current_menu_name_;
|
string current_menu_name_;
|
||||||
Gnome::UI::Array Menu_;
|
Gnome::UI::Array<Gnome::UI::Info> Menu_;
|
||||||
|
|
||||||
///
|
///
|
||||||
bool ignore_action_;
|
bool ignore_action_;
|
||||||
|
@ -53,7 +53,7 @@ void GLyxAppWin::init()
|
|||||||
fm.push_back(Gnome::MenuItems::Open());
|
fm.push_back(Gnome::MenuItems::Open());
|
||||||
menus.push_back(Gnome::Menus::File(fm));
|
menus.push_back(Gnome::Menus::File(fm));
|
||||||
|
|
||||||
Gnome::UI::Array menu = menus;
|
GLyxAppWin::Array menu = menus;
|
||||||
gnome_app_create_menus(this->gtkobj(),
|
gnome_app_create_menus(this->gtkobj(),
|
||||||
menu.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
|
// clean up and install new menus
|
||||||
gnome_app_remove_menus(this->gtkobj(),"/",menusize_);
|
gnome_app_remove_menus(this->gtkobj(),"/",menusize_);
|
||||||
@ -95,7 +95,7 @@ void GLyxAppWin::set_menu(Gnome::UI::Array &menu)
|
|||||||
menusize_ = menu.size();
|
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"
|
// remove "noelms" items and install new items from "menu"
|
||||||
gnome_app_remove_menus(this->gtkobj(),path.c_str(),noelms);
|
gnome_app_remove_menus(this->gtkobj(),path.c_str(),noelms);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <gnome--/app.h>
|
#include <gnome--/app.h>
|
||||||
#include <gnome--/appbar.h>
|
#include <gnome--/appbar.h>
|
||||||
|
#include <gnome--/app-helper.h>
|
||||||
#include <gtk--/frame.h>
|
#include <gtk--/frame.h>
|
||||||
#include <gtk--/accelgroup.h>
|
#include <gtk--/accelgroup.h>
|
||||||
|
|
||||||
@ -26,15 +27,18 @@
|
|||||||
class GLyxAppWin: public Gnome::App
|
class GLyxAppWin: public Gnome::App
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
///
|
||||||
|
typedef Gnome::UI::Array<Gnome::UI::Info> Array;
|
||||||
|
|
||||||
GLyxAppWin();
|
GLyxAppWin();
|
||||||
~GLyxAppWin();
|
~GLyxAppWin();
|
||||||
|
|
||||||
/// set menu of the window
|
/// set menu of the window
|
||||||
void set_menu(Gnome::UI::Array &);
|
void set_menu(Array &);
|
||||||
/// update menu
|
/// update menu
|
||||||
void update_menu(string path,
|
void update_menu(string path,
|
||||||
int noelms,
|
int noelms,
|
||||||
Gnome::UI::Array &);
|
Array &);
|
||||||
/// add action area
|
/// add action area
|
||||||
void add_action(Gtk::Container &, string title, bool expand=false, Gtk::AccelGroup * acgr=0);
|
void add_action(Gtk::Container &, string title, bool expand=false, Gtk::AccelGroup * acgr=0);
|
||||||
/// remove action area
|
/// remove action area
|
||||||
|
Loading…
Reference in New Issue
Block a user