title: Python Gtk3 right click menu
body: <p>I am trying to create a pop-up menu in python/gtk3. So far I have tried the following code:</p>
  
  <pre><code>from gi.repository import Gtk
  def show_menu(self, *args):     
      menu = Gtk.Menu()
      i1 = Gtk.MenuItem("Item 1")
      menu.append(i1)
      i2 = Gtk.MenuItem("Item 2")
      menu.append(i2)
      i2.show()    
      i1.show()
      menu.popup(None, None, None, None, 0, Gtk.get_current_event_time())
      print("Done")
  
  
  window = Gtk.Window() 
  button = Gtk.Button("Create pop-up") 
  button.connect("clicked", show_menu) 
  window.add(button) 
  window.show_all()
  Gtk.main()
  </code></pre>
  
  <p>but the popup menu doesn't show up? What am I doing wrong?</p>