uur.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Uruk Bugs Repairer
  2. # Copyright (c) 2016 ali abdul ghani <blade.vp2020@gmail.com>
  3. # This Program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # This Program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. import webbrowser
  14. import os
  15. from gi.repository import Gtk
  16. window = Gtk.Window(title="Uruk Bugs Repairer")
  17. window.set_border_width(30)
  18. hbox = Gtk.Box(spacing=6)
  19. window.connect("destroy", lambda w: Gtk.main_quit())
  20. window.add(hbox)
  21. def update(button1):
  22. os.system("./update.sh")
  23. def ex(button3):
  24. exit()
  25. def rb(button2):
  26. webbrowser.open('https://urukproject.org/bt')
  27. button1 = Gtk.Button.new_with_label("Fix the Bugs")
  28. button1.connect("clicked", update)
  29. hbox.pack_start(button1, True, True, 0)
  30. button2 = Gtk.Button.new_with_label("Report a Bug")
  31. button2.connect("clicked", rb)
  32. hbox.pack_start(button2, True, True, 0)
  33. button3 = Gtk.Button.new_with_label("Exit")
  34. button3.connect("clicked", ex)
  35. hbox.pack_start(button3, True, True, 0)
  36. window.show_all()
  37. Gtk.main()