← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2729: help for styles & user matching

 

------------------------------------------------------------
revno: 2729
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sun 2011-12-18 18:04:43 +0100
message:
  help for styles & user matching
modified:
  help/chat_commands.html
  help/dialog_user_matching.html
  help/index.html
  help/settings_appearance.html
  help/settings_styles.html
  help/settings_user_matching.html
  win32/AppearancePage.cpp
  win32/StylesPage.cpp
  win32/UserMatchDlg.cpp
  win32/UserMatchPage.cpp


--
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 'help/chat_commands.html'
--- help/chat_commands.html	2011-12-11 14:45:53 +0000
+++ help/chat_commands.html	2011-12-18 17:04:43 +0000
@@ -55,10 +55,10 @@
   <dt><untranslated>/fav</untranslated></dt>
   <dd>Adds the current user to the list of <a
 	  href="favorite_users.html">Favorite Users</a>.</dd>
-  <dt><untranslated>/ignore</dt>
+  <dt><untranslated>/ignore</untranslated></dt>
   <dd>Adds a user matching definition (or modifies an existing one, if possible) to ignore chat
   messages from the current user.</dd>
-  <dt><untranslated>/unignore</dt>
+  <dt><untranslated>/unignore</untranslated></dt>
   <dd>Adds a user matching definition (or modifies an existing one, if possible) to stop ignoring
   chat messages from the current user.</dd>
 </dl>

=== modified file 'help/dialog_user_matching.html'
--- help/dialog_user_matching.html	2011-12-03 21:53:57 +0000
+++ help/dialog_user_matching.html	2011-12-18 17:04:43 +0000
@@ -6,6 +6,79 @@
 <link type="text/css" rel="stylesheet" href="style.css"/>
 </head>
 <body>
-	<h1>User matching</h1>
+	<h1>User matching definition</h1>
+	<p>
+	This dialog configures one user matching definition. More information about user matching
+	definitions is available in the page about the
+	<placeholder><a href="settings_user_matching.html">User matching</a></placeholder> settings
+	page.
+	</p>
+
+	<h2>Name</h2>
+	<p cshelp="IDH_USER_MATCH_NAME">
+	The name this user matching definition will be identified as in the
+	<placeholder><a href="settings_user_matching.html">User matching</a></placeholder> and the
+	<placeholder><a href="settings_styles.html">Styles</a></placeholder> settings page.
+	</p>
+
+	<h2>Match favorite users</h2>
+	<p cshelp="IDH_USER_MATCH_FAVS">
+	If checked, users will have to have been marked as favorite users from the
+	<placeholder><a href="window_users.html">Users</a></placeholder> window in order for this user
+	matching definition to be applied to them.
+	</p>
+
+	<h2>Match operators</h2>
+	<p cshelp="IDH_USER_MATCH_OPS">
+	If checked, users will have to be hub operators in order for this user matching definition to
+	be applied to them.
+	</p>
+
+	<h2>Match bots</h2>
+	<p cshelp="IDH_USER_MATCH_BOTS">
+	If checked, users will have to be hub bots in order for this user matching definition to be
+	applied to them.
+	</p>
+
+	<h2>Rules</h2>
+
+	<h3>Add a rule</h3>
+	<p cshelp="IDH_USER_MATCH_ADD_RULE">
+	Add a line to define a rule that users will have to match in order for this user matching
+	definition to be applied to them.
+	</p>
+
+	<h3>Field selection drop-down (left)</h3>
+	<p cshelp="IDH_USER_MATCH_RULE_FIELD">
+	The user property to be matched against for the current rule.
+	</p>
+
+	<h3>Pattern text-box</h3>
+	<p cshelp="IDH_USER_MATCH_RULE_PATTERN">
+	Pattern for the current rule.
+	</p>
+
+	<h3>Method selection drop-down (right)</h3>
+	<p cshelp="IDH_USER_MATCH_RULE_METHOD">
+	Define how the pattern will be matched against the user property selected in the field
+	selection drop-down.
+	</p>
+
+	<h3>X button (right)</h3>
+	<p cshelp="IDH_USER_MATCH_RULE_REMOVE">
+	Remove the current rule.
+	</p>
+
+	<h2>Always show chat messages</h2>
+	<p cshelp="IDH_USER_MATCH_FORCE_CHAT">
+	Chat messages for users that match this user matching definition will always be shown. Use this
+	to override other "chat ignore" definitions.
+	</p>
+
+	<h2>Ignore chat messages</h2>
+	<p cshelp="IDH_USER_MATCH_IGNORE_CHAT">
+	Do not show chat messages for users that match this user matching definition.
+	</p>
+
 </body>
 </html>

=== modified file 'help/index.html'
--- help/index.html	2011-12-03 21:53:57 +0000
+++ help/index.html	2011-12-18 17:04:43 +0000
@@ -59,7 +59,7 @@
 <ul>
 <li><placeholder><a href="dialog_indexing_progress.html">Indexing progress</a></placeholder></li>
 <li><placeholder><a href="dialog_user_command.html">User Command</a></placeholder></li>
-<li><placeholder><a href="dialog_user_matching.html">User matching</a></placeholder></li>
+<li><placeholder><a href="dialog_user_matching.html">User matching definition</a></placeholder></li>
 <li><placeholder><a href="dialog_favorite_hub.html">Favorite Hub Properties</a></placeholder></li>
 <li><placeholder><a href="dialog_fav_hub_groups.html">Favorite hub groups</a></placeholder></li>
 <li><placeholder><a href="dialog_adls_properties.html">ADLSearch Properties</a></placeholder></li>

=== modified file 'help/settings_appearance.html'
--- help/settings_appearance.html	2011-10-15 22:58:51 +0000
+++ help/settings_appearance.html	2011-12-18 17:04:43 +0000
@@ -7,9 +7,8 @@
 </head>
 <body>
 <h1>Appearance</h1>
-<p style="font-style: italic;" cshelp="IDH_SETTINGS_APPEARANCE_REQUIRES_RESTART">Note: Most of these options require
-that you restart DC++. (Fonts, colors and icons are loaded at startup
-only. Window settings are loaded when opening a new window.)</p>
+<p style="font-style: italic;" cshelp="IDH_SETTINGS_APPEARANCE_REQUIRES_RESTART">Note: some of these options require
+that you restart DC++; they won't be applied while DC++ is running. Some settings apply to specific windows and will therefore be loaded when opening a new window.</p>
 <h2>Options</h2>
 <dl style="margin-left: 40px;">
   <dt>Sort all downloads first</dt>

=== modified file 'help/settings_styles.html'
--- help/settings_styles.html	2011-11-15 19:05:59 +0000
+++ help/settings_styles.html	2011-12-18 17:04:43 +0000
@@ -6,25 +6,79 @@
 <link type="text/css" rel="stylesheet" href="style.css"/>
 </head>
 <body>
-<h1>Styles</h1>
-<p style="font-style: italic;">Note: Most of these options require
-that you restart DC++. (Fonts, colors and icons are loaded at startup
-only. Window settings are loaded when opening a new window.)</p>
-<!--
-<dl style="margin-left: 40px;">
-  <dt>Select window color</dt>
-  <dd cshelp="IDH_SETTINGS_COLORS_SELWINCOLOR">This setting determines the background color of the windows in
-DC++.</dd>
-  <dt>Select text style</dt>
-  <dd cshelp="IDH_SETTINGS_COLORS_SELTEXT">This setting determines the color and font used in DC++
-windows. The default depends on the Windows version and the selected theme; it is generally Tahoma (size 8) on XP and Segoe UI (size 9) on Vista and higher.</dd>
-  <dt id="transfercolors">Uploads</dt>
-  <dd cshelp="IDH_SETTINGS_COLORS_UPLOAD_BAR_COLOR">This will set the coloring for the upload progress bars
-(default: RGB(205, 60, 55)).</dd>
-  <dt>Downloads</dt>
-  <dd cshelp="IDH_SETTINGS_COLORS_DOWNLOAD_BAR_COLOR">This will set the coloring for the download progress bars
-(default: RGB(55, 170, 85)).</dd>
-</dl>
--->
+	<h1>Styles</h1>
+	<p>
+	Various color and font settings can be configured here. The combination of a font, a text color
+	and a background color is what DC++ calls a style.<br/>
+	Select the setting you want to configure in the list; its current properties will then be shown
+	in the bottom. You can then edit these properties.<br/>
+	The list always reflects current style properties in order to preview changes.
+	</p>
+
+	<h2>General</h2>
+	<h3>Global application style</h3>
+	<p cshelp="IDH_SETTINGS_STYLES_GLOBAL">
+	The style used throughout all DC++ windows.
+	</p>
+
+	<h2>Transfers</h2>
+	<h3>Uploads</h3>
+	<p cshelp="IDH_SETTINGS_STYLES_UPLOADS">
+	The style used to paint upload transfer bars. Default background color: RGB(205, 60, 55).
+	</p>
+	<h3>Downloads</h3>
+	<p cshelp="IDH_SETTINGS_STYLES_DOWNLOADS">
+	The style used to paint download transfer bars. Default background color: RGB(55, 170, 85).
+	</p>
+
+	<h2>Users</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_USER_MATCH">
+	The styles used to paint users that match user matching definitions.
+	</p>
+	<h3>No user matching definition has been set yet</h3>
+	<p cshelp="IDH_SETTINGS_STYLES_NO_USER_MATCH">
+	This message appears when no user matching definition is available. They can be configured on
+	the <placeholder><a href="settings_user_matching.html">User matching</a></placeholder> settings
+	page.
+	</p>
+
+	<h2>Preview line</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_PREVIEW">
+	When an item is selected in the list, a preview line appears below the list. It reflects style
+	properties for the item currently selected in the list.
+	</p>
+
+	<h2>Font customization</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_FONT">
+	By default, the font used by the current Windows theme is used throughout DC++ (generally
+	Tahoma (size 8) on XP and Segoe UI (size 9) on Vista and higher). A different font may be
+	selected here.
+	</p>
+
+	<h2>Text color customization</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_TEXT">
+	By default, the text color is taken from the current Windows theme (generally black). A
+	different text color may be configured here.
+	</p>
+
+	<h2>Background color customization</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_BG">
+	By default, the background color is taken from the current Windows theme (generally white). A
+	different background color may be configured here.
+	</p>
+
+	<h2>Configure user matching definitions</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_CONF_USER_MATCHING">
+	Switch to the
+	<placeholder><a href="settings_user_matching.html">User matching</a></placeholder> settings
+	page.
+	</p>
+
+	<h2>Show those generated by DC++</h2>
+	<p cshelp="IDH_SETTINGS_STYLES_SHOW_GEN_MATCHERS">
+	Select whether the list should display user matching definitions that DC++ has automatically
+	generated (for example to ignore users). These definitions may clutter the view so they are
+	hidden by default.
+	</p>
 </body>
 </html>

=== modified file 'help/settings_user_matching.html'
--- help/settings_user_matching.html	2011-12-03 21:53:57 +0000
+++ help/settings_user_matching.html	2011-12-18 17:04:43 +0000
@@ -6,7 +6,50 @@
 <link type="text/css" rel="stylesheet" href="style.css"/>
 </head>
 <body>
-	<h1>User matching</h1>
-	<!-- TODO -->
+	<h1>User matching definitions</h1>
+	<p cshelp="IDH_SETTINGS_USER_MATCH_LIST">
+	List of current user matching definitions.<br/>
+	Every user will be matched against configured user matching definitions to find properties to
+	apply (such as chat ignoring, custom colors...). User matching definitions are browsed from the
+	top of the list to the bottom; therefore, when 2 user matching definitions can be applied to
+	the same user and affect the same property, the top-most definition takes precedence.
+	</p>
+
+	<dl style="margin-left: 40px;">
+		<dt>Add</dt>
+		<dd cshelp="IDH_SETTINGS_USER_MATCH_ADD">
+		Open a
+		<placeholder><a href="dialog_user_matching.html">User matching definition</a></placeholder>
+		dialog to create a new user matching definition and add it to the list.
+		</dd>
+
+		<dt>Edit</dt>
+		<dd cshelp="IDH_SETTINGS_USER_MATCH_EDIT">
+		Open the currently selected user matching definition in a
+		<placeholder><a href="dialog_user_matching.html">User matching definition</a></placeholder>
+		dialog in order to edit its properties.
+		</dd>
+
+		<dt>Move Up</dt>
+		<dd cshelp="IDH_SETTINGS_USER_MATCH_MOVE_UP">
+		Move the currently selected user matching definitions upwards in the list.
+		</dd>
+
+		<dt>Move Down</dt>
+		<dd cshelp="IDH_SETTINGS_USER_MATCH_MOVE_DOWN">
+		Move the currently selected user matching definitions downwards in the list.
+		</dd>
+
+		<dt>Remove</dt>
+		<dd cshelp="IDH_SETTINGS_USER_MATCH_REMOVE">
+		Remove the currently selected user matching definitions.
+		</dd>
+
+		<dt>Configure styles (fonts / colors) for these user matching definitions</dt>
+		<dd cshelp="IDH_SETTINGS_USER_MATCH_STYLES">
+		Switch to the <placeholder><a href="settings_styles.html">Styles</a></placeholder> settings
+		page.
+		</dd>
+	</dl>
 </body>
 </html>

=== modified file 'win32/AppearancePage.cpp'
--- win32/AppearancePage.cpp	2011-09-30 11:59:16 +0000
+++ win32/AppearancePage.cpp	2011-12-18 17:04:43 +0000
@@ -124,7 +124,7 @@
 		languages->setHelpId(IDH_SETTINGS_APPEARANCE_LANGUAGE);
 	}
 
-	auto label = grid->addChild(Label::Seed(T_("Note; most of these options require that you restart DC++")));
+	auto label = grid->addChild(Label::Seed(T_("Note: some of these options require that you restart DC++")));
 	label->setHelpId(IDH_SETTINGS_APPEARANCE_REQUIRES_RESTART);
 
 	PropPage::read(items);

=== modified file 'win32/StylesPage.cpp'
--- win32/StylesPage.cpp	2011-12-14 17:18:00 +0000
+++ win32/StylesPage.cpp	2011-12-18 17:04:43 +0000
@@ -19,9 +19,7 @@
 #include "stdafx.h"
 #include "StylesPage.h"
 
-#include <dcpp/format.h>
 #include <dcpp/SettingsManager.h>
-#include <dcpp/version.h>
 
 #include <dwt/widgets/Button.h>
 #include <dwt/widgets/ColorDialog.h>
@@ -47,19 +45,6 @@
 	{ "", 100, false }
 };
 
-/// @todo help
-#define IDH_SETTINGS_STYLES_PREVIEW 0
-#define IDH_SETTINGS_STYLES_FONT 0
-#define IDH_SETTINGS_STYLES_TEXT 0
-#define IDH_SETTINGS_STYLES_BG 0
-#define IDH_SETTINGS_STYLES_CONF_USER_MATCHING 0
-#define IDH_SETTINGS_STYLES_SHOW_GEN_MATCHERS 0
-#define IDH_SETTINGS_STYLES_GLOBAL 0
-#define IDH_SETTINGS_STYLES_UPLOADS 0
-#define IDH_SETTINGS_STYLES_DOWNLOADS 0
-#define IDH_SETTINGS_STYLES_USER_MATCH 0
-#define IDH_SETTINGS_STYLES_NO_USER_MATCH 0
-
 StylesPage::StylesPage(dwt::Widget* parent) :
 PropPage(parent, 1, 1),
 globalData(0),
@@ -151,7 +136,7 @@
 		button->setImage(WinUtil::buttonIcon(IDI_USERS));
 		button->onClicked([this] { static_cast<SettingsDialog*>(getRoot())->activatePage<UserMatchPage>(); });
 
-		showGen = row->addChild(CheckBox::Seed(str(TF_("Show those generated by %1%") % APPNAME)));
+		showGen = row->addChild(CheckBox::Seed(T_("Show those generated by DC++")));
 		showGen->setHelpId(IDH_SETTINGS_STYLES_SHOW_GEN_MATCHERS);
 		showGen->onClicked([this] { static_cast<SettingsDialog*>(getRoot())->getPage<UserMatchPage>()->updateStyles(); });
 	}

=== modified file 'win32/UserMatchDlg.cpp'
--- win32/UserMatchDlg.cpp	2011-12-18 15:37:20 +0000
+++ win32/UserMatchDlg.cpp	2011-12-18 17:04:43 +0000
@@ -62,14 +62,20 @@
 	grid->setSpacing(8);
 
 	name = grid->addChild(GroupBox::Seed(T_("Name")))->addChild(WinUtil::Seeds::Dialog::textBox);
+	name->setHelpId(IDH_USER_MATCH_NAME);
 
 	{
 		auto cur = grid->addChild(GroupBox::Seed())->addChild(Grid::Seed(1, 3));
 		cur->setSpacing(grid->getSpacing());
 
 		favs = cur->addChild(CheckBox::Seed(T_("Match favorite users")));
+		favs->setHelpId(IDH_USER_MATCH_FAVS);
+
 		ops = cur->addChild(CheckBox::Seed(T_("Match operators")));
+		ops->setHelpId(IDH_USER_MATCH_OPS);
+
 		bots = cur->addChild(CheckBox::Seed(T_("Match bots")));
+		bots->setHelpId(IDH_USER_MATCH_BOTS);
 	}
 
 	{
@@ -80,6 +86,7 @@
 		rules->column(1).mode = GridInfo::FILL;
 
 		auto button = cur->addChild(Grid::Seed(1, 1))->addChild(Button::Seed(T_("Add a rule")));
+		button->setHelpId(IDH_USER_MATCH_ADD_RULE);
 		button->onClicked([this] { addRow(); layoutRules(); });
 	}
 
@@ -88,8 +95,11 @@
 		cur->setSpacing(grid->getSpacing());
 
 		forceChat = cur->addChild(CheckBox::Seed(T_("Always show chat messages")));
+		forceChat->setHelpId(IDH_USER_MATCH_FORCE_CHAT);
 		forceChat->onClicked([this] { if(forceChat->getChecked()) ignoreChat->setChecked(false); });
+
 		ignoreChat = cur->addChild(CheckBox::Seed(T_("Ignore chat messages")));
+		ignoreChat->setHelpId(IDH_USER_MATCH_IGNORE_CHAT);
 		ignoreChat->onClicked([this] { if(ignoreChat->getChecked()) forceChat->setChecked(false); });
 	}
 
@@ -197,15 +207,19 @@
 	rules->addRow();
 
 	auto field = rules->addChild(WinUtil::Seeds::Dialog::comboBox);
+	field->setHelpId(IDH_USER_MATCH_RULE_FIELD);
 
 	auto search = rules->addChild(WinUtil::Seeds::Dialog::textBox);
+	search->setHelpId(IDH_USER_MATCH_RULE_PATTERN);
 
 	auto method = rules->addChild(WinUtil::Seeds::Dialog::comboBox);
+	method->setHelpId(IDH_USER_MATCH_RULE_METHOD);
 
 	{
 		auto seed = Button::Seed(_T("X"));
 		seed.padding.x = 10;
 		auto remove = rules->addChild(seed);
+		remove->setHelpId(IDH_USER_MATCH_RULE_REMOVE);
 		remove->onClicked([this, remove] { callAsync([=] {
 			rules->removeRow(remove);
 			layoutRules();

=== modified file 'win32/UserMatchPage.cpp'
--- win32/UserMatchPage.cpp	2011-12-14 19:07:55 +0000
+++ win32/UserMatchPage.cpp	2011-12-18 17:04:43 +0000
@@ -42,17 +42,8 @@
 	{ "", 100, false }
 };
 
-/// @todo help
-#define IDH_SETTINGS_USER_MATCH_LIST 0
-#define IDH_SETTINGS_USER_MATCH_ADD 0
-#define IDH_SETTINGS_USER_MATCH_EDIT 0
-#define IDH_SETTINGS_USER_MATCH_MOVE_UP 0
-#define IDH_SETTINGS_USER_MATCH_MOVE_DOWN 0
-#define IDH_SETTINGS_USER_MATCH_REMOVE 0
-#define IDH_SETTINGS_USER_MATCH_STYLES 0
-
 UserMatchPage::UserMatchPage(dwt::Widget* parent) :
-PropPage(parent, 2, 1),
+PropPage(parent, 1, 1),
 table(0),
 edit(0),
 up(0),
@@ -67,13 +58,9 @@
 	grid->row(0).align = GridInfo::STRETCH;
 
 	{
-		auto cur = grid->addChild(GroupBox::Seed(T_("User matching definitions")))->addChild(Grid::Seed(2, 5));
+		auto cur = grid->addChild(GroupBox::Seed(T_("User matching definitions")))->addChild(Grid::Seed(3, 1));
 		cur->setHelpId(IDH_SETTINGS_USER_MATCH_LIST);
 		cur->column(0).mode = GridInfo::FILL;
-		cur->column(1).mode = GridInfo::FILL;
-		cur->column(2).mode = GridInfo::FILL;
-		cur->column(3).mode = GridInfo::FILL;
-		cur->column(4).mode = GridInfo::FILL;
 		cur->row(0).mode = GridInfo::FILL;
 		cur->row(0).align = GridInfo::STRETCH;
 		cur->setSpacing(grid->getSpacing());
@@ -81,31 +68,37 @@
 		Table::Seed seed = WinUtil::Seeds::Dialog::table;
 		seed.style |= LVS_NOCOLUMNHEADER;
 		table = cur->addChild(seed);
-		cur->setWidget(table, 0, 0, 1, 5);
-
-		auto button = cur->addChild(Button::Seed(T_("&Add")));
+
+		auto row = cur->addChild(Grid::Seed(1, 5));
+		row->column(0).mode = GridInfo::FILL;
+		row->column(1).mode = GridInfo::FILL;
+		row->column(2).mode = GridInfo::FILL;
+		row->column(3).mode = GridInfo::FILL;
+		row->column(4).mode = GridInfo::FILL;
+		row->setSpacing(cur->getSpacing());
+
+		auto button = row->addChild(Button::Seed(T_("&Add")));
 		button->setHelpId(IDH_SETTINGS_USER_MATCH_ADD);
 		button->onClicked([this] { handleAddClicked(); });
 
-		edit = cur->addChild(Button::Seed(T_("&Edit")));
+		edit = row->addChild(Button::Seed(T_("&Edit")));
 		edit->setHelpId(IDH_SETTINGS_USER_MATCH_EDIT);
 		edit->onClicked([this] { handleEditClicked(); });
 
-		up = cur->addChild(Button::Seed(T_("Move &Up")));
+		up = row->addChild(Button::Seed(T_("Move &Up")));
 		up->setHelpId(IDH_SETTINGS_USER_MATCH_MOVE_UP);
 		up->onClicked([this] { handleMoveUpClicked(); });
 
-		down = cur->addChild(Button::Seed(T_("Move &Down")));
+		down = row->addChild(Button::Seed(T_("Move &Down")));
 		down->setHelpId(IDH_SETTINGS_USER_MATCH_MOVE_DOWN);
 		down->onClicked([this] { handleMoveDownClicked(); });
 
-		remove = cur->addChild(Button::Seed(T_("&Remove")));
+		remove = row->addChild(Button::Seed(T_("&Remove")));
 		remove->setHelpId(IDH_SETTINGS_USER_MATCH_REMOVE);
 		remove->onClicked([this] { handleRemoveClicked(); });
-	}
 
-	{
-		auto button = grid->addChild(Grid::Seed(1, 1))->addChild(Button::Seed(T_("Configure styles (fonts / colors) for these user matching definitions")));
+		button = cur->addChild(Grid::Seed(1, 1))->addChild(
+			Button::Seed(T_("Configure styles (fonts / colors) for these user matching definitions")));
 		button->setHelpId(IDH_SETTINGS_USER_MATCH_STYLES);
 		button->setImage(WinUtil::buttonIcon(IDI_STYLES));
 		button->onClicked([this] { static_cast<SettingsDialog*>(getRoot())->activatePage<StylesPage>(); });