Help with GnomeMDI/GtkPlug, GtkSocket




 Hi,

 I am working with pygnome 1.0.50

 Now, for a long time, I have been trying to work with MDI without 
success.

 For example, what's wrong with the following:



#######START CODE
from gtk import GtkCurve, mainloop
from gnome.ui import GnomeMDIGenericChild, GnomeMDI
from _gnomeui import gnome_mdi_generic_child_set_view_creator


mdi = GnomeMDI('some-app', 'Title')

def my_create_view(child, whatever=None):
    return GtkHBox()   # not a toplevel widget
child = GnomeMDIGenericChild('some-name')

##Without the child._o it complains that it needs a gtkobject and not 
an 
##instance. With the object it segfaults

gnome_mdi_generic_child_set_view_creator(child._o,my_create_view, 1)

mdi.add_child(child)
# create a view for the child:
mdi.create_view(child)

mainloop()


####ENDCODE

 So can someone out there please write a simple and useless:

mdi=GnomeMDI(...)

child=GnomeMDIChild or GenericChild 

with just one empty GtkHBox in it or any other widget that works.

By working, I mean:

a MDI.py file that works with python MDI.py

I am really despairing here.

Also, for the GtkPlug and Socket part.

I just read (in Havoc's book) one can't really make multiple 
inheritance.

That was after I unsuccessfully tried to create a:
class Session(GnomeApp, GtkPlug):
	def __init__(self, title and stuff):
	GnomeApp.__init__(self, ....)
	GtkPlug.__init__(self,....)

.......

Well actually it never crashed, but I discovered it won't work with 
GtkSocket in another window.

Anyway, I'd really also like a stupid example of the pairing, how to 
make them work!????

Thank you


H. Aurag
 







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]