private void BuildWindow()
        {
            this.Resizable = false;

            BorderWidth       = 6;
            VBox.Spacing      = 12;
            ActionArea.Layout = Gtk.ButtonBoxStyle.End;

            HBox box = new HBox();

            box.BorderWidth = 6;
            box.Spacing     = 12;

            Image image = new Image(PodcastPixbufs.PodcastIcon48);

            image.Yalign = 0.0f;

            box.PackStart(image, false, true, 0);

            VBox content_box = new VBox();

            content_box.Spacing = 12;

            Label header = new Label();

            header.Markup = "<big><b>" + GLib.Markup.EscapeText(Catalog.GetString(
                                                                    "Subscribe to New Podcast Feed")) + "</b></big>";
            header.Justify = Justification.Left;
            header.SetAlignment(0.0f, 0.0f);

            Label message = new Label(Catalog.GetString(
                                          "Please enter the URL of the podcast you wish to subscribe to"));

            message.Wrap    = true;
            message.Justify = Justification.Left;
            message.SetAlignment(0.0f, 0.0f);

            Expander advanced_expander = new Expander("Advanced");

            VBox expander_children = new VBox();

            expander_children.BorderWidth = 6;
            expander_children.Spacing     = 6;

            Label sync_text = new Label(Catalog.GetString(
                                            "When new episodes are available:  "));

            sync_text.SetAlignment(0.0f, 0.0f);
            sync_text.Justify = Justification.Left;

            sync_combo = new SyncPreferenceComboBox();

            expander_children.PackStart(sync_text);
            expander_children.PackStart(sync_combo);

            advanced_expander.Add(expander_children);

            url_entry = new Entry();
            url_entry.ActivatesDefault = true;

            Table table = new Table(1, 2, false);

            table.RowSpacing    = 6;
            table.ColumnSpacing = 12;

            table.Attach(new Label(Catalog.GetString("URL:")), 0, 1, 0, 1,
                         AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);

            table.Attach(url_entry, 1, 2, 0, 1,
                         AttachOptions.Expand | AttachOptions.Fill,
                         AttachOptions.Shrink, 0, 0);

            table.Attach(advanced_expander, 0, 2, 1, 2,
                         AttachOptions.Expand | AttachOptions.Fill,
                         AttachOptions.Shrink, 0, 0);

            content_box.PackStart(header, false, true, 0);
            content_box.PackStart(message, false, true, 0);

            content_box.PackStart(table, false, true, 0);

            box.PackStart(content_box, false, true, 0);

            AddButton(Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, false);
            AddButton(Catalog.GetString("Subscribe"), ResponseType.Ok, true);

            box.ShowAll();
            VBox.Add(box);
        }
        private void BuildWindow()
        {
            this.Resizable = false;

            BorderWidth = 6;
            VBox.Spacing = 12;
            ActionArea.Layout = Gtk.ButtonBoxStyle.End;

            HBox box = new HBox();
            box.BorderWidth = 6;
            box.Spacing = 12;

            Image image = new Image (PodcastPixbufs.PodcastIcon48);
            image.Yalign = 0.0f;

            box.PackStart(image, false, true, 0);

            VBox content_box = new VBox();
            content_box.Spacing = 12;

            Label header = new Label();
            header.Markup = "<big><b>" + GLib.Markup.EscapeText (Catalog.GetString (
                                "Subscribe to New Podcast Feed")) + "</b></big>";
            header.Justify = Justification.Left;
            header.SetAlignment(0.0f, 0.0f);

            Label message = new Label (Catalog.GetString (
                                           "Please enter the URL of the podcast you wish to subscribe to"));
            message.Wrap = true;
            message.Justify = Justification.Left;
            message.SetAlignment (0.0f, 0.0f);

            Expander advanced_expander = new Expander ("Advanced");

            VBox expander_children = new VBox();
            expander_children.BorderWidth = 6;
            expander_children.Spacing = 6;

            Label sync_text = new Label (Catalog.GetString (
                                             "When new episodes are available:  "));
            sync_text.SetAlignment (0.0f, 0.0f);
            sync_text.Justify = Justification.Left;

            sync_combo = new SyncPreferenceComboBox ();

            expander_children.PackStart (sync_text);
            expander_children.PackStart (sync_combo);

            advanced_expander.Add (expander_children);

            url_entry = new Entry ();
            url_entry.ActivatesDefault = true;

            Table table = new Table (1, 2, false);
            table.RowSpacing = 6;
            table.ColumnSpacing = 12;

            table.Attach(new Label (Catalog.GetString ("URL:")), 0, 1, 0, 1,
                         AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);

            table.Attach (url_entry, 1, 2, 0, 1,
                          AttachOptions.Expand | AttachOptions.Fill,
                          AttachOptions.Shrink, 0, 0);

            table.Attach (advanced_expander, 0, 2, 1, 2,
                          AttachOptions.Expand | AttachOptions.Fill,
                          AttachOptions.Shrink, 0, 0);

            content_box.PackStart (header, false, true, 0);
            content_box.PackStart (message, false, true, 0);

            content_box.PackStart (table, false, true, 0);

            box.PackStart (content_box, false, true, 0);

            AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, false);
            AddButton (Catalog.GetString ("Subscribe"), ResponseType.Ok, true);

            box.ShowAll ();
            VBox.Add (box);
        }
        private void BuildWindow()
        {
            BorderWidth  = 6;
            VBox.Spacing = 12;
            HasSeparator = false;

            HBox box = new HBox();

            box.BorderWidth = 6;
            box.Spacing     = 12;

            // For later additions to the dialog.  (I.E. Feed art)
            HBox content_box = new HBox();

            content_box.Spacing = 12;

            Table table = new Table(2, 4, false);

            table.RowSpacing    = 6;
            table.ColumnSpacing = 12;

            Label description_label = new Label();

            description_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString("Description:")));
            description_label.SetAlignment(0f, 0f);
            description_label.Justify = Justification.Left;

            Label last_updated_label = new Label();

            last_updated_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString("Last Updated:")));
            last_updated_label.SetAlignment(0f, 0f);
            last_updated_label.Justify = Justification.Left;

            Label feed_url_label = new Label();

            feed_url_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString("URL:")));
            feed_url_label.SetAlignment(0f, 0f);
            feed_url_label.Justify = Justification.Left;

            Label new_episode_option_label = new Label();

            new_episode_option_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                                     "When feed is updated:")));
            new_episode_option_label.SetAlignment(0f, 0.5f);
            new_episode_option_label.Justify = Justification.Left;

            Label last_updated_text = new Label(feed.LastUpdated.ToString("f"));

            last_updated_text.Justify = Justification.Left;
            last_updated_text.SetAlignment(0f, 0f);

            Label feed_url_text = new Label(feed.Url.ToString());

            feed_url_text.Wrap       = false;
            feed_url_text.Selectable = true;
            feed_url_text.SetAlignment(0f, 0f);
            feed_url_text.Justify   = Justification.Left;
            feed_url_text.Ellipsize = Pango.EllipsizeMode.End;

            string description_string = (feed.Description == String.Empty ||
                                         feed.Description == null) ?
                                        Catalog.GetString("No description available") :
                                        feed.Description;

            if (!description_string.StartsWith("\""))
            {
                description_string = "\"" + description_string;
            }

            if (!description_string.EndsWith("\""))
            {
                description_string = description_string + "\"";
            }

            Label descrition_text = new Label(description_string);

            descrition_text.Justify = Justification.Left;
            descrition_text.SetAlignment(0f, 0f);
            descrition_text.Wrap       = true;
            descrition_text.Selectable = true;

            Viewport description_viewport = new Viewport();

            description_viewport.SetSizeRequest(-1, 150);
            description_viewport.ShadowType = ShadowType.None;

            ScrolledWindow description_scroller = new ScrolledWindow();

            description_scroller.HscrollbarPolicy = PolicyType.Never;
            description_scroller.VscrollbarPolicy = PolicyType.Automatic;

            description_viewport.Add(descrition_text);
            description_scroller.Add(description_viewport);

            new_episode_option_combo = new SyncPreferenceComboBox(feed.SyncPreference);

            table.Attach(
                feed_url_label, 0, 1, 0, 1,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(
                last_updated_label, 0, 1, 1, 2,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(
                new_episode_option_label, 0, 1, 2, 3,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(
                description_label, 0, 1, 3, 4,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(
                feed_url_text, 1, 2, 0, 1,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(
                last_updated_text, 1, 2, 1, 2,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(
                new_episode_option_combo, 1, 2, 2, 3,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
                );

            table.Attach(description_scroller, 1, 2, 3, 4,
                         AttachOptions.Expand | AttachOptions.Fill,
                         AttachOptions.Expand | AttachOptions.Fill, 0, 0
                         );

            content_box.PackStart(table, true, true, 0);
            box.PackStart(content_box, true, true, 0);

            Button cancel_button = new Button("gtk-cancel");

            cancel_button.CanDefault = true;
            cancel_button.Show();

            Button save_button = new Button("gtk-save");

            save_button.CanDefault = true;
            save_button.Show();

            AddActionWidget(cancel_button, ResponseType.Cancel);
            AddActionWidget(save_button, ResponseType.Ok);

            DefaultResponse   = Gtk.ResponseType.Cancel;
            ActionArea.Layout = Gtk.ButtonBoxStyle.End;

            box.ShowAll();
            VBox.Add(box);

            Response += OnResponse;
        }
        private void BuildWindow()
        {
            BorderWidth = 6;
            VBox.Spacing = 12;
            HasSeparator = false;

            HBox box = new HBox();
            box.BorderWidth = 6;
            box.Spacing = 12;

            // For later additions to the dialog.  (I.E. Feed art)
            HBox content_box = new HBox();
            content_box.Spacing = 12;

            Table table = new Table (2, 4, false);
            table.RowSpacing = 6;
            table.ColumnSpacing = 12;

            Label description_label = new Label ();
            description_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString ("Description:")));
            description_label.SetAlignment (0f, 0f);
            description_label.Justify = Justification.Left;

            Label last_updated_label = new Label ();
            last_updated_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString ("Last Updated:")));
            last_updated_label.SetAlignment (0f, 0f);
            last_updated_label.Justify = Justification.Left;

            Label feed_url_label = new Label ();
            feed_url_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString ("URL:")));
            feed_url_label.SetAlignment (0f, 0f);
            feed_url_label.Justify = Justification.Left;

            Label new_episode_option_label = new Label ();
            new_episode_option_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString (
                                                  "When feed is updated:")));
            new_episode_option_label.SetAlignment (0f, 0.5f);
            new_episode_option_label.Justify = Justification.Left;

            Label last_updated_text = new Label (feed.LastUpdated.ToString ("f"));
            last_updated_text.Justify = Justification.Left;
            last_updated_text.SetAlignment (0f, 0f);

            Label feed_url_text = new Label (feed.Url.ToString ());
            feed_url_text.Wrap = false;
            feed_url_text.Selectable = true;
            feed_url_text.SetAlignment (0f, 0f);
            feed_url_text.Justify = Justification.Left;
            feed_url_text.Ellipsize = Pango.EllipsizeMode.End;

            string description_string = (feed.Description == String.Empty ||
                                         feed.Description == null) ?
                                        Catalog.GetString ("No description available") :
                                        feed.Description;

            if (!description_string.StartsWith ("\""))
            {
                description_string =  "\""+description_string;
            }

            if (!description_string.EndsWith ("\""))
            {
                description_string = description_string+"\"";
            }

            Label descrition_text = new Label (description_string);
            descrition_text.Justify = Justification.Left;
            descrition_text.SetAlignment (0f, 0f);
            descrition_text.Wrap = true;
            descrition_text.Selectable = true;

            Viewport description_viewport = new Viewport();
            description_viewport.SetSizeRequest(-1, 150);
            description_viewport.ShadowType = ShadowType.None;

            ScrolledWindow description_scroller = new ScrolledWindow ();
            description_scroller.HscrollbarPolicy = PolicyType.Never;
            description_scroller.VscrollbarPolicy = PolicyType.Automatic;

            description_viewport.Add (descrition_text);
            description_scroller.Add (description_viewport);

            new_episode_option_combo = new SyncPreferenceComboBox (feed.SyncPreference);

            table.Attach (
                feed_url_label, 0, 1, 0, 1,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (
                last_updated_label, 0, 1, 1, 2,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (
                new_episode_option_label, 0, 1, 2, 3,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (
                description_label, 0, 1, 3, 4,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (
                feed_url_text, 1, 2, 0, 1,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (
                last_updated_text, 1, 2, 1, 2,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (
                new_episode_option_combo, 1, 2, 2, 3,
                AttachOptions.Fill, AttachOptions.Fill, 0, 0
            );

            table.Attach (description_scroller, 1, 2, 3, 4,
                          AttachOptions.Expand | AttachOptions.Fill,
                          AttachOptions.Expand | AttachOptions.Fill, 0, 0
                         );

            content_box.PackStart (table, true, true, 0);
            box.PackStart (content_box, true, true, 0);

            Button cancel_button = new Button("gtk-cancel");
            cancel_button.CanDefault = true;
            cancel_button.Show();

            Button save_button = new Button("gtk-save");
            save_button.CanDefault = true;
            save_button.Show();

            AddActionWidget (cancel_button, ResponseType.Cancel);
            AddActionWidget (save_button, ResponseType.Ok);

            DefaultResponse = Gtk.ResponseType.Cancel;
            ActionArea.Layout = Gtk.ButtonBoxStyle.End;

            box.ShowAll ();
            VBox.Add (box);

            Response += OnResponse;
        }