Modernizing DC++

Site Announcements
iceman50
Junior Member
Posts: 26
Joined: 10 Jun 2010, 15:10

Modernizing DC++

Post by iceman50 » 25 Jan 2011, 05:11

So, I was sitting here earlier, and for a while people have been asking me about getting DC++ to introduce chat coloring and other things in that nature, basically make DC++ more modernized in respect to the UI being customizable. For the longest times other clients have been customizable in this aspect...I remember using SdDC++ 0.12x (DC++ pre- 0.300) and you could literally change every aspect of the UI from colors to icons even toolbar gradients and what not. So the reason I am here is to propose some UI extensibility to DC++ (which in all honesty is long over do, I mean IRC clients have these kinds of features) so I'd like to formally propose some changes to the UI that I have been thinking up, obviously this isn't complete but here I go =)

.dcstyle "Theming" proposal for DC++

Code: Select all

things to be handled inside of a dcstyle theme layout

Userlist coloring (Bot, Op, Favorite User, Normal User)
Chat formatting
	|> Coloring
		|> Text (including specifications for timestamp coloring, nick coloring, actual text, magnetlinks)
	|> Formatting
		|> Magnet links (make them more readable as per: StrongDC/ApexDC
		|> Text effects (bold, italic, underscore, etc.)
	|> Icons
		|> Icons should be interchangeable and not linked into DC++, i.e. all icons should reside in a "res" or "icons" folder (sub directory of the actual DC++ exe)
			|> Userlist icons, Toolbar icons, and all other icons should be split into individual sub directories as stated prior.. \\res\toolbar ... \\res\userlist...so on so forth....
				all other icons will reside in the root "res" directory
So please if you have any comments questions or ideas please by allmeans feel free

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Modernizing DC++

Post by cologic » 25 Jan 2011, 05:32

No objections to any of it. Looks like you're taking care of userlist coloring. For chat formatting, the next step is probably either to take advantage of DC++ finally getting wide character regex support to replace the dummy RTF chat formatting code in RichTextBox::rtfEscape and RichTextBox::rtfEscapeFormatter with real code more akin to dcpp.FormatChatText or adopt mshtml and perform some similar tranformations. Whilst the regular expressions currently live in Lua code, they're not Lua-specific in general and should be easy to transpose into boost::regex.

I don't recall seeing anyone object, really, to parts of this proposal that have been presented; it's just a matter of someone actually doing it.

iceman50
Junior Member
Posts: 26
Joined: 10 Jun 2010, 15:10

Re: Modernizing DC++

Post by iceman50 » 25 Jan 2011, 05:51

I would love to see some kind of mshtml implemented, would make a lot more sense and would be easier and afaik (from you) it should run under wine and yes I have decided to take some initiative in undertaking this task, would be something pretty nice to see as a finished project...as for regex are you familiar with the way Trem did some of the things in fulDC in that respect with highlighting...I'd really like some opinions especially from some of you "senior" guys and perhaps a little help and guidance. Unfortunately documentation for dwt is practically nonexistent so it may be a bit tougher for me but it's worth it in the end imho.

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Modernizing DC++

Post by cologic » 25 Jan 2011, 06:07

iceman50 wrote:I would love to see some kind of mshtml implemented, would make a lot more sense and would be easier and afaik (from you) it should run under wine and yes I have decided to take some initiative in undertaking this task, would be something pretty nice to see as a finished project...as for regex are you familiar with the way Trem did some of the things in fulDC in that respect with highlighting...I'd really like some opinions especially from some of you "senior" guys and perhaps a little help and guidance. Unfortunately documentation for dwt is practically nonexistent so it may be a bit tougher for me but it's worth it in the end imho.
Yes, WINE seems to support the MSHTML control and I agree that it's preferable to richedit in allowing for easier implementation of pretty magnet links and more control over link formatting. I'm unfamiliar with how Trem did chat formatting. Also, how does e.g. StrongDC++ or ApexDC++ format chat? These are all options.

dwt indeed mostly lacks documentation, but since it's derived from SmartWin++, its documentation might prove useful. I don't recall how much it's changed since though. poy could probably most usefully comment on how applicable SmartWin++ documentation might prove to dwt. It's also not much code, especially for a GUI framework, so simply reading through it as needed is both practical and helps a lot.

iceman50
Junior Member
Posts: 26
Joined: 10 Jun 2010, 15:10

Re: Modernizing DC++

Post by iceman50 » 25 Jan 2011, 06:11

cologic wrote: dwt indeed mostly lacks documentation, but since it's derived from SmartWin++, its documentation might prove useful. I don't recall how much it's changed since though. poy could probably most usefully comment on how applicable SmartWin++ documentation might prove to dwt. It's also not much code, especially for a GUI framework, so simply reading through it as needed is both practical and helps a lot.
Yeah actually ran into a problem with some commenting in regards to doing redraws in dwt with some of my CustomDraw stuff (which i didn't need in the end but still) that was quite useless as it was an artifact from the smartwin developers that poy or arne had left behind in Table.h (something in regards to invalidateWidget). As for the highlighting, basically you could use regular expressions to highlight certain things in chat like keywords or phrases...pretty much whatever (which can prove very useful). As for StrongDC/Apex they use a custom chatCtrl with CHARFORMAT2

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Modernizing DC++

Post by cologic » 25 Jan 2011, 06:19

iceman50 wrote:Yeah actually ran into a problem with some commenting in regards to doing redraws in dwt with some of my CustomDraw stuff (which i didn't need in the end but still) that was quite useless as it was an artifact from the smartwin developers that poy or arne had left behind in Table.h (something in regards to invalidateWidget). As for the highlighting, basically you could use regular expressions to highlight certain things in chat like keywords or phrases...pretty much whatever (which can prove very useful). As for StrongDC/Apex they use a custom chatCtrl with CHARFORMAT2
Hopefully you pointed that obsolete Table.h comment documentation out to either poy or arne - that way it won't just linger there for the next person to find.

fulDC's method sounds potentially useful. StrongDC++ and ApexDC++ sound like they rather excessively reimplement what one could just get from MSHTML. Most of the actual difficulty lies not in the formatting/highlighting per se but in the GUI and storage schemas for such an extensively configurable feature, so I'd generally suggest that someone figure out what GUI they're willing to create for this feature and then let the chat text -> RTF and/or HTML code follow almost automatically.

iceman50
Junior Member
Posts: 26
Joined: 10 Jun 2010, 15:10

Re: Modernizing DC++

Post by iceman50 » 25 Jan 2011, 06:24

cologic wrote: Hopefully you pointed that obsolete Table.h comment documentation out to either poy or arne - that way it won't just linger there for the next person to find.
Yes, I brought it up to poy so hopefully he will begin going through dwt and ridding it all of the useless source comments, and perhaps create some sort of initial documentation for dwt.
cologic wrote: StrongDC++ and ApexDC++ sound like they rather excessively reimplement what one could just get from MSHTML. Most of the actual difficulty lies not in the formatting/highlighting per se but in the GUI and storage schemas for such an extensively configurable feature, so I'd generally suggest that someone figure out what GUI they're willing to create for this feature and then let the chat text -> RTF and/or HTML code follow almost automatically.
Yeah I believe that MSHTML would essentially be much more of a feasible and "common" sense choice for this and implementing in dwt would be a good choice (but considering that StrongDC and Apex eventually will migrate to wxWidgets I don't know if they would do the same)

cologic
Junior Member
Posts: 41
Joined: 21 Jul 2009, 19:34

Re: Modernizing DC++

Post by cologic » 25 Jan 2011, 06:45

iceman50 wrote:Yeah I believe that MSHTML would essentially be much more of a feasible and "common" sense choice for this and implementing in dwt would be a good choice (but considering that StrongDC and Apex eventually will migrate to wxWidgets I don't know if they would do the same)
wxWidgets has wxHtmlWindow, which is their analogue to MSHTML, so that approach is still viable for StrongDC++ and ApexDC++.

As far as DC++'s implementation - the GUI is relatively independent of the underlying markup transformation/application, so it should be possible, without much ultimately wasted effort even if/when DC++ transitions to using MSHTML, to write a configuration/setup system for chat formatting, then adapt it to whatever display control DC++ uses at the time. It's not even that helpful to wait for someone to implement MSHTML to start.

iceman50
Junior Member
Posts: 26
Joined: 10 Jun 2010, 15:10

Re: Modernizing DC++

Post by iceman50 » 25 Jan 2011, 06:51

cologic wrote:wxWidgets has wxHtmlWindow, which is their analogue to MSHTML, so that approach is still viable for StrongDC++ and ApexDC++.
Oh I didn't mean to say that they couldn't or wouldn't but it's completely up to them although it could create some uniformity among the different clients.
cologic wrote:As far as DC++'s implementation - the GUI is relatively independent of the underlying markup transformation/application, so it should be possible, without much ultimately wasted effort even if/when DC++ transitions to using MSHTML, to write a configuration/setup system for chat formatting, then adapt it to whatever display control DC++ uses at the time. It's not even that helpful to wait for someone to implement MSHTML to start.
I agree I would like to begin with it ASAP in all reality, and like you previously said in regards to going through dwt and finding out how things are handled and work, I have been but sometimes for me at least it's easier to have some formal documentation, it's just the way I find easiest to learn, although I do sit there and go through dwt bit by bit and find out how to do things so all hope for me isn't completely lost lol. I know for me it won't be a "fast" process, but it will be an excellent learning experience and obviously a great and much needed enhancement to DC++.

Big Muscle
Junior Member
Posts: 39
Joined: 01 Jul 2008, 19:27

Re: Modernizing DC++

Post by Big Muscle » 25 Jan 2011, 08:36

StrongDC++ uses pure richedit and set text's format when some specific sequence (own nick, OP nick) is found. I'm not thinking about migrating to wxHtmlWindow now, it's just not needed and I don't see any benefits in it.

Locked