[pygtk] Re: [Glade-users] Translation, gtk labels, and gettext

2007-12-07 Thread Caleb Marcus
On Fri, 2007-12-07 at 14:42 -0200, Tristan Van Berkom wrote:

 On Dec 7, 2007 4:06 AM, Caleb Marcus [EMAIL PROTECTED] wrote:
 
 I'm now having issues with glade and gettext. I can run
 xgettext directly on the glade file, but that just produces a
 file with ALL the strings, not just the translatable ones. I
 can run intltool-extract on the glade file to produce a .h
 file, but running xgettext on the result doesn't produce any
 output unless I use the -a argument, which just extracts all
 the strings, which I don't want. What should I do?
 
 I was under the impression that there is an intltool rule for this
 (similar to INTLTOOL_XML_NOMERGE_RULE) that you can
 add to your project's makefile to create myproject.glade from
 myproject.glade.in .
 
 although I just noticed that glade 2 used to dump translatable
 strings 
 into a file for this purpose; IMO this should be the domain of
 intltool
 to extract translations from glade files (or gtkbuilder files). 
 
 I would recommend that you verify that such a rule doesnt exist
 yet and file an rfe under intltool for that.
 
 Cheers,
  -Tristan
 
I don't have a makefile... I'm just using the .glade file with libglade
in Python.


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Translation, gtk labels, and gettext

2007-12-06 Thread Caleb Marcus
On Dec 6, 2007 3:38 AM, Ed Catmur [EMAIL PROTECTED] wrote:


 On Thu, 2007-12-06 at 00:49 -0500, Caleb Marcus wrote:
  I'm planning to make my application translatable with gettext. Do I
  have to make the text in my gtk stock buttons and things like that use
  gettext, or will they automatically translate due to their use of gtk
  stock things?

 Try it and see:

 LC_ALL=es_ES.UTF-8 python -c 'import gtk; w = gtk.Window(); b =
 gtk.Button(gtk-open); b.set_use_stock(True); w.add(b); w.show_all();
 gtk.main()'

 The answer is yes; obviously if you're registering your own stock items
 with gtk.stock_add you'll need to translate those.

 Ed


Alright, I just thought that maybe GTK included translations for stock items
like gtk-add. How would I go about making the text in the buttons
translatable? Will I have to move from stock buttons to label-based buttons?
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Re: Translation, gtk labels, and gettext

2007-12-06 Thread Caleb Marcus
I'm now having issues with glade and gettext. I can run xgettext
directly on the glade file, but that just produces a file with ALL the
strings, not just the translatable ones. I can run intltool-extract on
the glade file to produce a .h file, but running xgettext on the result
doesn't produce any output unless I use the -a argument, which just
extracts all the strings, which I don't want. What should I do?


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Translation, gtk labels, and gettext

2007-12-05 Thread Caleb Marcus
I'm planning to make my application translatable with gettext. Do I have
to make the text in my gtk stock buttons and things like that use
gettext, or will they automatically translate due to their use of gtk
stock things?


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] ListStore iter vs. path

2007-12-03 Thread Caleb Marcus
I'm just starting to learn PyGTK and GUI programming in general, and
Tree/ListViews confuse me tremendously. One question I have is, what's
the difference between iters and paths? It seems like paths are much
easier to use, because I can simply use model[path][column] to access
any part of the ListStore. Is there any way to get the current selection
as a path rather than an iter?


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] context menus for ListViews

2007-12-03 Thread Caleb Marcus
How can I create context menus for ListView elements? The PyGTK Tutorial
doesn't go into this, and I can't follow the GtkTreeView tutorial as
it's not in Python.


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Formatting in labels

2007-12-02 Thread Caleb Marcus
On Sun, 2007-12-02 at 11:05 +0100, Gian Mario Tagliaretti wrote:

 2007/12/2, Caleb Marcus [EMAIL PROTECTED]:
 
 Hi Caleb,
 
   I'm trying to format the text in a label in my dialog to match the example
  text in the image I've attached, which came from the Gnome HIG. How can I do
  this?
 
 From what you said is not clear what is the part you are missing, or
 are you asking for a complete example that reproduce the message box
 in the image?
 
 cheers

The big bold text at the top.


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Formatting in labels

2007-12-02 Thread Caleb Marcus
On Sun, 2007-12-02 at 11:54 -0800, Dog Walker wrote:

 
 gtk.Label.set_markup('bMake this bold/b, please')
 

Thanks, that worked quite well.


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Formatting in labels

2007-12-01 Thread Caleb Marcus
I'm trying to format the text in a label in my dialog to match the
example text in the image I've attached, which came from the Gnome HIG.
How can I do this?
attachment: image2.png

signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Trouble with TreeViews

2007-11-12 Thread Caleb Marcus
Yeah, I just figured that out :)
On Mon, 2007-11-12 at 08:11 +0100, Yann Leboulanger wrote:

 Caleb Marcus a écrit :
  I've read those, but I can't quite understand how to get it to work. 
  I've attached a glade XML file and a Python file that I'm using to test 
  the ability to manipulate TreeViews in Python. I'm just trying to get 
  Column1text into the first column, and the number 2 into the second 
  column, but it's not working... could anyone help me get this figured 
  out? If you're running it, you'll need python-glade, and both files will 
  need to be in the same directory.
  On Sun, 2007-11-11 at 19:21 +0100, Gian Mario Tagliaretti wrote:
  2007/11/11, Caleb Marcus [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
  
I'm pretty new to Python, and days-new to GTK, and the TreeView widget 
   is
   confusing the hell out of me... is there a good guide to using it?
 
  the pygtk tutorial has got a section dedicated to the treeview widget:
  http://www.pygtk.org/pygtk2tutorial/ch-TreeViewWidget.html
 
  also check the pygtk FAQ:
  http://faq.pygtk.org/index.py?req=index
 
  cheers
  
  
  
  
  ___
  pygtk mailing list   pygtk@daa.com.au
  http://www.daa.com.au/mailman/listinfo/pygtk
  Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
 
 replace text=1 and text=2 by text=0 and text=1
 


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Trouble with TreeViews

2007-11-11 Thread Caleb Marcus
I'm pretty new to Python, and days-new to GTK, and the TreeView widget
is confusing the hell out of me... is there a good guide to using it?


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Trouble with TreeViews

2007-11-11 Thread Caleb Marcus
I've read those, but I can't quite understand how to get it to work.
I've attached a glade XML file and a Python file that I'm using to test
the ability to manipulate TreeViews in Python. I'm just trying to get
Column1text into the first column, and the number 2 into the second
column, but it's not working... could anyone help me get this figured
out? If you're running it, you'll need python-glade, and both files will
need to be in the same directory.
On Sun, 2007-11-11 at 19:21 +0100, Gian Mario Tagliaretti wrote:

 2007/11/11, Caleb Marcus [EMAIL PROTECTED]:
 
   I'm pretty new to Python, and days-new to GTK, and the TreeView widget is
  confusing the hell out of me... is there a good guide to using it?
 
 the pygtk tutorial has got a section dedicated to the treeview widget:
 http://www.pygtk.org/pygtk2tutorial/ch-TreeViewWidget.html
 
 also check the pygtk FAQ:
 http://faq.pygtk.org/index.py?req=index
 
 cheers


test.glade
Description: application/glade
#!/usr/bin/env python
import gtk, gtk.glade, sys
gladexml = gtk.glade.XML('test.glade')
gtklist = gladexml.get_widget('treeview1')
gtklist.append_column(gtk.TreeViewColumn(Column1, gtk.CellRendererText(), text=1))
gtklist.append_column(gtk.TreeViewColumn(Column2, gtk.CellRendererText(), text=2))
gtklistmodel = gtk.ListStore(str, int)
gtklist.set_model(gtklistmodel)
gtklistmodel.append(['Column1text', 2])
gtk.main()


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Trouble with TreeViews

2007-11-11 Thread Caleb Marcus
Aha, I figured out what I did wrong.
On Sun, 2007-11-11 at 17:02 -0500, Caleb Marcus wrote:

 I've read those, but I can't quite understand how to get it to work.
 I've attached a glade XML file and a Python file that I'm using to
 test the ability to manipulate TreeViews in Python. I'm just trying to
 get Column1text into the first column, and the number 2 into the
 second column, but it's not working... could anyone help me get this
 figured out? If you're running it, you'll need python-glade, and both
 files will need to be in the same directory.
 On Sun, 2007-11-11 at 19:21 +0100, Gian Mario Tagliaretti wrote: 
 
  2007/11/11, Caleb Marcus [EMAIL PROTECTED]:
  
I'm pretty new to Python, and days-new to GTK, and the TreeView widget is
   confusing the hell out of me... is there a good guide to using it?
  
  the pygtk tutorial has got a section dedicated to the treeview widget:
  http://www.pygtk.org/pygtk2tutorial/ch-TreeViewWidget.html
  
  also check the pygtk FAQ:
  http://faq.pygtk.org/index.py?req=index
  
  cheers


signature.asc
Description: This is a digitally signed message part
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/