Exemplo n.º 1
0
def choosed(widget):
    folder = widget.get_label()
    win.hide()
    main = Mainwin(os.path.expanduser("~") + "/.config/plank/", folder)
    main.main()
Exemplo n.º 2
0
setting_path = os.listdir(os.path.expanduser("~") + "/.config/plank")
folder = ""


def choosed(widget):
    folder = widget.get_label()
    win.hide()
    main = Mainwin(os.path.expanduser("~") + "/.config/plank/", folder)
    main.main()

if __name__ == "__main__":
    if len(setting_path) > 1:
        win = Gtk.Window()
        label = Gtk.Label(g("Choose the dock:"))
        box = Gtk.VBox()
        box.pack_start(label, False, False, 5)
        for a in setting_path:
            button = Gtk.Button(a)
            button.connect('clicked', choosed)
            box.pack_start(button, False, False, 5)
        win.add(box)
        win.show_all()
        Gtk.main()

    else:
        for a in setting_path:
            folder = a
            main = Mainwin(os.path.expanduser("~") + "/.config/plank/", folder)
            main.main()