From: Marcus Eggenberger Date: Wed, 4 Jun 2008 10:36:32 +0000 (+0200) Subject: some minor fixes: X-Git-Tag: 0.3.0~393 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=d1b2699b8a77947f1b7dd67841c6ecb4ea1fce1e;ds=sidebyside some minor fixes: - strange behavior of disabled autoadd for custom views - permanently remvoed buffers disappear now instantly - fixed a gcc warning BR #162 --- diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 64d4fd7c..925c64f7 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -520,7 +520,7 @@ void MainWin::closeEvent(QCloseEvent *event) { } void MainWin::systrayActivated( QSystemTrayIcon::ActivationReason activationReason) { - if (activationReason == QSystemTrayIcon::Trigger) { + if(activationReason == QSystemTrayIcon::Trigger) { toggleVisibility(); } } @@ -528,11 +528,12 @@ void MainWin::systrayActivated( QSystemTrayIcon::ActivationReason activationReas void MainWin::toggleVisibility() { if(isHidden() /*|| !isActiveWindow()*/) { show(); - if(isMinimized()) - if (isMaximized()) + if(isMinimized()) { + if(isMaximized()) showMaximized(); else showNormal(); + } raise(); activateWindow(); diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index 5dcb7e8c..396922da 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -93,6 +93,7 @@ void BufferViewFilter::configInitialized() { connect(config(), SIGNAL(bufferAdded(const BufferId &, int)), this, SLOT(invalidate())); connect(config(), SIGNAL(bufferMoved(const BufferId &, int)), this, SLOT(invalidate())); connect(config(), SIGNAL(bufferRemoved(const BufferId &)), this, SLOT(invalidate())); + connect(config(), SIGNAL(bufferPermanentlyRemoved(const BufferId &)), this, SLOT(invalidate())); disconnect(config(), SIGNAL(initDone()), this, SLOT(configInitialized())); @@ -180,10 +181,10 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex) // add the buffer if... if(config()->isInitialized() && !config()->removedBuffers().contains(bufferId) // it hasn't been manually removed and either && ((config()->addNewBuffersAutomatically() && !config()->temporarilyRemovedBuffers().contains(bufferId)) // is totally unknown to us (a new buffer)... - || activityLevel > Buffer::OtherActivity)) { // or was just temporarily hidden and has a new message waiting for us. + || (config()->temporarilyRemovedBuffers().contains(bufferId) && activityLevel > Buffer::OtherActivity))) { // or was just temporarily hidden and has a new message waiting for us. addBuffer(bufferId); } - // note: adding the buffer to the valid list does not temper with the filters ("show only channels" and stuff) + // note: adding the buffer to the valid list does not temper with the following filters ("show only channels" and stuff) return false; }