windows statusicon: new icons
|
@ -109,7 +109,7 @@ namespace SparkleShare {
|
||||||
Sensitive = false
|
Sensitive = false
|
||||||
};
|
};
|
||||||
|
|
||||||
continue_button.Clicked += delegate (object o, EventArgs args) {
|
continue_button.Clicked += delegate {
|
||||||
Controller.SetupPageCompleted (name_entry.Text, email_entry.Text);
|
Controller.SetupPageCompleted (name_entry.Text, email_entry.Text);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,6 @@ namespace SparkleShare {
|
||||||
UpdateMenuEvent (CurrentState);
|
UpdateMenuEvent (CurrentState);
|
||||||
};
|
};
|
||||||
|
|
||||||
int periods = 3;
|
|
||||||
|
|
||||||
Program.Controller.OnSyncing += delegate {
|
Program.Controller.OnSyncing += delegate {
|
||||||
int repos_syncing_up = 0;
|
int repos_syncing_up = 0;
|
||||||
int repos_syncing_down = 0;
|
int repos_syncing_down = 0;
|
||||||
|
@ -182,14 +180,6 @@ namespace SparkleShare {
|
||||||
StateText = "Receiving changes";
|
StateText = "Receiving changes";
|
||||||
}
|
}
|
||||||
|
|
||||||
periods++;
|
|
||||||
|
|
||||||
for (int i = 0; i < periods; i++)
|
|
||||||
StateText += ".";
|
|
||||||
|
|
||||||
if (periods == 3)
|
|
||||||
periods = 0;
|
|
||||||
|
|
||||||
StateText += " " + ProgressPercentage + "% " + ProgressSpeed;
|
StateText += " " + ProgressPercentage + "% " + ProgressSpeed;
|
||||||
|
|
||||||
UpdateIconEvent (CurrentState);
|
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>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>False</Optimize>
|
||||||
<OutputPath>..\..\bin</OutputPath>
|
<OutputPath>..\..\bin</OutputPath>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
<MonoDevelop>
|
<MonoDevelop>
|
||||||
<Properties>
|
<Properties>
|
||||||
<MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile.am">
|
<MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile.am">
|
||||||
<BuildFilesVar Sync="true" Name="SOURCES" />
|
<BuildFilesVar Sync="True" Name="SOURCES" />
|
||||||
<DeployFilesVar />
|
<DeployFilesVar />
|
||||||
<ResourcesVar />
|
<ResourcesVar />
|
||||||
<OthersVar />
|
<OthersVar />
|
||||||
|
@ -206,6 +206,10 @@
|
||||||
<EmbeddedResource Include="..\Linux\Pixmaps\icons\process-working-22.png">
|
<EmbeddedResource Include="..\Linux\Pixmaps\icons\process-working-22.png">
|
||||||
<Link>Pixmaps\process-working-22.png</Link>
|
<Link>Pixmaps\process-working-22.png</Link>
|
||||||
</EmbeddedResource>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\Common\Plugins\github.png">
|
<None Include="..\Common\Plugins\github.png">
|
||||||
|
@ -260,11 +264,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Pixmaps\folder.png" />
|
<EmbeddedResource Include="Pixmaps\folder.png" />
|
||||||
<EmbeddedResource Include="Pixmaps\process-syncing-error.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-app.ico" />
|
||||||
<EmbeddedResource Include="Pixmaps\sparkleshare-folder.png" />
|
<EmbeddedResource Include="Pixmaps\sparkleshare-folder.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -33,8 +33,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public SparkleStatusIconController Controller = new SparkleStatusIconController();
|
public SparkleStatusIconController Controller = new SparkleStatusIconController();
|
||||||
|
|
||||||
private Drawing.Bitmap [] animation_frames;
|
private Drawing.Bitmap syncing_idle_image;
|
||||||
private Drawing.Bitmap error_icon;
|
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;
|
private ContextMenu context_menu;
|
||||||
|
|
||||||
|
@ -46,23 +49,43 @@ namespace SparkleShare {
|
||||||
private SparkleNotifyIcon notify_icon = new SparkleNotifyIcon ();
|
private SparkleNotifyIcon notify_icon = new SparkleNotifyIcon ();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public SparkleStatusIcon ()
|
public SparkleStatusIcon ()
|
||||||
{
|
{
|
||||||
CreateAnimationFrames ();
|
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 = animation_frames [0];
|
this.notify_icon.Icon = this.syncing_idle_image;
|
||||||
this.notify_icon.HeaderText = "SparkleShare";
|
this.notify_icon.HeaderText = "SparkleShare";
|
||||||
|
|
||||||
CreateMenu ();
|
CreateMenu ();
|
||||||
|
|
||||||
|
Controller.UpdateIconEvent += delegate (IconState state) {
|
||||||
Controller.UpdateIconEvent += delegate (int icon_frame) {
|
|
||||||
Dispatcher.BeginInvoke ((Action) delegate {
|
Dispatcher.BeginInvoke ((Action) delegate {
|
||||||
if (icon_frame > -1)
|
switch (state) {
|
||||||
this.notify_icon.Icon = animation_frames [icon_frame];
|
case IconState.Idle: {
|
||||||
else
|
this.notify_icon.Icon = this.syncing_idle_image;
|
||||||
this.notify_icon.Icon = this.error_icon;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -279,20 +302,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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
|
// A method reference that makes sure that opening the
|
||||||
// event log for each repository works correctly
|
// event log for each repository works correctly
|
||||||
private RoutedEventHandler OpenFolderDelegate (string folder_name)
|
private RoutedEventHandler OpenFolderDelegate (string folder_name)
|
||||||
|
|