Esempio n. 1
0
 public void HandleUnmapped(object sender, EventArgs args)
 {
     if (fade_delay != null)
     {
         fade_delay.Stop();
     }
 }
        private void UpdateButtons()
        {
            left.Sensitive  = (scroll_offset < 0);
            right.Sensitive = (box_counts.Length * BoxWidth > background.Width - scroll_offset);

            if (!left.Sensitive && left_delay.IsPending)
            {
                left_delay.Stop();
            }

            if (!right.Sensitive && right_delay.IsPending)
            {
                right_delay.Stop();
            }
        }
Esempio n. 3
0
        public void Quit()
        {
            hide_cursor_delay.Stop();
            FSpot.Utils.ScreenSaver.UnInhibit();

            this.Destroy();
        }
Esempio n. 4
0
        public void HandleDestroyed(object sender, EventArgs arg)
        {
            Cancel();
#if USE_THREAD
            expose_timeout.Stop();
#endif
        }
            public virtual void EndDrag(double x, double y)
            {
                timer.Stop();

                Rectangle box    = Bounds();
                double    middle = box.X + (box.Width / 2.0);

                int position;

                DragOffset = 0;
                if (selector.BoxXHit(middle, out position))
                {
                    this.SetPosition(position);
                    State = StateType.Prelight;
                }
                else
                {
                    State = selector.State;
                }
                Dragging = false;
            }
    public void Cancel()
    {
        idle_start.Stop();
        step.Stop();
        if (importer != null)
        {
            importer.Cancel();
            importer = null;
        }

        if (collection == null || collection.Count == 0)
        {
            return;
        }

        Photo [] photos = new Photo [collection.Count];
        for (int i = 0; i < collection.Count; i++)
        {
            photos [i] = (Photo)collection [i];
        }

        store.Remove(photos);
    }
        public void Load(Uri uri)
        {
            this.uri = uri;

            delay.Stop();

            if (!done_reading)
            {
                Close();
            }

            done_reading  = false;
            area_prepared = false;
            damage        = Gdk.Rectangle.Zero;

            using (ImageFile img = ImageFile.Create(uri)) {
                orientation = Accelerometer.GetViewOrientation(img.Orientation);

                try {
                    PixbufOrientation thumb_orientation = Accelerometer.GetViewOrientation(PixbufOrientation.TopLeft);
                    thumb = new Gdk.Pixbuf(ThumbnailGenerator.ThumbnailPath(uri));
                    thumb = PixbufUtils.TransformOrientation(thumb, thumb_orientation);

                    if (FSpot.ColorManagement.IsEnabled && !thumb.HasAlpha)
                    {
                        if (img.GetProfile() == null)
                        {
                            FSpot.ColorManagement.PhotoImageView.Transform = FSpot.ColorManagement.StandartTransform();
                        }
                        else
                        {
                            FSpot.ColorManagement.PhotoImageView.Transform = FSpot.ColorManagement.CreateTransform(thumb, img.GetProfile());
                        }
                    }
                    else
                    {
                        FSpot.ColorManagement.PhotoImageView.Transform = null;
                    }
                } catch (System.Exception e) {
                    //FSpot.ThumbnailGenerator.Default.Request (uri.ToString (), 0, 256, 256);
                    if (!(e is GLib.GException))
                    {
                        System.Console.WriteLine(e.ToString());
                    }
                }

                System.IO.Stream nstream = img.PixbufStream();
                if (nstream == null)
                {
                    FileLoad(img);
                    return;
                }
                else
                {
                    stream = new StreamWrapper(nstream);
                }

                loader = new Gdk.PixbufLoader();
                loader.AreaPrepared += ap;
                loader.AreaUpdated  += au;
                loader.Closed       += ev;

                if (AreaPrepared != null && thumb != null)
                {
                    pixbuf = thumb;
                    AreaPrepared(this, new AreaPreparedArgs(true));
                }

                ThumbnailGenerator.Default.PushBlock();
                //AsyncIORead (null);
                if (nstream is IOChannel)
                {
                    ((IOChannel)nstream).DataReady += IOChannelRead;
                }
                else
                {
                    delay.Start();
                }
            }
        }
Esempio n. 8
0
 protected override void OnDestroyed()
 {
     hide.Stop();
     fade.Stop();
     base.OnDestroyed();
 }
Esempio n. 9
0
 public void Stop()
 {
     delay.Stop();
 }
Esempio n. 10
0
 private void HandleDestroyed(object sender, System.EventArgs args)
 {
     hide.Stop();
 }