[latexila] Donate menu item



commit 9d60b276297f1df96e45b1de619ace64a19d054d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Feb 7 17:22:14 2014 +0100

    Donate menu item

 src/main_window.vala |   16 ++++++++++++++++
 src/ui/ui.xml        |    1 +
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/main_window.vala b/src/main_window.vala
index 12c5878..cbbfc5b 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -64,6 +64,9 @@ public class MainWindow : Window
             N_("Open the LaTeXila documentation"), on_help_contents },
         { "HelpLatexReference", null, N_("_LaTeX Reference"), null,
             N_("The Kile LaTeX Reference"), on_help_latex_reference },
+        { "HelpDonate", null, N_("_Donate"), null,
+            N_("Donate to demonstrate your appreciation of LaTeXila and help its future development"),
+            on_help_donate },
         { "HelpAbout", Stock.ABOUT, null, null,
             N_("About LaTeXila"), on_about_dialog }
     };
@@ -1184,6 +1187,19 @@ public class MainWindow : Window
         }
     }
 
+    public void on_help_donate ()
+    {
+        try
+        {
+            string uri = "https://wiki.gnome.org/Apps/LaTeXila/donate";;
+            show_uri (this.get_screen (), uri, Gdk.CURRENT_TIME);
+        }
+        catch (Error e)
+        {
+            warning ("Impossible to open the donate page: %s", e.message);
+        }
+    }
+
     public void on_about_dialog ()
     {
         string comments =
diff --git a/src/ui/ui.xml b/src/ui/ui.xml
index c91b59d..8675f3e 100644
--- a/src/ui/ui.xml
+++ b/src/ui/ui.xml
@@ -386,6 +386,7 @@ along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
     <menu action="Help">
       <menuitem action="HelpContents" />
       <menuitem action="HelpLatexReference" />
+      <menuitem action="HelpDonate" />
       <menuitem action="HelpAbout" />
     </menu>
   </menubar>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]