Пример #1
0
    def __init__(self):
        glade_dir = gv.gshogi.get_glade_dir()
        self.glade_file = os.path.join(glade_dir, "move_list.glade")
        Move_List.move_list_ref = self
        self.comments = comments.get_ref()

        self.saved_move_list = []

        # create move list window
        self.builder = Gtk.Builder()
        self.builder.add_from_file(self.glade_file)
        self.builder.connect_signals(self)

        self.window = self.builder.get_object("move_list_window")
        self.treeview = self.builder.get_object("treeview1")
        self.liststore = self.builder.get_object("liststore1")
        self.scrolled_window = self.builder.get_object(
            "move_list_scrolled_window")

        cell0 = Gtk.CellRendererText()
        # cell0.set_property("cell-background", Gdk.color_parse("#F8F8FF"))
        tvcolumn0 = Gtk.TreeViewColumn("#")
        self.treeview.append_column(tvcolumn0)
        tvcolumn0.pack_start(cell0, True)
        tvcolumn0.set_min_width(50)
        tvcolumn0.set_attributes(cell0, text=0)

        cell1 = Gtk.CellRendererText()
        # cell1.set_property("cell-background", Gdk.color_parse("#F8F8FF"))
        tvcolumn1 = Gtk.TreeViewColumn("Move")
        self.treeview.append_column(tvcolumn1)
        tvcolumn1.pack_start(cell1, True)
        tvcolumn1.set_min_width(100)
        tvcolumn1.set_attributes(cell1, text=1)

        cell2 = Gtk.CellRendererText()
        # cell1.set_property("cell-background", Gdk.color_parse("#F8F8FF"))
        tvcolumn2 = Gtk.TreeViewColumn("Cmt")
        self.treeview.append_column(tvcolumn2)
        tvcolumn2.pack_start(cell2, True)
        tvcolumn2.set_min_width(20)
        tvcolumn2.set_attributes(cell2, text=2)

        self.tree_selection = self.treeview.get_selection()

        self.window.hide()
        self.update()
Пример #2
0
    def __init__(self):
        glade_dir = gv.gshogi.get_glade_dir()
        self.glade_file = os.path.join(glade_dir, "move_list.glade")
        Move_List.move_list_ref = self
        self.comments = comments.get_ref()

        self.saved_move_list = []

        # create move list window
        self.builder = Gtk.Builder()
        self.builder.add_from_file(self.glade_file)
        self.builder.connect_signals(self)

        self.window = self.builder.get_object("move_list_window")
        self.treeview = self.builder.get_object("treeview1")
        self.liststore = self.builder.get_object("liststore1")
        self.scrolled_window = self.builder.get_object(
            "move_list_scrolled_window")

        cell0 = Gtk.CellRendererText()
        # cell0.set_property("cell-background", Gdk.color_parse("#F8F8FF"))
        tvcolumn0 = Gtk.TreeViewColumn("#")
        self.treeview.append_column(tvcolumn0)
        tvcolumn0.pack_start(cell0, True)
        tvcolumn0.set_min_width(50)
        tvcolumn0.set_attributes(cell0, text=0)

        cell1 = Gtk.CellRendererText()
        # cell1.set_property("cell-background", Gdk.color_parse("#F8F8FF"))
        tvcolumn1 = Gtk.TreeViewColumn("Move")
        self.treeview.append_column(tvcolumn1)
        tvcolumn1.pack_start(cell1, True)
        tvcolumn1.set_min_width(100)
        tvcolumn1.set_attributes(cell1, text=1)

        cell2 = Gtk.CellRendererText()
        # cell1.set_property("cell-background", Gdk.color_parse("#F8F8FF"))
        tvcolumn2 = Gtk.TreeViewColumn("Cmt")
        self.treeview.append_column(tvcolumn2)
        tvcolumn2.pack_start(cell2, True)
        tvcolumn2.set_min_width(20)
        tvcolumn2.set_attributes(cell2, text=2)

        self.tree_selection = self.treeview.get_selection()

        self.window.hide()
        self.update()
Пример #3
0
 def __init__(self):
     self.move_list = move_list.get_ref()
     self.psn = psn.get_ref()
     self.comments = comments.get_ref()
Пример #4
0
 def __init__(self):
     self.move_list = move_list.get_ref()
     self.gamelist = gamelist.get_ref()
     self.comments = comments.get_ref()
Пример #5
0
 def __init__(self):
     self.move_list = move_list.get_ref()
     self.gamelist = gamelist.get_ref()
     self.comments = comments.get_ref()