mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Rename Picasa options to Google Photos to reset them
This commit is contained in:
parent
5e9c3c43b6
commit
c5810ca127
6 changed files with 2125 additions and 9613 deletions
|
@ -712,6 +712,9 @@ private void InitializeComponent()
|
|||
this.txtPhotobucketVerificationCode = new System.Windows.Forms.TextBox();
|
||||
this.lblPhotobucketAccountStatus = new System.Windows.Forms.Label();
|
||||
this.tpGooglePhotos = new System.Windows.Forms.TabPage();
|
||||
this.lblGooglePhotosCreateAlbumName = new System.Windows.Forms.Label();
|
||||
this.txtGooglePhotosCreateAlbumName = new System.Windows.Forms.TextBox();
|
||||
this.btnGooglePhotosCreateAlbum = new System.Windows.Forms.Button();
|
||||
this.cbGooglePhotosIsPublic = new System.Windows.Forms.CheckBox();
|
||||
this.txtPicasaAlbumID = new System.Windows.Forms.TextBox();
|
||||
this.lblPicasaAlbumID = new System.Windows.Forms.Label();
|
||||
|
@ -743,9 +746,6 @@ private void InitializeComponent()
|
|||
this.tsmiCustomUploaderExamples = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.tsmiCustomUploaderExportAll = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.actRapidShareAccountType = new ShareX.UploadersLib.AccountTypeControl();
|
||||
this.btnGooglePhotosCreateAlbum = new System.Windows.Forms.Button();
|
||||
this.txtGooglePhotosCreateAlbumName = new System.Windows.Forms.TextBox();
|
||||
this.lblGooglePhotosCreateAlbumName = new System.Windows.Forms.Label();
|
||||
this.tscCustomUploaderResponseText.ContentPanel.SuspendLayout();
|
||||
this.tscCustomUploaderResponseText.TopToolStripPanel.SuspendLayout();
|
||||
this.tscCustomUploaderResponseText.SuspendLayout();
|
||||
|
@ -5743,6 +5743,23 @@ private void InitializeComponent()
|
|||
resources.ApplyResources(this.tpGooglePhotos, "tpGooglePhotos");
|
||||
this.tpGooglePhotos.Name = "tpGooglePhotos";
|
||||
//
|
||||
// lblGooglePhotosCreateAlbumName
|
||||
//
|
||||
resources.ApplyResources(this.lblGooglePhotosCreateAlbumName, "lblGooglePhotosCreateAlbumName");
|
||||
this.lblGooglePhotosCreateAlbumName.Name = "lblGooglePhotosCreateAlbumName";
|
||||
//
|
||||
// txtGooglePhotosCreateAlbumName
|
||||
//
|
||||
resources.ApplyResources(this.txtGooglePhotosCreateAlbumName, "txtGooglePhotosCreateAlbumName");
|
||||
this.txtGooglePhotosCreateAlbumName.Name = "txtGooglePhotosCreateAlbumName";
|
||||
//
|
||||
// btnGooglePhotosCreateAlbum
|
||||
//
|
||||
resources.ApplyResources(this.btnGooglePhotosCreateAlbum, "btnGooglePhotosCreateAlbum");
|
||||
this.btnGooglePhotosCreateAlbum.Name = "btnGooglePhotosCreateAlbum";
|
||||
this.btnGooglePhotosCreateAlbum.UseVisualStyleBackColor = true;
|
||||
this.btnGooglePhotosCreateAlbum.Click += new System.EventHandler(this.btnGooglePhotosCreateAlbum_Click);
|
||||
//
|
||||
// cbGooglePhotosIsPublic
|
||||
//
|
||||
resources.ApplyResources(this.cbGooglePhotosIsPublic, "cbGooglePhotosIsPublic");
|
||||
|
@ -5960,23 +5977,6 @@ private void InitializeComponent()
|
|||
this.actRapidShareAccountType.Name = "actRapidShareAccountType";
|
||||
this.actRapidShareAccountType.SelectedAccountType = ShareX.UploadersLib.AccountType.Anonymous;
|
||||
//
|
||||
// btnGooglePhotosCreateAlbum
|
||||
//
|
||||
resources.ApplyResources(this.btnGooglePhotosCreateAlbum, "btnGooglePhotosCreateAlbum");
|
||||
this.btnGooglePhotosCreateAlbum.Name = "btnGooglePhotosCreateAlbum";
|
||||
this.btnGooglePhotosCreateAlbum.UseVisualStyleBackColor = true;
|
||||
this.btnGooglePhotosCreateAlbum.Click += new System.EventHandler(this.btnGooglePhotosCreateAlbum_Click);
|
||||
//
|
||||
// txtGooglePhotosCreateAlbumName
|
||||
//
|
||||
resources.ApplyResources(this.txtGooglePhotosCreateAlbumName, "txtGooglePhotosCreateAlbumName");
|
||||
this.txtGooglePhotosCreateAlbumName.Name = "txtGooglePhotosCreateAlbumName";
|
||||
//
|
||||
// lblGooglePhotosCreateAlbumName
|
||||
//
|
||||
resources.ApplyResources(this.lblGooglePhotosCreateAlbumName, "lblGooglePhotosCreateAlbumName");
|
||||
this.lblGooglePhotosCreateAlbumName.Name = "lblGooglePhotosCreateAlbumName";
|
||||
//
|
||||
// UploadersConfigForm
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
|
|
|
@ -292,13 +292,13 @@ private void LoadImageUploaderSettings()
|
|||
|
||||
#region Google Photos
|
||||
|
||||
if (OAuth2Info.CheckOAuth(Config.PicasaOAuth2Info))
|
||||
if (OAuth2Info.CheckOAuth(Config.GooglePhotosOAuth2Info))
|
||||
{
|
||||
oauth2Picasa.Status = OAuthLoginStatus.LoginSuccessful;
|
||||
btnPicasaRefreshAlbumList.Enabled = true;
|
||||
}
|
||||
|
||||
txtPicasaAlbumID.Text = Config.PicasaAlbumID;
|
||||
txtPicasaAlbumID.Text = Config.GooglePhotosAlbumID;
|
||||
cbGooglePhotosIsPublic.Checked = Config.GooglePhotosIsPublic;
|
||||
|
||||
#endregion Google Photos
|
||||
|
@ -1150,27 +1150,27 @@ private void btnPhotobucketRemoveAlbum_Click(object sender, EventArgs e)
|
|||
private void oauth2Picasa_OpenButtonClicked()
|
||||
{
|
||||
OAuth2Info oauth = new OAuth2Info(APIKeys.GoogleClientID, APIKeys.GoogleClientSecret);
|
||||
Config.PicasaOAuth2Info = OAuth2Open(new GooglePhotos(oauth));
|
||||
Config.GooglePhotosOAuth2Info = OAuth2Open(new GooglePhotos(oauth));
|
||||
}
|
||||
|
||||
private void oauth2Picasa_CompleteButtonClicked(string code)
|
||||
{
|
||||
btnPicasaRefreshAlbumList.Enabled = OAuth2Complete(new GooglePhotos(Config.PicasaOAuth2Info), code, oauth2Picasa);
|
||||
btnPicasaRefreshAlbumList.Enabled = OAuth2Complete(new GooglePhotos(Config.GooglePhotosOAuth2Info), code, oauth2Picasa);
|
||||
}
|
||||
|
||||
private void oauth2Picasa_ClearButtonClicked()
|
||||
{
|
||||
Config.PicasaOAuth2Info = null;
|
||||
Config.GooglePhotosOAuth2Info = null;
|
||||
}
|
||||
|
||||
private void oauth2Picasa_RefreshButtonClicked()
|
||||
{
|
||||
btnPicasaRefreshAlbumList.Enabled = OAuth2Refresh(new GooglePhotos(Config.PicasaOAuth2Info), oauth2Picasa);
|
||||
btnPicasaRefreshAlbumList.Enabled = OAuth2Refresh(new GooglePhotos(Config.GooglePhotosOAuth2Info), oauth2Picasa);
|
||||
}
|
||||
|
||||
private void txtPicasaAlbumID_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Config.PicasaAlbumID = txtPicasaAlbumID.Text;
|
||||
Config.GooglePhotosAlbumID = txtPicasaAlbumID.Text;
|
||||
}
|
||||
|
||||
private void btnPicasaRefreshAlbumList_Click(object sender, EventArgs e)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -221,9 +221,9 @@ public void GooglePhotosRefreshAlbumList()
|
|||
{
|
||||
lvPicasaAlbumList.Items.Clear();
|
||||
|
||||
if (OAuth2Info.CheckOAuth(Config.PicasaOAuth2Info))
|
||||
if (OAuth2Info.CheckOAuth(Config.GooglePhotosOAuth2Info))
|
||||
{
|
||||
List<GooglePhotosAlbumInfo> albums = new GooglePhotos(Config.PicasaOAuth2Info).GetAlbumList();
|
||||
List<GooglePhotosAlbumInfo> albums = new GooglePhotos(Config.GooglePhotosOAuth2Info).GetAlbumList();
|
||||
|
||||
if (albums != null && albums.Count > 0)
|
||||
{
|
||||
|
@ -246,9 +246,9 @@ public void GooglePhotosRefreshAlbumList()
|
|||
|
||||
public void GooglePhotosCreateAlbum(string albumName)
|
||||
{
|
||||
if (OAuth2Info.CheckOAuth(Config.PicasaOAuth2Info))
|
||||
if (OAuth2Info.CheckOAuth(Config.GooglePhotosOAuth2Info))
|
||||
{
|
||||
new GooglePhotos(Config.PicasaOAuth2Info).CreateAlbum(albumName);
|
||||
new GooglePhotos(Config.GooglePhotosOAuth2Info).CreateAlbum(albumName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,14 +41,14 @@ public class GooglePhotosImageUploaderService : ImageUploaderService
|
|||
|
||||
public override bool CheckConfig(UploadersConfig config)
|
||||
{
|
||||
return OAuth2Info.CheckOAuth(config.PicasaOAuth2Info);
|
||||
return OAuth2Info.CheckOAuth(config.GooglePhotosOAuth2Info);
|
||||
}
|
||||
|
||||
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
|
||||
{
|
||||
return new GooglePhotos(config.PicasaOAuth2Info)
|
||||
return new GooglePhotos(config.GooglePhotosOAuth2Info)
|
||||
{
|
||||
AlbumID = config.PicasaAlbumID,
|
||||
AlbumID = config.GooglePhotosAlbumID,
|
||||
IsPublic = config.GooglePhotosIsPublic
|
||||
};
|
||||
}
|
||||
|
|
|
@ -81,8 +81,8 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
|||
|
||||
#region Google Photos
|
||||
|
||||
public OAuth2Info PicasaOAuth2Info = null;
|
||||
public string PicasaAlbumID = "";
|
||||
public OAuth2Info GooglePhotosOAuth2Info = null;
|
||||
public string GooglePhotosAlbumID = "";
|
||||
public bool GooglePhotosIsPublic = false;
|
||||
|
||||
#endregion Google Photos
|
||||
|
|
Loading…
Reference in a new issue