Exemplo n.º 1
0
def build_window():
    app = gtk.Window(gtk.WINDOW_TOPLEVEL)
    app.set_title(_("Invest Applet"))
    app.connect("destroy", gtk.main_quit)
    app.set_property('resizable', False)

    applet = mateapplet.Applet()
    applet_factory(applet, None)
    applet.reparent(app)

    app.show_all()

    return app
Exemplo n.º 2
0
def build_window():
    app = gtk.Window(gtk.WINDOW_TOPLEVEL)
    # translators: This is the window title.
    app.set_title(_("Deskbar Applet"))
    app.connect("destroy", gtk.main_quit)
    
    applet = mateapplet.Applet()
    applet.get_orient = lambda: mateapplet.ORIENT_DOWN
    applet_factory(applet, None)
    applet.reparent(app)
        
    app.show_all()
    
    return app
Exemplo n.º 3
0
#!/usr/bin/python

import sys
import gtk
import pygtk
pygtk.require('2.0')
import mateapplet
from ${name}Applet import applet_factory

if __name__ == '__main__':       # testing for execution
    print('Starting factory')

    if len(sys.argv) > 1 and sys.argv[1] == '-d': # debugging
        mainWindow = gtk.Window()
        mainWindow.set_title('Applet window')
        mainWindow.connect('destroy', gtk.main_quit)
        applet = mateapplet.Applet()
        applet_factory(applet, None)
        applet.reparent(mainWindow)
        mainWindow.show_all()
        gtk.main()
        sys.exit()
    else:
        mateapplet.matecomponent_factory('OAFIID:MATE_${name}_Factory',
                        mateapplet.Applet.__gtype__,
                        'MATE_${name}',
                        '0.1',
                        applet_factory)