ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Vitaly Ostanin <vyt@vzljot.ru>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: [devel] Re: pygtk2 - parent of widget
Date: Tue, 17 Feb 2004 17:30:31 +0300
Message-ID: <40322587.7020506@vzljot.ru> (raw)
In-Reply-To: <200402171341.i1HDf5iP004773@antex.ru>

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Sergey Pinaev wrote:
> hi.
> On Tue, 17 Feb 2004 16:33:19 +0300
> Vitaly Ostanin <vyt@vzljot.ru> wrote:
> 
> VO> В аттаче тестовая программа, где я пытался по нажатию "Ok" 
> VO> получать имя файла, но не в классе. Проблема в том, что
> VO> filesel.ok_button.connect("clicked", gtk_file_open_ok)
> VO> передаёт в качестве виджета кнопку, а не диалог, и я не знаю, как 
> VO> с этим бороться.
> 
> --- pix.py.old  2004-02-17 16:14:47 +0300
> +++ pix.py      2004-02-17 16:40:17 +0300
> @@ -15,13 +15,13 @@
>  def gtk_main_quit(*args):
>      gtk.main_quit()
>  
> -def gtk_file_open_ok(widget):
> -    filename = widget.get_filename()
> +def gtk_file_open_ok(widget, filesel):
> +    filename = filesel.get_filename()
>      print filename
>  
>  def gtk_file_open(*args):
>      filesel = gtk.FileSelection("File selection")
> -    filesel.ok_button.connect("clicked", gtk_file_open_ok)
> +    filesel.ok_button.connect("clicked", gtk_file_open_ok, filesel)
>      filesel.show()
>  
>  xml.signal_autoconnect(locals())

Огроменное спасибо! Теперь gpointer user_data перестал для меня 
быть абстрактным :)

-- 
Regards, Vyt
mailto:  vyt@vzljot.ru
JID:     vyt@vzljot.ru

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

  reply	other threads:[~2004-02-17 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-17 13:33 [devel] " Vitaly Ostanin
2004-02-17 13:41 ` Sergey Pinaev
2004-02-17 14:30   ` Vitaly Ostanin [this message]
2004-02-17 15:23       ` [devel] " Vitaly Ostanin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40322587.7020506@vzljot.ru \
    --to=vyt@vzljot.ru \
    --cc=devel@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git