← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2923: add "show joins/parts" to fav hub settings

 

------------------------------------------------------------
revno: 2923
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Wed 2012-05-16 13:34:47 +0200
message:
  add "show joins/parts" to fav hub settings
added:
  dcpp/tribool.h
modified:
  dcpp/AdcHub.cpp
  dcpp/HubSettings.cpp
  dcpp/HubSettings.h
  dcpp/NmdcHub.cpp
  dcpp/SettingsManager.cpp
  help/settings_general.html
  win32/FavHubGroupsDlg.cpp
  win32/FavHubGroupsDlg.h
  win32/FavHubProperties.cpp
  win32/FavHubProperties.h
  win32/GeneralPage.cpp
  win32/HubFrame.cpp
  win32/HubFrame.h
  win32/WinUtil.cpp
  win32/WinUtil.h


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/AdcHub.cpp'
--- dcpp/AdcHub.cpp	2012-05-15 23:26:22 +0000
+++ dcpp/AdcHub.cpp	2012-05-16 11:34:47 +0000
@@ -972,7 +972,7 @@
 	addParam(lastInfoMap, c, "FS", Util::toString(UploadManager::getInstance()->getFreeSlots()));
 	addParam(lastInfoMap, c, "SS", ShareManager::getInstance()->getShareSizeString());
 	addParam(lastInfoMap, c, "SF", Util::toString(ShareManager::getInstance()->getSharedFiles()));
-	addParam(lastInfoMap, c, "EM", SETTING(EMAIL));
+	addParam(lastInfoMap, c, "EM", settings.getEmail());
 	addParam(lastInfoMap, c, "HN", Util::toString(counts[COUNT_NORMAL]));
 	addParam(lastInfoMap, c, "HR", Util::toString(counts[COUNT_REGISTERED]));
 	addParam(lastInfoMap, c, "HO", Util::toString(counts[COUNT_OP]));

=== modified file 'dcpp/HubSettings.cpp'
--- dcpp/HubSettings.cpp	2012-05-15 23:26:22 +0000
+++ dcpp/HubSettings.cpp	2012-05-16 11:34:47 +0000
@@ -25,18 +25,24 @@
 	if(!sub.nick.empty()) { nick = sub.nick; }
 	if(!sub.description.empty()) { description = sub.description; }
 	if(!sub.email.empty()) { email = sub.email; }
+	if(!indeterminate(sub.showJoins)) { showJoins = sub.showJoins; }
+	if(!indeterminate(sub.favShowJoins)) { favShowJoins = sub.favShowJoins; }
 }
 
 void HubSettings::load(SimpleXML& xml) {
 	nick = xml.getChildAttrib("Nick");
 	description = xml.getChildAttrib("UserDescription"); // not "Description" for compat with prev fav hub lists
 	email = xml.getChildAttrib("Email");
+	showJoins = to3bool(xml.getIntChildAttrib("ShowJoins"));
+	favShowJoins = to3bool(xml.getIntChildAttrib("FavShowJoins"));
 }
 
 void HubSettings::save(SimpleXML& xml) const {
 	xml.addChildAttrib("Nick", nick);
 	xml.addChildAttrib("UserDescription", description);
 	xml.addChildAttrib("Email", email);
+	xml.addChildAttrib("ShowJoins", toInt(showJoins));
+	xml.addChildAttrib("FavShowJoins", toInt(favShowJoins));
 }
 
 } // namespace dcpp

=== modified file 'dcpp/HubSettings.h'
--- dcpp/HubSettings.h	2012-05-15 23:26:22 +0000
+++ dcpp/HubSettings.h	2012-05-16 11:34:47 +0000
@@ -23,6 +23,7 @@
 
 #include "GetSet.h"
 #include "SimpleXML.h"
+#include "tribool.h"
 
 namespace dcpp {
 
@@ -32,8 +33,10 @@
 favorite hub group; per favorite hub entry. */
 struct HubSettings
 {
+	HubSettings () : showJoins(indeterminate), favShowJoins(indeterminate) { }
+
 	/** Apply a set of sub-settings that may override current ones. Strings are overridden when not
-	null. */
+	null. Tribools are overridden when not in an indeterminate state. */
 	void merge(const HubSettings& sub);
 
 	void load(SimpleXML& xml);
@@ -43,6 +46,11 @@
 	GETSET(string, description, Description);
 	GETSET(string, email, Email);
 
+	/* don't forget to init new tribools to indeterminate in the constructor! they default to false
+	otherwise. */
+	tribool showJoins;
+	tribool favShowJoins;
+
 	friend class Client;
 };
 

=== modified file 'dcpp/NmdcHub.cpp'
--- dcpp/NmdcHub.cpp	2012-05-15 23:26:22 +0000
+++ dcpp/NmdcHub.cpp	2012-05-16 11:34:47 +0000
@@ -803,14 +803,14 @@
 	} else {
 		uploadSpeed = SETTING(UPLOAD_SPEED);
 	}
-		
+
 	string uMin = (SETTING(MIN_UPLOAD_SPEED) == 0) ? Util::emptyString : tmp5 + Util::toString(SETTING(MIN_UPLOAD_SPEED));
 	string myInfoA =
 		"$MyINFO $ALL " + fromUtf8(getMyNick()) + " " + fromUtf8(escape(settings.getDescription())) +
 		tmp1 + VERSIONSTRING + tmp2 + modeChar + tmp3 + getCounts();
 	string myInfoB = tmp4 + Util::toString(SETTING(SLOTS));
 	string myInfoC = uMin +
-		">$ $" + uploadSpeed + "\x01$" + fromUtf8(escape(SETTING(EMAIL))) + '$';
+		">$ $" + uploadSpeed + "\x01$" + fromUtf8(escape(settings.getEmail())) + '$';
 	string myInfoD = ShareManager::getInstance()->getShareSizeString() + "$|";
 	// we always send A and C; however, B (slots) and D (share size) can frequently change so we delay them if needed
  	if(lastMyInfoA != myInfoA || lastMyInfoC != myInfoC ||

=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp	2012-05-15 23:26:22 +0000
+++ dcpp/SettingsManager.cpp	2012-05-16 11:34:47 +0000
@@ -568,6 +568,8 @@
 	ret.setNick(get(NICK));
 	ret.setDescription(get(DESCRIPTION));
 	ret.setEmail(get(EMAIL));
+	ret.showJoins = getBool(SHOW_JOINS);
+	ret.favShowJoins = getBool(FAV_SHOW_JOINS);
 	return ret;
 }
 

=== added file 'dcpp/tribool.h'
--- dcpp/tribool.h	1970-01-01 00:00:00 +0000
+++ dcpp/tribool.h	2012-05-16 11:34:47 +0000
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef DCPLUSPLUS_DCPP_TRIBOOL_H
+#define DCPLUSPLUS_DCPP_TRIBOOL_H
+
+#include <boost/logic/tribool.hpp>
+
+using boost::indeterminate;
+using boost::tribool;
+
+// conversions between tribools and ints, with 0 being the indeterminate value
+namespace {
+	inline tribool to3bool(int x) { if(x) { return tribool(x == 1); } return tribool(indeterminate); }
+	inline int toInt(tribool x) { return x ? 1 : !x ? 2 : 0; }
+}
+
+#endif

=== modified file 'help/settings_general.html'
--- help/settings_general.html	2012-01-16 18:29:26 +0000
+++ help/settings_general.html	2012-05-16 11:34:47 +0000
@@ -13,20 +13,35 @@
 This is general information about yourself. The nick is required,
 though it's suggested that you pick the correct upload line speed value as well.
 </p>
+
 <dl style="margin-left: 40px;">
-  <dt>Nick</dt>
-  <dd cshelp="IDH_SETTINGS_GENERAL_NICK">This nickname, or handle, will identify you when you join a hub.
-It can be overridden on a per-hub basis in the <a href="window_favorite_hubs.html">Favorite Hub</a> Properties.</dd>
-  <dt>E-Mail</dt>
-  <dd cshelp="IDH_SETTINGS_GENERAL_EMAIL">This field is for sharing your email address, if you wish it.</dd>
-  <dt>Description</dt>
-  <dd cshelp="IDH_SETTINGS_GENERAL_DESCRIPTION">This description will show in the user list. It can be overridden
-on a per-hub basis in the <a href="window_favorite_hubs.html">Favorite Hub</a> Properties.</dd>
-  <dt id="linespeed">Line speed (upload)</dt>
-  <dd cshelp="IDH_SETTINGS_GENERAL_CONNECTION">This drop-down contains a number of common upload speeds (in 
-MiB/s), please choose the one closest to your own. Do not put 
-in your download speed; this setting is a measure of how fast a source 
-you are likely to be for other users. This value will be shown for the users on NMDC hubs only.</dd>
+
+	<dt>Nick</dt>
+	<dd cshelp="IDH_SETTINGS_GENERAL_NICK">
+	This nickname, or handle, will identify you when you join a hub. It can be overridden on a
+	per-hub basis in the <a href="window_favorite_hubs.html">Favorite Hub</a> Properties.
+	</dd>
+
+	<dt>Description</dt>
+	<dd cshelp="IDH_SETTINGS_GENERAL_DESCRIPTION">
+	This description will show in the user list. It can be overridden on a per-hub basis in the
+	<a href="window_favorite_hubs.html">Favorite Hub</a> Properties.
+	</dd>
+
+	<dt>Email</dt>
+	<dd cshelp="IDH_SETTINGS_GENERAL_EMAIL">
+	This field is for sharing your email address, if you wish it. It can be overridden on a per-hub
+	basis in the <a href="window_favorite_hubs.html">Favorite Hub</a> Properties.
+	</dd>
+
+	<dt id="linespeed">Line speed (upload)</dt>
+	<dd cshelp="IDH_SETTINGS_GENERAL_CONNECTION">
+	This drop-down contains a number of common upload speeds (in MiB/s), please choose the one
+	closest to your own. Do not put in your download speed; this setting is a measure of how fast a
+	source you are likely to be for other users. This value will be shown for the users on NMDC
+	hubs only.
+	</dd>
+
 </dl>
 
 <h2 id="away">Away mode</h2>

=== modified file 'win32/FavHubGroupsDlg.cpp'
--- win32/FavHubGroupsDlg.cpp	2012-05-15 23:26:22 +0000
+++ win32/FavHubGroupsDlg.cpp	2012-05-16 11:34:47 +0000
@@ -50,6 +50,8 @@
 nick(0),
 description(0),
 email(0),
+showJoins(0),
+favShowJoins(0),
 parentEntry(parentEntry_)
 {
 	onInitDialog([this] { return handleInitDialog(); });
@@ -88,10 +90,14 @@
 	groups->setHelpId(IDH_FAV_HUB_GROUPS_LIST);
 
 	{
-		auto cur = grid->addChild(Grid::Seed(1, 2));
-		cur->column(1).align = GridInfo::BOTTOM_RIGHT;
-
-		Button::Seed seed(T_("&Update"));
+		auto cur = grid->addChild(Grid::Seed(1, 3));
+
+		Button::Seed seed(T_("&Add"));
+		auto add = cur->addChild(seed);
+		add->setHelpId(IDH_FAV_HUB_GROUPS_ADD);
+		add->onClicked([this] { handleAdd(); });
+
+		seed.caption = T_("&Update");
 		update = cur->addChild(seed);
 		update->setHelpId(IDH_FAV_HUB_GROUPS_UPDATE);
 		update->onClicked([this] { handleUpdate(); });
@@ -104,7 +110,7 @@
 
 	{
 		properties = grid->addChild(GroupBox::Seed(T_("Group properties")));
-		auto cur = properties->addChild(Grid::Seed(2, 1));
+		auto cur = properties->addChild(Grid::Seed(3, 1));
 		cur->column(0).mode = GridInfo::FILL;
 
 		{
@@ -118,31 +124,40 @@
 		}
 
 		{
-			auto cur2 = cur->addChild(Grid::Seed(2, 1));
-			cur2->column(0).mode = GridInfo::FILL;
-
-			auto group = cur2->addChild(GroupBox::Seed(T_("Identification (leave blank for defaults)")));
-
-			auto cur3 = group->addChild(Grid::Seed(3, 2));
-			cur3->column(0).align = GridInfo::BOTTOM_RIGHT;
-			cur3->column(1).mode = GridInfo::FILL;
-
-			cur3->addChild(Label::Seed(T_("Nick")))->setHelpId(IDH_FAVORITE_HUB_NICK);
-			nick = cur3->addChild(WinUtil::Seeds::Dialog::textBox);
+			auto group = cur->addChild(GroupBox::Seed(T_("Identification (leave blank for defaults)")));
+
+			auto cur2 = group->addChild(Grid::Seed(3, 2));
+			cur2->column(0).align = GridInfo::BOTTOM_RIGHT;
+			cur2->column(1).mode = GridInfo::FILL;
+
+			cur2->addChild(Label::Seed(T_("Nick")))->setHelpId(IDH_FAVORITE_HUB_NICK);
+			nick = cur2->addChild(WinUtil::Seeds::Dialog::textBox);
 			nick->setHelpId(IDH_FAVORITE_HUB_NICK);
 			WinUtil::preventSpaces(nick);
 
-			cur3->addChild(Label::Seed(T_("Description")))->setHelpId(IDH_FAVORITE_HUB_USER_DESC);
-			description = cur3->addChild(WinUtil::Seeds::Dialog::textBox);
+			cur2->addChild(Label::Seed(T_("Description")))->setHelpId(IDH_FAVORITE_HUB_USER_DESC);
+			description = cur2->addChild(WinUtil::Seeds::Dialog::textBox);
 			description->setHelpId(IDH_FAVORITE_HUB_USER_DESC);
 
-			cur3->addChild(Label::Seed(T_("Email")))->setHelpId(IDH_FAVORITE_HUB_EMAIL);
-			email = cur3->addChild(WinUtil::Seeds::Dialog::textBox);
+			cur2->addChild(Label::Seed(T_("Email")))->setHelpId(IDH_FAVORITE_HUB_EMAIL);
+			email = cur2->addChild(WinUtil::Seeds::Dialog::textBox);
 			email->setHelpId(IDH_FAVORITE_HUB_EMAIL);
-
-			auto add = cur2->addChild(Button::Seed(T_("&Add to the list")));
-			add->setHelpId(IDH_FAV_HUB_GROUPS_ADD);
-			add->onClicked([this] { handleAdd(); });
+		}
+
+		{
+			auto cur2 = cur->addChild(Grid::Seed(2, 2));
+			cur2->column(0).mode = GridInfo::FILL;
+			cur2->column(0).align = GridInfo::BOTTOM_RIGHT;
+
+			cur2->addChild(Label::Seed(T_("Show joins / parts in chat by default")));
+			showJoins = cur2->addChild(WinUtil::Seeds::Dialog::comboBox);
+			WinUtil::fillTriboolCombo(showJoins);
+			showJoins->setSelected(0);
+
+			cur2->addChild(Label::Seed(T_("Only show joins / parts for favorite users")));
+			favShowJoins = cur2->addChild(WinUtil::Seeds::Dialog::comboBox);
+			WinUtil::fillTriboolCombo(favShowJoins);
+			favShowJoins->setSelected(0);
 		}
 	}
 
@@ -207,6 +222,16 @@
 	nick->setText(Text::toT(settings.getNick()));
 	description->setText(Text::toT(settings.getDescription()));
 	email->setText(Text::toT(settings.getEmail()));
+	showJoins->setSelected(toInt(settings.showJoins));
+	favShowJoins->setSelected(toInt(settings.favShowJoins));
+}
+
+void FavHubGroupsDlg::handleAdd() {
+	tstring name = edit->getText();
+	if(addable(name)) {
+		HoldRedraw hold(groups);
+		add(name, getSettings());
+	}
 }
 
 void FavHubGroupsDlg::handleUpdate() {
@@ -235,14 +260,6 @@
 	groups->forEachSelectedT([this](const GroupInfo *group) { removeGroup(group); }, true);
 }
 
-void FavHubGroupsDlg::handleAdd() {
-	tstring name = edit->getText();
-	if(addable(name)) {
-		HoldRedraw hold(groups);
-		add(name, getSettings());
-	}
-}
-
 void FavHubGroupsDlg::handleClose() {
 	FavoriteManager::getInstance()->setFavHubGroups(groups->forEachT(GroupCollector()).groups);
 	FavoriteManager::getInstance()->save();
@@ -265,6 +282,8 @@
 	settings.setNick(Text::fromT(nick->getText()));
 	settings.setDescription(Text::fromT(description->getText()));
 	settings.setEmail(Text::fromT(email->getText()));
+	settings.showJoins = to3bool(showJoins->getSelected());
+	settings.favShowJoins = to3bool(favShowJoins->getSelected());
 	return settings;
 }
 

=== modified file 'win32/FavHubGroupsDlg.h'
--- win32/FavHubGroupsDlg.h	2012-05-15 23:26:22 +0000
+++ win32/FavHubGroupsDlg.h	2012-05-16 11:34:47 +0000
@@ -77,15 +77,17 @@
 	TextBoxPtr nick;
 	TextBoxPtr description;
 	TextBoxPtr email;
+	ComboBoxPtr showJoins;
+	ComboBoxPtr favShowJoins;
 
 	FavoriteHubEntry* parentEntry;
 
 	bool handleInitDialog();
 	bool handleKeyDown(int c);
 	void handleSelectionChanged();
+	void handleAdd();
 	void handleUpdate();
 	void handleRemove();
-	void handleAdd();
 	void handleClose();
 
 	void add(const FavHubGroup& group, bool ensureVisible = true);

=== modified file 'win32/FavHubProperties.cpp'
--- win32/FavHubProperties.cpp	2012-05-15 23:26:22 +0000
+++ win32/FavHubProperties.cpp	2012-05-16 11:34:47 +0000
@@ -58,7 +58,7 @@
 bool FavHubProperties::handleInitDialog() {
 	setHelpId(IDH_FAVORITE_HUB);
 
-	grid = addChild(Grid::Seed(4, 2));
+	grid = addChild(Grid::Seed(5, 2));
 	grid->column(0).mode = GridInfo::FILL;
 	grid->column(1).mode = GridInfo::FILL;
 
@@ -119,8 +119,25 @@
 	}
 
 	{
+		auto cur = grid->addChild(Grid::Seed(2, 2));
+		grid->setWidget(cur, 2, 0, 1, 2);
+		cur->column(0).mode = GridInfo::FILL;
+		cur->column(0).align = GridInfo::BOTTOM_RIGHT;
+
+		cur->addChild(Label::Seed(T_("Show joins / parts in chat by default")));
+		showJoins = cur->addChild(WinUtil::Seeds::Dialog::comboBox);
+		WinUtil::fillTriboolCombo(showJoins);
+		showJoins->setSelected(toInt(entry->showJoins));
+
+		cur->addChild(Label::Seed(T_("Only show joins / parts for favorite users")));
+		favShowJoins = cur->addChild(WinUtil::Seeds::Dialog::comboBox);
+		WinUtil::fillTriboolCombo(favShowJoins);
+		favShowJoins->setSelected(toInt(entry->favShowJoins));
+	}
+
+	{
 		auto group = grid->addChild(GroupBox::Seed(T_("Group")));
-		grid->setWidget(group, 2, 0, 1, 2);
+		grid->setWidget(group, 3, 0, 1, 2);
 
 		auto cur = group->addChild(Grid::Seed(1, 2));
 		cur->column(0).mode = GridInfo::FILL;
@@ -162,6 +179,8 @@
 	entry->setPassword(Text::fromT(password->getText()));
 	entry->setDescription(Text::fromT(description->getText()));
 	entry->setEmail(Text::fromT(email->getText()));
+	entry->showJoins = to3bool(showJoins->getSelected());
+	entry->favShowJoins = to3bool(favShowJoins->getSelected());
 	entry->setGroup(Text::fromT(groups->getText()));
 	FavoriteManager::getInstance()->save();
 	endDialog(IDOK);

=== modified file 'win32/FavHubProperties.h'
--- win32/FavHubProperties.h	2012-05-15 23:26:22 +0000
+++ win32/FavHubProperties.h	2012-05-16 11:34:47 +0000
@@ -37,6 +37,8 @@
 	TextBoxPtr password;
 	TextBoxPtr description;
 	TextBoxPtr email;
+	ComboBoxPtr showJoins;
+	ComboBoxPtr favShowJoins;
 	ComboBoxPtr groups;
 
 	FavoriteHubEntry *entry;

=== modified file 'win32/GeneralPage.cpp'
--- win32/GeneralPage.cpp	2012-05-15 23:26:22 +0000
+++ win32/GeneralPage.cpp	2012-05-16 11:34:47 +0000
@@ -57,16 +57,16 @@
 		nick->setHelpId(IDH_SETTINGS_GENERAL_NICK);
 		WinUtil::preventSpaces(nick);
 
-		cur->addChild(Label::Seed(T_("E-Mail")))->setHelpId(IDH_SETTINGS_GENERAL_EMAIL);
-		TextBoxPtr box = cur->addChild(WinUtil::Seeds::Dialog::textBox);
-		items.emplace_back(box, SettingsManager::EMAIL, PropPage::T_STR);
-		box->setHelpId(IDH_SETTINGS_GENERAL_EMAIL);
-
 		cur->addChild(Label::Seed(T_("Description")))->setHelpId(IDH_SETTINGS_GENERAL_DESCRIPTION);
-		box = cur->addChild(WinUtil::Seeds::Dialog::textBox);
+		auto box = cur->addChild(WinUtil::Seeds::Dialog::textBox);
 		items.emplace_back(box, SettingsManager::DESCRIPTION, PropPage::T_STR);
 		box->setHelpId(IDH_SETTINGS_GENERAL_DESCRIPTION);
 
+		cur->addChild(Label::Seed(T_("Email")))->setHelpId(IDH_SETTINGS_GENERAL_EMAIL);
+		box = cur->addChild(WinUtil::Seeds::Dialog::textBox);
+		items.emplace_back(box, SettingsManager::EMAIL, PropPage::T_STR);
+		box->setHelpId(IDH_SETTINGS_GENERAL_EMAIL);
+
 		cur->addChild(Label::Seed(T_("Line speed (upload)")))->setHelpId(IDH_SETTINGS_GENERAL_CONNECTION);
 
 		{

=== modified file 'win32/HubFrame.cpp'
--- win32/HubFrame.cpp	2012-05-15 23:26:22 +0000
+++ win32/HubFrame.cpp	2012-05-16 11:34:47 +0000
@@ -160,8 +160,6 @@
 updateUsers(false),
 waitingForPW(false),
 resort(false),
-showJoins(BOOLSETTING(SHOW_JOINS)),
-favShowJoins(BOOLSETTING(FAV_SHOW_JOINS)),
 confirmClose(true),
 currentUser(0),
 hubMenu(false),
@@ -410,15 +408,15 @@
 			client->password(Text::fromT(param));
 			waitingForPW = false;
 		} else if( Util::stricmp(cmd.c_str(), _T("showjoins")) == 0 ) {
-			showJoins = !showJoins;
-			if(showJoins) {
+			client->settings.showJoins = !client->settings.showJoins;
+			if(client->settings.showJoins) {
 				addStatus(T_("Join/part showing on"));
 			} else {
 				addStatus(T_("Join/part showing off"));
 			}
 		} else if( Util::stricmp(cmd.c_str(), _T("favshowjoins")) == 0 ) {
-			favShowJoins = !favShowJoins;
-			if(favShowJoins) {
+			client->settings.favShowJoins = !client->settings.favShowJoins;
+			if(client->settings.favShowJoins) {
 				addStatus(T_("Join/part of favorite users showing on"));
 			} else {
 				addStatus(T_("Join/part of favorite users showing off"));
@@ -572,14 +570,14 @@
 		} else if(i.first == UPDATE_USER_JOIN) {
 			UserTask& u = static_cast<UserTask&>(*i.second);
 			if(updateUser(u)) {
-				if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) {
+				if(client->settings.showJoins || (client->settings.favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) {
 					addStatus(str(TF_("Joins: %1%") % Text::toT(u.identity.getNick())));
 				}
 			}
 		} else if(i.first == REMOVE_USER) {
 			UserTask& u = static_cast<UserTask&>(*i.second);
 			removeUser(u.user);
-			if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) {
+			if(client->settings.showJoins || (client->settings.favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) {
 				addStatus(str(TF_("Parts: %1%") % Text::toT(u.identity.getNick())));
 			}
 		}

=== modified file 'win32/HubFrame.h'
--- win32/HubFrame.h	2012-05-15 23:26:22 +0000
+++ win32/HubFrame.h	2012-05-16 11:34:47 +0000
@@ -168,8 +168,6 @@
 	bool updateUsers;
 	bool waitingForPW;
 	bool resort;
-	bool showJoins;
-	bool favShowJoins;
 	bool confirmClose;
 
 	TaskQueue tasks; // todo get rid of TaskQueue

=== modified file 'win32/WinUtil.cpp'
--- win32/WinUtil.cpp	2012-05-15 23:26:22 +0000
+++ win32/WinUtil.cpp	2012-05-16 11:34:47 +0000
@@ -1169,6 +1169,12 @@
 	std::for_each(methods, methods + StringMatch::METHOD_LAST, [box](const tstring& str) { box->addValue(str); });
 }
 
+void WinUtil::fillTriboolCombo(ComboBoxPtr box) {
+	box->addValue(T_("Default"));
+	box->addValue(T_("Yes"));
+	box->addValue(T_("No"));
+}
+
 void WinUtil::preventSpaces(TextBoxPtr box) {
 	box->onUpdated([box] {
 		auto text = box->getText();

=== modified file 'win32/WinUtil.h'
--- win32/WinUtil.h	2012-05-15 23:26:22 +0000
+++ win32/WinUtil.h	2012-05-16 11:34:47 +0000
@@ -250,6 +250,7 @@
 	static ButtonPtr addHelpButton(GridPtr grid);
 	static void addSearchIcon(TextBoxPtr box);
 	static void addFilterMethods(ComboBoxPtr box);
+	static void fillTriboolCombo(ComboBoxPtr box);
 	static void preventSpaces(TextBoxPtr box);
 
 	static void setColor(dwt::Control* widget);