Make syncing fly again :) Also removed not-yet-used Core menu.
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 26 Feb 2008 23:50:37 +0000 (23:50 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 26 Feb 2008 23:50:37 +0000 (23:50 +0000)
src/client/client.cpp
src/qtui/mainwin.cpp
src/qtui/ui/mainwin.ui

index 24f1726..2af930f 100644 (file)
@@ -171,8 +171,10 @@ Buffer *Client::buffer(BufferInfo bufferInfo) {
     emit client->bufferUpdated(bufferInfo);
 
     // I don't like this: but currently there isn't really a prettier way:
     emit client->bufferUpdated(bufferInfo);
 
     // I don't like this: but currently there isn't really a prettier way:
-    QModelIndex bufferIdx = networkModel()->bufferIndex(bufferInfo.bufferId());
-    bufferModel()->setCurrentIndex(bufferModel()->mapFromSource(bufferIdx));
+    if(isSynced()) {  // this slows down syncing a lot, so disable it during sync
+      QModelIndex bufferIdx = networkModel()->bufferIndex(bufferInfo.bufferId());
+      bufferModel()->setCurrentIndex(bufferModel()->mapFromSource(bufferIdx));
+    }
   }
   Q_ASSERT(buff);
   return buff;
   }
   Q_ASSERT(buff);
   return buff;
index 32a59df..e88a86d 100644 (file)
@@ -319,7 +319,7 @@ void MainWin::connectedToCore() {
   }
 
   ui.menuViews->setEnabled(true);
   }
 
   ui.menuViews->setEnabled(true);
-  ui.menuCore->setEnabled(true);
+  //ui.menuCore->setEnabled(true);
   ui.actionConnectCore->setEnabled(false);
   ui.actionDisconnectCore->setEnabled(true);
   //ui.actionNetworkList->setEnabled(true);
   ui.actionConnectCore->setEnabled(false);
   ui.actionDisconnectCore->setEnabled(true);
   //ui.actionNetworkList->setEnabled(true);
@@ -329,7 +329,7 @@ void MainWin::connectedToCore() {
 
 void MainWin::disconnectedFromCore() {
   ui.menuViews->setEnabled(false);
 
 void MainWin::disconnectedFromCore() {
   ui.menuViews->setEnabled(false);
-  ui.menuCore->setEnabled(false);
+  //ui.menuCore->setEnabled(false);
   ui.actionDisconnectCore->setEnabled(false);
   //ui.actionNetworkList->setEnabled(false);
   ui.bufferWidget->hide();
   ui.actionDisconnectCore->setEnabled(false);
   //ui.actionNetworkList->setEnabled(false);
   ui.bufferWidget->hide();
index 8c55c8a..cd04808 100644 (file)
    <string>MainWindow</string>
   </property>
   <widget class="QWidget" name="centralwidget" >
    <string>MainWindow</string>
   </property>
   <widget class="QWidget" name="centralwidget" >
+   <property name="geometry" >
+    <rect>
+     <x>0</x>
+     <y>27</y>
+     <width>800</width>
+     <height>549</height>
+    </rect>
+   </property>
    <property name="sizePolicy" >
     <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
      <horstretch>0</horstretch>
    <property name="sizePolicy" >
     <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
      <horstretch>0</horstretch>
     <property name="spacing" >
      <number>6</number>
     </property>
     <property name="spacing" >
      <number>6</number>
     </property>
-    <property name="leftMargin" >
-     <number>0</number>
-    </property>
-    <property name="topMargin" >
-     <number>0</number>
-    </property>
-    <property name="rightMargin" >
-     <number>0</number>
-    </property>
-    <property name="bottomMargin" >
+    <property name="margin" >
      <number>0</number>
     </property>
     <item>
      <number>0</number>
     </property>
     <item>
     </property>
     <addaction name="actionDebug_Console" />
    </widget>
     </property>
     <addaction name="actionDebug_Console" />
    </widget>
-   <widget class="QMenu" name="menuCore" >
-    <property name="title" >
-     <string>&amp;Core</string>
-    </property>
-   </widget>
    <addaction name="menuFile" />
    <addaction name="menuViews" />
    <addaction name="menuFile" />
    <addaction name="menuViews" />
-   <addaction name="menuCore" />
    <addaction name="menuSettings" />
    <addaction name="menuDebug" />
    <addaction name="menuHelp" />
   </widget>
    <addaction name="menuSettings" />
    <addaction name="menuDebug" />
    <addaction name="menuHelp" />
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
+  <widget class="QStatusBar" name="statusbar" >
+   <property name="geometry" >
+    <rect>
+     <x>0</x>
+     <y>576</y>
+     <width>800</width>
+     <height>24</height>
+    </rect>
+   </property>
+  </widget>
   <action name="actionNetworkList" >
    <property name="enabled" >
     <bool>false</bool>
   <action name="actionNetworkList" >
    <property name="enabled" >
     <bool>false</bool>
   </action>
   <action name="actionQuit" >
    <property name="icon" >
   </action>
   <action name="actionQuit" >
    <property name="icon" >
-    <iconset resource="../../icons/icons.qrc" >:/22x22/actions/oxygen/22x22/actions/application-exit.png</iconset>
+    <iconset resource="../../icons/icons.qrc" >
+     <normaloff>:/22x22/actions/oxygen/22x22/actions/application-exit.png</normaloff>:/22x22/actions/oxygen/22x22/actions/application-exit.png</iconset>
    </property>
    <property name="text" >
     <string>Quit...</string>
    </property>
    <property name="text" >
     <string>Quit...</string>
   </action>
   <action name="actionSettingsDlg" >
    <property name="icon" >
   </action>
   <action name="actionSettingsDlg" >
    <property name="icon" >
-    <iconset/>
+    <iconset>
+     <normaloff/>
+    </iconset>
    </property>
    <property name="text" >
     <string>Configure Quassel...</string>
    </property>
    <property name="text" >
     <string>Configure Quassel...</string>
     <bool>true</bool>
    </property>
    <property name="icon" >
     <bool>true</bool>
    </property>
    <property name="icon" >
-    <iconset resource="../../icons/icons.qrc" >:/icons/quassel-icon.png</iconset>
+    <iconset resource="../../icons/icons.qrc" >
+     <normaloff>:/icons/quassel-icon.png</normaloff>:/icons/quassel-icon.png</iconset>
    </property>
    <property name="text" >
     <string>About Quassel IRC...</string>
    </property>
    <property name="text" >
     <string>About Quassel IRC...</string>
     <bool>false</bool>
    </property>
    <property name="icon" >
     <bool>false</bool>
    </property>
    <property name="icon" >
-    <iconset/>
+    <iconset>
+     <normaloff/>
+    </iconset>
    </property>
    <property name="text" >
     <string>Disconnect from Core</string>
    </property>
    <property name="text" >
     <string>Disconnect from Core</string>
     <bool>false</bool>
    </property>
    <property name="icon" >
     <bool>false</bool>
    </property>
    <property name="icon" >
-    <iconset/>
+    <iconset>
+     <normaloff/>
+    </iconset>
    </property>
    <property name="text" >
     <string>Connect to Core...</string>
    </property>
    <property name="text" >
     <string>Connect to Core...</string>