Patch: shortcuts for next/previous in PhotoView




First must say that I love f-spot, does a fantastic job, very fast, just the right mix of features and helps me organize my photos great. (php gallery export helps in this regard)

I am not a huge fan of rodents however, so included is a patch to make the 'n' and 'p' keys go to the next and previous picture when in the single photo view.

This makes sorting and tagging photos much more efficient for me, hopefully you agree.

I had also made a change to bind Ctrl-R to 'Remote from Catalog' but my Glade diff ended up being gigantic and it scares me so I left it out. (seems to work though)

I'm an experienced developer but brand new to C# and Gtk/Gnome so hopefully I didn't break too many rules with this patch. (I did make DisplayNext and DisplayPrevious public in PhotoView)

Thanks, looking forward to contributing more. One itch I still have is to allow f-spot to launch an outside editor for photos (with the modified file so versioning remains nice and lightweight). Although f-spot does a good job of what it does, sometimes it's nice to pull in the Gimp.

-Nic


Index: MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.180
diff -u -p -r1.180 MainWindow.cs
--- MainWindow.cs	19 Mar 2005 10:53:47 -0000	1.180
+++ MainWindow.cs	27 Mar 2005 21:55:34 -0000
@@ -726,6 +726,19 @@ public class MainWindow {
 			HandleViewFullscreen (sender, args);
 			args.RetVal = true;
 			break;
+
+		case Gdk.Key.N:
+		case Gdk.Key.n:
+			photo_view.DisplayNext();
+			args.RetVal = true;
+			break;
+
+		case Gdk.Key.P:
+		case Gdk.Key.p:
+			photo_view.DisplayPrevious();
+			args.RetVal = true;
+			break;
+
 		default:
 			break;
 		}
Index: PhotoView.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/PhotoView.cs,v
retrieving revision 1.54
diff -u -p -r1.54 PhotoView.cs
--- PhotoView.cs	19 Mar 2005 10:42:40 -0000	1.54
+++ PhotoView.cs	27 Mar 2005 21:55:35 -0000
@@ -185,12 +185,12 @@ public class PhotoView : EventBox {
 
 	// Browsing.
 
-	private void DisplayNext ()
+	public void DisplayNext ()
 	{
 		photo_view.Next ();
 	}
 
-	private void DisplayPrevious ()
+	public void DisplayPrevious ()
 	{
 		photo_view.Prev ();
 	}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]