Fixing BR #227 - removing context menu of the buffer view preview in the settingspage
authorMarcus Eggenberger <egs@quassel-irc.org>
Mon, 3 Nov 2008 12:59:10 +0000 (13:59 +0100)
committerMarcus Eggenberger <egs@quassel-irc.org>
Mon, 3 Nov 2008 12:59:10 +0000 (13:59 +0100)
src/qtui/settingspages/bufferviewsettingspage.ui
src/qtui/settingspages/previewbufferview.h [new file with mode: 0644]
src/qtui/settingspages/settingspages.inc

index b37e45d..6bba3c2 100644 (file)
       </widget>
      </item>
      <item>
-      <widget class="BufferView" name="bufferViewPreview" />
+      <widget class="PreviewBufferView" name="bufferViewPreview" />
      </item>
     </layout>
    </item>
  </widget>
  <customwidgets>
   <customwidget>
-   <class>BufferView</class>
+   <class>PreviewBufferView</class>
    <extends>QTreeView</extends>
-   <header>bufferview.h</header>
+   <header>settingspages/previewbufferview.h</header>
   </customwidget>
  </customwidgets>
  <resources/>
diff --git a/src/qtui/settingspages/previewbufferview.h b/src/qtui/settingspages/previewbufferview.h
new file mode 100644 (file)
index 0000000..cd741e7
--- /dev/null
@@ -0,0 +1,37 @@
+/***************************************************************************
+ *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ ***************************************************************************/
+
+#ifndef PREVIEWBUFFERVIEW_H
+#define PREVIEWBUFFERVIEW_H
+
+#include "bufferview.h"
+
+class PreviewBufferView : public BufferView {
+  Q_OBJECT
+
+public:
+  PreviewBufferView(QWidget *parent = 0) : BufferView(parent) {}
+
+protected:
+  virtual void keyPressEvent(QKeyEvent *event) { QTreeView::keyPressEvent(event); }
+  virtual void contextMenuEvent(QContextMenuEvent *) {}
+};
+
+#endif //PREVIEWBUFFERVIEW_H
index 9549d99..7dc6e1a 100644 (file)
@@ -5,5 +5,5 @@ set(SETTINGSPAGES aliases appearance bufferview color fonts general highlight id
 
 # Specify additional files (e.g. for subdialogs) here!
 set(SP_SOURCES aliasesmodel.cpp notificationssettingspage.cpp)
-set(SP_HEADERS aliasesmodel.h notificationssettingspage.h)
+set(SP_HEADERS aliasesmodel.h notificationssettingspage.h previewbufferview.h)
 set(SP_FORMS buffervieweditdlg.ui createidentitydlg.ui saveidentitiesdlg.ui networkeditdlg.ui nickeditdlg.ui servereditdlg.ui)