Donate menu item: Closes #6881
This commit is contained in:
parent
28d71fb1a7
commit
ab2326611b
3 changed files with 16 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ public class GearyApplication : YorbaApplication {
|
|||
public const string WEBSITE = "http://www.yorba.org";
|
||||
public const string WEBSITE_LABEL = _("Visit the Yorba web site");
|
||||
public const string BUGREPORT = "http://redmine.yorba.org/projects/geary/issues";
|
||||
public const string DONATE = "http://www.yorba.org/about/donate";
|
||||
|
||||
// These strings must match corresponding strings in desktop/geary.desktop *exactly* and be
|
||||
// internationalizable
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ public class GearyController : Geary.BaseObject {
|
|||
// Named actions.
|
||||
public const string ACTION_HELP = "GearyHelp";
|
||||
public const string ACTION_ABOUT = "GearyAbout";
|
||||
public const string ACTION_DONATE = "GearyDonate";
|
||||
public const string ACTION_QUIT = "GearyQuit";
|
||||
public const string ACTION_NEW_MESSAGE = "GearyNewMessage";
|
||||
public const string ACTION_REPLY_TO_MESSAGE = "GearyReplyToMessage";
|
||||
|
|
@ -249,6 +250,10 @@ public class GearyController : Geary.BaseObject {
|
|||
about.label = _("_About");
|
||||
entries += about;
|
||||
|
||||
Gtk.ActionEntry donate = { ACTION_DONATE, null, TRANSLATABLE, null, null, on_donate };
|
||||
donate.label = _("_Donate");
|
||||
entries += donate;
|
||||
|
||||
Gtk.ActionEntry quit = { ACTION_QUIT, Stock._QUIT, TRANSLATABLE, "<Ctrl>Q", null, on_quit };
|
||||
quit.label = _("_Quit");
|
||||
entries += quit;
|
||||
|
|
@ -1049,6 +1054,14 @@ public class GearyController : Geary.BaseObject {
|
|||
);
|
||||
}
|
||||
|
||||
private void on_donate() {
|
||||
try {
|
||||
Gtk.show_uri(null, GearyApplication.DONATE, Gdk.CURRENT_TIME);
|
||||
} catch (Error error) {
|
||||
debug("Error opening donate page: %s", error.message);
|
||||
}
|
||||
}
|
||||
|
||||
// this signal does not necessarily indicate that the application previously didn't have
|
||||
// focus and now it does
|
||||
private void on_has_toplevel_focus() {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
<menuitem name="Accounts" action="GearyAccounts" />
|
||||
<menuitem name="Preferences" action="GearyPreferences" />
|
||||
<separator />
|
||||
<menuitem name="Donate" action="GearyDonate" />
|
||||
<separator />
|
||||
<menuitem name="Help" action="GearyHelp" />
|
||||
<menuitem name="About" action="GearyAbout" />
|
||||
<separator />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue