mirror of
https://github.com/gryf/pygtktalog.git
synced 2025-12-17 19:40:21 +01:00
Added popup menu for discs treeview, added separated glade files with interface and controllers
This commit is contained in:
33
pygtktalog/controllers/files.py
Normal file
33
pygtktalog/controllers/files.py
Normal file
@@ -0,0 +1,33 @@
|
||||
"""
|
||||
Project: pyGTKtalog
|
||||
Description: Controller for Files TreeView
|
||||
Type: core
|
||||
Author: Roman 'gryf' Dobosz, gryf73@gmail.com
|
||||
Created: 2009-08-30
|
||||
"""
|
||||
import gtk
|
||||
|
||||
from gtkmvc import Controller
|
||||
|
||||
|
||||
class FilesController(Controller):
|
||||
"""
|
||||
Controller for files TreeView list.
|
||||
"""
|
||||
|
||||
def register_view(self, view):
|
||||
"""Default view registration stuff"""
|
||||
self.view['files'].set_model(self.model.discs)
|
||||
|
||||
col = gtk.TreeViewColumn('kolumna2')
|
||||
|
||||
cellpb = gtk.CellRendererPixbuf()
|
||||
cell = gtk.CellRendererText()
|
||||
|
||||
col.pack_start(cellpb, False)
|
||||
col.pack_start(cell, True)
|
||||
|
||||
col.set_attributes(cellpb, stock_id=0)
|
||||
col.set_attributes(cell, text=1)
|
||||
self.view['files'].append_column(col)
|
||||
|
||||
Reference in New Issue
Block a user