windows statusicon: new icons
|
@ -109,7 +109,7 @@ namespace SparkleShare {
|
|||
Sensitive = false
|
||||
};
|
||||
|
||||
continue_button.Clicked += delegate (object o, EventArgs args) {
|
||||
continue_button.Clicked += delegate {
|
||||
Controller.SetupPageCompleted (name_entry.Text, email_entry.Text);
|
||||
};
|
||||
|
||||
|
|
|
@ -153,8 +153,6 @@ namespace SparkleShare {
|
|||
UpdateMenuEvent (CurrentState);
|
||||
};
|
||||
|
||||
int periods = 3;
|
||||
|
||||
Program.Controller.OnSyncing += delegate {
|
||||
int repos_syncing_up = 0;
|
||||
int repos_syncing_down = 0;
|
||||
|
@ -182,14 +180,6 @@ namespace SparkleShare {
|
|||
StateText = "Receiving changes";
|
||||
}
|
||||
|
||||
periods++;
|
||||
|
||||
for (int i = 0; i < periods; i++)
|
||||
StateText += ".";
|
||||
|
||||
if (periods == 3)
|
||||
periods = 0;
|
||||
|
||||
StateText += " " + ProgressPercentage + "% " + ProgressSpeed;
|
||||
|
||||
UpdateIconEvent (CurrentState);
|
||||
|
|
BIN
SparkleShare/Windows/Pixmaps/process-syncing-down.png
Normal file
After Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 527 B |
Before Width: | Height: | Size: 518 B |
Before Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 534 B |
BIN
SparkleShare/Windows/Pixmaps/process-syncing-up.png
Normal file
After Width: | Height: | Size: 695 B |
BIN
SparkleShare/Windows/Pixmaps/process-syncing.png
Normal file
After Width: | Height: | Size: 634 B |
|
@ -34,7 +34,7 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>..\..\bin</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -103,7 +103,7 @@
|
|||
<MonoDevelop>
|
||||
<Properties>
|
||||
<MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile.am">
|
||||
<BuildFilesVar Sync="true" Name="SOURCES" />
|
||||
<BuildFilesVar Sync="True" Name="SOURCES" />
|
||||
<DeployFilesVar />
|
||||
<ResourcesVar />
|
||||
<OthersVar />
|
||||
|
@ -206,6 +206,10 @@
|
|||
<EmbeddedResource Include="..\Linux\Pixmaps\icons\process-working-22.png">
|
||||
<Link>Pixmaps\process-working-22.png</Link>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-down.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-idle.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-up.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Common\Plugins\github.png">
|
||||
|
@ -260,11 +264,6 @@
|
|||
<ItemGroup>
|
||||
<EmbeddedResource Include="Pixmaps\folder.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-error.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-i.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-ii.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-iii.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-iiii.png" />
|
||||
<EmbeddedResource Include="Pixmaps\process-syncing-iiiii.png" />
|
||||
<EmbeddedResource Include="Pixmaps\sparkleshare-app.ico" />
|
||||
<EmbeddedResource Include="Pixmaps\sparkleshare-folder.png" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -32,9 +32,12 @@ namespace SparkleShare {
|
|||
public class SparkleStatusIcon : Control {
|
||||
|
||||
public SparkleStatusIconController Controller = new SparkleStatusIconController();
|
||||
|
||||
private Drawing.Bitmap [] animation_frames;
|
||||
private Drawing.Bitmap error_icon;
|
||||
|
||||
private Drawing.Bitmap syncing_idle_image;
|
||||
private Drawing.Bitmap syncing_up_image;
|
||||
private Drawing.Bitmap syncing_down_image;
|
||||
private Drawing.Bitmap syncing_image;
|
||||
private Drawing.Bitmap syncing_error_image;
|
||||
|
||||
private ContextMenu context_menu;
|
||||
|
||||
|
@ -45,25 +48,45 @@ namespace SparkleShare {
|
|||
|
||||
private SparkleNotifyIcon notify_icon = new SparkleNotifyIcon ();
|
||||
|
||||
|
||||
|
||||
|
||||
public SparkleStatusIcon ()
|
||||
{
|
||||
CreateAnimationFrames ();
|
||||
|
||||
this.notify_icon.Icon = animation_frames [0];
|
||||
this.syncing_idle_image = SparkleUIHelpers.GetBitmap ("process-syncing-idle"),
|
||||
this.syncing_up_image = SparkleUIHelpers.GetBitmap ("process-syncing-up"),
|
||||
this.syncing_down_image = SparkleUIHelpers.GetBitmap ("process-syncing-down"),
|
||||
this.syncing_image = SparkleUIHelpers.GetBitmap ("process-syncing"),
|
||||
this.syncing_error_image = SparkleUIHelpers.GetBitmap ("process-syncing-error")
|
||||
|
||||
this.notify_icon.Icon = this.syncing_idle_image;
|
||||
this.notify_icon.HeaderText = "SparkleShare";
|
||||
|
||||
CreateMenu ();
|
||||
|
||||
|
||||
Controller.UpdateIconEvent += delegate (int icon_frame) {
|
||||
Controller.UpdateIconEvent += delegate (IconState state) {
|
||||
Dispatcher.BeginInvoke ((Action) delegate {
|
||||
if (icon_frame > -1)
|
||||
this.notify_icon.Icon = animation_frames [icon_frame];
|
||||
else
|
||||
this.notify_icon.Icon = this.error_icon;
|
||||
});
|
||||
switch (state) {
|
||||
case IconState.Idle: {
|
||||
this.notify_icon.Icon = this.syncing_idle_image;
|
||||
break;
|
||||
}
|
||||
case IconState.SyncingUp: {
|
||||
this.notify_icon.Icon = this.syncing_up_image;
|
||||
break;
|
||||
}
|
||||
case IconState.SyncingDown: {
|
||||
this.notify_icon.Icon = this.syncing_down_image;
|
||||
break;
|
||||
}
|
||||
case IconState.Syncing: {
|
||||
this.notify_icon.Icon = this.syncing_image_image;
|
||||
break;
|
||||
}
|
||||
case IconState.Error: {
|
||||
this.notify_icon.Icon = this.syncing_error_image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Controller.UpdateStatusItemEvent += delegate (string state_text) {
|
||||
|
@ -277,20 +300,6 @@ namespace SparkleShare {
|
|||
{
|
||||
this.notify_icon.Dispose ();
|
||||
}
|
||||
|
||||
|
||||
private void CreateAnimationFrames ()
|
||||
{
|
||||
this.animation_frames = new Drawing.Bitmap [] {
|
||||
SparkleUIHelpers.GetBitmap ("process-syncing-i"),
|
||||
SparkleUIHelpers.GetBitmap ("process-syncing-ii"),
|
||||
SparkleUIHelpers.GetBitmap ("process-syncing-iii"),
|
||||
SparkleUIHelpers.GetBitmap ("process-syncing-iiii"),
|
||||
SparkleUIHelpers.GetBitmap ("process-syncing-iiiii")
|
||||
};
|
||||
|
||||
this.error_icon = SparkleUIHelpers.GetBitmap ("process-syncing-error");
|
||||
}
|
||||
|
||||
|
||||
// A method reference that makes sure that opening the
|
||||
|
|