use ComboDlg in usercommands similar to LineDlg

Bug #505450 reported by Sulan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DC++
Fix Released
Wishlist
Unassigned

Bug Description

I would love to be able to use ComboDlg in a similar way to LineDlg in usercommands, passing a list of options.
I'v made a patch for it, but it might need some cleaing/tweaking since im not so familiar with the code.
Also the syntax %[combo:title;line1,line2,line3] may not be the best..

Revision history for this message
Sulan (sulan80) wrote :
Revision history for this message
Sulan (sulan80) wrote :

Forgot to restore linedlg size code, i was playing around...

Revision history for this message
Sulan (sulan80) wrote :

I got some sugestions in DCDev, and i made another patch. With this one you can use %[line:something] to get a normal linedlg and %[line:something;string1,string2] to get a combodlg

Revision history for this message
Crise / MW (markuwil) wrote :

I would suggest using something less common in place of ';' like the pipe (|) for example

Revision history for this message
poy (poy) wrote :

how would one add a semicol in the title name? ';;'?
how would one add a comma in a value? ',,'?
a way to specify the default selected value would be nice...

Revision history for this message
Sulan (sulan80) wrote :

Using | (pipe) as Crise suggested might be a solution %[line:title|val1|val2] and ppl would have to live without | in the title.
For default selected value, how about using the first in the list? I dont know how dc++ stringlists behave, so please come with suggestions.

Revision history for this message
poy (poy) wrote :

a slash (/) would be a better choice than a bar since it's what is used as a separator in the user-command name. and the agreed way to not consider a / a separator is to double it: '//'.
for the default value, there are lots of possibilities, here is one: %[combo:2|aaa|bbb|ccc|ddd] would auto-select 'ccc'.

Revision history for this message
Crise / MW (markuwil) wrote :

really sticking to extending %[line:blah] would be better imo (so that there will be less issues with clients supporting/not supporting this), and yeah a slash would in that case be better choice.

Revision history for this message
Sulan (sulan80) wrote :

Ok rewrote it to match poys preferings.
using / as separators and // as escape, first value indicates default selection.
syntax %[line:title/1/2/3/4//5]

Revision history for this message
Sulan (sulan80) wrote :

updated so it works with paramdlg

Revision history for this message
Sulan (sulan80) wrote :

Anyone with some feedback/ideas/comments? Does this need to be announced by supports some how?
The reason i would like to add this feature is to allow hubs to provide valid options for UCMDs.

Revision history for this message
poy (poy) wrote :

syntax: %[line:caption/default_sel/value0/value1/.../valueN]

Changed in dcplusplus:
status: New → Fix Committed
Revision history for this message
poy (poy) wrote :

Fixed in version 0.762.

Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.