Difference between revisions of "Patch Messaging Landscape Orientation"
Jump to navigation
Jump to search
Fritos1406 (talk | contribs) |
Fritos1406 (talk | contribs) |
||
| Line 1: | Line 1: | ||
Landscape Orientation in Messagin App: | Landscape Orientation in Messagin App: | ||
| + | |||
'''MUST BE IN [root@castle:/#] TO INSTALL''' | '''MUST BE IN [root@castle:/#] TO INSTALL''' | ||
| Line 6: | Line 7: | ||
quilt push -a -f</pre> | quilt push -a -f</pre> | ||
'''''to apply this patch just copy the above how-to and then you will be done..thats it !!''''' | '''''to apply this patch just copy the above how-to and then you will be done..thats it !!''''' | ||
| + | |||
| + | |||
| + | ---- | ||
| Line 11: | Line 15: | ||
| − | ''' | + | '''PATCH CODE''' |
<pre>Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | <pre>Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | ||
=================================================================== | =================================================================== | ||
| Line 133: | Line 137: | ||
#messageContainer #messageTextWidget { | #messageContainer #messageTextWidget { | ||
</pre> | </pre> | ||
| + | |||
| + | |||
| + | '''Credits: FRITOS1406''' | ||
Revision as of 01:38, 17 September 2009
Landscape Orientation in Messagin App:
MUST BE IN [root@castle:/#] TO INSTALL
wget http://filebin.ca/vvyay/message-orientation.patch quilt import message-orientation.patch quilt push -a -f
to apply this patch just copy the above how-to and then you will be done..thats it !!
Manually doing this patch you will have to put the codes in the patch in their corresponding places..
PATCH CODE
Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
===================================================================
--- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
+++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
@@ -97,7 +97,9 @@ var ChatviewAssistant = Class.create({
setup: function(){
this.controller.setupWidget(Mojo.Menu.appMenu, this.appMenuAttrs, this.appMenuModel);
-
+
+ // enable free orientation
+ this.controller.window.PalmSystem.setWindowOrientation("free");
var messageTextWidgetAttributes = {
modelProperty: 'value',
hintText: $L('Enter message here...'),
@@ -196,6 +198,14 @@ var ChatviewAssistant = Class.create({
this.handleFocus();
}
},
+
+ orientationChanged: function(orientation) {
+ if (orientation === "left" || orientation === "right") {
+ this.controller.sceneElement.addClassName('landscape');
+ } else {
+ this.controller.sceneElement.removeClassName('landscape');
+ }
+ },
cleanup: function(){
this.chatViewHeaderClickTarget.stopObserving(Mojo.Event.tap, this.handleHeaderTap);
Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
===================================================================
--- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
+++ /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js
@@ -73,7 +73,9 @@ var ComposeAssistant = Class.create({
setup: function() {
this.controller.setupWidget(Mojo.Menu.appMenu, this.appMenuAttrs, this.appMenuModel);
-
+
+ // enable free orientation
+ this.controller.window.PalmSystem.setWindowOrientation("free");
this.searchList = {
"property": "to$A",
"includeEmails": false,
@@ -386,6 +388,14 @@ var ComposeAssistant = Class.create({
}
this.setCharacterCounterMaxLength();
},
+
+ orientationChanged: function(orientation) {
+ if (orientation === "left" || orientation === "right") {
+ this.controller.sceneElement.addClassName('landscape');
+ } else {
+ this.controller.sceneElement.removeClassName('landscape');
+ }
+ },
cleanup: function() {
var that = this;
Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
===================================================================
--- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
+++ /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js
@@ -212,8 +212,10 @@ var ListviewAssistant = Class.create(App
items:this.commandMenuModel
};
- this.controller.setupWidget(Mojo.Menu.commandMenu, {}, this.cmdMenuModel);
-
+ this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);
+
+ // enable free orientation
+ this.controller.window.PalmSystem.setWindowOrientation("free");
this.filterField = this.controller.get('filterField');
this.buddyListHeader = this.controller.get('buddyListHeader');
this.controller.setupWidget('filterField',{filterFieldName:'filterFieldElement'},this.filterField);
@@ -1086,7 +1088,15 @@ var ListviewAssistant = Class.create(App
loadDebugView: function() {
this.controller.stageController.pushScene('debug');
},
-
+
+ orientationChanged: function(orientation) {
+ if (orientation === "left" || orientation === "right") {
+ this.controller.sceneElement.addClassName('landscape');
+ } else {
+ this.controller.sceneElement.removeClassName('landscape');
+ }
+ },
+
cleanup: function() {
// save the listview state
MessagingMojoService.setIsHistoryViewSelected(this.controller,(this.currentListView == this.Messaging.Views.HISTORY));
Index: /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
===================================================================
--- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
+++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css
@@ -642,10 +642,10 @@ img.avatar-overlay {
}
.their-chat .message-container {
- width: 255px;
+ width: 85%;
}
.my-chat .message-container {
- width: 280px;
+ width: 95%;
}
.chat-entry .chat-balloon {
min-height: 26px;
@@ -823,7 +823,7 @@ img.avatar-overlay {
position: fixed;
bottom:0px;
left:0px;
- width: 320px;
+ width: 100%;
}
#messageContainer #messageTextWidget {
Credits: FRITOS1406