/srv/irclogs.ubuntu.com/2012/12/30/#ubuntu-app-devel.txt

mh0Hi, anyone around?14:33
mh0I seem to be having a problem with importing Unity into my application :(14:34
qwertzui11mh0: more details? :)14:35
mh0could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))14:35
mh0I have this import statement:14:35
mh0from gi.repository import Unity, GObject, Dbusmenu14:36
mh0Which I recall is from developer.ubuntu.com14:36
qwertzui11hmm... im no python expert, may u post the tut-url?14:36
mh0(I have it in a try/except block too, if you wonder why i'm getting a little weird ImportError)14:36
mh0http://developer.ubuntu.com/resources/technologies/launcher/14:37
mh0Too it from the example code at the bottom14:37
mh0Took*14:37
qwertzui11and ofc u did install the dependencies?14:38
mh0I'm sure all the dependencies are installed already, however, I may have missed a few.. Could I grab a link?14:38
mh0If it's a dependency problem i'm gonna feel so dumb :P14:39
qwertzui11hehe14:39
mh0qwertzui11: Do you have a link? :)14:40
qwertzui11mh0: nope... I guess14:40
qwertzui11from gi.repository import Unity, Dbusmenu14:40
qwertzui11doesn't work either?14:40
mh0Lemme try14:40
qwertzui11the error sys there's a problem with GObject...14:41
mh0could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))14:41
mh0Same error :(14:41
qwertzui11hmm... sry, maybe someone else can help.14:41
mh0Hm, If this fixes things I'm gonna feel so dumb :P14:43
qwertzui11:)14:43
mh0Gonna install libunity-dev14:43
mh0Although not sure if it's for Python14:43
mh0Oh dear, seems to have installed libdbusmenu-dev too, oops - this could have been what was wrong :P14:45
mh0Ah, still not fixed14:46
qwertzui11hrm14:46
geohhot.part14:57
danialjoseHow to toolbutton label in glade interface desigher?14:58
mh0danialjose: I'm not sure what you mean15:03
danialjoseHow to edit  toolbutton label in glade interface desigher?15:04
danialjoseI'm following this tutorial http://www.youtube.com/watch?v=sO8hiPreNBg butt stuck with this part15:04
mh0qwertzui11: I got that error away! :D15:11
mh0qwertzui11: What I did was insert the "import gtk" statement AFTER the gi.repository one15:11
mh0But now I have a new problem, this may seem familiar to you :)15:11
mh0/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed15:11
mh0  import gobject._gobject15:12
qwertzui11mh0: congrats... but watchout... there's a difference between gtk and Gtk... "gtk" is obsolet15:12
mh0Gtk is GTK3, right?15:14
qwertzui11right15:14
mh0where gtk is well, gtk215:14
mh0right ok15:14
qwertzui11right15:14
mh0Good to know15:14
mh0:)15:14
qwertzui11https://live.gnome.org/PyGObject15:15
qwertzui11https://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html15:15
qwertzui11the latest kind is called: PyGObject15:16
qwertzui11i worked with the second link, quite successfully.. has several nice tuts for Gtk3 with phytin15:16
mh0Hmm15:22
mh0Looks like it's like gtk2 syntax15:22
mh0However, It seems to want to use gtk2 :(15:23
mh0/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size15:23
mh0  from gtk import _gtk15:23
mh0/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed15:23
mh0  from gtk import _gtk15:23
mh0Segmentation fault (core dumped)15:23
qwertzui11dont import gtk... import Gtk15:23
mh0I did from gi.repository import Gtk15:23
qwertzui11#!/usr/bin/python15:24
qwertzui11from gi.repository import Gtk15:24
qwertzui11win = Gtk.Window()15:24
qwertzui11win.connect("delete-event", Gtk.main_quit)15:24
qwertzui11win.show_all()15:24
qwertzui11Gtk.main()15:24
qwertzui11https://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html#simple-example15:24
mh0I'll run that -  see what respults from it15:25
mh0That worked fine15:41
mh0but my app, still nothin'15:41
mh0AHA!15:44
mh0qwertzui11: I found out why it segfaulted15:44
qwertzui11mh0: :)15:44
mh0I was using the mixture of Gtk and old webkit15:44
mh0Now I use WebKit and Gtk15:44
mh0works :)15:44
qwertzui11congrats!15:44
mh0I'm having some groovy Gtk3 behaviour...17:33
mh0When I maximise the window, I can't make it smaller17:33
mh0In fact, the maximise button is gone when i restore the window17:33

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!