Removing the new chatwidget and other cruft from trunk (which is now our 0.2 branch)
[quassel.git] / src / uisupport / bufferview.cpp
index bb19b75..8ed210f 100644 (file)
@@ -57,7 +57,13 @@ void BufferView::init() {
 
   setSortingEnabled(true);
   sortByColumn(0, Qt::AscendingOrder);
+#ifndef Q_WS_QWS
+  // this is a workaround to not join channels automatically... we need a saner way to navigate for qtopia anyway though,
+  // such as mark first, activate at second click...
   connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(joinChannel(QModelIndex)));
+#else
+  connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(joinChannel(QModelIndex)));  // Qtopia uses single click for activation
+#endif
 }
 
 void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::Modes mode, QList<NetworkId> nets) {
@@ -118,7 +124,7 @@ void BufferView::keyPressEvent(QKeyEvent *event) {
 void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) {
   QTreeView::rowsInserted(parent, start, end);
   if(model()->rowCount(parent) == 1 && parent.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType
-     && (Global::SPUTDEV || parent.data(NetworkModel::ItemActiveRole) == true)) {
+     && parent.data(NetworkModel::ItemActiveRole) == true) {
     // without updating the parent the expand will have no effect... Qt Bug?
     update(parent);
     expand(parent);
@@ -139,12 +145,7 @@ void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bott
       continue;
 
     bool isActive = networkIdx.data(NetworkModel::ItemActiveRole).toBool();
-    if(Global::SPUTDEV) {
-      if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, true);
-    } else {
-      if(isExpanded(networkIdx) != isActive)
-        setExpanded(networkIdx, isActive);
-    }
+    if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, isActive);
   }
 }