Rename Picasa to Google Photos and use Google Photos icon

This commit is contained in:
Jaex 2017-09-05 22:43:36 +03:00
parent f5dfab8027
commit 0fd87b61e0
11 changed files with 1996 additions and 8392 deletions

View file

@ -41,7 +41,7 @@ public enum ImageDestination
Flickr,
[Description("Photobucket")]
Photobucket,
[Description("Google Photos (Picasa)")]
[Description("Google Photos")]
Picasa,
[Description("Twitter")]
Twitter,

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -619,7 +619,7 @@ private void InitializeComponent()
this.btnPhotobucketAuthComplete = new System.Windows.Forms.Button();
this.txtPhotobucketVerificationCode = new System.Windows.Forms.TextBox();
this.lblPhotobucketAccountStatus = new System.Windows.Forms.Label();
this.tpPicasa = new System.Windows.Forms.TabPage();
this.tpGooglePhotos = new System.Windows.Forms.TabPage();
this.txtPicasaAlbumID = new System.Windows.Forms.TextBox();
this.lblPicasaAlbumID = new System.Windows.Forms.Label();
this.lvPicasaAlbumList = new System.Windows.Forms.ListView();
@ -736,7 +736,7 @@ private void InitializeComponent()
this.gbPhotobucketAlbumPath.SuspendLayout();
this.gbPhotobucketAlbums.SuspendLayout();
this.gbPhotobucketUserAccount.SuspendLayout();
this.tpPicasa.SuspendLayout();
this.tpGooglePhotos.SuspendLayout();
this.tpChevereto.SuspendLayout();
this.tpVgyme.SuspendLayout();
this.tcUploaders.SuspendLayout();
@ -4652,7 +4652,7 @@ private void InitializeComponent()
this.tcImageUploaders.Controls.Add(this.tpTinyPic);
this.tcImageUploaders.Controls.Add(this.tpFlickr);
this.tcImageUploaders.Controls.Add(this.tpPhotobucket);
this.tcImageUploaders.Controls.Add(this.tpPicasa);
this.tcImageUploaders.Controls.Add(this.tpGooglePhotos);
this.tcImageUploaders.Controls.Add(this.tpChevereto);
this.tcImageUploaders.Controls.Add(this.tpVgyme);
resources.ApplyResources(this.tcImageUploaders, "tcImageUploaders");
@ -5079,16 +5079,16 @@ private void InitializeComponent()
resources.ApplyResources(this.lblPhotobucketAccountStatus, "lblPhotobucketAccountStatus");
this.lblPhotobucketAccountStatus.Name = "lblPhotobucketAccountStatus";
//
// tpPicasa
// tpGooglePhotos
//
this.tpPicasa.Controls.Add(this.txtPicasaAlbumID);
this.tpPicasa.Controls.Add(this.lblPicasaAlbumID);
this.tpPicasa.Controls.Add(this.lvPicasaAlbumList);
this.tpPicasa.Controls.Add(this.btnPicasaRefreshAlbumList);
this.tpPicasa.Controls.Add(this.oauth2Picasa);
resources.ApplyResources(this.tpPicasa, "tpPicasa");
this.tpPicasa.Name = "tpPicasa";
this.tpPicasa.UseVisualStyleBackColor = true;
this.tpGooglePhotos.Controls.Add(this.txtPicasaAlbumID);
this.tpGooglePhotos.Controls.Add(this.lblPicasaAlbumID);
this.tpGooglePhotos.Controls.Add(this.lvPicasaAlbumList);
this.tpGooglePhotos.Controls.Add(this.btnPicasaRefreshAlbumList);
this.tpGooglePhotos.Controls.Add(this.oauth2Picasa);
resources.ApplyResources(this.tpGooglePhotos, "tpGooglePhotos");
this.tpGooglePhotos.Name = "tpGooglePhotos";
this.tpGooglePhotos.UseVisualStyleBackColor = true;
//
// txtPicasaAlbumID
//
@ -5441,8 +5441,8 @@ private void InitializeComponent()
this.gbPhotobucketAlbums.PerformLayout();
this.gbPhotobucketUserAccount.ResumeLayout(false);
this.gbPhotobucketUserAccount.PerformLayout();
this.tpPicasa.ResumeLayout(false);
this.tpPicasa.PerformLayout();
this.tpGooglePhotos.ResumeLayout(false);
this.tpGooglePhotos.PerformLayout();
this.tpChevereto.ResumeLayout(false);
this.tpChevereto.PerformLayout();
this.tpVgyme.ResumeLayout(false);
@ -5900,7 +5900,7 @@ private void InitializeComponent()
internal System.Windows.Forms.TabPage tpTinyPic;
internal System.Windows.Forms.TabPage tpFlickr;
internal System.Windows.Forms.TabPage tpPhotobucket;
internal System.Windows.Forms.TabPage tpPicasa;
internal System.Windows.Forms.TabPage tpGooglePhotos;
internal System.Windows.Forms.TabPage tpChevereto;
internal System.Windows.Forms.TabPage tpVgyme;
internal System.Windows.Forms.TabPage tpPastebin;

View file

@ -1014,9 +1014,9 @@ private void lvPicasaAlbumList_SelectedIndexChanged(object sender, EventArgs e)
if (lvPicasaAlbumList.SelectedItems.Count > 0)
{
ListViewItem lvi = lvPicasaAlbumList.SelectedItems[0];
if (lvi.Tag is PicasaAlbumInfo)
if (lvi.Tag is GooglePhotosAlbumInfo)
{
PicasaAlbumInfo album = (PicasaAlbumInfo)lvi.Tag;
GooglePhotosAlbumInfo album = (GooglePhotosAlbumInfo)lvi.Tag;
txtPicasaAlbumID.Text = album.ID;
}
}

File diff suppressed because it is too large Load diff

View file

@ -324,7 +324,7 @@ public void PicasaAuthOpen()
{
OAuth2Info oauth = new OAuth2Info(APIKeys.GoogleClientID, APIKeys.GoogleClientSecret);
string url = new Picasa(oauth).GetAuthorizationURL();
string url = new GooglePhotos(oauth).GetAuthorizationURL();
if (!string.IsNullOrEmpty(url))
{
@ -407,11 +407,11 @@ public void PicasaRefreshAlbumList()
if (OAuth2Info.CheckOAuth(Config.PicasaOAuth2Info))
{
List<PicasaAlbumInfo> albums = new Picasa(Config.PicasaOAuth2Info).GetAlbumList();
List<GooglePhotosAlbumInfo> albums = new GooglePhotos(Config.PicasaOAuth2Info).GetAlbumList();
if (albums != null && albums.Count > 0)
{
foreach (PicasaAlbumInfo album in albums)
foreach (GooglePhotosAlbumInfo album in albums)
{
ListViewItem lvi = new ListViewItem(album.ID);
lvi.SubItems.Add(album.Name ?? "");

View file

@ -35,11 +35,11 @@ You should have received a copy of the GNU General Public License
namespace ShareX.UploadersLib.ImageUploaders
{
public class PicasaImageUploaderService : ImageUploaderService
public class GooglePhotosImageUploaderService : ImageUploaderService
{
public override ImageDestination EnumValue { get; } = ImageDestination.Picasa;
public override Icon ServiceIcon => Resources.Picasa;
public override Icon ServiceIcon => Resources.GooglePhotos;
public override bool CheckConfig(UploadersConfig config)
{
@ -48,16 +48,16 @@ public override bool CheckConfig(UploadersConfig config)
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{
return new Picasa(config.PicasaOAuth2Info)
return new GooglePhotos(config.PicasaOAuth2Info)
{
AlbumID = config.PicasaAlbumID
};
}
public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpPicasa;
public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpGooglePhotos;
}
public class Picasa : ImageUploader, IOAuth2
public class GooglePhotos : ImageUploader, IOAuth2
{
public OAuth2Info AuthInfo { get; set; }
public string AlbumID { get; set; }
@ -66,7 +66,7 @@ public class Picasa : ImageUploader, IOAuth2
private static readonly XNamespace MediaNS = "http://search.yahoo.com/mrss/";
private static readonly XNamespace GPhotoNS = "http://schemas.google.com/photos/2007";
public Picasa(OAuth2Info oauth)
public GooglePhotos(OAuth2Info oauth)
{
AuthInfo = oauth;
}
@ -160,11 +160,11 @@ public bool CheckAuthorization()
return true;
}
public List<PicasaAlbumInfo> GetAlbumList()
public List<GooglePhotosAlbumInfo> GetAlbumList()
{
if (!CheckAuthorization()) return null;
List<PicasaAlbumInfo> albumList = new List<PicasaAlbumInfo>();
List<GooglePhotosAlbumInfo> albumList = new List<GooglePhotosAlbumInfo>();
string response = SendRequest(HttpMethod.GET, "https://picasaweb.google.com/data/feed/api/user/default", headers: GetAuthHeaders());
@ -176,7 +176,7 @@ public List<PicasaAlbumInfo> GetAlbumList()
{
foreach (XElement entry in xd.Descendants(AtomNS + "entry"))
{
PicasaAlbumInfo album = new PicasaAlbumInfo();
GooglePhotosAlbumInfo album = new GooglePhotosAlbumInfo();
album.ID = entry.GetElementValue(GPhotoNS + "id");
album.Name = entry.GetElementValue(AtomNS + "title");
album.Summary = entry.GetElementValue(AtomNS + "summary");
@ -237,7 +237,7 @@ public override UploadResult Upload(Stream stream, string fileName)
}
}
public class PicasaAlbumInfo
public class GooglePhotosAlbumInfo
{
public string ID { get; set; }
public string Name { get; set; }

View file

@ -19,7 +19,7 @@ namespace ShareX.UploadersLib.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -275,6 +275,16 @@ internal static System.Drawing.Icon GoogleDrive {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon GooglePhotos {
get {
object obj = ResourceManager.GetObject("GooglePhotos", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -517,16 +527,6 @@ internal static System.Drawing.Icon Photobucket {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon Picasa {
get {
object obj = ResourceManager.GetObject("Picasa", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>

View file

@ -139,9 +139,6 @@
<data name="GitHub" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\GitHub.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Picasa" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Favicons\Picasa.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="UploadersConfigForm_LoadSettings_Parent_album_path_e_g_" xml:space="preserve">
<value>Parent album path e.g.</value>
</data>
@ -395,4 +392,7 @@ Created folders:</value>
<data name="UploadersConfigForm_CustomUploader_Name" xml:space="preserve">
<value>Name</value>
</data>
<data name="GooglePhotos" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\favicons\googlephotos.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -306,7 +306,7 @@
<Compile Include="Helpers\OAuth\OAuthInfo.cs" />
<Compile Include="ImageUploaders\CustomImageUploader.cs" />
<Compile Include="ImageUploaders\Imgur.cs" />
<Compile Include="ImageUploaders\Picasa.cs" />
<Compile Include="ImageUploaders\GooglePhotos.cs" />
<Compile Include="TextUploaders\CustomTextUploader.cs" />
<Compile Include="TextUploaders\GitHubGist.cs" />
<Compile Include="TextUploaders\Paste_ee.cs" />
@ -909,7 +909,6 @@
<None Include="Favicons\CoinURL.ico" />
<None Include="Favicons\Lambda.ico" />
<None Include="Favicons\Mega.ico" />
<None Include="Favicons\Picasa.ico" />
<None Include="Favicons\OneTimeSecret.ico" />
<None Include="Favicons\Polr.ico" />
<None Include="packages.config" />
@ -961,6 +960,7 @@
<Content Include="Favicons\AzureStorage.png" />
<None Include="Favicons\Plik.ico" />
<Content Include="Favicons\Gfycat.png" />
<Content Include="Favicons\GooglePhotos.ico" />
<Content Include="Favicons\Uplea.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />