248
264
LoadPreference (Preferences.SIDEBAR_POSITION);
249
265
LoadPreference (Preferences.METADATA_EMBED_IN_IMAGE);
267
LoadPreference (Preferences.COLOR_MANAGEMENT_ENABLED);
268
LoadPreference (Preferences.COLOR_MANAGEMENT_USE_X_PROFILE);
269
FSpot.ColorManagement.LoadSettings();
272
pagesetup_menu_item.Activated += HandlePageSetupActivated;
274
pagesetup_menu_item.Visible = false;
251
276
toolbar = new Gtk.Toolbar ();
252
277
toolbar_vbox.PackStart (toolbar);
295
320
ss_button.Clicked += HandleViewSlideShow;
296
321
ss_button.SetTooltip (ToolTips, Catalog.GetString ("View photos in a slideshow"), null);
297
322
toolbar.Insert (ss_button, -1);
324
SeparatorToolItem white_space = new SeparatorToolItem ();
325
white_space.Draw = false;
326
white_space.Expand = true;
327
toolbar.Insert (white_space, -1);
329
ToolItem label_item = new ToolItem ();
330
count_label = new Label (String.Empty);
331
label_item.Child = count_label;
332
toolbar.Insert (label_item, -1);
334
display_previous_button = new ToolButton (Stock.GoBack);
335
toolbar.Insert (display_previous_button, -1);
336
display_previous_button.SetTooltip (ToolTips, Catalog.GetString ("Previous photo"), String.Empty);
337
display_previous_button.Clicked += new EventHandler (HandleDisplayPreviousButtonClicked);
339
display_next_button = new ToolButton (Stock.GoForward);
340
toolbar.Insert (display_next_button, -1);
341
display_next_button.SetTooltip (ToolTips, Catalog.GetString ("Next photo"), String.Empty);
342
display_next_button.Clicked += new EventHandler (HandleDisplayNextButtonClicked);
344
sidebar = new Sidebar ();
345
ViewModeChanged += sidebar.HandleMainWindowViewModeChanged;
346
sidebar_vbox.Add (sidebar);
348
tag_selection_scrolled = new ScrolledWindow ();
349
tag_selection_scrolled.ShadowType = ShadowType.In;
299
351
tag_selection_widget = new TagSelectionWidget (db.Tags);
300
352
tag_selection_scrolled.Add (tag_selection_widget);
354
sidebar.AppendPage (tag_selection_scrolled, Catalog.GetString ("Tags"), "tag");
356
AddinManager.AddExtensionNodeHandler ("/FSpot/Sidebar", OnSidebarExtensionChanged);
358
sidebar.Context = ViewContext.Library;
360
sidebar.CloseRequested += HideSidebar;
363
info_box = new InfoBox ();
364
ViewModeChanged += info_box.HandleMainWindowViewModeChanged;
365
info_box.VersionIdChanged += delegate (InfoBox box, uint version_id) { UpdateForVersionIdChange (version_id);};
366
sidebar_vbox.PackEnd (info_box, false, false, 0);
368
info_box.Context = ViewContext.Library;
302
370
tag_selection_widget.Selection.Changed += HandleTagSelectionChanged;
303
371
tag_selection_widget.DragDataGet += HandleTagSelectionDragDataGet;
475
541
Banshee.Kernel.Scheduler.Resume ();
544
private void HandleDisplayNextButtonClicked (object sender, EventArgs args)
546
PhotoView.View.Item.MoveNext ();
549
private void HandleDisplayPreviousButtonClicked (object sender, EventArgs args)
551
PhotoView.View.Item.MovePrevious ();
554
private void OnSidebarExtensionChanged (object s, ExtensionNodeEventArgs args) {
555
// FIXME: No sidebar page removal yet!
556
if (args.Change == ExtensionChange.Add)
557
sidebar.AppendPage ((args.ExtensionNode as SidebarPageNode).GetSidebarPage ());
478
560
private Photo CurrentPhoto {
480
562
int active = ActiveIndex ();
482
return query.Photos [active];
564
return query [active] as Photo;
552
637
if (edit_button.Active != state)
553
638
edit_button.Active = state;
641
if (view_mode == ModeType.PhotoView) {
642
display_previous_button.Visible = true;
643
display_next_button.Visible = true;
644
count_label.Visible = true;
646
bool valid = photo_view.View.Item.IsValid;
647
bool prev = valid && photo_view.View.Item.Index > 0;
648
bool next = valid && photo_view.View.Item.Index < query.Count - 1;
651
Gnome.Vfs.Uri vfs = new Gnome.Vfs.Uri (photo_view.View.Item.Current.DefaultVersionUri.ToString ());
652
valid = vfs.Scheme == "file";
655
display_previous_button.Sensitive = prev;
656
display_next_button.Sensitive = next;
659
count_label.Text = String.Empty;
661
// Note for translators: This indicates the current photo is photo {0} of {1} out of photos
662
count_label.Text = String.Format (Catalog.GetString ("{0} of {1}"), Query.Count == 0 ? 0 : photo_view.View.Item.Index + 1, Query.Count == 0 ? 0 : Query.Count);
664
display_previous_button.Visible = false;
665
display_next_button.Visible = false;
666
count_label.Visible = false;
557
671
private void HandleExportActivated (object o, EventArgs e)
565
679
Photo p = item as Photo;
569
BeagleNotifier.SendUpdate (p);
571
682
if (write_metadata)
572
683
FSpot.Jobs.SyncMetadataJob.Create (db.Jobs, p);
575
if (args is TimeChangedEventArgs)
686
if (args is PhotoEventArgs && (args as PhotoEventArgs).Changes.TimeChanged)
576
687
query.RequestReload ();
579
690
private void HandleTagsChanged (object sender, DbItemEventArgs args)
581
692
icon_view.QueueDraw ();
582
UpdateTagEntryFromSelection ();
693
UpdateTagEntryFromSelection ();
586
696
void HandleViewNotebookSwitchPage (object sender, SwitchPageArgs args)
745
855
private void HandleSelectionChanged (IBrowsableCollection collection)
747
info_box.Photo = CurrentPhoto;
748
if (info_display != null)
749
info_display.Photo = CurrentPhoto;
752
858
UpdateTagEntryFromSelection ();
859
UpdateStatusLabel ();
862
info_box.Photos = SelectedPhotos ();
756
865
private void HandleSelectionItemsChanged (IBrowsableCollection collection, BrowsableEventArgs args)
759
868
UpdateTagEntryFromSelection ();
870
info_box.Photos = SelectedPhotos ();
811
922
RotateCommand command = new RotateCommand (parent);
813
924
int [] selected_ids = SelectedIds ();
814
if (command.Execute (direction, SelectedPhotos (selected_ids))) {
815
foreach (int num in selected_ids)
816
query.MarkChanged (num);
925
if (command.Execute (direction, SelectedPhotos (selected_ids)))
927
query.MarkChanged (selected_ids, new PhotoChanges () {DataChanged = true});
930
PhotoChanges changes = new PhotoChanges ();
931
changes.DataChanged = true;
932
query.MarkChanged (selected_ids, changes);
821
938
// Tag Selection Drag Handlers
940
[Obsolete ("Use AddTagExtended (int [], Tag []) instead")]
824
941
public void AddTagExtended (int num, Tag [] tags)
826
Photo p = query.Photos [num];
943
AddTagExtended (new int [] {num}, tags);
946
public void AddTagExtended (int [] nums, Tag [] tags)
948
foreach (int num in nums)
949
(query[num] as Photo).AddTag (tags);
831
952
foreach (Tag t in tags) {
832
953
if (t.Icon != null)
835
955
// FIXME this needs a lot more work.
836
956
Pixbuf icon = null;
838
Pixbuf tmp = FSpot.PhotoLoader.LoadAtMaxSize (query.Items [num], 128, 128);
958
Pixbuf tmp = FSpot.PhotoLoader.LoadAtMaxSize (query [nums[0]], 128, 128);
839
959
icon = PixbufUtils.TagIconFromPixbuf (tmp);
1130
1257
FSpot.PixbufCache.CacheEntry entry = icon_view.Cache.Lookup (thumbnail_path);
1132
1259
Pixbuf thumbnail = null;
1134
thumbnail = entry.ShallowCopyPixbuf ();
1260
if (entry != null) {
1261
if (FSpot.ColorManagement.IsEnabled) {
1263
thumbnail = entry.ShallowCopyPixbuf ();
1264
thumbnail = thumbnail.Copy ();
1265
FSpot.ColorManagement.ApplyScreenProfile (thumbnail);
1268
thumbnail = entry.ShallowCopyPixbuf ();
1136
1271
if (thumbnail != null) {
1137
1272
Pixbuf small = PixbufUtils.ScaleToMaxSize (thumbnail, size, size);
1189
1324
args.RetVal = true;
1192
void HandleIconViewKeyPressEvent (object sender, Gtk.KeyPressEventArgs args)
1194
bool alt = ModifierType.Mod1Mask == (args.Event.State & ModifierType.Mod1Mask);
1196
switch (args.Event.Key) {
1197
case Gdk.Key.Delete:
1198
HandleRemoveCommand (sender, (EventArgs) args);
1203
HandleRatingMenuSelected (0);
1209
HandleRatingMenuSelected (1);
1215
HandleRatingMenuSelected (2);
1221
HandleRatingMenuSelected (3);
1227
HandleRatingMenuSelected (4);
1233
HandleRatingMenuSelected (5);
1240
1327
public void ImportUriList (UriList list, bool copy)
1242
1329
ImportCommand command = new ImportCommand (main_window);
1332
1419
// IconView event handlers
1335
void HandleDoubleClicked (FSpot.Widgets.IconView icon_view, int clicked_item)
1337
icon_view.FocusCell = clicked_item;
1338
SetViewMode (ModeType.PhotoView);
1422
void HandleDoubleClicked (Widget widget, BrowsableEventArgs args)
1425
case ModeType.IconView:
1426
icon_view.FocusCell = args.Items[0];
1427
SetViewMode (ModeType.PhotoView);
1429
case ModeType.PhotoView:
1430
SetViewMode (ModeType.IconView);
1435
public void HandleCommonPhotoCommands (object sender, Gtk.KeyPressEventArgs args) {
1436
bool alt = ModifierType.Mod1Mask == (args.Event.State & ModifierType.Mod1Mask);
1437
bool shift = ModifierType.ShiftMask == (args.Event.State & ModifierType.ShiftMask);
1439
if (args.RetVal == null)
1440
args.RetVal = false;
1442
switch (args.Event.Key) {
1443
case Gdk.Key.Delete:
1445
HandleDeleteCommand (sender, args);
1447
HandleRemoveCommand (sender, args);
1451
HandleRatingMenuSelected (0);
1455
HandleRatingMenuSelected (1);
1459
HandleRatingMenuSelected (2);
1463
HandleRatingMenuSelected (3);
1467
HandleRatingMenuSelected (4);
1471
HandleRatingMenuSelected (5);
1474
return; //do not set the RetVal to true
1479
void HandleIconViewKeyPressEvent (object sender, Gtk.KeyPressEventArgs args)
1481
HandleCommonPhotoCommands (sender, args);
1482
if ((bool)args.RetVal)
1485
switch (args.Event.Key) {
1488
HandleViewFullscreen (sender, args);
1495
// FullScreenView event handlers.
1498
void HandleFullScreenViewKeyPressEvent (object sender, Gtk.KeyPressEventArgs args)
1500
HandleCommonPhotoCommands (sender, args);
1501
if ((bool)args.RetVal)
1502
// this will hide any panels again that might have appeared above the fullscreen view
1342
1507
// PhotoView event handlers.
1345
1510
void HandlePhotoViewKeyPressEvent (object sender, Gtk.KeyPressEventArgs args)
1347
bool alt = ModifierType.Mod1Mask == (args.Event.State & ModifierType.Mod1Mask);
1512
HandleCommonPhotoCommands (sender, args);
1513
if ((bool)args.RetVal)
1348
1516
switch (args.Event.Key) {
1349
1517
case Gdk.Key.F:
1350
1518
case Gdk.Key.f:
1355
1523
SetViewMode (ModeType.IconView);
1356
1524
args.RetVal = true;
1358
case Gdk.Key.Delete:
1359
HandleRemoveCommand (sender, (EventArgs) args);
1364
HandleRatingMenuSelected (0);
1370
HandleRatingMenuSelected (1);
1376
HandleRatingMenuSelected (2);
1382
HandleRatingMenuSelected (3);
1388
HandleRatingMenuSelected (4);
1394
HandleRatingMenuSelected (5);
1404
void HandlePhotoViewButtonPressEvent (object sender, Gtk.ButtonPressEventArgs args)
1406
if (args.Event.Type == EventType.TwoButtonPress && args.Event.Button == 1)
1407
SetViewMode (ModeType.IconView);
1410
1529
void HandlePhotoViewUpdateStarted (PhotoView sender)
1461
1580
if (view_mode == ModeType.PhotoView)
1462
1581
this.photo_view.UpdateRating(r);
1464
uint timer = Log.DebugTimerStart ();
1466
1584
db.BeginTransaction ();
1467
foreach (int num in SelectedIds ()) {
1468
p = query.Photos [num];
1585
int [] selected_photos = SelectedIds ();
1586
foreach (int num in selected_photos) {
1587
p = query [num] as Photo;
1469
1588
p.Rating = (uint) r;
1590
query.Commit (selected_photos);
1472
1591
db.CommitTransaction ();
1473
Log.DebugTimerPrint (timer, "HandleRating took {0}");
1634
1752
Mono.Addins.Gui.AddinManagerWindow.Run (main_window);
1637
void HandleViewFullExif (object sender, EventArgs args)
1639
if (info_display_window != null) {
1640
info_display_window.Present ();
1644
info_display = new FSpot.InfoDisplay ();
1645
info_display_window = new Gtk.Dialog (Catalog.GetString ("Metadata Browser"),
1647
Gtk.DialogFlags.NoSeparator | Gtk.DialogFlags.DestroyWithParent);
1648
info_display_window.SetDefaultSize (400, 400);
1649
Gtk.ScrolledWindow scroll = new ScrolledWindow ();
1650
info_display_window.VBox.PackStart (scroll);
1651
scroll.Add (info_display);
1653
info_display.Photo = CurrentPhoto;
1655
info_display_window.ShowAll ();
1656
info_display_window.Destroyed += HandleInfoDisplayDestroy;
1659
1755
void HandleViewDirectory (object sender, EventArgs args)
1661
1757
Gtk.Window win = new Gtk.Window ("Directory View");
1847
1943
PhotoVersionCommands.Create cmd = new PhotoVersionCommands.Create ();
1849
if (cmd.Execute (db.Photos, CurrentPhoto, GetToplevel (null))) {
1850
query.MarkChanged (ActiveIndex ());
1945
cmd.Execute (db.Photos, CurrentPhoto, GetToplevel (null));
1946
// if (cmd.Execute (db.Photos, CurrentPhoto, GetToplevel (null))) {
1947
// query.MarkChanged (ActiveIndex (), true, false);
1854
1951
void HandleDeleteVersionCommand (object obj, EventArgs args)
1856
1953
PhotoVersionCommands.Delete cmd = new PhotoVersionCommands.Delete ();
1858
if (cmd.Execute (db.Photos, CurrentPhoto, GetToplevel (null))) {
1859
query.MarkChanged (ActiveIndex ());
1955
cmd.Execute (db.Photos, CurrentPhoto, GetToplevel (null));
1956
// if (cmd.Execute (db.Photos, CurrentPhoto, GetToplevel (null))) {
1957
// query.MarkChanged (ActiveIndex (), true, true);
1863
1961
void HandlePropertiesCommand (object obje, EventArgs args)
1880
1978
PhotoVersionCommands.Rename cmd = new PhotoVersionCommands.Rename ();
1882
if (cmd.Execute (db.Photos, CurrentPhoto, main_window)) {
1883
query.MarkChanged (ActiveIndex ());
1980
cmd.Execute (db.Photos, CurrentPhoto, main_window);
1981
// if (cmd.Execute (db.Photos, CurrentPhoto, main_window)) {
1982
// query.MarkChanged (ActiveIndex (), true, false);
1887
1986
public void HandleCreateTagAndAttach (object sender, EventArgs args)
2032
2123
new TimeDialog (db, list);
2035
void HandleAdjustColor (object sender, EventArgs args)
2037
if (ActiveIndex () >= 0) {
2038
SetViewMode (ModeType.PhotoView);
2039
ColorDialog.CreateForView (photo_view.View);
2126
public void HideLoupe ()
2128
loupe_menu_item.Active = false;
2131
void HandleLoupe (object sender, EventArgs args)
2133
// Don't steal characters from any text entries
2134
if (Window.Focus is Gtk.Entry && Gtk.Global.CurrentEvent is Gdk.EventKey) {
2135
Window.Focus.ProcessEvent (Gtk.Global.CurrentEvent);
2139
photo_view.View.ShowHideLoupe ();
2043
2142
void HandleSharpen (object sender, EventArgs args)
2183
2280
clear_date_range.Sensitive = (query.Range != null);
2184
2281
clear_rating_filter.Sensitive = (query.RatingRange != null);
2185
UpdateStatusLabel ();
2282
update_status_label = true;
2283
GLib.Idle.Add (UpdateStatusLabel);
2188
private void UpdateStatusLabel ()
2286
bool update_status_label;
2287
private bool UpdateStatusLabel ()
2190
//uint timer = Log.DebugTimerStart ();
2289
update_status_label = false;
2191
2290
int total_photos = Database.Photos.TotalPhotos;
2192
2291
if (total_photos != query.Count)
2193
2292
status_label.Text = String.Format (Catalog.GetPluralString ("{0} Photo out of {1}", "{0} Photos out of {1}", query.Count), query.Count, total_photos);
2321
2420
photos.Length);
2322
2421
string ok_caption = Catalog.GetPluralString ("_Delete photo", "_Delete photos", photos.Length);
2326
2423
if (ResponseType.Ok == HigMessageDialog.RunHigConfirmation(GetToplevel (sender),
2327
2424
DialogFlags.DestroyWithParent,
2328
2425
MessageType.Warning,
2329
2426
header, msg, ok_caption)) {
2428
uint timer = Log.DebugTimerStart ();
2331
2429
foreach (Photo photo in photos) {
2332
2430
foreach (uint id in photo.VersionIds) {
2333
Console.WriteLine (" path == {0}", photo.VersionUri (id).LocalPath);
2335
2432
photo.DeleteVersion (id, true);
2336
2433
} catch (Exception e) {
2465
void HandleUpdateThumbnailCommand (object sende, EventArgs args)
2563
void HandleUpdateThumbnailCommand (object sender, EventArgs args)
2467
2565
ThumbnailCommand command = new ThumbnailCommand (main_window);
2469
2567
int [] selected_ids = SelectedIds ();
2470
if (command.Execute (SelectedPhotos (selected_ids))) {
2471
foreach (int num in selected_ids)
2472
query.MarkChanged (num);
2568
if (command.Execute (SelectedPhotos (selected_ids)))
2570
query.MarkChanged (selected_ids, new PhotoChanges {DataChanged = true});
2573
PhotoChanges changes = new PhotoChanges ();
2574
changes.DataChanged = true;
2575
query.MarkChanged (selected_ids, changes);
2476
2580
public void HandleRotate90Command (object sender, EventArgs args)
2598
2695
case Preferences.MAIN_WINDOW_X:
2599
2696
case Preferences.MAIN_WINDOW_Y:
2600
main_window.Move((int) Preferences.Get(Preferences.MAIN_WINDOW_X),
2601
(int) Preferences.Get(Preferences.MAIN_WINDOW_Y));
2697
main_window.Move(Preferences.Get<int> (Preferences.MAIN_WINDOW_X),
2698
Preferences.Get<int> (Preferences.MAIN_WINDOW_Y));
2604
2701
case Preferences.MAIN_WINDOW_WIDTH:
2605
2702
case Preferences.MAIN_WINDOW_HEIGHT:
2606
main_window.Resize((int) Preferences.Get(Preferences.MAIN_WINDOW_WIDTH),
2607
(int) Preferences.Get(Preferences.MAIN_WINDOW_HEIGHT));
2703
main_window.Resize(Preferences.Get<int> (Preferences.MAIN_WINDOW_WIDTH),
2704
Preferences.Get<int> (Preferences.MAIN_WINDOW_HEIGHT));
2611
2708
case Preferences.SHOW_TOOLBAR:
2612
if (display_toolbar.Active != (bool) val)
2613
display_toolbar.Active = (bool) val;
2709
if (display_toolbar.Active != Preferences.Get<bool> (key))
2710
display_toolbar.Active = Preferences.Get<bool> (key);
2616
2713
case Preferences.SHOW_SIDEBAR:
2617
if (display_sidebar.Active != (bool) val)
2618
display_sidebar.Active = (bool) val;
2714
if (display_sidebar.Active != Preferences.Get<bool> (key))
2715
display_sidebar.Active = Preferences.Get<bool> (key);
2621
2718
case Preferences.SHOW_TIMELINE:
2622
if (display_timeline.Active != (bool) val)
2623
display_timeline.Active = (bool) val;
2719
if (display_timeline.Active != Preferences.Get<bool> (key))
2720
display_timeline.Active = Preferences.Get<bool> (key);
2626
2723
case Preferences.SHOW_FILMSTRIP:
2627
if (display_filmstrip.Active != (bool) val)
2628
display_filmstrip.Active = (bool) val;
2724
if (display_filmstrip.Active != Preferences.Get<bool> (key))
2725
display_filmstrip.Active = Preferences.Get<bool> (key);
2631
2728
case Preferences.SHOW_TAGS:
2632
if (display_tags_menu_item.Active != (bool) val)
2633
display_tags_menu_item.Active = (bool) val;
2729
if (display_tags_menu_item.Active != Preferences.Get<bool> (key))
2730
display_tags_menu_item.Active = Preferences.Get<bool> (key);
2636
2733
case Preferences.SHOW_DATES:
2637
if (display_dates_menu_item.Active != (bool) val)
2638
display_dates_menu_item.Active = (bool) val;
2734
if (display_dates_menu_item.Active != Preferences.Get<bool> (key))
2735
display_dates_menu_item.Active = Preferences.Get<bool> (key);
2639
2736
//display_dates_menu_item.Toggle ();
2642
2739
case Preferences.SHOW_RATINGS:
2643
if (display_ratings_menu_item.Active != (bool) val)
2644
display_ratings_menu_item.Active = (bool) val;
2740
if (display_ratings_menu_item.Active != Preferences.Get<bool> (key))
2741
display_ratings_menu_item.Active = Preferences.Get<bool> (key);
2647
2744
case Preferences.GROUP_ADAPTOR:
2745
if (Preferences.Get<int> (key) == 1)
2649
2746
directory.Active = true;
2652
2749
case Preferences.GROUP_ADAPTOR_ORDER_ASC:
2653
group_selector.Adaptor.OrderAscending = (bool) val;
2654
reverse_order.Active = (bool) val;
2750
group_selector.Adaptor.OrderAscending = Preferences.Get<bool> (key);
2751
reverse_order.Active = Preferences.Get<bool> (key);
2752
query.TimeOrderAsc = group_selector.Adaptor.OrderAscending;
2657
2755
case Preferences.GLASS_POSITION:
2669
2767
case Preferences.SIDEBAR_POSITION:
2670
if (main_hpaned.Position != (int) val)
2671
main_hpaned.Position = (int) val;
2768
if (main_hpaned.Position !=Preferences.Get<int> (key) )
2769
main_hpaned.Position = Preferences.Get<int> (key);
2674
2772
case Preferences.TAG_ICON_SIZE:
2773
int s = Preferences.Get<int> (key);
2676
2774
tag_icon_hidden.Active = (s == (int) Tag.IconSize.Hidden);
2677
2775
tag_icon_small.Active = (s == (int) Tag.IconSize.Small);
2678
2776
tag_icon_medium.Active = (s == (int) Tag.IconSize.Medium);
2683
2781
case Preferences.ZOOM:
2684
icon_view.Zoom = (double) val;
2782
icon_view.Zoom = Preferences.Get<double> (key);
2687
2785
case Preferences.METADATA_EMBED_IN_IMAGE:
2688
write_metadata = (bool) val;
2786
write_metadata =Preferences.Get<bool> (key) ;
2788
case Preferences.COLOR_MANAGEMENT_ENABLED:
2789
FSpot.ColorManagement.IsEnabled = Preferences.Get<bool> (key);
2791
case Preferences.COLOR_MANAGEMENT_USE_X_PROFILE:
2792
FSpot.ColorManagement.UseXProfile = Preferences.Get<bool> (key);
2690
2794
case Preferences.GNOME_MAILTO_ENABLED:
2691
send_mail.Visible = (bool) val;
2795
send_mail.Visible = Preferences.Get<bool> (key);
2849
2941
versions_submenu = new PhotoVersionMenu (CurrentPhoto);
2850
versions_submenu.VersionIdChanged += new PhotoVersionMenu.VersionIdChangedHandler (HandleVersionIdChanged);
2942
versions_submenu.VersionIdChanged += delegate (PhotoVersionMenu menu) { UpdateForVersionIdChange (menu.VersionId);};
2851
2943
version_menu_item.Submenu = versions_submenu;
2853
2945
sharpen.Sensitive = (view_mode == ModeType.IconView ? false : true);
2946
loupe_menu_item.Sensitive = (view_mode == ModeType.IconView ? false : true);
2856
2949
set_as_background.Sensitive = single_active;
2857
adjust_color.Sensitive = single_active;
2858
2950
adjust_time.Sensitive = active_selection;
2860
2952
attach_tag.Sensitive = active_selection;
2869
2961
print.Sensitive = active_selection;
2870
2962
select_none.Sensitive = active_selection;
2871
2963
copy_location.Sensitive = active_selection;
2872
exif_data.Sensitive = active_selection;
2873
2964
remove_from_catalog.Sensitive = active_selection;
2875
2966
clear_rating_filter.Sensitive = (query.RatingRange != null);
2877
last_roll.Sensitive = (db.Rolls.GetRolls (1).Length > 0);
2878
select_rolls.Sensitive = (db.Rolls.GetRolls (2).Length > 1);
2879
2968
clear_roll_filter.Sensitive = (query.RollSet != null);
2881
2970
delete_selected_tag.Sensitive = tag_sensitive;