Пример #1
0
 void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     if (scroll.ControlBox.Visible)
     {
         scroll.ShowControls();
     }
 }
Пример #2
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 = 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 = 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, EventArgs.Empty);

            photo_spin.Value = item.Index + 1;
        }
Пример #3
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);
            }
        }
Пример #4
0
        void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs old)
        {
            if (!(sender is BrowsablePointer pointer))
            {
                return;
            }

            directory_view.FocusCell = pointer.Index;
            directory_view.Selection.Clear();
            if (collection.Count > 0)
            {
                directory_view.Selection.Add(directory_view.FocusCell);
                directory_view.ScrollTo(directory_view.FocusCell);
            }
        }
Пример #5
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)
            {
                var curr_item = item.Current;

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

                int photo = collection.Count > 0 ? item.Index + 1 : 0;
                count_label.Text = Strings.PhotoOutOfPhotos(photo, collection.Count);

                var actual = curr_item.Time;
                //date_edit.Time = actual;
                //gnome_dateedit_sucks = date_edit.Time - actual;
            }

            HandleTimeChanged(this, EventArgs.Empty);

            photo_spin.Value = item.Index + 1;
        }
 protected override void ItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Sensitive = item.Index < item.Collection.Count -1;
 }
Пример #7
0
        private void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs old)
        {
            BrowsablePointer pointer = sender as BrowsablePointer;
            if (pointer == null)
                return;

            directory_view.FocusCell = pointer.Index;
            directory_view.Selection.Clear ();
            if (collection.Count > 0) {
                directory_view.Selection.Add (directory_view.FocusCell);
                directory_view.ScrollTo (directory_view.FocusCell);
            }
        }
Пример #8
0
 private void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Photo = item.Current;
 }
Пример #9
0
 void HandlePointerChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Position = ActiveItem;
 }
Пример #10
0
 private void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     UpdateSample ();
 }
Пример #11
0
 void HandlePointerChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Position = ActiveItem;
 }
Пример #12
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.DefaultVersionUri == args.PreviousItem.DefaultVersionUri))
                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.DefaultVersionUri == args.PreviousItem.DefaultVersionUri)
                return;

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

            try {
                if (Item.IsValid)
                    Load (Item.Current.DefaultVersionUri);
                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);
        }
Пример #13
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) {
                IBrowsableItem item = Item.Current;

                name_label.Text = System.Uri.UnescapeDataString(item.Name);
                old_label.Text = (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 = item.Time;
                date_edit.Time = actual;
                gnome_dateedit_sucks = date_edit.Time - actual;
            }
            HandleTimeChanged (this, System.EventArgs.Empty);

            if (!tray.Selection.Contains (Item.Index)) {
                tray.Selection.Clear ();
                tray.Selection.Add (Item.Index);
            }

            photo_spin.Value = Item.Index + 1;
        }
        protected virtual void ItemChanged(object sender,
						    BrowsablePointerChangedEventArgs args)
        {
            Sensitive = item.IsValid;
        }
Пример #15
0
 void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Photo = item.Current;
 }
Пример #16
0
 protected virtual void ItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Sensitive = item.IsValid;
 }
Пример #17
0
 protected override void ItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Sensitive = item.Index > 0;
 }
Пример #18
0
 protected override void ItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Sensitive = item.Index < item.Collection.Count - 1;
 }
 private void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     if (scroll.ControlBox.Visible)
         scroll.ShowControls ();
 }
Пример #20
0
 void HandleItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     UpdateSample();
 }
 protected override void ItemChanged(object sender, BrowsablePointerChangedEventArgs args)
 {
     Sensitive =  item.Index > 0;
 }