Container.SetSort?
#1
Looking at the built-in functions, I see there are commands to set the container's view mode. So I can make my own control to do this, rather than using the sort of built-in one. Which is what I want. I also wanted to make my own control to change the sorting, but there doesn't seem to be any functions to set the sorting. At least not that I see listed. Is this possible?
Reply
#2
I don't think it exists at the moment but some sort of set sort method would be a great addition.
Reply
#3
Not possible atm - a patch would be most welcome - just follow the set view stuff (CUtil::ExecBuiltIn()) and CGUIMediaWindow::OnMessage() IIRC)

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
jmarshall Wrote:Not possible atm - a patch would be most welcome - just follow the set view stuff (CUtil::ExecBuiltIn()) and CGUIMediaWindow::OnMessage() IIRC)

Cheers,
Jonathan

Ok i'll take a look.
Reply
#5
Note that this one would be much trickier to get right.

It'd be easy to have next and previous sort order, and pretty easy to grab the current sort order as an infolabel.

The tricky bit would be knowing what the sort options should be populated with, as it changes based on user settings and which directory you are browsing (some folders allow more sort options than others).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
jmarshall Wrote:Note that this one would be much trickier to get right.

It'd be easy to have next and previous sort order, and pretty easy to grab the current sort order as an infolabel.

The tricky bit would be knowing what the sort options should be populated with, as it changes based on user settings and which directory you are browsing (some folders allow more sort options than others).

Cheers,
Jonathan

So i've noticed Smile

Right now i'm just working on getting nice simple Next/Previous to make sure I understand the whole chain, then i'll go on from there.
Reply
#7
Well I finally did manage to get functions to set the next/previous sort method, and it looks like there is already an infolabel to return the sort method.

May not sound like much but for my first actual code in this mammoth of a project, I feel pretty good Smile
Reply
#8
I've submitted the patch for next/previous so hopefully at least that will be in there.

I probably won't get a chance to do the explicit set until my next weekend though which is Tuesday. Just got done my weekend.
Reply
#9
Nice, I look forward to trying it if it gets in. Big Grin
Reply
#10
skunkm0nkee Wrote:Nice, I look forward to trying it if it gets in. Big Grin

It is in the latest SVN code. Let me know if you run into any problems with it. I will be the first that it wasn't extensively tested. Just enough to verify it was working under my test cases. Which essentially was just me setting two buttons on my skin then going into one library view and using them to change the sort :p

I will be adding the ability to specify a specific sort as well, but will be a bit farther down the road when I get a chance.
Reply
#11
ah i will be looking forward to the specific sort as well Big Grin really need it on the skin i'm working on
Reply
#12
timdog82001 Wrote:ah i will be looking forward to the specific sort as well Big Grin really need it on the skin i'm working on

I will TRY and take a look at getting that finished up this week. No promise, but I need it as well.
Reply
#13
agathorn Wrote:I will TRY and take a look at getting that finished up this week. No promise, but I need it as well.

Any luck with this yet agathorn?
Reply
#14
skunkm0nkee Wrote:Any luck with this yet agathorn?

It is 90% done. I'll see if I can get things wrapped on it today.

Originally my plan was to allow the skinner to pass more readable commands such as Container.SetSortMethod(NAME), but at this point I just haven't had the time to sit down and take care of all the various sort options.

So what i'm going to do is finish wrapping things up and testing it in the more simpler method, which means you will need to simply use the right ID number for the sort method, IE: Container.SetSortMethod(1). I will also post a table for xref.

Then at least the functionality will be in there and I can see about updating it to be "nicer" later, though tbh I don't see it as that huge of a deal.
Reply
#15
Ok just an update on this. Still having some issues with setting explicit sorts. The infolabel is working though, so I just have this last issue to hunt down.

EDIT: For some frickin annoying reason, the message just isn't being passed on and for the life of me I can't figure out why. It is driving me insane!
Reply

Logout Mark Read Team Forum Stats Members Help
Container.SetSort?0