You are trying to insert the toolbox into itself:

  toolbox.pack_start(toolbox, True, True, 0)

If you drop the two lines which do that, it works fine.

** Changed in: pygobject (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to pygobject in Ubuntu.
https://bugs.launchpad.net/bugs/880318

Title:
  Simple app with gir results in segfault

Status in “pygobject” package in Ubuntu:
  Invalid

Bug description:
  This simple program results in a segfault all the time, and I see
  nothing wrong with it:

  from gi.repository import Gtk

  window = Gtk.Window(title="My GTK3 window")
  window.connect("delete-event", Gtk.main_quit)

  mainbox = Gtk.Box(False, 0)
  mainbox.set_orientation(Gtk.Orientation.VERTICAL)
  toolbox = Gtk.Box(False, 0)
  toolbox.set_orientation(Gtk.Orientation.HORIZONTAL)
  tb_style_context = toolbox.get_style_context()
  tb_style_context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)

  toolbar = Gtk.Toolbar()
  tb_button = Gtk.ToolButton(stock_id=Gtk.STOCK_NEW)
  toolbar.add(tb_button)

  toggle_button = Gtk.ToggleButton(label="Normal toggle button")

  toolbox.pack_start(toolbox, True, True, 0)
  toolbox.pack_start(toggle_button, False, False, 0)
  mainbox.pack_start(toolbox, False, False, 0)

  window.add(mainbox)
  window.show_all()
  Gtk.main()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/880318/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to