Thu, 06 Dec 2012 20:00:25 +0100
Added the auto who configuration.
--- a/Preferences/ConfigurationPages/IrcPage.py Thu Dec 06 19:40:03 2012 +0100 +++ b/Preferences/ConfigurationPages/IrcPage.py Thu Dec 06 20:00:25 2012 +0100 @@ -105,6 +105,11 @@ Preferences.getIrc, byName=True) self.initColour("IrcColor15", self.ircColor15Button, Preferences.getIrc, byName=True) + + # Automatic User Information Lookup + self.whoGroup.setChecked(Preferences.getIrc("AutoUserInfoLookup")) + self.whoUsersSpinBox.setValue(Preferences.getIrc("AutoUserInfoMax")) + self.whoIntervalSpinBox.setValue(Preferences.getIrc("AutoUserInfoInterval")) def save(self): """ @@ -122,6 +127,11 @@ Preferences.setIrc("NotifyMessage", self.messageCheckBox.isChecked()) Preferences.setIrc("NotifyNick", self.ownNickCheckBox.isChecked()) + # Automatic User Information Lookup + Preferences.setIrc("AutoUserInfoLookup", self.whoGroup.isChecked()) + Preferences.setIrc("AutoUserInfoMax", self.whoUsersSpinBox.value()) + Preferences.setIrc("AutoUserInfoInterval", self.whoIntervalSpinBox.value()) + # colours self.saveColours(Preferences.setIrc)
--- a/Preferences/ConfigurationPages/IrcPage.ui Thu Dec 06 19:40:03 2012 +0100 +++ b/Preferences/ConfigurationPages/IrcPage.ui Thu Dec 06 20:00:25 2012 +0100 @@ -708,6 +708,86 @@ </widget> </item> <item> + <widget class="QGroupBox" name="whoGroup"> + <property name="toolTip"> + <string>Select this to enable the automatic lookup of user information for joined channels</string> + </property> + <property name="title"> + <string>Enable Automatic User Information Look Up (/WHO)</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_5"> + <item row="0" column="0"> + <widget class="QLabel" name="label_31"> + <property name="text"> + <string>Max. Number of Users in Channel:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QSpinBox" name="whoUsersSpinBox"> + <property name="toolTip"> + <string>Enter the maximum numbers of users in a channel allowed for this function</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="maximum"> + <number>999</number> + </property> + </widget> + </item> + <item row="0" column="2"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>174</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_32"> + <property name="text"> + <string>Update Interval:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QSpinBox" name="whoIntervalSpinBox"> + <property name="toolTip"> + <string>Enter the user information update interval</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="suffix"> + <string> s</string> + </property> + <property name="minimum"> + <number>30</number> + </property> + <property name="maximum"> + <number>600</number> + </property> + <property name="singleStep"> + <number>10</number> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum>
--- a/Preferences/__init__.py Thu Dec 06 19:40:03 2012 +0100 +++ b/Preferences/__init__.py Thu Dec 06 20:00:25 2012 +0100 @@ -953,6 +953,10 @@ "NotifyJoinPart": True, "NotifyMessage": False, "NotifyNick": False, + + "AutoUserInfoLookup": True, + "AutoUserInfoMax": 200, + "AutoUserInfoInterval": 90, } @@ -2587,9 +2591,13 @@ @return the requested user setting """ if key in ["TimestampIncludeDate", "ShowTimestamps", "ShowNotifications", - "NotifyJoinPart", "NotifyMessage", "NotifyNick", "EnableIrcColours"]: + "NotifyJoinPart", "NotifyMessage", "NotifyNick", "EnableIrcColours", + "AutoUserInfoLookup"]: return toBool(prefClass.settings.value("IRC/" + key, prefClass.ircDefaults[key])) + elif key in ["AutoUserInfoMax", "AutoUserInfoInterval"]: + return int(prefClass.settings.value("IRC/" + key, + prefClass.ircDefaults[key])) else: return prefClass.settings.value("IRC/" + key, prefClass.ircDefaults[key])