This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Bandwidth scheduler

Tags: None
(comma "," separated)
Tanktalus
Registered Member
Posts
67
Karma
0
OS

Bandwidth scheduler

Mon Jun 21, 2010 11:15 pm
I'm using the latest from SVN compiled earlier today (~5:15PM GMT, June 21, 2010).

I'm trying to put in a schedule for the evening, and it won't let me change the from time to after 11:59 (the default to time) without changing the to time first. Unfortunately, "from" has focus first, so I didn't figure this out the first time through.

Better than blocking the from time from being later than the to time would be to automatically move the to time to 1 hour later than the from time any time the user tries to set the from time to be later than the to time, or to 23:59, whichever is earlier.

Code: Select all
if (new_from_time > to_time) {
  to_time = min(new_from_time + 60, 23*60 + 59);
  to_time_box.update_widget();
}


Not that I've looked at the code, but I think that snippet is probably easier to read/understand than the English paragraph preceding it :-)
George
Moderator
Posts
5421
Karma
1

Re: Bandwidth scheduler

Tue Jun 22, 2010 4:26 pm
Yes I was planning on doing something like that


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]