]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/FormRef.C
Clean-up of the button controller.
[lyx.git] / src / frontends / gnome / FormRef.C
index dc2fa4b01bf8c3f2c4c2f45980c3dcbf0e8c4855..6cacca2e990abb128b871ea2291dfca98f2de9c7 100644 (file)
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /* This file is part of
  * ====================================================== 
  *
 #include "mainapp.h"
 extern GLyxAppWin * mainAppWin;
 
-using SigC::bind;
+namespace anon {
 
 // configuration keys
-static string const CONF_ENTRY_NAME("FormRef_name");
+string const CONF_ENTRY_NAME("FormRef_name");
 
 // goto button labels
-static string const GOTO_REF_LABEL(N_("Goto reference"));
-static string const GOTO_BACK_LABEL(N_("Go back"));
+string const GOTO_REF_LABEL(N_("Goto reference"));
+string const GOTO_BACK_LABEL(N_("Go back"));
+
+} // namespace anon
+
 
 FormRef::FormRef(LyXView * lv, Dialogs * d)
        : lv_(lv), d_(d), inset_(0), u_(0), h_(0), ih_(0), dialog_(0)
@@ -69,7 +71,7 @@ void FormRef::showInset( InsetCommand * const inset )
   if( dialog_!=0 || inset == 0 ) return;
   
   inset_ = inset;
-  ih_ = inset_->hide.connect(slot(this, &FormRef::hide));
+  ih_ = inset_->hideDialog.connect(slot(this, &FormRef::hide));
 
   acttype_ = EDIT;
   
@@ -364,7 +366,7 @@ void FormRef::gotoRef()
     }
   case GOBACK:
     {
-      lv_->getLyXFunc()->Dispatch(LFUN_REF_BACK);
+      lv_->getLyXFunc()->Dispatch(LFUN_BOOKMARK_GOTO, "0");
 
       gototype_ = GOREF;
       b_goto->set_text(GOTO_REF_LABEL);
@@ -394,6 +396,7 @@ void FormRef::apply()
     {
       lv_->getLyXFunc()->Dispatch(LFUN_REF_INSERT,
                                  params.getAsString());
+      lv_->getLyXFunc()->Dispatch(LFUN_BOOKMARK_SAVE, "0");
     }
 
   // save configuration