Re: Project file format

Arun p das <[email protected]>
Newsgroups gmane.comp.gnome.glade.user
Message-ID <CAHm4=rotngOE7WDLbZz9=eMxvx7qsLoU=DD_rw1qKNof1gQ4fg@mail.gmail.com>
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 <
[email protected]> wrote:

> On Fri, Oct 14, 2011 at 1:57 PM, Arun p das <[email protected]> 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
> > <[email protected]> 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 <[email protected]>
> >> wrote:
> >> > what is the difference between project file formats
> >> >
> >> >
> >> > libglade and Gtkbuilder
> >> >
> >> > _______________________________________________
> >> > Glade-users maillist  -  [email protected]
> >> > http://lists.ximian.com/mailman/listinfo/glade-users
> >> >
> >> >
> >
> >
>

_______________________________________________
Glade-users maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.