|
[14:33] <mh0> Hi, anyone around? |
|
[14:34] <mh0> I seem to be having a problem with importing Unity into my application :( |
|
[14:35] <qwertzui11> mh0: more details? :) |
|
[14:35] <mh0> could 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] <mh0> I have this import statement: |
|
[14:36] <mh0> from gi.repository import Unity, GObject, Dbusmenu |
|
[14:36] <mh0> Which I recall is from developer.ubuntu.com |
|
[14:36] <qwertzui11> hmm... 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:37] <mh0> http://developer.ubuntu.com/resources/technologies/launcher/ |
|
[14:37] <mh0> Too it from the example code at the bottom |
|
[14:37] <mh0> Took* |
|
[14:38] <qwertzui11> and ofc u did install the dependencies? |
|
[14:38] <mh0> I'm sure all the dependencies are installed already, however, I may have missed a few.. Could I grab a link? |
|
[14:39] <mh0> If it's a dependency problem i'm gonna feel so dumb :P |
|
[14:39] <qwertzui11> hehe |
|
[14:40] <mh0> qwertzui11: Do you have a link? :) |
|
[14:40] <qwertzui11> mh0: nope... I guess |
|
[14:40] <qwertzui11> from gi.repository import Unity, Dbusmenu |
|
[14:40] <qwertzui11> doesn't work either? |
|
[14:40] <mh0> Lemme try |
|
[14:41] <qwertzui11> the error sys there's a problem with GObject... |
|
[14:41] <mh0> could 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] <mh0> Same error :( |
|
[14:41] <qwertzui11> hmm... sry, maybe someone else can help. |
|
[14:43] <mh0> Hm, If this fixes things I'm gonna feel so dumb :P |
|
[14:43] <qwertzui11> :) |
|
[14:43] <mh0> Gonna install libunity-dev |
|
[14:43] <mh0> Although not sure if it's for Python |
|
[14:45] <mh0> Oh dear, seems to have installed libdbusmenu-dev too, oops - this could have been what was wrong :P |
|
[14:46] <mh0> Ah, still not fixed |
|
[14:46] <qwertzui11> hrm |
|
[14:57] <geohhot> .part |
|
[14:58] <danialjose> How to toolbutton label in glade interface desigher? |
|
[15:03] <mh0> danialjose: I'm not sure what you mean |
|
[15:04] <danialjose> How to edit toolbutton label in glade interface desigher? |
|
[15:04] <danialjose> I'm following this tutorial http://www.youtube.com/watch?v=sO8hiPreNBg butt stuck with this part |
|
[15:11] <mh0> qwertzui11: I got that error away! :D |
|
[15:11] <mh0> qwertzui11: What I did was insert the "import gtk" statement AFTER the gi.repository one |
|
[15:11] <mh0> But 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' failed |
|
[15:12] <mh0> import gobject._gobject |
|
[15:12] <qwertzui11> mh0: congrats... but watchout... there's a difference between gtk and Gtk... "gtk" is obsolet |
|
[15:14] <mh0> Gtk is GTK3, right? |
|
[15:14] <qwertzui11> right |
|
[15:14] <mh0> where gtk is well, gtk2 |
|
[15:14] <mh0> right ok |
|
[15:14] <qwertzui11> right |
|
[15:14] <mh0> Good to know |
|
[15:14] <mh0> :) |
|
[15:15] <qwertzui11> https://live.gnome.org/PyGObject |
|
[15:15] <qwertzui11> https://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html |
|
[15:16] <qwertzui11> the latest kind is called: PyGObject |
|
[15:16] <qwertzui11> i worked with the second link, quite successfully.. has several nice tuts for Gtk3 with phytin |
|
[15:22] <mh0> Hmm |
|
[15:22] <mh0> Looks like it's like gtk2 syntax |
|
[15:23] <mh0> However, 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 size |
|
[15:23] <mh0> from gtk import _gtk |
|
[15:23] <mh0> /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed |
|
[15:23] <mh0> from gtk import _gtk |
|
[15:23] <mh0> Segmentation fault (core dumped) |
|
[15:23] <qwertzui11> dont import gtk... import Gtk |
|
[15:23] <mh0> I did from gi.repository import Gtk |
|
[15:24] <qwertzui11> #!/usr/bin/python |
|
[15:24] <qwertzui11> from gi.repository import Gtk |
|
[15:24] <qwertzui11> win = Gtk.Window() |
|
[15:24] <qwertzui11> win.connect("delete-event", Gtk.main_quit) |
|
[15:24] <qwertzui11> win.show_all() |
|
[15:24] <qwertzui11> Gtk.main() |
|
[15:24] <qwertzui11> https://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html#simple-example |
|
[15:25] <mh0> I'll run that - see what respults from it |
|
[15:41] <mh0> That worked fine |
|
[15:41] <mh0> but my app, still nothin' |
|
[15:44] <mh0> AHA! |
|
[15:44] <mh0> qwertzui11: I found out why it segfaulted |
|
[15:44] <qwertzui11> mh0: :) |
|
[15:44] <mh0> I was using the mixture of Gtk and old webkit |
|
[15:44] <mh0> Now I use WebKit and Gtk |
|
[15:44] <mh0> works :) |
|
[15:44] <qwertzui11> congrats! |
|
[17:33] <mh0> I'm having some groovy Gtk3 behaviour... |
|
[17:33] <mh0> When I maximise the window, I can't make it smaller |
|
[17:33] <mh0> In fact, the maximise button is gone when i restore the window |
|
|