Re: [pygtk] Issues when building from source - missing _gtk.so

2008-10-08 Thread [EMAIL PROTECTED]
-- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>I've spent a few hours on this one and I'm having some troubles. I'm >trying 
>to build PyGTK 2.12.1 from source and everything builds fine >except _gtk.so. 
>I'm using Python 2.6 (hence trying to build PyGTK >from source) and here is 
>what I feel is the relevant information from >the configure script (please let 
>me know if more is needed):
>
># ./configure --prefix=/usr
>...
>The following modules will be built:
>
>atk
>gtk with 2.10 API
>gtk.unixprint
>
>The following modules will NOT be built:
>
>pango
>pangocairo
>gtk.glade
>
>When I run make it creates a file called _gtk.la and in the .libs >directory 
>has:
>
>atk.exp
>atk.la -> ../atk.la
>atk_la-atkmodule.o
>atk_la-atk.o
>atk.lai
>atk.so
>atk.ver
>
>I would have expected the gtk stuff to show up in there as well, but >it 
>doesn't. Searching for _gtk.so within the PyGTK source directory >returns 
>nothing.
>
>Can anyone please help me figure out why _gtk.so isn't getting built? >I'm 
>sure it's something stupid, like a flag I forgot on the configure >line. Any 
>help would be greatly appreciated.
>
>Chris

Ok, forget it. Naturally 5 minutes after I sent the email the issue worked 
itself out. _gtk.so was in gtk/.libs and not in .libs. Second, I was initially 
calling configure with --build=x86_64 and removing that created _gtk.so just 
fine. So I'm good to go.


Great pay, great benefits, rewarding.  Click for information on a healthcare 
career.
http://thirdpartyoffers.juno.com/TGL2131/fc/Ioyw6iighYVKbRJjmcJhFgeV3xHw6rC1C7E6haeZ7wzAN5yi1QOYEz/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Issues when building from source - missing _gtk.so

2008-10-08 Thread [EMAIL PROTECTED]
I've spent a few hours on this one and I'm having some troubles. I'm trying to 
build PyGTK 2.12.1 from source and everything builds fine except _gtk.so. I'm 
using Python 2.6 (hence trying to build PyGTK from source) and here is what I 
feel is the relevant information from the configure script (please let me know 
if more is needed):

# ./configure --prefix=/usr
...
The following modules will be built:

atk
gtk with 2.10 API
gtk.unixprint

The following modules will NOT be built:

pango
pangocairo
gtk.glade

When I run make it creates a file called _gtk.la and in the .libs directory has:

atk.exp
atk.la -> ../atk.la
atk_la-atkmodule.o
atk_la-atk.o
atk.lai
atk.so
atk.ver

I would have expected the gtk stuff to show up in there as well, but it 
doesn't. Searching for _gtk.so within the PyGTK source directory returns 
nothing.

Can anyone please help me figure out why _gtk.so isn't getting built? I'm sure 
it's something stupid, like a flag I forgot on the configure line. Any help 
would be greatly appreciated.

Chris



Great pay, great benefits, rewarding.  Click for information on a healthcare 
career.
http://thirdpartyoffers.juno.com/TGL2131/fc/Ioyw6iighYVKbRJjmcJhFgeV3xHw6rC1C7E6haeZ7wzAN5yi1QOYEz/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] applet example

2008-09-25 Thread [EMAIL PROTECTED]
http://www.pygtk.org/articles/applets_arturogf/index.html
I use this tutorial one week ago !
Version i use :
>>> import gtk
>>> gtk.pygtk_version
(2, 12, 1)
>>> gtk.gtk_version
(2, 12, 11)

On Sep 24, 12:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> you can have a look at :http://polariscorp.free.fr/screenapplet.php
>
> stéphane
>
> hi
>
> there is a tutorial about "Gnome applets with Python" 
> inhttp://www.pygtk.org/articles/applets_arturogf/index.htmlbut it is from 
> 2004 and uses an old api...
>
> Can someone point me the most simple example of a gnome applet? There are 
> some examples of applets in the Applications section but they are large 
> programs.
>
> daniel
>
> ___
> pygtk mailing list   [EMAIL PROTECTED]://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ:http://www.async.com.br/faq/pygtk/
___
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] applet example

2008-09-24 Thread [EMAIL PROTECTED]
you can have a look at : 
http://polariscorp.free.fr/screenapplet.php

stéphane



hi

there is a tutorial about "Gnome applets with Python" in 
http://www.pygtk.org/articles/applets_arturogf/index.html but it is from 2004 
and uses an old api...

Can someone point me the most simple example of a gnome applet? There are some 
examples of applets in the Applications section but they are large programs.

daniel
___
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] about applet in gnome and pygtk

2008-08-15 Thread [EMAIL PROTECTED]
Hello !
I worked with python and just a little with pygtk.
I need help to create one applet to panel gnome.
The GUI is made with glade.
What should I do ?
Thank you !
___
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] refreshing gtk.IconView

2008-07-13 Thread [EMAIL PROTECTED]
hi all,
im trying write simple app for viewing my photo collection.
and now i have little problem. I want update IconView after
every
single loaded photo and not update after all photos loaded.
here`s source

from __future__ import with_statement
import threading
import gtk
import os   
gtk.gdk.threads_init()

class app(gtk.Window):
def __init__(self):
gtk.Window.__init__(self)
self.set_title("spoView")
self.set_default_size(400, 500)
self.connect("destroy", gtk.main_quit)

scroll = gtk.ScrolledWindow()
scroll.set_border_width(2)
scroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
scroll.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)

thumb_view = gtk.IconView()
model = gtk.ListStore(str, gtk.gdk.Pixbuf)
thumb_view.set_model(model)
thumb_view.set_text_column(0)
thumb_view.set_pixbuf_column(1)
thumb_view.set_columns(4)

vbox = gtk.VBox()
status = gtk.Statusbar()

scroll.add(thumb_view)
vbox.pack_start(scroll, True, True)
vbox.pack_start(status, False, False)
self.add(vbox)
self.show_all()

files = os.listdir("/home/spooky/Pictures/100_FUJI")
thread = threading.RLock()
with thread:
for image in files:
pixbuf =
gtk.gdk.pixbuf_new_from_file_at_size("/home/spooky/Pictures/100_FUJI/%s"
% image, 96, 96)
model.append([image, pixbuf])

status.push(0, "%s files loaded." % len(files))

a = app()
gtk.main()

thanks for your help.
___
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] pygtk and gtk

2008-07-11 Thread [EMAIL PROTECTED]
I have some problems with module gtk
I try use this code :
import sys
#import pdb; pdb.set_trace()
try:
import pygtk
pygtk.require("2.0")
print "pygtk2.0 = ok"
except:
pass
try:
import gtk
print "gtk = ok"
import gtk.glade
print "gtk.glade = ok"
except:
sys.exit(1)

 python
Python 2.6b1 (r26b1:64398, Jul  4 2008, 15:57:20)
[GCC 4.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
  File "", line 1, in 
  File "/var/lib/python-support/python2.5/gtk-2.0/gtk/__init__.py",
line 38, in 
import gobject as _gobject
  File "/var/lib/python-support/python2.5/gtk-2.0/gobject/
__init__.py", line 30, in 
from gobject.constants import *
  File "/var/lib/python-support/python2.5/gtk-2.0/gobject/
constants.py", line 22, in 
from _gobject import type_from_name
ImportError: /var/lib/python-support/python2.5/gtk-2.0/gobject/
_gobject.so: undefined symbol: PyUnicodeUCS4_FromObject
Thank you !
___
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] gtk.Notebook

2008-07-09 Thread [EMAIL PROTECTED]

In gtk notebook page_num(child) being a widget
Returns :   the index of the page containing child, or -1

So here is the problem:

Added button to tab for close so I need the page the button is on since the
button grabs focus rather than the tab. I tried emit back to parent and that 
failed to produce anything.

The code segements:

Creation:
   #--
   def new_page(self, arg, filename):
  self.z = self.z + 1
  # create  scroller, gtksourceview, buffer and set mime
  scroller = gtk.ScrolledWindow()
  scroller.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
  bufferS = gtksourceview.SourceBuffer()
  manager = gtksourceview.SourceLanguagesManager()
  if arg:
 type = gnomevfs.get_mime_type(arg)
 language = manager.get_language_from_mime_type(type)
  else:
 language = manager.get_language_from_mime_type('text')
  bufferS.set_language(language)
  view = gtksourceview.SourceView(bufferS)
  scroller.add(view)
  # set defaults for gtksourceview and buffer
  bufferS.set_highlight(self.HIGHLIGHT)
  bufferS.set_check_brackets(self.CHECK_BRACKETS)
  view.set_show_line_numbers(self.SHOW_LINE_NUMBERS)
  view.set_show_margin(self.SHOW_MARGIN)
  view.set_auto_indent(self.AUTO_INDENT)
  view.set_tabs_width(int(self.TABS_WIDTH))
  view.set_insert_spaces_instead_of_tabs(self.INSERT_SPACES_INSTEAD_OF_TABS)
  view.set_margin(int(self.MARGIN))
  # add close button
  image = gtk.Image()
  image.set_from_file("data/images/close.png")
  btn = gtk.Button()
  btn.add(image)
  btn.connect('clicked',self.on_close_btn)
  #btn.set_size_request(16,16)
  # add label
  hbox = gtk.HBox(False,3)
  if not arg:
 self.key[self.z] = gtk.Label(filename)
  else:
 self.key[self.z] = gtk.Label(filename.rsplit('/',1)[1])
  hbox.add(self.key[self.z])
  hbox.add(btn)
  hbox.show_all()
  # load and set text
  if arg:
 try:
bufferS.begin_not_undoable_action()
f = open(arg, 'r')
bufferS.set_text(f.read())
f.close()
bufferS.end_not_undoable_action()  
 except:
print 'File Error: '+arg
  else:
 bufferS.set_text('')
  # populate tree
  iter = None
  iter = self.mod.append(iter)
  if arg:
 self.mod.set(iter,0, arg)
  else:
 self.mod.set(iter,0, filename)
  self.mod.set(iter,1, self.key[self.z].get_text())
  self.mod.set(iter,2, view)
  self.mod.set(iter,3, bufferS)
  self.mod.set(iter,4, self.key[self.z])
  self.view = view
  self.bufferS = bufferS
  # add page
  page = self.mdi_book.append_page(scroller,hbox)
  self.mdi_book.show_all()
  # switch to page
  self.mdi_book.set_current_page(page)
 
 Callbacks:
#--
   def on_close_btn(self, widget):
  p = self.mdi_book.page_num(widget)
  self.on_update_tree('delete')
  self.mdi_book.remove_page(p)   
   #--
   def on_close(self, widget):
  p = self.mdi_book.get_current_page()
  self.on_update_tree('delete')
  self.mdi_book.remove_page(p)   

 




___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
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] pygobject-2-4 branch

2008-07-09 Thread [EMAIL PROTECTED]
Hi!
I'm trying to compile a python application that requires pygobject.
However compiling pygobject does not work with my glib2-2.6.3-4 (comes 
from opensuse 9.3)
The configure script claims I can use pygobject-2-4 branch. But I 
really couldn't find it anywhere. Could you someone point it to me 
please?
I can't update to a newer distro because I have a lot of things 
recompiled from sources, so it would require too much work to create 
again the same environment, and I fear that updating glib2 to 2.8 could 
broke something..
(please CC me as i'm not subrscribed to the list).

Thanks
Andrea




_
Rendi Sicuro il tuo Pc con Norton Antivirus!
Fino al 15 ottobre hai 2 mesi gratis.
http://vas.tiscali.it/internet_security//

___
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] gtk.set_state question. Change button state

2008-06-15 Thread [EMAIL PROTECTED]
Hi group,

I desable a button with button.set_state(gtk.STATE_INSENSITIVE) in one
procedure. In other I need enable it, but a simple
button.set_state(gtk.STATE_NORMAL), not enable it.

How I can make it?

Program sample:
def b1_callback(widget, data = None):
print 'button1 is clicked. Disable button 1.'
widget.set_state(gtk.STATE_INSENSITIVE)

def b2_callback(widget, button):
print 'button 2 is clicked. Enable button 1.'
button.set_state(gtk.STATE_NORMAL)

class test:
...
button1 = gtk.Button('Button 1')
button2 = gtk.Button('Button 2')
button1.connect('clicked', b1_callback)
button2.connect('clicked', b2_callback)
...

Thanks,
Rudson Alves




___
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] DirectoryTreeView

2008-03-23 Thread [EMAIL PROTECTED]
hi,
can someone help me fill my TreeView with actual directory.
my [working as is ] code:

treestore is (gtk.Pixbuf(), actual_file_or_dir(str),
full_path(str))

def get_file_list(iter, dir, subdirs):
""" fill my file treestore """
for file in os.listdir(dir):
actual_file = os.path.join(dir, file)
if os.path.isfile(actual_file):
file_store.append(iter, [None, file, None])
elif os.path.isdir(actual_file) and subdirs:
iter = file_store.append(iter, [None, file, None])
get_file_list(iter, actual_file, subdirs)

self.get_file_list(None, "/home/martin/Develop", True)

thanks a lot

___
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] Syntax completeion example

2008-01-09 Thread [EMAIL PROTECTED]


I have already built and have a functional completion system.
However, I would also like to add the complete constructor via
a tooltip. (e.g. gtk.Window(type=gtk.WINDOW_TOPLEVEL) )

Thus if you had gtk.Window( then a tooltip would give constructor.

Has anyone seen an example of same?

Thanks 
John



___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
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] gtk.Notebook

2008-01-06 Thread [EMAIL PROTECTED]

In gtk notebook page_num(child) being a widget
Returns : the index of the page containing child, or -1

So here is the problem:

Added button to tab for close so I need the page the button is on since the
button grabs focus rather than the tab. I tried emit back to parent and that
failed to produce anything.

The code segements:

Creation:
   #--
   def new_page(self, arg, filename):
  self.z = self.z + 1
  # create  scroller, gtksourceview, buffer and set mime
  scroller = gtk.ScrolledWindow()
  scroller.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
  bufferS = gtksourceview.SourceBuffer()
  manager = gtksourceview.SourceLanguagesManager()
  if arg:
 type = gnomevfs.get_mime_type(arg)
 language = manager.get_language_from_mime_type(type)
  else:
 language = manager.get_language_from_mime_type('text')
  bufferS.set_language(language)
  view = gtksourceview.SourceView(bufferS)
  scroller.add(view)
  # set defaults for gtksourceview and buffer
  bufferS.set_highlight(self.HIGHLIGHT)
  bufferS.set_check_brackets(self.CHECK_BRACKETS)
  view.set_show_line_numbers(self.SHOW_LINE_NUMBERS)
  view.set_show_margin(self.SHOW_MARGIN)
  view.set_auto_indent(self.AUTO_INDENT)
  view.set_tabs_width(int(self.TABS_WIDTH))
  view.set_insert_spaces_instead_of_tabs(self.INSERT_SPACES_INSTEAD_OF_TABS)
  view.set_margin(int(self.MARGIN))
  # add close button
  image = gtk.Image()
  image.set_from_file("data/images/close.png")
  btn = gtk.Button()
  btn.add(image)
  btn.connect('clicked',self.on_close_btn)
  #btn.set_size_request(16,16)
  # add label
  hbox = gtk.HBox(False,3)
  if not arg:
 self.key[self.z] = gtk.Label(filename)
  else:
 self.key[self.z] = gtk.Label(filename.rsplit('/',1)[1])
  hbox.add(self.key[self.z])
  hbox.add(btn)
  hbox.show_all()
  # load and set text
  if arg:
 try:
bufferS.begin_not_undoable_action()
f = open(arg, 'r')
bufferS.set_text(f.read())
f.close()
bufferS.end_not_undoable_action()  
 except:
print 'File Error: '+arg
  else:
 bufferS.set_text('')
  # populate tree
  iter = None
  iter = self.mod.append(iter)
  if arg:
 self.mod.set(iter,0, arg)
  else:
 self.mod.set(iter,0, filename)
  self.mod.set(iter,1, self.key[self.z].get_text())
  self.mod.set(iter,2, view)
  self.mod.set(iter,3, bufferS)
  self.mod.set(iter,4, self.key[self.z])
  self.view = view
  self.bufferS = bufferS
  # add page
  page = self.mdi_book.append_page(scroller,hbox)
  self.mdi_book.show_all()
  # switch to page
  self.mdi_book.set_current_page(page)

Callbacks:
#--
   def on_close_btn(self, widget):
  page = self.mdi_book.page_num(widget)
  print page
   #--
   def on_close(self, widget):
  p = self.mdi_book.get_current_page()
  self.on_update_tree('delete')
  self.mdi_book.remove_page(p)   
 




___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


___
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] what difference is between "Signal" and "Event"

2007-12-16 Thread [EMAIL PROTECTED]
pygtk
   I can not understand the differece between "Signal" and "Event", help me, 
thank you


[EMAIL PROTECTED]@gmail.com
2007-12-17 
___
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/


Fwd:Re: [pygtk] Custom icons not showed!

2007-08-18 Thread [EMAIL PROTECTED]
-- Initial Header ---

>From  : [EMAIL PROTECTED]
To  : "[EMAIL PROTECTED]" [EMAIL PROTECTED]
Cc  : "pygtk" pygtk@daa.com.au
Date  : Sat, 18 Aug 2007 13:46:24 +0200
Subject : Re: [pygtk] Custom icons not showed!







> 2007/8/18, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > Hi! Can someone explain me why does xfce not shows custom icons on 
> > toolbuttons? Thanks!
>
> I'm pretty sure that providing an example and a more detailed
> explanation of the problem will make thing easier for who wants to
> help you.
>
> cheers
> --
> Gian Mario Tagliaretti
>

Ok thanks! I have edited some custom icons in png format and I've added
them inside the toolbuttons of a toolbar. I've tested the application with KDE, 
fluxbox and other windows managers, only Xfce don't show the
custom icons. Here is how I construct them:

image18=gtk.Image()
image18.set_from_file('icons/select_all.png')
self.toolbutton18.get_child().get_child().pack_start(image18)

etc...

Maybe I have to add a different dimension copy?

___
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] Custom icons not showed!

2007-08-18 Thread [EMAIL PROTECTED]
Hi! Can someone explain me why does xfce not shows custom icons on toolbuttons? 
Thanks!
___
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] Table fg color

2007-04-04 Thread [EMAIL PROTECTED]
Hello all! I have a scrolledwindow with an eventbox inside; after I use the 
method scrolledwindow.add_with_viewport(table) to add a table and set the fg 
color of the eventbox, but the rows space color don't change.
How can I do? Thanks!


--
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://click.libero.it/imode


___
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] (no subject)

2007-03-13 Thread [EMAIL PROTECTED]
Hello all! Unfortunately, there is not a high level widget to construct a 
directory tree. I think the only solution is to use a gtk.TreeStore, but what 
trick to make tree columns dinamically? I agree examples or tutorial's link. 
Thanks!


--
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it


___
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] Image gallery

2007-03-01 Thread [EMAIL PROTECTED]
Hello all!
I don't know if it's a good idea writing an image viewer in pygtk for 
performance motive, but I'd like it at least for personal use.
The core function is this:

def Make_Thumbnails(self,event):
i=0
for infile in self.list:
pixbuf = gtk.gdk.pixbuf_new_from_file(infile)  
scaled_buf=pixbuf.scale_simple(200,150,gtk.gdk.INTERP.BILINEAR)
self.image[i].set_from_pixbuf(scaled_buf)
i+=1
del pixbuf

The problem is that the gallery is dispayed  when all images are processed.
Is it possible display images progressively?
I've tried with the gtk.gdkpixbufloader() , with the same result.
Thanks! 


--
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada1marz07


___
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] Installing pygtk on linuxRH8

2007-01-14 Thread [EMAIL PROTECTED]
Hello,
I'm trying to pass developing GUI from microsoft windows to Linux. I saw that 
was possible do it using python with pygtk, so I downloaded both python 
interpreter and its gtk bindings for the windows version, for studing and 
laerning to use it.
Now I want to install them in a Linux system:
I have linux Red Hat 8, so I updated a bit of packages, downloading and 
installing the following:

cairo-1.2.6.tar.gz
pycairo-1.2.6.tar.gz
Python-2.5.tar
pygtk-2.8.6.tar.gz
pango-1.14.9.tar.gz
glib-2.12.6.tar.gz
atk-1.10.3.tar.gz
libpng-1.2.15.tar.bz2
libxml2-2.6.9.tar.bz2
jpegsrc.v6b.tar.gz
glitz-0.5.6.tar.gz
zlib-1.2.3.tar.gz
libxcb-0.9.91.tar.gz
libXrender-0.8.4.tar.gz
fontconfig-2.4.2.tar.gz
freetype-2.2.1.tar.bz2
tiff-3.8.0.tar.gz

but when I type the configure script of pygtk, it says that will not be 
installed the modules pycairo and gtk.glade.
Have you got any idea for helping me?
I really don't know what other to do..

thank's to every body


--
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada14gen07


___
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] New pygtk developer

2006-12-24 Thread [EMAIL PROTECTED]
Hello to every body,
I would like passing from window to linux and I'm studing pygtk for developing 
GUIs; I use Glade to design the interface and so I bind to it with pygtk...but 
there's a thing that I'm not able to do, and I don't find any example about it, 
and I hope somebody can hep me.
I have a glade file, with 3 windows (gtk.Window); how can I do to access to the 
single widgets of every window?
For example, in window1 there is a gtk.Label called lbDesc, and there is 
another with the same name in window2. How can I refer to one or the other to 
set their text label?
I'm sorry for my not perfect english, and I hope someone can answer to my 
question
thank'you


--
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada24dic06


___
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] gnome-python documentation

2005-10-18 Thread [EMAIL PROTECTED]




Hello,

Where can I find an information about subj? I have found pygtk-reference, but I can't find gnome, gnomeui, bonobo and such documents.

Thanks.



-- 
[EMAIL PROTECTED] <[EMAIL PROTECTED]>





___
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] [gtk.colorbutton] How to get the color in hexadecimal string

2005-10-17 Thread [EMAIL PROTECTED]

Hi list,

I'm using a gtk.colorbutton to select a color.
My problem is to retrieve the hexadecimal string from the 
|gtk.gdk.Color. 



I tryied also to retrieve the rgb value but without success.
Eveytime i try, it return me 0 as value.

Can i retrieve it directly in the | gtk.colorselectiondialog, as we can 
see the hexadecimal string?


Thanks a lot for your answers,
Philippe Collet

___
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] Pygtk + Glade + OO

2005-10-10 Thread [EMAIL PROTECTED]

Hi list,

I want to design my gui using glade and then inherit some classes from 
widget of the gui.
As i can only get the instance of widgets using 
gtk.glade.XML.get_widget(name), how can i inherit some classes from the 
instance?


Thanks a lot for your answer.
Philippe Collet


___
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: pygtk Digest, Vol 32, Issue 11

2005-10-10 Thread [EMAIL PROTECTED]

Hi murat,

First are you sure you need to know which row is selected?

Then,
You can check if the selected path is in  
gtk.Treeview.get_selection().get_selected_rows().
You retrieve the selected path using the signal emitted by 
gtk.Treeview.connect('clicked',self.on_treeview_button_press_event) and 
the position of the button clicked.


def on_treeview_button_press_event(self, treeview, event):
#get the path for the click
   path = treeview.get_path_at_pos(int(event.x),int(event.y))
   
# get the selected rows in the selection

   rows = treeview.get_selection().get_selected_rows()
   if path != None:
   if path[0] not in rows[1]:
   # not clicked on a current selected rows. Change 
selection

   selection.unselect_all()
   selection.select_path(path[0])

For your need, the line path = 
treeview.get_path_at_pos(int(event.x),int(event.y)) is enough.

I invite you to read the pygtk faq.

Hope it will help you.

Regards,
Philippe Collet


Message: 6
Date: Sun, 09 Oct 2005 20:43:00 +0300
From: Murat Kasikcioglu <[EMAIL PROTECTED]>
Subject: [pygtk] treeview - handle mouse click - selected row
To: pygtk@daa.com.au
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

hi all,

i'm a newbie using pygtk.
i could not find a solution howto use a treeview object.

my problem is how i can handle which row is clicked.

any suggestion is welcome.

regards,
murat.





___
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] Rewrite behaviour on signal 'button_press_event' in treeview

2005-09-12 Thread [EMAIL PROTECTED]

Hi Tom,

First, i must say very good job. Your soft is very nice to use and the 
source code is very clear.
You made a powerfull installer, you can print using gnomeprint, i18n 
works finely.

I'm hoping i can do a software as clean as yours.

First i didn't find the behaviour then i started writing this 
mail,finally i succeeded in dragging and dropping several rows.

Thanks a lot for your explanations.

regards,
Philippe Collet

Thomas Mills Hinkle wrote:


On 9/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

 


I use button_press_event because my problem is due to drag & drop which
happen only with button press_event.
Have you ever tryied drag and drop several rows from a treeview?
I think you should be surprised on the result even if you use
set_mode(gtk.SELECTION_MULTIPLE) or
   



I use multiple-selection dnd all the time -- it's a little
counterintuitive, but if you hold down control to select the last item
and then drag, it works (for me anyway).

Of course if you click just once, then you lose your multiple
selections, which is a bummer, but is the expected behavior of a click
in multiple-selection-mode.

btw, I'm using exactly the same setup you are -- multiple rows from
one treeview to another. You're welcome to poke around my source for
help if you want, though it's not the most beautiful stuff in the
world. I have it set up to move the selection from on treeview to the
next and such automagically (so that if you select A & B and move them
from treeview 1 to treeview 2, they will be selected when they arrive
in treeview 2).

If you do want to poke at the source, the relevant bits have to do
with slTree and pTree (the two trees you can dnd between). The
following explains the interface that code is controlling:
http://grecipe-manager.sourceforge.net/#shopping

Tom


 




___
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] Rewrite behaviour on signal 'button_press_event' in treeview

2005-09-12 Thread [EMAIL PROTECTED]

Thomas Mills Hinkle wrote:


On 9/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

 


I use button_press_event because my problem is due to drag & drop which
happen only with button press_event.
Have you ever tryied drag and drop several rows from a treeview?
I think you should be surprised on the result even if you use
set_mode(gtk.SELECTION_MULTIPLE) or
   



I use multiple-selection dnd all the time -- it's a little
counterintuitive, but if you hold down control to select the last item
and then drag, it works (for me anyway).

Of course if you click just once, then you lose your multiple
selections, which is a bummer, but is the expected behavior of a click
in multiple-selection-mode.

btw, I'm using exactly the same setup you are -- multiple rows from
one treeview to another. You're welcome to poke around my source for
help if you want, though it's not the most beautiful stuff in the
world. I have it set up to move the selection from on treeview to the
next and such automagically (so that if you select A & B and move them
from treeview 1 to treeview 2, they will be selected when they arrive
in treeview 2).

If you do want to poke at the source, the relevant bits have to do
with slTree and pTree (the two trees you can dnd between). The
following explains the interface that code is controlling:
http://grecipe-manager.sourceforge.net/#shopping

Tom
 


Thanks a lot Tom.
What a good piece of news that multiple drag and drop is working.
I tryied it in my own code but something is missing bacause, only one 
line keep selected when i drag.

Thanks a lot for sharing your code for DnD treeviews.
Regards,
Philippe Collet


___
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: Re: [pygtk] Rewrite behaviour on signal 'button_press_event' in treeview

2005-09-12 Thread [EMAIL PROTECTED]

Nikos Kouremenos wrote:


On 9/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
 


Hi list,

I need to select multiple rows from a treeview, drag and drop them to
another treeview.
The problem is when i click on a selected row, the other rows previously
selected are deselected.
But i want to keep them selected for the drag & drop !

1. Is there a way to do it without rewriting callback for
'button_press_event_signal'?
  



google and/or looking at API would have gave you a faster answer:
http://pygtk.org/pygtk2reference/class-gtktreeselection.html#method-gtktreeselection--set-mode 



so you before everything
treeview.get_selection().set_mode()
 


Thanks for your answer.
Nevertheless, of course i looked first in the pygtk2reference and i 
already use treeview.get_selection().set_mode().

  self.treeSelection = self.get_selection()
  self.treeSelection.set_mode(gtk.SELECTION_MULTIPLE)
This works only for selecting rows in a treeview. It has no effects on 
drag&drop behaviour.



When i try to rewrite the callback, i need to know the iter or the path
of the row i clicked on with the stuff given by the 'button-press_event'
signal (treeview, event)
2. How can i do this?
I try to use event.x and event.y but it's only the position of the click
in the treeview area. No link with data inside.
So i must know what are the rows actually displayed in the treeview (due
to the use of a scrollbar), which position have each row.
It's not very obvious.
  



why do u use button_press_event and not sth better?

renderer_text.connect('edited',

and you get to have cell, path, text in the CB

read the tutorial/api on treeview

 

I use button_press_event because my problem is due to drag & drop which 
happen only with button press_event.

Have you ever tryied drag and drop several rows from a treeview?
I think you should be surprised on the result even if you use 
set_mode(gtk.SELECTION_MULTIPLE) or


connect('edited',

I read the tutorial api before contacting list but found no answers.
Is there any solution?


Thanks a lot,
Philippe Collet
  


have fun


Cheers,
Philippe Collet

___
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] Rewrite behaviour on signal 'button_press_event' in treeview

2005-09-09 Thread [EMAIL PROTECTED]

Hi list,

I need to select multiple rows from a treeview, drag and drop them to 
another treeview.
The problem is when i click on a selected row, the other rows previously 
selected are deselected.

But i want to keep them selected for the drag & drop !

1. Is there a way to do it without rewriting callback for 
'button_press_event_signal'?


When i try to rewrite the callback, i need to know the iter or the path 
of the row i clicked on with the stuff given by the 'button-press_event' 
signal (treeview, event)

2. How can i do this?
I try to use event.x and event.y but it's only the position of the click 
in the treeview area. No link with data inside.
So i must know what are the rows actually displayed in the treeview (due 
to the use of a scrollbar), which position have each row.

It's not very obvious.

Thanks a lot,
Philippe Collet


___
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] empty Treeview drag & drop warning

2005-09-06 Thread [EMAIL PROTECTED]

Hi list,

I'm using drag & drop on an empty treeview.
When the data are drop i get this warning and nothing happen in the 
treeview:
GtkWarning: gtk_tree_view_scroll_to_cell: assertion 
`tree_view->priv->tree != NULL' failed



Now when i append an empty row: self.model.append(None, ["","",'','',''])
It works but this empty row is annoying me after.

How can i use DnD on an empty treeview?

Thanks for the answer.
regards,
Philippe Collet

Here is the code i use:

   TARGETS = [
   ('text/plain', 0, 0),
   ('TEXT', 0, 1),
   ('STRING', 0, 2),
   ]

   self.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
 [('text/plain', 0, 0)],
 gtk.gdk.ACTION_DEFAULT | gtk.gdk.ACTION_COPY)
   self.connect("drag-data-get", self.drag_data_get_data)
  
   self.enable_model_drag_dest(TARGETS,gtk.gdk.ACTION_DEFAULT)

   self.connect("drag_data_received", self.drag_data_received_cb)

   def drag_data_received_cb(self, treeview, context, x, y, selection,
   info, etime):
   path = None
   position = None
   iter = None
   model = treeview.get_model()
   name = selection.data
   print name
   drop_info = treeview.get_dest_row_at_pos(x, y)
   if drop_info:
   path, position = drop_info
   iter = model.get_iter(path)
   list= 
self.kernelM.guiM.window.visuPanel.fTreeview.get_data_list_from_name(name)

   if (position == gtk.TREE_VIEW_DROP_BEFORE
   or position == gtk.TREE_VIEW_DROP_INTO_OR_BEFORE):
   
model.insert_before(None,iter,[name,list[0],list[1],list[2],list[3]])

   elif position == gtk.TREE_VIEW_DROP_AFTER:
   new_iter = model.insert_after(parent=None, sibling=iter, 
row=[name,list[1],list[2],list[3],list[4]])


   if model.iter_next(iter) != None:
   if context.action == gtk.gdk.ACTION_MOVE:
   context.finish(True, True, etime)
   self.move_to_end()
   return True

   def drag_data_get_data(self, treeview, context, selection, 
target_id,etime):

   #if (GTK_WIDGET_REALIZED(treeview)):
   #treeselection = treeview.get_selection()
   #model, iter = treeselection.get_selected()
   data = self.selItems_list[0].name
   selection.set(selection.target, 8, data)

___
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] Rewrite behaviour on signal 'button_press_event' in treeview

2005-09-06 Thread [EMAIL PROTECTED]

Hi list,

I need to select multiple rows from a treeview, drag and drop them to 
another treeview.
The problem is when i click on a selected row, th other rows previously 
selected are deselected.

But i want to keep them select for the drag & drop !

1. Is there a way to do it without rewriting callback for 
'button_press_event_signal'?


When i try to rewrite the callback, i need to know the iter or the path 
of the row i clicked on with the stuff given by the 'button-press_event' 
signal (treeview, event)

2. How can i do this?
I try to use event.x and event.y but it's only the position of the click 
in the treeview area. No link with data inside.
So i must know what are the rows actually displayed in the treeview (due 
to the use of a scrollbar), which position have each row.

It's not very obvious.

Thanks a lot,
Philippe Collet

___
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] Pb with treeview DnD

2005-09-01 Thread [EMAIL PROTECTED]

Here is the situation:

I have two treeviews. I try to make a drag on the first one and a drop 
on the second one, in order to feed the second one with the data of the 
first one.


When i drop i have thos warning and i can't succed in putting the data 
in the second one.


GtkWarning: gtk_tree_view_scroll_to_cell: assertion 
`tree_view->priv->tree != NULL' failed
  
TARGETS = [

   ('text/plain', 0, 0),
   ('TEXT', 0, 1),
   ('STRING', 0, 2),
   ]

   self.enable_model_drag_dest(TARGETS,gtk.gdk.ACTION_DEFAULT)
   self.connect("drag_data_get", self.drag_data_received_cb)

   def drag_data_received_cb(self,treeview, context, x, y, selection, 
info, timestamp):

   drop_info = treeview.get_dest_row_at_pos(x, y)
   if drop_info:
   model = treeview.get_model()
   path, position = drop_info
   data = selection.data
   print data
   return

Can anyone help me please?
Thanks a lot,
Philippe Collet

___
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] Pb with changin color of alternate row shading on treeview widget

2005-08-31 Thread [EMAIL PROTECTED]

Hi list,

I want to alternate color for the row i have in a treeview. I look in 
the pygtk faq:


13.12. How do I change the color of the alternate row shading on the 
TreeView widget? 



I change gtkrc like this:
style "mystyle" {
   GtkTreeView::even_row_color = "64200"
   GtkTreeView::odd_row_color = "40657"
}

But the color doesn't change.

What is the problem please?

I'm on pygtk 2.6.2 , windows XP, GTK Runtime Environnement 2.6.7.Rc1
Tanks,
Philippe Collet


___
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] [UIManager] how to pass data for each signals in an Actiongroup?

2005-08-31 Thread [EMAIL PROTECTED]

Hi list,

I'm using a uimanager to manage popupMenu.
I create an action list. 
actions_list=[(_('ShowAttributes'),None,'ShowAttributes',None,_('Show 
attributes of current node'),self.show_attributes)]
then i populate the actiongroup with the list: 
actiongroup.add_actions(actionlist)
Finally, i insert the action group in the uimanager: 
uimanager.insert_action_group(actiongroup,0)


How can i pass extra data to the function (here self.show_attributes)?

Thanks for your answer,
Regards,
Philippe Collet

___
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: closing tabs in notebook (Philippe Collet)

2005-08-09 Thread [EMAIL PROTECTED]

Hi Vinay Reddy,
Do you only want a close symbol on the right corner of the tabLabel or 
furthermore the capability to close the page of the notebook when it is clicked?
If you want callback also here is the code i use:
Make sure the path for your icon file is correct. (I'm using a relative path 
perhaps you will have to complete it.)

import pygtk
pygtk.require('2.0')
import gtk

   def add_icon_to_button(self,button,iconFilename):
   iconBox = gtk.HBox(False, 0)
   image = gtk.Image()
   fc=filenameChecker()
   image.set_from_file(iconFilename)

   image.show()
   iconBox.pack_start(image, True, False, 0)
   button.add(iconBox)
   iconBox.show()
   return 


   def create_custom_tab(self,text):
iconFile = "hmi\\images\\close.xpm"   
#create a custom tab for notebook containing a label and a button with 
picture on it
eventBox = gtk.EventBox()
   tabBox = gtk.HBox(False, 2)
   tabLabel = gtk.Label(text)
   
   tabButton=gtk.Button()

   tabButton.connect('clicked',self.on_tabButton_clicked)
   
	#Add a picture on a button

   self.add_icon_to_button(tabButton,iconFile)
   
   iconBox = gtk.HBox(False, 0)
   
   eventBox.show()

   tabButton.show()
   tabLabel.show()

   tabBox.pack_start(tabLabel, False)   
   tabBox.pack_start(tabButton, False)
   
   # needed, otherwise even calling show_all on the notebook won't

   # make the hbox contents appear.
   tabBox.show_all()
   eventBox.add(tabBox)
   return eventBox

and in your main function, just call it with :
eventBox=create_custom_tab("Hello")
#Add your_widget in the page and eventBox as tabLabel
self.notebook.append_page(your_widget,eventBox)


___
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] Glade - Best practice

2005-08-09 Thread [EMAIL PROTECTED]

  
Hi all,

Is it better to use:

self.wTree.get_widget("widget").do_something()
self.wTree.get_widget("widget").do_something_else()
self.wTree.get_widget("widget").do_something_else_again()

or

widget = self.wTree.get_widget("widget")
widget.do_something()
widget.do_something_else()
widget.do_something_else_again()

Thanks



___
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] drag and drop from a treeview to a notebook

2005-08-01 Thread [EMAIL PROTECTED]

Hi list,
I would like to enable a drag and drop from a treeview to a notebook.
For the moment, i suceed in dragging from the treeview but the notebook 
dropping seems not obvious for me.


Has anyone tryied and suceed to drop in a notebook?
Are these targets correct for a notebook ?
self.TARGETS = [

   ('MY_TREE_MODEL_ROW', gtk.TARGET_SAME_WIDGET, 0),
   ('text/plain', 0, 1),
   ('TEXT', 0, 2),
   ('STRING', 0, 3),
   ]

Thaks a lot,
Philippe Collet

___
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] Pygrid warning about type `GtkCellRendererCombo'

2005-07-29 Thread [EMAIL PROTECTED]

Hi list,

Sorry, i know pygrid is not really part of pygtk.
However this list fit the best to the purpose of this post.

I run pygtk 2.6.0
gtk+-develEnvironnement for windows 2.6-rc5
python 2.3
I installed pygrid-0.2.3 for windows.
(.): GLib-GObject-WARNING **: cannot register existing type 
`GtkCellRendererCombo'


1. How can i stop this warning?

Surely it's linked to the wrapping art of pygrid.
But i'm did't understand the way i can wrap a C function.
2.Has anyone tryied out to wrap something?
3. Has anyone a good tutorial about it?

Thanks a lot,
Philippe Collet

___
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] how to resize dynamically all components of a vbox? (= how to resize of vbox?)

2005-07-18 Thread [EMAIL PROTECTED]

Hi list,

I have several components in a vbox. 2 treeview and a buttonbox.

I would be able to resize in width all the components once. But i don't 
know how i can do that.


Can i resize the vbox?
Is there any way to have same system as when we resize treeview column 
(with the double side arrow)?


Thanks a lot for your answers or your suggestions.
Philippe Collet

___
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] How to resize a vbox

2005-07-08 Thread [EMAIL PROTECTED]

Hi list,

Can we resize a vbox or a scrolledWindow or a treeview?

It would be easier if we can resize vbox as i don't have to resize all 
the vbox elements.
Like when we resize a window, i need to have little arrow to resize one 
of these elements.


Is there any solution?

Thanks a lot,
Have a nice week-end =),
Philippe Collet



___
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] need advises on treeview use for memory puprose

2005-07-05 Thread [EMAIL PROTECTED]

Hi list,

I'm using lot of treeviews.

Is it better in memory purpose to:
1. use the gtk.treestore as data storage. (have an entry in the model 
for each simple type str ... or use a more complex object ?).
2. have an independent data storage. (when a row is selected, we search 
the name of the selectedComponent, find it in the dataStorage and modify 
the dataStorage).



Hope my question is clear enough =).
Thanks a lots for you answers,
Philippe Collet



___
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] question about pygrid and adjust column

2005-06-29 Thread [EMAIL PROTECTED]

Hi list,

Sorry for this pygrid specific question.
Is it possible to adjust the size of a pygrid column.

I tryied to use |the set_resizable(*resizable*) method if 
pygrid.GridColumn herited from gtk.TreeViewColumn but set_resizable is 
not recognize.


Extra-question: where can i report bug for pygrid in order to improve it?

Thanks a lot for your answers.
Have a good day,
Philippe Collet
|

___
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] selecting rows in a grid from pygrid

2005-06-21 Thread [EMAIL PROTECTED]

Hi list,

I know pygrid is not linked to the pygrid.
But i don't know where i can ask some questions about it as the main 
site of pygrid is in spanish :/.


I'm using a grid from pygrid in order to display some data.
I don't know wich signal i must use to enable the selection from the mouse.
By default, we can only select one row by cliking on it.

I would be able to click on the left mouse button, move mouse cursor and 
so select all the rows in the selected area.


Has anyone done that before or has anyone have an idea how to proceed?
Thanks a lot,
Philippe Collet

___
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] Treeview drag data and drop it in a notebook

2005-06-15 Thread [EMAIL PROTECTED]

Hi list,

I'm reading the tutorial, testing samples.
However i don't know how to proceed for implementing dragging data from 
a treeeview and dropping it in a notebook.


For the moment, i added this lines for dragging from the treeview.

   self.TARGETS = [
   ('MY_TREE_MODEL_ROW', gtk.TARGET_SAME_WIDGET, 0),
   ('text/plain', 0, 1),
   ('TEXT', 0, 2),
   ('STRING', 0, 3),
   ]
 
   # Allow enable drag and drop of rows including row move

   self.treeview.enable_model_drag_source( gtk.gdk.BUTTON1_MASK,
self.TARGETS,
  gtk.gdk.ACTION_DEFAULT|
 gtk.gdk.ACTION_MOVE)
   self.treeview.connect("drag_data_get", self.drag_data_get_data)

I don't know how self.TARGETS works and what i must put for the notebook.

Has anybody already done that?

Thanks a lot,
Philippe Collet




___
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] Problem with 2 treeviews and 2 popup menus. Each treeview seems to display his popupmenu. Only a popup menu is displayed

2005-06-10 Thread [EMAIL PROTECTED]

Hi everybody,

I have 2 treeviews contained in a hbox.
I create 2 popup menu.

I connect a signal when the right button of mouse is pressed for the 
first treeview:
self.__treeview.connect('button_press_event', 
self.on_treeview_button_press_event)

and then for the second:
self.list.connect("button_press_event", 
self.on_nupletList_button_press_event)


In the first callback on_treeview_button_press_event, i detect right click.
And then i display the treeviewpopupmenu with popup().

In the second callback on_nupletList_button_press_event, i detect right 
click..

And then i display the listpopupmenu with popup().

Problem is, when i right click on the list, its the treeview popup menu 
wich is displayed.

Has anyone have a solution?

Clues can be:
- The button press event is linked to the window. So we can't have two 
button_press_event signal without interference.
- perhaps the size request for the treeview is too big and then the 
treeview covers the list.


Thanks a lot,
Philippe





___
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] Treeview - popup menu when multiple selection is in use

2005-06-09 Thread [EMAIL PROTECTED]

Hi list,

I'm selecting multiple row in a treeview using CTRL button.
Then if i right click , i lost all the previous selection.
Connecting the button_press event overwrites not this behaviour.

I would be able to keep the selection (and the blue color on the 
selected rows) and when i right click, a specific popup menu for 
multiple rows is displayed.


Does anyone know how to do this?

I can test if multiple rows are selected:
-> if yes: keeping previous selection and displaying a sepcific popup 
menu for multiple rows..
-> if not: normal behaviour. Right click = changing selection and 
displaying a popup menu for simple row.


Thanks a lot for your help,
Philippe

___
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] Sharing a notebook and a statusbar in two gtk windows

2005-05-27 Thread [EMAIL PROTECTED]

Hi list,

I want to share a notebook and a statusbar in two gtk windows as this 
components are same for the two windows.
The notebook will display lots of canvas, and i want to optimize the 
memory use as there canvas won't be modify. That's why i decided to 
create a shared notebook and a share statusbar.


I saw several times this error without succeeding in finding the cause.
I found it is not possible for a widget to be part of two windows due to 
the test child->parent == NULL.


Can't we put a widget as a children for two parents?
If no, how can i have same notebook and statusbar in both windows 
without eating two much mermory and without having problem to 
synchronize them.


Note: i need both windows because one is simplier and for quick access 
and the other is for more heavy use.


The error i get is:
H:\Philippe\Pyvisu\Code 
Source\eclipse\workspace\pyvisu\ihm\window.py:110: GtkWarning: 
gtk_box_pack_start: assertion `child->parent == NULL' failed

 vbox.pack_start(statusbar, True, True, 0)

___
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] internationalization with libglade

2005-05-25 Thread [EMAIL PROTECTED]

Hi list,

I'm using pygtk and libglade in order to create my graphical interface.
I created a script python for internationalization based on the gettext 
module.

It works fine.

But i was wondering if it can also works with the glade file and the 
graphical interface.


There is an old post from Allingham, Donald dated Wed, 09 May 2001 
08:20:59 -0700 from this list.
Can i have the news concerning internationalization with libglade. Is it 
possible or not?


Thanks a lot,
Philippe Collet



___
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: Re: [pygtk] Wrapping Gtksheet. Gtksheet - Gtktreeview

2005-05-23 Thread [EMAIL PROTECTED]

Hi Christian,

I have to display a large amount of data. It is loaded from an hdf5 file 
which size can raise 2 Go max.

I already use a treeview to display general informations on data.
But with a treeview, the number of column displayed is limited in 
comparison with a gtksheet.
And if i have a thousands or more data to display when the user need to 
modify or display it, it is not really easy to display it in only a 
column with lots of row. It could also raise capacity and memory 
difficulties.


What do you think about it?

Thanks,
Philippe Collet

On Thu, May 19, 2005 at 12:07:16PM +, Philippe Collet wrote:
 

First reason is because of the futur implementations that can be done in 
the program i want to realize, it seems a better idea to integrate gtksheet 
now instead of integrating gtkgrid for the moment and soon gtksheet.
   



Lorenzo raises an important question in this aspect: what do you need in
GtkSheet that GtkTreeView doesn't give you already? If you can answer
that question I can help guide your efforts.

Take care,



___
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] Setting Graphics Context Attributes

2005-03-28 Thread [EMAIL PROTECTED]

Dear All,

I am not able to set some of the attributes a gtk.gdk.GC object for my gtk
widget. Particularly,
the attribute 'foreground' of type gtk.gdk.Color. Here is a snippet from my
python interpreter command-line:


1>>> from AceStudio import scope
2>>> s = scope.new()
3>>> w = s.GUI.drawing_area.window
4>>> w

5>>> gc = w.new_gc()
6>>> gc

7>>> gc.foreground

8>>> gc.foreground.red
65535
9>>> import gtk
10>>> color = gtk.gdk.color_parse('#00FF00')
11>>> color

12>>> color.red
0
13>>> gc.foreground

14>>> gc. foreground = color
15>>> gc.foreground

16>>> gc.foreground.red
65535
17>>> gc.set_values(foreground=color)
18>>> gc.foreground

19>>> color

20>>> gc.foreground.red
65535
21>>> gc.fill
0
22>>> gc.fill = 1
23>>> gc.fill
1


Command 5 creates a new GC for my widget. gc.foreground and
gc.foreground.red have default values. I create a 
new color object (Command 10) and assign it to the attribute 'foreground'
(Commands 14 & 17). However, gc.foreground continues to have the old values.

At the same time, I can succesfully set gc.fill (Command 22).

Can any one please explain what is going on here...


Thanks,
- Chetan



mail2web - Check your email from the web at
http://mail2web.com/ .


___
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] Avoiding signal emission on changes from the backend

2005-03-25 Thread [EMAIL PROTECTED]
Thanks for ur replies, Johan and Christian,

As Johan suggested, I think the best possible way is to use a flag such as
'ignore_signals' and set it while manipulating the value from background.

I can not use seperate functions as suggested by Christian because, the
ultimate goal is to _display_ the value in the GUI widget, and the widget
class triggers the value_changed signal, whenever the widget is updated to
a different value, i.e. whenever a new value is _displayed_ in the widget. 


- Chetan


>Original Message:
>-----
>From:  [EMAIL PROTECTED] (Christian Reis)
>Use separate functions for the two things; in fact, have the
>on_value_changed handler _call_ set_value when it needs to, and then do
>its own specific thing. You don't need any particular GTK+ features for
>this, and simpler code is better code.



mail2web - Check your email from the web at
http://mail2web.com/ .


___
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] reuse of code with pygtk

2004-11-14 Thread [EMAIL PROTECTED]
Hi list,

I'm trying to subclass a gtk.Window just to understand the concept of code 
reusing.
I'm doing like this, but it doesn't work, in the first file:

import gtk

class Win(gtk.Window):
def __init__(self, width, height, title):
gtk.Window.__init__(self)
self.__gobject_init__()
self.wind = gtk.Window()
self.wind.set_title(title)
self.wind.set_default_size(width, height)

In the second file I import the first and try to pass the argument to the first
class.

#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk
import first

class SecondWin:
def __init__(self):
self.win = first.Win(150, 300, "example")

self.win.connect("delete_event", self.delete_event)
self.win.connect("destroy", self.destroy)

self.hbox = gtk.HBox(gtk.TRUE, 0)
self.win.add(self.hbox)

self.button = gtk.Button("Hello World")
self.button.connect("clicked", self.hello, None)
self.button.connect_object("clicked", gtk.Widget.destroy, self.win)

self.button1 = gtk.Button("Hello")
self.button1.connect("clicked", self.hello, None)
self.button1.connect_object("clicked", gtk.Widget.destroy, self.win)

self.hbox.pack_start(self.button, gtk.TRUE, gtk.TRUE, 0)
self.hbox.pack_start(self.button1, gtk.TRUE, gtk.TRUE, 0)

self.win.show_all()

def hello(self, widget, data=None):
print "Hello, World"
  
def delete_event(self, widget, event, data=None):
return gtk.FALSE

def destroy(self, widget, data=None):
return gtk.main_quit()

def main(self):
gtk.main()

if __name__ == "__main__":
second = SecondWin()
second.main()

The window open but doesn't take any parameter, most likely is a mistake in
subclassing but I haven't understood where is the mistake.

If someone can help I thank in advance.

Regards
F




Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione. 
Abbonati subito su http://www.libero.it 


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Deleting rows in TreeModel

2004-01-28 Thread [EMAIL PROTECTED]
Hello,

I am currently writing a custom treemodel that filters out the rows of
a child model, for example, the rows where col1 begins with a user-specified
string.

Since it needs to remove rows from itself while the user modifies the string,
i call the 'rows_deleted' function, but it doesn't seem to do anything...
I still get warnings from GTK, telling I didn't notify the TreeView properly.

As an added bonus, i sometimes get segfaults when the resulting model contains
no rows. 

What is the proper way to remove rows from a TreeModel ?

I can post my code if necessary.

Thanks,
Jean-Christophe Haessig
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] ComboCellEditor

2004-01-16 Thread [EMAIL PROTECTED]
Hello,

After reading some messages in the list archives, I see that i'm not
the only one interested in using Comboboxen inside Clists/Treeviews.

It's not necessary to have a special CellRenderer, however CellEditable
requires that the Widget derives from Entry.

Since it seems quite hard to fool GTK into thinking that a Combo is 
something Editable (through PyGTK at least), I began reinventing the
wheel by writing a combobox derived from a gtk.Entry.

Should I stop that ?

JC
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Newer PyGTK package

2004-01-15 Thread [EMAIL PROTECTED]
Hello,

My problem spans across the GTK+ (2.x) and PyGTK (2.0) packages.

The PyGTK layer to use GTK+ with Python suffered from the following bug
until October 2003 :

 #125272 error in gtk_widget_translate_coordinates wrapping

 The function returned the addresses pointing to the values instead of
 the real values.

I need to use these two packages under GNU/Linux and MS Windows.

Under MS Windows, I installed GTK+ with the all-in-one
GTK-Runtime-Environment-2.2.4.exe installer.

I got the latest PyGTK sources from CVS, and started my first build under
MS Windows, by following the insructions found on :
http://nitace.bsd.uchicago.edu:8080/Wikis/Leo/CompilingPythonWin
(the page seems unavailable, i used the Google cache)

The build process halts on an 'undefined reference' error on :
gtk_im_preedit_style_get_type
gtk_im_status_style_get_type

Since there are symbols missing, my conclusion is that my GTK+ is outdated.
However, I could not find any help to build GTK+ under MS Windows nor a
recent package featuring post-october 2003 files.

I must also say that I am somewhat reluctant about building GTK+ under
Windows, especially if somebody already did so. If I have no choice but
doing it myself, help would be appreciated, and I will be pleased to hand
my results back to the community.

Regards,
Jean-Chrisophe Haessig
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] centering a dialog in pygtk

2003-10-22 Thread [EMAIL PROTECTED]
Is there a way to center a dialog on a screen?


mail2web - Check your email from the web at
http://mail2web.com/ .


___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Easiest way to Retain Employees

2000-09-20 Thread [EMAIL PROTECTED]
How do you feel when a staff member resigns? Frustrated  How difficult it is to get a new person? Very painfulIn this new economy, "people" are becoming more and more important.Retaining good people has become a crucial art in Management.Managers at all levels need to understand their subordinates and helpMotivate them.Golden Nuggets is the right tool for employee motivation, thereby helping in retaining employees.Click www.bss-gn.com to know more about Golden Nuggets.Thanks and regards,M. S. Sodhiwww.bss-gn.comThe Employee-Employer Relationship Enhancing Software Copyright © BSS Softwares (Singapore) Pte. Ltd.    email : [EMAIL PROTECTED]