Exemplo n.º 1
0
        private void HandleSelectionChanged()
        {
            int x, y, width, height;

            Gdk.Pixbuf tmp = null;

            image_view.GetSelection(out x, out y, out width, out height);
//			if (width > 0 && height > 0)
//				icon_view.Selection.Clear ();

            if (image_view.Pixbuf != null)
            {
                if (width > 0 && height > 0)
                {
                    tmp = new Gdk.Pixbuf(image_view.Pixbuf, x, y, width, height);

                    //FIXME
                    PreviewPixbuf = PixbufUtils.TagIconFromPixbuf(tmp);
                    PreviewPixbuf_WithoutProfile = PreviewPixbuf.Copy();
                    FSpot.ColorManagement.ApplyScreenProfile(PreviewPixbuf);

                    tmp.Dispose();
                }
                else
                {
                    //FIXME
                    PreviewPixbuf = PixbufUtils.TagIconFromPixbuf(image_view.Pixbuf);
                    PreviewPixbuf_WithoutProfile = PreviewPixbuf.Copy();
                    FSpot.ColorManagement.ApplyScreenProfile(PreviewPixbuf);
                }
            }
        }
Exemplo n.º 2
0
        private void HandleSelectionChanged()
        {
            int x, y, width, height;

            Gdk.Pixbuf tmp = null;

            image_view.GetSelection(out x, out y, out width, out height);
            if (width > 0 && height > 0)
            {
                icon_view.Selection.Clear();
            }

            if (image_view.Pixbuf != null)
            {
                if (width > 0 && height > 0)
                {
                    tmp = new Gdk.Pixbuf(image_view.Pixbuf, x, y, width, height);

                    preview_image.Pixbuf = PixbufUtils.TagIconFromPixbuf(tmp);

                    tmp.Dispose();
                }
                else
                {
                    preview_image.Pixbuf = PixbufUtils.TagIconFromPixbuf(image_view.Pixbuf);
                }
            }
        }