side_nb_modb.connect("clicked", add_to_notebook, 0) l_paned_modb = tweaks["Paned"][0] r_paned_modb = tweaks["Paned"][1] u_paned_modb = tweaks["Paned"][2] d_paned_modb = tweaks["Paned"][3] # 0, 1, 2, 3 are integer values of Gtk.PositionType. l_paned_modb.connect("clicked", add_to_paned, 0) r_paned_modb.connect("clicked", add_to_paned, 1) u_paned_modb.connect("clicked", add_to_paned, 2) d_paned_modb.connect("clicked", add_to_paned, 3) load_modb = tweaks["Interface"][0] save_modb = tweaks["Interface"][1] load_modb.connect("clicked", load_interface) save_modb.connect("clicked", save_interface) connect_tweaks() top_level = new_bin() element = new_element() top_level.add_child(element) # Making a single element and adding it. win = Gtk.Window(default_height=500, default_width=750) win.add(top_level) win.connect("destroy", Gtk.main_quit) win.show_all() Gtk.main()
"document-new-symbolic", "document-save-symbolic", "edit-undo-symbolic", "edit-redo-symbolic", "rotation-allowed-symbolic", "document-edit-symbolic", "edit-clear-all-symbolic", ] for y, name in enumerate(icon_names): icon = Gtk.Image.new_from_icon_name(name, 2) button = Gtk.Button(margin=2, relief=2) button.add(icon) button_grid.attach(button, 0, y, 1, 1) paned1 = Gtk.Paned(orientation=0) paned2 = Gtk.Paned(orientation=0) paned1.add1(side_grid) paned1.add2(scrolled) paned2.add1(paned1) paned2.add2(textview) main_grid = Gtk.Grid() main_grid.attach(button_grid, 0, 0, 1, 1) main_grid.attach(paned2, 1, 0, 1, 1) win = Gtk.Window(margin=2, title="Movk Image Tool") win.add(main_grid) win.connect("destroy", Gtk.main_quit) win.show_all() Gtk.main()