[f-spot] Key R to jump to a random photo
- From: Ruben Vermeersch <rubenv src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] Key R to jump to a random photo
- Date: Thu, 11 Jun 2009 09:35:44 -0400 (EDT)
commit 9dc84ec853b04bbf708a7d3f3fd52650ea325321
Author: Joachim Breitner <mail joachim-breitner de>
Date: Thu Jun 11 15:18:54 2009 +0200
Key R to jump to a random photo
This patch that enables "R" for random in those places where HJKL
navigation is possible as well. It also mentions this in the
documentation.
This closes http://bugzilla.gnome.org/show_bug.cgi?id=584776
---
docs/C/f-spot.xml | 8 ++++++++
src/PhotoImageView.cs | 4 ++++
src/Widgets/IconView.cs | 4 ++++
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/docs/C/f-spot.xml b/docs/C/f-spot.xml
index 7746553..387e5a9 100644
--- a/docs/C/f-spot.xml
+++ b/docs/C/f-spot.xml
@@ -1375,6 +1375,14 @@
</row>
<row>
<entry>
+ <keycap>R</keycap>
+ </entry>
+ <entry>
+ Go to a random photo
+ </entry>
+ </row>
+ <row>
+ <entry>
<keycap>f</keycap>
</entry>
<entry>
diff --git a/src/PhotoImageView.cs b/src/PhotoImageView.cs
index c9e32ca..18d06b1 100644
--- a/src/PhotoImageView.cs
+++ b/src/PhotoImageView.cs
@@ -495,6 +495,10 @@ namespace FSpot.Widgets {
case Gdk.Key.KP_Home:
this.Item.Index = 0;
break;
+ case Gdk.Key.r:
+ case Gdk.Key.R:
+ this.Item.Index = new Random().Next(0, this.Query.Count - 1);
+ break;
case Gdk.Key.End:
case Gdk.Key.KP_End:
this.Item.Index = this.Query.Count - 1;
diff --git a/src/Widgets/IconView.cs b/src/Widgets/IconView.cs
index 60ebda1..8882187 100644
--- a/src/Widgets/IconView.cs
+++ b/src/Widgets/IconView.cs
@@ -1537,6 +1537,10 @@ namespace FSpot.Widgets
case Gdk.Key.End:
FocusCell = collection.Count - 1;
break;
+ case Gdk.Key.R:
+ case Gdk.Key.r:
+ FocusCell = new Random().Next(0, collection.Count - 1);
+ break;
case Gdk.Key.space:
ToggleCell (FocusCell);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]