Example #1
0
 protected void HandleAddResponse(object sender, Gtk.ResponseArgs args)
 {
     if (args.ResponseId == Gtk.ResponseType.Ok)
     {
         SmugMugAccount account = new SmugMugAccount(username, password);
         SmugMugAccountManager.GetInstance().AddAccount(account);
     }
     Dialog.Destroy();
 }
Example #2
0
 protected void HandleEditResponse(object sender, Gtk.ResponseArgs args)
 {
     if (args.ResponseId == Gtk.ResponseType.Ok)
     {
         account.Username = username;
         account.Password = password;
         SmugMugAccountManager.GetInstance().MarkChanged(true, account);
     }
     else if (args.ResponseId == Gtk.ResponseType.Reject)
     {
         // NOTE we are using Reject to signal the remove action.
         SmugMugAccountManager.GetInstance().RemoveAccount(account);
     }
     Dialog.Destroy();
 }
Example #3
0
        public void Run(IBrowsableCollection selection)
        {
            xml = new Glade.XML(null, "SmugMugExport.glade", dialog_name, "f-spot");
            xml.Autoconnect(this);

            this.items             = selection.Items;
            album_button.Sensitive = false;
            FSpot.Widgets.IconView view = new FSpot.Widgets.IconView(selection);
            view.DisplayDates = false;
            view.DisplayTags  = false;

            Dialog.Modal        = false;
            Dialog.TransientFor = null;
            Dialog.Close       += HandleCloseEvent;

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

            SmugMugAccountManager manager = SmugMugAccountManager.GetInstance();

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

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

            rh = new Gtk.ResponseHandler(HandleResponse);
            Dialog.Response += HandleResponse;
            connect          = true;
            HandleSizeActive(null, null);
            Connect();

            scale_check.Toggled += HandleScaleCheckToggled;

            LoadPreference(SCALE_KEY);
            LoadPreference(SIZE_KEY);
            LoadPreference(ROTATE_KEY);
            LoadPreference(BROWSER_KEY);
        }