From: Lars Gullik Bjønnes Date: Thu, 15 Mar 2001 18:21:56 +0000 (+0000) Subject: remove CXX_WORKING_NAMESPACES X-Git-Tag: 1.6.10~21449 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d4ee9c38b6aa45146f67658352623bcbc3e0ad9b;p=features.git remove CXX_WORKING_NAMESPACES git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1777 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 28734f6ce8..36cfdc9d3a 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -61,10 +61,6 @@ extern void math_insert_symbol(BufferView *, string const &); extern bool math_insert_greek(BufferView *, char); extern int greek_kb_flag; -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - using std::vector; using std::find_if; using std::pair; diff --git a/src/BufferView_pimpl.h b/src/BufferView_pimpl.h index be5fe4f2c8..e7a9c8ba75 100644 --- a/src/BufferView_pimpl.h +++ b/src/BufferView_pimpl.h @@ -19,12 +19,8 @@ class LyXView; class WorkArea; class LyXScreen; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -#endif - /// -struct BufferView::Pimpl : public Object { +struct BufferView::Pimpl : public SigC::Object { /// Pimpl(BufferView * i, LyXView * o, int xpos, int ypos, int width, int height); diff --git a/src/ChangeLog b/src/ChangeLog index 786f593da8..dc0b31d8de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2001-03-15 Lars Gullik Bjønnes + * several files: remove CXX_WORKING_NAMESPACES + * buffer.C (pop_tag): tie is in namespace boost * BufferView.h: noncopyable is in namespace boost diff --git a/src/LyXView.C b/src/LyXView.C index 8a43792b13..6cd4ae26cc 100644 --- a/src/LyXView.C +++ b/src/LyXView.C @@ -50,10 +50,6 @@ BufferView * current_view; extern "C" int C_LyXView_atCloseMainFormCB(FL_FORM *, void *); -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -using SigC::slot; -#endif LyXView::LyXView(int width, int height) { @@ -70,11 +66,11 @@ LyXView::LyXView(int width, int height) dialogs_ = new Dialogs(this); // temporary until all dialogs moved into Dialogs. dialogs_->updateBufferDependent - .connect(slot(&updateAllVisibleBufferRelatedDialogs)); + .connect(SigC::slot(&updateAllVisibleBufferRelatedDialogs)); dialogs_->hideBufferDependent - .connect(slot(&CloseAllBufferRelatedDialogs)); - Dialogs::redrawGUI.connect(slot(this, &LyXView::redraw)); - Dialogs::redrawGUI.connect(slot(&RedrawAllBufferRelatedDialogs)); + .connect(SigC::slot(&CloseAllBufferRelatedDialogs)); + Dialogs::redrawGUI.connect(SigC::slot(this, &LyXView::redraw)); + Dialogs::redrawGUI.connect(SigC::slot(&RedrawAllBufferRelatedDialogs)); } @@ -274,7 +270,7 @@ void LyXView::create_form_form_main(int width, int height) // TIMERS // - autosave_timeout.timeout.connect(slot(this, &LyXView::AutoSave)); + autosave_timeout.timeout.connect(SigC::slot(this, &LyXView::AutoSave)); // // Misc diff --git a/src/LyXView.h b/src/LyXView.h index 220e3cb1b7..d82a83c504 100644 --- a/src/LyXView.h +++ b/src/LyXView.h @@ -34,17 +34,12 @@ class Menubar; class BufferView; class Dialogs; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -#endif - - /** This class is the form containing the view of the buffer. The actual buffer view is supposed (at least IMHO) to be another class, that shows its output in one or more LyXView's. */ -class LyXView : public Object, public boost::noncopyable { +class LyXView : public SigC::Object, public boost::noncopyable { public: /// constructor LyXView(int w, int h); diff --git a/src/WorkArea.h b/src/WorkArea.h index 7c00df597d..dc3e26a541 100644 --- a/src/WorkArea.h +++ b/src/WorkArea.h @@ -23,14 +23,6 @@ #include FORMS_H_LOCATION #include "Painter.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -using SigC::Signal1; -using SigC::Signal2; -using SigC::Signal3; -#endif - - /// class WorkArea { public: @@ -105,29 +97,29 @@ public: void putClipboard(string const &) const; // Signals /// - Signal0 workAreaExpose; + SigC::Signal0 workAreaExpose; /// - Signal1 scrollCB; + SigC::Signal1 scrollCB; /// - Signal2 workAreaKeyPress; + SigC::Signal2 workAreaKeyPress; /// - Signal3 workAreaButtonPress; + SigC::Signal3 workAreaButtonPress; /// - Signal3 workAreaButtonRelease; + SigC::Signal3 workAreaButtonRelease; /// - Signal3 workAreaMotionNotify; + SigC::Signal3 workAreaMotionNotify; /// - Signal0 workAreaFocus; + SigC::Signal0 workAreaFocus; /// - Signal0 workAreaUnfocus; + SigC::Signal0 workAreaUnfocus; /// - Signal0 workAreaEnter; + SigC::Signal0 workAreaEnter; /// - Signal0 workAreaLeave; + SigC::Signal0 workAreaLeave; /// - Signal3 workAreaDoubleClick; + SigC::Signal3 workAreaDoubleClick; /// - Signal3 workAreaTripleClick; + SigC::Signal3 workAreaTripleClick; private: /// void createPixmap(int, int); diff --git a/src/counters.C b/src/counters.C index 211791f981..4d2a8c6832 100644 --- a/src/counters.C +++ b/src/counters.C @@ -18,11 +18,6 @@ #include "counters.h" #include "debug.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -using SigC::slot; -#endif - using std::endl; @@ -105,7 +100,7 @@ void Counters::newCounter(string const & newc, string const & oldc) } Counter * tmp = new Counter; - (*it).second->onstep.connect(slot(tmp, + (*it).second->onstep.connect(SigC::slot(tmp, &Counter::reset)); counterList[newc] = tmp; } diff --git a/src/counters.h b/src/counters.h index fc0e82a2ac..9d50608493 100644 --- a/src/counters.h +++ b/src/counters.h @@ -22,14 +22,8 @@ #include #include "LString.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -using SigC::Signal0; -#endif - - /// -class Counter : public Object { +class Counter : public SigC::Object { public: /// Counter(); @@ -44,7 +38,7 @@ public: /// void reset(); /// - Signal0 onstep; + SigC::Signal0 onstep; private: /// int value_; diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 67c03dcd79..a071664c5a 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,5 +1,7 @@ 2001-03-15 Lars Gullik Bjønnes + * several files: remove CXX_WORKING_NAMESPACES + * ButtonPolicies.h: noncopyable is in namespace boost * Dialogs.h (noncopyable): ditto * DialogBase.h (noncopyable): ditto diff --git a/src/frontends/DialogBase.h b/src/frontends/DialogBase.h index 457824a4a4..72d1a982f1 100644 --- a/src/frontends/DialogBase.h +++ b/src/frontends/DialogBase.h @@ -20,22 +20,13 @@ #include #include -// If we do not want to bring them in global namespace, they could be -// defined inside DialogBase... (JMarc) -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -using SigC::slot; -using SigC::Object; -#endif - - /** Abstract base class of all dialogs. The outside world only needs some way to tell a dialog when to show, hide or update itself. A dialog then takes whatever steps are necessary to satisfy that request. Thus a dialog will have to "pull" the necessary details from the core of the program. */ -class DialogBase : public Object, public boost::noncopyable +class DialogBase : public SigC::Object, public boost::noncopyable { public: /**@name Constructors and Deconstructors */ diff --git a/src/frontends/Liason.C b/src/frontends/Liason.C index f4f09dea4e..3b17230a6c 100644 --- a/src/frontends/Liason.C +++ b/src/frontends/Liason.C @@ -33,10 +33,7 @@ using std::endl; extern LyXRC lyxrc; -#ifdef CXX_WORKING_NAMESPACES -namespace Liason -{ -#endif +namespace Liason { PrinterParams getPrinterParams(Buffer * buffer) { @@ -162,7 +159,4 @@ void setMinibuffer(LyXView * lv, char const * msg) lv->getMiniBuffer()->Set(msg); } -#ifdef CXX_WORKING_NAMESPACES -} -#endif - +} // namespace Liason diff --git a/src/frontends/Liason.h b/src/frontends/Liason.h index 77aceddb2d..c40b4277ae 100644 --- a/src/frontends/Liason.h +++ b/src/frontends/Liason.h @@ -44,10 +44,7 @@ class BufferParams; worked so nicely on a very small number of compilers and systems. See the "dialogbase" branch of lyx-devel cvs module for xtl implementation. */ -#ifdef CXX_WORKING_NAMESPACES -namespace Liason -{ -#endif +namespace Liason { /**@name Global support functions */ //@{ /// get global printer parameters @@ -58,8 +55,9 @@ namespace Liason void setMinibuffer(LyXView *, char const * msg); //@} -#ifdef CXX_WORKING_NAMESPACES -} +} // namespace Liason #endif -#endif + + + diff --git a/src/frontends/Timeout.h b/src/frontends/Timeout.h index 717096f83e..f9c54cc940 100644 --- a/src/frontends/Timeout.h +++ b/src/frontends/Timeout.h @@ -17,10 +17,6 @@ #include -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -#endif - /** * This class executes the callback when the timeout expires. */ @@ -46,7 +42,7 @@ public: /// restart the timer void restart(); /// signal emitted on timer expiry - Signal0 timeout; + SigC::Signal0 timeout; /// emit the signal void emit(); /// set the timer type diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 316cdf5bd3..e89ad973ba 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,5 +1,7 @@ 2001-03-15 Lars Gullik Bjønnes + * several files: remove CXX_WORKING_NAMESPACES + * ButtonController.h: noncopyable is in namespace boost * ButtonPolicies.h: ditto diff --git a/src/frontends/controllers/ControlConnections.C b/src/frontends/controllers/ControlConnections.C index b9511cdf6c..c4df523187 100644 --- a/src/frontends/controllers/ControlConnections.C +++ b/src/frontends/controllers/ControlConnections.C @@ -23,10 +23,6 @@ #include "ViewBase.h" #include "insets/lyxinset.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - ControlConnectBase::ControlConnectBase(LyXView & lv, Dialogs & d) : ControlBase(lv), d_(d), h_(0), r_(0) diff --git a/src/frontends/controllers/ControlConnections.h b/src/frontends/controllers/ControlConnections.h index ad68dc117c..f50601241e 100644 --- a/src/frontends/controllers/ControlConnections.h +++ b/src/frontends/controllers/ControlConnections.h @@ -45,9 +45,9 @@ protected: /// Contains the signals we have to connect to. Dialogs & d_; /// Hide connection. - Connection h_; + SigC::Connection h_; /// Redraw connection. - Connection r_; + SigC::Connection r_; }; @@ -91,7 +91,7 @@ protected: private: /// Update connection. - Connection u_; + SigC::Connection u_; }; /** Base class to control connection/disconnection of signals with the LyX @@ -122,14 +122,14 @@ protected: private: /// inset::hide connection. - Connection ih_; + SigC::Connection ih_; }; template ControlConnectInset::ControlConnectInset(LyXView & lv, Dialogs & d) : ControlConnectBD(lv, d), - ih_(0), inset_(0) + inset_(0), ih_(0) {} diff --git a/src/frontends/gnome/ChangeLog b/src/frontends/gnome/ChangeLog index bd42dbf9fc..2748fdedb4 100644 --- a/src/frontends/gnome/ChangeLog +++ b/src/frontends/gnome/ChangeLog @@ -1,3 +1,7 @@ +2001-03-15 Lars Gullik Bjønnes + + * several files: remove CXX_WORKING_NAMESPACES + 2001-03-11 Baruch Even * Various files: More fixes to get it compiled again. diff --git a/src/frontends/gnome/FormCitation.C b/src/frontends/gnome/FormCitation.C index 773a948de8..d602ba1ac4 100644 --- a/src/frontends/gnome/FormCitation.C +++ b/src/frontends/gnome/FormCitation.C @@ -49,12 +49,6 @@ using std::max; using std::min; using std::find; -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -using SigC::bind; -#endif - - // configuration keys static string const LOCAL_CONFIGURE_PREFIX("FormCitation"); @@ -76,8 +70,8 @@ FormCitation::FormCitation(LyXView * lv, Dialogs * d) // let the dialog be shown // These are permanent connections so we won't bother // storing a copy because we won't be disconnecting. - d->showCitation.connect(slot(this, &FormCitation::showInset)); - d->createCitation.connect(slot(this, &FormCitation::createInset)); + d->showCitation.connect(SigC::slot(this, &FormCitation::showInset)); + d->createCitation.connect(SigC::slot(this, &FormCitation::createInset)); cleanupWidgets(); } @@ -92,10 +86,10 @@ void FormCitation::showInset( InsetCommand * const inset ) if( dialog_!=0 || inset == 0 ) return; inset_ = inset; - ih_ = inset_->hideDialog.connect(slot(this, &FormCitation::hide)); + ih_ = inset_->hideDialog.connect(SigC::slot(this, &FormCitation::hide)); - u_ = d_->updateBufferDependent.connect(slot(this, &FormCitation::updateSlot)); - h_ = d_->hideBufferDependent.connect(slot(this, &FormCitation::hide)); + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot)); + h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormCitation::hide)); params = inset->params(); @@ -108,8 +102,8 @@ void FormCitation::createInset( string const & arg ) { if( dialog_!=0 ) return; - u_ = d_->updateBufferDependent.connect(slot(this, &FormCitation::updateSlot)); - h_ = d_->hideBufferDependent.connect(slot(this, &FormCitation::hide)); + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormCitation::updateSlot)); + h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormCitation::hide)); params.setFromString( arg ); showStageSearch(); @@ -117,12 +111,13 @@ void FormCitation::createInset( string const & arg ) static -void parseBibTeX(string data, +void parseBibTeX(string const & dat, string const & findkey, string & keyvalue) { unsigned int i; - + string data(dat); + keyvalue = ""; for (i=0; ishowPrint.connect(slot(this,&FormPrint::show)); + d->showPrint.connect(SigC::slot(this,&FormPrint::show)); } @@ -97,12 +90,12 @@ void FormPrint::show() b_cancel = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_cancel") ) ); // setting up connections - b_ok->clicked.connect(slot(this, &FormPrint::apply)); + b_ok->clicked.connect(SigC::slot(this, &FormPrint::apply)); b_ok->clicked.connect(dialog_->destroy.slot()); b_cancel->clicked.connect(dialog_->destroy.slot()); - dialog_->destroy.connect(slot(this, &FormPrint::free)); + dialog_->destroy.connect(SigC::slot(this, &FormPrint::free)); - u_ = d_->updateBufferDependent.connect(slot(this, + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormPrint::updateSlot)); h_ = d_->hideBufferDependent.connect(dialog_->destroy.slot()); diff --git a/src/frontends/gnome/FormPrint.h b/src/frontends/gnome/FormPrint.h index 18a853a8a6..ab90e572e2 100644 --- a/src/frontends/gnome/FormPrint.h +++ b/src/frontends/gnome/FormPrint.h @@ -31,10 +31,6 @@ class LyXView; class Dialogs; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -#endif - /** This class provides an Gnome implementation of the FormPrint Dialog. The print dialog allows users to print their documents. */ @@ -99,9 +95,9 @@ private: LyXView * lv_; Dialogs * d_; /// Update connection. - Connection u_; + SigC::Connection u_; /// Hide connection. - Connection h_; + SigC::Connection h_; //@} }; diff --git a/src/frontends/gnome/FormRef.C b/src/frontends/gnome/FormRef.C index c69e96a487..ac5a6392d5 100644 --- a/src/frontends/gnome/FormRef.C +++ b/src/frontends/gnome/FormRef.C @@ -39,8 +39,6 @@ #include "mainapp.h" extern GLyxAppWin * mainAppWin; -using SigC::bind; - // configuration keys static string const CONF_ENTRY_NAME("FormRef_name"); diff --git a/src/frontends/gnome/FormRef.h b/src/frontends/gnome/FormRef.h index d9b8e67990..22a214fdbc 100644 --- a/src/frontends/gnome/FormRef.h +++ b/src/frontends/gnome/FormRef.h @@ -114,11 +114,11 @@ private: /// the nitty-griity. What is modified and passed back InsetCommandParams params; /// Update connection. - Connection u_; + SigC::Connection u_; /// Hide connection. - Connection h_; + SigC::Connection h_; /// inset::hide connection. - Connection ih_; + SigC::Connection ih_; /// std::vector refs; /// diff --git a/src/frontends/gnome/FormToc.C b/src/frontends/gnome/FormToc.C index f5ede35ed6..8e19debeee 100644 --- a/src/frontends/gnome/FormToc.C +++ b/src/frontends/gnome/FormToc.C @@ -37,16 +37,15 @@ extern "C" { #include #include -using SigC::bind; - FormToc::FormToc(LyXView * lv, Dialogs * d) - : lv_(lv), d_(d), inset_(0), u_(0), h_(0), ih_(0), dialog_(0), ignore_callback_(false) + : lv_(lv), d_(d), inset_(0), u_(0), h_(0), ih_(0), dialog_(0), + ignore_callback_(false) { // let the dialog be shown // These are permanent connections so we won't bother // storing a copy because we won't be disconnecting. - d->showTOC.connect(slot(this, &FormToc::showInset)); - d->createTOC.connect(slot(this, &FormToc::createInset)); + d->showTOC.connect(SigC::slot(this, &FormToc::showInset)); + d->createTOC.connect(SigC::slot(this, &FormToc::createInset)); } @@ -57,10 +56,10 @@ FormToc::~FormToc() void FormToc::showInset( InsetCommand * const inset ) { - if( dialog_!=0 || inset == 0 ) return; + if ( dialog_!=0 || inset == 0 ) return; inset_ = inset; - ih_ = inset_->hideDialog.connect(slot(this, &FormToc::hide)); + ih_ = inset_->hideDialog.connect(SigC::slot(this, &FormToc::hide)); params = inset->params(); show(); @@ -99,31 +98,31 @@ void FormToc::show() choice_->get_menu()->items().clear(); e = manage( new Gtk::MenuItem(_("Table of Contents")) ); - e->activate.connect(bind(slot(this, &FormToc::changeList), Buffer::TOC_TOC)); + e->activate.connect(SigC::bind(SigC::slot(this, &FormToc::changeList), Buffer::TOC_TOC)); choice_->get_menu()->append( *e ); e = manage( new Gtk::MenuItem(_("List of Figures")) ); - e->activate.connect(bind(slot(this, &FormToc::changeList), Buffer::TOC_LOF)); + e->activate.connect(SigC::bind(SigC::slot(this, &FormToc::changeList), Buffer::TOC_LOF)); choice_->get_menu()->append( *e ); e = manage( new Gtk::MenuItem(_("List of Tables")) ); - e->activate.connect(bind(slot(this, &FormToc::changeList), Buffer::TOC_LOT)); + e->activate.connect(SigC::bind(SigC::slot(this, &FormToc::changeList), Buffer::TOC_LOT)); choice_->get_menu()->append( *e ); e = manage( new Gtk::MenuItem(_("List of Algorithms")) ); - e->activate.connect(bind(slot(this, &FormToc::changeList), Buffer::TOC_LOA)); + e->activate.connect(SigC::bind(SigC::slot(this, &FormToc::changeList), Buffer::TOC_LOA)); choice_->get_menu()->append( *e ); // wrap buttons and connect slots b_refresh = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_refresh") ) ); b_close = Gtk::wrap( GTK_BUTTON( lookup_widget(pd, "button_close") ) ); - b_refresh->clicked.connect(bind(slot(this, &FormToc::updateSlot),false)); + b_refresh->clicked.connect(SigC::bind(SigC::slot(this, &FormToc::updateSlot),false)); b_close->clicked.connect(dialog_->destroy.slot()); - dialog_->destroy.connect(slot(this, &FormToc::free)); + dialog_->destroy.connect(SigC::slot(this, &FormToc::free)); - u_ = d_->updateBufferDependent.connect(slot(this, &FormToc::updateSlot)); - h_ = d_->hideBufferDependent.connect(slot(this, &FormToc::hide)); + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormToc::updateSlot)); + h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormToc::hide)); if (!dialog_->is_visible()) dialog_->show_all(); diff --git a/src/frontends/gnome/Menubar_pimpl.C b/src/frontends/gnome/Menubar_pimpl.C index b0a2ee1fa7..4dbebc6471 100644 --- a/src/frontends/gnome/Menubar_pimpl.C +++ b/src/frontends/gnome/Menubar_pimpl.C @@ -36,9 +36,6 @@ #include -using SigC::slot; -using SigC::bind; - using std::endl; // temporary solution for LyXView @@ -66,7 +63,7 @@ Menubar::Pimpl::~Pimpl() void Menubar::Pimpl::set(string const & menu_name) { // if (current_menu_name_ != menu_name) // disabled until Lastfiles and Documents are added dynamically to menu - { + //{ current_menu_name_ = menu_name; // clean up the lists @@ -90,7 +87,7 @@ void Menubar::Pimpl::set(string const & menu_name) // update state of the items update(); updateAllLists(); - } + //} } void Menubar::Pimpl::updateAllLists() @@ -104,6 +101,7 @@ void Menubar::Pimpl::updateAllLists() } int const max_number_of_items = 25; + void Menubar::Pimpl::updateList(vector * toclist, vector * pgui) { vector & gui = *pgui; @@ -116,7 +114,7 @@ void Menubar::Pimpl::updateList(vector * toclist, vectorsize() > max_number_of_items) composeTocUIInfo(menu, *toclist, toclist->begin(), 0); @@ -130,7 +128,7 @@ void Menubar::Pimpl::updateList(vector * toclist, vector(slot(this, &Menubar::Pimpl::callbackToc), (*it)), + SigC::bind(SigC::slot(this, &Menubar::Pimpl::callbackToc), (*it)), label)); } } @@ -157,7 +155,7 @@ Menubar::Pimpl::composeTocUIInfo(vector & menu, { label = (*it).str; menu.push_back(Gnome::UI::Item(label, - bind(slot(this, &Menubar::Pimpl::callbackToc), (*it)), + SigC::bind(SigC::slot(this, &Menubar::Pimpl::callbackToc), (*it)), label)); } else @@ -167,7 +165,7 @@ Menubar::Pimpl::composeTocUIInfo(vector & menu, { label = (*it).str; submenu.push_back(Gnome::UI::Item(label, - bind(slot(this, &Menubar::Pimpl::callbackToc), (*it)), + SigC::bind(SigC::slot(this, &Menubar::Pimpl::callbackToc), (*it)), label)); ++it; } @@ -233,7 +231,7 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vectorgetLyXFunc()->getStatus(item.action()); Gnome::UI::Info gitem; - SigC::Slot0 cback = bind(slot(this, &Menubar::Pimpl::callback),item.action()); + SigC::Slot0 cback = SigC::bind(SigC::slot(this, &Menubar::Pimpl::callback),item.action()); { using namespace Gnome::MenuItems; diff --git a/src/frontends/gnome/Menubar_pimpl.h b/src/frontends/gnome/Menubar_pimpl.h index 2383f1cc41..694ce50c52 100644 --- a/src/frontends/gnome/Menubar_pimpl.h +++ b/src/frontends/gnome/Menubar_pimpl.h @@ -28,10 +28,6 @@ class MenuBackend; class MenuItem; class StrPool; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -#endif - #include "debug.h" /* @@ -107,7 +103,7 @@ private: vector wid_act_; /// toc - Connection utoc_; + SigC::Connection utoc_; vector toc_; }; #endif diff --git a/src/frontends/kde/ChangeLog b/src/frontends/kde/ChangeLog index 84b887bd93..befcf445c2 100644 --- a/src/frontends/kde/ChangeLog +++ b/src/frontends/kde/ChangeLog @@ -1,3 +1,7 @@ +2001-03-15 Lars Gullik Bjønnes + + * several files: remove CXX_WORKING_NAMESPACES + 2001-03-14 Angus Leeming * Merging changes from BRANCH_MVC back into HEAD. diff --git a/src/frontends/kde/FormDocument.C b/src/frontends/kde/FormDocument.C index 8e49a249b2..f69367ab31 100644 --- a/src/frontends/kde/FormDocument.C +++ b/src/frontends/kde/FormDocument.C @@ -20,9 +20,7 @@ #include "QtLyXView.h" #include "debug.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormDocument::FormDocument(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) diff --git a/src/frontends/kde/FormParagraph.C b/src/frontends/kde/FormParagraph.C index 12ae601390..c74124b3ca 100644 --- a/src/frontends/kde/FormParagraph.C +++ b/src/frontends/kde/FormParagraph.C @@ -19,10 +19,7 @@ #include "lyxtext.h" #include "debug.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif - using std::endl; FormParagraph::FormParagraph(LyXView *v, Dialogs *d) diff --git a/src/frontends/kde/FormPrint.C b/src/frontends/kde/FormPrint.C index 852b107e86..e076d42862 100644 --- a/src/frontends/kde/FormPrint.C +++ b/src/frontends/kde/FormPrint.C @@ -22,20 +22,14 @@ #include -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - -#ifdef CXX_WORKING_NAMESPACES using Liason::printBuffer; using Liason::getPrinterParams; using std::max; -#endif FormPrint::FormPrint(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) { - d->showPrint.connect(slot(this, &FormPrint::show)); + d->showPrint.connect(SigC::slot(this, &FormPrint::show)); } @@ -88,8 +82,7 @@ void FormPrint::print() to = strToInt(dialog_->getTo()); } - int retval; - retval = printBuffer(lv_->buffer(), PrinterParams(dialog_->getTarget(), + int retval = printBuffer(lv_->buffer(), PrinterParams(dialog_->getTarget(), string(dialog_->getPrinter()), string(dialog_->getFile()), dialog_->getWhichPages(), from, to, dialog_->getReverse(), dialog_->getSort(), max(strToInt(dialog_->getCount()),1))); @@ -112,8 +105,8 @@ void FormPrint::show() dialog_ = new PrintDialog(this, 0, _("LyX: Print")); if (!dialog_->isVisible()) { - h_ = d_->hideBufferDependent.connect(slot(this, &FormPrint::hide)); - u_ = d_->updateBufferDependent.connect(slot(this, &FormPrint::update)); + h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormPrint::hide)); + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormPrint::update)); } dialog_->raise(); diff --git a/src/frontends/kde/FormPrint.h b/src/frontends/kde/FormPrint.h index b27e9518e0..0ffb2cda12 100644 --- a/src/frontends/kde/FormPrint.h +++ b/src/frontends/kde/FormPrint.h @@ -1,3 +1,4 @@ +// -*- C++ -*- /** * \file FormPrint.h * Copyright 2001 the LyX Team @@ -16,14 +17,12 @@ class Dialogs; class LyXView; class PrintDialog; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -#endif - +/// class FormPrint : public DialogBase { -public: +public: + /// FormPrint(LyXView *, Dialogs *); - + /// ~FormPrint(); /// start print @@ -51,9 +50,9 @@ private: Dialogs * d_; /// Hide connection. - Connection h_; + SigC::Connection h_; /// Update connection. - Connection u_; + SigC::Connection u_; }; #endif // FORMPRINT_H diff --git a/src/frontends/kde/citationdlg.C b/src/frontends/kde/citationdlg.C index bd24363d62..4a8826aa7c 100644 --- a/src/frontends/kde/citationdlg.C +++ b/src/frontends/kde/citationdlg.C @@ -11,9 +11,7 @@ #include "dlg/helpers.h" #include "citationdlg.h" -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, char const * name, bool, WFlags) : QDialog(parent,name,0), form_(form) diff --git a/src/frontends/kde/dlg/helpers.C b/src/frontends/kde/dlg/helpers.C index 4358850c92..5cb2526516 100644 --- a/src/frontends/kde/dlg/helpers.C +++ b/src/frontends/kde/dlg/helpers.C @@ -19,9 +19,7 @@ using std::endl; -#ifdef CXX_WORKING_NAMESPACES namespace kde_helpers { -#endif bool setComboFromStr(QComboBox *box, const string & str) { @@ -35,6 +33,4 @@ bool setComboFromStr(QComboBox *box, const string & str) return false; } -#ifdef CXX_WORKING_NAMESPACES -}; /* namespace kde_helpers */ -#endif +} // namespace kde_helpers diff --git a/src/frontends/kde/dlg/helpers.h b/src/frontends/kde/dlg/helpers.h index 89db077bfe..7f3768d767 100644 --- a/src/frontends/kde/dlg/helpers.h +++ b/src/frontends/kde/dlg/helpers.h @@ -16,9 +16,7 @@ #include "vspace.h" -#ifdef CXX_WORKING_NAMESPACES namespace kde_helpers { -#endif /** * \fn setSizeHint @@ -43,8 +41,6 @@ inline void setSizeHint(QWidget *widget) */ bool setComboFromStr(QComboBox *box, const string & str); -#ifdef CXX_WORKING_NAMESPACES -}; /* namespace kde_helpers */ -#endif +} // namespace kde_helpers #endif /* HELPERS_H */ diff --git a/src/frontends/kde/docdlg.C b/src/frontends/kde/docdlg.C index 21e7169b8a..d6d32f29be 100644 --- a/src/frontends/kde/docdlg.C +++ b/src/frontends/kde/docdlg.C @@ -23,11 +23,8 @@ #include "gettext.h" #include "debug.h" -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; using kde_helpers::setComboFromStr; -#endif - using std::endl; DocDialog::DocDialog(FormDocument * form, QWidget * parent, char const * name, bool, WFlags) diff --git a/src/frontends/kde/paradlg.C b/src/frontends/kde/paradlg.C index f00dab3a71..cf994ecf90 100644 --- a/src/frontends/kde/paradlg.C +++ b/src/frontends/kde/paradlg.C @@ -17,10 +17,7 @@ #include "gettext.h" #include "debug.h" -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif - using std::endl; ParaDialog::ParaDialog(FormParagraph * form, QWidget * parent, char const * name, bool, WFlags) diff --git a/src/frontends/kde/paraextradlg.C b/src/frontends/kde/paraextradlg.C index f5e75515da..0b51847473 100644 --- a/src/frontends/kde/paraextradlg.C +++ b/src/frontends/kde/paraextradlg.C @@ -15,9 +15,7 @@ #include -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif ParaExtraDialog::ParaExtraDialog (QWidget * parent, char const * name) : ParaExtraDialogData(parent, name) diff --git a/src/frontends/kde/parageneraldlg.C b/src/frontends/kde/parageneraldlg.C index 06d36daed8..f08452151d 100644 --- a/src/frontends/kde/parageneraldlg.C +++ b/src/frontends/kde/parageneraldlg.C @@ -15,9 +15,7 @@ #include -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif ParaGeneralDialog::ParaGeneralDialog (QWidget * parent, char const * name) : ParaGeneralDialogData(parent, name) diff --git a/src/frontends/kde/refdlg.C b/src/frontends/kde/refdlg.C index fbd8097faa..140d0e58ed 100644 --- a/src/frontends/kde/refdlg.C +++ b/src/frontends/kde/refdlg.C @@ -12,9 +12,7 @@ #include "dlg/helpers.h" #include "insets/insetref.h" -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif RefDialog::RefDialog(FormRef * form, QWidget * parent, char const * name, bool, WFlags) : QDialog(parent,name,0), form_(form) diff --git a/src/frontends/kde/tocdlg.C b/src/frontends/kde/tocdlg.C index d5f5e5e8ef..cb8183ad28 100644 --- a/src/frontends/kde/tocdlg.C +++ b/src/frontends/kde/tocdlg.C @@ -11,9 +11,7 @@ #include "dlg/helpers.h" -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif TocDialog::TocDialog(FormToc * form, QWidget * parent, char const * name, bool, WFlags) : QDialog(parent,name,0), form_(form) diff --git a/src/frontends/kde/urldlg.C b/src/frontends/kde/urldlg.C index d25b4271af..b9c22ffece 100644 --- a/src/frontends/kde/urldlg.C +++ b/src/frontends/kde/urldlg.C @@ -11,9 +11,7 @@ #include "dlg/helpers.h" -#ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; -#endif UrlDialog::UrlDialog(FormUrl *form, QWidget *parent, char const * name, bool, WFlags) : QDialog(parent,name,0), form_(form) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index ae3dc10eec..797cf390a6 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,7 @@ +2001-03-15 Lars Gullik Bjønnes + + * several files: remove CXX_WORKING_NAMESPACES + 2001-03-15 Edwin Leuven * Added splash screen diff --git a/src/frontends/qt2/FormCharacter.C b/src/frontends/qt2/FormCharacter.C index 716acfcbc4..2119d7fafe 100644 --- a/src/frontends/qt2/FormCharacter.C +++ b/src/frontends/qt2/FormCharacter.C @@ -19,9 +19,7 @@ #include "language.h" #include "support/lstrings.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormCharacter::FormCharacter(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) diff --git a/src/frontends/qt2/FormParagraph.C b/src/frontends/qt2/FormParagraph.C index e42633d4f8..9995d167cc 100644 --- a/src/frontends/qt2/FormParagraph.C +++ b/src/frontends/qt2/FormParagraph.C @@ -19,10 +19,7 @@ #include "lyxtext.h" #include "debug.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif - using std::endl; FormParagraph::FormParagraph(LyXView *v, Dialogs *d) diff --git a/src/frontends/qt2/FormPrint.C b/src/frontends/qt2/FormPrint.C index 1e2ffa40fd..8dee1d43a1 100644 --- a/src/frontends/qt2/FormPrint.C +++ b/src/frontends/qt2/FormPrint.C @@ -22,15 +22,9 @@ #include "support/lstrings.h" #include "qmessagebox.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - -#ifdef CXX_WORKING_NAMESPACES using Liason::printBuffer; using Liason::getPrinterParams; using std::max; -#endif FormPrint::FormPrint(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) @@ -38,7 +32,7 @@ FormPrint::FormPrint(LyXView *v, Dialogs *d) // let the dialog be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. - d->showPrint.connect(slot(this, &FormPrint::show)); + d->showPrint.connect(SigC::slot(this, &FormPrint::show)); } FormPrint::~FormPrint() @@ -88,8 +82,7 @@ void FormPrint::print() to = strToInt(dialog_->getTo()); } - int retval; - retval = printBuffer(lv_->buffer(), PrinterParams(dialog_->getTarget(), + int retval = printBuffer(lv_->buffer(), PrinterParams(dialog_->getTarget(), string(dialog_->getPrinter()), string(dialog_->getFile()), dialog_->getWhichPages(), from, to, dialog_->getReverse(), dialog_->getSort(), max(strToInt(dialog_->getCount()),1))); @@ -111,8 +104,8 @@ void FormPrint::show() dialog_ = new PrintDlgImpl(this, 0, _("LyX: Print")); if (!dialog_->isVisible()) { - h_ = d_->hideBufferDependent.connect(slot(this, &FormPrint::hide)); - u_ = d_->updateBufferDependent.connect(slot(this, &FormPrint::update)); + h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormPrint::hide)); + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormPrint::update)); } dialog_->raise(); diff --git a/src/frontends/qt2/FormPrint.h b/src/frontends/qt2/FormPrint.h index 5af1912af6..786349fd7c 100644 --- a/src/frontends/qt2/FormPrint.h +++ b/src/frontends/qt2/FormPrint.h @@ -15,10 +15,6 @@ class Dialogs; class LyXView; class PrintDlgImpl; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Connection; -#endif - class FormPrint : public DialogBase { public: /**@name Constructors and Destructors */ @@ -54,9 +50,9 @@ private: Dialogs * d_; /// Hide connection. - Connection h_; + SigC::Connection h_; /// Update connection. - Connection u_; + SigC::Connection u_; }; #endif diff --git a/src/frontends/qt2/FormSearch.C b/src/frontends/qt2/FormSearch.C index 5d9a3eba32..98e1fbcd6b 100644 --- a/src/frontends/qt2/FormSearch.C +++ b/src/frontends/qt2/FormSearch.C @@ -19,9 +19,7 @@ //#include "language.h" #include "support/lstrings.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormSearch::FormSearch(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) @@ -29,7 +27,7 @@ FormSearch::FormSearch(LyXView *v, Dialogs *d) // let the popup be shown // This is a permanent connection so we won't bother // storing a copy because we won't be disconnecting. - d->showSearch.connect(slot(this, &FormSearch::show)); + d->showSearch.connect(SigC::slot(this, &FormSearch::show)); // perhaps in the future we'd like a // "search again" button/keybinding // d->searchAgain.connect(slot(this, &FormSearch::FindNext)); @@ -48,8 +46,8 @@ void FormSearch::show() } if (!dialog_->isVisible()) { - h_ = d_->hideBufferDependent.connect(slot(this, &FormSearch::hide)); - u_ = d_->updateBufferDependent.connect(slot(this, &FormSearch::update)); + h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormSearch::hide)); + u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormSearch::update)); } dialog_->raise(); @@ -88,6 +86,8 @@ void FormSearch::replace(string const & searchstr, string const & replacestr, } } } + + void FormSearch::close() { h_.disconnect(); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index eb7a1b504c..973d7f3a81 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2001-03-15 Lars Gullik Bjønnes + + * several files: remove CXX_WORKING_NAMESPACES + 2001-03-14 Angus Leeming * Merging changes from BRANCH_MVC back into HEAD. diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index 4e218d7792..72181b7ded 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -50,7 +50,7 @@ // Signal enabling all visible popups to be redrawn if so desired. // E.g., when the GUI colours have been remapped. -Signal0 Dialogs::redrawGUI; +SigC::Signal0 Dialogs::redrawGUI; Dialogs::Dialogs(LyXView * lv) { diff --git a/src/frontends/xforms/FormBaseDeprecated.h b/src/frontends/xforms/FormBaseDeprecated.h index 6372a7683a..cdb4a3c16d 100644 --- a/src/frontends/xforms/FormBaseDeprecated.h +++ b/src/frontends/xforms/FormBaseDeprecated.h @@ -109,9 +109,9 @@ protected: // methods /// Used so we can get at the signals we have to connect to. Dialogs * d_; /// Hide connection. - Connection h_; + SigC::Connection h_; /// Redraw connection. - Connection r_; + SigC::Connection r_; /// dialog title, displayed by WM. string title; public: @@ -151,7 +151,7 @@ protected: virtual void updateSlot(bool) { update(); } /// Update connection. - Connection u_; + SigC::Connection u_; }; diff --git a/src/frontends/xforms/FormBrowser.C b/src/frontends/xforms/FormBrowser.C index 693c53f1be..7bd18e9ddf 100644 --- a/src/frontends/xforms/FormBrowser.C +++ b/src/frontends/xforms/FormBrowser.C @@ -19,10 +19,6 @@ #include "lyxrc.h" #include "buffer.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - FormBrowser::FormBrowser(LyXView * lv, Dialogs * d, const string & name) : FormBaseBD(lv, d, name) {} diff --git a/src/frontends/xforms/FormCharacter.C b/src/frontends/xforms/FormCharacter.C index 234ed12f11..cfe6bc5c3a 100644 --- a/src/frontends/xforms/FormCharacter.C +++ b/src/frontends/xforms/FormCharacter.C @@ -25,9 +25,7 @@ #include "language.h" #include "combox.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormCharacter::FormCharacter(LyXView * lv, Dialogs * d) diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index b0eab6e6bd..5634a1bee0 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -40,9 +40,7 @@ #include "bufferview_funcs.h" #include "xforms_helpers.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif #define USE_CLASS_COMBO 1 diff --git a/src/frontends/xforms/FormExternal.h b/src/frontends/xforms/FormExternal.h index 8e3e776253..ca4b2e364f 100644 --- a/src/frontends/xforms/FormExternal.h +++ b/src/frontends/xforms/FormExternal.h @@ -89,7 +89,7 @@ private: bool input(FL_OBJECT * obj, long data); /// inset::hide connection. - Connection ih_; + SigC::Connection ih_; /// build the dialog FD_form_external * build_external(); diff --git a/src/frontends/xforms/FormFiledialog.C b/src/frontends/xforms/FormFiledialog.C index c9a9700e5e..6aba39e629 100644 --- a/src/frontends/xforms/FormFiledialog.C +++ b/src/frontends/xforms/FormFiledialog.C @@ -71,10 +71,6 @@ extern "C" int gettimeofday(struct timeval *, struct timezone *); #include "support/filetools.h" #include "FormFiledialog.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - // six months, in seconds static const long SIX_MONTH_SEC = 6L * 30L * 24L * 60L * 60L; static const long ONE_HOUR_SEC = 60L * 60L; diff --git a/src/frontends/xforms/FormFiledialog.h b/src/frontends/xforms/FormFiledialog.h index 5d87dd0594..8ba1464a24 100644 --- a/src/frontends/xforms/FormFiledialog.h +++ b/src/frontends/xforms/FormFiledialog.h @@ -1,3 +1,4 @@ +// -*- C++ -*- /** * \file FormFiledialog.h * Copyright 2001 the LyX Team @@ -25,11 +26,6 @@ #include "frontends/FileDialog.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -using SigC::Connection; -#endif - /// DirEntry internal structure definition class DirEntry { public: @@ -45,7 +41,7 @@ extern "C" void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data); extern "C" void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data); extern "C" int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev); -class FileDialog::Private : public Object +class FileDialog::Private : public SigC::Object { public: /// @@ -128,7 +124,7 @@ private: /// Simulates a click on OK/Cancel void Force(bool); /// Redraw connection. - Connection r_; + SigC::Connection r_; }; #endif // FORMFILEDIALOG_H diff --git a/src/frontends/xforms/FormInclude.h b/src/frontends/xforms/FormInclude.h index cb046173b9..f697ad9942 100644 --- a/src/frontends/xforms/FormInclude.h +++ b/src/frontends/xforms/FormInclude.h @@ -74,7 +74,7 @@ private: ButtonController bc_; /// inset::hide connection. - Connection ih_; + SigC::Connection ih_; /// pointer to the inset passed through showInset InsetInclude * inset_; diff --git a/src/frontends/xforms/FormInset.h b/src/frontends/xforms/FormInset.h index 53946c6f49..f9c4898572 100644 --- a/src/frontends/xforms/FormInset.h +++ b/src/frontends/xforms/FormInset.h @@ -36,7 +36,7 @@ protected: virtual void updateSlot(bool); /// inset::hide connection. - Connection ih_; + SigC::Connection ih_; }; diff --git a/src/frontends/xforms/FormLog.C b/src/frontends/xforms/FormLog.C index dc74a12b0b..bbcc99b845 100644 --- a/src/frontends/xforms/FormLog.C +++ b/src/frontends/xforms/FormLog.C @@ -19,10 +19,6 @@ #include "lyxrc.h" #include "buffer.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - FormLog::FormLog(LyXView * lv, Dialogs * d) : FormBrowser(lv, d, _("LaTeX Log")) { diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 0c28102a8a..682e25c2c9 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -26,9 +26,7 @@ #include "lyxtext.h" #include "xforms_helpers.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormParagraph::FormParagraph(LyXView * lv, Dialogs * d) : FormBaseBD(lv, d, _("Paragraph Layout")) diff --git a/src/frontends/xforms/FormPreamble.C b/src/frontends/xforms/FormPreamble.C index af3746d99d..b82a6e2cea 100644 --- a/src/frontends/xforms/FormPreamble.C +++ b/src/frontends/xforms/FormPreamble.C @@ -23,9 +23,7 @@ #include "gettext.h" #include "xforms_helpers.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormPreamble::FormPreamble(LyXView * lv, Dialogs * d) : FormBaseBD(lv, d, _("LaTeX preamble")) diff --git a/src/frontends/xforms/FormPrint.C b/src/frontends/xforms/FormPrint.C index d9ad659b49..717bba95ef 100644 --- a/src/frontends/xforms/FormPrint.C +++ b/src/frontends/xforms/FormPrint.C @@ -24,15 +24,8 @@ #include "lyx_gui_misc.h" // WriteAlert #include "xforms_helpers.h" // for browseFile -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - -#ifdef CXX_WORKING_NAMESPACES using Liason::printBuffer; using Liason::getPrinterParams; -#endif - using std::make_pair; FormPrint::FormPrint(LyXView * lv, Dialogs * d) diff --git a/src/frontends/xforms/FormSearch.C b/src/frontends/xforms/FormSearch.C index 5f87c1c7d5..c9e86ad3a6 100644 --- a/src/frontends/xforms/FormSearch.C +++ b/src/frontends/xforms/FormSearch.C @@ -23,9 +23,7 @@ #include "lyxfind.h" #include "debug.h" -#ifdef CXX_WORKING_NAMESPACES using Liason::setMinibuffer; -#endif FormSearch::FormSearch(LyXView * lv, Dialogs * d) diff --git a/src/frontends/xforms/FormSplash.h b/src/frontends/xforms/FormSplash.h index 2579de3bf4..335d63d6cd 100644 --- a/src/frontends/xforms/FormSplash.h +++ b/src/frontends/xforms/FormSplash.h @@ -48,7 +48,7 @@ private: /// our container Dialogs * d_; /// the show connection - Connection c_; + SigC::Connection c_; }; #endif // FORMSPLASH_H diff --git a/src/frontends/xforms/FormVCLog.C b/src/frontends/xforms/FormVCLog.C index 188cbeb76c..de7dead4ae 100644 --- a/src/frontends/xforms/FormVCLog.C +++ b/src/frontends/xforms/FormVCLog.C @@ -19,10 +19,6 @@ #include "lyxrc.h" #include "buffer.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - FormVCLog::FormVCLog(LyXView * lv, Dialogs * d) : FormBrowser(lv, d, _("Version Control Log")) { diff --git a/src/graphics/GraphicsCacheItem.h b/src/graphics/GraphicsCacheItem.h index 89f5eccfa6..3b5c04128d 100644 --- a/src/graphics/GraphicsCacheItem.h +++ b/src/graphics/GraphicsCacheItem.h @@ -24,11 +24,7 @@ #include #include -#include "sigc++/signal_system.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -#endif - +#include class LyXImage; diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index f14c61a7a4..832a115191 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,5 +1,7 @@ 2001-03-15 Lars Gullik Bjønnes + * several files: remvoe CXX_WORKING_NAMESPACES + * ExternalTemplate.h: noncopyable is in namespace boost * insetinclude.h: ditto * insetcommand.h: ditto diff --git a/src/insets/figinset.C b/src/insets/figinset.C index 2b8a109d49..b5c4278980 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -65,10 +65,6 @@ #include "converter.h" #include "frontends/Dialogs.h" // redrawGUI -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - using std::ostream; using std::istream; using std::ofstream; @@ -955,7 +951,7 @@ InsetFig::InsetFig(int tmpx, int tmpy, Buffer const & o) raw_wid = raw_hgh = 0; changedfname = false; RegisterFigure(this); - r_ = Dialogs::redrawGUI.connect(slot(this, &InsetFig::redraw)); + r_ = Dialogs::redrawGUI.connect(SigC::slot(this, &InsetFig::redraw)); } diff --git a/src/insets/figinset.h b/src/insets/figinset.h index 13d6a4f461..058d156e00 100644 --- a/src/insets/figinset.h +++ b/src/insets/figinset.h @@ -17,13 +17,8 @@ struct Figref; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -using SigC::Connection; -#endif - /// -class InsetFig: public Inset, public Object { +class InsetFig: public Inset, public SigC::Object { public: /// InsetFig(int tmpx, int tmpy, Buffer const &); @@ -156,7 +151,7 @@ private: /// get sizes from .eps file void GetPSSizes(); /// Redraw connection. - Connection r_; + SigC::Connection r_; }; diff --git a/src/insets/insetcommand.h b/src/insets/insetcommand.h index d7225cda3e..cb06454208 100644 --- a/src/insets/insetcommand.h +++ b/src/insets/insetcommand.h @@ -20,10 +20,6 @@ #include #include -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -#endif - // Created by Alejandro 970222 /** Used to insert a LaTeX command automatically * @@ -131,7 +127,7 @@ public: /// void setParams(InsetCommandParams const &); /// - Signal0 hideDialog; + SigC::Signal0 hideDialog; private: /// InsetCommandParams p_; diff --git a/src/insets/inseterror.h b/src/insets/inseterror.h index 8233d2dbe6..82779294dd 100644 --- a/src/insets/inseterror.h +++ b/src/insets/inseterror.h @@ -20,10 +20,6 @@ #include "LString.h" #include -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -#endif - /** Used for error messages from LaTeX runs. The edit-operation opens a @@ -73,8 +69,7 @@ public: /// string const & getContents() const { return contents; } /// - Signal0 hideDialog; - + SigC::Signal0 hideDialog; private: /// string contents; diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index 6639eacbbe..92fcf4e999 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -30,10 +30,6 @@ #include "support/path.h" #include "support/syscall.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - using std::endl; InsetExternal::InsetExternal() diff --git a/src/insets/insetexternal.h b/src/insets/insetexternal.h index 278ad8a827..fdc870e6aa 100644 --- a/src/insets/insetexternal.h +++ b/src/insets/insetexternal.h @@ -21,10 +21,6 @@ #include "LString.h" #include -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -#endif - /// class InsetExternal : public InsetButton { public: @@ -101,7 +97,7 @@ public: InsetExternalParams params() const; /// hide connection - Signal0 hideDialog; + SigC::Signal0 hideDialog; private: /// Write the output for a specific file format diff --git a/src/insets/insetgraphics.h b/src/insets/insetgraphics.h index 5cb82a91de..96df55fd29 100644 --- a/src/insets/insetgraphics.h +++ b/src/insets/insetgraphics.h @@ -26,22 +26,12 @@ // We need a signal here to hide an active dialog when we are deleted. #include "sigc++/signal_system.h" -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -using SigC::slot; -using SigC::Object; -#endif class Dialogs; class LyXImage; /// -#ifdef SIGC_CXX_NAMESPACES -class InsetGraphics : public Inset, public SigC::Object -#else -class InsetGraphics : public Inset, public Object -#endif -{ +class InsetGraphics : public Inset, public SigC::Object { public: /// InsetGraphics(); @@ -101,7 +91,7 @@ public: /** This signal is connected by our dialog and called when the inset is deleted. */ - Signal0 hideDialog; + SigC::Signal0 hideDialog; private: /// Update the inset after parameter change. diff --git a/src/insets/insetinclude.h b/src/insets/insetinclude.h index 539cbe9d65..f4a0ef2a39 100644 --- a/src/insets/insetinclude.h +++ b/src/insets/insetinclude.h @@ -106,7 +106,7 @@ public: bool loadIfNeeded() const; /// hide a dialog if about - Signal0 hideDialog; + SigC::Signal0 hideDialog; private: /// get the text displayed on the button string const getScreenLabel() const; diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index 58e77c0ec3..929ac624ed 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -56,10 +56,6 @@ #include "lyxfunc.h" #include -#ifdef SIGC_CXX_NAMESPACES -using SigC::Signal0; -#endif - class LyXLex; class Painter; class BufferView; @@ -180,7 +176,7 @@ public: /// LyXTabular * tabular; /// - Signal0 hideDialog; + SigC::Signal0 hideDialog; private: /// diff --git a/src/intl.C b/src/intl.C index 1dc2f58963..5b0c78e48a 100644 --- a/src/intl.C +++ b/src/intl.C @@ -31,10 +31,6 @@ #include "language.h" #include "frontends/Dialogs.h" // redrawGUI -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - using std::endl; // a wrapper around the callback static member. diff --git a/src/intl.h b/src/intl.h index 0faf1a6712..1327dee213 100644 --- a/src/intl.h +++ b/src/intl.h @@ -21,11 +21,6 @@ class LyXText; class Combox; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -using SigC::Connection; -#endif - /// default character set #define DEFCHSET "iso8859-1" @@ -34,7 +29,7 @@ using SigC::Connection; classes. Probably should the gui class just have a pointer to the non gui class. */ -class Intl : public Object { +class Intl : public SigC::Object { public: /// Intl(); @@ -101,7 +96,7 @@ private: /// TransManager trans; /// Redraw connection. - Connection r_; + SigC::Connection r_; }; diff --git a/src/minibuffer.C b/src/minibuffer.C index 8128a6b218..2fb6a3b3c7 100644 --- a/src/minibuffer.C +++ b/src/minibuffer.C @@ -30,10 +30,6 @@ using std::endl; -#ifdef SIGC_CXX_NAMESPACES -using SigC::slot; -#endif - extern bool keyseqUncomplete(); extern string keyseqOptions(int l = 190); extern string keyseqStr(int l = 190); diff --git a/src/minibuffer.h b/src/minibuffer.h index 2fa8b168c0..23add6dbb4 100644 --- a/src/minibuffer.h +++ b/src/minibuffer.h @@ -13,12 +13,8 @@ class LyXView; -#ifdef SIGC_CXX_NAMESPACES -using SigC::Object; -#endif - /// -class MiniBuffer : public Object{ +class MiniBuffer : public SigC::Object { public: /// MiniBuffer(LyXView * o, diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 6cab81fbfd..b365c07c28 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,5 +1,7 @@ 2001-03-15 Lars Gullik Bjønnes + * several files: remove CXX_WORKING_NAMESPACES + * FileInfo.h: noncopyable is in namespace boost * path.h: ditto diff --git a/src/support/kill.C b/src/support/kill.C index 241dc31524..d121843cb4 100644 --- a/src/support/kill.C +++ b/src/support/kill.C @@ -3,18 +3,9 @@ #include #include -#ifdef CXX_WORKING_NAMESPACES -namespace lyx { - int kill(int pid, int sig) - { - return ::kill(pid, sig); - } -} -#else #include "lyxlib.h" int lyx::kill(int pid, int sig) { return ::kill(pid, sig); } -#endif diff --git a/src/support/lyxlib.h b/src/support/lyxlib.h index d178797b05..4df4e58557 100644 --- a/src/support/lyxlib.h +++ b/src/support/lyxlib.h @@ -19,50 +19,39 @@ // (an inlined member of some class)? // Use a namespace if we can, a struct otherwise -#ifdef CXX_WORKING_NAMESPACES -#define OPT_STATIC namespace lyx { -#else -#define OPT_STATIC static -struct lyx { -#endif - /// - OPT_STATIC string const getcwd(); - /// - OPT_STATIC int chdir(string const & name); - /// Returns false if it fails - OPT_STATIC bool rename(string const & from, string const & to); - /// Returns false it it fails - OPT_STATIC bool copy(string const & from, string const & to); - /// generates a checksum - OPT_STATIC unsigned long sum(string const & file); - /// returns a date string (not used currently) - OPT_STATIC char * date(); - /// returns the name of the user (not used currently) - OPT_STATIC string const getUserName(); - /// - OPT_STATIC int kill(int pid, int sig); - /// - OPT_STATIC void abort(); - /// - OPT_STATIC int mkdir(string const & pathname, unsigned long int mode); - /// - OPT_STATIC int putenv(char const * str); - /// - OPT_STATIC int unlink(string const & file); - /// - OPT_STATIC int rmdir(string const & file); - /// - OPT_STATIC int atoi(string const & nstr); - /// - OPT_STATIC string const tempName(string const & dir = string(), - string const & mask = string()); -#ifdef CXX_WORKING_NAMESPACES -} -#else -}; -#endif -#undef OPT_STATIC - +/// +string const getcwd(); +/// +int chdir(string const & name); +/// Returns false if it fails +bool rename(string const & from, string const & to); +/// Returns false it it fails +bool copy(string const & from, string const & to); +/// generates a checksum +unsigned long sum(string const & file); +/// returns a date string (not used currently) +char * date(); +/// returns the name of the user (not used currently) +string const getUserName(); +/// +int kill(int pid, int sig); +/// +void abort(); +/// +int mkdir(string const & pathname, unsigned long int mode); +/// +int putenv(char const * str); +/// +int unlink(string const & file); +/// +int rmdir(string const & file); +/// +int atoi(string const & nstr); +/// +string const tempName(string const & dir = string(), + string const & mask = string()); + +} // namespace lyx #endif /* LYX_LIB_H */ diff --git a/src/support/putenv.C b/src/support/putenv.C index d4994099cc..a54c0dff3b 100644 --- a/src/support/putenv.C +++ b/src/support/putenv.C @@ -2,18 +2,8 @@ #include -#ifdef CXX_WORKING_NAMESPACES -namespace lyx { - int putenv(char const * str) - { - return ::putenv(const_cast(str)); - } -} -#else #include "lyxlib.h" int lyx::putenv(char const * str) { return ::putenv(const_cast(str)); } - -#endif diff --git a/src/support/sstream.h b/src/support/sstream.h index 5a4d5d68fc..2dc2e0d10c 100644 --- a/src/support/sstream.h +++ b/src/support/sstream.h @@ -39,11 +39,8 @@ the executable file might be covered by the GNU General Public License. */ #include #include -#ifdef CXX_WORKING_NAMESPACES namespace std { -#endif - class stringbuf : public streambuf { public: @@ -169,9 +166,7 @@ namespace std { } }; -#ifdef CXX_WORKING_NAMESPACES -} -#endif +} // namespace std inline int stringbuf::sync() {