[Glade-users] Project file format

Arun p das arunpdasuit at gmail.com
Sat Oct 15 12:52:49 EDT 2011


Thanks for guidance i run the first sample program

 import sys

try:

import pygtk

pygtk.require(*"2.0"*)

except:

pass

try:

import gtk

except:

print(*"GTK Not **Availible**"*)

sys.exit(1)


 class *euca*:

def *__init__*(*self*):

*self*.glade = *"gtkbuilder.glade"*

*self*.builder = gtk.Builder()

*self*.builder.add_from_file(*self*.glade)

*self*.window = *self*.builder.get_object(*"window1"*)

dic = {*"on_button1_clicked"*:*self*.displaymsg}

*self*.builder.connect_signals(dic)

  def *displaymsg*(*self*,widget):

print *self*.builder.get_object(*"name"*).get_text()

 if __name__ == *"__main__"*:

e = euca()

gtk.main()




On Fri, Oct 14, 2011 at 11:35 PM, Tristan Van Berkom <
tristan.van.berkom at gmail.com> wrote:

> On Fri, Oct 14, 2011 at 1:57 PM, Arun p das <arunpdasuit at gmail.com> wrote:
> > Thank you for reply. i just started with my project in glade
> >  Is it possible to convert my entire project to GtkBuilder.
>
> Yes, start up Glade and load your project in libglade format.
>
> Hit CNTL+P (this is also available in the menus) to pop up
> the project properties dialog.
>
> Choose GtkBuilder format... this will cause the project to
> convert... after this point you should check that all your
> widgets are still in place, some of them may have changed
> types or be setup differently in GtkBuilder format.
>
> Then save it in GtkBuilder format and move on.
>
> For best results use Glade 3.8, also consider using
> Glade 3.10, GTK+3 and pygobject for the python bindings.
>
> Cheers,
>         -Tristan
>
> Please remember to 'reply-all' and keep the mailing list on CC, thanks.
>
>
> >     This was one sample program i run
> >
> > import pygtk
> >
> > pygtk.require("2.0")
> >
> > import gtk
> >
> > class TutorialApp(object):
> >
> > def __init__(self):
> >
> > builder = gtk.Builder()
> >
> > builder.add_from_file("1.xml")
> >
> > builder.connect_signals({ "on_window_destroy" : gtk.main_quit })
> >
> > self.window = builder.get_object("window1")
> >
> > self.window.show()
> >
> > if __name__ == "__main__":
> >
> > app = TutorialApp()
> >
> > gtk.main()
> >
> > Everytime is it needed to convert the glade file to xml format with this
> >
> > gtk-builder-convert 1.glade 1.xml
> >
> > if i am using GtkBuilder
> >
> > On Fri, Oct 14, 2011 at 10:09 PM, Tristan Van Berkom
> > <tristan.van.berkom at gmail.com> wrote:
> >>
> >> Use GtkBuilder.
> >>
> >> Libglade is legacy, it's supported in Glade <= 3.8 and maintained for
> the
> >> sake
> >> of people who need to support older projects or need to use Glade to
> port
> >> their old applications to a newer version.
> >>
> >> Cheers,
> >>         -Tristan
> >>
> >> On Fri, Oct 14, 2011 at 11:38 AM, Arun p das <arunpdasuit at gmail.com>
> >> wrote:
> >> > what is the difference between project file formats
> >> >
> >> >
> >> > libglade and Gtkbuilder
> >> >
> >> > _______________________________________________
> >> > Glade-users maillist  -  Glade-users at lists.ximian.com
> >> > http://lists.ximian.com/mailman/listinfo/glade-users
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20111015/6d697180/attachment-0001.html 


More information about the Glade-users mailing list