예제 #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, )

        # Call our parent start
        module.Module.start(self)

        frame = gtk.Frame(_("Groups"))
        frame.show()

        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)

        group_list.Group_list(frame, self.con, self.cur)
예제 #2
0
    def start(self, area):
        # Connect to our database
        self.con = sqlite.connect(gcompris.get_database())
        self.cur = self.con.cursor()

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

        Boards.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(_("Boards"))
        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)
        self.boardList.init()
예제 #3
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,
        )

    # Call our parent start
    module.Module.start(self)

    frame = gtk.Frame(_("Groups"))
    frame.show()

    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)


    group_list.Group_list(frame, self.con, self.cur)
예제 #4
0
  def start(self, area):
    # Connect to our database
    self.con = sqlite.connect(gcompris.get_database())
    self.cur = self.con.cursor()

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

    Reports.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
      )

    # Call our parent start
    module.Module.start(self)

    frame = gtk.Frame(_("Users") + " / " + _("Reports") )
    frame.show()

    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.logList = log_list.Log_list(frame, self.con, self.cur)
    self.logList.init()
예제 #5
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()
예제 #6
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()
예제 #7
0
  def start(self, area):
    # Connect to our database
    self.con = sqlite.connect(gcompris.get_database())
    self.cur = self.con.cursor()

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

    Boards.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(_("Boards"))
    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)

    # Get default pofile id.
    self.cur.execute('SELECT profile_id FROM informations;')
    self.con.commit()
    default_profile_id = self.cur.fetchall()[0][0]

    self.boardList = board_list.Board_list(self.con, self.cur,
                                           self.frame, default_profile_id)
    self.boardList.init()
예제 #8
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()