Re: TypeError in GtkWindow

2015-10-09 Thread Stefan Salewski
On Thu, 2015-10-08 at 22:05 -0300, Germán Racca wrote:
> About "coor.run()", I have followed the exact steps in the official 
> PyGObject tutorial:
> 
> https://python-gtk-3-tutorial.readthedocs.org/en/latest/dialogs.html#c
> ustom-dialogs

Good to know :-)

Well, I do not know much about Python.

But the difference seems to be obviously. You have

class TitleBar:

and call

coor = Coor2MASS(self)

So for you self is not a widget at all, but it should, it is used as
parent widget!

In the Python tutorial we have

class DialogWindow(Gtk.Window):

Here self is a Gtk.Window.

Can not say you exactly how to solve your problems, but you should get
the idea. Or maybe ask in a Python list/forum when Python itself is the
problem.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: TypeError in GtkWindow

2015-10-09 Thread Felipe Borges
As mentioned by Stefan, Coor2MASS was expecting a GtkWindow (the
parent window), and you are passing a TitleBar object.

Try something like this:

diff --git a/q2MASS.py b/q2MASS.py
index 43af88c..6b6a6d7 100644
--- a/q2MASS.py
+++ b/q2MASS.py
@@ -37,7 +37,7 @@ class Query2MASS(Gtk.Window):
 self.set_border_width(10)

 # add headerbar
-tb = TitleBar()
+   tb = TitleBar(self)
 titlebar = tb.headerbar()
 self.set_titlebar(titlebar)

@@ -62,7 +62,9 @@ class Query2MASS(Gtk.Window):
 class TitleBar:
 """Create the header bar"""

-def __init__(self):
+def __init__(self, parent):
+self.parent = parent
+
 """Initialize the class"""
 # create left and right headers
 self.left_header = Gtk.Grid()
@@ -131,7 +133,7 @@ class TitleBar:
 def on_button_coor_clicked(self, widget):
 """Close popover and show Coordinates options"""
 self.popover_opts.hide()
-coor = Coor2MASS(self)
+   coor = Coor2MASS(self.parent)
 resp = coor.run()
 if resp == Gtk.ResponseType.OK:
 print("Clicked OK!")
-- 

On Fri, Oct 9, 2015 at 1:21 PM, Stefan Salewski  wrote:
> On Thu, 2015-10-08 at 22:05 -0300, Germán Racca wrote:
>> About "coor.run()", I have followed the exact steps in the official
>> PyGObject tutorial:
>>
>> https://python-gtk-3-tutorial.readthedocs.org/en/latest/dialogs.html#c
>> ustom-dialogs
>
> Good to know :-)
>
> Well, I do not know much about Python.
>
> But the difference seems to be obviously. You have
>
> class TitleBar:
>
> and call
>
> coor = Coor2MASS(self)
>
> So for you self is not a widget at all, but it should, it is used as
> parent widget!
>
> In the Python tutorial we have
>
> class DialogWindow(Gtk.Window):
>
> Here self is a Gtk.Window.
>
> Can not say you exactly how to solve your problems, but you should get
> the idea. Or maybe ask in a Python list/forum when Python itself is the
> problem.
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

glade 3.19.0 and header bars

2015-10-09 Thread rastersoft

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi all:

Yesterday I tried to open the Glade ui files from Gedit, but glade
returned an error because they use header bars.

I cloned the GIT repository of Glade, compiled and installed it (devel
version, 3.19.0), but it still shows an error instead the header bars.

What am I doing wrong?

Thanks.

- -- 
Nos leemos
 RASTER(Linux user #228804)
ras...@rastersoft.com  http://www.rastersoft.com

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCgAGBQJWF+0sAAoJED690wQnnlF10b0P/ics0uTN6Ohl1cpvFxg1sgNF
NvJYiq24PsIKNJIcbOszcW0Exn3Na+qI+nLQXBLAdAXktQhOqWSZ+ZFCvV19rR97
hdwBQ56n9X3ImJDwH/HLuB8BOudX2dfapti1U0vv/ua+i/QJj/NwCEgWG4fxF3np
vVBgS+XxCuvXjPuDGXtJZjowOwvB7klWTcZg3hVuQMVUmCS5QEbGR3pJPeQrDA3d
aQ92JUsQhGEClPNzzfsBh6UJULr5VuMaeyroRg447dNfWnWEBtAcWW+8re4GhBld
eyr+A2AQtgWNHwQA0f/eI/SrBbLCO5EFuT0tQ5eNgmBqJtnNcBDKFSdagGLRyiPI
B1nbWeIoffYveGDFFkmoMU3qACe37CNLxC9C/k73VDlH+DuFbzDMvQANcZrRSqe5
og+s1p3lEoEnbm0rt6NETbdM8qExfattk817MM38hT07TQ7m/ulO6XsoLyX4Nzkg
FzuiOcxejrsl3s2/Gx1yF06e3eO+zyxCM83D/wt3QF5PZTaYDm8o+9p8kOVsagP6
SEOmfo6HnCYg7hMtIkQ9wTGNGHaJ6G5GtG9IgLcEzVy4tMWi9WKtWcrpevJ0tZ4E
1/mzOjn89UXR8d5/t1HZP0V3imToNZ2p0iTYEl5lWn5YWEzQYNPKiaqDvBgkWPLX
V7iujaV3VVg/eDmulKDY
=9HFZ
-END PGP SIGNATURE-

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: glade 3.19.0 and header bars

2015-10-09 Thread Marcus Karlsson
On Fri, Oct 09, 2015 at 06:37:02PM +0200, rastersoft wrote:
> Hi all:
> 
> Yesterday I tried to open the Glade ui files from Gedit, but glade
> returned an error because they use header bars.
> 
> I cloned the GIT repository of Glade, compiled and installed it (devel
> version, 3.19.0), but it still shows an error instead the header bars.
> 
> What am I doing wrong?
> 
> Thanks.

What error does it show when you open up the file in glade?

I opened gedit-window.ui from gedit with glade 3.19 and all header bars
came up just fine for me at least. You might want to try building glade
with jhbuild just in case something went wrong during the build process.

Marcus
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list