feature reqest search for user

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
carl0s
Posts: 9
Joined: 2004-08-02 05:51

feature reqest search for user

Post by carl0s » 2004-08-02 06:00

In the favourite users tab
or anywhere ultimately

i would love to see a feature that allows right click on a users name

"Locate User"
that calls this address and either opens in browser or in Dc++ in a tab if possible
http://www.hublist.org/?p=search&mode=users&nick=(Enter User variable here)

I'd write it but im not any good at C++

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: feature reqest search for user

Post by GargoyleMT » 2004-08-02 11:09

carl0s wrote:I'd write it but im not any good at C++
resource.h:

Code: Select all

IDC_HUBLIST_LOC_USER  1112
hubframe.h's message map:

Code: Select all

COMMAND_ID_HANDLER(IDC_HUBLIST_LOC_USER, onHublistLocUser)
later in hubframe.h

Code: Select all

LRESULT onHublistLocUser(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
in HubFrame::OnCreate

Code: Select all

userMenu.AppendMenu(IDC_HUBLIST_LOC_USER, STRING(HUBLIST_LOCATE_USER));
later in HubFrame.cpp

Code: Select all

LRESULT onHublistLocUser(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) {
int i = ctrlUsers.GetNextItem(-1, LVNI_SELECTED);
if(ctrlUsers.GetSelectedCount() == 1 && i != -1) {
string nick = (ctrlUsers.getItemData(i))->user->getNick();
WinUtil::openLink("http://www.hublist.org/?p=search&mode=users&nick=" + Util::encodeUri(nick));
}
return 0;
}
StringDefs.h (use Makedefs afterwards):

Code: Select all

HUBLIST_LOCATE_USER, // "Locate user using Hublist.org"
This is lacking a little bit of polish, like greying the item when multiple users are selected. That's left as an excersize to the reader.

Locked