align path+filname column to the right

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

Moderator: Moderators

Locked
cyberal
Posts: 360
Joined: 2003-05-16 05:42

align path+filname column to the right

Post by cyberal » 2003-08-04 15:48

In "finished uploads" and "finished downloads" there are one column for file path + filename, if you have long path names and deep trees, especially the uploads window tends to be impossible to use, you would have to scroll forever to get to the filename way off to the right..

My first thought was to put the path in its own column and by that I can see the filename.. but then a realized I probably want to see what folder that file is in, but not necessarily more than that... solution..

align the path + filename to the right instead of (like now) left... this makes it possible to see the filename + closest folders regardless of what size you choose to have in the path + filename column.!
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-08-04 15:55

just to make it clear how I want this.. say I have set the path+filename column so the whole name is visible (1)... now.. if I slowly drags the column to the left, making it smaller.. I want the left part of the field to be "hidden".. (2)

1.

Code: Select all

D:\path to my cool apps\another super path\my superb app.exe

2.

Code: Select all

..super path\my superb app.exe
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-08-05 14:51

hm.. I like that..
I'll see if that's easy when I get back home
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-08-06 01:49

sweat :D
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

jbyrd
Posts: 255
Joined: 2003-05-10 09:26
Location: no-la-usa-earth
Contact:

Post by jbyrd » 2003-08-06 07:28

I think you meant "sweet" :mrgreen:
Hehe.

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-08-06 07:35

lol, you are correct =)
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2003-08-10 20:39

hm.. I can't find any options to easily do this

the ExListViewCtrl does have an option to align to the right.. but when it doesn't fit, the string is cut (stripped) on the right and not on the left

a workaround would be to manually cut the strings to the maximum length that fits. this however has the uncool implication that the path cannot be sorted correctly (unless of course you would keep the old path column as well, and sort by that one). it would also use a bit more cpu.

a very non-optimized version (which will also screw up the columns if you resize the path column (until you close and reopen the frame)) for the finished downloads frame looks like:

Code: Select all

		int fmt = (j == COLUMN_SIZE || j == COLUMN_SPEED || j == COLUMN_PATH) ? LVCFMT_RIGHT : LVCFMT_LEFT;
(in onCreate)

Code: Select all

void FinishedFrame::addEntry(FinishedItem* entry, bool dirty /* = true */) {
	SIZE sz = { 0, 0 };
	HDC dc = ::GetDC((HWND)0);
	HGDIOBJ oldobj = SelectObject(dc, WinUtil::font);
	unsigned cnt = entry->getTarget().length();
	unsigned rcnt = 0;
	while(cnt && sz.cx < (columnSizes[COLUMN_PATH] - 32)) {
		GetTextExtentPoint32(dc, entry->getTarget().substr(--cnt).c_str(), ++rcnt, &sz);
	}
	SelectObject(dc, oldobj);
	::ReleaseDC((HWND)0, dc);

	StringList l;
	l.push_back(entry->getTime());
	l.push_back(string("...") + entry->getTarget().substr(cnt));
	l.push_back(entry->getUser() + " (" + entry->getHub() + ")");
(in addEntry)

of course there is the possibility that (other) people who actually know something about the windows GDI and WTL have better solutions (hopefully ;) )
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

cyberal
Posts: 360
Joined: 2003-05-16 05:42

Post by cyberal » 2003-08-11 04:02

Sedulus> great that you have put some time and thought into this, now maybe someone else can finish the work and give it to arne, do we have any programmers that are really good at this kind of stuff??
http://whyrar.omfg.se - Guide to RAR and DC behaviour!
http://bodstrom.omfg.se - Bodströmsamhället, Länksamling om hoten mot vår personliga integritet

Locked