Renamed more-icons-per-row-5x4-flare576
[webos-internals:adamrmcd-modifications.git] / calendar / default-to-month-view.patch
1 This mod alters the Calendar app to default to the month view.
2 Though it alters a function called launchDayView, re-pointing it at the
3 month scene, there are no known side effects under webOS 1.1.
4
5 Mod by matthewn, from http://forums.precentral.net/web-os-development/192542-howto-change-default-view-calendar-hack-rooting-required.html
6 Index: /usr/palm/applications/com.palm.app.calendar/app/controllers/app-assistant.js
7 ===================================================================
8 --- .orig/usr/palm/applications/com.palm.app.calendar/app/controllers/app-assistant.js
9 +++ /usr/palm/applications/com.palm.app.calendar/app/controllers/app-assistant.js
10 @@ -126,12 +126,12 @@ var AppAssistant = Class.create({
11                         // If the top scene is not the Day View, try to pop to it.
12                         // If the top scene is already the Day View, there's no point
13                         // in popping the scene
14 -                       if (stageController.topScene().sceneName != "day") {
15 -                               stageController.popScenesTo("day");
16 +                       if (stageController.topScene().sceneName != "month") {
17 +                               stageController.popScenesTo("month");
18                         }
19                         
20                         // Check to see if the day scene is already up
21 -                       if (stageController.topScene().sceneName == "day") {
22 +                       if (stageController.topScene().sceneName == "month") {
23                                 sceneExists = true;
24                         }
25                         
26 @@ -152,7 +152,7 @@ var AppAssistant = Class.create({
27                 
28                 // Only push the Day View if it's not already visible
29                 if (!sceneExists) {
30 -                       stageController.pushScene({name: "day", transition: Mojo.Transition.crossFade, disableSceneScroller: true});
31 +                       stageController.pushScene({name: "month", transition: Mojo.Transition.crossFade, disableSceneScroller: true});
32                 }
33         },
34         
35 @@ -163,14 +163,14 @@ var AppAssistant = Class.create({
36                 }
37                 if (launchParams && launchParams.reminders) {
38                         if (!appExists) {
39 -                               stageController.pushScene({name: "day", disableSceneScroller: true});
40 +                               stageController.pushScene({name: "month", disableSceneScroller: true});
41                         }
42                         stageController.pushScene("reminder-list");
43                         return;
44                 }
45                 if (launchParams && launchParams.details) {
46                         if (!appExists) {
47 -                               stageController.pushScene({name: "day", disableSceneScroller: true});
48 +                               stageController.pushScene({name: "month", disableSceneScroller: true});
49                         }
50                         // TODO need to pass event occurence date instead of today's date
51                         stageController.pushScene('edit', launchParams.details, new Date(), false);
52 @@ -178,7 +178,7 @@ var AppAssistant = Class.create({
53                 }
54                 if (launchParams && launchParams.newEvent) {
55                         if (!appExists) {
56 -                               stageController.pushScene({name: "day", disableSceneScroller: true});
57 +                               stageController.pushScene({name: "month", disableSceneScroller: true});
58                         }
59                         
60                         this.createNewEventAndShowDetails(stageController, launchParams.newEvent);
61 @@ -357,7 +357,7 @@ var AppAssistant = Class.create({
62                         this.firstUseManager = new FirstUseManager(stageController);
63                 } else {
64                         // Otherwise show the Day View
65 -                       stageController.pushScene({name: "day", transition: Mojo.Transition.crossFade, disableSceneScroller: true});
66 +                       stageController.pushScene({name: "month", transition: Mojo.Transition.crossFade, disableSceneScroller: true});
67                 }
68         },
69