This class extends CellGridView to provide a grid view for a photo collection.
Inheritance: FSpot.Widgets.CellGridView
Example #1
0
        public PreviewPopup(SelectionCollectionGridView view) : base(Gtk.WindowType.Toplevel)
        {
            var vbox = new Gtk.VBox();

            Add(vbox);
            AddEvents((int)(EventMask.PointerMotionMask |
                            EventMask.KeyReleaseMask |
                            EventMask.ButtonPressMask));

            Decorated       = false;
            SkipTaskbarHint = true;
            SkipPagerHint   = true;
            SetPosition(Gtk.WindowPosition.None);

            KeyReleaseEvent  += HandleKeyRelease;
            ButtonPressEvent += HandleButtonPress;
            Destroyed        += HandleDestroyed;

            this.view = view;
            view.MotionNotifyEvent += HandleIconViewMotion;
            view.KeyPressEvent     += HandleIconViewKeyPress;
            view.KeyReleaseEvent   += HandleKeyRelease;
            view.DestroyEvent      += HandleIconViewDestroy;

            BorderWidth = 6;

            hist = new Histogram {
                RedColorHint        = 127,
                GreenColorHint      = 127,
                BlueColorHint       = 127,
                BackgroundColorHint = 0xff
            };

            image = new Gtk.Image {
                CanFocus = false
            };


            label = new Gtk.Label(string.Empty)
            {
                CanFocus = false
            };
            label.ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127));
            label.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0));

            ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127));
            ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0));

            vbox.PackStart(image, true, true, 0);
            vbox.PackStart(label, true, false, 0);
            vbox.ShowAll();
        }
Example #2
0
        public PreviewPopup(SelectionCollectionGridView view)
            : base(Gtk.WindowType.Toplevel)
        {
            var vbox = new Gtk.VBox ();
            Add (vbox);
            AddEvents ((int) (EventMask.PointerMotionMask |
                           EventMask.KeyReleaseMask |
                           EventMask.ButtonPressMask));

            Decorated = false;
            SkipTaskbarHint = true;
            SkipPagerHint = true;
            SetPosition (Gtk.WindowPosition.None);

            KeyReleaseEvent += HandleKeyRelease;
            ButtonPressEvent += HandleButtonPress;
            Destroyed += HandleDestroyed;

            this.view = view;
            view.MotionNotifyEvent += HandleIconViewMotion;
            view.KeyPressEvent += HandleIconViewKeyPress;
            view.KeyReleaseEvent += HandleKeyRelease;
            view.DestroyEvent += HandleIconViewDestroy;

            BorderWidth = 6;

            hist = new Histogram ();
            hist.RedColorHint = 127;
            hist.GreenColorHint = 127;
            hist.BlueColorHint = 127;
            hist.BackgroundColorHint = 0xff;

            image = new Gtk.Image ();
            image.CanFocus = false;

            label = new Gtk.Label (String.Empty);
            label.CanFocus = false;
            label.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127));
            label.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0));

            ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127));
            ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0));

            vbox.PackStart (image, true, true, 0);
            vbox.PackStart (label, true, false, 0);
            vbox.ShowAll ();
        }
Example #3
0
        public AdjustTimeDialog(Db db, IBrowsableCollection collection)
            : base("AdjustTimeDialog.ui", "time_dialog")
        {
            this.db = db;
            this.collection = collection;

            view = new PhotoImageView (collection);
            view_scrolled.Add (view);
            item = view.Item;
            item.Changed += HandleItemChanged;
            item.MoveFirst ();

            tray = new BrowseablePointerGridView (view.Item) {
                MaxColumns = 1,
                DisplayRatings = false,
                DisplayTags = false,
                DisplayDates = true
            };
            tray_scrolled.Add (tray);

            //forward_button.Clicked += HandleForwardClicked;
            //back_button.Clicked += HandleBackClicked;
            ok_button.Clicked += HandleOkClicked;
            cancel_button.Clicked += HandleCancelClicked;

            photo_spin.ValueChanged += HandleSpinChanged;
            photo_spin.SetIncrements (1.0, 1.0);
            photo_spin.Adjustment.StepIncrement = 1.0;
            photo_spin.Wrap = true;

            date_edit.TimeChanged += HandleTimeChanged;
            date_edit.DateChanged += HandleTimeChanged;
            Gtk.Entry entry = (Gtk.Entry) date_edit.Children [0];
            entry.Changed += HandleTimeChanged;
            entry = (Gtk.Entry) date_edit.Children [2];
            entry.Changed += HandleTimeChanged;
            offset_entry.Changed += HandleOffsetChanged;
            ShowAll ();
            HandleCollectionChanged (collection);

            spacing_entry.Changed += HandleSpacingChanged;
            spacing_entry.Sensitive = ! difference_check.Active;

            difference_check.Toggled += HandleActionToggled;
        }