Пример #1
0
        void SetIndex(int value, IBrowsableItemChanges changes = null)
        {
            var args = new BrowsablePointerChangedEventArgs(Current, index, changes);

            index = value;
            item  = Current;

            Changed?.Invoke(this, args);
        }
Пример #2
0
        private void SetIndex(int value, IBrowsableItemChanges changes)
        {
            BrowsablePointerChangedEventArgs args = new BrowsablePointerChangedEventArgs(Current, index, changes);

            index = value;
            item  = Current;

            if (Changed != null)
            {
                Changed(this, args);
            }
        }
Пример #3
0
        void SetIndex(int value, IBrowsableItemChanges changes)
        {
            var args = new BrowsablePointerChangedEventArgs (Current, index, changes);

            index = value;
            item = Current;

            if (Changed != null)
                Changed (this, args);
        }
Пример #4
0
        void HandlePhotoItemChanged(object sender, BrowsablePointerChangedEventArgs args)
        {
            // If it is just the position that changed fall out
            if (args != null &&
                args.PreviousItem != null &&
                Item.IsValid &&
                (args.PreviousIndex != item.Index) &&
                (this.Item.Current.DefaultVersion.Uri == args.PreviousItem.DefaultVersion.Uri))
                return;

            // Don't reload if the image didn't change at all.
            if (args != null && args.Changes != null &&
                !args.Changes.DataChanged &&
                args.PreviousItem != null &&
                Item.IsValid &&
                this.Item.Current.DefaultVersion.Uri == args.PreviousItem.DefaultVersion.Uri)
                return;

            // Same image, don't load it progressively
            if (args != null &&
                args.PreviousItem != null &&
                Item.IsValid &&
                Item.Current.DefaultVersion.Uri == args.PreviousItem.DefaultVersion.Uri)
                progressive_display = false;

            try {
                if (Item.IsValid)
                    Load (Item.Current.DefaultVersion.Uri);
                else
                    LoadErrorImage (null);
            } catch (System.Exception e) {
                Log.DebugException (e);
                LoadErrorImage (e);
            }

            Selection = Gdk.Rectangle.Zero;

            EventHandler eh = PhotoChanged;
            if (eh != null)
                eh (this, EventArgs.Empty);
        }
Пример #5
0
 void HandlePointerChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Position = ActiveItem;
 }
Пример #6
0
 void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     UpdateSample ();
 }
Пример #7
0
        void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
        {
            //back_button.Sensitive = (Item.Index > 0 && collection.Count > 0);
            //forward_button.Sensitive = (Item.Index < collection.Count - 1);

            if (item.IsValid) {
                IPhoto curr_item = item.Current;

                name_label.Text = System.Uri.UnescapeDataString(curr_item.Name);
                old_label.Text = (curr_item.Time).ToString ();

                int i = collection.Count > 0 ? item.Index + 1: 0;
                // Note for translators: This indicates the current photo is photo {0} of {1} out of photos
                count_label.Text = System.String.Format (Catalog.GetString ("{0} of {1}"), i, collection.Count);

                DateTime actual = curr_item.Time;
                date_edit.Time = actual;
                gnome_dateedit_sucks = date_edit.Time - actual;
            }
            HandleTimeChanged (this, System.EventArgs.Empty);

            photo_spin.Value = item.Index + 1;
        }