]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/FormIndex.C
Remove unneeded files, we have switched to use the libglade and there is no
[lyx.git] / src / frontends / gnome / FormIndex.C
index aa20b517eb86cd9fa7217b68482f4d3a2e93b68e..73c6d430d491b085b2fab9ab3eb706da7afd5371 100644 (file)
 #include "mainapp.h"
 extern GLyxAppWin * mainAppWin;
 
+namespace {
+
 // configuration keys
-static string const CONF_ENTRY("FormIndex_entry");
+string const CONF_ENTRY("FormIndex_entry");
+
+} // namespace anon
+
 
 FormIndex::FormIndex(LyXView * lv, Dialogs * d)
-       : lv_(lv), d_(d), inset_(0), u_(0), h_(0), ih_(0), dialog_(NULL)
+       : lv_(lv), d_(d), inset_(0), u_(0), h_(0), ih_(0), dialog_(0)
 {
   // let the dialog be shown
   // These are permanent connections so we won't bother
@@ -63,10 +68,10 @@ FormIndex::~FormIndex()
 
 void FormIndex::showInset( InsetCommand * const inset )
 {
-  if( dialog_!=NULL || inset == 0 ) return;
+  if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormIndex::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormIndex::hide));
   
   params = inset->params();
   show();
@@ -74,7 +79,7 @@ void FormIndex::showInset( InsetCommand * const inset )
 
 void FormIndex::createInset( string const & arg )
 {
-  if( dialog_!=NULL ) return;
+  if( dialog_!=0 ) return;
   
   params.setFromString( arg );
   show();
@@ -131,14 +136,14 @@ void FormIndex::show()
 
       dialog_->destroy.connect(slot(this, &FormIndex::free));
 
-      u_ = d_->updateBufferDependent.connect(slot(this, &FormIndex::update));
+      u_ = d_->updateBufferDependent.connect(slot(this, &FormIndex::updateSlot));
       h_ = d_->hideBufferDependent.connect(slot(this, &FormIndex::hide));
 
-      update();  // make sure its up-to-date
+      updateSlot();  // make sure its up-to-date
     }
 }
 
-void FormIndex::update(bool switched)
+void FormIndex::updateSlot(bool switched)
 {
   if (switched)
     {
@@ -146,7 +151,7 @@ void FormIndex::update(bool switched)
       return;
     }
   
-  if (dialog_ != NULL &&
+  if (dialog_ != 0 &&
       lv_->view()->available())
     {
       keyword_->get_entry()->set_text(params.getContents().c_str());
@@ -160,14 +165,14 @@ void FormIndex::update(bool switched)
       
 void FormIndex::hide()
 {
-  if (dialog_!=NULL) mainAppWin->remove_action();
+  if (dialog_!=0) mainAppWin->remove_action();
 }
 
 void FormIndex::free()
 {
-  if (dialog_!=NULL)
+  if (dialog_!=0)
     {
-      dialog_ = NULL;
+      dialog_ = 0;
       u_.disconnect();
       h_.disconnect();
       inset_ = 0;