Skip to content

Commit

Permalink
Add a menu item under Help for translating.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpobst committed Jun 20, 2010
1 parent 32a6b7b commit 9e7b8a4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Pinta.Core/Actions/HelpActions.cs
Expand Up @@ -36,17 +36,20 @@ public class HelpActions
{
public Gtk.Action Website { get; private set; }
public Gtk.Action Bugs { get; private set; }
public Gtk.Action Translate { get; private set; }
public Gtk.Action About { get; private set; }

public HelpActions ()
{
Gtk.IconFactory fact = new Gtk.IconFactory ();
fact.Add ("Menu.Help.Bug.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.Help.Bug.png")));
fact.Add ("Menu.Help.Website.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.Help.Website.png")));
fact.Add ("Menu.Help.Translate.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Menu.Help.Translate.png")));
fact.AddDefault ();

Website = new Gtk.Action ("Website", Catalog.GetString ("Pinta Website"), null, "Menu.Help.Website.png");
Bugs = new Gtk.Action ("Bugs", Catalog.GetString ("File a Bug"), null, "Menu.Help.Bug.png");
Translate = new Gtk.Action ("Translate", Catalog.GetString ("Translate This Application"), null, "Menu.Help.Translate.png");
About = new Gtk.Action ("About", Catalog.GetString ("About"), null, Stock.About);
}

Expand All @@ -55,6 +58,7 @@ public void CreateMainMenu (Gtk.Menu menu)
{
menu.Append (Website.CreateMenuItem ());
menu.Append (Bugs.CreateMenuItem ());
menu.Append (Translate.CreateMenuItem ());
menu.AppendSeparator ();
menu.Append (About.CreateMenuItem ());
}
Expand All @@ -63,11 +67,17 @@ public void RegisterHandlers ()
{
Website.Activated += new EventHandler (Website_Activated);
Bugs.Activated += new EventHandler (Bugs_Activated);
Translate.Activated += Translate_Activated;
}

private void Bugs_Activated (object sender, EventArgs e)
{
Process.Start ("http://www.pinta-project.com/Contribute");
Process.Start ("https://bugs.launchpad.net/pinta");
}

private void Translate_Activated (object sender, EventArgs e)
{
Process.Start ("https://translations.launchpad.net/pinta");
}

private void Website_Activated (object sender, EventArgs e)
Expand Down
5 changes: 4 additions & 1 deletion Pinta.Resources/Pinta.Resources.csproj
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -439,6 +439,9 @@
<EmbeddedResource Include="Resources\About.ImageTop.png">
<LogicalName>About.ImageTop.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Menu.Help.Translate.png">
<LogicalName>Menu.Help.Translate.png</LogicalName>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
Binary file added Pinta.Resources/Resources/Menu.Help.Translate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9e7b8a4

Please sign in to comment.