]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/FormToc.C
ws cleanup
[lyx.git] / src / frontends / gnome / FormToc.C
index f5ede35ed6b455430c9d0f0ca7c5cbbae21deae2..e694a0c5e10a3b6d3ddcf291121ff37d1c80978b 100644 (file)
@@ -1,6 +1,5 @@
-// -*- C++ -*-
 /* This file is part of
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
@@ -37,16 +36,15 @@ extern "C" {
 #include <gtk--/menu.h>
 #include <gtk--/menuitem.h>
 
-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,11 +55,11 @@ 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();
 }
@@ -70,7 +68,7 @@ void FormToc::showInset( InsetCommand * const inset )
 void FormToc::createInset( string const & arg )
 {
   if( dialog_!=0 ) return;
-  
+
   params.setFromString( arg );
   show();
 }
@@ -97,33 +95,33 @@ void FormToc::show()
       Gtk::MenuItem * e;
 
       choice_->get_menu()->items().clear();
-      
+
       e = manage( new Gtk::MenuItem(_("Table of Contents")) );
-      e->activate.connect(bind<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_TOC));
+      e->activate.connect(SigC::bind<Buffer::TocType>(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<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_LOF));
+      e->activate.connect(SigC::bind<Buffer::TocType>(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<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_LOT));
+      e->activate.connect(SigC::bind<Buffer::TocType>(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<Buffer::TocType>(slot(this, &FormToc::changeList), Buffer::TOC_LOA));
+      e->activate.connect(SigC::bind<Buffer::TocType>(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<bool>(slot(this, &FormToc::updateSlot),false));
+
+      b_refresh->clicked.connect(SigC::bind<bool>(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();
 
@@ -154,14 +152,14 @@ void FormToc::updateSlot(bool)
       list_->items().push_back( *l );
       return;
     }
-  
-  
+
+
   if (dialog_ != 0 &&
       lv_->view()->available())
     {
 
       int selection = 0;
-      
+
       if( params.getCmdName() == "tableofcontents" )
        {
          type = Buffer::TOC_TOC;
@@ -190,7 +188,7 @@ void FormToc::updateSlot(bool)
       ignore_callback_ = true;
       choice_->set_history(selection);
       ignore_callback_ = false;
-      
+
       list_->items().clear();
 
       dialog_->set_title(wintitle);
@@ -214,7 +212,7 @@ void FormToc::updateSlot(bool)
 
 void FormToc::apply(Buffer::TocItem tg)
 {
-#if 0  
+#if 0
   // Doesn't compile anymore...
   if (!lv_->view()->available()) return;
 
@@ -266,4 +264,3 @@ void FormToc::free()
       ih_.disconnect();
     }
 }