[f-spot] Ignore clicks before filmstrip start position
- From: Lorenzo Milesi <lmilesi src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] Ignore clicks before filmstrip start position
- Date: Thu, 16 Jul 2009 13:59:15 +0000 (UTC)
commit 9b88fda0da5822563db4def0d934ee0c39a48a71
Author: Lorenzo Milesi <maxxer yetopen it>
Date: Thu Jul 16 15:53:44 2009 +0200
Ignore clicks before filmstrip start position
Rename gconf key FILMSTRIP_POSITION -> FILMSTRIP_ORIENTATION
Removed old color management
src/MainWindow.cs | 2 +-
src/PhotoView.cs | 6 +++---
src/Preferences.cs | 6 ++----
src/Widgets/Filmstrip.cs | 6 ++++--
4 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/MainWindow.cs b/src/MainWindow.cs
index 4f93833..ab99a47 100644
--- a/src/MainWindow.cs
+++ b/src/MainWindow.cs
@@ -474,7 +474,7 @@ public class MainWindow {
group_selector.Adaptor.GlassSet += HandleAdaptorGlassSet;
group_selector.Adaptor.Changed += HandleAdaptorChanged;
LoadPreference (Preferences.GROUP_ADAPTOR_ORDER_ASC);
- LoadPreference (Preferences.FILMSTRIP_POSITION);
+ LoadPreference (Preferences.FILMSTRIP_ORIENTATION);
this.selection = new MainSelection (this);
this.selection.Changed += HandleSelectionChanged;
diff --git a/src/PhotoView.cs b/src/PhotoView.cs
index 5f86863..e696b7b 100644
--- a/src/PhotoView.cs
+++ b/src/PhotoView.cs
@@ -254,7 +254,7 @@ namespace FSpot {
private void LoadPreference (String key)
{
switch (key) {
- case Preferences.FILMSTRIP_POSITION:
+ case Preferences.FILMSTRIP_ORIENTATION:
PlaceFilmstrip ((Orientation) Preferences.Get<int> (key));
break;
}
@@ -293,7 +293,7 @@ namespace FSpot {
inner_hbox.PackEnd (filmstrip, false, false, 0);
break;
}
- Preferences.Set (Preferences.FILMSTRIP_POSITION, (int) pos);
+ Preferences.Set (Preferences.FILMSTRIP_ORIENTATION, (int) pos);
}
public bool FilmStripVisibility {
@@ -336,7 +336,7 @@ namespace FSpot {
filmstrip.BackgroundTile = bg;
filmstrip.ThumbOffset = 1;
filmstrip.Spacing = 4;
- PlaceFilmstrip ((Orientation) Preferences.Get <int> (Preferences.FILMSTRIP_POSITION), true);
+ PlaceFilmstrip ((Orientation) Preferences.Get <int> (Preferences.FILMSTRIP_ORIENTATION), true);
photo_view.PhotoChanged += HandlePhotoChanged;
diff --git a/src/Preferences.cs b/src/Preferences.cs
index fbdeeee..3f4fb9c 100644
--- a/src/Preferences.cs
+++ b/src/Preferences.cs
@@ -41,7 +41,7 @@ namespace FSpot
public const string SHOW_SIDEBAR = APP_FSPOT + "ui/show_sidebar";
public const string SHOW_TIMELINE = APP_FSPOT + "ui/show_timeline";
public const string SHOW_FILMSTRIP = APP_FSPOT + "ui/show_filmstrip";
- public const string FILMSTRIP_POSITION = APP_FSPOT + "ui/filmstrip_position";
+ public const string FILMSTRIP_ORIENTATION = APP_FSPOT + "ui/filmstrip_orientation";
public const string SHOW_TAGS = APP_FSPOT + "ui/show_tags";
public const string SHOW_DATES = APP_FSPOT + "ui/show_dates";
public const string EXPANDED_TAGS = APP_FSPOT + "ui/expanded_tags";
@@ -109,14 +109,12 @@ namespace FSpot
case IMPORT_WINDOW_HEIGHT:
case IMPORT_WINDOW_WIDTH:
case IMPORT_WINDOW_PANE_POSITION:
- case FILMSTRIP_POSITION:
+ case FILMSTRIP_ORIENTATION:
return 0;
case METADATA_EMBED_IN_IMAGE:
case MAIN_WINDOW_MAXIMIZED:
case GROUP_ADAPTOR_ORDER_ASC:
- case COLOR_MANAGEMENT_ENABLED:
- case COLOR_MANAGEMENT_USE_X_PROFILE:
return false;
case GLASS_POSITION:
diff --git a/src/Widgets/Filmstrip.cs b/src/Widgets/Filmstrip.cs
index 5a68528..4089676 100644
--- a/src/Widgets/Filmstrip.cs
+++ b/src/Widgets/Filmstrip.cs
@@ -382,6 +382,7 @@ namespace FSpot.Widgets
}
Hashtable start_indexes;
+ int filmstrip_start_pos;
int filmstrip_end_pos;
protected override bool OnExposeEvent (EventExpose evnt)
{
@@ -462,6 +463,7 @@ namespace FSpot.Widgets
break;
}
}
+ filmstrip_start_pos = Orientation == Orientation.Horizontal ? start_x : start_y;
GdkWindow.DrawPixbuf (Style.BackgroundGC (StateType.Normal), icon_pixbuf,
0, 0, x_offset + xpad, y_offset + ypad + thumb_offset,
@@ -589,8 +591,8 @@ namespace FSpot.Widgets
return DrawOrientationMenu (evnt);
if (evnt.Button != 1 || (
- (Orientation == Orientation.Horizontal && evnt.X > filmstrip_end_pos) ||
- (Orientation == Orientation.Vertical && evnt.Y > filmstrip_end_pos)
+ (Orientation == Orientation.Horizontal && (evnt.X > filmstrip_end_pos || evnt.X < filmstrip_start_pos)) ||
+ (Orientation == Orientation.Vertical && (evnt.Y > filmstrip_end_pos || evnt.Y < filmstrip_start_pos))
))
return false;
HasFocus = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]