[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Konversation] e84e341: Implemented an option to hide Join / Part /
From: Dario Abatianni <eisfuchs () tigress ! com>
Date: 2010-07-01 13:27:08
Message-ID: 20100701132708.0DB43BB5519 () projects ! kde ! org
[Download RAW message or body]
commit e84e341c43631d894af86945788316bba52f6dd1
Author: Dario Abatianni <eisfuchs@tigress.com>
Date: Thu Dec 4 23:48:34 2003 +0000
Implemented an option to hide Join / Part / Nickchange events
svn path=/trunk/kdeextragear-2/konversation/; revision=271273
diff --git a/ChangeLog b/ChangeLog
index 21846ab..82931f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@ Changes from 0.13 to 0.14
- Topic line can now be hidden
- Added an away nickname
- Added "Open URL" context menu to channel list entries
+- Implemented slower / faster blinking of tabs for more / less important events
+- Less important events like Join, Part and Nickchanges can now be hidden
Changes from 0.12 to 0.13
- Added an option to hide hostmasks in channel nick lists
diff --git a/TODO b/TODO
index d396536..8572e72 100644
--- a/TODO
+++ b/TODO
@@ -20,6 +20,7 @@ History viewer
Option to disable %G, %C %B... expansion
Fix the /query oneuser, /msg anotheruser problem
Don't trigger events when we did highlight ourselves
+Limit backlog to x lines or KB
Channel List Panel:
and a "channel or topic" checkbox would be nice, or better, make the current checkboxes work as "or" not \
as "and"
diff --git a/konversation/commit.h b/konversation/commit.h
index e41392e..c2dbf6b 100644
--- a/konversation/commit.h
+++ b/konversation/commit.h
@@ -1 +1 @@
-#define COMMIT 1865
+#define COMMIT 1866
diff --git a/konversation/ircview.cpp b/konversation/ircview.cpp
index b6f4dce..bdde538 100644
--- a/konversation/ircview.cpp
+++ b/konversation/ircview.cpp
@@ -568,27 +568,30 @@ void IRCView::doAppend(QString newLine,bool suppressTimestamps,bool important)
#endif
}
- buffer+=line;
- emit newText(highlightColor,important);
+ if(important || !KonversationApplication::preferences.getHideUnimportantEvents())
+ {
+ buffer+=line;
+ emit newText(highlightColor,important);
- // scroll view only if the scroll bar is already at the bottom
+ // scroll view only if the scroll bar is already at the bottom
#if QT_VERSION == 303
- // Does not seem to work very well with QT 3.0.3
- bool doScroll=true;
+ // Does not seem to work very well with QT 3.0.3
+ bool doScroll=true;
#else
- bool doScroll=((contentsHeight()-visibleHeight())==contentsY());
+ bool doScroll=((contentsHeight()-visibleHeight())==contentsY());
#endif
#ifdef TABLE_VERSION
- setText("<qt><table cellpadding=\"0\" cellspacing=\"0\">"+buffer+"</table></qt>");
+ setText("<qt><table cellpadding=\"0\" cellspacing=\"0\">"+buffer+"</table></qt>");
#else
- KTextBrowser::append(line);
+ KTextBrowser::append(line);
#endif
- if(doScroll)
- {
- moveCursor(MoveEnd,false);
- ensureVisible(0,contentsHeight());
+ if(doScroll)
+ {
+ moveCursor(MoveEnd,false);
+ ensureVisible(0,contentsHeight());
+ }
}
}
diff --git a/konversation/konversationapplication.cpp b/konversation/konversationapplication.cpp
index 70cb2a0..084f356 100644
--- a/konversation/konversationapplication.cpp
+++ b/konversation/konversationapplication.cpp
@@ -514,6 +514,8 @@ void KonversationApplication::readOptions()
preferences.setBlinkingTabs(config->readBoolEntry("BlinkingTabs",preferences.getBlinkingTabs()));
preferences.setBringToFront(config->readBoolEntry("BringToFront",preferences.getBringToFront()));
+ preferences.setHideUnimportantEvents(config->readBoolEntry("HideUnimportantEvents",preferences.getHideUnimportantEvents()));
+
preferences.setAutoReconnect(config->readBoolEntry("AutoReconnect",preferences.getAutoReconnect()));
preferences.setAutoRejoin(config->readBoolEntry("AutoRejoin",preferences.getAutoRejoin()));
preferences.setAutojoinOnInvite(config->readBoolEntry("AutojoinOnInvite",preferences.getAutojoinOnInvite()));
@@ -737,6 +739,8 @@ void KonversationApplication::saveOptions(bool updateGUI)
config->writeEntry("BlinkingTabs",preferences.getBlinkingTabs());
config->writeEntry("BringToFront",preferences.getBringToFront());
+ config->writeEntry("HideUnimportantEvents",preferences.getHideUnimportantEvents());
+
config->writeEntry("AutoReconnect",preferences.getAutoReconnect());
config->writeEntry("AutoRejoin",preferences.getAutoRejoin());
config->writeEntry("AutojoinOnInvite",preferences.getAutojoinOnInvite());
diff --git a/konversation/preferences.cpp b/konversation/preferences.cpp
index 2048c68..00ee9ee 100644
--- a/konversation/preferences.cpp
+++ b/konversation/preferences.cpp
@@ -183,6 +183,7 @@ Preferences::Preferences()
setShowTabBarCloseButton(false);
#endif
+ setHideUnimportantEvents(false);
setShowTopic(true);
}
@@ -691,4 +692,7 @@ void Preferences::setShowTabBarCloseButton(bool s) { showTabBarCloseButton = s;
bool Preferences::getShowTopic() { return showTopic; }
void Preferences::setShowTopic(bool s) { showTopic = s; }
+bool Preferences::getHideUnimportantEvents() { return hideUnimportantEvents; }
+void Preferences::setHideUnimportantEvents(bool state) { hideUnimportantEvents=state; }
+
#include "preferences.moc"
diff --git a/konversation/preferences.h b/konversation/preferences.h
index 1ab5987..aad7112 100644
--- a/konversation/preferences.h
+++ b/konversation/preferences.h
@@ -335,11 +335,11 @@ class Preferences : public QObject
// aliases
QStringList getAliasList();
void setAliasList(QStringList aliasList);
-
+
// Nick completion
int getNickCompletionMode();
void setNickCompletionMode(int mode);
-
+
//User interface
bool getShowMenuBar();
void setShowMenuBar(bool s);
@@ -358,7 +358,10 @@ class Preferences : public QObject
bool getShowTopic();
void setShowTopic(bool s);
-
+
+ bool getHideUnimportantEvents();
+ void setHideUnimportantEvents(bool state);
+
signals:
void requestServerConnection(int number);
void requestSaveOptions();
@@ -484,7 +487,7 @@ class Preferences : public QObject
QStringList ircColorList;
// aliases
QStringList aliasList;
-
+
//Nick completion
int nickCompletionMode;
@@ -499,8 +502,9 @@ class Preferences : public QObject
#if QT_VERSION >= 0x030200
bool showTabBarCloseButton;
#endif
-
+
bool showTopic;
+ bool hideUnimportantEvents;
};
#endif
diff --git a/konversation/prefspagegeneralsettings.cpp b/konversation/prefspagegeneralsettings.cpp
index 40870d6..ae6b4d4 100644
--- a/konversation/prefspagegeneralsettings.cpp
+++ b/konversation/prefspagegeneralsettings.cpp
@@ -62,8 +62,9 @@ PrefsPageGeneralSettings::PrefsPageGeneralSettings(QFrame* newParent,Preferences
beepCheck=new QCheckBox(i18n("Bee&p on incoming ASCII BEL"),parentFrame,"beep_check");
rawLogCheck=new QCheckBox(i18n("Show ra&w log window on startup"),parentFrame,"raw_log_check");
trayIconCheck=new QCheckBox(i18n("Show icon in s&ystem tray"),parentFrame,"tray_icon_check");
- trayNotifyCheck = new QCheckBox(i18n("Use system tray for new message notification"),
- parentFrame, "tray_notify_check");
+ trayNotifyCheck=new QCheckBox(i18n("Use sys&tem tray for new message \
notification"),parentFrame,"tray_notify_check"); + hideUnimportantCheck=new QCheckBox(i18n("&Hide \
Join/Part/Nick events"),parentFrame,"hide_unimportant_check"); +
connect(trayIconCheck, SIGNAL(toggled(bool)), trayNotifyCheck, SLOT(setEnabled(bool)));
reconnectTimeoutLabel=new QLabel(i18n("&Reconnect timeout:"),parentFrame);
@@ -84,6 +85,7 @@ PrefsPageGeneralSettings::PrefsPageGeneralSettings(QFrame* newParent,Preferences
rawLogCheck->setChecked(preferences->getRawLog());
trayIconCheck->setChecked(preferences->getShowTrayIcon());
trayNotifyCheck->setChecked(preferences->getTrayNotify());
+ hideUnimportantCheck->setChecked(preferences->getHideUnimportantEvents());
QHBox* generalSpacer=new QHBox(parentFrame);
@@ -110,6 +112,8 @@ PrefsPageGeneralSettings::PrefsPageGeneralSettings(QFrame* newParent,Preferences
row++;
generalSettingsLayout->addMultiCellWidget(trayNotifyCheck,row,row,0,2);
row++;
+ generalSettingsLayout->addMultiCellWidget(hideUnimportantCheck,row,row,0,2);
+ row++;
generalSettingsLayout->addMultiCellWidget(generalSpacer,row,row,0,2);
generalSettingsLayout->setRowStretch(row,10);
@@ -140,6 +144,7 @@ void PrefsPageGeneralSettings::applyPreferences()
preferences->setRawLog(rawLogCheck->isChecked());
preferences->setShowTrayIcon(trayIconCheck->isChecked());
preferences->setTrayNotify(trayNotifyCheck->isChecked());
+ preferences->setHideUnimportantEvents(hideUnimportantCheck->isChecked());
preferences->setMaximumLagTime(reconnectTimeoutSpin->value());
}
diff --git a/konversation/prefspagegeneralsettings.h b/konversation/prefspagegeneralsettings.h
index 32e9d7b..d943ca6 100644
--- a/konversation/prefspagegeneralsettings.h
+++ b/konversation/prefspagegeneralsettings.h
@@ -55,6 +55,7 @@ class PrefsPageGeneralSettings : public PrefsPage
QCheckBox* rawLogCheck;
QCheckBox* trayIconCheck;
QCheckBox* trayNotifyCheck;
+ QCheckBox* hideUnimportantCheck;
QLabel* reconnectTimeoutLabel;
QSpinBox* reconnectTimeoutSpin;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic