1
0
mirror of https://github.com/gryf/pygtktalog.git synced 2025-12-19 04:20:19 +01:00

* New version using pygtkmvc framework.

This commit is contained in:
2007-05-01 19:30:22 +00:00
parent 45859e1a3d
commit f695f82c1f
30 changed files with 2232 additions and 0 deletions

View File

View File

@@ -0,0 +1,38 @@
# This Python file uses the following encoding: utf-8
import utils._importer
import utils.globals
from gtkmvc import Controller
import gtk
class MainController(Controller):
"""Kontroler głównego okna aplikacji"""
def __init__(self, model):
Controller.__init__(self, model)
return
def register_view(self, view):
Controller.register_view(self, view)
# ustaw domyślne wartości dla poszczególnych widżetów
self.view['main'].set_title('pyGTKtalog');
self.view['main'].set_icon_list(gtk.gdk.pixbuf_new_from_file("pixmaps/mainicon.png"))
# pokaż główne okno
self.view['main'].show();
return
# Podłącz sygnały:
def on_main_destroy_event(self, window, event):
gtk.main_quit()
return True
def on_tb_quit_clicked(self,toolbutton):
gtk.main_quit()
def on_quit1_activate(self,button):
gtk.main_quit()
# Obserwowalne właściwości
pass # end of class