Skip to content

Commit

Permalink
Add donation link
Browse files Browse the repository at this point in the history
  • Loading branch information
somas95 committed Jun 14, 2018
1 parent c4d8867 commit bad7870
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions uberwriter/UberwriterWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,9 @@ def load_file(self, filename=None):
def open_translation(self):
webbrowser.open("https://poeditor.com/join/project/gxVzFyXb2x")

def open_donation(self):
webbrowser.open("https://liberapay.com/UberWriter/donate")

def open_pandoc_markdown(self, widget, data=None):
webbrowser.open("http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown")

Expand Down Expand Up @@ -992,6 +995,7 @@ def finish_initializing(self, builder): # pylint: disable=E1002
bbtn = Gtk.MenuButton()
btn_settings = Gtk.MenuButton()
btn_settings.props.image = Gtk.Image.new_from_icon_name('emblem-system-symbolic', Gtk.IconSize.BUTTON)
#btn_settings.props.use_popover = True
self.builder.get_object("menu4").detach()
btn_settings.set_popup(self.builder.get_object("menu4"))

Expand Down
11 changes: 9 additions & 2 deletions uberwriter_lib/AppWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ def do_startup(self):
action.connect("activate", self.on_translate)
self.add_action(action)

action = Gio.SimpleAction.new("donate", None)
action.connect("activate", self.on_donate)
self.add_action(action)

action = Gio.SimpleAction.new("quit", None)
action.connect("activate", self.on_quit)
self.add_action(action)
Expand Down Expand Up @@ -171,12 +175,12 @@ def do_command_line(self, command_line):
def on_about(self, action, param):
about_dialog = Gtk.AboutDialog(transient_for=self.window, modal=True)
about_dialog.set_program_name("Uberwriter")
about_dialog.set_version("2.0")
about_dialog.set_version("2.0.3")
about_dialog.set_copyright("Copyright (C) 2018, Wolf Vollprecht")
about_dialog.set_license_type(Gtk.License.GPL_3_0)
about_dialog.set_website("Uberwriter website http://uberwriter.github.io/uberwriter")
about_dialog.set_authors(["Wolf Vollprecht <[email protected]>",
"Manuel Genovés <[email protected]>"])
"Manuel Genovés <[email protected]>"])

logo_file = get_media_path("uberwriter.svg")
logo = GdkPixbuf.Pixbuf.new_from_file(logo_file)
Expand All @@ -190,6 +194,9 @@ def on_help(self, action, param):

def on_translate(self, action, param):
self.window.open_translation()

def on_donate(self, action, param):
self.window.open_donation()

def on_shortcuts(self, action, param):
builder = get_builder('Shortcuts')
Expand Down

0 comments on commit bad7870

Please sign in to comment.