Beispiel #1
0
        public AccountDialog(Gtk.Window parent, GalleryAccount account, bool show_error)
        {
            var builder = new GtkBeans.Builder (null, "gallery_add_dialog.ui", null);
            builder.Autoconnect (this);
            add_dialog = new Gtk.Dialog (builder.GetRawObject ("gallery_add_dialog"));
            add_dialog.Modal = false;
            add_dialog.TransientFor = parent;
            add_dialog.DefaultResponse = Gtk.ResponseType.Ok;

            this.account = account;

            status_area.Visible = show_error;

            if (account != null) {
                gallery_entry.Text = account.Name;
                url_entry.Text = account.Url;
                password_entry.Text = account.Password;
                username_entry.Text = account.Username;
                add_button.Label = Gtk.Stock.Ok;
                add_dialog.Response += HandleEditResponse;
            }

            if (remove_button != null)
                remove_button.Visible = account != null;

            add_dialog.Show ();

            gallery_entry.Changed += HandleChanged;
            url_entry.Changed += HandleChanged;
            password_entry.Changed += HandleChanged;
            username_entry.Changed += HandleChanged;
            HandleChanged (null, null);
        }
Beispiel #2
0
 public override Widget ConfigurationWidget()
 {
     builder = new GtkBeans.Builder(null, "color_editor_prefs_window.ui", null);
     builder.Autoconnect(this);
     AttachInterface();
     return(new VBox(builder.GetRawObject("color_editor_prefs")));
 }
Beispiel #3
0
        public void Run(IBrowsableCollection selection)
        {
            var builder = new GtkBeans.Builder(null, "gallery_export_dialog.ui", null);

            builder.Autoconnect(this);
            export_dialog = new Gtk.Dialog(builder.GetRawObject("gallery_export_dialog"));

            album_optionmenu = new Gtk.ComboBox();
            (album_button.Parent as Gtk.HBox).PackStart(album_optionmenu);
            (album_button.Parent as Gtk.HBox).ReorderChild(album_optionmenu, 1);
            album_optionmenu.Show();

            gallery_optionmenu = new Gtk.ComboBox();
            (edit_button.Parent as Gtk.HBox).PackStart(gallery_optionmenu);
            (edit_button.Parent as Gtk.HBox).ReorderChild(gallery_optionmenu, 1);
            gallery_optionmenu.Show();

            this.items = selection.Items.ToArray();
            Array.Sort <IPhoto> (this.items, new IPhotoComparer.CompareDateName());
            album_button.Sensitive = false;
            var view = new TrayView(selection);

            view.DisplayDates = false;
            view.DisplayTags  = false;

            export_dialog.Modal        = false;
            export_dialog.TransientFor = null;

            thumb_scrolledwindow.Add(view);
            view.Show();
            export_dialog.Show();

            GalleryAccountManager manager = GalleryAccountManager.GetInstance();

            manager.AccountListChanged += PopulateGalleryOptionMenu;
            PopulateGalleryOptionMenu(manager, null);

            if (edit_button != null)
            {
                edit_button.Clicked += HandleEditGallery;
            }

            export_dialog.Response += HandleResponse;
            connect = true;
            HandleSizeActive(null, null);
            Connect();

            LoadPreference(SCALE_KEY);
            LoadPreference(SIZE_KEY);
            LoadPreference(BROWSER_KEY);
            LoadPreference(META_KEY);
        }
Beispiel #4
0
        public GalleryAddAlbum(GalleryExport export, Gallery gallery)
        {
            var builder = new GtkBeans.Builder (null, "gallery_add_album_dialog.ui", null);
            builder.Autoconnect (this);
            add_album_dialog = new Gtk.Dialog (builder.GetRawObject ("gallery_add_album_dialog"));
            add_album_dialog.Modal = true;

            album_optionmenu = new Gtk.ComboBox ();
            (name_entry.Parent as Gtk.Table).Attach (album_optionmenu, 1, 2, 1, 2);
            album_optionmenu.Show ();

            this.export = export;
            this.gallery = gallery;
            PopulateAlbums ();

            add_album_dialog.Response += HandleAddResponse;

            name_entry.Changed += HandleChanged;
            description_entry.Changed += HandleChanged;
            title_entry.Changed += HandleChanged;
            HandleChanged (null, null);
        }
Beispiel #5
0
        public GalleryAddAlbum(GalleryExport export, Gallery gallery)
        {
            var builder = new GtkBeans.Builder(null, "gallery_add_album_dialog.ui", null);

            builder.Autoconnect(this);
            add_album_dialog       = new Gtk.Dialog(builder.GetRawObject("gallery_add_album_dialog"));
            add_album_dialog.Modal = true;

            album_optionmenu = new Gtk.ComboBox();
            (name_entry.Parent as Gtk.Table).Attach(album_optionmenu, 1, 2, 1, 2);
            album_optionmenu.Show();

            this.export  = export;
            this.gallery = gallery;
            PopulateAlbums();

            add_album_dialog.Response += HandleAddResponse;

            name_entry.Changed        += HandleChanged;
            description_entry.Changed += HandleChanged;
            title_entry.Changed       += HandleChanged;
            HandleChanged(null, null);
        }
Beispiel #6
0
        public AccountDialog(Gtk.Window parent, GalleryAccount account, bool show_error)
        {
            var builder = new GtkBeans.Builder(null, "gallery_add_dialog.ui", null);

            builder.Autoconnect(this);
            add_dialog                 = new Gtk.Dialog(builder.GetRawObject("gallery_add_dialog"));
            add_dialog.Modal           = false;
            add_dialog.TransientFor    = parent;
            add_dialog.DefaultResponse = Gtk.ResponseType.Ok;

            this.account = account;

            status_area.Visible = show_error;

            if (account != null)
            {
                gallery_entry.Text   = account.Name;
                url_entry.Text       = account.Url;
                password_entry.Text  = account.Password;
                username_entry.Text  = account.Username;
                add_button.Label     = Gtk.Stock.Ok;
                add_dialog.Response += HandleEditResponse;
            }

            if (remove_button != null)
            {
                remove_button.Visible = account != null;
            }

            add_dialog.Show();

            gallery_entry.Changed  += HandleChanged;
            url_entry.Changed      += HandleChanged;
            password_entry.Changed += HandleChanged;
            username_entry.Changed += HandleChanged;
            HandleChanged(null, null);
        }
Beispiel #7
0
        public void Run(IBrowsableCollection selection)
        {
            var builder = new GtkBeans.Builder (null, "gallery_export_dialog.ui", null);
            builder.Autoconnect (this);
            export_dialog = new Gtk.Dialog (builder.GetRawObject ("gallery_export_dialog"));

            album_optionmenu = new Gtk.ComboBox ();
            (album_button.Parent as Gtk.HBox).PackStart (album_optionmenu);
            (album_button.Parent as Gtk.HBox).ReorderChild (album_optionmenu, 1);
            album_optionmenu.Show ();

            gallery_optionmenu = new Gtk.ComboBox ();
            (edit_button.Parent as Gtk.HBox).PackStart (gallery_optionmenu);
            (edit_button.Parent as Gtk.HBox).ReorderChild (gallery_optionmenu, 1);
            gallery_optionmenu.Show ();

            this.items = selection.Items;
            Array.Sort<IPhoto> (this.items, new IPhotoComparer.CompareDateName ());
            album_button.Sensitive = false;
            var view = new TrayView (selection);
            view.DisplayDates = false;
            view.DisplayTags = false;

            export_dialog.Modal = false;
            export_dialog.TransientFor = null;

            thumb_scrolledwindow.Add (view);
            view.Show ();
            export_dialog.Show ();

            GalleryAccountManager manager = GalleryAccountManager.GetInstance ();
            manager.AccountListChanged += PopulateGalleryOptionMenu;
            PopulateGalleryOptionMenu (manager, null);

            if (edit_button != null)
                edit_button.Clicked += HandleEditGallery;

            export_dialog.Response += HandleResponse;
            connect = true;
            HandleSizeActive (null, null);
            Connect ();

            LoadPreference (SCALE_KEY);
            LoadPreference (SIZE_KEY);
            LoadPreference (BROWSER_KEY);
            LoadPreference (META_KEY);
        }
 public BuilderDialog(GtkBeans.Builder builder, string dialogName) : base(builder.GetRawObject(dialogName))
 {
     builder.Autoconnect(this);
     IconName = "gbrainy";
 }
Beispiel #9
0
 public override Widget ConfigurationWidget()
 {
     builder = new GtkBeans.Builder (null, "color_editor_prefs_window.ui", null);
     builder.Autoconnect (this);
     AttachInterface ();
     return new VBox (builder.GetRawObject ("color_editor_prefs"));
 }