Exemplo n.º 1
0
    def __init__(self):
        HildonHomePluginItem.__init__(self, header=time.strftime("%a, %d %b %y",time.gmtime()), corner_radius=7)
        self.set_size_request(400, 250)
        #body = gtk.Label("This is the body\nline2\nline3")
        #self.add(body)
        self.show_all()
	self.loadpic()
Exemplo n.º 2
0
 def do_expose_event(self, event):
     HildonHomePluginItem.do_expose_event(self, event)
     cr = self.window.cairo_create()
     cr.rectangle(event.area.x, event.area.y,
                  event.area.width, event.area.height)
     cr.clip()
     self.drawInfo(cr)
Exemplo n.º 3
0
    def __init__(self):
        HildonHomePluginItem.__init__(self, header = "Mobile Vikings", corner_radius = 7)
        
        style = self.rc_get_style()
        color = style.lookup_color("DefaultTextColor")
        InfoDrawer.color_red = color.red/65535.0
        InfoDrawer.color_green = color.green/65535.0
        InfoDrawer.color_blue = color.blue/65535.0

        self.regularinfo = RegularInfoDrawer() # so we cache the images
        self.drawer = StartingDrawer()

        self.connect("show-settings", self.showSettings)
        self.set_settings(True)

        self.connect("button-release-event", self.click_update)

        self.isConnected = False
        self.connection = conic.Connection()
        self.connection.connect("connection-event", self.connectionEvent, conic_magic)
        res = self.connection.request_connection(conic.CONNECT_FLAG_NONE)
        assert(res == True)

        self.loadConfig() # Also does initial update(), sets self.drawer

        self.show_all()
Exemplo n.º 4
0
    def __init__(self):
        HildonHomePluginItem.__init__(self, header="MyWidget", corner_radius=7)
        self.set_size_request(200, 180)
        body = gtk.Label("This is the body\nline2\nline3")
        self.add(body)
        self.show_all()
	pb = gtk.gdk.pixbuf_new_from_file('/home/user/src/demos/images/gnome-gimp.png')
        i = gtk.Image()
        s.set_size_request(200,200)
        i.set_from_pixbuf(pb)
        i.show_all()
        s.add(i)
Exemplo n.º 5
0
    def __init__(self):
        HildonHomePluginItem.__init__(self, header=time.strftime("%a, %d %b %y",time.gmtime()), corner_radius=7)
        self.set_size_request(400, 250)
        #body = gtk.Label("This is the body\nline2\nline3")
        #self.add(body)
        self.show_all()
        today=time.strftime("%Y%m%d",time.gmtime())+".png"
        fname='/home/user/.todoy/'+today
        pb = gtk.gdk.pixbuf_new_from_file(fname) #was pixbug
	i = gtk.Image()
	height=(800*2)/3
	width=(480 *2)/3
	scaled_buf = pb.scale_simple(height,width,gtk.gdk.INTERP_BILINEAR)
	#pb.set_size_request(250,250)
        #s.set_size_request(200,200)
        i.set_from_pixbuf(scaled_buf)
        i.show_all()
        self.add(i)