示例#1
0
  def start(self, area):
    # Connect to our database
    self.con = sqlite.connect(gcompris.get_database())
    self.cur = self.con.cursor()

    # Create our rootitem. We put each canvas item in it so at the end we
    # only have to kill it. The canvas deletes all the items it contains automaticaly.

    self.rootitem = goocanvas.Group(
      parent = self.canvas,
      )

    module.Module.start(self)

    frame = gtk.Frame(_("Logins"))

    goocanvas.Widget(
      parent = self.rootitem,
      widget=frame,
      x=area[0]+self.module_panel_ofset,
      y=area[1]+self.module_panel_ofset,
      width=area[2]-area[0]-2*self.module_panel_ofset,
      height=area[3]-area[1]-2*self.module_panel_ofset,
      anchor=gtk.ANCHOR_NW)

    self.profile_widget = profile_widget.ProfileWidget(self.con, self.cur,
            gcompris.sugar_get_profile_id(), False)
    frame.add(self.profile_widget)

    frame.show_all()
示例#2
0
    def start(self, area):
        # Connect to our database
        self.con = sqlite.connect(gcompris.get_database())
        self.cur = self.con.cursor()

        # Create our rootitem. We put each canvas item in it so at the end we
        # only have to kill it. The canvas deletes all the items it contains automaticaly.

        self.rootitem = goocanvas.Group(parent=self.canvas, )

        module.Module.start(self)

        frame = gtk.Frame(_("Logins"))

        goocanvas.Widget(parent=self.rootitem,
                         widget=frame,
                         x=area[0] + self.module_panel_ofset,
                         y=area[1] + self.module_panel_ofset,
                         width=area[2] - area[0] - 2 * self.module_panel_ofset,
                         height=area[3] - area[1] -
                         2 * self.module_panel_ofset,
                         anchor=gtk.ANCHOR_NW)

        self.profile_widget = profile_widget.ProfileWidget(
            self.con, self.cur, gcompris.sugar_get_profile_id(), False)
        frame.add(self.profile_widget)

        frame.show_all()
示例#3
0
    def start(self, area):
        # Connect to our database
        self.con = sqlite.connect(gcompris.get_database())
        self.cur = self.con.cursor()

        if Activities.already_loaded:
            self.rootitem.props.visibility = goocanvas.ITEM_VISIBLE
            self.boardList.show(self.con, self.cur)
            return

        Activities.already_loaded = True

        # Create our rootitem. We put each canvas item in it so at the end we
        # only have to kill it. The canvas deletes all the items it contains automaticaly.

        self.rootitem = goocanvas.Group(parent=self.canvas, )

        module.Module.start(self)

        self.frame = gtk.Frame(_("Activities"))
        self.frame.show()

        goocanvas.Widget(parent=self.rootitem,
                         widget=self.frame,
                         x=area[0] + self.module_panel_ofset,
                         y=area[1] + self.module_panel_ofset,
                         width=area[2] - area[0] - 2 * self.module_panel_ofset,
                         height=area[3] - area[1] -
                         2 * self.module_panel_ofset,
                         anchor=gtk.ANCHOR_NW)

        self.boardList = board_list.Board_list(self.con,
                                               self.cur,
                                               self.frame,
                                               gcompris.sugar_get_profile_id(),
                                               hide_profiles=True)
        self.boardList.init()
示例#4
0
  def start(self, area):
    # Connect to our database
    self.con = sqlite.connect(gcompris.get_database())
    self.cur = self.con.cursor()

    if Activities.already_loaded:
      self.rootitem.props.visibility = goocanvas.ITEM_VISIBLE
      self.boardList.show(self.con, self.cur)
      return

    Activities.already_loaded = True

    # Create our rootitem. We put each canvas item in it so at the end we
    # only have to kill it. The canvas deletes all the items it contains automaticaly.

    self.rootitem = goocanvas.Group(
      parent = self.canvas,
      )

    module.Module.start(self)

    self.frame = gtk.Frame(_("Activities"))
    self.frame.show()

    goocanvas.Widget(
      parent = self.rootitem,
      widget=self.frame,
      x=area[0]+self.module_panel_ofset,
      y=area[1]+self.module_panel_ofset,
      width=area[2]-area[0]-2*self.module_panel_ofset,
      height=area[3]-area[1]-2*self.module_panel_ofset,
      anchor=gtk.ANCHOR_NW)

    self.boardList = board_list.Board_list(self.con, self.cur, self.frame,
            gcompris.sugar_get_profile_id(), hide_profiles=True)
    self.boardList.init()