1

I have a PyGTK application, and it works fine in Gnome, but under Unity (ubuntu 10.10+) the global menu bar doesn't work - the menus are not displayed in the application window or the top bar. Is there a way to force the menu to either skip the global menu bar or display in it?

Edit: Minimal sample added.

#! /usr/bin/python

import GUI
from GUI import Window

app = GUI.Application()

window = Window()

window.show()

app.run()
nosklo
  • 217,122
  • 57
  • 293
  • 297
Skyler
  • 909
  • 1
  • 10
  • 24
  • You shouldn't need to make any change to your application. Are you getting some kind of error and/or warning? Do you have some piece of code to reproduce the problem? – jcollado Jan 25 '12 at 16:23
  • No, I am not getting any error. I do not know what code specifically is causing it as I am using a library (PyGUI) which wraps PyGTK. – Skyler Jan 25 '12 at 17:54
  • Can you create a minimal example which shows this problem and post it here? I don't know if you're going to find an answer otherwise, because I don't think PyGUI is very popular and PyGTK in general does work with Unity. – dumbmatter Jan 25 '12 at 22:07

1 Answers1

1

I had similar problems with simple programs created using pygtk. I believe the situation is:

  • pygtk works with gtk2.x
  • Unity uses gtk3
  • pygtk does not work with gtk3
  • python-gobject is the gtk3 equivalent of pygtk

You have an extra layer of complexity since you're using pyGUI. Most likely, pyGUI uses pygtk, which will not work with GTK3 / Unity. You can either persuade the people at pyGUI to release a GTK3-compatible version, or re-write your app from scratch using python-gobject.

hfs99
  • 11
  • 1
  • 1
    Neither one of which is particularly appealing, but dropping PyGUI would break cross-platform compatibility. Thanks for your help. – Skyler Mar 29 '12 at 12:36