internal TabbloExportView(IBrowsableCollection photos)
            : base(Assembly.GetExecutingAssembly(),
                   "TabbloExport.ui", DialogName)
        {
            // Thumbnails
            var icon_view = new TrayView(photos);

            icon_view.DisplayDates = false;
            icon_view.DisplayTags  = false;

            thumb_scrolled_window.Add(icon_view);
            icon_view.Show();

            // Tags
            attached_tags_view = new FSpot.Widgets.TagView();
            attached_tags_alignment.Add(attached_tags_view);
            attached_tags_view.Show();

            removed_tags_view = new FSpot.Widgets.TagView();
            removed_tags_alignment.Add(removed_tags_view);
            removed_tags_view.Show();
        }
Beispiel #2
0
        private void SetupWidgets()
        {
            histogram_expander            = new Expander(Catalog.GetString("Histogram"));
            histogram_expander.Activated += delegate(object sender, EventArgs e) {
                ContextSwitchStrategy.SetHistogramVisible(Context, histogram_expander.Expanded);
                UpdateHistogram();
            };
            histogram_image = new Gtk.Image();
            histogram       = new Histogram();
            histogram_expander.Add(histogram_image);

            Window window = MainWindow.Toplevel.Window;

            Gdk.Color c = window.Style.Backgrounds [(int)Gtk.StateType.Active];
            histogram.RedColorHint        = (byte)(c.Red / 0xff);
            histogram.GreenColorHint      = (byte)(c.Green / 0xff);
            histogram.BlueColorHint       = (byte)(c.Blue / 0xff);
            histogram.BackgroundColorHint = 0xff;

            Add(histogram_expander);

            info_expander            = new Expander(Catalog.GetString("Image Information"));
            info_expander.Activated += delegate(object sender, EventArgs e) {
                ContextSwitchStrategy.SetInfoBoxVisible(Context, info_expander.Expanded);
            };

            Table info_table = new Table(7, 2, false);

            info_table.BorderWidth = 0;

            string name_pre  = "<b>";
            string name_post = "</b>";

            name_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Name") + name_post);
            info_table.Attach(name_label, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            version_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Version") + name_post);
            info_table.Attach(version_label, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            date_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Date") + name_post + Environment.NewLine);
            info_table.Attach(date_label, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            size_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Size") + name_post);
            info_table.Attach(size_label, 0, 1, 3, 4, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            default_exposure_string = name_pre + Catalog.GetString("Exposure") + name_post;
            exposure_label          = CreateRightAlignedLabel(default_exposure_string);
            info_table.Attach(exposure_label, 0, 1, 4, 5, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            rating_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Rating") + name_post);
            info_table.Attach(rating_label, 0, 1, 5, 6, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
            rating_label.Visible = false;

            name_value_label            = new Label();
            name_value_label.Ellipsize  = Pango.EllipsizeMode.Middle;
            name_value_label.Justify    = Gtk.Justification.Left;
            name_value_label.Selectable = true;
            name_value_label.Xalign     = 0;
            info_table.Attach(name_value_label, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill, 3, 0);

            date_value_label     = AttachLabel(info_table, 2, name_value_label);
            size_value_label     = AttachLabel(info_table, 3, name_value_label);
            exposure_value_label = AttachLabel(info_table, 4, name_value_label);

            version_option_menu = new OptionMenu();
            info_table.Attach(version_option_menu, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            date_value_label.Text     = Environment.NewLine;
            exposure_value_label.Text = Environment.NewLine;

            Gtk.Alignment rating_align = new Gtk.Alignment(0, 0, 0, 0);
            info_table.Attach(rating_align, 1, 2, 5, 6, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            rating_view          = new RatingSmall();
            rating_view.Visible  = false;
            rating_view.Changed += HandleRatingChanged;
            rating_align.Add(rating_view);

            tag_view = new TagView(MainWindow.ToolTips);
            info_table.Attach(tag_view, 0, 2, 6, 7, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
            tag_view.Show();

            info_table.ShowAll();

            info_expander.Add(info_table);
            Add(info_expander);
            rating_label.Visible = show_rating;
            rating_view.Visible  = show_rating;
        }
        internal TabbloExportView(IBrowsableCollection photos)
            : base(Assembly.GetExecutingAssembly (),
					"TabbloExport.ui", DialogName)
        {
            // Thumbnails
            var icon_view = new TrayView (photos);
            icon_view.DisplayDates = false;
            icon_view.DisplayTags = false;

            thumb_scrolled_window.Add (icon_view);
            icon_view.Show ();

            // Tags
            attached_tags_view = new FSpot.Widgets.TagView ();
            attached_tags_alignment.Add (attached_tags_view);
            attached_tags_view.Show ();

            removed_tags_view = new FSpot.Widgets.TagView ();
            removed_tags_alignment.Add (removed_tags_view);
            removed_tags_view.Show ();
        }
		public PhotoView (IBrowsableCollection query)
			: base ()
		{
			this.query = query;
	
			commit_delay = new FSpot.Delay (1000, new GLib.IdleHandler (CommitPendingChanges));
			this.Destroyed += HandleDestroy;
	
			Name = "ImageContainer";
			Box vbox = new VBox (false, 6);
			Add (vbox);
	
		        background = new EventBox ();
			Frame frame = new Frame ();
			background.Add (frame);
	
			frame.ShadowType = ShadowType.In;
			vbox.PackStart (background, true, true, 0);
			
			Box inner_vbox = new VBox (false , 2);
	
			frame.Add (inner_vbox);
			
			BrowsablePointer bp = new BrowsablePointer (query, -1);
			photo_view = new FSpot.PhotoImageView (bp);
	
			filmstrip = new Filmstrip (bp);
			Gdk.Pixbuf bg = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, true, 8, 1, 69);
			bg.Fill (0x00000000);
			filmstrip.BackgroundTile = bg;
			filmstrip.ThumbOffset = 1;
			filmstrip.Spacing = 4;
			inner_vbox.PackStart (filmstrip, false, false, 0);
	
			photo_view.PhotoChanged += HandlePhotoChanged;
	
			photo_view_scrolled = new ScrolledWindow (null, null);

			photo_view_scrolled.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
			photo_view_scrolled.ShadowType = ShadowType.None;
			photo_view_scrolled.Add (photo_view);
			photo_view_scrolled.Child.ButtonPressEvent += HandleButtonPressEvent;
			photo_view.AddEvents ((int) EventMask.KeyPressMask);
			inner_vbox.PackStart (photo_view_scrolled, true, true, 0);
			
			HBox inner_hbox = new HBox (false, 2);
			//inner_hbox.BorderWidth = 6;
	
			tag_view = new Widgets.TagView (MainWindow.ToolTips);
			inner_hbox.PackStart (tag_view, false, true, 0);
	
			Label comment = new Label (Catalog.GetString ("Comment:"));
			inner_hbox.PackStart (comment, false, false, 0);
			description_entry = new Entry ();
			inner_hbox.PackStart (description_entry, true, true, 0);
			description_entry.Changed += HandleDescriptionChanged;
	
			rating = new Widgets.Rating();
			inner_hbox.PackStart (rating, false, false, 0);
			rating.Changed += HandleRatingChanged;
	
			SetColors ();
			
			inner_vbox.PackStart (inner_hbox, false, true, 0);
	
			vbox.ShowAll ();
	
			Realized += delegate (object o, EventArgs e) {SetColors ();};
		}
Beispiel #5
0
        public PhotoView(IBrowsableCollection query)
        {
            Query = query;

            commit_delay = new DelayedOperation (1000, new GLib.IdleHandler (CommitPendingChanges));
            Destroyed += HandleDestroy;

            Name = "ImageContainer";
            Box vbox = new VBox (false, 6);
            Add (vbox);

                background = new EventBox ();
            Frame frame = new Frame ();
            background.Add (frame);

            frame.ShadowType = ShadowType.In;
            vbox.PackStart (background, true, true, 0);

            inner_vbox = new VBox (false , 2);
            inner_hbox = new HBox (false , 2);

            frame.Add (inner_hbox);

            BrowsablePointer bp = new BrowsablePointer (query, -1);
            View = new PhotoImageView (bp);

            filmstrip = new Filmstrip (bp);
            filmstrip.ThumbOffset = 1;
            filmstrip.Spacing = 4;
            filmstrip.ThumbSize = 75;
            PlaceFilmstrip ((Orientation) Preferences.Get <int> (Preferences.FILMSTRIP_ORIENTATION), true);

            View.PhotoChanged += HandlePhotoChanged;

            photo_view_scrolled = new ScrolledWindow (null, null);

            photo_view_scrolled.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
            photo_view_scrolled.ShadowType = ShadowType.None;
            photo_view_scrolled.Add (View);
            photo_view_scrolled.Child.ButtonPressEvent += HandleButtonPressEvent;
            View.AddEvents ((int) EventMask.KeyPressMask);
            inner_vbox.PackStart (photo_view_scrolled, true, true, 0);
            inner_hbox.PackStart (inner_vbox, true, true, 0);

            HBox lower_hbox = new HBox (false, 2);
            //inner_hbox.BorderWidth = 6;

            tag_view = new Widgets.TagView ();
            lower_hbox.PackStart (tag_view, false, true, 0);

            Label comment = new Label (Catalog.GetString ("Description:"));
            lower_hbox.PackStart (comment, false, false, 0);
            description_entry = new Entry ();
            lower_hbox.PackStart (description_entry, true, true, 0);
            description_entry.Changed += HandleDescriptionChanged;

            rating = new RatingEntry {
                HasFrame = false,
                AlwaysShowEmptyStars = true
            };
            lower_hbox.PackStart (rating, false, false, 0);
            rating.Changed += HandleRatingChanged;

            SetColors ();

            inner_vbox.PackStart (lower_hbox, false, true, 0);

            vbox.ShowAll ();

            Realized += (o, e) => SetColors();
            Preferences.SettingChanged += OnPreferencesChanged;
        }
        public PhotoView(IBrowsableCollection query)
            : base()
        {
            this.query = query;

            commit_delay    = new FSpot.Delay(1000, new GLib.IdleHandler(CommitPendingChanges));
            this.Destroyed += HandleDestroy;

            Name = "ImageContainer";
            Box vbox = new VBox(false, 6);

            Add(vbox);

            background = new EventBox();
            Frame frame = new Frame();

            background.Add(frame);

            frame.ShadowType = ShadowType.In;
            vbox.PackStart(background, true, true, 0);

            Box inner_vbox = new VBox(false, 2);

            frame.Add(inner_vbox);

            BrowsablePointer bp = new BrowsablePointer(query, -1);

            photo_view = new FSpot.PhotoImageView(bp);

            filmstrip = new Filmstrip(bp);
            Gdk.Pixbuf bg = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, true, 8, 1, 69);
            bg.Fill(0x00000000);
            filmstrip.BackgroundTile = bg;
            filmstrip.ThumbOffset    = 1;
            filmstrip.Spacing        = 4;
            inner_vbox.PackStart(filmstrip, false, false, 0);

            photo_view.PhotoChanged += HandlePhotoChanged;

            photo_view_scrolled = new ScrolledWindow(null, null);

            photo_view_scrolled.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            photo_view_scrolled.ShadowType = ShadowType.None;
            photo_view_scrolled.Add(photo_view);
            photo_view_scrolled.Child.ButtonPressEvent += HandleButtonPressEvent;
            photo_view.AddEvents((int)EventMask.KeyPressMask);
            inner_vbox.PackStart(photo_view_scrolled, true, true, 0);

            HBox inner_hbox = new HBox(false, 2);

            //inner_hbox.BorderWidth = 6;

            tag_view = new Widgets.TagView(MainWindow.ToolTips);
            inner_hbox.PackStart(tag_view, false, true, 0);

            Label comment = new Label(Catalog.GetString("Comment:"));

            inner_hbox.PackStart(comment, false, false, 0);
            description_entry = new Entry();
            inner_hbox.PackStart(description_entry, true, true, 0);
            description_entry.Changed += HandleDescriptionChanged;

            rating = new Widgets.Rating();
            inner_hbox.PackStart(rating, false, false, 0);
            rating.Changed += HandleRatingChanged;

            SetColors();

            inner_vbox.PackStart(inner_hbox, false, true, 0);

            vbox.ShowAll();

            Realized += delegate(object o, EventArgs e) { SetColors(); };
        }
Beispiel #7
0
        public PhotoView(IBrowsableCollection query)
            : base()
        {
            Query = query;

            commit_delay    = new DelayedOperation(1000, new GLib.IdleHandler(CommitPendingChanges));
            this.Destroyed += HandleDestroy;

            Name = "ImageContainer";
            Box vbox = new VBox(false, 6);

            Add(vbox);

            background = new EventBox();
            Frame frame = new Frame();

            background.Add(frame);

            frame.ShadowType = ShadowType.In;
            vbox.PackStart(background, true, true, 0);

            inner_vbox = new VBox(false, 2);
            inner_hbox = new HBox(false, 2);

            frame.Add(inner_hbox);

            BrowsablePointer bp = new BrowsablePointer(query, -1);

            View = new PhotoImageView(bp);

            filmstrip             = new Filmstrip(bp);
            filmstrip.ThumbOffset = 1;
            filmstrip.Spacing     = 4;
            filmstrip.ThumbSize   = 75;
            PlaceFilmstrip((Orientation)Preferences.Get <int> (Preferences.FILMSTRIP_ORIENTATION), true);

            View.PhotoChanged += HandlePhotoChanged;

            photo_view_scrolled = new ScrolledWindow(null, null);

            photo_view_scrolled.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            photo_view_scrolled.ShadowType = ShadowType.None;
            photo_view_scrolled.Add(View);
            photo_view_scrolled.Child.ButtonPressEvent += HandleButtonPressEvent;
            View.AddEvents((int)EventMask.KeyPressMask);
            inner_vbox.PackStart(photo_view_scrolled, true, true, 0);
            inner_hbox.PackStart(inner_vbox, true, true, 0);

            HBox lower_hbox = new HBox(false, 2);

            //inner_hbox.BorderWidth = 6;

            tag_view = new Widgets.TagView();
            lower_hbox.PackStart(tag_view, false, true, 0);

            Label comment = new Label(Catalog.GetString("Description:"));

            lower_hbox.PackStart(comment, false, false, 0);
            description_entry = new Entry();
            lower_hbox.PackStart(description_entry, true, true, 0);
            description_entry.Changed += HandleDescriptionChanged;

            rating = new RatingEntry()
            {
                HasFrame             = false,
                AlwaysShowEmptyStars = true
            };
            lower_hbox.PackStart(rating, false, false, 0);
            rating.Changed += HandleRatingChanged;

            SetColors();

            inner_vbox.PackStart(lower_hbox, false, true, 0);

            vbox.ShowAll();

            Realized += (o, e) => SetColors();
            Preferences.SettingChanged += OnPreferencesChanged;
        }