Bug 164206 - KOrganizer should round to the nearest 5 minutes, (or custom unit) instead of nearest 15 minutes
Summary: KOrganizer should round to the nearest 5 minutes, (or custom unit) instead of...
Status: REPORTED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 11:41 UTC by BryanFRitt
Modified: 2009-05-08 01:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
the modified koagenda.cpp (61.64 KB, text/plain)
2008-06-24 01:35 UTC, BryanFRitt
Details
the modified koagendaview.cpp (57.86 KB, text/plain)
2008-06-24 01:36 UTC, BryanFRitt
Details
the modified korganizer.kcfg (23.94 KB, text/plain)
2008-06-24 01:37 UTC, BryanFRitt
Details
koagenda.cpp (62.46 KB, patch)
2008-08-05 22:05 UTC, BryanFRitt
Details
koagendaview.cpp (58.70 KB, patch)
2008-08-05 22:07 UTC, BryanFRitt
Details
korganizer.kcfg (23.94 KB, patch)
2008-08-05 22:08 UTC, BryanFRitt
Details
koagenda for KDE 3.5.10 (62.65 KB, patch)
2009-05-08 01:06 UTC, BryanFRitt
Details
koagendaview for KDE 3.5.10 (50.36 KB, patch)
2009-05-08 01:08 UTC, BryanFRitt
Details
korganizer for KDE 3.5.10 (24.11 KB, patch)
2009-05-08 01:09 UTC, BryanFRitt
Details
timelabels for KDE 3.5.10 (11.94 KB, patch)
2009-05-08 01:10 UTC, BryanFRitt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BryanFRitt 2008-06-16 11:41:52 UTC
Version:           3.5.9 (using 3.5.9, Kubuntu (hardy) 4:3.5.9-0ubuntu7.1)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.24-18-generic

My [class] schedule is typically rounded to the nearest 5 minutes time internal, but most of KOrganizer defaults are going to the nearest 15 minutes.
In the day/work week/week/next x days views, when I click on the calendar to make a new appointment/to-do, it always rounds to the nearest 15 minute time (00,15,30,45)  I'd like to have it round to the nearest 5 minute time interval instead. (00,05,10,15,20,25,30,35,40,45,50,55) same goes for the drop down time boxes that follow. (Date & Time section) In the attendees tab it rounds to the nearest minute.  This can be rounded to the nearest 5 as well. (and maybe have a information underneath it showing what time the appointment is being changed start stop duration)

Some people might prefer it rounding to the nearest 1,2,3,4,5,6,10,12,15,20,30, or 60 minutes, etc... (I chose factors of 60,2*2*3*5 for this example) So I propose this option being added to KOrganizer configure 'Views' options (maybe 'Time & Date'), with a default of 5 minutes, and an option for pixels per unit minimum. (like the current 'Hour size' option in t 'Settings'->'Configure KOrganizer'->'Views'->'Agenda View'->'Hour size'*)

(or maybe it should just have options of 1,5,10,15,20,30,and 60 minutes, but I do know some buses that come every 12 minutes, etc...)

*The current Hour size option should be called 'minimum size per unit', 
and there's a bug that gives you more than 24 hours in a day... have the KOrganizer window maximized, set Hour size to 4, apply and resize the window smaller scroll down and you'll see more than 24 hours in a day! now if I could really add more hours to my day that would be neat!, guess I'll report this paragraphs bug in another bug report.
Comment 1 BryanFRitt 2008-06-16 12:06:58 UTC
p.s.

   1 *  1 * day =
1440 *  1 * minute =
 720 *  2 * minute =
 480 *  3 * minute =
 360 *  4 * minute =
 288 *  5 * minute =
 240 *  6 * minute =
 144 * 10 * minute =
 120 * 12 * minute =
  96 * 15 * minute =
  48 * 30 * minute =
  24 * 60 * minute =
  24 *  1 * hour =
   1 *  1 * day...

and most desktop screens resolution are now of days are from 800x600 to 2048x1536, which gives plenty of room 5 minute intervals

and another weird idea to consider would be sub dividing each row up into individual minutes the in the perpendicular direction, but I betting it wouldn't be worth it.
-----------
| | | | | |
-----------
| | | | | |
-----------
| | | | | |
-----------
| | | | | |
-----------

and

1440 = 2^5 * 3^2 * 5^1
 720 = 2^4 * 3^2 * 5^1
 480 = 2^5 * 3^1 * 5^1
 360 = 2^3 * 3^2 * 5^1
 288 = 2^5 * 3^1 * 5^0
 240 = 2^4 * 3^1 * 5^1
 144 = 2^4 * 3^2 * 5^0
 120 = 2^3 * 3^1 * 5^1
  96 = 2^5 * 3^1 * 5^0
  48 = 2^4 * 3^1 * 5^0
  24 = 2^3 * 3^1 * 5^0
   1 = 2^0 * 3^0 * 5^0

   4 = 2 * 2
   6 = 2 * 3
  10 = 2 * 5
  12 = 2 * 2 * 3
  15 = 3 * 5
  30 = 2 * 3 * 5
  60 = 2 * 2 * 3 * 5

not quite sure why I did all this math...
Comment 2 BryanFRitt 2008-06-16 13:14:09 UTC
I submitted the more than 24 hours a day bug to:
http://bugs.kde.org/show_bug.cgi?id=164209
These two bugs kind of related (<-not really sure how to say, what I meant to say here)
Comment 3 BryanFRitt 2008-06-16 13:48:24 UTC
Being able to one mouse stroke to set the time and duration of an event would be really nice.  

Compare it to what I would have to do without this option:

Select an approximate time frame
go to and click on the start time
delete the minutes
type in the new minutes
go to and click on the end time
delete the minutes
type in the new minutes

If all that could be reduced to one mouse stroke, I'd be really greatfull. (and others too!)

Thanks,

Bryan
Comment 4 BryanFRitt 2008-06-24 01:35:53 UTC
Created attachment 25556 [details]
the modified koagenda.cpp
Comment 5 BryanFRitt 2008-06-24 01:36:50 UTC
Created attachment 25557 [details]
the modified koagendaview.cpp
Comment 6 BryanFRitt 2008-06-24 01:37:49 UTC
Created attachment 25558 [details]
the modified korganizer.kcfg
Comment 7 BryanFRitt 2008-06-24 01:42:31 UTC
I looked at the source code, and modified it, so that I could use the agenda view at the 5 minute level, the time line now goes at 20 minute increments (like , 8:00, 8:20, 8:40, 9:00) but the view itself now goes at 5 minute intervals.  I set it up so someone could (somewhat) easily change it from 5 minute intervals to something else. If you want you can add the option to change the base calendar unit to the settings configure views menu(my recommendation).  All lines changes with changes that I've done say Bryan(me) on them, so you find what I've done, and modify it more easily.  If you like it say thanks, make comments, etc...
Comment 8 Allen Winter 2008-06-24 02:10:41 UTC
Thanks for the extensive patch Bryan.

We are in feature freeze for the upcoming 4.1 release currently.

But please remind us about this patch when we open up for 4.2 features, which
should be in about 1 month.

-Allen
Comment 9 BryanFRitt 2008-06-24 15:16:08 UTC
These were made from the KDE/KOrganizer 3.5.9 source code, feel free to modify/include in 4.2, etc...


"But please remind us about this patch when we open up for 4.2 features, which
should be in about 1 month."

 how?
Comment 10 BryanFRitt 2008-08-05 21:53:35 UTC
"But please remind us about this patch when we open up for 4.2 features, which
should be in about 1 month." 

Posting here is the main way I thought of...

I made some slight changes since last time...
Comment 11 BryanFRitt 2008-08-05 22:05:35 UTC
Created attachment 26670 [details]
koagenda.cpp
Comment 12 BryanFRitt 2008-08-05 22:07:08 UTC
Created attachment 26671 [details]
koagendaview.cpp
Comment 13 BryanFRitt 2008-08-05 22:08:01 UTC
Created attachment 26672 [details]
korganizer.kcfg
Comment 14 BryanFRitt 2008-08-05 22:24:25 UTC
I don't remember which ones I changed since last time, but I know I didn't mess with any different files, so I just reposted all of them.
I fixed a small bug or two since last time.

Note: I didn't fix the bug caused by the width of the TimeLables being set by the Font size given in the Configure->Fonts->Time bar section instead of width of the actual font displayed.

(p.s. it's been a few weeks since I last touched this code)
Comment 15 BryanFRitt 2008-08-05 22:46:31 UTC
These fixes don't change the 'Time Line View or Attendees View' (which was left 'per minute' at the original zoom), maybe somebody could fix 'Time Line View and Attendees View' to work like the above patches (which work for the other non-month views) and round to the nearest 5 minutes (or custom unit).  I don't think I'll end up messing with it.
Comment 16 BryanFRitt 2008-08-29 03:30:50 UTC
(In reply to comment #8)
> Thanks for the extensive patch Bryan.
> 
> We are in feature freeze for the upcoming 4.1 release currently.
> 
> But please remind us about this patch when we open up for 4.2 features, which
> should be in about 1 month.
> 
> -Allen
> 

Can I get some conformation as to rather or not this, or something like this will be included in kde 4.2...?
Comment 17 Allen Winter 2008-08-29 03:44:06 UTC
It can be.  I am not ignoring you.
But I am swamped with KDE stuff these days.

Would you like to become a KOrganizer developer so you can help make a better product?  We really need new blood in the project.

If not.. well, I'll get to it when I can.
Comment 18 BryanFRitt 2009-05-08 01:06:33 UTC
Created attachment 33455 [details]
koagenda for KDE 3.5.10

remove the "-3.5.10" and compile with the other ones from "-3.5.10"
Comment 19 BryanFRitt 2009-05-08 01:08:11 UTC
Created attachment 33456 [details]
koagendaview for KDE 3.5.10

remove the "-3.5.10" and compile with the other ones from "-3.5.10"
Comment 20 BryanFRitt 2009-05-08 01:09:25 UTC
Created attachment 33457 [details]
korganizer for KDE 3.5.10

remove the "-3.5.10" and compile with the other ones from "-3.5.10"
Comment 21 BryanFRitt 2009-05-08 01:10:30 UTC
Created attachment 33458 [details]
timelabels for KDE 3.5.10

remove the "-3.5.10" and compile with the other ones from "-3.5.10"
Comment 22 BryanFRitt 2009-05-08 01:15:28 UTC
I got the original source for the "-3.5.10" ones from KUbuntu 8.04.
Comment 23 BryanFRitt 2009-05-08 01:26:34 UTC
and the older ones are for KDE 3.5.09