protected void HandleAddResponse(object sender, Gtk.ResponseArgs args) { if (args.ResponseId == Gtk.ResponseType.Ok) { GoogleAccount account = new GoogleAccount(username, password); GoogleAccountManager.GetInstance().AddAccount(account); } Dialog.Destroy(); }
protected void HandleEditResponse(object sender, Gtk.ResponseArgs args) { if (args.ResponseId == Gtk.ResponseType.Ok) { account.Username = username; account.Password = password; account.Token = token; account.UnlockCaptcha = captcha_entry.Text; GoogleAccountManager.GetInstance().MarkChanged(true, account); } else if (args.ResponseId == Gtk.ResponseType.Reject) { // NOTE we are using Reject to signal the remove action. GoogleAccountManager.GetInstance().RemoveAccount(account); } Dialog.Destroy(); }
public void Run(IBrowsableCollection selection) { this.items = selection.Items; album_button.Sensitive = false; IconView view = new IconView(selection); view.DisplayDates = false; view.DisplayTags = false; Dialog.Modal = false; Dialog.TransientFor = null; thumb_scrolledwindow.Add(view); view.Show(); Dialog.Show(); GoogleAccountManager manager = GoogleAccountManager.GetInstance(); manager.AccountListChanged += PopulateGoogleOptionMenu; PopulateGoogleOptionMenu(manager, null); if (edit_button != null) { edit_button.Clicked += HandleEditGallery; } Dialog.Response += HandleResponse; connect = true; HandleSizeActive(null, null); Connect(); scale_check.Toggled += HandleScaleCheckToggled; LoadPreference(Preferences.EXPORT_PICASAWEB_SCALE); LoadPreference(Preferences.EXPORT_PICASAWEB_SIZE); LoadPreference(Preferences.EXPORT_PICASAWEB_ROTATE); LoadPreference(Preferences.EXPORT_PICASAWEB_BROWSER); // LoadPreference (Preferences.EXPORT_PICASAWEB_META); }