Skip to content

Commit

Permalink
Ported to 1.3.1 - required changes to the patch
Browse files Browse the repository at this point in the history
  • Loading branch information
rwhitby committed Nov 7, 2009
1 parent 1200070 commit 25f74ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions video-player/video-player-swipe-to-delete-videos.LICENSE
@@ -1,4 +1,5 @@
Copyright (c) 2009 Jason Robitaille
Copyright (c) 2009 Rod Whitby <rod@whitby.id.au>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
33 changes: 14 additions & 19 deletions video-player/video-player-swipe-to-delete-videos.patch
@@ -1,10 +1,11 @@
Name: Swipe to Delete Videos
Version: 1.2.1-1
Version: 1.3.1-1
Author: Jason Robitaille
Modified: Rod Whitby
Description: Adds the ability to swipe to delete videos

--- .orig/usr/palm/applications/com.palm.app.videoplayer.launcher/app/controllers/browser-assistant.js
+++ /usr/palm/applications/com.palm.app.videoplayer.launcher/app/controllers/browser-assistant.js
--- .orig/usr/palm/applications/com.palm.app.videoplayer/app/controllers/browser-assistant.js
+++ /usr/palm/applications/com.palm.app.videoplayer/app/controllers/browser-assistant.js
@@ -15,6 +15,8 @@
itemTemplate: 'browser/browser-entry',
filterFunction: this.requestVideosList.bind(this),
Expand All @@ -14,7 +15,7 @@ Description: Adds the ability to swipe to delete videos
formatters: {
videoPictureUrl: this.videoPictureUrlFormatter,
videoSize: this.videoSizeFormatter.bind(this),
@@ -42,6 +42,33 @@
@@ -42,6 +44,33 @@
this.controller.document.addEventListener(Mojo.Event.activate, this.boundFocusHandle.bind(this));
},

Expand Down Expand Up @@ -48,25 +49,22 @@ Description: Adds the ability to swipe to delete videos
cleanup: function(){
this.controller.document.removeEventListener(Mojo.Event.deactivate, this.boundBlurHandle.bind(this));
this.controller.document.removeEventListener(Mojo.Event.activate, this.boundFocusHandle.bind(this));
@@ -56,6 +56,8 @@
@@ -56,10 +85,13 @@
},

activate: function(){
+ this.handleDelete = this.handleDelete.bindAsEventListener(this);
+ this.controller.listen('videoslist', Mojo.Event.listDelete, this.handleDelete);
Util.markForeground(true);
},

@@ -60,6 +60,7 @@
Util.markForeground(this.controller, true);
},

deactivate: function(){
+ this.controller.stopListening('videoslist', Mojo.Event.listDelete, this.handleDelete);
Util.markForeground(false);
Util.markForeground(this.controller, false);
},

--- .orig/usr/palm/applications/com.palm.app.videoplayer/app/controllers/browser-assistant.js
+++ /usr/palm/applications/com.palm.app.videoplayer/app/controllers/browser-assistant.js
--- .orig/usr/palm/applications/com.palm.app.videoplayer.launcher/app/controllers/browser-assistant.js
+++ /usr/palm/applications/com.palm.app.videoplayer.launcher/app/controllers/browser-assistant.js
@@ -15,6 +15,8 @@
itemTemplate: 'browser/browser-entry',
filterFunction: this.requestVideosList.bind(this),
Expand All @@ -76,7 +74,7 @@ Description: Adds the ability to swipe to delete videos
formatters: {
videoPictureUrl: this.videoPictureUrlFormatter,
videoSize: this.videoSizeFormatter.bind(this),
@@ -42,6 +42,33 @@
@@ -42,6 +44,33 @@
this.controller.document.addEventListener(Mojo.Event.activate, this.boundFocusHandle.bind(this));
},

Expand Down Expand Up @@ -110,20 +108,17 @@ Description: Adds the ability to swipe to delete videos
cleanup: function(){
this.controller.document.removeEventListener(Mojo.Event.deactivate, this.boundBlurHandle.bind(this));
this.controller.document.removeEventListener(Mojo.Event.activate, this.boundFocusHandle.bind(this));
@@ -56,6 +56,8 @@
@@ -56,10 +85,13 @@
},

activate: function(){
+ this.handleDelete = this.handleDelete.bindAsEventListener(this);
+ this.controller.listen('videoslist', Mojo.Event.listDelete, this.handleDelete);
Util.markForeground(true);
},

@@ -60,6 +60,7 @@
Util.markForeground(this.controller, true);
},

deactivate: function(){
+ this.controller.stopListening('videoslist', Mojo.Event.listDelete, this.handleDelete);
Util.markForeground(false);
Util.markForeground(this.controller, false);
},

0 comments on commit 25f74ee

Please sign in to comment.