public ThreadProgressDialog (Thread thread, int total) { /* if (parent_window) this.TransientFor = parent_window; */ this.Title = thread.Name; this.thread = thread; HasSeparator = false; BorderWidth = 6; SetDefaultSize (300, -1); message_label = new Gtk.Label (String.Empty); VBox.PackStart (message_label, true, true, 12); progress_bar = new Gtk.ProgressBar (); VBox.PackStart (progress_bar, true, true, 6); retry_button = new Gtk.Button (Mono.Unix.Catalog.GetString ("Retry")); retry_button.Clicked += new EventHandler (HandleRetryClicked); skip_button = new Gtk.Button (Mono.Unix.Catalog.GetString ("Skip")); skip_button.Clicked += new EventHandler (HandleSkipClicked); ActionArea.Add (retry_button); ActionArea.Add (skip_button); button_label = Gtk.Stock.Cancel; button = (Gtk.Button) AddButton (button_label, (int)Gtk.ResponseType.Cancel); delay = new Delay (new GLib.IdleHandler (HandleUpdate)); Response += HandleResponse; Destroyed += HandleDestroy; }
public ThreadProgressDialog(Thread thread, int total) { /* * if (parent_window) * this.TransientFor = parent_window; * */ this.Title = thread.Name; this.thread = thread; HasSeparator = false; BorderWidth = 6; SetDefaultSize(300, -1); message_label = new Gtk.Label(String.Empty); VBox.PackStart(message_label, true, true, 12); progress_bar = new Gtk.ProgressBar(); VBox.PackStart(progress_bar, true, true, 6); retry_button = new Gtk.Button(Mono.Unix.Catalog.GetString("Retry")); retry_button.Clicked += new EventHandler(HandleRetryClicked); skip_button = new Gtk.Button(Mono.Unix.Catalog.GetString("Skip")); skip_button.Clicked += new EventHandler(HandleSkipClicked); ActionArea.Add(retry_button); ActionArea.Add(skip_button); button_label = Gtk.Stock.Cancel; button = (Gtk.Button)AddButton(button_label, (int)Gtk.ResponseType.Cancel); delay = new Delay(new GLib.IdleHandler(HandleUpdate)); Response += HandleResponse; Destroyed += HandleDestroy; }
public EditTagIconDialog(Db db, Tag t, Gtk.Window parent_window) : base("EditTagIconDialog.ui", "edit_tag_icon_dialog") { this.db = db; TransientFor = parent_window; Title = String.Format (Catalog.GetString ("Edit Icon for Tag {0}"), t.Name); preview_pixbuf = t.Icon; Cms.Profile screen_profile; if (preview_pixbuf != null && FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile)) { preview_image.Pixbuf = preview_pixbuf.Copy (); ColorManagement.ApplyProfile (preview_image.Pixbuf, screen_profile); } else preview_image.Pixbuf = preview_pixbuf; query = new FSpot.PhotoQuery (db.Photos); if (db.Tags.Hidden != null) query.Terms = FSpot.OrTerm.FromTags (new Tag [] {t}); else query.Terms = new FSpot.Literal (t); image_view = new PhotoImageView (query) {CropHelpers = false}; image_view.SelectionXyRatio = 1.0; image_view.SelectionChanged += HandleSelectionChanged; image_view.PhotoChanged += HandlePhotoChanged; external_photo_chooser = new Gtk.FileChooserButton (Catalog.GetString ("Select Photo from file"), Gtk.FileChooserAction.Open); external_photo_chooser.Filter = new FileFilter(); external_photo_chooser.Filter.AddPixbufFormats(); external_photo_chooser.LocalOnly = false; external_photo_chooser_hbox.PackStart (external_photo_chooser); external_photo_chooser.Show (); external_photo_chooser.SelectionChanged += HandleExternalFileSelectionChanged; photo_scrolled_window.Add (image_view); if (query.Count > 0) { photo_spin_button.Wrap = true; photo_spin_button.Adjustment.Lower = 1.0; photo_spin_button.Adjustment.Upper = (double) query.Count; photo_spin_button.Adjustment.StepIncrement = 1.0; photo_spin_button.ValueChanged += HandleSpinButtonChanged; image_view.Item.Index = 0; } else { from_photo_label.Markup = String.Format (Catalog.GetString ( "\n<b>From Photo</b>\n" + " You can use one of your library photos as an icon for this tag.\n" + " However, first you must have at least one photo associated\n" + " with this tag. Please tag a photo as '{0}' and return here\n" + " to use it as an icon."), t.Name); photo_scrolled_window.Visible = false; photo_label.Visible = false; photo_spin_button.Visible = false; } icon_store = new ListStore (typeof (string), typeof (Gdk.Pixbuf)); icon_view = new Gtk.IconView (icon_store); icon_view.PixbufColumn = 1; icon_view.SelectionMode = SelectionMode.Single; icon_view.SelectionChanged += HandleIconSelectionChanged; icon_scrolled_window.Add (icon_view); icon_view.Show(); image_view.Show (); FSpot.Delay fill_delay = new FSpot.Delay (FillIconView); fill_delay.Start (); }
public PhotoView (IBrowsableCollection query) : base () { this.query = query; commit_delay = new FSpot.Delay (1000, new GLib.IdleHandler (CommitPendingChanges)); this.Destroyed += HandleDestroy; Name = "ImageContainer"; Box vbox = new VBox (false, 6); Add (vbox); background = new EventBox (); Frame frame = new Frame (); background.Add (frame); frame.ShadowType = ShadowType.In; vbox.PackStart (background, true, true, 0); Box inner_vbox = new VBox (false , 2); frame.Add (inner_vbox); BrowsablePointer bp = new BrowsablePointer (query, -1); photo_view = new FSpot.PhotoImageView (bp); filmstrip = new Filmstrip (bp); Gdk.Pixbuf bg = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, true, 8, 1, 69); bg.Fill (0x00000000); filmstrip.BackgroundTile = bg; filmstrip.ThumbOffset = 1; filmstrip.Spacing = 4; inner_vbox.PackStart (filmstrip, false, false, 0); photo_view.PhotoChanged += HandlePhotoChanged; photo_view_scrolled = new ScrolledWindow (null, null); photo_view_scrolled.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); photo_view_scrolled.ShadowType = ShadowType.None; photo_view_scrolled.Add (photo_view); photo_view_scrolled.Child.ButtonPressEvent += HandleButtonPressEvent; photo_view.AddEvents ((int) EventMask.KeyPressMask); inner_vbox.PackStart (photo_view_scrolled, true, true, 0); HBox inner_hbox = new HBox (false, 2); //inner_hbox.BorderWidth = 6; tag_view = new Widgets.TagView (MainWindow.ToolTips); inner_hbox.PackStart (tag_view, false, true, 0); Label comment = new Label (Catalog.GetString ("Comment:")); inner_hbox.PackStart (comment, false, false, 0); description_entry = new Entry (); inner_hbox.PackStart (description_entry, true, true, 0); description_entry.Changed += HandleDescriptionChanged; rating = new Widgets.Rating(); inner_hbox.PackStart (rating, false, false, 0); rating.Changed += HandleRatingChanged; SetColors (); inner_vbox.PackStart (inner_hbox, false, true, 0); vbox.ShowAll (); Realized += delegate (object o, EventArgs e) {SetColors ();}; }
public SingleView (Uri [] uris) { string glade_name = "single_view"; this.uri = uris [0]; System.Console.WriteLine ("uri = {0}", uri.ToString ()); xml = new Glade.XML (null, "f-spot.glade", glade_name, "f-spot"); xml.Autoconnect (this); window = (Gtk.Window) xml.GetWidget (glade_name); LoadPreference (Preferences.VIEWER_WIDTH); LoadPreference (Preferences.VIEWER_MAXIMIZED); Gtk.Toolbar toolbar = new Gtk.Toolbar (); toolbar_hbox.PackStart (toolbar); Widget rl_button = GtkUtil.MakeToolbarButton (toolbar, "f-spot-rotate-270", new System.EventHandler (HandleRotate270Command)); SetTip (rl_button, Catalog.GetString ("Rotate photo left")); Widget rr_button = GtkUtil.MakeToolbarButton (toolbar, "f-spot-rotate-90", new System.EventHandler (HandleRotate90Command)); SetTip (rr_button, Catalog.GetString ("Rotate photo right")); toolbar.AppendSpace (); Widget fs_button = GtkUtil.MakeToolbarButton (toolbar, "f-spot-fullscreen", new System.EventHandler (HandleViewFullscreen)); SetTip (fs_button, Catalog.GetString ("View photos fullscreen")); Widget ss_button = GtkUtil.MakeToolbarButton (toolbar, "f-spot-slideshow", new System.EventHandler (HandleViewSlideshow)); SetTip (ss_button, Catalog.GetString ("View photos in a slideshow")); collection = new UriCollection (uris); TargetEntry [] dest_table = { new TargetEntry ("text/uri-list", 0, 0), new TargetEntry ("text/plain", 0, 1)}; directory_view = new IconView (collection); directory_view.Selection.Changed += HandleSelectionChanged; directory_view.DragDataReceived += HandleDragDataReceived; Gtk.Drag.DestSet (directory_view, DestDefaults.All, dest_table, DragAction.Copy | DragAction.Move); directory_view.DisplayTags = false; directory_view.DisplayDates = false; directory_scrolled.Add (directory_view); ThumbnailGenerator.Default.OnPixbufLoaded += delegate { directory_view.QueueDraw (); }; image_view = new PhotoImageView (collection); FSpot.Global.ModifyColors (image_view); FSpot.Global.ModifyColors (image_scrolled); image_view.ZoomChanged += HandleZoomChanged; image_view.Item.Changed += HandleItemChanged; image_view.ButtonPressEvent += HandleImageViewButtonPressEvent; image_view.DragDataReceived += HandleDragDataReceived; Gtk.Drag.DestSet (image_view, DestDefaults.All, dest_table, DragAction.Copy | DragAction.Move); image_scrolled.Add (image_view); Window.ShowAll (); zoom_scale.ValueChanged += HandleZoomScaleValueChanged; LoadPreference (Preferences.VIEWER_SHOW_TOOLBAR); LoadPreference (Preferences.VIEWER_INTERPOLATION); LoadPreference (Preferences.VIEWER_TRANSPARENCY); LoadPreference (Preferences.VIEWER_TRANS_COLOR); ShowSidebar = collection.Count > 1; near_image.SetFromStock ("f-spot-stock_near", Gtk.IconSize.SmallToolbar); far_image.SetFromStock ("f-spot-stock_far", Gtk.IconSize.SmallToolbar); slide_delay = new FSpot.Delay (new GLib.IdleHandler (SlideShow)); LoadPreference (Preferences.VIEWER_SHOW_FILENAMES); Preferences.SettingChanged += OnPreferencesChanged; window.DeleteEvent += HandleDeleteEvent; collection.Changed += HandleCollectionChanged; UpdateStatusLabel (); if (collection.Count > 0) directory_view.Selection.Add (0); export.Submenu = (Mono.Addins.AddinManager.GetExtensionNode ("/FSpot/Menus/Exports") as FSpot.Extensions.SubmenuNode).GetMenuItem ().Submenu; export.Submenu.ShowAll (); export.Activated += HandleExportActivated ; }
public PhotoView(IBrowsableCollection query) : base() { this.query = query; commit_delay = new FSpot.Delay(1000, new GLib.IdleHandler(CommitPendingChanges)); this.Destroyed += HandleDestroy; Name = "ImageContainer"; Box vbox = new VBox(false, 6); Add(vbox); background = new EventBox(); Frame frame = new Frame(); background.Add(frame); frame.ShadowType = ShadowType.In; vbox.PackStart(background, true, true, 0); Box inner_vbox = new VBox(false, 2); frame.Add(inner_vbox); BrowsablePointer bp = new BrowsablePointer(query, -1); photo_view = new FSpot.PhotoImageView(bp); filmstrip = new Filmstrip(bp); Gdk.Pixbuf bg = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, true, 8, 1, 69); bg.Fill(0x00000000); filmstrip.BackgroundTile = bg; filmstrip.ThumbOffset = 1; filmstrip.Spacing = 4; inner_vbox.PackStart(filmstrip, false, false, 0); photo_view.PhotoChanged += HandlePhotoChanged; photo_view_scrolled = new ScrolledWindow(null, null); photo_view_scrolled.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); photo_view_scrolled.ShadowType = ShadowType.None; photo_view_scrolled.Add(photo_view); photo_view_scrolled.Child.ButtonPressEvent += HandleButtonPressEvent; photo_view.AddEvents((int)EventMask.KeyPressMask); inner_vbox.PackStart(photo_view_scrolled, true, true, 0); HBox inner_hbox = new HBox(false, 2); //inner_hbox.BorderWidth = 6; tag_view = new Widgets.TagView(MainWindow.ToolTips); inner_hbox.PackStart(tag_view, false, true, 0); Label comment = new Label(Catalog.GetString("Comment:")); inner_hbox.PackStart(comment, false, false, 0); description_entry = new Entry(); inner_hbox.PackStart(description_entry, true, true, 0); description_entry.Changed += HandleDescriptionChanged; rating = new Widgets.Rating(); inner_hbox.PackStart(rating, false, false, 0); rating.Changed += HandleRatingChanged; SetColors(); inner_vbox.PackStart(inner_hbox, false, true, 0); vbox.ShowAll(); Realized += delegate(object o, EventArgs e) { SetColors(); }; }
public PhotoView (IBrowsableCollection query) : base () { this.query = query; description_delay = new FSpot.Delay (1000, new GLib.IdleHandler (CommitPendingChanges)); this.Destroyed += HandleDestroy; Name = "ImageContainer"; Box vbox = new VBox (false, 6); Add (vbox); background = new EventBox (); Frame frame = new Frame (); background.Add (frame); frame.ShadowType = ShadowType.In; vbox.PackStart (background, true, true, 0); Box inner_vbox = new VBox (false , 2); frame.Add (inner_vbox); photo_view = new FSpot.PhotoImageView (query); photo_view.PhotoChanged += HandlePhotoChanged; photo_view.SelectionChanged += HandleSelectionChanged; photo_view_scrolled = new ScrolledWindow (null, null); photo_view_scrolled.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); photo_view_scrolled.ShadowType = ShadowType.None; photo_view_scrolled.Add (photo_view); photo_view_scrolled.ButtonPressEvent += HandleButtonPressEvent; photo_view.AddEvents ((int) EventMask.KeyPressMask); inner_vbox.PackStart (photo_view_scrolled, true, true, 0); HBox inner_hbox = new HBox (false, 2); //inner_hbox.BorderWidth = 6; tag_view = new TagView (); inner_hbox.PackStart (tag_view, false, true, 0); SetColors (); Label comment = new Label (Catalog.GetString ("Comment:")); inner_hbox.PackStart (comment, false, false, 0); description_entry = new Entry (); inner_hbox.PackStart (description_entry, true, true, 0); description_entry.Changed += HandleDescriptionChanged; inner_vbox.PackStart (inner_hbox, false, true, 0); Box toolbar_hbox = new HBox (false, 6); vbox.PackStart (toolbar_hbox, false, true, 0); toolbar_hbox.PackStart (CreateConstraintsOptionMenu (), false, false, 0); crop_button = new ToolbarButton (); crop_button.Add (new Gtk.Image ("f-spot-crop", IconSize.Button)); toolbar_hbox.PackStart (crop_button, false, true, 0); crop_button.Clicked += new EventHandler (HandleCropButtonClicked); redeye_button = new ToolbarButton (); redeye_button.Add (new Gtk.Image ("f-spot-red-eye", IconSize.Button)); toolbar_hbox.PackStart (redeye_button, false, true, 0); redeye_button.Clicked += new EventHandler (HandleRedEyeButtonClicked); color_button = new ToolbarButton (); color_button.Add (new Gtk.Image ("f-spot-adjust-colors", IconSize.Button)); toolbar_hbox.PackStart (color_button, false, true, 0); color_button.Clicked += new EventHandler (HandleColorButtonClicked); desaturate_button = new ToolbarButton (); desaturate_button.Add (new Gtk.Image ("f-spot-desaturate", IconSize.Button)); toolbar_hbox.PackStart (desaturate_button, false, true, 0); desaturate_button.Clicked += HandleDesaturateButtonClicked; sepia_button = new ToolbarButton (); sepia_button.Add (new Gtk.Image ("f-spot-sepia", IconSize.Button)); toolbar_hbox.PackStart (sepia_button, false, true, 0); sepia_button.Clicked += HandleSepiaButtonClicked; ItemAction straighten = new TiltEditorAction (photo_view); toolbar_hbox.PackStart (straighten.GetToolButton (false), false, true, 0); ItemAction softfocus = new SoftFocusEditorAction (photo_view); toolbar_hbox.PackStart (softfocus.GetToolButton (false), false, true, 0); ItemAction autocolor = new AutoColor (photo_view.Item); toolbar_hbox.PackStart (autocolor.GetToolButton (false), false, true, 0); /* Face detection ! */ face_widget = new FaceBox (toolbar_hbox, photo_view); vbox.PackStart ( face_widget, false, true, 0); /* Spacer Label */ toolbar_hbox.PackStart (new Label (String.Empty), true, true, 0); count_label = new Label (String.Empty); toolbar_hbox.PackStart (count_label, false, true, 0); display_previous_button = new ToolbarButton (); Gtk.Image display_previous_image = new Gtk.Image (Stock.GoBack, IconSize.Button); display_previous_button.Add (display_previous_image); display_previous_button.Clicked += new EventHandler (HandleDisplayPreviousButtonClicked); toolbar_hbox.PackStart (display_previous_button, false, true, 0); display_next_button = new ToolbarButton (); Gtk.Image display_next_image = new Gtk.Image (Stock.GoForward, IconSize.Button); display_next_button.Add (display_next_image); display_next_button.Clicked += new EventHandler (HandleDisplayNextButtonClicked); toolbar_hbox.PackStart (display_next_button, false, true, 0); tips.Enable (); UpdateButtonSensitivity (); vbox.ShowAll (); tips.SetTip (color_button, Catalog.GetString ("Adjust the photo colors"), String.Empty); tips.SetTip (constraints_option_menu, Catalog.GetString ("Constrain the aspect ratio of the selection"), String.Empty); tips.SetTip (display_next_button, Catalog.GetString ("Next photo"), String.Empty); tips.SetTip (display_previous_button, Catalog.GetString ("Previous photo"), String.Empty); tips.SetTip (desaturate_button, Catalog.GetString ("Convert the photo to black and white"), String.Empty); tips.SetTip (sepia_button, Catalog.GetString ("Convert the photo to sepia tones"), String.Empty); Realized += delegate (object o, EventArgs e) {SetColors ();}; }
public SingleView(Uri [] uris) { string glade_name = "single_view"; this.uri = uris [0]; System.Console.WriteLine("uri = {0}", uri.ToString()); xml = new Glade.XML(null, "f-spot.glade", glade_name, "f-spot"); xml.Autoconnect(this); window = (Gtk.Window)xml.GetWidget(glade_name); LoadPreference(Preferences.VIEWER_WIDTH); LoadPreference(Preferences.VIEWER_MAXIMIZED); Gtk.Toolbar toolbar = new Gtk.Toolbar(); toolbar_hbox.PackStart(toolbar); Widget rl_button = GtkUtil.MakeToolbarButton(toolbar, "f-spot-rotate-270", new System.EventHandler(HandleRotate270Command)); SetTip(rl_button, Catalog.GetString("Rotate photo left")); Widget rr_button = GtkUtil.MakeToolbarButton(toolbar, "f-spot-rotate-90", new System.EventHandler(HandleRotate90Command)); SetTip(rr_button, Catalog.GetString("Rotate photo right")); toolbar.AppendSpace(); Widget fs_button = GtkUtil.MakeToolbarButton(toolbar, "f-spot-fullscreen", new System.EventHandler(HandleViewFullscreen)); SetTip(fs_button, Catalog.GetString("View photos fullscreen")); Widget ss_button = GtkUtil.MakeToolbarButton(toolbar, "f-spot-slideshow", new System.EventHandler(HandleViewSlideshow)); SetTip(ss_button, Catalog.GetString("View photos in a slideshow")); collection = new UriCollection(uris); TargetEntry [] dest_table = { new TargetEntry("text/uri-list", 0, 0), new TargetEntry("text/plain", 0, 1) }; directory_view = new IconView(collection); directory_view.Selection.Changed += HandleSelectionChanged; directory_view.DragDataReceived += HandleDragDataReceived; Gtk.Drag.DestSet(directory_view, DestDefaults.All, dest_table, DragAction.Copy | DragAction.Move); directory_view.DisplayTags = false; directory_view.DisplayDates = false; directory_scrolled.Add(directory_view); ThumbnailGenerator.Default.OnPixbufLoaded += delegate { directory_view.QueueDraw(); }; image_view = new PhotoImageView(collection); FSpot.Global.ModifyColors(image_view); FSpot.Global.ModifyColors(image_scrolled); image_view.ZoomChanged += HandleZoomChanged; image_view.Item.Changed += HandleItemChanged; image_view.ButtonPressEvent += HandleImageViewButtonPressEvent; image_view.DragDataReceived += HandleDragDataReceived; Gtk.Drag.DestSet(image_view, DestDefaults.All, dest_table, DragAction.Copy | DragAction.Move); image_scrolled.Add(image_view); Window.ShowAll(); zoom_scale.ValueChanged += HandleZoomScaleValueChanged; LoadPreference(Preferences.VIEWER_SHOW_TOOLBAR); LoadPreference(Preferences.VIEWER_INTERPOLATION); LoadPreference(Preferences.VIEWER_TRANSPARENCY); LoadPreference(Preferences.VIEWER_TRANS_COLOR); ShowSidebar = collection.Count > 1; near_image.SetFromStock("f-spot-stock_near", Gtk.IconSize.SmallToolbar); far_image.SetFromStock("f-spot-stock_far", Gtk.IconSize.SmallToolbar); slide_delay = new FSpot.Delay(new GLib.IdleHandler(SlideShow)); LoadPreference(Preferences.VIEWER_SHOW_FILENAMES); Preferences.SettingChanged += OnPreferencesChanged; window.DeleteEvent += HandleDeleteEvent; collection.Changed += HandleCollectionChanged; UpdateStatusLabel(); if (collection.Count > 0) { directory_view.Selection.Add(0); } export.Submenu = (Mono.Addins.AddinManager.GetExtensionNode("/FSpot/Menus/Exports") as FSpot.Extensions.SubmenuNode).GetMenuItem().Submenu; export.Submenu.ShowAll(); export.Activated += HandleExportActivated; }
public PhotoView(IBrowsableCollection query) : base() { this.query = query; description_delay = new FSpot.Delay(1000, new GLib.IdleHandler(CommitPendingChanges)); this.Destroyed += HandleDestroy; Name = "ImageContainer"; Box vbox = new VBox(false, 6); Add(vbox); background = new EventBox(); Frame frame = new Frame(); background.Add(frame); frame.ShadowType = ShadowType.In; vbox.PackStart(background, true, true, 0); Box inner_vbox = new VBox(false, 2); frame.Add(inner_vbox); photo_view = new FSpot.PhotoImageView(query); photo_view.PhotoChanged += HandlePhotoChanged; photo_view.SelectionChanged += HandleSelectionChanged; photo_view_scrolled = new ScrolledWindow(null, null); photo_view_scrolled.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); photo_view_scrolled.ShadowType = ShadowType.None; photo_view_scrolled.Add(photo_view); photo_view_scrolled.ButtonPressEvent += HandleButtonPressEvent; photo_view.AddEvents((int)EventMask.KeyPressMask); inner_vbox.PackStart(photo_view_scrolled, true, true, 0); HBox inner_hbox = new HBox(false, 2); //inner_hbox.BorderWidth = 6; tag_view = new TagView(); inner_hbox.PackStart(tag_view, false, true, 0); SetColors(); Label comment = new Label(Catalog.GetString("Comment:")); inner_hbox.PackStart(comment, false, false, 0); description_entry = new Entry(); inner_hbox.PackStart(description_entry, true, true, 0); description_entry.Changed += HandleDescriptionChanged; inner_vbox.PackStart(inner_hbox, false, true, 0); Box toolbar_hbox = new HBox(false, 6); vbox.PackStart(toolbar_hbox, false, true, 0); toolbar_hbox.PackStart(CreateConstraintsOptionMenu(), false, false, 0); crop_button = new ToolbarButton(); crop_button.Add(new Gtk.Image("f-spot-crop", IconSize.Button)); toolbar_hbox.PackStart(crop_button, false, true, 0); crop_button.Clicked += new EventHandler(HandleCropButtonClicked); redeye_button = new ToolbarButton(); redeye_button.Add(new Gtk.Image("f-spot-red-eye", IconSize.Button)); toolbar_hbox.PackStart(redeye_button, false, true, 0); redeye_button.Clicked += new EventHandler(HandleRedEyeButtonClicked); color_button = new ToolbarButton(); color_button.Add(new Gtk.Image("f-spot-adjust-colors", IconSize.Button)); toolbar_hbox.PackStart(color_button, false, true, 0); color_button.Clicked += new EventHandler(HandleColorButtonClicked); desaturate_button = new ToolbarButton(); desaturate_button.Add(new Gtk.Image("f-spot-desaturate", IconSize.Button)); toolbar_hbox.PackStart(desaturate_button, false, true, 0); desaturate_button.Clicked += HandleDesaturateButtonClicked; sepia_button = new ToolbarButton(); sepia_button.Add(new Gtk.Image("f-spot-sepia", IconSize.Button)); toolbar_hbox.PackStart(sepia_button, false, true, 0); sepia_button.Clicked += HandleSepiaButtonClicked; ItemAction straighten = new TiltEditorAction(photo_view); toolbar_hbox.PackStart(straighten.GetToolButton(false), false, true, 0); ItemAction softfocus = new SoftFocusEditorAction(photo_view); toolbar_hbox.PackStart(softfocus.GetToolButton(false), false, true, 0); ItemAction autocolor = new AutoColor(photo_view.Item); toolbar_hbox.PackStart(autocolor.GetToolButton(false), false, true, 0); /* Face detection ! */ face_widget = new FaceBox(toolbar_hbox, photo_view); vbox.PackStart(face_widget, false, true, 0); /* Spacer Label */ toolbar_hbox.PackStart(new Label(String.Empty), true, true, 0); count_label = new Label(String.Empty); toolbar_hbox.PackStart(count_label, false, true, 0); display_previous_button = new ToolbarButton(); Gtk.Image display_previous_image = new Gtk.Image(Stock.GoBack, IconSize.Button); display_previous_button.Add(display_previous_image); display_previous_button.Clicked += new EventHandler(HandleDisplayPreviousButtonClicked); toolbar_hbox.PackStart(display_previous_button, false, true, 0); display_next_button = new ToolbarButton(); Gtk.Image display_next_image = new Gtk.Image(Stock.GoForward, IconSize.Button); display_next_button.Add(display_next_image); display_next_button.Clicked += new EventHandler(HandleDisplayNextButtonClicked); toolbar_hbox.PackStart(display_next_button, false, true, 0); tips.Enable(); UpdateButtonSensitivity(); vbox.ShowAll(); tips.SetTip(color_button, Catalog.GetString("Adjust the photo colors"), String.Empty); tips.SetTip(constraints_option_menu, Catalog.GetString("Constrain the aspect ratio of the selection"), String.Empty); tips.SetTip(display_next_button, Catalog.GetString("Next photo"), String.Empty); tips.SetTip(display_previous_button, Catalog.GetString("Previous photo"), String.Empty); tips.SetTip(desaturate_button, Catalog.GetString("Convert the photo to black and white"), String.Empty); tips.SetTip(sepia_button, Catalog.GetString("Convert the photo to sepia tones"), String.Empty); Realized += delegate(object o, EventArgs e) { SetColors(); }; }