1_simple_window.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python
  2. # Simple window - Just a simple window
  3. # Copyright (c) 2016 Jorge Maldonado Ventura
  4. #
  5. # This file is part of Simple window
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. import gi
  18. gi.require_version('Gtk', '3.0')
  19. from gi.repository import Gtk
  20. class Window(Gtk.Window):
  21. def __init__(self):
  22. Gtk.Window.__init__(self, title='Título original')
  23. if __name__ == '__main__':
  24. win = Window()
  25. win.connect('delete-event', Gtk.main_quit)
  26. win.show_all()
  27. Gtk.main()