/share/taluka/starthere.py

https://github.com/jhasse/taluka
Python | 71 lines | 35 code | 15 blank | 21 comment | 0 complexity | b51ded1aa4dbce79da1e82102525352c MD5 | raw file
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright (C) 2007 Jan Niklas Hasse <jhasse@gmail.com>
  5. # Jannes Meyer <jannes.meyer@gmail.com>
  6. # Fabian Franzen <flammenvogel@arcor.de>
  7. #
  8. # This file is part of Taluka.
  9. #
  10. # Taluka is free software: you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation, either version 3 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # Taluka is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with Taluka. If not, see <http://www.gnu.org/licenses/>.
  22. import gtk
  23. class StartHere(gtk.VBox):
  24. def __init__(self):
  25. super(type(self), self).__init__(self)
  26. self._label = gtk.Label("Start here")
  27. self.add(self._label)
  28. self.show_all()
  29. self._hbox = gtk.HBox()
  30. box = gtk.VButtonBox()
  31. box.set_layout(gtk.BUTTONBOX_START)
  32. box.set_border_width(30)
  33. button = gtk.Button("Create a new project")
  34. button.set_alignment(0, 0.5)
  35. button.set_image(gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_BUTTON))
  36. box.add(button)
  37. button = gtk.Button("Open an existing project")
  38. button.set_alignment(0, 0.5)
  39. button.set_image(gtk.image_new_from_stock(gtk.STOCK_OPEN, gtk.ICON_SIZE_BUTTON))
  40. box.add(button)
  41. button = gtk.Button("About Taluka")
  42. button.set_alignment(0, 0.5)
  43. button.set_image(gtk.image_new_from_stock(gtk.STOCK_ABOUT, gtk.ICON_SIZE_BUTTON))
  44. box.add(button)
  45. self._hbox.add(box)
  46. self._hbox.show_all()
  47. def get_content(self):
  48. return self._hbox
  49. def get_view(self):
  50. return None
  51. def get_document(self):
  52. return None
  53. def get_state(self):
  54. return None
  55. def _get_name(self):
  56. return self._label.get_text()