All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] epdfview: add page scrolling patch
@ 2009-04-09 16:42 Angus Ainslie
  2009-04-11 14:13 ` Koen Kooi
  0 siblings, 1 reply; 4+ messages in thread
From: Angus Ainslie @ 2009-04-09 16:42 UTC (permalink / raw)
  To: openembedded-devel

From a3c28e2ab81cf7fd1ff49c6be0380075230722d2 Mon Sep 17 00:00:00 2001    
From: Previdi Roberto <previdi.roberto@gmail.com>                         
Date: Thu, 9 Apr 2009 10:26:51 -0600                                      
Subject: [PATCH] epdfview: add page scrolling patch                       

Signed-off-by: Angus Ainslie <nytowl@openmoko.org>
---                                               
 recipes/epdfview/epdfview_0.1.6.bb       |    3 +-
 recipes/epdfview/files/page-scroll.patch |   82 ++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+), 1 deletions(-)                             
 create mode 100644 recipes/epdfview/files/page-scroll.patch                   

diff --git a/recipes/epdfview/epdfview_0.1.6.bb b/recipes/epdfview/epdfview_0.1.6.bb
index 3cf2e5f..f4ec351 100644                                                       
--- a/recipes/epdfview/epdfview_0.1.6.bb                                            
+++ b/recipes/epdfview/epdfview_0.1.6.bb                                            
@@ -3,10 +3,11 @@ HOMEPAGE = "http://www.emma-soft.com/projects/epdfview/"          
 LICENSE = "GPLv2"                                                                  
 SECTION = "x11/applications"                                                       
 DEPENDS = "poppler gtk+ cups"                                                      
-PR = "r3"                                                                          
+PR = "r4"                                                                          
                                                                                    
 SRC_URI = "http://www.emma-soft.com/projects/epdfview/chrome/site/releases/epdfview-${PV}.tar.bz2 \
            file://poppler8.diff;patch=1 \                                                          
+           file://page-scroll.patch;patch=1 \                                                      
          "                                                                                         
                                                                                                    
 inherit autotools                                                                                  
diff --git a/recipes/epdfview/files/page-scroll.patch b/recipes/epdfview/files/page-scroll.patch    
new file mode 100644                                                                                
index 0000000..20fbfea                                                                              
--- /dev/null                                                                                       
+++ b/recipes/epdfview/files/page-scroll.patch                                                      
@@ -0,0 +1,82 @@                                                                                    
+diff -c -r -x '*.[ao]' -x '*~' -x '*anjuta*' patcher_original/epdfview-0.1.6/data/epdfview.desktop epdfview-0.1.6/data/epdfview.desktop
+*** patcher_original/epdfview-0.1.6/data/epdfview.desktop      2006-10-17 16:23:23.000000000 +0200                                     
+--- epdfview-0.1.6/data/epdfview.desktop       2009-04-07 16:39:43.000000000 +0200                                                     
+***************                                                                                                                        
+*** 8,14 ****                                                                                                                          
+  GenericName=PDF Viewer                                                                                                               
+  GenericName[ca]=Visor PDF                                                                                                            
+  GenericName[es]=Visor PDF                                                                                                            
+! Icon=postscript-viewer.png                                                                                                           
+  Name=ePDFViewer                                                                                                                      
+  Name[ca]=ePDFViewer                                                                                                                  
+  Name[es]=ePDFViewer                                                                                                                  
+--- 8,14 ----                                                                                                                          
+  GenericName=PDF Viewer                                                                                                               
+  GenericName[ca]=Visor PDF                                                                                                            
+  GenericName[es]=Visor PDF                                                                                                            
+! Icon=/usr/share/epdfview/pixmaps/icon_epdfview-48.png                                                                                
+  Name=ePDFViewer                                                                                                                      
+  Name[ca]=ePDFViewer                                                                                                                  
+  Name[es]=ePDFViewer                                                                                                                  
+diff -c -r -x '*.[ao]' -x '*~' -x '*anjuta*' patcher_original/epdfview-0.1.6/src/gtk/PageView.cxx epdfview-0.1.6/src/gtk/PageView.cxx  
+*** patcher_original/epdfview-0.1.6/src/gtk/PageView.cxx       2006-10-17 16:23:18.000000000 +0200                                     
+--- epdfview-0.1.6/src/gtk/PageView.cxx        2009-04-07 16:38:48.000000000 +0200                                                     
+***************                                                                                                                        
+*** 26,31 ****                                                                                                                         
+--- 26,32 ----                                                                                                                         
+                                                                                                                                       
+  // Constants                                                                                                                         
+  static gint PAGE_VIEW_PADDING = 12;                                                                                                  
++ static gint SCROLL_PAGE_DRAG_LENGTH = 50;                                                                                            
+                                                                                                                                       
+  // Forwards declarations.                                                                                                            
+  static gboolean page_view_button_press_cb (GtkWidget *, GdkEventButton *,                                                            
+***************                                                                                                                        
+*** 236,242 ****                                                                                                                       
+  void                                                                                                                                 
+  PageView::scrollPage (gdouble scrollX, gdouble scrollY, gint dx, gint dy)                                                            
+  {                                                                                                                                    
+!     GtkAdjustment *hAdjustment = gtk_scrolled_window_get_hadjustment (                                                               
+              GTK_SCROLLED_WINDOW (m_PageScroll));                                                                                     
+      gdouble hAdjValue = hAdjustment->page_size *                                                                                     
+          (gdouble)dx / m_PageImage->allocation.width;                                                                                 
+--- 237,245 ----                                                                                                                       
+  void                                                                                                                                 
+  PageView::scrollPage (gdouble scrollX, gdouble scrollY, gint dx, gint dy)                                                            
+  {                                                                                                                                    
+!      /* if the page cannot scroll and i'm dragging bottom to up, or left to right,
+!       i will go to the next page. viceversa previous page */
+!      GtkAdjustment *hAdjustment = gtk_scrolled_window_get_hadjustment (
+              GTK_SCROLLED_WINDOW (m_PageScroll));
+      gdouble hAdjValue = hAdjustment->page_size *
+          (gdouble)dx / m_PageImage->allocation.width;
+***************
+*** 253,258 ****
+--- 256,282 ----
+              CLAMP (scrollY - vAdjValue,
+                     vAdjustment->lower,
+                     vAdjustment->upper - vAdjustment->page_size));
++
++      /* if the page cannot scroll and i'm dragging bottom to up, or left to right,
++
++               i will go to the next page. viceversa previous page */
++      if ((scrollY==vAdjustment->upper - vAdjustment->page_size && dy<(0-SCROLL_PAGE_DRAG_LENGTH))
++              ||
++          (scrollX==hAdjustment->upper - hAdjustment->page_size && dx<(0-SCROLL_PAGE_DRAG_LENGTH))
++          )
++      {
++              m_Pter->scrollToNextPage();
++              m_Pter->mouseButtonReleased(1);
++      }
++      else
++      if((scrollY==vAdjustment->lower && dy>SCROLL_PAGE_DRAG_LENGTH)
++              ||
++          (scrollX==hAdjustment->lower && dx>SCROLL_PAGE_DRAG_LENGTH)
++          )
++      {
++              m_Pter->scrollToPreviousPage();
++              m_Pter->mouseButtonReleased(1);
++      }
+  }
+
+  void
--
1.5.6.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] epdfview: add page scrolling patch
  2009-04-09 16:42 [PATCH] epdfview: add page scrolling patch Angus Ainslie
@ 2009-04-11 14:13 ` Koen Kooi
  2009-04-13 13:50   ` Angus Ainslie
  0 siblings, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2009-04-11 14:13 UTC (permalink / raw)
  To: openembedded-devel

On 09-04-09 18:42, Angus Ainslie wrote:
>> From a3c28e2ab81cf7fd1ff49c6be0380075230722d2 Mon Sep 17 00:00:00 2001
> From: Previdi Roberto<previdi.roberto@gmail.com>
> Date: Thu, 9 Apr 2009 10:26:51 -0600
> Subject: [PATCH] epdfview: add page scrolling patch

What does that patch do?

regards,

Koen




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] epdfview: add page scrolling patch
  2009-04-11 14:13 ` Koen Kooi
@ 2009-04-13 13:50   ` Angus Ainslie
  2009-04-15  9:12     ` Koen Kooi
  0 siblings, 1 reply; 4+ messages in thread
From: Angus Ainslie @ 2009-04-13 13:50 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On Sat, 2009-04-11 at 16:13 +0200, Koen Kooi wrote:
> On 09-04-09 18:42, Angus Ainslie wrote:
> >> From a3c28e2ab81cf7fd1ff49c6be0380075230722d2 Mon Sep 17 00:00:00 2001
> > From: Previdi Roberto<previdi.roberto@gmail.com>
> > Date: Thu, 9 Apr 2009 10:26:51 -0600
> > Subject: [PATCH] epdfview: add page scrolling patch
> 
> What does that patch do?
> 
> regards,
> 
> Koen
> 

It adds fingered page scrolling .

Angus




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] epdfview: add page scrolling patch
  2009-04-13 13:50   ` Angus Ainslie
@ 2009-04-15  9:12     ` Koen Kooi
  0 siblings, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2009-04-15  9:12 UTC (permalink / raw)
  To: openembedded-devel

On 13-04-09 15:50, Angus Ainslie wrote:
> On Sat, 2009-04-11 at 16:13 +0200, Koen Kooi wrote:
>> On 09-04-09 18:42, Angus Ainslie wrote:
>>>>  From a3c28e2ab81cf7fd1ff49c6be0380075230722d2 Mon Sep 17 00:00:00 2001
>>> From: Previdi Roberto<previdi.roberto@gmail.com>
>>> Date: Thu, 9 Apr 2009 10:26:51 -0600
>>> Subject: [PATCH] epdfview: add page scrolling patch
>>
>> What does that patch do?
>>
>> regards,
>>
>> Koen
>>
>
> It adds fingered page scrolling .

And what does that mean? How does it affect non touchscreen uses? How 
does it affect touchscreen uses? How does it interact with capacitive 
touchscreens, etc?




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-15  9:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 16:42 [PATCH] epdfview: add page scrolling patch Angus Ainslie
2009-04-11 14:13 ` Koen Kooi
2009-04-13 13:50   ` Angus Ainslie
2009-04-15  9:12     ` Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.