From 017e942e852b860a980635b23ce900bc941bddfc Mon Sep 17 00:00:00 2001 From: Baruch Even Date: Mon, 16 Jul 2001 12:11:27 +0000 Subject: [PATCH] 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 --- src/frontends/gnome/ChangeLog | 12 ++++++++++++ src/frontends/gnome/Dialogs.C | 6 ------ src/frontends/gnome/FileDialog.C | 4 ++-- src/frontends/gnome/Makefile.am | 8 ++++---- src/frontends/gnome/Menubar_pimpl.C | 16 +++++++++------- src/frontends/gnome/Menubar_pimpl.h | 5 +++-- src/frontends/gnome/mainapp.C | 6 +++--- src/frontends/gnome/mainapp.h | 8 ++++++-- 8 files changed, 39 insertions(+), 26 deletions(-) diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index 862757d95b..2724218e54 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,3 +1,15 @@ +2001-07-16 Baruch Even + + * 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 Consistent use of Lsstream.h: diff --git a/src/frontends/gnome/Dialogs.C b/src/frontends/gnome/Dialogs.C index 8ba830fcc9..79955a58a6 100644 --- a/src/frontends/gnome/Dialogs.C +++ b/src/frontends/gnome/Dialogs.C @@ -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 Dialogs::redrawGUI; Dialogs::Dialogs(LyXView * lv) { add(new GUIUrl(*lv, *this)); - add(new GUICredits(*lv, *this)); - add(new GUICopyright(*lv, *this)); add(new GUIError(*lv, *this)); add(new GUITabularCreate(*lv, *this)); diff --git a/src/frontends/gnome/FileDialog.C b/src/frontends/gnome/FileDialog.C index 7f3d78957d..162d49723f 100644 --- a/src/frontends/gnome/FileDialog.C +++ b/src/frontends/gnome/FileDialog.C @@ -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); diff --git a/src/frontends/gnome/Makefile.am b/src/frontends/gnome/Makefile.am index b16440fb4d..2d0a976796 100644 --- a/src/frontends/gnome/Makefile.am +++ b/src/frontends/gnome/Makefile.am @@ -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 \ diff --git a/src/frontends/gnome/Menubar_pimpl.C b/src/frontends/gnome/Menubar_pimpl.C index e5eb7d8c8c..c7aa79153a 100644 --- a/src/frontends/gnome/Menubar_pimpl.C +++ b/src/frontends/gnome/Menubar_pimpl.C @@ -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, vectorgetLyXFunc()->getStatus(item.action()); + func_status::value_type flag = owner_->getLyXFunc()->getStatus(item.action()); Gnome::UI::Info gitem; SigC::Slot0 cback = SigC::bind(SigC::slot(this, &Menubar::Pimpl::callback),item.action()); @@ -307,12 +308,13 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector::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); diff --git a/src/frontends/gnome/Menubar_pimpl.h b/src/frontends/gnome/Menubar_pimpl.h index 694ce50c52..215aa4b7ed 100644 --- a/src/frontends/gnome/Menubar_pimpl.h +++ b/src/frontends/gnome/Menubar_pimpl.h @@ -19,6 +19,7 @@ #include "gettext.h" #include "LString.h" #include +#include #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 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 Menu_; /// bool ignore_action_; diff --git a/src/frontends/gnome/mainapp.C b/src/frontends/gnome/mainapp.C index 8ed6deb145..a0d7887638 100644 --- a/src/frontends/gnome/mainapp.C +++ b/src/frontends/gnome/mainapp.C @@ -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); diff --git a/src/frontends/gnome/mainapp.h b/src/frontends/gnome/mainapp.h index 8aeab39dc7..a283394881 100644 --- a/src/frontends/gnome/mainapp.h +++ b/src/frontends/gnome/mainapp.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -26,15 +27,18 @@ class GLyxAppWin: public Gnome::App { public: + /// + typedef Gnome::UI::Array 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 -- 2.39.2