]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/Menubar_pimpl.C
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / Menubar_pimpl.C
index 3a0c64348ff516bd39c653f1c78e744acd2651d3..b4c70ced499d1a3d04f53da77fe6014124eda778 100644 (file)
@@ -1,15 +1,15 @@
 /**
- * \file Menubar_pimpl.C
- * Copyright 1999-2001 The LyX Team.
- * See the file COPYING.
+ * \file qt2/Menubar_pimpl.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author  Lars Gullik Bjønnes, larsbj@lyx.org
+ * \author  Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#include <algorithm>
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
 #include "QtView.h"
 #include "QLPopupMenu.h"
+
 #include <qmenubar.h>
 #include <qcursor.h>
+
+#include <algorithm>
+
 using std::endl;
 using std::vector;
 using std::max;
@@ -39,7 +41,8 @@ using std::min;
 using std::for_each;
 using std::pair;
 
-Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe) 
+
+Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe)
        : owner_(static_cast<QtView*>(view)), menubackend_(mbe)
 {
        Menu::const_iterator m = mbe.getMenubar().begin();
@@ -48,16 +51,14 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe)
                pair<int, QLPopupMenu *> menu =
                        createMenu(owner_->menuBar(), &(*m), this, true);
                name_map_[m->submenuname()] = menu.second;
-               QObject::connect(menu.second, SIGNAL(activated(int)),
-                       owner_, SLOT(activated(int)));
        }
 }
 
 
 void Menubar::Pimpl::openByName(string const & name)
 {
-       NameMap::const_iterator const cit = name_map_.find(name); 
-       if (cit == name_map_.end()) 
+       NameMap::const_iterator const cit = name_map_.find(name);
+       if (cit == name_map_.end())
                return;
 
        // this will have to do I'm afraid.