From: Sergey Pinaev <dfo@antex.ru> To: ALT Devel discussion list <devel@altlinux.ru> Subject: Re: [devel] pygtk2 - parent of widget Date: Tue, 17 Feb 2004 16:41:05 +0300 Message-ID: <200402171341.i1HDf5iP004773@antex.ru> (raw) In-Reply-To: <4032181F.8010407@vzljot.ru> 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()) -- mail="Sergey Pinaev <dfo@antex.ru>" url="http://`echo $mail | sed 's/.* <\(.*\)>/\1/' | sed 's/@/./'`"
next prev parent reply other threads:[~2004-02-17 13:41 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-02-17 13:33 Vitaly Ostanin 2004-02-17 13:41 ` Sergey Pinaev [this message] 2004-02-17 14:30 ` [devel] " Vitaly Ostanin 2004-02-17 15:23 ` 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=200402171341.i1HDf5iP004773@antex.ru \ --to=dfo@antex.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