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 ();
        }