From tomasz.kobiela@amazis.com Thu Sep 2 07:42:31 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 373417503BC for ; Thu, 2 Sep 2010 07:42:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.186 X-Spam-Level: X-Spam-Status: No, score=-1.186 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qlt3htVF5bU8 for ; Thu, 2 Sep 2010 07:42:29 +0000 (UTC) X-Greylist: delayed 311 seconds by postgrey-1.32 at menubar.gnome.org; Thu, 02 Sep 2010 07:42:29 UTC Received: from poczta.amazis.com (amazis.com [91.121.211.12]) by menubar.gnome.org (Postfix) with ESMTP id 034A2750681 for ; Thu, 2 Sep 2010 07:42:20 +0000 (UTC) Received: from [192.168.100.110] [83.238.245.154] by pm.amazis.com (Axigen) with ESMTPA id 37D561; Thu, 2 Sep 2010 09:36:15 +0200 Message-ID: <4C7F5422.4090106@amazis.com> Date: Thu, 02 Sep 2010 09:37:06 +0200 From: Tomasz Kobiela User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Mandriva/3.0.4-0.1xos4.0 (4.0) Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: gudev perl bindings Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AxigenSpam-Level: 5 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2010 07:42:31 -0000 Hi.
Hal is now deprecated and dropped by many distribution.
Udev is its replacement.
Are there any bindings for gudev for perl or any plans for it ?

Kind Regards.

From redtux1@gmail.com Fri Sep 3 03:56:32 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0817A750C9B for ; Fri, 3 Sep 2010 03:56:32 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.437 X-Spam-Level: X-Spam-Status: No, score=-0.437 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7pMM3zWHpfmy for ; Fri, 3 Sep 2010 03:56:30 +0000 (UTC) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by menubar.gnome.org (Postfix) with ESMTP id 6CB59750C72 for ; Fri, 3 Sep 2010 03:56:21 +0000 (UTC) Received: by iwn34 with SMTP id 34so1638032iwn.27 for ; Thu, 02 Sep 2010 20:56:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=8pskdU4H8/RWjr1qPVphWd3R8TXJhOMi4akIYqqziHE=; b=s37je9QKGFid48eBveN82ATDk8/KppkQOdDbaD1D1iImD9vGQhl+qSXQ8U28g3Xkzo qPUxApmc0W1DIsQN9SAV9gddzDufheN4SXo0dxOl613jskw52/QfbGogSURmh2pR8OkS EaNWnjRyKrxU+0u5nYcpb1WSW4XWOeocCBWoI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=v2ZwqAwkB/wTiJimoKwkSk2JoTqIL3EJVm3Tg5NxPr2+/dniSjbA2e/6gY0VNnFcf4 C58kaHeeVCAy7KyNA/1IDFuiTZu7o+U2/HpV8/J8cF5k9bwRoDIFmsv+mAmxh2BqDFEp Nq6utBcZGymLdUJdBbNYOLVvcFS6a2ZNKeM/U= MIME-Version: 1.0 Received: by 10.231.183.134 with SMTP id cg6mr153215ibb.197.1283486179559; Thu, 02 Sep 2010 20:56:19 -0700 (PDT) Received: by 10.231.172.206 with HTTP; Thu, 2 Sep 2010 20:56:19 -0700 (PDT) Date: Fri, 3 Sep 2010 04:56:19 +0100 Message-ID: Subject: Problem with Gtk2::Combobox->new_with_model From: Mike Martin To: gtk-perl-list@gnome.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2010 03:56:32 -0000 Hi - getting confused I have a liststore my $dvd_modelx=Gtk2::ListStore->new('Glib::String'); foreach my $list (keys %cds){ my $iter=$dvd_modelx->append(); $dvd_modelx->set($iter, 0,$list ) } my $wid=Gtk2::ComboBox->new_with_model($dvd_modelx);# fails to add to combobox my $wid=Gtk2::ComboBoxEntry->new_with_model($dvd_modelx);# succeeds in add to combobox What am i missing here From scott@asofyet.org Sat Sep 4 00:39:40 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C8403750A8A for ; Sat, 4 Sep 2010 00:39:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.923 X-Spam-Level: X-Spam-Status: No, score=-1.923 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X2Pru5LqVB+6 for ; Sat, 4 Sep 2010 00:39:38 +0000 (UTC) Received: from homiemail-a46.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id ECBF3750A41 for ; Sat, 4 Sep 2010 00:39:29 +0000 (UTC) Received: from homiemail-a46.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a46.g.dreamhost.com (Postfix) with ESMTP id A7AD53E4065 for ; Fri, 3 Sep 2010 17:39:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=asofyet.org; h=message-id :in-reply-to:references:date:subject:from:to:mime-version :content-type:content-transfer-encoding; q=dns; s=asofyet.org; b=Goe6bzItVAESrabnf6pjw1qqZQJn4Z8kD03vfg1/25GnZFt52wDqRwLnrc7b7 ZroHtlhsXNG8jzEYK3QHZZFeEOtTSrejjwwSRjWJ1np78H3G7WzM5t04JpFo/HfL W+Z8ovbIAsN2K8f57aMZfDUl44+rGuViGRC+rZn+nOK2ho= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=asofyet.org; h=message-id :in-reply-to:references:date:subject:from:to:mime-version :content-type:content-transfer-encoding; s=asofyet.org; bh=RS0CX gjtMHo2xzEn0dJOSD4Oisg=; b=TYKZ7e1UYxzMt1hu8BTosa6tM5z7flCx/Q/+D H7//p8/j0AH87zrq6JPlKseEhUWyHKCguuVhRIjG0prhfsCqFC+6kJ+ZF6RUk0DT V5S9+u1svoHFFWD8CUX0ek+XTjTFa6MhDrc3VcwaqR4sAdb1oq+ID7Cu7GqtidiW Rhh9YM= Received: from webmail.asofyet.org (caibbdcaaaaf.dreamhost.com [208.113.200.5]) (Authenticated sender: scott@asofyet.org) by homiemail-a46.g.dreamhost.com (Postfix) with ESMTPA id 47F5B3E4062 for ; Fri, 3 Sep 2010 17:39:22 -0700 (PDT) Received: from 75.89.129.123 (proxying for 75.89.129.123) (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Fri, 3 Sep 2010 20:39:22 -0400 Message-ID: <9a528a1d9e3647e5f665ae7f1ffda0d1.squirrel@webmail.asofyet.org> In-Reply-To: References: Date: Fri, 3 Sep 2010 20:39:22 -0400 Subject: Re: Problem with Gtk2::Combobox->new_with_model From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2010 00:39:41 -0000 Mike Martin wrote: > Hi - getting confused > > I have a liststore > my $dvd_modelx=3DGtk2::ListStore->new('Glib::String'); > foreach my $list (keys %cds){ > my $iter=3D$dvd_modelx->append(); > $dvd_modelx->set($iter, 0,$list ) > } > > my $wid=3DGtk2::ComboBox->new_with_model($dvd_modelx);# fails to add to= combobox > my $wid=3DGtk2::ComboBoxEntry->new_with_model($dvd_modelx);# succeeds i= n > add to combobox > > What am i missing here? Did you pack a cell renderer into your Gtk2::ComboBox? The ComboBoxEntry already has one... > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > --=20 muppet From eexpress@163.com Sun Sep 5 13:03:09 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A845C75008A for ; Sun, 5 Sep 2010 13:03:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.834 X-Spam-Level: X-Spam-Status: No, score=-1.834 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jgkC5iAbSCzH for ; Sun, 5 Sep 2010 13:03:06 +0000 (UTC) X-Greylist: delayed 915 seconds by postgrey-1.32 at menubar.gnome.org; Sun, 05 Sep 2010 13:03:05 UTC Received: from m12-13.163.com (m12-13.163.com [220.181.12.13]) by menubar.gnome.org (Postfix) with ESMTP id 92FCA750067 for ; Sun, 5 Sep 2010 13:02:57 +0000 (UTC) Received: from eexp-laptop (unknown [218.76.17.249]) by smtp9 (Coremail) with SMTP id DcCowLDb24pokYNMAc3yAQ--.20759S2; Sun, 05 Sep 2010 20:47:38 +0800 (CST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: gtk-perl-list@gnome.org Subject: I want bring gtk2-perl to Windows Date: Sun, 05 Sep 2010 20:47:31 +0800 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: eexpress Message-ID: User-Agent: Opera Mail/10.70 (Linux) X-CM-TRANSID: DcCowLDb24pokYNMAc3yAQ--.20759S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUz-B_DUUUU X-CM-SenderInfo: hhh012xhvvqiywtou0bp/1tbirQVDd0ij5clqrwAAse X-Mailman-Approved-At: Mon, 06 Sep 2010 20:50:46 +0000 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2010 13:03:09 -0000 I want write and debug all my gtk2-perl under Linux(use glade), and import to Windows to just execute it(by install an simple and small software and let those Windows system can run it immediately). if any article recently mention about this? I had search a lot. and many articles are old which like http://www.ibm.com/developerworks/cn/linux/l-perlgtk/. and http://gladewin32.sourceforge.net seems been hacked? only old package show at this web. Another way, activeperl, seems not a comfortably way to do this. ppm of course is not cpan kind. thanks. From mmcginn@rogers.com Tue Sep 7 12:29:12 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5FDCE7506F5 for ; Tue, 7 Sep 2010 12:29:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.922 X-Spam-Level: X-Spam-Status: No, score=-1.922 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mI+8GrIh2lua for ; Tue, 7 Sep 2010 12:29:09 +0000 (UTC) Received: from web88305.mail.re4.yahoo.com (web88305.mail.re4.yahoo.com [216.39.53.228]) by menubar.gnome.org (Postfix) with SMTP id 87819750726 for ; Tue, 7 Sep 2010 12:29:01 +0000 (UTC) Received: (qmail 53809 invoked by uid 60001); 7 Sep 2010 12:28:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rogers.com; s=s1024; t=1283862539; bh=Mc+dvMcBquTSF9KadSX9BI4rS4ut8z1qz1M+isVFwzY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=yRVcEZYZcDQ/acnduZ2JRSafVPFLglrjh/bRJG4phZmZRHs6Ht1inzL3bITZ+pGva24s15zJNDehjq259+23XTE1rKmWdwcONWbW0BHVWfHlXtbfdWsGRw0LVZWNCLQPHV3cE6+BK48hmWpdbnwa9wSrUK2PtxZpeBhaGwuj+U0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=JECmDd2kKxFui4/sfelwjbNTpLrTZp0olfhXGU9B6ZKZh09ooBB+jZxa0yiDLSvFcOtoK0IX1rGMcyvymmGupNoHbnXGR2xePAK1DrAyz3YD1am6Y3IyVd638C0hvVUw1nBThwLIu0UGEoNddTFCCF+cOC/Oyt4S6IbAhLWeGrI=; Message-ID: <361347.52720.qm@web88305.mail.re4.yahoo.com> X-YMail-OSG: 6XNfamMVM1nHIFLsSeZI1.D6UcvFoLE1fKJnixT8aQFBhMz wcahjsyEBrBtXBOev2PRp0k0n5hQGqqWyeyzsP6CsCTNmbZBNc_QGqphsNLE nUluNHGWzrkgkF.3lOW40CqgIFTbPYt9hd.NXM9EDULSNkt6QVXGluGAlPJc TYQi8D2AyM8LJBF48TvCOAET_F4DbDVBcHnvHe_qHeEbR90a_4wFY6AYKmhO Y_Zm1g6g3A9XkBshHlNvv.TV0BVSSz6JgPKRoorqLe5dh8wUo2K5vmH83w3E k1FuPVUEU9SGqb2.11oEJKWZyBZmbMw38cdjW Received: from [99.246.125.49] by web88305.mail.re4.yahoo.com via HTTP; Tue, 07 Sep 2010 05:28:59 PDT X-Mailer: YahooMailRC/470 YahooMailWebService/0.8.105.279950 References: Date: Tue, 7 Sep 2010 05:28:59 -0700 (PDT) From: MICHAEL MCGINN Subject: Re: gtk2-perl to Windows To: gtk-perl-list@gnome.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1885232769-1283862539=:52720" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2010 12:29:12 -0000 --0-1885232769-1283862539=:52720 Content-Type: text/plain; charset=us-ascii I develop primarily on Linux and deploy on both Linux and Windows. For Windows, I use 'camelbox' (http://code.google.com/p/camelbox/) which provides a 32 bit perl build and includes all the core gtk2-perl modules as well as other good things. I use Komodo as my IDE for development/debugging. It works well on Linux and Windows. ________________________________ From: "gtk-perl-list-request@gnome.org" To: gtk-perl-list@gnome.org Sent: Tue, September 7, 2010 8:00:13 AM Subject: gtk-perl-list Digest, Vol 77, Issue 4 Send gtk-perl-list mailing list submissions to gtk-perl-list@gnome.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.gnome.org/mailman/listinfo/gtk-perl-list or, via email, send a message with subject or body 'help' to gtk-perl-list-request@gnome.org You can reach the person managing the list at gtk-perl-list-owner@gnome.org When replying, please edit your Subject line so it is more specific than "Re: Contents of gtk-perl-list digest..." Today's Topics: 1. I want bring gtk2-perl to Windows (eexpress) ---------------------------------------------------------------------- Message: 1 Date: Sun, 05 Sep 2010 20:47:31 +0800 From: eexpress To: gtk-perl-list@gnome.org Subject: I want bring gtk2-perl to Windows Message-ID: Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes I want write and debug all my gtk2-perl under Linux(use glade), and import to Windows to just execute it(by install an simple and small software and let those Windows system can run it immediately). if any article recently mention about this? I had search a lot. and many articles are old which like http://www.ibm.com/developerworks/cn/linux/l-perlgtk/. and http://gladewin32.sourceforge.net seems been hacked? only old package show at this web. Another way, activeperl, seems not a comfortably way to do this. ppm of course is not cpan kind. thanks. ------------------------------ _______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list End of gtk-perl-list Digest, Vol 77, Issue 4 ******************************************** --0-1885232769-1283862539=:52720 Content-Type: text/html; charset=us-ascii

I develop primarily on Linux and deploy on both Linux and Windows.

For Windows, I use 'camelbox' (http://code.google.com/p/camelbox/) which provides a 32 bit perl build and includes all the core gtk2-perl modules as well as other good things.

I use Komodo as my IDE for development/debugging. It works well on Linux and Windows.



From: "gtk-perl-list-request@gnome.org" <gtk-perl-list-request@gnome.org>
To: gtk-perl-list@gnome.org
Sent: Tue, September 7, 2010 8:00:13 AM
Subject: gtk-perl-list Digest, Vol 77, Issue 4

Send gtk-perl-list mailing list submissions to
    gtk-perl-list@gnome.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://mail.gnome.org/mailman/listinfo/gtk-perl-list
or, via email, send a message with subject or body 'help' to
    gtk-perl-list-request@gnome.org

You can reach the person managing the list at
    gtk-perl-list-owner@gnome.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-perl-list digest..."


Today's Topics:

  1. I want bring gtk2-perl to Windows (eexpress)


----------------------------------------------------------------------

Message: 1
Date: Sun, 05 Sep 2010 20:47:31 +0800
From: eexpress <eexpress@163.com>
To: gtk-perl-list@gnome.org
Subject: I want bring gtk2-perl to Windows
Message-ID: <op.vij8hhm7gdf9fq@eexp-laptop>
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes

I want write and debug all my gtk2-perl under Linux(use glade), and import 
to Windows to just execute it(by install an simple and small software and 
let those Windows system can run it immediately). if any article recently 
mention about this?
I had search a lot. and many articles are old which like 
http://www.ibm.com/developerworks/cn/linux/l-perlgtk/. and 
http://gladewin32.sourceforge.net seems been hacked? only old package show 
at this web.
Another way, activeperl, seems not a comfortably way to do this.  ppm of 
course is not cpan kind.
thanks.



------------------------------

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


End of gtk-perl-list Digest, Vol 77, Issue 4
********************************************
--0-1885232769-1283862539=:52720-- From gg@zip.com.au Sat Sep 11 23:27:40 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 980417502E3 for ; Sat, 11 Sep 2010 23:27:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.813 X-Spam-Level: X-Spam-Status: No, score=-1.813 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_TVD_MIME_NO_HEADERS=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vKWthBUA8PqN for ; Sat, 11 Sep 2010 23:27:37 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-8.pacific.net.au [61.8.2.231]) by menubar.gnome.org (Postfix) with ESMTP id E4E63750205 for ; Sat, 11 Sep 2010 23:27:28 +0000 (UTC) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 97A4B299A27 for ; Sun, 12 Sep 2010 09:27:25 +1000 (EST) Received: from blah.blah (ppp2EEB.dyn.pacific.net.au [61.8.46.235]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id F191627418 for ; Sun, 12 Sep 2010 09:27:24 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1OuZTd-0003HV-Vh for gtk-perl-list@gnome.org; Sun, 12 Sep 2010 09:27:22 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: buildable vs plain objects Organization: Bah Humbug Mail-Copies-To: never Date: Sun, 12 Sep 2010 09:27:21 +1000 Message-ID: <871v8zrhd2.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2010 23:27:40 -0000 --=-=-= The Gtk2::Buildable pod "PLAIN OBJECTS" reads like you can't build a plain Glib::Object subclass at all unless you have the Gtk2::Buildable interface on it. I suppose that's adapted from the gtk ref manual GtkBuildable "Description", In order to allow construction from a GtkBuilder UI description, an object class must implement the GtkBuildable interface. But is it true? The few lines below seem to work for me (gtk 2.20). Gtk2::Builder seems fine on plain objects, at least as far as creating and settings. --=-=-= Content-Type: text/x-perl Content-Disposition: inline; filename=foo.pl use strict; use warnings; use Gtk2; { package Foo; use strict; use warnings; use Glib; use Glib::Object::Subclass 'Glib::Object', properties => [Glib::ParamSpec->string ('mystring', 'mystring', 'Blurb.', '', # default Glib::G_PARAM_READWRITE), ]; } my $builder = Gtk2::Builder->new; $builder->add_from_string (<<'HERE'); hello HERE my $foo = $builder->get_object('myfoo'); print $foo,"\n"; print $foo->get('mystring'),"\n"; print "interfaces: ",Glib::Type->list_interfaces('Foo'),"\n"; exit 0; --=-=-=-- From gg@zip.com.au Sat Sep 11 23:36:11 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 138FB7503F1 for ; Sat, 11 Sep 2010 23:36:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, T_TVD_MIME_NO_HEADERS=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i9et9srEH16t for ; Sat, 11 Sep 2010 23:36:05 +0000 (UTC) Received: from mailout1.pacific.net.au (mailout1-7.pacific.net.au [61.8.2.214]) by menubar.gnome.org (Postfix) with ESMTP id ABD79750205 for ; Sat, 11 Sep 2010 23:35:56 +0000 (UTC) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id C297F5B5A55 for ; Sun, 12 Sep 2010 09:35:54 +1000 (EST) Received: from blah.blah (ppp2EEB.dyn.pacific.net.au [61.8.46.235]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 9CF888C02 for ; Sun, 12 Sep 2010 09:35:36 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1OuZb8-0003IA-Bo for gtk-perl-list@gnome.org; Sun, 12 Sep 2010 09:35:06 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: builder on scalar properties Organization: Bah Humbug Mail-Copies-To: never Date: Sun, 12 Sep 2010 09:35:06 +1000 Message-ID: <87vd6bq2fp.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2010 23:36:11 -0000 --=-=-= If an object property is a Glib::Scalar, ie. Glib::ParamSpec->scalar, can it be set with the thingie in Gtk2::Builder ? The few lines below get Gtk-WARNING **: Failed to set property Foo.myscalar to "hello": Could not parse '"hello"' as a GPerlSV at /tmp/scalar.pl line 21. and apparently don't set the property. --=-=-= Content-Type: text/x-perl Content-Disposition: inline; filename=scalar.pl use strict; use warnings; use Gtk2; { package Foo; use strict; use warnings; use Glib; use Glib::Object::Subclass 'Glib::Object', properties => [Glib::ParamSpec->scalar ('myscalar', 'myscalar', 'Blurb.', Glib::G_PARAM_READWRITE), ]; } my $builder = Gtk2::Builder->new; $builder->add_from_string (<<'HERE'); "hello" HERE my $foo = $builder->get_object('myfoo'); print $foo,"\n"; print $foo->get('myscalar')||'[undef]',"\n"; exit 0; --=-=-=-- From gg@zip.com.au Sun Sep 12 00:11:42 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 30170750457 for ; Sun, 12 Sep 2010 00:11:42 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tO6xv1lFfU8b for ; Sun, 12 Sep 2010 00:11:39 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-8.pacific.net.au [61.8.2.231]) by menubar.gnome.org (Postfix) with ESMTP id 3BDA2750431 for ; Sun, 12 Sep 2010 00:11:30 +0000 (UTC) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id EDCE3297E06 for ; Sun, 12 Sep 2010 10:11:27 +1000 (EST) Received: from blah.blah (ppp2EEB.dyn.pacific.net.au [61.8.46.235]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 6CBCB8C12 for ; Sun, 12 Sep 2010 10:11:23 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1Oua9l-0003sO-9E for gtk-perl-list@gnome.org; Sun, 12 Sep 2010 10:10:53 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: action parent Organization: Bah Humbug Mail-Copies-To: never Date: Sun, 12 Sep 2010 10:10:53 +1000 Message-ID: <87r5gzq0s2.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2010 00:11:42 -0000 When a Gtk2::Action is activated, ie. the activate method which raises the activate signal, is there anywhere to find the invoking menuitem or toolitem, at least for the usual case of a uimanager generated thingie activates it? I had some actions which pop up a dialog thought to put the dialog on the same screen as the invoking widget, in case it's a multi-screen program. With Gtk2::ActionGroup->add_actions and friends I've used the userdata, but wondered about a Gtk2::Action subclass where the activate handler is a class closure so there's no userdata as such. I suppose an action object subclass could have a property saying a target screen or toplevel application window. Unless there's somewhere dynamic to get that information ... From mario.kemper@googlemail.com Mon Sep 13 11:13:46 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5F81D750720 for ; Mon, 13 Sep 2010 11:13:46 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.31 X-Spam-Level: X-Spam-Status: No, score=-1.31 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_ADLTOBFU=0.68, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GbCP-T6oYNPW for ; Mon, 13 Sep 2010 11:13:43 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id B1F6E7506FC for ; Mon, 13 Sep 2010 11:13:24 +0000 (UTC) Received: by bwz20 with SMTP id 20so48316bwz.27 for ; Mon, 13 Sep 2010 04:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type; bh=F1g7CcJK9mfKwKO3lLtR20Svk0dRfJvIlBJ5UPGGSBQ=; b=NWXRfT9Yz0dMVqO3yj63Be/w5GsBPT9kehP/NVgBCzes8xVQ4qqVzVQxPpuu/YAMos 6/LsLO3DrjjXVpyxjwWWrGBZboBe3e23dLPOTP+adI5X36mUv5tALEEWOqyoQUmq0ZVp 4L61EKCEyTzHwIYGLxriJFSnE5NhBIXXwOwKs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=ugDcG+gBMnoPrwoWCRTtcP2c4hZwWMepXuns7DWrcoI5Sol4eCs0GIRp500EUm6AxT 99TkZD3b2giy6NibesgELrwPSp6d8fOmOnq6TywePO/LZ/c+dGRRX3rOIBbhTZSiafZ0 EmxlLtfsLn7qAvLVm1XwTh58+i7B3VZcSfyiY= Received: by 10.204.49.11 with SMTP id t11mr3011924bkf.64.1284376402201; Mon, 13 Sep 2010 04:13:22 -0700 (PDT) Received: from [10.11.0.82] (nat-br-238.pironet-ndh.com [195.135.189.238]) by mx.google.com with ESMTPS id s34sm4515539bkk.13.2010.09.13.04.13.19 (version=SSLv3 cipher=RC4-MD5); Mon, 13 Sep 2010 04:13:20 -0700 (PDT) Message-ID: <4C8E074F.6030108@googlemail.com> Date: Mon, 13 Sep 2010 13:13:19 +0200 From: Mario Kemper User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Introspection for GTK2-Perl Content-Type: multipart/mixed; boundary="------------000608060205000409070905" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 11:13:47 -0000 This is a multi-part message in MIME format. --------------000608060205000409070905 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi there, I am having some problems using Introspection for GTK2-Perl (http://live.gnome.org/GTK2-Perl/Introspection). Here is what I've done: 1) Installed package gobject-introspection (Ubuntu 10.04) 2) git clone git://git.gnome.org/perl-Glib-Object-Introspection (and the build procedure) 3) Installed package gir1.0-glib-2.0. Now there are several .typelib files installed -------------snip-------------------------- /usr/lib/girepository-1.0/GIRepository-2.0.typelib /usr/lib/girepository-1.0/GL-1.0.typelib /usr/lib/girepository-1.0/GLib-2.0.typelib /usr/lib/girepository-1.0/GModule-2.0.typelib /usr/lib/girepository-1.0/GObject-2.0.typelib /usr/lib/girepository-1.0/Gdk-2.0.typelib /usr/lib/girepository-1.0/GdkPixbuf-2.0.typelib /usr/lib/girepository-1.0/Gio-2.0.typelib -------------snip-------------------------- 4) Created the two files that are attached to this mail When I run foo.pl I get the following error message: perl: symbol lookup error: /usr/local/lib/perl/5.10.1/auto/Glib/Object/Introspection/Introspection.so: undefined symbol: gperl_hv_take_sv Any help is appreciated. Regards Mario --------------000608060205000409070905 Content-Type: application/x-perl; name="Foo.pm" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Foo.pm" package Foo; use Glib::Object::Introspection; sub import { Glib::Object::Introspection->setup(basename => "Gio", version => "2.0", package => "Glib::IO"); } 1; --------------000608060205000409070905 Content-Type: application/x-perl; name="foo.pl" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="foo.pl" #! /usr/bin/perl -w use strict; use utf8; use Foo; 1; --------------000608060205000409070905-- From roderich.schupp@googlemail.com Mon Sep 13 11:53:07 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1BED87506FC for ; Mon, 13 Sep 2010 11:53:07 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vnKgHAEbohwy for ; Mon, 13 Sep 2010 11:53:04 +0000 (UTC) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by menubar.gnome.org (Postfix) with ESMTP id C40527506F1 for ; Mon, 13 Sep 2010 11:52:55 +0000 (UTC) Received: by qyk4 with SMTP id 4so5416928qyk.6 for ; Mon, 13 Sep 2010 04:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=OuAegNToZYlXhWl9Ned0GUQ/HhuYj4tqxESOGCl/w8Q=; b=OWChK+bsZ/b+qtY4uSpS/Wy2AtpUFOaGMxMGC65dqVYCJZqlrT0BcXgYZKWz0d+CiW sma93BdJ8o7fFCSa8Cg27tTMfJa7uraCA1qsxpmZYSmhxkM7iRfNxEY4gZ5HmAi/dpsF LBXH8Ffs2uIZWlpaTrSKX0tjF39y3+4uBItCE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=eT8Ru8qerJzJDjL20bAeUDjvHl0UI2AlKhL7O9ncF+YYABkZvLiW8HuJIk7R63GrT6 cTbVdkl6G8l0RoQ3YQx4MdZbB67EL0D4d98NWtDjSXNw9DQOIcwnIm2C4DtBc32qujq+ AVKGi/mqs8QSNlbUyp08sjdyXURoOdqVkvtEw= MIME-Version: 1.0 Received: by 10.224.102.146 with SMTP id g18mr187074qao.200.1284378774036; Mon, 13 Sep 2010 04:52:54 -0700 (PDT) Received: by 10.229.130.170 with HTTP; Mon, 13 Sep 2010 04:52:54 -0700 (PDT) In-Reply-To: <4C8E074F.6030108@googlemail.com> References: <4C8E074F.6030108@googlemail.com> Date: Mon, 13 Sep 2010 13:52:54 +0200 Message-ID: Subject: Re: Introspection for GTK2-Perl From: Roderich Schupp To: Mario Kemper Content-Type: text/plain; charset=UTF-8 Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 11:53:07 -0000 On Mon, Sep 13, 2010 at 1:13 PM, Mario Kemper wrote: > perl: symbol lookup error: > /usr/local/lib/perl/5.10.1/auto/Glib/Object/Introspection/Introspection.so: > undefined symbol: gperl_hv_take_sv This function lives in .../Glib.so, so you should add "use Glib;" and make sure you have (Ubuntu|Debian) package libglib-perl installed. Cheers, Roderich From mario.kemper@googlemail.com Mon Sep 13 12:03:05 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 500657506C4 for ; Mon, 13 Sep 2010 12:03:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oODnjLDjzWYC for ; Mon, 13 Sep 2010 12:03:03 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id E53007506C1 for ; Mon, 13 Sep 2010 12:02:41 +0000 (UTC) Received: by bwz20 with SMTP id 20so87204bwz.27 for ; Mon, 13 Sep 2010 05:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=lv/WZuDPmfVpwACfPy0OukZTR38KftNRPWn5or0BkpA=; b=NknmWa1Ovlhhnuc4T62ogy8A6lbtTBtGOeGL+Mfvcx8q1XBDjnVdMNS4PYrjI+czSe fGjCe1w8gnsbXII7ZrdhklGSfHtLJr2xKRSC4onxi4B9ZK9lwSrtuvELhv22n1fvI7X3 da0Z9q/svMh6IXHVhHQZQNmXXz5Rl+YgJuTvw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=uyVLWKn0qOYazKFaKyh1d7JpkqNVOCUqGu5ZEDZhvXlHGKyfGrfw41WzGmeqNwal3X QvfYYnhy2JBqHSgqYUovr/OQPK1r2XfPhnQVFcZK+0FyT0bVZEEyDGWigQJRumuIQH7F fJRN1WpTyYMEGVuBUGcUNk2YiDKv9AK6+i5XY= Received: by 10.204.82.80 with SMTP id a16mr3128684bkl.39.1284379341206; Mon, 13 Sep 2010 05:02:21 -0700 (PDT) Received: from [10.11.0.82] (nat-br-238.pironet-ndh.com [195.135.189.238]) by mx.google.com with ESMTPS id g12sm4552823bkb.2.2010.09.13.05.02.18 (version=SSLv3 cipher=RC4-MD5); Mon, 13 Sep 2010 05:02:19 -0700 (PDT) Message-ID: <4C8E12CA.9060201@googlemail.com> Date: Mon, 13 Sep 2010 14:02:18 +0200 From: Mario Kemper User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: Roderich Schupp Subject: Re: Introspection for GTK2-Perl References: <4C8E074F.6030108@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 12:03:05 -0000 Thanks for answering but I get the same error after adding 'use Glib;'. I don't see this in the test scripts either: http://git.gnome.org/browse/perl-Glib-IO/tree/t Regards Mario Am 13.09.2010 13:52, schrieb Roderich Schupp: > On Mon, Sep 13, 2010 at 1:13 PM, Mario Kemper > wrote: >> perl: symbol lookup error: >> /usr/local/lib/perl/5.10.1/auto/Glib/Object/Introspection/Introspection.so: >> undefined symbol: gperl_hv_take_sv > This function lives in .../Glib.so, so you should add "use Glib;" and > make sure you have > (Ubuntu|Debian) package libglib-perl installed. > > Cheers, Roderich From mario.kemper@googlemail.com Mon Sep 13 12:03:27 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4ECD2750717 for ; Mon, 13 Sep 2010 12:03:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=unavailable Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CccLa-cfQIoy for ; Mon, 13 Sep 2010 12:03:26 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id 9DA1275076D for ; Mon, 13 Sep 2010 12:03:05 +0000 (UTC) Received: by bwz20 with SMTP id 20so87505bwz.27 for ; Mon, 13 Sep 2010 05:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=lv/WZuDPmfVpwACfPy0OukZTR38KftNRPWn5or0BkpA=; b=NknmWa1Ovlhhnuc4T62ogy8A6lbtTBtGOeGL+Mfvcx8q1XBDjnVdMNS4PYrjI+czSe fGjCe1w8gnsbXII7ZrdhklGSfHtLJr2xKRSC4onxi4B9ZK9lwSrtuvELhv22n1fvI7X3 da0Z9q/svMh6IXHVhHQZQNmXXz5Rl+YgJuTvw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=uyVLWKn0qOYazKFaKyh1d7JpkqNVOCUqGu5ZEDZhvXlHGKyfGrfw41WzGmeqNwal3X QvfYYnhy2JBqHSgqYUovr/OQPK1r2XfPhnQVFcZK+0FyT0bVZEEyDGWigQJRumuIQH7F fJRN1WpTyYMEGVuBUGcUNk2YiDKv9AK6+i5XY= Received: by 10.204.82.80 with SMTP id a16mr3128684bkl.39.1284379341206; Mon, 13 Sep 2010 05:02:21 -0700 (PDT) Received: from [10.11.0.82] (nat-br-238.pironet-ndh.com [195.135.189.238]) by mx.google.com with ESMTPS id g12sm4552823bkb.2.2010.09.13.05.02.18 (version=SSLv3 cipher=RC4-MD5); Mon, 13 Sep 2010 05:02:19 -0700 (PDT) Message-ID: <4C8E12CA.9060201@googlemail.com> Date: Mon, 13 Sep 2010 14:02:18 +0200 From: Mario Kemper User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: Roderich Schupp Subject: Re: Introspection for GTK2-Perl References: <4C8E074F.6030108@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 12:03:27 -0000 Thanks for answering but I get the same error after adding 'use Glib;'. I don't see this in the test scripts either: http://git.gnome.org/browse/perl-Glib-IO/tree/t Regards Mario Am 13.09.2010 13:52, schrieb Roderich Schupp: > On Mon, Sep 13, 2010 at 1:13 PM, Mario Kemper > wrote: >> perl: symbol lookup error: >> /usr/local/lib/perl/5.10.1/auto/Glib/Object/Introspection/Introspection.so: >> undefined symbol: gperl_hv_take_sv > This function lives in .../Glib.so, so you should add "use Glib;" and > make sure you have > (Ubuntu|Debian) package libglib-perl installed. > > Cheers, Roderich From roderich.schupp@googlemail.com Mon Sep 13 16:03:49 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id BE4B37507CC for ; Mon, 13 Sep 2010 16:03:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mdr2H4fymDzs for ; Mon, 13 Sep 2010 16:03:45 +0000 (UTC) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by menubar.gnome.org (Postfix) with ESMTP id 670347502CD for ; Mon, 13 Sep 2010 16:03:36 +0000 (UTC) Received: by qyk4 with SMTP id 4so5689057qyk.6 for ; Mon, 13 Sep 2010 09:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/P4YSJd3+l0OMf7sTBTKwWTlMbNxJrYD4mvzmuCC+BE=; b=RXahvkCoOQmL2y+OBwGA3q05/JkwqJLfKwOO58vuUjKDLcsMx/O39bgawrRIPOamGL 3Dw2M4L3BT1lpb9aULgZiOL7en803xgRaovpRG6efX9v0QX68UG2qbvj7jWpb88ehorf mjK73hIrxYyVpDoBZe+Z7BjvJuu9i2iIfKuhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=n1taxpHDl4BENvr2cJk2Gg9xv0J8x0GChwFqXPlVCY4X3q+IZZCprFRQDtCtkVvvya sn03pCNasOti7qamD+A8fUIBy6jGojFt18lp5xBaLhtYvnkVeD10bHnb72aDYFvKP+Rc kATChcr2a6UQEp68LbjrUMUqmdUui+segvk44= MIME-Version: 1.0 Received: by 10.224.119.18 with SMTP id x18mr135356qaq.302.1284393815142; Mon, 13 Sep 2010 09:03:35 -0700 (PDT) Received: by 10.229.130.170 with HTTP; Mon, 13 Sep 2010 09:03:35 -0700 (PDT) In-Reply-To: <4C8E12CA.9060201@googlemail.com> References: <4C8E074F.6030108@googlemail.com> <4C8E12CA.9060201@googlemail.com> Date: Mon, 13 Sep 2010 18:03:35 +0200 Message-ID: Subject: Re: Introspection for GTK2-Perl From: Roderich Schupp To: Mario Kemper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 16:03:50 -0000 On Mon, Sep 13, 2010 at 2:02 PM, Mario Kemper wrote: > =C2=A0Thanks for answering but I get the same error after adding 'use Gli= b;'. I Sorry, I didn't really check the sources. gperl_hv_take_sv was added in Glib 1.230 which hasn't been packaged for Ubuntu|Debian yet. Get it from git://git.gnome.org/perl-Glib Cheers, Roderich From mario.kemper@googlemail.com Mon Sep 13 20:47:41 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 21C8D7508E6 for ; Mon, 13 Sep 2010 20:47:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kPhEcFT-RQtS for ; Mon, 13 Sep 2010 20:47:37 +0000 (UTC) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by menubar.gnome.org (Postfix) with ESMTP id 727087508E5 for ; Mon, 13 Sep 2010 20:47:28 +0000 (UTC) Received: by eyx24 with SMTP id 24so3925405eyx.27 for ; Mon, 13 Sep 2010 13:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=aJ7F1fVqUK1vDpO5z8wuWryxKFpODVsM0dBF9FDW3bk=; b=b38SYOCL96XZwY1zIzrYH7Dj9u7RAa4mkEJgras/XKUVx3MY8N8UJT5LewlWFGivVU 4GRI2guwcUf8MncdUHppGf68reIR4B55sYPSRn6Zs65NGPaNAgDHYel4ETAVwmuthnZ+ irqazizGFqaYOzqWH1gR7xkAczJ8pIKUUb9NY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=ZoQRiRe8N8Vkz3R5H1GtHiaxNfKuRJXuHI0UG07rLF5idGZjjeIHB5wAQP4mKQxuv/ t1dRP9RH8KE4cDIKK2wfrDMKxah0a/rnE2IJaRf3VY+PuJmSChHb2Fjip7apTaYd/4iZ qocq3+4hoyQP6Pe2S/I+4Gg6ey4ic+3F3yUXs= Received: by 10.213.19.207 with SMTP id c15mr2180478ebb.14.1284410847264; Mon, 13 Sep 2010 13:47:27 -0700 (PDT) Received: from [192.168.99.103] (xdsl-87-78-36-132.netcologne.de [87.78.36.132]) by mx.google.com with ESMTPS id v8sm9844484eeh.2.2010.09.13.13.47.24 (version=SSLv3 cipher=RC4-MD5); Mon, 13 Sep 2010 13:47:25 -0700 (PDT) Subject: Re: Introspection for GTK2-Perl From: Mario Kemper To: Roderich Schupp In-Reply-To: References: <4C8E074F.6030108@googlemail.com> <4C8E12CA.9060201@googlemail.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 13 Sep 2010 22:47:23 +0200 Message-ID: <1284410843.17959.0.camel@mario-xps> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 20:47:41 -0000 This is working fine. Thanks! Am Montag, den 13.09.2010, 18:03 +0200 schrieb Roderich Schupp: > On Mon, Sep 13, 2010 at 2:02 PM, Mario Kemper > wrote: > > Thanks for answering but I get the same error after adding 'use Glib;'. I > > Sorry, I didn't really check the sources. gperl_hv_take_sv was added > in Glib 1.230 > which hasn't been packaged for Ubuntu|Debian yet. > Get it from git://git.gnome.org/perl-Glib > > Cheers, Roderich From courtel@cena.fr Tue Sep 14 18:05:10 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 10794750302 for ; Tue, 14 Sep 2010 18:05:10 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.91 X-Spam-Level: X-Spam-Status: No, score=-1.91 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Eyjdkrda9lZe for ; Tue, 14 Sep 2010 18:05:02 +0000 (UTC) X-Greylist: delayed 362 seconds by postgrey-1.32 at menubar.gnome.org; Tue, 14 Sep 2010 18:05:02 UTC Received: from mailhost.tls.cena.fr (fw.tls.cena.fr [195.83.98.200]) by menubar.gnome.org (Postfix) with ESMTP id BE49E75027B for ; Tue, 14 Sep 2010 18:05:02 +0000 (UTC) Received: from melko.tls.cena.fr (imap.tls.cena.fr [10.192.32.90]) by mailhost.tls.cena.fr (Postfix) with ESMTP id E808F22C5 for ; Tue, 14 Sep 2010 19:58:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by melko.tls.cena.fr (Postfix) with ESMTP id D3B9C9293 for ; Tue, 14 Sep 2010 19:58:49 +0200 (CEST) Received: from melko.tls.cena.fr ([127.0.0.1]) by localhost (melko.tls.cena.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TQ+nTcRHRg0R for ; Tue, 14 Sep 2010 19:58:49 +0200 (CEST) Received: from [10.192.33.134] (bendy [10.192.33.134]) by melko.tls.cena.fr (Postfix) with ESMTP id 121FD928D for ; Tue, 14 Sep 2010 19:58:47 +0200 (CEST) Message-ID: <4C8FB7D6.1000207@cena.fr> Date: Tue, 14 Sep 2010 19:58:46 +0200 From: Nicolas Courtel User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Displaying a popup before the main window Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 18:05:10 -0000 Hello, As my program needs a few seconds to start, I would like to display a popup to tell the user that it's working. Looks pretty simple, but for some reason the popup shows up empty, and I can't figure out what I've done wrong. I would be grateful for any clue, here's a short example which shows the problem. #!/usr/bin/perl -w use strict; use Gtk2 -init; my $window = Gtk2::Window->new; $window->set_title ("My window"); my $popup = Gtk2::MessageDialog->new ($window, 'destroy-with-parent', 'info', 'none', "Please wait for 10 seconds..."); $popup->show; sleep 10; my $label = Gtk2::Label->new ("Hello, world!"); $window->add ($label); $popup->destroy; $window->show_all; Gtk2->main; -- Nicolas From ebassi@gmail.com Tue Sep 14 20:59:40 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C056D7500FB for ; Tue, 14 Sep 2010 20:59:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T5xDKA3zfKTt for ; Tue, 14 Sep 2010 20:59:38 +0000 (UTC) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by menubar.gnome.org (Postfix) with ESMTP id 957197500F2 for ; Tue, 14 Sep 2010 20:59:28 +0000 (UTC) Received: by ewy22 with SMTP id 22so160913ewy.27 for ; Tue, 14 Sep 2010 13:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=aFDtfU8SutmRjFORYXr2oXG7TAMjS9/YVLuLpojjnGA=; b=BUSMKBrmJ/sZWtqrIvCAezVRav+sMKwyXd9T8VZ2OBxhfHMQtqvktHckZOi+f8DDjm gCbi9GgTopTEppJvtCnJhOsVhBDfv6+r2arHCXpgWqLswYqo50ZRGKpJuvTzBsY6HmO7 vCpHeK8h4hAsbJubIawZukVYFRF9Jcw4dR7KE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=i0dk6f8kkQs45pgtcaiHGvcufARWkNplGchha0M1FPUSz+bZFbCozYqFboVxLeSKOZ SG/Z4uwfQgyvqpFA/MhLJ6B5L4FPwOAmVxuW39lqY3WzkSGDYgpbDyNOeEhLMG/Uv3wk sal6kCBjvU+D/3kff4SYIpxM3EzfbrAt4/q0o= Received: by 10.223.121.134 with SMTP id h6mr201249far.74.1284497966853; Tue, 14 Sep 2010 13:59:26 -0700 (PDT) Received: from [192.168.1.65] (93-97-55-43.zone5.bethere.co.uk [93.97.55.43]) by mx.google.com with ESMTPS id a6sm297006faa.44.2010.09.14.13.59.24 (version=SSLv3 cipher=RC4-MD5); Tue, 14 Sep 2010 13:59:25 -0700 (PDT) Subject: Re: Displaying a popup before the main window From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <4C8FB7D6.1000207@cena.fr> References: <4C8FB7D6.1000207@cena.fr> Content-Type: text/plain; charset="UTF-8" Date: Tue, 14 Sep 2010 21:59:20 +0100 Message-ID: <1284497960.2632.2.camel@gambit> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 20:59:41 -0000 On Tue, 2010-09-14 at 19:58 +0200, Nicolas Courtel wrote: > Hello, > > As my program needs a few seconds to start, I would like to display a > popup to tell the user that it's working. > Looks pretty simple, but for some reason the popup shows up empty, and I > can't figure out what I've done wrong. to borrow the phrase from those damn kids today: you're doing it wrong. > sleep 10; do not *ever* call a blocking function when using a mainloop-based toolkit like gtk+. *any* blocking call will prevent the main loop to spin, which will prevent redraw operations and event handling from ever happening. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi From grant@mclean.net.nz Tue Sep 14 21:54:35 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 8E50375029C for ; Tue, 14 Sep 2010 21:54:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qdSMJDEhLl5f for ; Tue, 14 Sep 2010 21:54:32 +0000 (UTC) X-Greylist: delayed 399 seconds by postgrey-1.32 at menubar.gnome.org; Tue, 14 Sep 2010 21:54:32 UTC Received: from mail.catalyst.net.nz (bertrand.catalyst.net.nz [202.78.240.40]) by menubar.gnome.org (Postfix) with ESMTP id 1CC057501C7 for ; Tue, 14 Sep 2010 21:54:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id 779AF31D47 for ; Wed, 15 Sep 2010 09:47:42 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VX5eVHGNlW9t for ; Wed, 15 Sep 2010 09:47:41 +1200 (NZST) Received: from [192.168.2.77] (leibniz.catalyst.net.nz [202.78.240.7]) (Authenticated sender: grant) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 515D331C98 for ; Wed, 15 Sep 2010 09:47:41 +1200 (NZST) Subject: Re: Displaying a popup before the main window From: Grant McLean To: gtk-perl-list@gnome.org In-Reply-To: <1284497960.2632.2.camel@gambit> References: <4C8FB7D6.1000207@cena.fr> <1284497960.2632.2.camel@gambit> Content-Type: text/plain; charset="UTF-8" Date: Wed, 15 Sep 2010 09:47:40 +1200 Message-ID: <1284500860.15965.6.camel@putnam.wgtn.cat-it.co.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 21:54:36 -0000 On Tue, 2010-09-14 at 21:59 +0100, Emmanuele Bassi wrote: > On Tue, 2010-09-14 at 19:58 +0200, Nicolas Courtel wrote: > > Hello, > > > > As my program needs a few seconds to start, I would like to display a > > popup to tell the user that it's working. > > Looks pretty simple, but for some reason the popup shows up empty, and I > > can't figure out what I've done wrong. > > to borrow the phrase from those damn kids today: you're doing it wrong. > > > sleep 10; > > do not *ever* call a blocking function when using a mainloop-based > toolkit like gtk+. More info in the FAQ ... http://live.gnome.org/GTK2-Perl/FrequentlyAskedQuestions#Why_sometimes_the_UI_does_not_update.3F Cheers Grant From gg@zip.com.au Tue Sep 14 22:15:57 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A714F750277 for ; Tue, 14 Sep 2010 22:15:57 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.823 X-Spam-Level: X-Spam-Status: No, score=-1.823 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7QeIcFssOZRl for ; Tue, 14 Sep 2010 22:15:54 +0000 (UTC) Received: from mailout1.pacific.net.au (mailout1-7.pacific.net.au [61.8.2.214]) by menubar.gnome.org (Postfix) with ESMTP id C4E757501AC for ; Tue, 14 Sep 2010 22:15:44 +0000 (UTC) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 70B5B5D1611; Wed, 15 Sep 2010 08:15:42 +1000 (EST) Received: from blah.blah (ppp28B1.dyn.pacific.net.au [61.8.40.177]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 89E878C0C; Wed, 15 Sep 2010 08:15:40 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1Ovdmq-00019O-08; Wed, 15 Sep 2010 08:15:36 +1000 From: Kevin Ryde To: Nicolas Courtel Subject: Re: Displaying a popup before the main window Organization: Bah Humbug References: <4C8FB7D6.1000207@cena.fr> Mail-Copies-To: never Date: Wed, 15 Sep 2010 08:15:35 +1000 Message-ID: <87d3sg0y60.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 22:15:57 -0000 Nicolas Courtel writes: > > the popup shows up empty, and > I can't figure out what I've done wrong. It's only drawn when a map/expose/etc comes back from the server, by which time you're off doing other things. A window with a background pixmap can show without any action from the app program. Eg. per below, except that recent gtk has broken set_cursor() on new windows like this, so you don't get the busy cursor. It ought to send an XSetCursor, but for some reason waits to interact with the server :-(. Making the image is a bit tedious. Is there a library to do a whole temporary popup already? You'd probably want a sub-window to avoid a window resize tiling with the image. Or turn that off in the wm hints, or use 'popup' window type, or all three :). #!/usr/bin/perl -w use strict; use Gtk2 -init; my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file ('/usr/share/doc/libgtk2-perl-doc/examples/gtk-demo/apple-red.png'); my $width = $pixbuf->get_width; my $height = $pixbuf->get_height; my $popup = Gtk2::Window->new ('toplevel'); $popup->set_default_size ($width, $height); $popup->realize; my $win = $popup->window; my $gc = $popup->style->bg_gc('normal'); my $pixmap = Gtk2::Gdk::Pixmap->new ($win, $width, $height, -1); $pixmap->draw_rectangle ($gc, 1, 0,0, $width,$height); # clear $pixmap->draw_pixbuf ($gc, $pixbuf, 0,0, 0,0, $width,$height, 'none', 0,0); $win->set_back_pixmap ($pixmap); $win->set_cursor (Gtk2::Gdk::Cursor->new('watch')); $popup->show; $popup->get_display->flush; sleep 30; my $window = Gtk2::Window->new; $window->set_title ("My window"); my $label = Gtk2::Label->new ("Hello, world!"); $window->add ($label); $popup->destroy; $window->show_all; Gtk2->main; From dhoworth@mrc-lmb.cam.ac.uk Wed Sep 15 09:46:03 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2017A7501DD for ; Wed, 15 Sep 2010 09:46:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.21 X-Spam-Level: X-Spam-Status: No, score=-4.21 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9jR0sHWVUZRy for ; Wed, 15 Sep 2010 09:46:00 +0000 (UTC) X-Greylist: delayed 948 seconds by postgrey-1.32 at menubar.gnome.org; Wed, 15 Sep 2010 09:45:59 UTC Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) by menubar.gnome.org (Postfix) with ESMTP id DE01C7500D5 for ; Wed, 15 Sep 2010 09:45:51 +0000 (UTC) X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail.mrc-lmb.cam.ac.uk ([131.111.85.9]:37432 helo=mail.lmb.internal) by ppsw-30.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.136]:25) with esmtp id 1OvoJU-00062x-f8 (Exim 4.72) for gtk-perl-list@gnome.org (return-path ); Wed, 15 Sep 2010 10:30:00 +0100 Received: from cpepc210-3.lmb.internal ([10.14.0.2]) by mail.lmb.internal with esmtp (Exim 4.63) (envelope-from ) id 1OvoJU-0002BU-LZ for gtk-perl-list@gnome.org; Wed, 15 Sep 2010 10:30:00 +0100 Message-ID: <4C909218.2090104@mrc-lmb.cam.ac.uk> Date: Wed, 15 Sep 2010 10:30:00 +0100 From: Dave Howorth Organization: MRC Centre for Protein Engineering User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Displaying a popup before the main window References: <4C8FB7D6.1000207@cena.fr> In-Reply-To: <4C8FB7D6.1000207@cena.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 09:46:03 -0000 Nicolas Courtel wrote: > Hello, > > As my program needs a few seconds to start, I would like to display a > popup to tell the user that it's working. > Looks pretty simple, but for some reason the popup shows up empty, and I > can't figure out what I've done wrong. > > I would be grateful for any clue, here's a short example which shows the > problem. There are various possible ways. The main problem with your version is that you didn't process the events that occur when you try to show the splash screen. The version below is one way to do it: > #!/usr/bin/perl -w > > use strict; > use Gtk2 -init; > > my $window = Gtk2::Window->new; > $window->set_title ("My window"); # my $popup = Gtk2::MessageDialog->new ($window, 'destroy-with-parent', # 'info', # 'none', "Please wait for 10 # seconds..."); my $splash = Gtk2::Label->new("Please wait for 10 seconds..."); $window->add($splash); $window->show; > $popup->show; # Process the events so the show actually does something Gtk2->main_iteration while Gtk2->events_pending; # The sleep is only here because this is an example, right? # You wouldn't do this in real-life > sleep 10; # The splash needs to be destroyed before you add the real content. # Build real content in a main container widget then destroy the # splash, then add the container to the window > my $label = Gtk2::Label->new ("Hello, world!"); $splash->destroy; > $window->add ($label); # $popup->destroy; > $window->show_all; > Gtk2->main; > From dhoworth@mrc-lmb.cam.ac.uk Wed Sep 15 09:58:28 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 83A10750443 for ; Wed, 15 Sep 2010 09:58:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.21 X-Spam-Level: X-Spam-Status: No, score=-4.21 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AV2amDkb0Cp1 for ; Wed, 15 Sep 2010 09:58:23 +0000 (UTC) Received: from ppsw-33.csi.cam.ac.uk (ppsw-33.csi.cam.ac.uk [131.111.8.133]) by menubar.gnome.org (Postfix) with ESMTP id E71BB7501DD for ; Wed, 15 Sep 2010 09:58:14 +0000 (UTC) X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail.mrc-lmb.cam.ac.uk ([131.111.85.9]:47681 helo=mail.lmb.internal) by ppsw-33.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.139]:25) with esmtp id 1Ovokm-0000Xj-hZ (Exim 4.72) for gtk-perl-list@gnome.org (return-path ); Wed, 15 Sep 2010 10:58:12 +0100 Received: from cpepc210-3.lmb.internal ([10.14.0.2]) by mail.lmb.internal with esmtp (Exim 4.63) (envelope-from ) id 1Ovokm-0005Ny-BX for gtk-perl-list@gnome.org; Wed, 15 Sep 2010 10:58:12 +0100 Message-ID: <4C9098B4.30405@mrc-lmb.cam.ac.uk> Date: Wed, 15 Sep 2010 10:58:12 +0100 From: Dave Howorth Organization: MRC Centre for Protein Engineering User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Displaying a popup before the main window References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> In-Reply-To: <4C909218.2090104@mrc-lmb.cam.ac.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 09:58:28 -0000 Ooops didn't copy the mods into the email properly. Add one more line... Dave Howorth wrote: > my $splash = Gtk2::Label->new("Please wait for 10 seconds..."); > $window->add($splash); > $window->show; >> $popup->show; $splash->show; > # Process the events so the show actually does something > > Gtk2->main_iteration while Gtk2->events_pending; From ebassi@gmail.com Wed Sep 15 10:31:06 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7B2D2750B4B for ; Wed, 15 Sep 2010 10:31:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.913 X-Spam-Level: X-Spam-Status: No, score=-1.913 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ETPo8Sq8tfMg for ; Wed, 15 Sep 2010 10:31:03 +0000 (UTC) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by menubar.gnome.org (Postfix) with ESMTP id 7D536750A94 for ; Wed, 15 Sep 2010 10:30:52 +0000 (UTC) Received: by gwb15 with SMTP id 15so15236gwb.27 for ; Wed, 15 Sep 2010 03:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=eKusuFumvBnrycdGVWt2iVdOcvnjB1WVIU/ndpKf8iM=; b=OMYUMN+gz8DLczYVNonPFXsUp1427z7aJhtz+HnPpbnvAkuc/PgQNxjX2IsVaIVUWx pIDhGWCQ9I3I1r16A051idQwqoiHreQeS2c572j6FyLcij23L71sCAo3BBmeSybBHMW2 HzLgKVUel5Keqzm6ANJR/IbXxR6btzCwuKYkY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=bVD6UW9VdmbGjl709egyV25RQCI/fXWoafgHsmHzmrlRLwq6pNtoI5mrcGX/WhtX2C gBLYwcxmOpqxl97CPMPxs25Cb3M5efObI13FFChnYSD5uuNjZcH0rJGYIO/xkwqH9Ejv BRLYwfMaHaRM4Svyy/nN+ZgD+TtN4EmOuZb+o= Received: by 10.100.190.13 with SMTP id n13mr1552718anf.129.1284546650977; Wed, 15 Sep 2010 03:30:50 -0700 (PDT) Received: from [10.250.128.214] ([158.43.2.102]) by mx.google.com with ESMTPS id i30sm2052528anh.9.2010.09.15.03.30.48 (version=SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 03:30:50 -0700 (PDT) Subject: Re: Displaying a popup before the main window From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <4C909218.2090104@mrc-lmb.cam.ac.uk> References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> Content-Type: text/plain; charset="UTF-8" Date: Wed, 15 Sep 2010 11:30:45 +0100 Message-ID: <1284546645.2381.8.camel@gambit> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:31:06 -0000 On Wed, 2010-09-15 at 10:30 +0100, Dave Howorth wrote: > # Process the events so the show actually does something > > Gtk2->main_iteration while Gtk2->events_pending; no, no, no. no, please, for the love of all that's sacred and good and pure in the Universe: don't. manually, and forcefully, spinning the main loop is the equivalent of taking some ibuprofen to stop the headache that you get when you bang your head against the wall to bang a nail in with your forehead. the ibuprofen is masking the fact that *you're banging your head against the wall to bang a nail in*. in this case, spinning the main loop is just masking the fact that you're blocking the main loop. the correct way to deal with this is *to stop blocking the main loop*. split your operations in small chunks. use worker threads and signal the main UI thread when done. spin off worker processes and use a pipe to feed data to them and read back the results. split your application in a D-Bus activated daemon and use D-Bus as the IPC mechanism for remote object manipulation. this particular problem space has been flogged to death, and then some, like the proverbial horse. spinning the main loop is *not* the solution, it's just a hack. ${DEITY}, I'd love to deprecate those functions in gtk itself, so that people stopped abusing them and just *fixed their programs*. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi From dhoworth@mrc-lmb.cam.ac.uk Wed Sep 15 10:45:16 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9B205750465 for ; Wed, 15 Sep 2010 10:45:16 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.21 X-Spam-Level: X-Spam-Status: No, score=-4.21 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3cmvCvVmMQqq for ; Wed, 15 Sep 2010 10:45:14 +0000 (UTC) Received: from ppsw-30.csi.cam.ac.uk (ppsw-30.csi.cam.ac.uk [131.111.8.130]) by menubar.gnome.org (Postfix) with ESMTP id 074627501DD for ; Wed, 15 Sep 2010 10:45:05 +0000 (UTC) X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail.mrc-lmb.cam.ac.uk ([131.111.85.9]:47415 helo=mail.lmb.internal) by ppsw-30.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.136]:25) with esmtp id 1OvpU7-0005I1-fn (Exim 4.72) for gtk-perl-list@gnome.org (return-path ); Wed, 15 Sep 2010 11:45:03 +0100 Received: from cpepc210-3.lmb.internal ([10.14.0.2]) by mail.lmb.internal with esmtp (Exim 4.63) (envelope-from ) id 1OvpU7-0002AH-SA for gtk-perl-list@gnome.org; Wed, 15 Sep 2010 11:45:03 +0100 Message-ID: <4C90A3AF.1090008@mrc-lmb.cam.ac.uk> Date: Wed, 15 Sep 2010 11:45:03 +0100 From: Dave Howorth Organization: MRC Centre for Protein Engineering User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Displaying a popup before the main window References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> <1284546645.2381.8.camel@gambit> In-Reply-To: <1284546645.2381.8.camel@gambit> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 10:45:16 -0000 Emmanuele Bassi wrote: > in this case, spinning the main loop is just masking the fact that > you're blocking the main loop. the correct way to deal with this is *to > stop blocking the main loop*. We are discussing a splash screen that is shown during initialization while the GUI is being constructed and before the main loop is reached. You're proposing a complicated alternative mechanism and to what end, I'm not sure. Perhaps if you gave a reference to a good explanation of your rationale, instead of simply pouring scorn on people, it would be more helpful. Cheers, Dave From ebassi@gmail.com Wed Sep 15 11:18:10 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 561F0750AE7 for ; Wed, 15 Sep 2010 11:18:10 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yuLH1oabFCmg for ; Wed, 15 Sep 2010 11:18:06 +0000 (UTC) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by menubar.gnome.org (Postfix) with ESMTP id 96CCD750448 for ; Wed, 15 Sep 2010 11:17:58 +0000 (UTC) Received: by qyk31 with SMTP id 31so3993318qyk.6 for ; Wed, 15 Sep 2010 04:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=NEiNOpIvttZKpLwEp5jRFeO9WeKSLja39b7ePKUD//s=; b=R0vfM+iFUvF67Awy+RB5e8OwqMPgJRnv9mMQmnp/76qRGpLsNw5hURVKdI9nyx6HPp wQi/gEeo/fY2tTQ0aZvTjE6oX5x73FQnkC2w/R374MXZ/ChIx0SyO5BBLV4VOPC4+okS cNgUrlPmTNP29YUPo1A69Kvhpu+cpFycZThHI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=KYVu2bsxRcPhn1t98hKTu13DqMlquCldWazjCSodj76cZlCLUQXluOZKEPIdaoqd7J 2hJsonUxCuB4BJBlgxso39yRPw2Z7fQCz9g9TWdJls+MUXJM1Rg9PD2hf8a2w8Ll8k0G 7l+yGt+glP/RaDIKL5B/IMs6SkzfQUSsmEpOs= Received: by 10.224.73.134 with SMTP id q6mr987702qaj.65.1284549476760; Wed, 15 Sep 2010 04:17:56 -0700 (PDT) Received: from [10.250.128.214] ([158.43.2.102]) by mx.google.com with ESMTPS id r1sm1210471qcq.46.2010.09.15.04.17.54 (version=SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 04:17:56 -0700 (PDT) Subject: Re: Displaying a popup before the main window From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <4C90A3AF.1090008@mrc-lmb.cam.ac.uk> References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> <1284546645.2381.8.camel@gambit> <4C90A3AF.1090008@mrc-lmb.cam.ac.uk> Content-Type: text/plain; charset="UTF-8" Date: Wed, 15 Sep 2010 12:17:51 +0100 Message-ID: <1284549471.2381.17.camel@gambit> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 (2.30.3-1.fc13) Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:18:10 -0000 On Wed, 2010-09-15 at 11:45 +0100, Dave Howorth wrote: > Emmanuele Bassi wrote: > > in this case, spinning the main loop is just masking the fact that > > you're blocking the main loop. the correct way to deal with this is *to > > stop blocking the main loop*. > > We are discussing a splash screen that is shown during initialization > while the GUI is being constructed and before the main loop is reached. the premise is, in this case, irrelevant: you're blocking the main loop, spinning it is pointless and dangerous. actually, by showing a splash screen you're *delaying* the start up of your application: don't use splash screens. it's no 1997 any more. if your application starts slowly, bring up the UI as soon as possible and fill it up with real data lazily; using a splash screen is just papering over the issue that you're blocking the user because. wait, that's *exactly* like manually spinning the main loop! who would have thought. > You're proposing a complicated alternative mechanism and to what end, > I'm not sure. my end is to ensure people write *correct* application code, and use the toolkit in the *correct* way. > Perhaps if you gave a reference to a good explanation of > your rationale, instead of simply pouring scorn on people, it would be > more helpful. the rationale is: by spinning the main loop you're masking issues in your application. don't do that. I thought it was clear by the amount of scorn I used. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi From sergstesh@yahoo.com Wed Sep 15 11:30:34 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5FD0B750B76 for ; Wed, 15 Sep 2010 11:30:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z0PB7fAUJJdN for ; Wed, 15 Sep 2010 11:30:32 +0000 (UTC) Received: from web112117.mail.gq1.yahoo.com (web112117.mail.gq1.yahoo.com [67.195.22.95]) by menubar.gnome.org (Postfix) with SMTP id 2E9F6750AE7 for ; Wed, 15 Sep 2010 11:30:23 +0000 (UTC) Received: (qmail 91419 invoked by uid 60001); 15 Sep 2010 11:30:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1284550222; bh=IKjaPJLD5wXCbSsc7pDAv7tlZKIoCyVeadQUuo9w6xw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=cCn/inmWjkSW0wTB1SuCypXE3RLGOinwunHHba21A/9t7sNs6P+VdXnKNYpNoXOr0OJke1qXxg5pc2HZxZ/gRAw0VFO4Dqc2qoJzk7eyBYvCQR6JU6gDqgUdID9R3QeM/rU0QIa4rSFZ3tABms2VSkPQBDqI2Dr/d1SOzkFeqmE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=oTjoibTBGcN2Ww6LNs3M9iz6CMXn7W3RM8qqkoIBeldYIU1QDHc49oHLrvxt3i6VOYrJH4HQZvdlzTVHARpbX2QmAkI8D5M72WIHgPXLUN7xMxqqHucR7cfDYnEvYt8juirUOcu+fsk/ngEzcZrrPqRvYZGKnDm9CS0dpSIDPao=; Message-ID: <479682.81254.qm@web112117.mail.gq1.yahoo.com> X-YMail-OSG: aWPAeiAVM1lpUgOBIXMEAfLzgIQ6dH3JWjqmZ9_cUI48hUW qP3rNUjWVTQ_e1EMUm7lD76zBN0ZNQrbVuKI4raEaIQt0arbSyYU6ysXaHpO N5MmFn8B6LId0f6ag.d.zsM2ZPsHGDE8UKIbJUNfI4PPP5tzn3ox_FHiIyda PCZ6mn3CJU_HHsgCFZzn7ZmQlWlv8BbdfOrq8DwiTX0hX1GO4usX6Iyis7gQ BvWOt0iA5D7vxxk56xXQmPEXPi81RafJSG6DaoHfNL4tyft.kElDNkYfV88l mokRznNFK4GJiRoEER0MixPTalimFqtKAdqawJr4k17mLBhpZoMRXi6Jiy2. YttYT._MtGag.zzXXBR6oTTShUvo- Received: from [87.69.49.127] by web112117.mail.gq1.yahoo.com via HTTP; Wed, 15 Sep 2010 04:30:22 PDT X-Mailer: YahooMailClassic/11.4.7 YahooMailWebService/0.8.105.279950 Date: Wed, 15 Sep 2010 04:30:22 -0700 (PDT) From: Sergei Steshenko Subject: Spinning the main loop To: gtk-perl-list@gnome.org, Emmanuele Bassi In-Reply-To: <1284549471.2381.17.camel@gambit> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:30:34 -0000 --- On Wed, 9/15/10, Emmanuele Bassi wrote: > From: Emmanuele Bassi > Subject: Re: Displaying a popup before the main window > To: gtk-perl-list@gnome.org > Date: Wednesday, September 15, 2010, 4:17 AM > On Wed, 2010-09-15 at 11:45 +0100, [snip] > the rationale is: by spinning the main loop you're masking > issues in > your application. don't do that. I thought it was clear by > the amount of > scorn I used. > > ciao, > Emmanuele. In my reality I have a set of calculations which might take up to a minute, and tens of seconds typically. The calculations take as input the GUI state and are triggered by it. So, I intentionally spin the main loop. This is because there is an event queue, and if I let the GUI to be responsive, it may accumulate the events while the heavy calculations are in progress. When that happens, after the completions of one round of the heavy calculations another one immediately starts, so, it may take up to several minutes for the whole thing to settle down. I think once it took half an hour or so. Actually, not only I spin the main loop, I also hide the sensitive GUI elements which may cause new events, i.e. there is, for example, no physical possibility to change state of normally existing slider (called "Adjustment") because the sliders are temporarily hidden. One may find it ugly, but to mess up with the event queue might be even uglier (for example, purging it until the last state change). Regards, Sergei. From dov.grobgeld@gmail.com Wed Sep 15 11:51:16 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E5A03750C1B for ; Wed, 15 Sep 2010 11:51:16 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.922 X-Spam-Level: X-Spam-Status: No, score=-1.922 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MJR6TgauTGMG for ; Wed, 15 Sep 2010 11:51:09 +0000 (UTC) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by menubar.gnome.org (Postfix) with ESMTP id 547CF750B76 for ; Wed, 15 Sep 2010 11:51:00 +0000 (UTC) Received: by qyk4 with SMTP id 4so104897qyk.6 for ; Wed, 15 Sep 2010 04:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=azTHBcQCmibyyZvqV/KatnnySVMROCodEqVsnhCPIIs=; b=bcD6TzCevT1bZ3N4jUvsv+ykq0nsuM9JpVQOoNR1d2KC9rwOgY1n+0A+ioRoAgIbr+ 1kPOGRpbPJv/GvO1HW/xGo0BjcQguROMxPLyY2M7KA8zN2NyFibImcFl7OR/rxIBRePl m+FFoCxwv7iYvfvAlFpGbBPN0JVA28FHafnP4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=srQuDSz47krh81ymyMwD/aIpQqNiOebn3ubBxjy3z/biuvHx543MndofUa78F8DX0l eQbwg426CZq/ei188wpBF1mojHnlUs74MjwBLmg0PI8Qs5AsZpcgRIlEUNC4h1K5NDWA Hfaa5GjGQukIK3iLJtvRfjGgGYQrbwHQ5/508= MIME-Version: 1.0 Received: by 10.224.80.133 with SMTP id t5mr1017019qak.75.1284551458562; Wed, 15 Sep 2010 04:50:58 -0700 (PDT) Received: by 10.229.235.15 with HTTP; Wed, 15 Sep 2010 04:50:58 -0700 (PDT) In-Reply-To: <479682.81254.qm@web112117.mail.gq1.yahoo.com> References: <1284549471.2381.17.camel@gambit> <479682.81254.qm@web112117.mail.gq1.yahoo.com> Date: Wed, 15 Sep 2010 13:50:58 +0200 Message-ID: Subject: Re: Spinning the main loop From: Dov Grobgeld To: Sergei Steshenko Content-Type: multipart/alternative; boundary=0015175ccf9a62251704904af1cb Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 11:51:17 -0000 --0015175ccf9a62251704904af1cb Content-Type: text/plain; charset=ISO-8859-1 For an example of how to use an additional thread and have it communicate with the mainloop thread see my example at: http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg14213.html This is the correct way of doing anything time consuming without interrupting the gui flow. There is no contradition to the setting of the busy state to disable widgets or changing cursors. But the you don't interrupt the GUI by delegating your work into a different threads. Regards, Dov On Wed, Sep 15, 2010 at 13:30, Sergei Steshenko wrote: > > > --- On Wed, 9/15/10, Emmanuele Bassi wrote: > > > From: Emmanuele Bassi > > Subject: Re: Displaying a popup before the main window > > To: gtk-perl-list@gnome.org > > Date: Wednesday, September 15, 2010, 4:17 AM > > On Wed, 2010-09-15 at 11:45 +0100, > [snip] > > > the rationale is: by spinning the main loop you're masking > > issues in > > your application. don't do that. I thought it was clear by > > the amount of > > scorn I used. > > > > ciao, > > Emmanuele. > > > In my reality I have a set of calculations which might take up to a minute, > and tens of seconds typically. The calculations take as input the GUI > state and are triggered by it. > > So, I intentionally spin the main loop. This is because there is an event > queue, and if I let the GUI to be responsive, it may accumulate the events > while the heavy calculations are in progress. When that happens, after the > completions of one round of the heavy calculations another one immediately > starts, so, it may take up to several minutes for the whole thing to > settle down. I think once it took half an hour or so. > > Actually, not only I spin the main loop, I also hide the sensitive GUI > elements which may cause new events, i.e. there is, for example, no > physical possibility to change state of normally existing slider (called > "Adjustment") because the sliders are temporarily hidden. > > One may find it ugly, but to mess up with the event queue might be even > uglier (for example, purging it until the last state change). > > Regards, > Sergei. > > > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > --0015175ccf9a62251704904af1cb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
For an example of how to use an additional thread and have= it communicate with the mainloop thread see my example at:

http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg14213.html=

This is the correct way of doing anything time consuming without interr= upting the gui flow. There is no contradition to the setting of the busy st= ate to disable widgets or changing cursors. But the you don't interrupt= the GUI by delegating your work into a different threads.

Regards,
Dov


On Wed, Sep 15, 2= 010 at 13:30, Sergei Steshenko <sergstesh@yahoo.com> wrote:


--- On Wed, 9/15/10, Emmanuele Bassi <ebassi@gmail.com> wrote:

> From: Emmanuele Bassi <ebassi@g= mail.com>
> Subject: Re: Displaying a popup before the main window
> To: gtk-perl-list@gnome.org=
> Date: Wednesday, September 15, 2010, 4:17 AM
> On Wed, 2010-09-15 at 11:45 +0100,
[snip]

> the rationale is: by spinning the main loop you're masking
> issues in
> your application. don't do that. I thought it was clear by
> the amount of
> scorn I used.
>
> ciao,
> =A0Emmanuele.


In my reality I have a set of calculations which might take up to a minute,=
and tens of seconds typically. The calculations take as input the GUI
state and are triggered by it.

So, I intentionally spin the main loop. This is because there is an event queue, and if I let the GUI to be responsive, it may accumulate the events<= br> while the heavy calculations are in progress. When that happens, after the<= br> completions of one round of the heavy calculations another one immediately<= br> starts, so, it may take up to several minutes for the whole thing to
settle down. I think once it took half an hour or so.

Actually, not only I spin the main loop, I also hide the sensitive GUI
elements which may cause new events, i.e. there is, for example, no
physical possibility to change state of normally existing slider (called "Adjustment") because the sliders are temporarily hidden.

One may find it ugly, but to mess up with the event queue might be even
uglier (for example, purging it until the last state change).

Regards,
=A0Sergei.



_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

--0015175ccf9a62251704904af1cb-- From sergstesh@yahoo.com Wed Sep 15 12:02:34 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3E193750C73 for ; Wed, 15 Sep 2010 12:02:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7cTG-F64fnUN for ; Wed, 15 Sep 2010 12:02:31 +0000 (UTC) Received: from web112112.mail.gq1.yahoo.com (web112112.mail.gq1.yahoo.com [67.195.22.90]) by menubar.gnome.org (Postfix) with SMTP id F31B5750C66 for ; Wed, 15 Sep 2010 12:02:20 +0000 (UTC) Received: (qmail 49987 invoked by uid 60001); 15 Sep 2010 12:02:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1284552139; bh=2P2lraMMPKpNKR8WDYFuSsFEHckNZXtDwzIUBh0Q294=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XnJUXRuXwuQaniaFJ0WbhTTtzSLXh6qdC7XcOb32p2co5HvfMEo7LOw4u9A4SzjQUExAPqQn+w5HBGWNVseC4dTcS7rghXB5y6rZSGbjZtuely/7XkddsDPe2nV2z04jtSmVXRgGYYo+oFDvk0HiS5+lW4BcFjAeUwiWf8Xom6Y= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aka40CgrVYMfjnuqoGVFJY+dkRafknCzTwQLHFjtgzrRY11deoctv5FJ2/UTDP8AsFzrfrh12Mr7RjGpKltDSoEXBFR117ju3XynYZL8knOQTgMYrF1+c7DO4ct7JiHFsWilvAQXHPX30DPRv+5tXDAIz2qflMJBtq910FWAkQs=; Message-ID: <87798.48930.qm@web112112.mail.gq1.yahoo.com> X-YMail-OSG: H3re3c0VM1knYUsnTHPFhPEGaWxY.QW4ZVXpxk3ZrPHWfOS pMpfN2TLUJ2Tz33Geq1ztF3hwkiJpmzV0YYpZ83EsVhK_BuJP_bdqP7c8UQJ Z3CKcEkz9t6qjz7YPq5zFz6mbPlAXIPOI9segc4tO5ymcOwJi4o.CNSnK82c 5rCq4fSAs.Fxm0ZJ2VlxO4q0I96gLdXleOR_jIKKwjbTqb6BCpWuLDCap06Z iH_cv.qsjRQWCGAI8AvH4Ij0TXRadO.unb9Pecp5Zfe4KsOseTz8eibTz3i1 DWlwtWWwVniJDJLEyy3GiEDnokT0mv5cjwY.SM0PC0dM5ottzHnY0mWUMUjG gjth1YqKIGtSAHCKC17Op7MhGeJw- Received: from [87.69.49.127] by web112112.mail.gq1.yahoo.com via HTTP; Wed, 15 Sep 2010 05:02:18 PDT X-Mailer: YahooMailClassic/11.4.7 YahooMailWebService/0.8.105.279950 Date: Wed, 15 Sep 2010 05:02:18 -0700 (PDT) From: Sergei Steshenko Subject: Re: Spinning the main loop To: Dov Grobgeld MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 12:02:34 -0000 What for do I need to have a sensitive GUI if I want to discard produced=0A= by it events during my heavy calculations in the first place ?=0A=0AThanks,= =0A Sergei.=0A=0A=0A--- On Wed, 9/15/10, Dov Grobgeld wrote:=0A=0AFrom: Dov Grobgeld =0ASubject: Re:= Spinning the main loop=0ATo: "Sergei Steshenko" =0ACc= : gtk-perl-list@gnome.org, "Emmanuele Bassi" =0ADate: Wed= nesday, September 15, 2010, 4:50 AM=0A=0AFor an example of how to use an ad= ditional thread and have it communicate with the mainloop thread see my exa= mple at:=0A=0Ahttp://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg1= 4213.html=0A=0A=0AThis is the correct way of doing anything time consuming = without interrupting the gui flow. There is no contradition to the setting = of the busy state to disable widgets or changing cursors. But the you don't= interrupt the GUI by delegating your work into a different threads. =0A=0A= =0ARegards,=0ADov=0A=0A=0AOn Wed, Sep 15, 2010 at 13:30, Sergei Steshenko <= sergstesh@yahoo.com> wrote:=0A=0A=0A=0A=0A=0A--- On Wed, 9/15/10, Emmanuele= Bassi wrote:=0A=0A=0A=0A> From: Emmanuele Bassi =0A=0A> Subject: Re: Displaying a popup before the main window= =0A=0A> To: gtk-perl-list@gnome.org=0A=0A> Date: Wednesday, September 15, 2= 010, 4:17 AM=0A=0A> On Wed, 2010-09-15 at 11:45 +0100,=0A=0A[snip]=0A=0A=0A= =0A> the rationale is: by spinning the main loop you're masking=0A=0A> issu= es in=0A=0A> your application. don't do that. I thought it was clear by=0A= =0A> the amount of=0A=0A> scorn I used.=0A=0A>=0A=0A> ciao,=0A=0A> =A0Emman= uele.=0A=0A=0A=0A=0A=0AIn my reality I have a set of calculations which mig= ht take up to a minute,=0A=0Aand tens of seconds typically. The calculation= s take as input the GUI=0A=0Astate and are triggered by it.=0A=0A=0A=0ASo, = I intentionally spin the main loop. This is because there is an event=0A=0A= queue, and if I let the GUI to be responsive, it may accumulate the events= =0A=0Awhile the heavy calculations are in progress. When that happens, afte= r the=0A=0Acompletions of one round of the heavy calculations another one i= mmediately=0A=0Astarts, so, it may take up to several minutes for the whole= thing to=0A=0Asettle down. I think once it took half an hour or so.=0A=0A= =0A=0AActually, not only I spin the main loop, I also hide the sensitive GU= I=0A=0Aelements which may cause new events, i.e. there is, for example, no= =0A=0Aphysical possibility to change state of normally existing slider (cal= led=0A=0A"Adjustment") because the sliders are temporarily hidden.=0A=0A=0A= =0AOne may find it ugly, but to mess up with the event queue might be even= =0A=0Auglier (for example, purging it until the last state change).=0A=0A= =0A=0ARegards,=0A=0A =A0Sergei.=0A=0A=0A=0A=0A=0A=0A=0A____________________= ___________________________=0A=0Agtk-perl-list mailing list=0A=0Agtk-perl-l= ist@gnome.org=0A=0Ahttp://mail.gnome.org/mailman/listinfo/gtk-perl-list=0A= =0A=0A=0A=0A=0A=0A From courtel@cena.fr Wed Sep 15 12:39:55 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 72406750B37 for ; Wed, 15 Sep 2010 12:39:55 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.832 X-Spam-Level: X-Spam-Status: No, score=-1.832 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TbW00Z0XBBxb for ; Wed, 15 Sep 2010 12:39:52 +0000 (UTC) Received: from mailhost.tls.cena.fr (fw.tls.cena.fr [195.83.98.200]) by menubar.gnome.org (Postfix) with ESMTP id 132FD750478 for ; Wed, 15 Sep 2010 12:39:41 +0000 (UTC) Received: from melko.tls.cena.fr (imap.tls.cena.fr [10.192.32.90]) by mailhost.tls.cena.fr (Postfix) with ESMTP id F310622C7; Wed, 15 Sep 2010 14:39:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by melko.tls.cena.fr (Postfix) with ESMTP id DAFCD9299; Wed, 15 Sep 2010 14:39:39 +0200 (CEST) Received: from melko.tls.cena.fr ([127.0.0.1]) by localhost (melko.tls.cena.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1S7FdL6JVqxA; Wed, 15 Sep 2010 14:39:39 +0200 (CEST) Received: from [10.192.33.134] (bendy [10.192.33.134]) by melko.tls.cena.fr (Postfix) with ESMTP id A4DE69296; Wed, 15 Sep 2010 14:39:39 +0200 (CEST) Message-ID: <4C90BE8B.40008@cena.fr> Date: Wed, 15 Sep 2010 14:39:39 +0200 From: Nicolas Courtel User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) MIME-Version: 1.0 To: Dave Howorth Subject: Re: Displaying a popup before the main window References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> In-Reply-To: <4C909218.2090104@mrc-lmb.cam.ac.uk> Content-Type: multipart/alternative; boundary="------------040701060608090102020509" Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 12:39:55 -0000 This is a multi-part message in MIME format. --------------040701060608090102020509 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Dave Howorth a écrit : > Nicolas Courtel wrote: > >> Hello, >> >> As my program needs a few seconds to start, I would like to display a >> popup to tell the user that it's working. >> Looks pretty simple, but for some reason the popup shows up empty, and I >> can't figure out what I've done wrong. >> >> I would be grateful for any clue, here's a short example which shows the >> problem. >> > > There are various possible ways. The main problem with your version is > that you didn't process the events that occur when you try to show the > splash screen. The version below is one way to do it: > > [...] > # Process the events so the show actually does something > > Gtk2->main_iteration while Gtk2->events_pending; > > [...] Thanks for your help, this works fine. I might not be safe gtk programming, but initializing my application after have started the gui, as Emmanuele suggested, doesn't look so easy, as I would need to do so without blocking the main loop. -- Nicolas --------------040701060608090102020509 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Dave Howorth a écrit :
Nicolas Courtel wrote:
  
Hello,

As my program needs a few seconds to start, I would like to display a
popup to tell the user that it's working.
Looks pretty simple, but for some reason the popup shows up empty, and I
can't figure out what I've done wrong.

I would be grateful for any clue, here's a short example which shows the
problem.
    

There are various possible ways. The main problem with your version is
that you didn't process the events that occur when you try to show the
splash screen. The version below is one way to do it:
  
[...]
# Process the events so the show actually does something

Gtk2->main_iteration while Gtk2->events_pending;

[...]
Thanks for your help, this works fine.

I might not be safe gtk programming, but initializing my application after have started the gui, as Emmanuele suggested, doesn't look so easy, as I would need to do so without blocking the main loop.

--
Nicolas
--------------040701060608090102020509-- From dhoworth@mrc-lmb.cam.ac.uk Wed Sep 15 12:44:49 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6DBCC750C66 for ; Wed, 15 Sep 2010 12:44:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.21 X-Spam-Level: X-Spam-Status: No, score=-4.21 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sIX14UGot4+T for ; Wed, 15 Sep 2010 12:44:47 +0000 (UTC) Received: from ppsw-32.csi.cam.ac.uk (ppsw-32.csi.cam.ac.uk [131.111.8.132]) by menubar.gnome.org (Postfix) with ESMTP id CF610750C31 for ; Wed, 15 Sep 2010 12:44:38 +0000 (UTC) X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Received: from mail.mrc-lmb.cam.ac.uk ([131.111.85.9]:35806 helo=mail.lmb.internal) by ppsw-32.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.138]:25) with esmtp id 1OvrLo-0006sS-18 (Exim 4.72) for gtk-perl-list@gnome.org (return-path ); Wed, 15 Sep 2010 13:44:36 +0100 Received: from cpepc210-3.lmb.internal ([10.14.0.2]) by mail.lmb.internal with esmtp (Exim 4.63) (envelope-from ) id 1OvrLo-0007gJ-8g for gtk-perl-list@gnome.org; Wed, 15 Sep 2010 13:44:36 +0100 Message-ID: <4C90BFB4.4030500@mrc-lmb.cam.ac.uk> Date: Wed, 15 Sep 2010 13:44:36 +0100 From: Dave Howorth Organization: MRC Centre for Protein Engineering User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Displaying a popup before the main window References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> <1284546645.2381.8.camel@gambit> <4C90A3AF.1090008@mrc-lmb.cam.ac.uk> <1284549471.2381.17.camel@gambit> In-Reply-To: <1284549471.2381.17.camel@gambit> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 12:44:49 -0000 Emmanuele Bassi wrote: > On Wed, 2010-09-15 at 11:45 +0100, Dave Howorth wrote: >> Emmanuele Bassi wrote: >>> in this case, spinning the main loop is just masking the fact that >>> you're blocking the main loop. the correct way to deal with this is *to >>> stop blocking the main loop*. >> We are discussing a splash screen that is shown during initialization >> while the GUI is being constructed and before the main loop is reached. > > the premise is, in this case, irrelevant: you're blocking the main loop, > spinning it is pointless and dangerous. You haven't given a single example or description of what is dangerous. > actually, by showing a splash screen you're *delaying* the start up of > your application: don't use splash screens. it's no 1997 any more. > > if your application starts slowly, bring up the UI as soon as possible > and fill it up with real data lazily; What do you expect a user to want to do with a UI that's incapable of doing anything because it has no data? > using a splash screen is just > papering over the issue that you're blocking the user because. wait, > that's *exactly* like manually spinning the main loop! who would have > thought. Sorry, I have no idea what that means. >> You're proposing a complicated alternative mechanism and to what end, >> I'm not sure. > > my end is to ensure people write *correct* application code, and use the > toolkit in the *correct* way. So again, please provide a reference to a description of "the *correct* way". >> Perhaps if you gave a reference to a good explanation of >> your rationale, instead of simply pouring scorn on people, it would be >> more helpful. > > the rationale is: by spinning the main loop you're masking issues in > your application. don't do that. I thought it was clear by the amount of > scorn I used. Again, you have not given any characterisation or example of what such an issue might be. You're just blustering. Cheers, Dave From dov.grobgeld@gmail.com Wed Sep 15 14:13:37 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 33589750C31 for ; Wed, 15 Sep 2010 14:13:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.922 X-Spam-Level: X-Spam-Status: No, score=-1.922 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XabYzDRHy+sP for ; Wed, 15 Sep 2010 14:13:34 +0000 (UTC) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by menubar.gnome.org (Postfix) with ESMTP id E91B7750BC3 for ; Wed, 15 Sep 2010 14:13:25 +0000 (UTC) Received: by qwg5 with SMTP id 5so232019qwg.27 for ; Wed, 15 Sep 2010 07:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=M3pBkB/+4lQWnTOhZM8ljHseF2G2mN7dCelB3i7AINc=; b=nCes7glO/NMGfoT4kqUH3xVS0lId6nkVZgrLSXHCyc/t5UY77KVwbKh/FFTTmKpx4J /HXKErvfTCIQpcf2ds4g/JRAwZw5bBDAd1AmnFPWdmOKGkttBM62aWgBXWTIQwNlVWnC EsAMKkkd36SWrF1rIafy9a/j+4huryPCEMQ8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=k76FUpiRKVVvP+6ygctQk6fWc1Fj3hBUxLN5XkoUS4gEwKcMhOmOLPo/7ZgMjwy09m nNzBrkex0FrSCLGjEkydzggAnNYro4Xf6N5ZhH0HYCWOC8B4ZIMzEoKPts+wTvlgAakF EU6r+/4kUSprO7mnwkaXQzSV7FTvoCePQM7iM= MIME-Version: 1.0 Received: by 10.224.66.216 with SMTP id o24mr1094353qai.296.1284560003635; Wed, 15 Sep 2010 07:13:23 -0700 (PDT) Received: by 10.229.235.15 with HTTP; Wed, 15 Sep 2010 07:13:23 -0700 (PDT) In-Reply-To: <87798.48930.qm@web112112.mail.gq1.yahoo.com> References: <87798.48930.qm@web112112.mail.gq1.yahoo.com> Date: Wed, 15 Sep 2010 16:13:23 +0200 Message-ID: Subject: Re: Spinning the main loop From: Dov Grobgeld To: Sergei Steshenko Content-Type: multipart/alternative; boundary=00c09f905f33b5997c04904cee50 Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 14:13:37 -0000 --00c09f905f33b5997c04904cee50 Content-Type: text/plain; charset=ISO-8859-1 Here are a couple of reasons why you don't want to freeze the GUI: - To abort the calculation - To report progress - To show partial results - To allow interaction with the previous results - To view help or change preferences - To give a professional look and response to the application. If you don't need interaction, then you might as well run the calculations in cli and just have the GUI as a viewer of your finished results. Dov On Wed, Sep 15, 2010 at 14:02, Sergei Steshenko wrote: > What for do I need to have a sensitive GUI if I want to discard produced > by it events during my heavy calculations in the first place ? > > Thanks, > Sergei. > > > --- On Wed, 9/15/10, Dov Grobgeld wrote: > > From: Dov Grobgeld > Subject: Re: Spinning the main loop > To: "Sergei Steshenko" > Cc: gtk-perl-list@gnome.org, "Emmanuele Bassi" > Date: Wednesday, September 15, 2010, 4:50 AM > > For an example of how to use an additional thread and have it communicate > with the mainloop thread see my example at: > > http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg14213.html > > > This is the correct way of doing anything time consuming without > interrupting the gui flow. There is no contradition to the setting of the > busy state to disable widgets or changing cursors. But the you don't > interrupt the GUI by delegating your work into a different threads. > > > Regards, > Dov > > > On Wed, Sep 15, 2010 at 13:30, Sergei Steshenko > wrote: > > > > > > --- On Wed, 9/15/10, Emmanuele Bassi wrote: > > > > > From: Emmanuele Bassi > > > Subject: Re: Displaying a popup before the main window > > > To: gtk-perl-list@gnome.org > > > Date: Wednesday, September 15, 2010, 4:17 AM > > > On Wed, 2010-09-15 at 11:45 +0100, > > [snip] > > > > > the rationale is: by spinning the main loop you're masking > > > issues in > > > your application. don't do that. I thought it was clear by > > > the amount of > > > scorn I used. > > > > > > ciao, > > > Emmanuele. > > > > > > In my reality I have a set of calculations which might take up to a minute, > > and tens of seconds typically. The calculations take as input the GUI > > state and are triggered by it. > > > > So, I intentionally spin the main loop. This is because there is an event > > queue, and if I let the GUI to be responsive, it may accumulate the events > > while the heavy calculations are in progress. When that happens, after the > > completions of one round of the heavy calculations another one immediately > > starts, so, it may take up to several minutes for the whole thing to > > settle down. I think once it took half an hour or so. > > > > Actually, not only I spin the main loop, I also hide the sensitive GUI > > elements which may cause new events, i.e. there is, for example, no > > physical possibility to change state of normally existing slider (called > > "Adjustment") because the sliders are temporarily hidden. > > > > One may find it ugly, but to mess up with the event queue might be even > > uglier (for example, purging it until the last state change). > > > > Regards, > > Sergei. > > > > > > > > _______________________________________________ > > gtk-perl-list mailing list > > gtk-perl-list@gnome.org > > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > > > > > > > > --00c09f905f33b5997c04904cee50 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Here are a couple of reasons why you don't want to fre= eze the GUI:
  • To abort the calculation
  • To report prog= ress
  • To show partial results
  • To allow interaction with = the previous results
  • To view help or change preferences
  • To give a professional look = and response to the application.
If you don't need interac= tion, then you might as well run the calculations in cli and just have the = GUI as a viewer of your finished results.

Dov

On Wed, Sep 15, 2010 at 14:02, Se= rgei Steshenko <sergstesh@yahoo.com> wrote:
What for do I need to have a sensitive GUI if I want to discard produced by it events during my heavy calculations in the first place ?

Thanks,
=A0Sergei.


--- On Wed, 9/15/10, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:

From: Dov Grobgeld <dov.grobge= ld@gmail.com>
Subject: Re: Spinning the main loop
To: "Sergei Steshenko" <sergstesh@yahoo.com>
Cc: gtk-perl-list@gnome.org,= "Emmanuele Bassi" <ebassi= @gmail.com>
Date: Wednesday, September 15, 2010, 4:50 AM

For an example of how to use an additional thread and have it communicate w= ith the mainloop thread see my example at:

http://www.mail-archive.com/gtk-app-devel-list@gn= ome.org/msg14213.html


This is the correct way of doing anything time consuming without interrupti= ng the gui flow. There is no contradition to the setting of the busy state = to disable widgets or changing cursors. But the you don't interrupt the= GUI by delegating your work into a different threads.


Regards,
Dov


On Wed, Sep 15, 2010 at 13:30, Sergei Steshenko <sergstesh@yahoo.com> wrote:





--- On Wed, 9/15/10, Emmanuele Bassi <ebassi@gmail.com> wrote:



> From: Emmanuele Bassi <ebassi@g= mail.com>

> Subject: Re: Displaying a popup before the main window

> To: gtk-perl-list@gnome.org=

> Date: Wednesday, September 15, 2010, 4:17 AM

> On Wed, 2010-09-15 at 11:45 +0100,

[snip]



> the rationale is: by spinning the main loop you're masking

> issues in

> your application. don't do that. I thought it was clear by

> the amount of

> scorn I used.

>

> ciao,

> =A0Emmanuele.





In my reality I have a set of calculations which might take up to a minute,=

and tens of seconds typically. The calculations take as input the GUI

state and are triggered by it.



So, I intentionally spin the main loop. This is because there is an event
queue, and if I let the GUI to be responsive, it may accumulate the events<= br>
while the heavy calculations are in progress. When that happens, after the<= br>
completions of one round of the heavy calculations another one immediately<= br>
starts, so, it may take up to several minutes for the whole thing to

settle down. I think once it took half an hour or so.



Actually, not only I spin the main loop, I also hide the sensitive GUI

elements which may cause new events, i.e. there is, for example, no

physical possibility to change state of normally existing slider (called
"Adjustment") because the sliders are temporarily hidden.



One may find it ugly, but to mess up with the event queue might be even

uglier (for example, purging it until the last state change).



Regards,

=A0=A0Sergei.







_______________________________________________

gtk-perl-list mailing list

gtk-perl-list@gnome.org

http://mail.gnome.org/mailman/listinfo/gtk-perl-list








--00c09f905f33b5997c04904cee50-- From sergstesh@yahoo.com Wed Sep 15 16:19:54 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DDA657500C9 for ; Wed, 15 Sep 2010 16:19:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eaRTglIuZzfl for ; Wed, 15 Sep 2010 16:19:49 +0000 (UTC) Received: from web112107.mail.gq1.yahoo.com (web112107.mail.gq1.yahoo.com [67.195.23.94]) by menubar.gnome.org (Postfix) with SMTP id 3A6C275008F for ; Wed, 15 Sep 2010 16:19:40 +0000 (UTC) Received: (qmail 68591 invoked by uid 60001); 15 Sep 2010 16:19:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1284567579; bh=vXvm/ZQ9JMQ/RU3H3xId8dcAJbtJmlj1O2yX2dYK1rY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VX6gUqTzebSOh5kmAZccsxePx/O9sCpyWZxN127kia47w8pgvjPYzn2AwzUqp7UEOXB2kVQ9Y4GQB5ZbkB+Q1jPfzJ+MSw0yqo4JVSOQPPMVlT/XMX+Bbh4ty6e3MJAyECNeUycX+4nc0wLlG9IDI2Sc38lKpuw2N45LvtRlI3k= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5y84xT3+oKO5pHIk1jd2BtKLomoku9Ysw8PM061MXLQfx8wBau1rZU1P48nKMK+jo/pnl3GP5z0KKjxNbmrLjxpG80bW0CgbZ0rUmcU1Fh9rsJWLtXk2w6MdOYrLKhZBxmpDXp9on5JOz0s0cn+6bLUzIo1fZ/L1SVmA5FdEnt4=; Message-ID: <285429.68356.qm@web112107.mail.gq1.yahoo.com> X-YMail-OSG: s6YhVQgVM1nuJ3e1gvFFIlgQuS31P9ZeE5Rdim6Y159GMsR XRu5zDEgWqgXJESMYUYp1SinJm2_Gq26VxBUix0PmX4sg_ZfvPMaDyXVg6yI sS8TzzatyVvjoG7WZCSnYPGMaO8pKx4bFU3lI88NchWxObbSoaxbLL8qTQvi X80_k4ZhKRyOTtxr7vXzX.Y36G.Oqjoab8zS33mYeFEt2rEAMlkZ65LWp2Ae FLX1Mt6qgmy6NVP1Ld5qSPrSLhaWeKbEOqZdevt7WxTa.Cb5n_EmcYsvQ_ps tT__vu52nLFDhDrpCiQQ2ZAv8mALWfdRTZJ8cmvuUDwjSkjhFbXMh.39utTu FIqNGKCGnEyP9jG0ohevpKwPcTNg- Received: from [87.69.49.127] by web112107.mail.gq1.yahoo.com via HTTP; Wed, 15 Sep 2010 09:19:39 PDT X-Mailer: YahooMailClassic/11.4.7 YahooMailWebService/0.8.105.279950 Date: Wed, 15 Sep 2010 09:19:39 -0700 (PDT) From: Sergei Steshenko Subject: Re: Spinning the main loop To: Dov Grobgeld MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:19:54 -0000 As I wrote in my original Email, the calculations are based on GUI state,= =0Ai.e. the GUI is the supplier of inputs to calculations.=0A=0ASo,CLI sugg= estion is irrelevant in this case.=0A=0AThe only solution with unfrozen GUI= acceptable to me is:=0A=0Aupon the calculations completion the whole event= queue is purged and if=0Athe GUI state is different from the one which tri= ggered calculations, they=0Ashould be performed again _just_ _once_ - that'= s why I need to purge the=0Aevent queue.=0A=0ASo, I chose a simpler solutio= n - I don't let the GUI state change during=0Athe calculations.=0A=0ARegard= s,=0A Sergei.=0A=0A=0A--- On Wed, 9/15/10, Dov Grobgeld wrote:=0A=0AFrom: Dov Grobgeld =0ASubject: R= e: Spinning the main loop=0ATo: "Sergei Steshenko" =0A= Cc: gtk-perl-list@gnome.org, "Emmanuele Bassi" =0ADate: W= ednesday, September 15, 2010, 7:13 AM=0A=0AHere are a couple of reasons why= you don't want to freeze the GUI:=0ATo abort the calculation=0ATo report p= rogressTo show partial results=0ATo allow interaction with the previous res= ults=0ATo view help or change preferencesTo give a professional look and re= sponse to the application.=0AIf you don't need interaction, then you might = as well run the calculations in cli and just have the GUI as a viewer of yo= ur finished results.=0A=0A=0ADov=0A=0AOn Wed, Sep 15, 2010 at 14:02, Sergei= Steshenko wrote:=0A=0AWhat for do I need to have a s= ensitive GUI if I want to discard produced=0A=0Aby it events during my heav= y calculations in the first place ?=0A=0A=0A=0AThanks,=0A=0A =A0Sergei.=0A= =0A=0A=0A=0A=0A--- On Wed, 9/15/10, Dov Grobgeld w= rote:=0A=0A=0A=0AFrom: Dov Grobgeld =0A=0ASubject: = Re: Spinning the main loop=0A=0ATo: "Sergei Steshenko" =0A=0ACc: gtk-perl-list@gnome.org, "Emmanuele Bassi" =0A= =0ADate: Wednesday, September 15, 2010, 4:50 AM=0A=0A=0A=0AFor an example o= f how to use an additional thread and have it communicate with the mainloop= thread see my example at:=0A=0A=0A=0Ahttp://www.mail-archive.com/gtk-app-d= evel-list@gnome.org/msg14213.html=0A=0A=0A=0A=0A=0AThis is the correct way = of doing anything time consuming without interrupting the gui flow. There i= s no contradition to the setting of the busy state to disable widgets or ch= anging cursors. But the you don't interrupt the GUI by delegating your work= into a different threads.=0A=0A=0A=0A=0A=0A=0ARegards,=0A=0ADov=0A=0A=0A= =0A=0A=0AOn Wed, Sep 15, 2010 at 13:30, Sergei Steshenko wrote:=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A--- On Wed, 9/15/10, Emmanuel= e Bassi wrote:=0A=0A=0A=0A=0A=0A=0A=0A> From: Emmanuele = Bassi =0A=0A=0A=0A> Subject: Re: Displaying a popup befor= e the main window=0A=0A=0A=0A> To: gtk-perl-list@gnome.org=0A=0A=0A=0A> Dat= e: Wednesday, September 15, 2010, 4:17 AM=0A=0A=0A=0A> On Wed, 2010-09-15 a= t 11:45 +0100,=0A=0A=0A=0A[snip]=0A=0A=0A=0A=0A=0A=0A=0A> the rationale is:= by spinning the main loop you're masking=0A=0A=0A=0A> issues in=0A=0A=0A= =0A> your application. don't do that. I thought it was clear by=0A=0A=0A=0A= > the amount of=0A=0A=0A=0A> scorn I used.=0A=0A=0A=0A>=0A=0A=0A=0A> ciao,= =0A=0A=0A=0A> =A0Emmanuele.=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0AIn my realit= y I have a set of calculations which might take up to a minute,=0A=0A=0A=0A= and tens of seconds typically. The calculations take as input the GUI=0A=0A= =0A=0Astate and are triggered by it.=0A=0A=0A=0A=0A=0A=0A=0ASo, I intention= ally spin the main loop. This is because there is an event=0A=0A=0A=0Aqueue= , and if I let the GUI to be responsive, it may accumulate the events=0A=0A= =0A=0Awhile the heavy calculations are in progress. When that happens, afte= r the=0A=0A=0A=0Acompletions of one round of the heavy calculations another= one immediately=0A=0A=0A=0Astarts, so, it may take up to several minutes f= or the whole thing to=0A=0A=0A=0Asettle down. I think once it took half an = hour or so.=0A=0A=0A=0A=0A=0A=0A=0AActually, not only I spin the main loop,= I also hide the sensitive GUI=0A=0A=0A=0Aelements which may cause new even= ts, i.e. there is, for example, no=0A=0A=0A=0Aphysical possibility to chang= e state of normally existing slider (called=0A=0A=0A=0A"Adjustment") becaus= e the sliders are temporarily hidden.=0A=0A=0A=0A=0A=0A=0A=0AOne may find i= t ugly, but to mess up with the event queue might be even=0A=0A=0A=0Auglier= (for example, purging it until the last state change).=0A=0A=0A=0A=0A=0A= =0A=0ARegards,=0A=0A=0A=0A=A0=A0Sergei.=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A_______________________________________________=0A=0A=0A=0Agtk-= perl-list mailing list=0A=0A=0A=0Agtk-perl-list@gnome.org=0A=0A=0A=0Ahttp:/= /mail.gnome.org/mailman/listinfo/gtk-perl-list=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A From dov.grobgeld@gmail.com Wed Sep 15 16:36:28 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 18D4575016E for ; Wed, 15 Sep 2010 16:36:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.922 X-Spam-Level: X-Spam-Status: No, score=-1.922 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XL7S+TSpLQwE for ; Wed, 15 Sep 2010 16:36:22 +0000 (UTC) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by menubar.gnome.org (Postfix) with ESMTP id 7BE3B7500DD for ; Wed, 15 Sep 2010 16:36:14 +0000 (UTC) Received: by qwg5 with SMTP id 5so386271qwg.27 for ; Wed, 15 Sep 2010 09:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=QrdZlqhlWJ52Sb6oMw4Aaaj4sZJW+jgdXSqDtnHurpo=; b=cN1PNIol14a1hbJcqHTiIuTiBoglzgI7QyMeEX+QxBxXr0auXxeqmpImbi6I5WkWN3 ns4SfF1Kf854+Mxy7WPW6gfrIRnlDIf8QLfFmSyGse2NeXaUAbTv9aJQ2CQYzwgDHIZ6 KYmTmsoIZgJ+H5QeHnMmMnmlEo4eGbtrDys6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mF530gC/ZWHANQudeuOFK5k9jPf8rxgE2iJNt2Li2BRX+Xfepv1uma2ZEruhZ9vetT ztQztGJTotMTnz5MpQCofnp8WctuPcso4Uuk7V8ZyrVWYJrcbxcNLHoRc3jHqtOjBqUi YDHsRMagpE+lbCE3o1No2DsLlkbjNNiqFR3Ws= MIME-Version: 1.0 Received: by 10.224.73.134 with SMTP id q6mr1312314qaj.40.1284568572735; Wed, 15 Sep 2010 09:36:12 -0700 (PDT) Received: by 10.229.235.15 with HTTP; Wed, 15 Sep 2010 09:36:12 -0700 (PDT) In-Reply-To: <285429.68356.qm@web112107.mail.gq1.yahoo.com> References: <285429.68356.qm@web112107.mail.gq1.yahoo.com> Date: Wed, 15 Sep 2010 18:36:12 +0200 Message-ID: Subject: Re: Spinning the main loop From: Dov Grobgeld To: Sergei Steshenko Content-Type: multipart/alternative; boundary=0015175cbaa877b18d04904eeda0 Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 16:36:28 -0000 --0015175cbaa877b18d04904eeda0 Content-Type: text/plain; charset=ISO-8859-1 GUI state has nothing to do with it. As far as I am concerned an application does not respond or repaint its contents on exposure events, then that's a bug that should be fixed. And that's what happen when you hand over the precious cpu cycles of the gtk main thread to your calculations. And after you have done it once, it is just as simple using another thread for your calculations. The event queue shouldn't be purged. It should be responded to as soon as possible by someone dedicated to the job. Dov On Wed, Sep 15, 2010 at 18:19, Sergei Steshenko wrote: > As I wrote in my original Email, the calculations are based on GUI state, > i.e. the GUI is the supplier of inputs to calculations. > > So,CLI suggestion is irrelevant in this case. > > The only solution with unfrozen GUI acceptable to me is: > > upon the calculations completion the whole event queue is purged and if > the GUI state is different from the one which triggered calculations, they > should be performed again _just_ _once_ - that's why I need to purge the > event queue. > > So, I chose a simpler solution - I don't let the GUI state change during > the calculations. > > Regards, > Sergei. > > > --- On Wed, 9/15/10, Dov Grobgeld wrote: > > From: Dov Grobgeld > Subject: Re: Spinning the main loop > To: "Sergei Steshenko" > Cc: gtk-perl-list@gnome.org, "Emmanuele Bassi" > Date: Wednesday, September 15, 2010, 7:13 AM > > Here are a couple of reasons why you don't want to freeze the GUI: > To abort the calculation > To report progressTo show partial results > To allow interaction with the previous results > To view help or change preferencesTo give a professional look and response > to the application. > If you don't need interaction, then you might as well run the calculations > in cli and just have the GUI as a viewer of your finished results. > > > Dov > > On Wed, Sep 15, 2010 at 14:02, Sergei Steshenko > wrote: > > What for do I need to have a sensitive GUI if I want to discard produced > > by it events during my heavy calculations in the first place ? > > > > Thanks, > > Sergei. > > > > > > --- On Wed, 9/15/10, Dov Grobgeld wrote: > > > > From: Dov Grobgeld > > Subject: Re: Spinning the main loop > > To: "Sergei Steshenko" > > Cc: gtk-perl-list@gnome.org, "Emmanuele Bassi" > > Date: Wednesday, September 15, 2010, 4:50 AM > > > > For an example of how to use an additional thread and have it communicate > with the mainloop thread see my example at: > > > > http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg14213.html > > > > > > This is the correct way of doing anything time consuming without > interrupting the gui flow. There is no contradition to the setting of the > busy state to disable widgets or changing cursors. But the you don't > interrupt the GUI by delegating your work into a different threads. > > > > > > > Regards, > > Dov > > > > > > On Wed, Sep 15, 2010 at 13:30, Sergei Steshenko > wrote: > > > > > > > > > > > > --- On Wed, 9/15/10, Emmanuele Bassi wrote: > > > > > > > > > From: Emmanuele Bassi > > > > > Subject: Re: Displaying a popup before the main window > > > > > To: gtk-perl-list@gnome.org > > > > > Date: Wednesday, September 15, 2010, 4:17 AM > > > > > On Wed, 2010-09-15 at 11:45 +0100, > > > > [snip] > > > > > > > > > the rationale is: by spinning the main loop you're masking > > > > > issues in > > > > > your application. don't do that. I thought it was clear by > > > > > the amount of > > > > > scorn I used. > > > > > > > > > > ciao, > > > > > Emmanuele. > > > > > > > > > > > > In my reality I have a set of calculations which might take up to a minute, > > > > and tens of seconds typically. The calculations take as input the GUI > > > > state and are triggered by it. > > > > > > > > So, I intentionally spin the main loop. This is because there is an event > > > > queue, and if I let the GUI to be responsive, it may accumulate the events > > > > while the heavy calculations are in progress. When that happens, after the > > > > completions of one round of the heavy calculations another one immediately > > > > starts, so, it may take up to several minutes for the whole thing to > > > > settle down. I think once it took half an hour or so. > > > > > > > > Actually, not only I spin the main loop, I also hide the sensitive GUI > > > > elements which may cause new events, i.e. there is, for example, no > > > > physical possibility to change state of normally existing slider (called > > > > "Adjustment") because the sliders are temporarily hidden. > > > > > > > > One may find it ugly, but to mess up with the event queue might be even > > > > uglier (for example, purging it until the last state change). > > > > > > > > Regards, > > > > Sergei. > > > > > > > > > > > > > > > > _______________________________________________ > > > > gtk-perl-list mailing list > > > > gtk-perl-list@gnome.org > > > > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > > > > > > > > > > > > > > > > > > > > > > --0015175cbaa877b18d04904eeda0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
GUI state has nothing to do with it. As far as I am concer= ned an application does not respond or repaint its contents on exposure eve= nts, then that's a bug that should be fixed. And that's what happen= when you hand over the precious cpu cycles of the gtk main thread to your = calculations. And after you have done it once, it is just as simple using a= nother thread for your calculations. The event queue shouldn't be purge= d. It should be responded to as soon as possible by someone dedicated to th= e job.

Dov

On Wed, Sep 15, 2010 at 18:19, Se= rgei Steshenko <sergstesh@yahoo.com> wrote:
As I wrote in my original Email, the calculations are based on GUI state, i.e. the GUI is the supplier of inputs to calculations.

So,CLI suggestion is irrelevant in this case.

The only solution with unfrozen GUI acceptable to me is:

upon the calculations completion the whole event queue is purged and if
the GUI state is different from the one which triggered calculations, they<= br> should be performed again _just_ _once_ - that's why I need to purge th= e
event queue.

So, I chose a simpler solution - I don't let the GUI state change durin= g
the calculations.

Regards,
=A0Sergei.


--- On Wed, 9/15/10, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:

From: Dov Grobgeld <dov.grobge= ld@gmail.com>
Subject: Re: Spinning the main loop
To: "Sergei Steshenko" <sergstesh@yahoo.com>
Cc: gtk-perl-list@gnome.org,= "Emmanuele Bassi" <ebassi= @gmail.com>
Date: Wednesday, September 15, 2010, 7:13 AM

Here are a couple of reasons why you don't want to freeze the GUI:
To abort the calculation
To report progressTo show partial results
To allow interaction with the previous results
To view help or change preferencesTo give a professional look and res= ponse to the application.
If you don't need interaction, then y= ou might as well run the calculations in cli and just have the GUI as a vie= wer of your finished results.


Dov

On Wed, Sep 15, 2010 at 14:02, Sergei Steshenko <sergstesh@yahoo.com> wrote:

What for do I need to have a sensitive GUI if I want to discard produced
by it events during my heavy calculations in the first place ?



Thanks,

=A0=A0Sergei.





--- On Wed, 9/15/10, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:



From: Dov Grobgeld <dov.grobge= ld@gmail.com>

Subject: Re: Spinning the main loop

To: "Sergei Steshenko" <sergstesh@yahoo.com>

Cc: gtk-perl-list@gnome.org,= "Emmanuele Bassi" <ebassi= @gmail.com>

Date: Wednesday, September 15, 2010, 4:50 AM



For an example of how to use an additional thread and have it communicate w= ith the mainloop thread see my example at:



http://www.mail-archive.com/gtk-app-devel-list@gn= ome.org/msg14213.html





This is the correct way of doing anything time consuming without interrupti= ng the gui flow. There is no contradition to the setting of the busy state = to disable widgets or changing cursors. But the you don't interrupt the= GUI by delegating your work into a different threads.






Regards,

Dov





On Wed, Sep 15, 2010 at 13:30, Sergei Steshenko <sergstesh@yahoo.com> wrote:











--- On Wed, 9/15/10, Emmanuele Bassi <ebassi@gmail.com> wrote:







> From: Emmanuele Bassi <ebassi@g= mail.com>



> Subject: Re: Displaying a popup before the main window



> To: gtk-perl-list@gnome.org=



> Date: Wednesday, September 15, 2010, 4:17 AM



> On Wed, 2010-09-15 at 11:45 +0100,



[snip]







> the rationale is: by spinning the main loop you're masking



> issues in



> your application. don't do that. I thought it was clear by



> the amount of



> scorn I used.



>



> ciao,



> =A0Emmanuele.











In my reality I have a set of calculations which might take up to a minute,=



and tens of seconds typically. The calculations take as input the GUI



state and are triggered by it.







So, I intentionally spin the main loop. This is because there is an event


queue, and if I let the GUI to be responsive, it may accumulate the events<= br>


while the heavy calculations are in progress. When that happens, after the<= br>


completions of one round of the heavy calculations another one immediately<= br>


starts, so, it may take up to several minutes for the whole thing to



settle down. I think once it took half an hour or so.







Actually, not only I spin the main loop, I also hide the sensitive GUI



elements which may cause new events, i.e. there is, for example, no



physical possibility to change state of normally existing slider (called


"Adjustment") because the sliders are temporarily hidden.







One may find it ugly, but to mess up with the event queue might be even



uglier (for example, purging it until the last state change).







Regards,



=A0=A0Sergei.















_______________________________________________



gtk-perl-list mailing list



gtk-perl-list@gnome.org



http://mail.gnome.org/mailman/listinfo/gtk-perl-list






















--0015175cbaa877b18d04904eeda0-- From sergstesh@yahoo.com Wed Sep 15 17:01:11 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 204B9750361 for ; Wed, 15 Sep 2010 17:01:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uMjvBwSwRYiO for ; Wed, 15 Sep 2010 17:01:07 +0000 (UTC) Received: from web112113.mail.gq1.yahoo.com (web112113.mail.gq1.yahoo.com [67.195.22.91]) by menubar.gnome.org (Postfix) with SMTP id 6CC7A750D08 for ; Wed, 15 Sep 2010 17:00:58 +0000 (UTC) Received: (qmail 13390 invoked by uid 60001); 15 Sep 2010 17:00:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1284570057; bh=K8mDU+PTjqP9vhYRdCsZZewQleA+snJGZdyySJNXrcA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=AfLnwWatZzYIpoB3Jmz2waEBo1LqfXHA9jbCxhRCOfeGZ2cemhrB696yPg+k35ZY6d818+tJoGXpud6rwqXAnZ7cqT8KI5y+lYvfUciQ89wHpwGFv4RuFOCdLRCpMGEP9II2jJcrk5ORWKshS+OZyQ8S1xNGCpunvBljWkXYlks= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=t3OaQQ8lkAkmpaO/pdRrL+I5jBNi4L6t562ubBNS7gBjbOIj7IHebMUuG3rM5zdhg8wHJWmGevgYDG1ZI3UsIr3PeBjd5bJefJHhRO0m+UkZNO0taGNZRlvYUP0A8IRblKzsE6JK/gLD94qa72jinDLPyavkxuXI2ZRx/YLALJo=; Message-ID: <99333.13373.qm@web112113.mail.gq1.yahoo.com> X-YMail-OSG: UcRyRL8VM1lj0K5M8dfWK7k0C8xdvYYFj6bnTmVUIPBdTSR B3fc9Zr._JoJmIArSXIcdhEIzwR35pVnHqJxu14svulYMQwVtLyhm.V.qqfX Uhj78b37WQeouShPI2uWhagziDQgzpMoCqtQO3UduPyWCP9IkRoSD09taJ5U 1ibSebvsnYU9jce9TtojK46dmRzbee7xN7ndxrGi0rzS98YaNgPCYs3a30me D0_yAo3cmo3aeyyQvF9D73VfheAqssa267N3C5z_Ugt4mlfpM0Fm3jccj9TA J8X0Kqu4IG9rZWp9mNSKTfZN2cnL5mZk5NDNJPwYW_fFT.7J_fa4XD1PezX2 B1cv6JcfXssZa7E8zghf62JwWzc4- Received: from [87.69.49.127] by web112113.mail.gq1.yahoo.com via HTTP; Wed, 15 Sep 2010 10:00:56 PDT X-Mailer: YahooMailClassic/11.4.7 YahooMailWebService/0.8.105.279950 Date: Wed, 15 Sep 2010 10:00:56 -0700 (PDT) From: Sergei Steshenko Subject: Re: Spinning the main loop To: Dov Grobgeld MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 17:01:11 -0000 No, it doesn't happen that way. The application is single-threaded from=0Am= y point of view, and upon calculations completion I flush events by=0Aitera= ting in the main loop.=0A=0AAs I said, the application should _not_ respond= - because all the events=0Aduring the calculation should be discarded anyw= ay.=0A=0ATry to model my situation - create an application with one slider = and=0Amake its value_changed callback calling 'sleep(30)' with a diagnostic= =0Amessage.=0A=0AThen move the slider during those 30 seconds, say, 10 time= s and watch=0Ahow much time it will take from your application to settle do= wn.=0A=0A=0ARegards,=0A Sergei.=0A=0A=0A--- On Wed, 9/15/10, Dov Grobgeld = wrote:=0A=0AFrom: Dov Grobgeld =0ASubject: Re: Spinning the main loop=0ATo: "Sergei Steshenko" =0ACc: gtk-perl-list@gnome.org, "Emmanuele Bassi" =0ADate: Wednesday, September 15, 2010, 9:36 AM=0A=0AGUI state has = nothing to do with it. As far as I am concerned an application does not res= pond or repaint its contents on exposure events, then that's a bug that sho= uld be fixed. And that's what happen when you hand over the precious cpu cy= cles of the gtk main thread to your calculations. And after you have done i= t once, it is just as simple using another thread for your calculations. Th= e event queue shouldn't be purged. It should be responded to as soon as pos= sible by someone dedicated to the job.=0A=0A=0ADov=0A=0AOn Wed, Sep 15, 201= 0 at 18:19, Sergei Steshenko wrote:=0A=0AAs I wrote i= n my original Email, the calculations are based on GUI state,=0A=0Ai.e. the= GUI is the supplier of inputs to calculations.=0A=0A=0A=0ASo,CLI suggestio= n is irrelevant in this case.=0A=0A=0A=0AThe only solution with unfrozen GU= I acceptable to me is:=0A=0A=0A=0Aupon the calculations completion the whol= e event queue is purged and if=0A=0Athe GUI state is different from the one= which triggered calculations, they=0A=0Ashould be performed again _just_ _= once_ - that's why I need to purge the=0A=0Aevent queue.=0A=0A=0A=0ASo, I c= hose a simpler solution - I don't let the GUI state change during=0A=0Athe = calculations.=0A=0A=0A=0ARegards,=0A=0A =A0Sergei.=0A=0A=0A=0A=0A=0A--- On = Wed, 9/15/10, Dov Grobgeld wrote:=0A=0A=0A=0AFrom:= Dov Grobgeld =0A=0ASubject: Re: Spinning the main = loop=0A=0ATo: "Sergei Steshenko" =0A=0ACc: gtk-perl-li= st@gnome.org, "Emmanuele Bassi" =0A=0ADate: Wednesday, Se= ptember 15, 2010, 7:13 AM=0A=0A=0A=0AHere are a couple of reasons why you d= on't want to freeze the GUI:=0A=0ATo abort the calculation=0A=0ATo report p= rogressTo show partial results=0A=0ATo allow interaction with the previous = results=0A=0ATo view help or change preferencesTo give a professional look = and response to the application.=0A=0AIf you don't need interaction, then y= ou might as well run the calculations in cli and just have the GUI as a vie= wer of your finished results.=0A=0A=0A=0A=0A=0ADov=0A=0A=0A=0AOn Wed, Sep 1= 5, 2010 at 14:02, Sergei Steshenko wrote:=0A=0A=0A=0A= What for do I need to have a sensitive GUI if I want to discard produced=0A= =0A=0A=0Aby it events during my heavy calculations in the first place ?=0A= =0A=0A=0A=0A=0A=0A=0AThanks,=0A=0A=0A=0A=A0=A0Sergei.=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A--- On Wed, 9/15/10, Dov Grobgeld w= rote:=0A=0A=0A=0A=0A=0A=0A=0AFrom: Dov Grobgeld =0A= =0A=0A=0ASubject: Re: Spinning the main loop=0A=0A=0A=0ATo: "Sergei Steshen= ko" =0A=0A=0A=0ACc: gtk-perl-list@gnome.org, "Emmanuel= e Bassi" =0A=0A=0A=0ADate: Wednesday, September 15, 2010,= 4:50 AM=0A=0A=0A=0A=0A=0A=0A=0AFor an example of how to use an additional = thread and have it communicate with the mainloop thread see my example at:= =0A=0A=0A=0A=0A=0A=0A=0Ahttp://www.mail-archive.com/gtk-app-devel-list@gnom= e.org/msg14213.html=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0AThis is the correct = way of doing anything time consuming without interrupting the gui flow. The= re is no contradition to the setting of the busy state to disable widgets o= r changing cursors. But the you don't interrupt the GUI by delegating your = work into a different threads.=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= Regards,=0A=0A=0A=0ADov=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0AOn Wed, Sep 15, = 2010 at 13:30, Sergei Steshenko wrote:=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A--- On Wed, 9/15/1= 0, Emmanuele Bassi wrote:=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A> From: Emmanuele Bassi =0A=0A=0A=0A=0A= =0A=0A=0A> Subject: Re: Displaying a popup before the main window=0A=0A=0A= =0A=0A=0A=0A=0A> To: gtk-perl-list@gnome.org=0A=0A=0A=0A=0A=0A=0A=0A> Date:= Wednesday, September 15, 2010, 4:17 AM=0A=0A=0A=0A=0A=0A=0A=0A> On Wed, 20= 10-09-15 at 11:45 +0100,=0A=0A=0A=0A=0A=0A=0A=0A[snip]=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A> the rationale is: by spinning the main loop yo= u're masking=0A=0A=0A=0A=0A=0A=0A=0A> issues in=0A=0A=0A=0A=0A=0A=0A=0A> yo= ur application. don't do that. I thought it was clear by=0A=0A=0A=0A=0A=0A= =0A=0A> the amount of=0A=0A=0A=0A=0A=0A=0A=0A> scorn I used.=0A=0A=0A=0A=0A= =0A=0A=0A>=0A=0A=0A=0A=0A=0A=0A=0A> ciao,=0A=0A=0A=0A=0A=0A=0A=0A> =A0Emman= uele.=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0AIn my reality I have a set of calculations which might take up to a minu= te,=0A=0A=0A=0A=0A=0A=0A=0Aand tens of seconds typically. The calculations = take as input the GUI=0A=0A=0A=0A=0A=0A=0A=0Astate and are triggered by it.= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0ASo, I intentionally spin th= e main loop. This is because there is an event=0A=0A=0A=0A=0A=0A=0A=0Aqueue= , and if I let the GUI to be responsive, it may accumulate the events=0A=0A= =0A=0A=0A=0A=0A=0Awhile the heavy calculations are in progress. When that h= appens, after the=0A=0A=0A=0A=0A=0A=0A=0Acompletions of one round of the he= avy calculations another one immediately=0A=0A=0A=0A=0A=0A=0A=0Astarts, so,= it may take up to several minutes for the whole thing to=0A=0A=0A=0A=0A=0A= =0A=0Asettle down. I think once it took half an hour or so.=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0AActually, not only I spin the main loop, I= also hide the sensitive GUI=0A=0A=0A=0A=0A=0A=0A=0Aelements which may caus= e new events, i.e. there is, for example, no=0A=0A=0A=0A=0A=0A=0A=0Aphysica= l possibility to change state of normally existing slider (called=0A=0A=0A= =0A=0A=0A=0A=0A"Adjustment") because the sliders are temporarily hidden.=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0AOne may find it ugly, but to m= ess up with the event queue might be even=0A=0A=0A=0A=0A=0A=0A=0Auglier (fo= r example, purging it until the last state change).=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0ARegards,=0A=0A=0A=0A=0A=0A=0A=0A=A0=A0Sergei.=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A_______________________________________________=0A=0A=0A=0A= =0A=0A=0A=0Agtk-perl-list mailing list=0A=0A=0A=0A=0A=0A=0A=0Agtk-perl-list= @gnome.org=0A=0A=0A=0A=0A=0A=0A=0Ahttp://mail.gnome.org/mailman/listinfo/gt= k-perl-list=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A= =0A=0A=0A From sergstesh@yahoo.com Wed Sep 15 17:08:29 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 66207750062 for ; Wed, 15 Sep 2010 17:08:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xLtJP18MllCL for ; Wed, 15 Sep 2010 17:08:26 +0000 (UTC) Received: from web112117.mail.gq1.yahoo.com (web112117.mail.gq1.yahoo.com [67.195.22.95]) by menubar.gnome.org (Postfix) with SMTP id A73DA7500A6 for ; Wed, 15 Sep 2010 17:08:18 +0000 (UTC) Received: (qmail 10241 invoked by uid 60001); 15 Sep 2010 17:08:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1284570496; bh=uc8QEr3sr2+33fop4Vy6EnUaR9vrVmfid/OeceLv0xk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=3tyD6F/Cy5ZFJBOtml3ZGr7r6v9fZrNcskO3WlL1IiMAD3PoaB9IyairmYIKU1mc4aLTv/zt2I+mnhjlSloazryKmFJrhPOZD3ViYAhRLwkui8mACEELAh2zVr9T3Oken2BzOK7Kp1orcBVvFewnGmIguv4uHj0oyWT3lrCaqy0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=bnW6Xdl+FRXFIR5T2NpVltOxvup4/jR7HTSWtXTsix2FKaquHIo0XKn5whqLCENboV9MV9LopDIL9wYJGnx7NvSboE1zs/XqxSMWF/m/KhhoAVeK/L28AM6eJfYbDCS6ZcG0TS5p9GF0Y+4P7zGKyvKfk8Qvo+JtPgdNUzT/as8=; Message-ID: <860504.10238.qm@web112117.mail.gq1.yahoo.com> X-YMail-OSG: FMnLBj8VM1mZwEFjmUA4kDxi1ZKYcc0JhB8qkVFpCGvLz9U RHqOtVCXXXGuJ_v0ZrDwVQ35lZrHTuVBpuc9495fLnGs9uI80R7vn8TdNYPe N4qDGwreIHqF89oQIC82V7n8tH_2V9O4DQ62.NoepvpxLvzBCe8TpDYeHaeu O_DILNn1PDJ3gBlW2AWXm1rLOKwyoZFyADIe.fyE.nioaaMw2d7ZwaYNzKQB ciCc6dRx3bt1EErT1KSnfT.ar3U0oMWAWL7Hlv5T_0IDI88V7MqGGi3FB_Hx z.Sosxzj2ehfR2s3L82MpqKdY7xwdumW6lquXdGM6t9h8gNt49mQ15fFLIo2 Kiaj.ZbDKwiGnANUSkDJ37zMpNuA- Received: from [87.69.49.127] by web112117.mail.gq1.yahoo.com via HTTP; Wed, 15 Sep 2010 10:08:16 PDT X-Mailer: YahooMailClassic/11.4.7 YahooMailWebService/0.8.105.279950 Date: Wed, 15 Sep 2010 10:08:16 -0700 (PDT) From: Sergei Steshenko Subject: Re: Spinning the main loop To: Dov Grobgeld MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 17:08:29 -0000 Before writing my app I read all those GUI dogmas. And they are wrong for me. There are two scenarios with my app: 1) just one slider is moved and the calculations should be performed; 2) a number of sliders should be moved first an only then the calculations should be performed. Because of the two scenarios I have a toggle button which controls whether the calculations start immediately upon slider movement. In any case, during the calculations the GUI is disabled. Regards, Sergei. --- On Wed, 9/15/10, Dov Grobgeld wrote: From: Dov Grobgeld Subject: Re: Spinning the main loop To: "Sergei Steshenko" Cc: gtk-perl-list@gnome.org, "Emmanuele Bassi" Date: Wednesday, September 15, 2010, 9:36 AM [snip] The event queue shouldn't be purged. It should be responded to as soon as possible by someone dedicated to the job. [snip] From kswanson@watson.wustl.edu Wed Sep 15 21:06:06 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B0472750B83 for ; Wed, 15 Sep 2010 21:06:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.889 X-Spam-Level: X-Spam-Status: No, score=-0.889 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, MISSING_HEADERS=1.021, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BpAHdi3ifiun for ; Wed, 15 Sep 2010 21:06:01 +0000 (UTC) X-Greylist: delayed 1242 seconds by postgrey-1.32 at menubar.gnome.org; Wed, 15 Sep 2010 21:05:51 UTC Received: from gscsmtp.wustl.edu (gscsmtp.wustl.edu [128.252.233.26]) by menubar.gnome.org (Postfix) with SMTP id A96FB750072 for ; Wed, 15 Sep 2010 21:05:43 +0000 (UTC) Received: from linus33.gsc.wustl.edu (linus33.gsc.wustl.edu [10.0.3.93]) by gscsmtp.wustl.edu (Postfix) with ESMTP id 0FE875DC1C4; Wed, 15 Sep 2010 15:45:00 -0500 (CDT) Message-ID: <4C91304B.4000104@watson.wustl.edu> Date: Wed, 15 Sep 2010 15:44:59 -0500 From: Kenneth Swanson User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 CC: gtk-perl-list@gnome.org Subject: Re: Spinning the main loop References: <860504.10238.qm@web112117.mail.gq1.yahoo.com> In-Reply-To: <860504.10238.qm@web112117.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 21:06:07 -0000 On 09/15/2010 12:08 PM, Sergei Steshenko wrote: > In any case, during the calculations the GUI is disabled. I think the point is that there is a difference between "the GUI is disabled" and "the GUI is frozen and cannot even process its own events". One of those should be avoided. -Ken From gg@zip.com.au Wed Sep 15 23:01:06 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 67FE775012D for ; Wed, 15 Sep 2010 23:01:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wwjCSAIrJDJf for ; Wed, 15 Sep 2010 23:01:03 +0000 (UTC) Received: from mailout1.pacific.net.au (mailout1-6.pacific.net.au [61.8.2.213]) by menubar.gnome.org (Postfix) with ESMTP id 6E83D7501B6 for ; Wed, 15 Sep 2010 23:00:54 +0000 (UTC) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 0110A5D9D4F for ; Thu, 16 Sep 2010 09:00:52 +1000 (EST) Received: from blah.blah (ppp212E.dyn.pacific.net.au [61.8.33.46]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 6FBE02740A for ; Thu, 16 Sep 2010 09:00:51 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1Ow0y3-0007af-Cd for gtk-perl-list@gnome.org; Thu, 16 Sep 2010 09:00:43 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: Displaying a popup before the main window Organization: Bah Humbug References: <4C8FB7D6.1000207@cena.fr> <4C909218.2090104@mrc-lmb.cam.ac.uk> Mail-Copies-To: never Date: Thu, 16 Sep 2010 09:00:43 +1000 In-Reply-To: <4C909218.2090104@mrc-lmb.cam.ac.uk> (Dave Howorth's message of "Wed, 15 Sep 2010 10:30:00 +0100") Message-ID: <877him4nok.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 23:01:06 -0000 Dave Howorth writes: > > # Process the events so the show actually does something > Gtk2->main_iteration while Gtk2->events_pending; Beware of a race condition there. There won't be any drawing until events get back from the server, and that won't be immediate, especially for the usual case that a new window goes to the window manager and back. If the splash is covered over and re-exposed it'll need redrawing too, hence the hands-off background pixmap idea. Personally for startup I've tried to get the main window showing early, then fill in the guts of it, rather than a splash. But that only works on a pre-determined window size, like 3/4 of the screen. If the size will be based on the content widgets it's no good. From gg@zip.com.au Wed Sep 15 23:12:17 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C4E4475012D for ; Wed, 15 Sep 2010 23:12:17 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jxLYxYGxEh0q for ; Wed, 15 Sep 2010 23:12:15 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-8.pacific.net.au [61.8.2.231]) by menubar.gnome.org (Postfix) with ESMTP id 6829275028E for ; Wed, 15 Sep 2010 23:12:04 +0000 (UTC) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id A60F9299EC2 for ; Thu, 16 Sep 2010 09:12:02 +1000 (EST) Received: from blah.blah (ppp212E.dyn.pacific.net.au [61.8.33.46]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 1295D8C09 for ; Thu, 16 Sep 2010 09:12:02 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1Ow18s-0007tc-6C for gtk-perl-list@gnome.org; Thu, 16 Sep 2010 09:11:54 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: Spinning the main loop Organization: Bah Humbug References: <1284549471.2381.17.camel@gambit> <479682.81254.qm@web112117.mail.gq1.yahoo.com> Mail-Copies-To: never Date: Thu, 16 Sep 2010 09:11:54 +1000 In-Reply-To: <479682.81254.qm@web112117.mail.gq1.yahoo.com> (Sergei Steshenko's message of "Wed, 15 Sep 2010 04:30:22 -0700 (PDT)") Message-ID: <8739ta4n5x.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2010 23:12:18 -0000 Sergei Steshenko writes: > > Actually, not only I spin the main loop, I also hide the sensitive GUI > elements which may cause new events, i.e. there is, for example, no > physical possibility to change state of normally existing slider (called > "Adjustment") because the sliders are temporarily hidden. (Gratuituous self promotion alert :-) For interest, in my math-image program I restart a calculation on a change to the gui controls. But my calculation is only perhaps 10 seconds not a couple of minutes and is easy enough to chunk up under an idle handler in the usual way. For a bigger calculation I probably prefer a child process over a thread, as I've yet to see a threading system that doesn't put you in all sorts of danger from crashes and stuff and doesn't in fact hang in certain system calls anyway! From sergstesh@yahoo.com Thu Sep 16 07:35:14 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id EE50775023D for ; Thu, 16 Sep 2010 07:35:13 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jB4ESjQoSywL for ; Thu, 16 Sep 2010 07:35:12 +0000 (UTC) Received: from web112114.mail.gq1.yahoo.com (web112114.mail.gq1.yahoo.com [67.195.22.92]) by menubar.gnome.org (Postfix) with SMTP id 0E2E4750207 for ; Thu, 16 Sep 2010 07:35:03 +0000 (UTC) Received: (qmail 23153 invoked by uid 60001); 16 Sep 2010 07:35:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1284622500; bh=DZfGqmYjo8lTxqH1qw9Fetn2I6p3EeSIUIDhgKd6n1g=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=6cBiw20qj0Ptmm9i5NgSyGeq2cTT4eDTtHvlfsqCLpgqBeST8CmMtcX694hOyu+eLrOy1ttJdB/tR/+5lDoETVn78m/Fe52X5tnFZMtMNqzVxaAB7dHdYpB42wIuOZytVb0zd10QeViqMsTKPV3BLIedw3IZa6PDESl1LLc0Qnk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=4ii467XFynnk1zb7T3ZiujRWZ9XZs3DalOmkvLNk/CFiMJohIfGg1t27VHx8XBv+IoPBy+KBUnhCoc4fy8g7qugnmVm6Km1qP800B0eARdGfzVY8cMV5VHBWHUn9ihl3BqSO7V+ch0Qzr7LSRy7j1DHMIQI0kq2IPaKBRlWAJ9w=; Message-ID: <975865.21810.qm@web112114.mail.gq1.yahoo.com> X-YMail-OSG: Zxgu5soVM1nuEDPArSUPjTc5LwyeqedgEM5.GcD2cz0CRFC zbqKBZ2bYbuKHzW41G6KjWCN4up4E9tL7EPBbWLSLXGddUeSHhvlSo0x09Ci uLRCA24FNYXTjYCh_yulhEcNhjgj5SP35RmxcD5eQqrdol9CmjC.eJa6dyy6 v4brQRx5Mp3bBEkVlCrxE4el6_Ux4yLOG7oyj2F73GxNhnrws9uB6rkPl0Pr 6ASARxWmav55nt9dVu31ZVDmk6eTlhylz58InEb8k25fLJRhmwMkLYWNZ8AY ocv3xylwa7U5.3rTpiRJP7b_tbQqkyangbBsATSLfBeAIq7w70Gj08ajXeEo JUPL2nyovjrTkBzybSaM53BCL_mw- Received: from [87.69.49.127] by web112114.mail.gq1.yahoo.com via HTTP; Thu, 16 Sep 2010 00:35:00 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Thu, 16 Sep 2010 00:35:00 -0700 (PDT) From: Sergei Steshenko Subject: Re: Spinning the main loop To: gtk-perl-list@gnome.org, Kevin Ryde In-Reply-To: <8739ta4n5x.fsf@blah.blah> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 07:35:14 -0000 --- On Wed, 9/15/10, Kevin Ryde wrote: > From: Kevin Ryde > Subject: Re: Spinning the main loop > To: gtk-perl-list@gnome.org > Date: Wednesday, September 15, 2010, 4:11 PM > Sergei Steshenko > writes: > > > > Actually, not only I spin the main loop, I also hide > the sensitive GUI > > elements which may cause new events, i.e. there is, > for example, no > > physical possibility to change state of normally > existing slider (called > > "Adjustment") because the sliders are temporarily > hidden. > > (Gratuituous self promotion alert :-) [snip] I am not sure what you mean - I meant widget category, i.e. Gtk2::Adjustment -> (Gtk2::HScale, Gtk2::VScale) opposed to sliders used to implement scrolling. Regards, Sergei. From redtux1@gmail.com Thu Sep 16 23:54:36 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0985275018F for ; Thu, 16 Sep 2010 23:54:36 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.37 X-Spam-Level: X-Spam-Status: No, score=-0.37 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GyjWhVXk0PVq for ; Thu, 16 Sep 2010 23:54:33 +0000 (UTC) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by menubar.gnome.org (Postfix) with ESMTP id 7AB9F7500EB for ; Thu, 16 Sep 2010 23:54:24 +0000 (UTC) Received: by iwn34 with SMTP id 34so2179046iwn.27 for ; Thu, 16 Sep 2010 16:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=j4Dz2WEUXt8ACrUnRCKcFafGa27b+Z68UpAIoPh9dJE=; b=S+ilcVjYC4HgW5CgiQW2WXS4DSguzkk/LqFoqsrGDxawKsYf9snymTqFw6K5x6Ciza hBAPKSjfn2sj6/B1etdEsyNeoa7RIdbkNVvi6XyhKCWkvPTpAJfJEUGG/PgoOmhTQMSu b5gxMbbCz+8KxBgJgIQZbPyrROayDT5PXGrbc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BxBrrIvL5X5IitC7cNv60xR2jsP1FkEGhjOlsCfSpBf+QepPjNAKgM6qiZ+/lC+sS9 FnrCR1WvZKKKRC+jbLH6dFpBG/3t68VEBMmiK8M8SIJJHidBP2fRtvUIo5BgH+ZXtMPB v7OUzr3eXYPbFs2rESYpzfxq7P7wYpXVqYe1w= MIME-Version: 1.0 Received: by 10.231.149.207 with SMTP id u15mr4303285ibv.13.1284681263639; Thu, 16 Sep 2010 16:54:23 -0700 (PDT) Received: by 10.231.79.81 with HTTP; Thu, 16 Sep 2010 16:54:23 -0700 (PDT) Date: Fri, 17 Sep 2010 00:54:23 +0100 Message-ID: Subject: Adventures in gtk-perl - tables and windows From: Mike Martin To: gtk-perl-list Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 23:54:36 -0000 Hi After a frustrating couple of days googling I have come up with the follwing bits of code to solve a couple of things which seem to have a lot of questions on google but no answers. Comments apprieciated 1. getting widgets from a table matching co-ordinates (ie: row/column) foreach my $w ($table->get_children){ my $leftcol=$capture{$media}->{table}->child_get_property($w,'left-attach'); # can be used for x=left,x=right,y=top,y=bottom as well with obvious amendments to *attach argument ie:left/right/top/bottom# $capture{$media}->{table}->remove($w) if $leftcol=~/4|5/; # op where $leftcol equals criteria - 4 or 5 in this case # used to remove widgets here but any op should work I think# } 2. Getting list of windows from X with xid and name my $s=Gtk2::Gdk::Screen->get_default or die print $!; foreach my $w ($s->get_window_stack){ my $xid=$w->get_xid; my @name=split /=/,`xprop -id $xid WM_NAME`; print $name[1],"\n"; print $name,"\t",join "\t",$w->get_origin,"\t",join "\t",$w->get_size,"\n"; } I cant find any way to get the X11 name from GDK, and I dont seem to be alone, which is why I do a backticks to xprop From gg@zip.com.au Fri Sep 17 21:30:03 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 45E487503CB for ; Fri, 17 Sep 2010 21:30:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.823 X-Spam-Level: X-Spam-Status: No, score=-1.823 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vWF2yZchPJrh for ; Fri, 17 Sep 2010 21:30:00 +0000 (UTC) Received: from mailout1.pacific.net.au (mailout1-6.pacific.net.au [61.8.2.213]) by menubar.gnome.org (Postfix) with ESMTP id D5AE8750349 for ; Fri, 17 Sep 2010 21:29:51 +0000 (UTC) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id B1ECE5BEABB; Sat, 18 Sep 2010 07:29:48 +1000 (EST) Received: from blah.blah (ppp27AC.dyn.pacific.net.au [61.8.39.172]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id DCADF8C04; Sat, 18 Sep 2010 07:29:47 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1OwiVB-0000lz-4r; Sat, 18 Sep 2010 07:29:49 +1000 From: Kevin Ryde To: Mike Martin Subject: Re: Adventures in gtk-perl - tables and windows Organization: Bah Humbug References: Mail-Copies-To: never Date: Sat, 18 Sep 2010 07:29:49 +1000 In-Reply-To: (Mike Martin's message of "Fri, 17 Sep 2010 00:54:23 +0100") Message-ID: <87k4mk9hyq.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gtk-perl-list X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 21:30:03 -0000 Mike Martin writes: > > ->{table}->child_get_property($w,'left-attach'); Yes. > I cant find any way to get the X11 name from GDK, $win->property_get, but it's a little icky :). I forget what you're supposed to pass for the length parameter. I limit on how huge a chunk you want to grab in one go, or something. use strict; use warnings; use Gtk2 '-init'; my $s=Gtk2::Gdk::Screen->get_default or die print $!; my $display = $s->get_display; my $atom_string = Gtk2::Gdk::Atom->intern('STRING'); my $atom_wm_name = Gtk2::Gdk::Atom->intern('WM_NAME'); foreach my $w ($s->get_window_stack){ my $xid=$w->get_xid; my $win = Gtk2::Gdk::Window->foreign_new_for_display ($display, $xid); my ($type_atom, $format, $data) = $win->property_get ($atom_wm_name, $atom_string, 0, 9999, 0); print "$data\n"; } From redtux1@gmail.com Fri Sep 17 23:53:57 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E48E67505D5 for ; Fri, 17 Sep 2010 23:53:56 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.37 X-Spam-Level: X-Spam-Status: No, score=-0.37 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XxC2j33nMDdw for ; Fri, 17 Sep 2010 23:53:55 +0000 (UTC) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by menubar.gnome.org (Postfix) with ESMTP id 458C27501FA for ; Fri, 17 Sep 2010 23:53:46 +0000 (UTC) Received: by iwn34 with SMTP id 34so3610336iwn.27 for ; Fri, 17 Sep 2010 16:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=yoZg+S5pycq4z93LY3+P5Ok7wPTCJwSTvU4iGVadvnk=; b=BhqryaP16hnxGtXwJ/YcDtKhuCo/xL9BMwah04TDJKUFxcf+DJQqEUz6/GwHtAaTcR VJVNTdR9cqh5z9F9umGfB4fz0iYU3qBaYmIyzUXcdh3oAwd5wmq3Vgjnd0GcNkrR5lRd 6ayeIMI2SvUt3oyi7SP7V0fJ7Vpg8Mk1I8srk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=dWL3MYdgAu2P243WOT9wTlx3c79VXqd/CARVMlrvIiw04yz9l8CyMXvIiTlVq6gNHf mkRDpqOzLQxG0zNIWpSKrPlL0MRmRYzzK1nP5msfg0ZC+OHTEEcXw/VKqYn2qLpoDd8Q xWyfHw3c4eopm+pg1WT+LeNWpKNAui/M3csUU= MIME-Version: 1.0 Received: by 10.231.19.74 with SMTP id z10mr5896557iba.120.1284767625543; Fri, 17 Sep 2010 16:53:45 -0700 (PDT) Received: by 10.231.79.81 with HTTP; Fri, 17 Sep 2010 16:53:45 -0700 (PDT) In-Reply-To: <87k4mk9hyq.fsf@blah.blah> References: <87k4mk9hyq.fsf@blah.blah> Date: Sat, 18 Sep 2010 00:53:45 +0100 Message-ID: Subject: Re: Adventures in gtk-perl - tables and windows From: Mike Martin To: Kevin Ryde Content-Type: text/plain; charset=ISO-8859-1 Cc: gtk-perl-list X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 23:53:57 -0000 On 17/09/2010, Kevin Ryde wrote: > Mike Martin writes: >> >> ->{table}->child_get_property($w,'left-attach'); > > Yes. > >> I cant find any way to get the X11 name from GDK, > > $win->property_get, but it's a little icky :). I forget what you're > supposed to pass for the length parameter. I limit on how huge a chunk > you want to grab in one go, or something. > > > use strict; > use warnings; > use Gtk2 '-init'; > my $s=Gtk2::Gdk::Screen->get_default or die print $!; > > my $display = $s->get_display; > my $atom_string = Gtk2::Gdk::Atom->intern('STRING'); > my $atom_wm_name = Gtk2::Gdk::Atom->intern('WM_NAME'); > > foreach my $w ($s->get_window_stack){ > my $xid=$w->get_xid; > my $win = Gtk2::Gdk::Window->foreign_new_for_display ($display, $xid); > > my ($type_atom, $format, $data) > = $win->property_get ($atom_wm_name, $atom_string, 0, 9999, 0); > print "$data\n"; > } > Thanks for that - very useful On a related note have you came across issues with using raise/show etc on GDKwindows The only thing that seems to work is maximise/unmaximise Everything throws up a Resource temporarily unavailable from X with the task bar icon flashing. From mario.kemper@googlemail.com Sat Sep 18 09:29:48 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 735DB7504B7 for ; Sat, 18 Sep 2010 09:29:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.923 X-Spam-Level: X-Spam-Status: No, score=-1.923 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xcj1hBN5X5NL for ; Sat, 18 Sep 2010 09:29:45 +0000 (UTC) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by menubar.gnome.org (Postfix) with ESMTP id AA9F8750404 for ; Sat, 18 Sep 2010 09:29:37 +0000 (UTC) Received: by vws2 with SMTP id 2so865405vws.27 for ; Sat, 18 Sep 2010 02:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=V2Q5qDLscHAX7DtK7NpfEoGZnPr433Jr1CrIFIXGw0M=; b=Zl0+tyTe+b3Q2k1+vdtaJ8Xx2G9JY5MEq/woG7sZdZR68ZUQJ+M/kK+OhbNWl8XNQP VFsUxrimuhWS5ceAxLs4PlCTbs5pW9jDNAOBDe0kRgHB74MNj2rvBO2+AdRoO63R+A8O sKfzh8GaERHrtpJxPF4rmgmPe40lEz/0UQZlM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gap5GY9eEbK6IpuVp0aNY/NNB0CZNeOfxwo4QKLNNuxnSDmGwk3DL4m48Wl+i7ALw8 FPmenI2o5r9xN2Y6VKE9gCKAnz4K0GBJjP118dq6d19L13ZNHf/+OKAkqd/jJxIHwZ9Q VsUbYQ7Jj0JVMQlobYibqKeVKokszKsbJoNrc= MIME-Version: 1.0 Received: by 10.220.49.207 with SMTP id w15mr3127695vcf.75.1284802175336; Sat, 18 Sep 2010 02:29:35 -0700 (PDT) Received: by 10.220.76.2 with HTTP; Sat, 18 Sep 2010 02:29:35 -0700 (PDT) In-Reply-To: References: <87k4mk9hyq.fsf@blah.blah> Date: Sat, 18 Sep 2010 11:29:35 +0200 Message-ID: Subject: Re: Adventures in gtk-perl - tables and windows From: Mario Kemper To: Mike Martin Content-Type: text/plain; charset=ISO-8859-1 Cc: gtk-perl-list , Kevin Ryde X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 09:29:48 -0000 Did you have a look at the Gnome2::Wnck module? It covers most of the functionality you might need. Gnome2::Wnck::Screen provides $screen->get_window_manager_name: http://gtk2-perl.sourceforge.net/doc/pod/Gnome2/Wnck/Screen.html Gnome2::Wnck::Window provides $window->get_name: http://gtk2-perl.sourceforge.net/doc/pod/Gnome2/Wnck/Window.html There is a lot of other useful stuff to discover. Regards Mario Kemper From redtux1@gmail.com Sat Sep 18 14:05:03 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B288F7505C8 for ; Sat, 18 Sep 2010 14:05:03 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.36 X-Spam-Level: X-Spam-Status: No, score=-0.36 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7B4na+37DoOU for ; Sat, 18 Sep 2010 14:05:02 +0000 (UTC) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by menubar.gnome.org (Postfix) with ESMTP id DBC95750534 for ; Sat, 18 Sep 2010 14:04:53 +0000 (UTC) Received: by iwn34 with SMTP id 34so4252438iwn.27 for ; Sat, 18 Sep 2010 07:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=MOaOkdxYWMghq6RDeYFE8UdeQTeeQ/+geWmV56iOAFY=; b=vhdEPDD8hyCzykX5dbOHbMvlc0R1T6wdDcSc81dQRNdWyNnXm9F+e5Qa5Nl91reCN9 8CT5Usb5qU0UowHnLynsxJ8XMP4bAmARrlUu43tI5+epcPXUCZL0xp0GCIa1PuiqD6b+ KhFzhEqV2jP+XNLaTk1gAEkFZMwpvJd/4DBhY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=bzIuANBX5VO90HU+StZOCfVjKSRvV2SyboPQSw8ZNp/btNnNPIWU2+Sg1FMbYB07Z4 yfLoqjheG3essYqisAghwkSFuxE+yjd1pqO3SDPJSkpmAfQDC9BK/Ve8gQHaNHHStoGX Wa2DQTXiBCYwBsYBx63pmpBaYEAfyE+LOSjY0= MIME-Version: 1.0 Received: by 10.231.151.135 with SMTP id c7mr6909900ibw.184.1284818692415; Sat, 18 Sep 2010 07:04:52 -0700 (PDT) Received: by 10.231.79.81 with HTTP; Sat, 18 Sep 2010 07:04:52 -0700 (PDT) In-Reply-To: References: <87k4mk9hyq.fsf@blah.blah> Date: Sat, 18 Sep 2010 15:04:52 +0100 Message-ID: Subject: Re: Adventures in gtk-perl - tables and windows From: Mike Martin To: gtk-perl-list@gnome.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 14:05:04 -0000 On 18/09/2010, Mario Kemper wrote: > Did you have a look at the Gnome2::Wnck module? It covers most of the > functionality you might need. > > Gnome2::Wnck::Screen provides $screen->get_window_manager_name: > http://gtk2-perl.sourceforge.net/doc/pod/Gnome2/Wnck/Screen.html > > Gnome2::Wnck::Window provides $window->get_name: > http://gtk2-perl.sourceforge.net/doc/pod/Gnome2/Wnck/Window.html > > There is a lot of other useful stuff to discover. > > Regards > Mario Kemper > I try to avoid the gnome* modules as I try to keep the deps down to just Gtk thanks anyway From mario.kemper@googlemail.com Sat Sep 18 14:13:11 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B1CD57505C8 for ; Sat, 18 Sep 2010 14:13:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.923 X-Spam-Level: X-Spam-Status: No, score=-1.923 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FAG-VyL4CJqo for ; Sat, 18 Sep 2010 14:13:09 +0000 (UTC) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by menubar.gnome.org (Postfix) with ESMTP id DCEA8750534 for ; Sat, 18 Sep 2010 14:13:00 +0000 (UTC) Received: by ewy22 with SMTP id 22so1984472ewy.27 for ; Sat, 18 Sep 2010 07:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=BZfA4XT6nngcl7GFfKKszvt/ihmYMqPLzgR4a8EHVYk=; b=BqyDZLHU3oofcAxd/AZvsboOJLRZsfIlhFsF0vfMh7VDoRxX+lcs5fAWJWr6nLnz7Y WR/h3nImukZuOaTcaJm6+uMxgdHt65kcerZ1B9UQHQtm7aqGaakIr73syybtkav2AWK3 5RC0ckwOo2HLxvQQctNFt4uIU6lpUDo6JI9z4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=DC5n0VgeFf2Eq/k11Z79U6gbfR+y/Jrpw6O4mLuk3P9eytBiX8sMeAGffrHzE69DAp B9PbZKzTit3B9iXBb83BWNQWOYiykJqD8X+JI3+JRCC5lytNmhullZ7a5WgxpO05gew7 uqWw/sjDAubYUwB9siL1dVQA3vEHZQe7DLr1g= Received: by 10.213.19.80 with SMTP id z16mr935677eba.6.1284819178683; Sat, 18 Sep 2010 07:12:58 -0700 (PDT) Received: from [192.168.99.103] (xdsl-87-79-162-158.netcologne.de [87.79.162.158]) by mx.google.com with ESMTPS id v59sm7612952eeh.10.2010.09.18.07.12.57 (version=SSLv3 cipher=RC4-MD5); Sat, 18 Sep 2010 07:12:57 -0700 (PDT) Subject: Re: Adventures in gtk-perl - tables and windows From: Mario Kemper To: Mike Martin In-Reply-To: References: <87k4mk9hyq.fsf@blah.blah> Content-Type: text/plain; charset="UTF-8" Date: Sat, 18 Sep 2010 16:12:56 +0200 Message-ID: <1284819176.2631.2.camel@mario-xps> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 14:13:12 -0000 > I try to avoid the gnome* modules as I try to keep the deps down to > just Gtk Sure. That's your decision but this module does not depend on any gnome module or library, see: http://library.gnome.org/devel/libwnck/stable/intro.html It depends only on gtk+ and libstartupnotification. It is named gnome2::wnck because it is part of the gnome project. Regards Mario From kaffeetisch@gmx.de Sat Sep 18 16:16:50 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F1C817506FA for ; Sat, 18 Sep 2010 16:16:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lH7rSzbF1tBR for ; Sat, 18 Sep 2010 16:16:47 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id A27AE7506D8 for ; Sat, 18 Sep 2010 16:16:37 +0000 (UTC) Received: (qmail invoked by alias); 18 Sep 2010 16:16:35 -0000 Received: from d178231.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.178.231] by mail.gmx.net (mp007) with SMTP; 18 Sep 2010 18:16:35 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/0eDsgXmX05Gy3DX+3KqSB8iJn5tauXDEMGVqcTx E3UYEnf03GvW28 Message-ID: <4C94E5E2.8040709@gmx.de> Date: Sat, 18 Sep 2010 18:16:34 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: builder on scalar properties References: <87vd6bq2fp.fsf@blah.blah> In-Reply-To: <87vd6bq2fp.fsf@blah.blah> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 16:16:50 -0000 On 12.09.2010 01:35, Kevin Ryde wrote: > If an object property is a Glib::Scalar, ie. Glib::ParamSpec->scalar, > can it be set with the thingie in Gtk2::Builder ? The few > lines below get > > Gtk-WARNING **: Failed to set property Foo.myscalar to "hello": Could not parse '"hello"' as a GPerlSV at /tmp/scalar.pl line 21. > > and apparently don't set the property. This messages appears to originate from gtk_builder_value_from_string_type in gtk/gtkbuilder.c. This function seems to be responsible for converting the strings coming from XML to actual values, and it only knows about the common value types. I don't see any hooks to customize this process. Not even providing a SET_BUILDABLE_PROPERTY override would be sufficient. I think you'd need to have a custom tag for this, handled in a CUSTOM_TAG_START override. From kaffeetisch@gmx.de Sat Sep 18 16:34:45 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 488D27506EA for ; Sat, 18 Sep 2010 16:34:45 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.813 X-Spam-Level: X-Spam-Status: No, score=-1.813 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GT=0.077, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gMqi11phWbO7 for ; Sat, 18 Sep 2010 16:34:43 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by menubar.gnome.org (Postfix) with SMTP id 604F67506D8 for ; Sat, 18 Sep 2010 16:34:33 +0000 (UTC) Received: (qmail invoked by alias); 18 Sep 2010 16:34:31 -0000 Received: from d178231.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.178.231] by mail.gmx.net (mp062) with SMTP; 18 Sep 2010 18:34:31 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19xPUl4Io5x9fASL1Sy9tEFqe4mL62R894DzU7n07 P7MsC8Sl0onndh Message-ID: <4C94EA18.10009@gmx.de> Date: Sat, 18 Sep 2010 18:34:32 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: buildable vs plain objects References: <871v8zrhd2.fsf@blah.blah> In-Reply-To: <871v8zrhd2.fsf@blah.blah> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: muppet X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 16:34:45 -0000 On 12.09.2010 01:27, Kevin Ryde wrote: > The Gtk2::Buildable pod "PLAIN OBJECTS" reads like you can't build a > plain Glib::Object subclass at all unless you have the Gtk2::Buildable > interface on it. I suppose that's adapted from the gtk ref manual > GtkBuildable "Description", > > In order to allow construction from a GtkBuilder UI description, an > object class must implement the GtkBuildable interface. > > But is it true? The few lines below seem to work for me (gtk 2.20). > Gtk2::Builder seems fine on plain objects, at least as far as creating > and settings. I think you're right. GtkBuilder simply calls g_type_from_name to map a class name to a GType and then uses glib's built-in introspection mechanisms to construct the thing. Implementing GtkBuildable is only necessary if you want to customize the construction, I think. Are we missing something, muppet? From kaffeetisch@gmx.de Sat Sep 18 18:30:47 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 61B84750754 for ; Sat, 18 Sep 2010 18:30:47 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 693j6VarlVJx for ; Sat, 18 Sep 2010 18:30:44 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id 5CE6675050F for ; Sat, 18 Sep 2010 18:30:35 +0000 (UTC) Received: (qmail invoked by alias); 18 Sep 2010 18:30:33 -0000 Received: from d178231.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.178.231] by mail.gmx.net (mp011) with SMTP; 18 Sep 2010 20:30:33 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/nbFEofIDnUGmaj98q+ox735Oe1wSyapB+ZhX/TE vA4xhnrPkJePlL Message-ID: <4C95054B.3030708@gmx.de> Date: Sat, 18 Sep 2010 20:30:35 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: gudev perl bindings References: <4C7F5422.4090106@amazis.com> In-Reply-To: <4C7F5422.4090106@amazis.com> Content-Type: multipart/mixed; boundary="------------070101050903000303010106" X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 18:30:48 -0000 This is a multi-part message in MIME format. --------------070101050903000303010106 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 02.09.2010 09:37, Tomasz Kobiela wrote: > Hal is now deprecated and dropped by many distribution. > Udev is its replacement. > Are there any bindings for gudev for perl or any plans for it ? Not that I know of. But you can use introspection to create bindings on the fly: . See the attached example. You'll also need to apply the attached patch to udev (at least with recent versions of gobject-introspection). --------------070101050903000303010106 Content-Type: application/x-perl; name="gudev.pl" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gudev.pl" #!/usr/bin/env perl use 5.10.0; use strict; use warnings; use Glib::Object::Introspection; Glib::Object::Introspection->setup(basename => "GUdev", version => "1.0", package => "Glib::UDev"); # FIXME: Glib::UDev::Client->new ([ qw[block usb/usb_interface] ]); my $client = Glib::Object::new ('Glib::UDev::Client', subsystems => [ 'block', 'usb/usb_interface' ]); my $dev = $client->query_by_device_file ('/dev/loop0'); say '/dev/loop0:'; say ' subsystem: ', $dev->get_subsystem (); say ' devtype: ', $dev->get_devtype (); say ' name: ', $dev->get_name (); say ' number: ', $dev->get_number (); say ' sysfs_path: ', $dev->get_sysfs_path (); say ' driver: ', $dev->get_driver () // '(none)'; say ' action: ', $dev->get_action () // '(none)'; say ' seqnum: ', $dev->get_seqnum (); say ' device type: ', $dev->get_device_type (); say ' device number: ', $dev->get_device_number (); say ' device file: ', $dev->get_device_file (); say ' device file symlinks: ', join ', ', @{$dev->get_device_file_symlinks ()}; say ' sysfs attr: ', join ', ', @{$dev->get_sysfs_attr_as_strv ("stat")}; say ' properties:'; foreach my $key (@{$dev->get_property_keys ()}) { say " ", $key, "=", $dev->get_property ($key); } --------------070101050903000303010106 Content-Type: text/x-patch; name="gudev-annotations.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gudev-annotations.patch" diff --git a/extras/gudev/gudevclient.c b/extras/gudev/gudevclient.c index e829ca3..9ebd8f8 100644 --- a/extras/gudev/gudevclient.c +++ b/extras/gudev/gudevclient.c @@ -316,7 +316,7 @@ g_udev_client_init (GUdevClient *client) /** * g_udev_client_new: - * @subsystems: (allow-none): A %NULL terminated string array of subsystems to listen for uevents on, %NULL to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the #GUdevClient:subsystems property for details on this parameter. + * @subsystems: (array zero-terminated=1) (element-type utf8) (transfer none) (allow-none): A %NULL terminated string array of subsystems to listen for uevents on, %NULL to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the #GUdevClient:subsystems property for details on this parameter. * * Constructs a #GUdevClient object that can be used to query * information about devices. Connect to the #GUdevClient::uevent @@ -339,7 +339,7 @@ g_udev_client_new (const gchar * const *subsystems) * * Gets all devices belonging to @subsystem. * - * Returns: (element-type GUdevDevice): A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list. + * Returns: (element-type GUdevDevice) (transfer full): A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list. */ GList * g_udev_client_query_by_subsystem (GUdevClient *client, @@ -392,7 +392,7 @@ g_udev_client_query_by_subsystem (GUdevClient *client, * * Looks up a device for a type and device number. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_device_number (GUdevClient *client, @@ -424,7 +424,7 @@ g_udev_client_query_by_device_number (GUdevClient *client, * * Looks up a device for a device file. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_device_file (GUdevClient *client, @@ -460,7 +460,7 @@ g_udev_client_query_by_device_file (GUdevClient *client, * * Looks up a device for a sysfs path. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_sysfs_path (GUdevClient *client, @@ -492,7 +492,7 @@ g_udev_client_query_by_sysfs_path (GUdevClient *client, * * Looks up a device for a subsystem and name. * - * Returns: A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). + * Returns: (transfer full): A #GUdevDevice object or %NULL if the device was not found. Free with g_object_unref(). */ GUdevDevice * g_udev_client_query_by_subsystem_and_name (GUdevClient *client, --------------070101050903000303010106-- From kaffeetisch@gmx.de Sat Sep 18 21:53:33 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7DF567507D5 for ; Sat, 18 Sep 2010 21:53:33 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NNrQ5A4DQvpQ for ; Sat, 18 Sep 2010 21:53:31 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id 9948C7507BE for ; Sat, 18 Sep 2010 21:53:21 +0000 (UTC) Received: (qmail invoked by alias); 18 Sep 2010 21:53:19 -0000 Received: from d178231.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.178.231] by mail.gmx.net (mp037) with SMTP; 18 Sep 2010 23:53:19 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19dRI8LOoJdqMuqkyiEHBCgOU4za0SZRQpIMZzQIe exhAPE25/W1J02 Message-ID: <4C9534D2.1040609@gmx.de> Date: Sat, 18 Sep 2010 23:53:22 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: subclass versus new_with_foo References: <87y6bwdfgg.fsf@blah.blah> In-Reply-To: <87y6bwdfgg.fsf@blah.blah> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 21:53:33 -0000 On 24.08.2010 02:25, Kevin Ryde wrote: > Is it feasible to have some of those new_with_foo() methods follow the > class name? An xs equivalent of maybe > > > # sub new_with_buffer { > # my ($class, $textbuf) = @_; > # return Glib::Object::new ($class, buffer => $textbuf); > # } What if gtk_text_view_new_with_buffer some day changes such that it is not equivalent to this anymore? What we could do, I guess, is to adjust the xsub for gtk_text_view_new_with_buffer such that it re-bless()-es the created object into the package name given as the first argument. From kaffeetisch@gmx.de Sat Sep 18 22:47:59 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4337F75082B for ; Sat, 18 Sep 2010 22:47:59 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yAd0Te6rkKF5 for ; Sat, 18 Sep 2010 22:47:57 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id 6AD45750825 for ; Sat, 18 Sep 2010 22:47:48 +0000 (UTC) Received: (qmail invoked by alias); 18 Sep 2010 22:47:45 -0000 Received: from d178231.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.178.231] by mail.gmx.net (mp009) with SMTP; 19 Sep 2010 00:47:45 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19+HNlKZP9+7Fo0SNbBuiynbgGcN5fds/nDjx3Hhl 0tXyOB7oZ3czCM Message-ID: <4C954195.5030307@gmx.de> Date: Sun, 19 Sep 2010 00:47:49 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gtk2::PrintOperation References: <1281043194.26340.3.camel@mario-xps> <1281166257.2643.12.camel@gambit> In-Reply-To: <1281166257.2643.12.camel@gambit> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 22:47:59 -0000 On 07.08.2010 09:30, Emmanuele Bassi wrote: >> Thanks for the help. This line got me one step further: >> >> Gtk2::Gdk::Cairo::Context::set_source_pixbuf( $cr, $pixbuf, 0, 0 ); >> >> Why isn't set_source_pixbuf in Cairo::Context? > > well, Cairo doesn't know anything about GdkPixbufs, so perl-Gtk2 has to > "sub-class" the Cairo::Context by adding a Gtk2::Gdk::Cairo::Context > type to its @ISA. while perl-Gtk2 does it for the one returned by > Gtk2::Gdk::Cairo::create(), it doesn't do it for the one created by the > Gtk2::PrintContext API[0]. We could, however, adjust the xsub for gtk_print_context_get_cairo_context such that it re-bless()-es the cairo context into the Gtk2::Gdk::Cairo package. It looks like every method in Gtk2::Gdk::Cairo can be safely called on any kind of context (or, rather, any context with any kind of surface). Patches welcome. From kaffeetisch@gmx.de Sun Sep 19 01:13:00 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D77EA75081C for ; Sun, 19 Sep 2010 01:13:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.736 X-Spam-Level: X-Spam-Status: No, score=-1.736 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_BG=0.077, TW_GT=0.077, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PjNtzEkOX91n for ; Sun, 19 Sep 2010 01:12:58 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id A6DE17507FD for ; Sun, 19 Sep 2010 01:12:49 +0000 (UTC) Received: (qmail invoked by alias); 19 Sep 2010 01:12:46 -0000 Received: from d178231.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.178.231] by mail.gmx.net (mp059) with SMTP; 19 Sep 2010 03:12:46 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18VhktcRdMVHlA0ADrVAaShhA+qPws/Bk3QgtKaSN e8Qx6tZ9Fko2gD Message-ID: <4C956393.4070304@gmx.de> Date: Sun, 19 Sep 2010 03:12:51 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Bug#590453: libgtk2-perl: Gtk2::FileChooserDialog signal produces different response to ->run() References: <20100726121134.2540.98695.reportbug@eeepc> <4C4DFE8E.4000800@gmx.de> In-Reply-To: <4C4DFE8E.4000800@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: muppet X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 01:13:01 -0000 On 26.07.2010 23:30, Torsten Schoenfeld wrote: > On 26.07.2010 15:47, Jeffrey Ratcliffe wrote: >> After some rooting around, the problem comes from Gtk2::Dialog >> ancestor, as demonstrated by the attached script. > > I can reproduce the problem. After some head-scratching, I'm now pretty > sure that this due to a problem in Glib that was uncovered by the > introduction of Gtk2::InfoBar in Gtk2 1.230. > > Gtk2::InfoBar also has a "response" signal, and just like Gtk2::Dialog, > it installs a custom signal marshaller that converts the numeric > response IDs to strings. The problem is that Glib stores custom signal > marshallers in a hash table keyed by signal names. And since Gtk2 1.230, > Gtk2::Dialog and Gtk2::InfoBar both install a custom signal marshaller > for the "response" signal on their respective type. But since Glib just > stores (signal name => signal marshaller) pairs, the entry for > Gtk2::InfoBar replaces the entry for Gtk2::Dialog. Glib needs to be > fixed to store the associations in the form ((type, signal name) => > signal marshaller). I implemented this now: . The changes necessarily do quite a bit more work when connecting signals, so this might be a slow-down. But I don't see how to implement custom signal marshaller lookup properly in a different way. muppet, what do you think? From kaffeetisch@gmx.de Sun Sep 19 11:34:35 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D42E075067A for ; Sun, 19 Sep 2010 11:34:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.02 X-Spam-Level: X-Spam-Status: No, score=-1.02 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_MLH_Stock1=0.87, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sYdV67bZthYb for ; Sun, 19 Sep 2010 11:34:33 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id C76B1750576 for ; Sun, 19 Sep 2010 11:34:22 +0000 (UTC) Received: (qmail invoked by alias); 19 Sep 2010 11:34:20 -0000 Received: from d071095.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.71.95] by mail.gmx.net (mp037) with SMTP; 19 Sep 2010 13:34:20 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19ub5tPS5tuq1ZgKeeMDY6DscqaRGoE9PX5VAicsX RE83ErgcJgwkpS Message-ID: <4C95F53A.7040404@gmx.de> Date: Sun, 19 Sep 2010 13:34:18 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Small POD error in Gtk2::Stock References: <20100724125839.GA15282@elende> In-Reply-To: <20100724125839.GA15282@elende> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 11:34:36 -0000 On 24.07.2010 14:58, Salvatore Bonaccorso wrote: > For perl-Gtk2 in Manpage of Gtk2::Stock there is a small POD error, > > ------------------------------------------------------------------------ > POD ERRORS > Hey! The above document had some coding errors, which are > explained below: > > Around line 126: > =cut found outside a pod block. Skipping to next block. > ------------------------------------------------------------------------ Fixed in git. Thanks! From kaffeetisch@gmx.de Sun Sep 19 11:47:50 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3B0B7750611 for ; Sun, 19 Sep 2010 11:47:50 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZaH7kFvft1nx for ; Sun, 19 Sep 2010 11:47:48 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id E8EF47500CC for ; Sun, 19 Sep 2010 11:47:39 +0000 (UTC) Received: (qmail invoked by alias); 19 Sep 2010 11:47:37 -0000 Received: from d071095.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.71.95] by mail.gmx.net (mp021) with SMTP; 19 Sep 2010 13:47:37 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/jWsw1zBrjstcRB3MJFKEmneY3X85QDEqWrmsM2D 3CiF5Z/bTUUEgR Message-ID: <4C95F858.9010100@gmx.de> Date: Sun, 19 Sep 2010 13:47:36 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Scrolling on Larger Fonts References: <685199.1968.qm@web114019.mail.gq1.yahoo.com> In-Reply-To: <685199.1968.qm@web114019.mail.gq1.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 11:47:50 -0000 On 03.06.2010 23:49, Zettai Muri wrote: > In the attached program there are two textviews, one uses the default > fontsize and the other uses fontsize 12 - a little larger than the > default. After typing text into each of the text views (copying and > pasting this email is enough), so that the scroll bar appears, when I > scroll the larger font text view the text doesn't appear to redraw? > refresh? correctly. The tops of some lines are cut off as I scroll up > and down to view the top and bottom of the page. You call $fontdesc->set_size with a size of 12, but that's very small since this methods expects sizes scaled with PANGO_SCALE. So use this instead: use Gtk2::Pango; # for PANGO_SCALE $fontdesc->set_size($size * PANGO_SCALE); With this change, your program works fine for me (on Ubuntu). From kaffeetisch@gmx.de Sun Sep 19 13:16:21 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DE40E7506D8 for ; Sun, 19 Sep 2010 13:16:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.738 X-Spam-Level: X-Spam-Status: No, score=-1.738 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pqDvgk-1jm5U for ; Sun, 19 Sep 2010 13:16:20 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by menubar.gnome.org (Postfix) with SMTP id 77DFA7500CC for ; Sun, 19 Sep 2010 13:16:10 +0000 (UTC) Received: (qmail invoked by alias); 19 Sep 2010 13:16:08 -0000 Received: from d071095.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.71.95] by mail.gmx.net (mp034) with SMTP; 19 Sep 2010 15:16:08 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19x3xlH1wlxY5pLKzXUg5WiuA9kxj7PlHESSXaGBX +hK/gxBy5ovYHQ Message-ID: <4C960D15.1070601@gmx.de> Date: Sun, 19 Sep 2010 15:16:05 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gnome2::VFS->format_uri_for_display and UTF-8 References: <1274024531.2365.60.camel@mario-xps> In-Reply-To: <1274024531.2365.60.camel@mario-xps> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Sep 2010 13:16:22 -0000 On 16.05.2010 17:42, Mario Kemper wrote: > However, it doesn't seem to return a valid utf-8 string, e.g. german > umlauts are not correctly displayed. I've attached an example program > where this problem is illustrated. If a use utf8::decode on the returned > string everything is fine. That's indeed a bug in the bindings. The method returns a string without the utf8 flag set, so when you pass this into a method that expects utf8, the string is converted again resulting in garbage. utf8::decode() fixes this because it sets the utf8 flag (and avoids double encoding). Fixed in git: . Does this warrant a new release? From mario.kemper@googlemail.com Mon Sep 20 07:58:53 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5EDFE750937 for ; Mon, 20 Sep 2010 07:58:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.838 X-Spam-Level: X-Spam-Status: No, score=-1.838 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WPQt8R0r8+WT for ; Mon, 20 Sep 2010 07:58:49 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id 512AA7509A2 for ; Mon, 20 Sep 2010 07:58:40 +0000 (UTC) Received: by bwz15 with SMTP id 15so6790105bwz.27 for ; Mon, 20 Sep 2010 00:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ZOmYyG8yCWcmnHqw63ad64hpwsLQM3EX6URIL6McCVU=; b=LH5Q5TUUMJTWB/vsUlL5vG2/3RypHbjdftxD0lnntflZeq4AhxUhLYPpMTCbJC0xZD /4bvIqIgrLLhe4BWSLsCzV/CedvEYhKyCPc0ymrayxA5XhrL3NZo0fNEyIKj8+gvu+nv WTt+L5z1Vv6rA3c+MkpvYCu2211sor/RHPUKo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=J/U5oFDmhKaPTXYvqJv7VSiVETuRlOulJFgtTPGAKOp2y6qta/BuYiidgMn7D/n+lQ mQlizx1zmhGd+lTkLSfBVSNShckaYGIMyoUukOyTXitwBRbSNklKUUwrTqPLCGfjM616 VVTHtOzAAOD8pPCKyp65sJSCOOVBmCzLftY+o= Received: by 10.204.101.133 with SMTP id c5mr6263271bko.212.1284969517200; Mon, 20 Sep 2010 00:58:37 -0700 (PDT) Received: from [10.11.0.82] (nat-br-238.pironet-ndh.com [195.135.189.238]) by mx.google.com with ESMTPS id s34sm6227104bkk.1.2010.09.20.00.58.35 (version=SSLv3 cipher=RC4-MD5); Mon, 20 Sep 2010 00:58:36 -0700 (PDT) Message-ID: <4C97142A.8060503@googlemail.com> Date: Mon, 20 Sep 2010 09:58:34 +0200 From: Mario Kemper User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gnome2::VFS->format_uri_for_display and UTF-8 References: <1274024531.2365.60.camel@mario-xps> <4C960D15.1070601@gmx.de> In-Reply-To: <4C960D15.1070601@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 07:58:53 -0000 Am 19.09.2010 15:16, schrieb Torsten Schoenfeld: > utf8::decode() fixes this because it sets the utf8 flag (and avoids > double encoding). Does this mean that it is safe to keep my workaround (utf8::decode) even though the error gets fixed in a new release? From kaffeetisch@gmx.de Mon Sep 20 13:47:53 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 481A075058B for ; Mon, 20 Sep 2010 13:47:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.968 X-Spam-Level: X-Spam-Status: No, score=-0.968 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SORBS_WEB=0.77, SARE_SUB_ENC_UTF8=0.152, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FX9Oe6ucZeVQ for ; Mon, 20 Sep 2010 13:47:51 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id 8FB6F7502AB for ; Mon, 20 Sep 2010 13:47:41 +0000 (UTC) Received: (qmail invoked by alias); 20 Sep 2010 13:47:39 -0000 Received: from byp82.internetdsl.tpnet.pl (EHLO [192.168.1.12]) [83.19.19.82] by mail.gmx.net (mp007) with SMTP; 20 Sep 2010 15:47:39 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+CjLAKVpaCSMhrw6tFoS+4zW1lDWGpE6eQbHLC9R uFlzk0tYtzSvOM Message-Id: From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: <4C97142A.8060503@googlemail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Gnome2::VFS->format_uri_for_display and UTF-8 Date: Mon, 20 Sep 2010 15:47:38 +0200 References: <1274024531.2365.60.camel@mario-xps> <4C960D15.1070601@gmx.de> <4C97142A.8060503@googlemail.com> X-Mailer: Apple Mail (2.936) X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 13:47:53 -0000 On 20.09.2010, at 09:58, Mario Kemper wrote: > Am 19.09.2010 15:16, schrieb Torsten Schoenfeld: >> utf8::decode() fixes this because it sets the utf8 flag (and avoids >> double encoding). > > Does this mean that it is safe to keep my workaround (utf8::decode) > even though the error gets fixed in a new release? I think so, yes, and my testing seemed to agree. From sergstesh@yahoo.com Wed Sep 22 13:01:51 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3D24D7511A8 for ; Wed, 22 Sep 2010 13:01:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.052 X-Spam-Level: X-Spam-Status: No, score=0.052 tagged_above=-999 required=2 tests=[BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ycxwLaTZZWOd for ; Wed, 22 Sep 2010 13:01:49 +0000 (UTC) Received: from web112118.mail.gq1.yahoo.com (web112118.mail.gq1.yahoo.com [67.195.22.96]) by menubar.gnome.org (Postfix) with SMTP id 70D12750364 for ; Wed, 22 Sep 2010 13:01:40 +0000 (UTC) Received: (qmail 12369 invoked by uid 60001); 22 Sep 2010 13:01:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285160497; bh=s+7vzGoji70x5tkwFGyLrnlOmS89yLzkKP8vvxuT+Is=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SbS63y9Ui33NzaacXVzU68A2jLEaDujZnjOgK+0/l2D+dQRjuyOSxU+AbaVN/mHgAa4s0rFix3oMOnU/oKn23DQSY6mltoRnoe78WKFhLt/a/Ioe6ZKkWKL2RbiuklHfMD8mY0ntq6nbkc5gmJunZFcqG567z2l0bOAFYGkvM8M= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=A1hmnzlP15raeCk4O/0JaEls+aIFeyW2lghtlpX4jg8sBOHM46nmBNrNUW7CQ4L2q2IoBy64EnSPUfRCYjhLqV0aLQGzoUbkhYDAgd7GD5CzqF0qd5EKW9X1reTWjH6z68q0TPQy/GDsFWO2PdCU9KFvSa/Py9S3VPb/V+2MEv8=; Message-ID: <902249.11237.qm@web112118.mail.gq1.yahoo.com> X-YMail-OSG: yWNoOLsVM1lrvDrissze2bz0bdTicDqrfnOscNTKEZrJZmN 8e5JdUf1mOa1dlWXAmXk22MD6_IiXwWdICHSbcNkoAbkgGiXSBWAfGBL8jrt UyPlbHxG6n2f_y6tcMEvoU77kChvQdctUazLxEpAeoPd3Fj6llOqu1kxhVuD fBQkby5esugtXSrMhSWPbV44KrU9d8LvyrdsJy5vl5S2vdScnSkgCNEwH0Oy usNhbXgl32BXIQhJUJWVgGNGEUkSh4txlJ6Qb8E4SctvPqb_qLSozFyegXPa S01dhAXIXf.LNOsUcDUn3xip1oOiZ9sxKu_MjRGXP634Bl2CJ4sxwFA0- Received: from [87.69.49.127] by web112118.mail.gq1.yahoo.com via HTTP; Wed, 22 Sep 2010 06:01:37 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Wed, 22 Sep 2010 06:01:37 -0700 (PDT) From: Sergei Steshenko Subject: =?utf-8?B?ImVudW1lcmF0aW9uIHZhbHVlIOKAmEdES19FVkVOVF9MQVNU4oCZIG5vdCBo?= =?utf-8?B?YW5kbGVkIGluIHN3aXRjaCIgbWVzc2FnZQ==?= To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 13:01:51 -0000 Hello,=0A=0Awhile building Gtk2-1.222 I've noticed the following:=0A=0A"=0A= xs/GdkEvent.xs: In function =E2=80=98gtk2perl_gdk_event_set_state=E2=80=99:= =0Axs/GdkEvent.xs:131: warning: enumeration value =E2=80=98GDK_EVENT_LAST= =E2=80=99 not handled in switch=0Axs/GdkEvent.xs: In function =E2=80=98gtk2= perl_gdk_event_set_time=E2=80=99:=0Axs/GdkEvent.xs:200: warning: enumeratio= n value =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled in switch=0A"=0A=0A- l= ooks very suspicious to me. I've started looking because FileChooserDialog= =0Abehaves really strangely - looks like mostly dysfunctional, so I decided= =0Ato first rebuild.=0A=0AAny ideas ?=0A=0AThanks,=0A Sergei.=0A=0A=0A = From sergstesh@yahoo.com Wed Sep 22 13:12:49 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0682575027F for ; Wed, 22 Sep 2010 13:12:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.77 X-Spam-Level: X-Spam-Status: No, score=-1.77 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pUf7gOJSra4q for ; Wed, 22 Sep 2010 13:12:47 +0000 (UTC) Received: from web112109.mail.gq1.yahoo.com (web112109.mail.gq1.yahoo.com [67.195.23.96]) by menubar.gnome.org (Postfix) with SMTP id 733D07500A6 for ; Wed, 22 Sep 2010 13:12:39 +0000 (UTC) Received: (qmail 16123 invoked by uid 60001); 22 Sep 2010 13:12:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285161157; bh=7VHdZzfy+C0uzOeJFR4p4HVCRaCxU0bO4pPzZMfIWBY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=eH7DvaEe9az7nF8f15PZPomgC7jetnz8kyMFKLf/VxbKIFyeaS4lqTp/oD3JyVOrPxU7JTRO+pDE0FJTJ3IcB5EN/z0QhctGICbRNxl+nxd7AFc9KbO9rJBuQznGm2ZoEOYZOtM1G8L6cmAOKcv2JbkC9rQ096gRR66lnIvQOr4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Gwbug6QD4YZn2r1uGfWoj6w8t4fy8QePG6c2JNE7QVVGJ27g1M4FCBDf94dhXr+PZtctXIff4a1ZD0sdZ1O/W5IOnH5ssBNF00AdGxzPxJ42VDjba430K8qxSCa44o1ZyIBcoQOUSSrcHr6hiObo8oJHPxvlw1y8awaBs5DwprU=; Message-ID: <571740.7702.qm@web112109.mail.gq1.yahoo.com> X-YMail-OSG: fW484AAVM1lY1CwnCp6g8qxgEoLAu2NDwHF.uh0FNSuqrE4 2i4Rnz_UHCfFgCykSopMW7giqgvwDiB6No03wCv6c6RBM9WapFINDblJyn_B TE8BziIqqfDjX0dgnrMWhmMxJpcemX6LnrRZFw76d0PSXAr8mK2Rj0e5KtYI ZZRARfdevMZstVALfo2CLPeHa5E16HFmQ8RErVnebQQs2nAAd.VaiCI4fqY0 ERzx0OknynZNH.NXsMHvDcOjw70X4ugupDW3Gny.kq.d7n7W2ph7aKzC0zQA b8SoP4i2NKZT_.aV6mCf49odyFrxTSpMwVVuNqwSGVPgU3RFJtnnidUZL5nO xAKHcGlS_qaOe018hbLT.ADAfdFQ- Received: from [87.69.49.127] by web112109.mail.gq1.yahoo.com via HTTP; Wed, 22 Sep 2010 06:12:37 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Wed, 22 Sep 2010 06:12:37 -0700 (PDT) From: Sergei Steshenko Subject: =?utf-8?B?UmU6ICJlbnVtZXJhdGlvbiB2YWx1ZSDigJhHREtfRVZFTlRfTEFTVOKAmSBu?= =?utf-8?B?b3QgaGFuZGxlZCBpbiBzd2l0Y2giIG1lc3NhZ2U=?= To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 13:12:49 -0000 =0A=0A--- On Wed, 9/22/10, Sergei Steshenko wrote:=0A= =0A> From: Sergei Steshenko =0A> Subject: "enumeration= value =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled in switch" message=0A> = To: gtk-perl-list@gnome.org=0A> Date: Wednesday, September 22, 2010, 6:01 A= M=0A> Hello,=0A> =0A> while building Gtk2-1.222 I've noticed the following:= =0A> =0A> "=0A> xs/GdkEvent.xs: In function=0A> =E2=80=98gtk2perl_gdk_event= _set_state=E2=80=99:=0A> xs/GdkEvent.xs:131: warning: enumeration value=0A>= =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled in switch=0A> xs/GdkEvent.xs:= In function=0A> =E2=80=98gtk2perl_gdk_event_set_time=E2=80=99:=0A> xs/GdkE= vent.xs:200: warning: enumeration value=0A> =E2=80=98GDK_EVENT_LAST=E2=80= =99 not handled in switch=0A> "=0A> =0A> - looks very suspicious to me. I'v= e started looking because=0A> FileChooserDialog=0A> behaves really strangel= y - looks like mostly dysfunctional,=0A> so I decided=0A> to first rebuild.= =0A> =0A> Any ideas ?=0A> =0A> Thanks,=0A> =C2=A0 Sergei.=0A> =0A=0AGtk2-1.= 221 does not have this warning.=0A=0ARegards,=0A Sergei.=0A=0A=0A From sergstesh@yahoo.com Wed Sep 22 13:19:41 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 32BED7503DC for ; Wed, 22 Sep 2010 13:19:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.77 X-Spam-Level: X-Spam-Status: No, score=-1.77 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H9ZWzaCozQ1u for ; Wed, 22 Sep 2010 13:19:39 +0000 (UTC) Received: from web112116.mail.gq1.yahoo.com (web112116.mail.gq1.yahoo.com [67.195.22.94]) by menubar.gnome.org (Postfix) with SMTP id 934B57503D3 for ; Wed, 22 Sep 2010 13:19:31 +0000 (UTC) Received: (qmail 61472 invoked by uid 60001); 22 Sep 2010 13:19:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285161570; bh=bqbUPdIB9rFIG5bIrJ+dTv1Rl2nr/TsikT8t4HG/4B4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1MidZX60a6InyoKCvzrD1rZnI2g7B5L211TVFpKdf1LDFov7D2VVruwl6njmnczM4U2nXoB4Pt7FrbryM2k/NSR18rwcVH/gqsa7u37YliA+SBJLP2JdyS4s9iQPUn+M1jwGF6cQw1X96onwVY1QfbljSCRAxNo6deApIhE6FUM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Pu/LV5kR4zG8QucWxH81yiop3ZnuEC8Ux4t8JZoFuOO9QTZnPng7B0Sn31xpUYx22QafIEinMbYMd6jFQg56VOXczxn8gJnH5RTQZzK3+edxYyWMo1rLMBs+1A+UnWypFfyi96plUp1+E0weC46QN8EaZcjzgbjXZM59yh6Mqmk=; Message-ID: <46343.59884.qm@web112116.mail.gq1.yahoo.com> X-YMail-OSG: CT1NopYVM1ndOUjyhCrWDP5Ws3H2_UpCl1YRU1FUIkLD1G7 c9FVJ3t2i_d6WVGtZbvs6sy3PyuZ0IDhnL07rHvwQDRNzT65FJZI2DDY6ba. TmvMthDlcuTQZJph8Fd5CipUo2Hv8O4boSz3sy5Sv0OzO.7fenSPKBetXPLp mWu7sAGM.T64fbtm.2xEnAKXu70y1P9vkMlAUZMjvMva9w7sXniMIc.Ci0cV hi1PQYPrDEcOMjg8fPJK1Y1VhCOT4my._pHDxgS2dZqpNFk.ztmRJFyNVpWs 25WiR1e_KtQBbr_zL3WUnsebdXvtpLDQW.81EuJv8kUMGmXCyFf6fQMUfAVZ Fl1bbxZ8shb2_8lfDUwiuJgGI2Ps- Received: from [87.69.49.127] by web112116.mail.gq1.yahoo.com via HTTP; Wed, 22 Sep 2010 06:19:29 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Wed, 22 Sep 2010 06:19:29 -0700 (PDT) From: Sergei Steshenko Subject: =?utf-8?B?UmU6ICJlbnVtZXJhdGlvbiB2YWx1ZSDigJhHREtfRVZFTlRfTEFTVOKAmSBu?= =?utf-8?B?b3QgaGFuZGxlZCBpbiBzd2l0Y2giIG1lc3NhZ2U=?= To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 13:19:41 -0000 =0A=0A--- On Wed, 9/22/10, Sergei Steshenko wrote:=0A= =0A> From: Sergei Steshenko =0A> Subject: Re: "enumera= tion value =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled in switch" message= =0A> To: gtk-perl-list@gnome.org=0A> Date: Wednesday, September 22, 2010, 6= :12 AM=0A> =0A> =0A> --- On Wed, 9/22/10, Sergei Steshenko =0A> wrote:=0A> =0A> > From: Sergei Steshenko =0A= > > Subject: "enumeration value =E2=80=98GDK_EVENT_LAST=E2=80=99 not=0A> ha= ndled in switch" message=0A> > To: gtk-perl-list@gnome.org=0A> > Date: Wedn= esday, September 22, 2010, 6:01 AM=0A> > Hello,=0A> > =0A> > while building= Gtk2-1.222 I've noticed the following:=0A> > =0A> > "=0A> > xs/GdkEvent.xs= : In function=0A> > =E2=80=98gtk2perl_gdk_event_set_state=E2=80=99:=0A> > x= s/GdkEvent.xs:131: warning: enumeration value=0A> > =E2=80=98GDK_EVENT_LAST= =E2=80=99 not handled in switch=0A> > xs/GdkEvent.xs: In function=0A> > =E2= =80=98gtk2perl_gdk_event_set_time=E2=80=99:=0A> > xs/GdkEvent.xs:200: warni= ng: enumeration value=0A> > =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled in= switch=0A> > "=0A> > =0A> > - looks very suspicious to me. I've started lo= oking=0A> because=0A> > FileChooserDialog=0A> > behaves really strangely - = looks like mostly=0A> dysfunctional,=0A> > so I decided=0A> > to first rebu= ild.=0A> > =0A> > Any ideas ?=0A> > =0A> > Thanks,=0A> > =C2=A0 Sergei.=0A>= > =0A> =0A> Gtk2-1.221 does not have this warning.=0A> =0A> Regards,=0A> = =C2=A0 Sergei.=0A> =0A=0AMy wires got crossed - now the warning is present = in Gtk2-1.221.=0A=0AOTOH, I used to build Gtk2-1.221 with earlier versions = of gtk+, so maybe =0Athat's the cause I didn't see it in the old 'make.log'= of Gtk2-1.221 ?=0A=0AThanks,=0A Sergei.=0A=0A=0A From sergstesh@yahoo.com Wed Sep 22 13:41:42 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6BC08751242 for ; Wed, 22 Sep 2010 13:41:42 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a9qU78cJSz+1 for ; Wed, 22 Sep 2010 13:41:38 +0000 (UTC) Received: from web112106.mail.gq1.yahoo.com (web112106.mail.gq1.yahoo.com [67.195.23.93]) by menubar.gnome.org (Postfix) with SMTP id EBC8F75123B for ; Wed, 22 Sep 2010 13:41:29 +0000 (UTC) Received: (qmail 30934 invoked by uid 60001); 22 Sep 2010 13:41:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285162887; bh=2Nv6yrJjwUkNfH9BFVgp52Q2CU19o48SoqHuQqZUUIo=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=G0Qmxlm7UzoKGZGltQMSnQjBIywJn/vbDswIiD0vy/bUw1Q4QIZLueS4PY12VBKCfWFnqUIcEdYfVOSstvK0h6t3yHPBijZbQxq5Xs6zSw71T0MABtbYOVfkdtWtKp019/suwoLyaR8OJIyZOslo3N6w8cqfXP++2f5GTKoLagE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=cFGKblSCY9BIO6H8KmAXrjqC3zseiXg/gKei0/Zzlfyu3FDDp3GjjuxKWRcaDyKOYkZ5nbcHr0mHg6nha/e+G27gRbMN8wWAzm/mP83It5/wJbLVPgySUD0TaoC/DlEbexyTrLlp/A3zXZ9Xw95Yo46ofGxMd7cjXPqLqQ/DDBI=; Message-ID: <800490.23972.qm@web112106.mail.gq1.yahoo.com> X-YMail-OSG: TAUQR3gVM1mq._WjJegYaQSq03cy7rzxl3Di5t_6h7raD9v ebbE2iM4Z Received: from [87.69.49.127] by web112106.mail.gq1.yahoo.com via HTTP; Wed, 22 Sep 2010 06:41:27 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Wed, 22 Sep 2010 06:41:27 -0700 (PDT) From: Sergei Steshenko Subject: "event->button.state = newstate = newstate; " - is it supposed to be so ? To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 13:41:45 -0000 Hello, while looking into 'Gtk2-1.222/xs/GdkEvent.xs' file I've noticed this: 126 static void 127 gtk2perl_gdk_event_set_state (GdkEvent * event, 128 GdkModifierType newstate) 129 { 130 if (event) { 131 switch (event->type) { 132 case GDK_MOTION_NOTIFY: 133 event->motion.state = newstate; 134 break; 135 case GDK_BUTTON_PRESS: 136 case GDK_2BUTTON_PRESS: 137 case GDK_3BUTTON_PRESS: 138 case GDK_BUTTON_RELEASE: 139 event->button.state = newstate = newstate; 140 break; - please see line #139. I'd rather write the line as 139 event->button.state = newstate; , though probably the repetition of 'newstate' is harmless. Anyway, is line #139 supposed to be this way ? Thanks, Sergei. From sergstesh@yahoo.com Wed Sep 22 18:14:25 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 88E20750554 for ; Wed, 22 Sep 2010 18:14:25 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DEH-lfm5sXi0 for ; Wed, 22 Sep 2010 18:14:23 +0000 (UTC) Received: from web112106.mail.gq1.yahoo.com (web112106.mail.gq1.yahoo.com [67.195.23.93]) by menubar.gnome.org (Postfix) with SMTP id 96B18750552 for ; Wed, 22 Sep 2010 18:14:15 +0000 (UTC) Received: (qmail 10073 invoked by uid 60001); 22 Sep 2010 18:14:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285179253; bh=UXSr3Rf00bzpxEwNhLWxTWS5KVK5hVK7BWmfa2qclVk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=bU4WJZ1V3OOKc/Rwqyox0Gfm2uF7afb/eCWYK+u/o1YagUeGnO/xM9V+YUzazVFexlXaZdpjbnEpxBX9QpsZzzxl4rDS/vEY0ZWeZRPxBqjvq+Ex5rp61JoCGxB7XlhPhYr81+L5lC0Fm6IBjEqV0M0cgxPrPLfROZJ8eBla2pU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=rNfNx45sxbrBDN+5WC9Bf2ODjcz068Oxt+pKfoe5el70GTrtuFmcEPY0BCqLAZMmpl8+hORON/J5f+cGyuDKLATz0pDDwHDenXDAAT7uTuJ8bJK6Y0imQ3gLtHOSwY9YqM6TU7F/SZoDaZO6yhXJRJ7Mfhukq7M1bEj2rTOim/E=; Message-ID: <427204.10063.qm@web112106.mail.gq1.yahoo.com> X-YMail-OSG: I_oktscVM1m.aAkNQ0r1Je0Z8mUlIH1rjjAqUoFIbjiTBK4 PutIFw5lK Received: from [87.69.49.127] by web112106.mail.gq1.yahoo.com via HTTP; Wed, 22 Sep 2010 11:14:12 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Wed, 22 Sep 2010 11:14:12 -0700 (PDT) From: Sergei Steshenko Subject: Gtk2::FileChooserDialog beahves erratically when files are updated in CWD To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-539889873-1285179252=:10063" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 18:14:25 -0000 --0-539889873-1285179252=:10063 Content-Type: text/plain; charset=us-ascii Hello All, I've created a simple script (see the attached file) which reproduces a problem I have in real application. The problem is that essentially Gtk2::FileChooserDialog doesn't work when a file is constantly updated in the chosen from Gtk2::FileChooserDialog directory. The widget, when its window appears, shows a list of files which is immediately updated. When in the widget window I press "Modified" button, the file list in the widget window is constantly rearranged, and order of files which are _not_ modified is changed every second or so. I.e. it looks like some kind of unstable sort algorithm is used. I am sure the files whose order change do not change - they shouldn't and the widget display their modification time which doesn't change. It is practically impossible to change file/directory selection use mouse or keyboard. The widget seems to operate OK in a directory in which nothing changes. Is there a way to get a snapshot of files when the selection is created ? I.e. is there a way to disable constant updates ? Thanks, Sergei. --0-539889873-1285179252=:10063 Content-Type: application/x-perl; name="try_file_selection.pl" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="try_file_selection.pl" cmVxdWlyZSBGaWxlOjpTcGVjOwpyZXF1aXJlIEZpbGU6OkJhc2VuYW1lOwpy ZXF1aXJlIEZpbGU6OlBhdGg7CnJlcXVpcmUgQ3dkOwoKdXNlIEdsaWIgcXcv VFJVRSBGQUxTRS87CnVzZSBHdGsyICctaW5pdCc7Cgp1c2UgRGF0YTo6RHVt cGVyOwoKdXNlIHN0cmljdDsKCm15ICRfdG9vbF9uYW1lOwpteSAkX3Rvb2xf cGF0aDsKKCRfdG9vbF9uYW1lLCAkX3Rvb2xfcGF0aCwgdW5kZWYpID0gRmls ZTo6QmFzZW5hbWU6OmZpbGVwYXJzZSgkMCk7CgoKbXkgJF9pbmZvX21hcmtl ciA9ICIkX3Rvb2xfbmFtZSA6SU5GTzoiOwpteSAkX3dhcm5pbmdfbWFya2Vy ID0gIiRfdG9vbF9uYW1lIDpXQVJOSU5HOiI7Cm15ICRfZXJyb3JfbWFya2Vy ID0gIiRfdG9vbF9uYW1lIDpFUlJPUjoiOwoKCnN1YiBjcmVhdGVfdG9wX2xl dmVsX3dpbmRvdygpOwpzdWIgY3JlYXRlX2xvYWRfc3RhdGVfZ3VpKCQpOwoK Cm15ICRfdG9wX2xldmVsX3dpbmRvdyA9IGNyZWF0ZV90b3BfbGV2ZWxfd2lu ZG93KCk7CgokX3RvcF9sZXZlbF93aW5kb3ctPnNob3c7CgpjcmVhdGVfbG9h ZF9zdGF0ZV9ndWkoJF90b3BfbGV2ZWxfd2luZG93KTsKCkd0azItPm1haW47 CgoKCgojIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKc3ViIGNyZWF0ZV90 b3BfbGV2ZWxfd2luZG93KCkKIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj CiAgewogIG15ICR0aGlzID0gR3RrMjo6V2luZG93LT5uZXcoJ3RvcGxldmVs Jyk7CgogICR0aGlzLT5zaWduYWxfY29ubmVjdAogICAgKAogICAgZGVzdHJv eSA9PgogICAgICBzdWIoKQogICAgICAgIHsKICAgICAgICBHdGsyLT5tYWlu X3F1aXQ7CiAgICAgICAgfQogICAgKTsKCiAgJHRoaXMtPnNpZ25hbF9jb25u ZWN0CiAgICAoCiAgICBkZWxldGVfZXZlbnQgPT4KICAgICAgc3ViKCkKICAg ICAgICB7CiAgICAgICAgR3RrMi0+bWFpbl9xdWl0OwogICAgICAgIHJldHVy biBGQUxTRTsKICAgICAgICB9CiAgICApOwoKICAkdGhpczsKICB9ICMgc3Vi IGNyZWF0ZV90b3BfbGV2ZWxfd2luZG93CiAgIy0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLQoKCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMKc3Vi IGNyZWF0ZV9sb2FkX3N0YXRlX2d1aSgkKQojIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjCiAgewogIG15KAogICAgJHBhcmVudCwKICAgICkgPSBAXzsKCiAg bXkgJHRoaXMgPSBHdGsyOjpGaWxlQ2hvb3NlckRpYWxvZy0+bmV3X3dpdGhf YmFja2VuZAogICAgICAgICAgICAgICAoCiAgICAgICAgICAgICAgICdDaG9v c2UgZmlsZSB0byBsb2FkIHN0YXRlIGZyb20nLAogICAgICAgICAgICAgICAk cGFyZW50LAogICAgICAgICAgICAgICAnb3BlbicsCiAgICAgICAgICAgICAg ICdiYWNrZW5kJywKICAgICAgICAgICAgICAgJ2d0ay1jYW5jZWwnID0+ICdj YW5jZWwnLAogICAgICAgICAgICAgICAnZ3RrLW9rJyA9PiAnb2snCiAgICAg ICAgICAgICAgICk7CiAgJHRoaXMtPnNob3c7CgoKICAkdGhpcy0+c2lnbmFs X2Nvbm5lY3QKICAgICgKICAgICdzZWxlY3Rpb24tY2hhbmdlZCcgPT4KICAg ICAgc3ViCiAgICAgICAgewogICAgICAgIHdhcm4gInNlbGVjdGlvbiBjaGFu Z2VkIjsKICAgICAgICBteSAkY3VycmVudF9mb2xkZXIgPSAkdGhpcy0+Z2V0 X2N1cnJlbnRfZm9sZGVyOyB3YXJuICJcJGN1cnJlbnRfZm9sZGVyPSRjdXJy ZW50X2ZvbGRlciI7CiAgICAgICAgfQogICAgKTsKCiAkdGhpcy0+c2lnbmFs X2Nvbm5lY3QKICAgICgKICAgICd1cGRhdGUtcHJldmlldycgPT4KICAgICAg c3ViCiAgICAgICAgewogICAgICAgIHdhcm4gInVwZGF0ZS1wcmV2aWV3IGNh bGxlZCI7CiAgICAgICAgfQogICAgKTsKCgogIGlmKCR0aGlzLT5ydW4gZXEg J29rJykKICAgIHsKICAgICMgeW91IGNhbiBnZXQgdGhlIHVzZXIncyBzZWxl Y3Rpb24gYXMgYSBmaWxlbmFtZSBvciBhIHVyaS4KICAgIG15ICR1cmkgPSAk dGhpcy0+Z2V0X3VyaTsKICAgIHdhcm4gIiRfaW5mb19tYXJrZXIgdXJpICR1 cmlcbiI7CiAgICBteSAkZmlsZW5hbWUgPSAkdGhpcy0+Z2V0X2ZpbGVuYW1l OyB3YXJuICJcJGZpbGVuYW1lPSRmaWxlbmFtZSI7CiAgICB9CgogICR0aGlz LT5kZXN0cm95OwogIH0gIyBzdWIgY3JlYXRlX2xvYWRfc3RhdGVfZ3VpCiAg Iy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0K --0-539889873-1285179252=:10063-- From v.velox@vvelox.net Fri Sep 24 14:29:00 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2388975009F for ; Fri, 24 Sep 2010 14:29:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.513 X-Spam-Level: X-Spam-Status: No, score=-0.513 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, SPF_HELO_SOFTFAIL=0.732, SPF_SOFTFAIL=0.665, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A3SLlQ+eq7NI for ; Fri, 24 Sep 2010 14:28:56 +0000 (UTC) X-Greylist: delayed 511 seconds by postgrey-1.32 at menubar.gnome.org; Fri, 24 Sep 2010 14:28:56 UTC Received: from vulpes.vvelox.net (sula-ki.vvelox.net [99.69.115.46]) by menubar.gnome.org (Postfix) with ESMTP id B64C47500D3 for ; Fri, 24 Sep 2010 14:28:48 +0000 (UTC) Received: from vixen42.vulpes.vvelox.net (unknown [192.168.14.2]) (Authenticated sender: v.velox) by vulpes.vvelox.net (Postfix) with ESMTPA id 708E4B839 for ; Fri, 24 Sep 2010 09:21:04 -0500 (CDT) Date: Fri, 24 Sep 2010 09:22:13 -0500 From: "Zane C.B." To: gtk-perl-list Subject: tray icon drop down menus Message-ID: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/xF5fzakBVCq_wHAE7f0ojvv"; protocol="application/pgp-signature" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 14:29:00 -0000 --Sig_/xF5fzakBVCq_wHAE7f0ojvv Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Below is a chunk of code I am using to make a tray icon that displays a menu when it is clicked on. The problem I am running into is only half the icon is displayed as some of the space is taken up by a small chunk of the menu GUI. Any ideas? #inits the gui hash my %gui; $gui{id}=3Drand().rand(); #creates the tray icon $gui{trayicon} =3D Gtk2::TrayIcon->new("ZConf::Cron"); =09 #inits the menu $gui{menubar}=3DGtk2::MenuBar->new; $gui{menubarmenu}=3DGtk2::ImageMenuItem->new('_Zconf::Cron'); $gui{trayiconimage}=3D$self->xpmGtk2Image; $gui{menubarmenu}->set_image($gui{trayiconimage}); $gui{menubar}->show; $gui{menubarmenu}->show; $gui{menu}=3DGtk2::Menu->new; $gui{menu}->show; $gui{menuTearoff}=3DGtk2::TearoffMenuItem->new; $gui{menuTearoff}->show; $gui{menu}->append($gui{menuTearoff}); $gui{menubarmenu}->set_submenu($gui{menu}); $gui{menubar}->append($gui{menubarmenu}); $gui{trayicon}->add($gui{menubar}); #refreshes $gui{refresh}=3DGtk2::MenuItem->new('_refresh'); $gui{refresh}->show; $gui{refresh}->signal_connect(activate=3D>\&refreshMenuItem, { gui=3D>$gui{id}, self=3D>$self, } ); $gui{menu}->append($gui{refresh}); #display it all $gui{trayicon}->show_all; --Sig_/xF5fzakBVCq_wHAE7f0ojvv Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkyctBkACgkQqrJJy0yxYQAKCQCfcDL64FXD2jlJ08mSFhPQQhBs HuYAn0BVHhim6wB6Kfrsyby0bKBwSuXA =bjVS -----END PGP SIGNATURE----- --Sig_/xF5fzakBVCq_wHAE7f0ojvv-- From mario.kemper@googlemail.com Fri Sep 24 14:42:21 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B77977500CC for ; Fri, 24 Sep 2010 14:42:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.377 X-Spam-Level: X-Spam-Status: No, score=-0.377 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_SBL=1.623] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mPyIknXf3zGz for ; Fri, 24 Sep 2010 14:42:20 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id D050475009F for ; Fri, 24 Sep 2010 14:42:11 +0000 (UTC) Received: by bwz15 with SMTP id 15so3322075bwz.27 for ; Fri, 24 Sep 2010 07:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=ooZojpwJO3mgihUWIU1ul8lILuBmJbJvHoZdSvqOCgQ=; b=LhExuZdOcZ+N9vdoqaLU+42E9/HjwJqdwRN++7QWBuw9F02xw9+5aaRy4zWGWIYXzS UONhLVfOKQQ246RQR7V3DtagvKa8zPBlvlar8K5D9E0sfrkItGZ21qXsXGdeJIzdb+5H JAd7MPJn0lArAUo8VOkjf/jigd8oYYblf2mV4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=kk5/En4A4SlBJ4cwE3K7X5kYq0XpPDRBFbSUw9d4N45Kw6xizwM2O5jlNl1wyF2g62 5s1c/OropkTn5tw7tqnqNAu7Z+V2R44xlWCN96dyL7++GyYDbwqKEgV4vLaWDlABiEbO xrZFeSvKnwKD/zJjbd77WgWkfhK35Roglb6IE= Received: by 10.204.59.9 with SMTP id j9mr2061346bkh.150.1285339329225; Fri, 24 Sep 2010 07:42:09 -0700 (PDT) Received: from [192.168.2.104] (p5DE84F3A.dip.t-dialin.net [93.232.79.58]) by mx.google.com with ESMTPS id f10sm1640280bkl.17.2010.09.24.07.42.07 (version=SSLv3 cipher=RC4-MD5); Fri, 24 Sep 2010 07:42:07 -0700 (PDT) Subject: Re: tray icon drop down menus From: Mario Kemper To: "Zane C.B." In-Reply-To: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> References: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> Content-Type: text/plain; charset="UTF-8" Date: Fri, 24 Sep 2010 16:42:05 +0200 Message-ID: <1285339325.16149.1.camel@mario-xps> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: gtk-perl-list X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 14:42:22 -0000 > The problem I am running into is only > half the icon is displayed as some of the space is taken up by a > small chunk of the menu GUI. > > Any ideas? > This is how it looks here: http://img689.imageshack.us/img689/5045/exampledn.png Looks ok. Maybe just a problem with your current theme? From v.velox@vvelox.net Fri Sep 24 15:02:12 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9A86C7500B7 for ; Fri, 24 Sep 2010 15:02:12 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 1.11 X-Spam-Level: * X-Spam-Status: No, score=1.11 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, SPF_HELO_SOFTFAIL=0.732, SPF_SOFTFAIL=0.665, T_RP_MATCHES_RCVD=-0.01, URIBL_SBL=1.623] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PUUJP3qH+VGM for ; Fri, 24 Sep 2010 15:02:10 +0000 (UTC) Received: from vulpes.vvelox.net (sula-ki.vvelox.net [99.69.115.46]) by menubar.gnome.org (Postfix) with ESMTP id 1A7CB75009F for ; Fri, 24 Sep 2010 15:02:01 +0000 (UTC) Received: from vixen42.vulpes.vvelox.net (unknown [192.168.14.2]) (Authenticated sender: v.velox) by vulpes.vvelox.net (Postfix) with ESMTPA id 14D5CB836; Fri, 24 Sep 2010 10:02:55 -0500 (CDT) Date: Fri, 24 Sep 2010 10:04:06 -0500 From: "Zane C.B." To: Mario Kemper Subject: Re: tray icon drop down menus Message-ID: <20100924100406.5ad39dd5@vixen42.vulpes.vvelox.net> In-Reply-To: <1285339325.16149.1.camel@mario-xps> References: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> <1285339325.16149.1.camel@mario-xps> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/mZdv9En2azWjXr5lyQL8U+c"; protocol="application/pgp-signature" Cc: gtk-perl-list X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 15:02:13 -0000 --Sig_/mZdv9En2azWjXr5lyQL8U+c Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 24 Sep 2010 16:42:05 +0200 Mario Kemper wrote: > > The problem I am running into is only > > half the icon is displayed as some of the space is taken up by a > > small chunk of the menu GUI. > >=20 > > Any ideas? > >=20 >=20 > This is how it looks here: > http://img689.imageshack.us/img689/5045/exampledn.png >=20 > Looks ok. Maybe just a problem with your current theme? >=20 Nah, the same affect is noticable in your theme there. If you to the left of the image, you will see the exact same thing. The light than part to left of it is what I am talking about. The big problem comes in with WMs like fluxbox that expect a small square tray icon. Of which the menu stuff off sets it a bit resulting in only half the icon being displayed. --Sig_/mZdv9En2azWjXr5lyQL8U+c Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkycvekACgkQqrJJy0yxYQBYmgCeJCH0mVoWC9MyGS3nEplQzfRJ /g4Ani6ApWkYeo1BHURgbI3Ux35mN4sH =+03U -----END PGP SIGNATURE----- --Sig_/mZdv9En2azWjXr5lyQL8U+c-- From v.velox@vvelox.net Sat Sep 25 05:37:37 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CDBBE750120 for ; Sat, 25 Sep 2010 05:37:37 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.508 X-Spam-Level: X-Spam-Status: No, score=0.508 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, MISSING_HEADERS=1.021, SPF_HELO_SOFTFAIL=0.732, SPF_SOFTFAIL=0.665, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 710BmUfDFbvd for ; Sat, 25 Sep 2010 05:37:33 +0000 (UTC) Received: from vulpes.vvelox.net (sula-ki.vvelox.net [99.69.115.46]) by menubar.gnome.org (Postfix) with ESMTP id DD78F75095C for ; Sat, 25 Sep 2010 05:37:23 +0000 (UTC) Received: from vixen42.vulpes.vvelox.net (unknown [192.168.14.2]) (Authenticated sender: v.velox) by vulpes.vvelox.net (Postfix) with ESMTPA id A547EB836 for ; Sat, 25 Sep 2010 00:38:10 -0500 (CDT) Date: Sat, 25 Sep 2010 00:39:23 -0500 From: "Zane C.B." Cc: gtk-perl-list Subject: Re: tray icon drop down menus (solved) Message-ID: <20100925003923.5169d1b5@vixen42.vulpes.vvelox.net> In-Reply-To: <20100924100406.5ad39dd5@vixen42.vulpes.vvelox.net> References: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> <1285339325.16149.1.camel@mario-xps> <20100924100406.5ad39dd5@vixen42.vulpes.vvelox.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/uUY7Fvye94YLuOE_rBsVHzi"; protocol="application/pgp-signature" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 05:37:38 -0000 --Sig_/uUY7Fvye94YLuOE_rBsVHzi Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable > Ok, basically this is impossible to do using any of the regular menuing stuff. I started poking at a program that does this, claws-mail, and found the answers to this in file 'trayicon.c' for it's tray icon plugin. You can find it all in the functions 'create_trayicon' and 'click_cb'. Basically what needs to happen you need to create a event box with the image in it. Then on a mouse click, you then activate the menu. --Sig_/uUY7Fvye94YLuOE_rBsVHzi Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkydiw4ACgkQqrJJy0yxYQDwygCfe99b8xaLQ0ZbvEXpE06iMitb 0SkAnjC0libJbJS7e0jw6Mbg0oGXhPoO =xhFn -----END PGP SIGNATURE----- --Sig_/uUY7Fvye94YLuOE_rBsVHzi-- From mario.kemper@googlemail.com Sat Sep 25 10:10:49 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 320F87509C6 for ; Sat, 25 Sep 2010 10:10:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DL9ZehIshF4B for ; Sat, 25 Sep 2010 10:10:46 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id 61DC4750981 for ; Sat, 25 Sep 2010 10:10:37 +0000 (UTC) Received: by bwz15 with SMTP id 15so4081190bwz.27 for ; Sat, 25 Sep 2010 03:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=X+xE0htM0ebp5ww7LOuyY1FwgCKypEyyvP6GxdfewiY=; b=OI7kvWBUsyGnLO25qzFWzpQLaataVooY9pNt1eDdQDxX+jwa73ttyQUg0kEmASKokt 64yXE4Wrhz3O6T6lKGVM3cklED7hCwx0Entg6R+x5yEXCnIYdbhTR8FvR1zISjHREdPU gTqrGZgCk3Vs0o4g6n2SmNgSb1rLfAkO7e+Og= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=IBW/tVjMIDvRcfhuJPOkmjseWQICd03aTkfr/3Vp/5XFEluckPVnPWVlxUcl/xuZ/8 w2c0svlrOGXOIbZhNEq5VhF1sE5o6W4H+EGLw+Ny2dt1pKMOtqJ0KUdXfAPsTFD8lv5W 9KTNgkWG0HTLCDMO+ZPyWIMBvdpCtzvTzYPjA= Received: by 10.204.79.223 with SMTP id q31mr3022590bkk.92.1285409436096; Sat, 25 Sep 2010 03:10:36 -0700 (PDT) Received: from [192.168.2.104] (p5DE873F2.dip.t-dialin.net [93.232.115.242]) by mx.google.com with ESMTPS id 24sm2373290bkr.19.2010.09.25.03.10.34 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Sep 2010 03:10:34 -0700 (PDT) Subject: Re: tray icon drop down menus (solved) From: Mario Kemper To: "Zane C.B." In-Reply-To: <20100925003923.5169d1b5@vixen42.vulpes.vvelox.net> References: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> <1285339325.16149.1.camel@mario-xps> <20100924100406.5ad39dd5@vixen42.vulpes.vvelox.net> <20100925003923.5169d1b5@vixen42.vulpes.vvelox.net> Content-Type: text/plain; charset="UTF-8" Date: Sat, 25 Sep 2010 12:10:27 +0200 Message-ID: <1285409427.4111.10.camel@mario-xps> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: gtk-perl-list X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 10:10:49 -0000 > Basically what needs to happen you need to create a event box with > the image in it. Then on a mouse click, you then activate the menu. > Did you have a look at Gtk2::StatusIcon? There is no event box needed. From zzmiloschxx@gmail.com Sat Sep 25 10:46:26 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 662B17509B7 for ; Sat, 25 Sep 2010 10:46:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.99 X-Spam-Level: X-Spam-Status: No, score=-1.99 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rijkAnkW90Vn for ; Sat, 25 Sep 2010 10:46:24 +0000 (UTC) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by menubar.gnome.org (Postfix) with ESMTP id 2DB8E750999 for ; Sat, 25 Sep 2010 10:46:15 +0000 (UTC) Received: by gxk8 with SMTP id 8so1702996gxk.27 for ; Sat, 25 Sep 2010 03:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=gwoH8qT7m/7x86o2e1cua1rJn39Lil22bU685CHdaHc=; b=pvlNef+mXvTemDEJZYSbsLSw9So/vClZ1P5hBUbh8eCLaVspDGBtHtJKDbR5vpmjCz NmGAZ0zM5iSZFVusB8E306ZKL9COUu2Y6BmqGhSEUNCvRSUc1ur6eJ27T2F/Q4sMVh49 xG8Ejl9sjFOH9S6Ke3S8s6BqbMHvksyF9RqpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=bGslmlnZIXCZLpQYWLH1nZgLilpiI3fGLpirJcj7SQsDQ0ihkakKm7WE/epw+ogFG+ MGO685MNcxwMTrmEosaTbPJmj8Bpt8ZHCpMCmfW2PL4PdTsPz0uqhd3N2MuIFcm6fIjj nq2y/W5jHbHJbl0Sbil3GKVd6QGidtyliv+1k= Received: by 10.101.138.8 with SMTP id q8mr5291027ann.164.1285411574317; Sat, 25 Sep 2010 03:46:14 -0700 (PDT) Received: from zenlap64.zentara.net ([74.127.87.12]) by mx.google.com with ESMTPS id f29sm5207774anh.31.2010.09.25.03.46.12 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Sep 2010 03:46:13 -0700 (PDT) Date: Sat, 25 Sep 2010 06:45:58 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: tray icon drop down menus (solved) Message-ID: <20100925064558.3429cf93@zenlap64.zentara.net> In-Reply-To: <20100925003923.5169d1b5@vixen42.vulpes.vvelox.net> References: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> <1285339325.16149.1.camel@mario-xps> <20100924100406.5ad39dd5@vixen42.vulpes.vvelox.net> <20100925003923.5169d1b5@vixen42.vulpes.vvelox.net> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 10:46:26 -0000 On Sat, 25 Sep 2010 00:39:23 -0500 "Zane C.B." wrote: >> > >Ok, basically this is impossible to do using any of the regular >menuing stuff. > >I started poking at a program that does this, claws-mail, and found >the answers to this in file 'trayicon.c' for it's tray icon plugin. >You can find it all in the functions 'create_trayicon' and 'click_cb'. > >Basically what needs to happen you need to create a event box with >the image in it. Then on a mouse click, you then activate the menu. > In Mario Kemper's train of thought, see my Gtk2 StatusIcon Demo at: http://perlmonks.org?node_id=725925 It may solve all of your problems. peace and tranquility, zentara From v.velox@vvelox.net Sat Sep 25 13:11:36 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 942AB750A18 for ; Sat, 25 Sep 2010 13:11:36 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.513 X-Spam-Level: X-Spam-Status: No, score=-0.513 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, SPF_HELO_SOFTFAIL=0.732, SPF_SOFTFAIL=0.665, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xDX1pKzwrJhD for ; Sat, 25 Sep 2010 13:11:34 +0000 (UTC) Received: from vulpes.vvelox.net (sula-ki.vvelox.net [99.69.115.46]) by menubar.gnome.org (Postfix) with ESMTP id 5C657750959 for ; Sat, 25 Sep 2010 13:11:25 +0000 (UTC) Received: from vixen42.vulpes.vvelox.net (unknown [192.168.14.2]) (Authenticated sender: v.velox) by vulpes.vvelox.net (Postfix) with ESMTPA id 28B8FB836; Sat, 25 Sep 2010 08:12:21 -0500 (CDT) Date: Sat, 25 Sep 2010 08:13:24 -0500 From: "Zane C.B." To: Mario Kemper Subject: Re: tray icon drop down menus (solved) Message-ID: <20100925081324.46be5665@vixen42.vulpes.vvelox.net> In-Reply-To: <1285409427.4111.10.camel@mario-xps> References: <20100924092213.126283a0@vixen42.vulpes.vvelox.net> <1285339325.16149.1.camel@mario-xps> <20100924100406.5ad39dd5@vixen42.vulpes.vvelox.net> <20100925003923.5169d1b5@vixen42.vulpes.vvelox.net> <1285409427.4111.10.camel@mario-xps> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/W4qydlLDK7Rw3SfmaESB7hu"; protocol="application/pgp-signature" Cc: gtk-perl-list X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 13:11:36 -0000 --Sig_/W4qydlLDK7Rw3SfmaESB7hu Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 25 Sep 2010 12:10:27 +0200 Mario Kemper wrote: >=20 > > Basically what needs to happen you need to create a event box with > > the image in it. Then on a mouse click, you then activate the > > menu. > >=20 >=20 > Did you have a look at Gtk2::StatusIcon? There is no event box > needed. >=20 Awesome, thanks. Yeah, that is exactly what I was looking for. --Sig_/W4qydlLDK7Rw3SfmaESB7hu Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkyd9X8ACgkQqrJJy0yxYQCMfgCfaRG4F4taUGvX/mfPS9ue1omv y1oAn0z7qf/EwGH3nrx6IGnNP9eEAeFF =QaHF -----END PGP SIGNATURE----- --Sig_/W4qydlLDK7Rw3SfmaESB7hu-- From kaffeetisch@gmx.de Sat Sep 25 19:51:31 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6895775016E for ; Sat, 25 Sep 2010 19:51:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.738 X-Spam-Level: X-Spam-Status: No, score=-1.738 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A1uE1BBszeFK for ; Sat, 25 Sep 2010 19:51:06 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id CD4BE7500F4 for ; Sat, 25 Sep 2010 19:50:37 +0000 (UTC) Received: (qmail invoked by alias); 25 Sep 2010 19:50:35 -0000 Received: from d039006.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.39.6] by mail.gmx.net (mp071) with SMTP; 25 Sep 2010 21:50:35 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19xpRFxJphx5TrDNpUw60+A7sMwpKqYIU3oPYzJ// 90z439iuyjivEv Message-ID: <4C9E5289.4020505@gmx.de> Date: Sat, 25 Sep 2010 21:50:33 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: "enumeration value =?UTF-8?B?4oCYR0RLX0VWRU5UX0xBU1TigJkgbm90?= =?UTF-8?B?IGhhbmRsZWQgaW4gc3dpdGNoIiBtZXNzYWdl?= References: <902249.11237.qm@web112118.mail.gq1.yahoo.com> In-Reply-To: <902249.11237.qm@web112118.mail.gq1.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 19:51:31 -0000 On 22.09.2010 15:01, Sergei Steshenko wrote: > while building Gtk2-1.222 I've noticed the following: > > " > xs/GdkEvent.xs: In function ‘gtk2perl_gdk_event_set_state’: > xs/GdkEvent.xs:131: warning: enumeration value ‘GDK_EVENT_LAST’ not handled in switch > xs/GdkEvent.xs: In function ‘gtk2perl_gdk_event_set_time’: > xs/GdkEvent.xs:200: warning: enumeration value ‘GDK_EVENT_LAST’ not handled in switch > " It's harmless. GDK_EVENT_LAST does not correspond to a real event type (which we would need to handle in the bindings), but is just a helper value that marks the end of the C enumeration GdkEventType: . From kaffeetisch@gmx.de Sat Sep 25 19:55:32 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ADEC2750172 for ; Sat, 25 Sep 2010 19:55:32 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8F1Pjtn0R-Gg for ; Sat, 25 Sep 2010 19:55:30 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by menubar.gnome.org (Postfix) with SMTP id 3E7487500F4 for ; Sat, 25 Sep 2010 19:55:01 +0000 (UTC) Received: (qmail invoked by alias); 25 Sep 2010 19:54:59 -0000 Received: from d039006.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.39.6] by mail.gmx.net (mp008) with SMTP; 25 Sep 2010 21:54:59 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18cYyA5zjIcZ30zuKipqKTAYmKEG4cK4+NwisqcyZ XF0I+HfnN4yLPa Message-ID: <4C9E5392.80608@gmx.de> Date: Sat, 25 Sep 2010 21:54:58 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: "event->button.state = newstate = newstate; " - is it supposed to be so ? References: <800490.23972.qm@web112106.mail.gq1.yahoo.com> In-Reply-To: <800490.23972.qm@web112106.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 19:55:32 -0000 On 22.09.2010 15:41, Sergei Steshenko wrote: > 139 event->button.state = newstate = newstate; That does indeed look like a typo, and your suggested fix is correct. Fixed in git master. From kaffeetisch@gmx.de Sat Sep 25 20:01:06 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 16F3C7500F4 for ; Sat, 25 Sep 2010 20:01:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cxSdTo2ZeyDc for ; Sat, 25 Sep 2010 20:01:04 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by menubar.gnome.org (Postfix) with SMTP id 966BE75019C for ; Sat, 25 Sep 2010 20:00:35 +0000 (UTC) Received: (qmail invoked by alias); 25 Sep 2010 20:00:33 -0000 Received: from d039006.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.39.6] by mail.gmx.net (mp056) with SMTP; 25 Sep 2010 22:00:33 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18o+8BE9GYoC7Z+sPYPGavf0dmqCWqdrJMVyMgk9D 4FuHHPpIzaoUFT Message-ID: <4C9E54E0.1000201@gmx.de> Date: Sat, 25 Sep 2010 22:00:32 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gtk2::FileChooserDialog beahves erratically when files are updated in CWD References: <427204.10063.qm@web112106.mail.gq1.yahoo.com> In-Reply-To: <427204.10063.qm@web112106.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 20:01:06 -0000 On 22.09.2010 20:14, Sergei Steshenko wrote: > The problem is that essentially Gtk2::FileChooserDialog doesn't work when > a file is constantly updated in the chosen from Gtk2::FileChooserDialog > directory. I can't reproduce this problem with gtk+ 2.20.1 and 2.22.0 on Ubuntu. Which version and platform do you use? From sergstesh@yahoo.com Sat Sep 25 22:03:42 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DD7857500FD for ; Sat, 25 Sep 2010 22:03:42 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EIY0BjvJa3qL for ; Sat, 25 Sep 2010 22:03:41 +0000 (UTC) Received: from web112115.mail.gq1.yahoo.com (web112115.mail.gq1.yahoo.com [67.195.22.93]) by menubar.gnome.org (Postfix) with SMTP id D8A0E750072 for ; Sat, 25 Sep 2010 22:03:32 +0000 (UTC) Received: (qmail 30172 invoked by uid 60001); 25 Sep 2010 22:03:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285452210; bh=ZAn+dLFBke+833BLrIPYeB6vbpDN6oe6VKQVLMac/S0=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=eXBy2K+BbxhYhcRIIf6arz8saav0o1lF2qYk11neza8j/WlFTjONztU0NLIxrG4PMhag+mtPHBTphFyhEYt0BBJ0vsUjyNMpj3XVCe0m/isC7cjeee54kYvPgIpaG97wida6iWjYQXvcLYQE54gqqUw2tLCnENlSOjMmqkcwxqo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=dAYIosqunNtY64AWYfGVcwcRl9t+WWcUJ0z5QWg2YeF6uR9h99iq6iLunAwspI/xBaLvV/2vZSYvXT1+Q8fOXMgehxZUeIw3wJ/Gcog0/qgi2B7qPlP8xJ1jBXWjSAOshht6KtLPWgmgaJnBjVzLLH0egtEvvQ/CMQUot69hUrc=; Message-ID: <452851.29384.qm@web112115.mail.gq1.yahoo.com> X-YMail-OSG: YD.B2SQVM1mtqTKr7vdiX678tjEstLFo1IWJxee7jKqhsBi WwvpXDmCjWi6jwO0eo6wFHYp7Q7q_FcbhO9hGszXbQ4CjrH3XMoV6lh01sBX jjuyKtmQ0iGdaFDILC0X4IIhEHjQd8sRU.vQcpxGrHGIJ2KMETX_FO4fnQn5 DYjB9d4Bj8G284Ap1ZHfkHqYfRprn92GMjnwRccnsXtOo0DabhTNSpy7TnOY euGL8kxA1hQTGg8qayQnTXaSpjokGFQFUiMlqTO_5IWtxWdjBY60rMJlqt91 sVuLm7oRpYAnVMPbwCCHB9XeUDIuPbrJhAT3XeWWJAaICWQPsVe3aggCqGfe ZGn9q.zdAXFbbG5jX2xqwtpw- Received: from [87.69.49.127] by web112115.mail.gq1.yahoo.com via HTTP; Sat, 25 Sep 2010 15:03:29 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Sat, 25 Sep 2010 15:03:29 -0700 (PDT) From: Sergei Steshenko Subject: Re: Gtk2::FileChooserDialog beahves erratically when files are updated in CWD To: gtk-perl-list@gnome.org, Torsten Schoenfeld MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 22:03:43 -0000 --- On Sat, 9/25/10, Torsten Schoenfeld wrote: > From: Torsten Schoenfeld > Subject: Re: Gtk2::FileChooserDialog beahves erratically when files are updated in CWD > To: gtk-perl-list@gnome.org > Date: Saturday, September 25, 2010, 1:00 PM > On 22.09.2010 20:14, Sergei Steshenko > wrote: > > The problem is that essentially > Gtk2::FileChooserDialog doesn't work when > > a file is constantly updated in the chosen from > Gtk2::FileChooserDialog > > directory. > > I can't reproduce this problem with gtk+ 2.20.1 and 2.22.0 > on Ubuntu. Which version and platform do you use? > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > I have a self-built gtk+-2.20.1 stack on 32 bits Linux (SUSE-11.1). Again, there _must_ be file updates in the directory. I.e., say, create an infinite loop (in a different terminal) which, say, once per second (or more frequently) performs 'touch' on a file or a number of them. Or you did this ? In my case the constantly modified file was a log file of my application. I worked around the problem by storing the log file in a separate directory which is _not_ a subdirectory to be listed by Gtk2::FileChooserDialog - this "solved" the problem. Thanks, Sergei. From sergstesh@yahoo.com Sat Sep 25 22:08:00 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9BB2775024E for ; Sat, 25 Sep 2010 22:08:00 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.78 X-Spam-Level: X-Spam-Status: No, score=-1.78 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SARE_SUB_ENC_UTF8=0.152, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N0NWwpZnUmli for ; Sat, 25 Sep 2010 22:07:59 +0000 (UTC) Received: from web112104.mail.gq1.yahoo.com (web112104.mail.gq1.yahoo.com [67.195.23.91]) by menubar.gnome.org (Postfix) with SMTP id 78590750143 for ; Sat, 25 Sep 2010 22:06:28 +0000 (UTC) Received: (qmail 25152 invoked by uid 60001); 25 Sep 2010 22:06:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285452387; bh=6ragX09hiJEat/CCCTjzdVARmUP72yHC1FPR1jVR3io=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2g+3eRfAIHRSoeOJ0atcGAtU7ta6GjNf4Zt/gymQlKI+pwQp4jdHFapB1zouacui+hYsCRqlfGqNGow6SaFTdkzL1+keInMHjUIc7IgtwLFGb1Jg1rtUQqn2vIcQnTUfZsH6umpfF16lXTF1YNU9f7+teoIW/YLGo81IwETVNL4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ukt98ZVKC1+hWYm2rhVTi7Rn0C3pn70ebuG6tyCruxiZ7RPpiATXEHWAWUiuG+J9/H9JUhm2Xe0H1RvACBRe/KLyKhAKgwUeKXc0aKOubYD24HnpwoaJLY/RlPkf6zUImJLjQB43Je+6oWfK/PKr4CRjmLBjHMhPQyIaNNXijQA=; Message-ID: <265943.24025.qm@web112104.mail.gq1.yahoo.com> X-YMail-OSG: 2atu82QVM1m8oJTajBSDIWYWYPd6sx.t46PaoSUCRo2Rf3Y Psf0G6EUj58cKkk7.7uvoy6goBQzZ_Jvk_o2bf_is2JQDgg4BvlqugC0Wrq0 YVP70.J4mJ_Ugac5ycxGjStQ_uDNbjUSRNgKQ1e43gbWSEdf6TOWxG2uMNXC zoXoSjl2bzc8458xxchTJbCH948d1_dMHUDqk_2d.kqIfRxZAYoIwZjsCyOq UXDi.CrrFkNsui5ske4S5Y2vWYNndmEPtIFSZsAEBbiR5LLLN_FHtojKqjeA 3ehDO5CtJb4MV6zzubPd4m3wrDBra51ih6cL7RId3rVwLMO2HS3b4Ip91JNi oXeDLmisMxQr53ZZ8PzSomFE- Received: from [87.69.49.127] by web112104.mail.gq1.yahoo.com via HTTP; Sat, 25 Sep 2010 15:06:26 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Sat, 25 Sep 2010 15:06:26 -0700 (PDT) From: Sergei Steshenko Subject: =?utf-8?B?UmU6ICJlbnVtZXJhdGlvbiB2YWx1ZSDigJhHREtfRVZFTlRfTEFTVOKAmSBu?= =?utf-8?B?b3QgaGFuZGxlZCBpbiBzd2l0Y2giIG1lc3NhZ2U=?= To: gtk-perl-list@gnome.org, Torsten Schoenfeld In-Reply-To: <4C9E5289.4020505@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 22:08:01 -0000 =0A=0A--- On Sat, 9/25/10, Torsten Schoenfeld wrote:= =0A=0A> From: Torsten Schoenfeld =0A> Subject: Re: "enu= meration value =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled in switch" mess= age=0A> To: gtk-perl-list@gnome.org=0A> Date: Saturday, September 25, 2010,= 12:50 PM=0A> On 22.09.2010 15:01, Sergei Steshenko=0A> wrote:=0A> > while = building Gtk2-1.222 I've noticed the following:=0A> > =0A> > "=0A> > xs/Gdk= Event.xs: In function=0A> =E2=80=98gtk2perl_gdk_event_set_state=E2=80=99:= =0A> > xs/GdkEvent.xs:131: warning: enumeration value=0A> =E2=80=98GDK_EVEN= T_LAST=E2=80=99 not handled in switch=0A> > xs/GdkEvent.xs: In function=0A>= =E2=80=98gtk2perl_gdk_event_set_time=E2=80=99:=0A> > xs/GdkEvent.xs:200: w= arning: enumeration value=0A> =E2=80=98GDK_EVENT_LAST=E2=80=99 not handled = in switch=0A> > "=0A> =0A> It's harmless.=C2=A0 GDK_EVENT_LAST does not cor= respond to=0A> a real event type (which we would need to handle in the=0A> = bindings), but is just a helper value that marks the end of=0A> the C enume= ration GdkEventType: .=0A> _______________________________________________=0A>= gtk-perl-list mailing list=0A> gtk-perl-list@gnome.org=0A> http://mail.gno= me.org/mailman/listinfo/gtk-perl-list=0A> =0A=0AYep - I found the info afte= r sending the Email.=0A=0AI think gtk+ folks are not meticulous enough. The= y should have put=0AGDK_EVENT_LAST into the 'switch' statement with some ki= nd of=0A=0A"internal ERROR - should never happen !!!\n"=0A=0Amessage.=0A=0A= Thanks,=0A Sergei.=0A=0A=0A From kaffeetisch@gmx.de Sat Sep 25 22:20:11 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C8CF8750143 for ; Sat, 25 Sep 2010 22:20:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1zW6tuEw2W-M for ; Sat, 25 Sep 2010 22:20:09 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by menubar.gnome.org (Postfix) with SMTP id F25C9750072 for ; Sat, 25 Sep 2010 22:20:00 +0000 (UTC) Received: (qmail invoked by alias); 25 Sep 2010 22:19:58 -0000 Received: from d039006.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [80.171.39.6] by mail.gmx.net (mp055) with SMTP; 26 Sep 2010 00:19:58 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+3t90RRY23l1VC5zJ08cVCk5ND77uaFqhCD0pe97 pp2++W8MyvS48C Message-ID: <4C9E758D.5030709@gmx.de> Date: Sun, 26 Sep 2010 00:19:57 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gtk2::FileChooserDialog beahves erratically when files are updated in CWD References: <452851.29384.qm@web112115.mail.gq1.yahoo.com> In-Reply-To: <452851.29384.qm@web112115.mail.gq1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 22:20:12 -0000 On 26.09.2010 00:03, Sergei Steshenko wrote: > I have a self-built gtk+-2.20.1 stack on 32 bits Linux (SUSE-11.1). > > Again, there _must_ be file updates in the directory. I.e., say, create > an infinite loop (in a different terminal) which, say, once per second (or > more frequently) performs 'touch' on a file or a number of them. > > Or you did this ? Yeah, I did exactly this (and a few variations), without encountering any problems. The file chooser updated fine (it moved the modified file to the top), but was still usable normally. From gg@zip.com.au Sat Sep 25 22:24:39 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3F816750072 for ; Sat, 25 Sep 2010 22:24:39 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.89 X-Spam-Level: X-Spam-Status: No, score=-1.89 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, T_TVD_MIME_NO_HEADERS=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yKviv0Rxf5sk for ; Sat, 25 Sep 2010 22:24:32 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-8.pacific.net.au [61.8.2.231]) by menubar.gnome.org (Postfix) with ESMTP id 3A0AF750AFF for ; Sat, 25 Sep 2010 22:23:35 +0000 (UTC) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 5743929B136; Sun, 26 Sep 2010 08:23:32 +1000 (EST) Received: from blah.blah (ppp2FF9.dyn.pacific.net.au [61.8.47.249]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id A9EB527407; Sun, 26 Sep 2010 08:23:31 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1Ozd98-0002tk-Dk; Sun, 26 Sep 2010 08:23:06 +1000 From: Kevin Ryde To: Torsten Schoenfeld Subject: Re: builder on scalar properties Organization: Bah Humbug References: <87vd6bq2fp.fsf@blah.blah> <4C94E5E2.8040709@gmx.de> Mail-Copies-To: never Date: Sun, 26 Sep 2010 08:23:05 +1000 In-Reply-To: <4C94E5E2.8040709@gmx.de> (Torsten Schoenfeld's message of "Sat, 18 Sep 2010 18:16:34 +0200") Message-ID: <87ocbljwdy.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 22:24:40 -0000 --=-=-= Torsten Schoenfeld writes: > > actual values, and it only knows about the common value types. > I don't see any hooks to customize this process. Ah yeah. Could the docs have a cross reference for that, something like the following? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=GParamSpec.xs.scalar-buildable.diff diff --git a/GParamSpec.xs b/GParamSpec.xs index 5a189a3..f543f4c 100644 --- a/GParamSpec.xs +++ b/GParamSpec.xs @@ -556,6 +556,12 @@ param_spec (class, name, nick, blurb, package, flags) =for apidoc ParamSpec to be used for any generic perl scalar, including references to complex objects. + +Currently C cannot set object properties of this type +(there's no hooks for property value parsing, as of Gtk 2.20), so +prefer the builtin types if buildable support for an object matters. +A C of C can give an array of strings. A signal +handler callback can do most of what a coderef might. =cut GParamSpec* scalar (class, name, nick, blurb, flags) --=-=-= -- For lucky best wash, use Mr Sparkle. --=-=-=-- From sergstesh@yahoo.com Sat Sep 25 22:29:35 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0F8F47500FD for ; Sat, 25 Sep 2010 22:29:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.932 X-Spam-Level: X-Spam-Status: No, score=-1.932 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, TW_GT=0.077, T_RP_MATCHES_RCVD=-0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5vEAE5K4LEFA for ; Sat, 25 Sep 2010 22:29:32 +0000 (UTC) Received: from web112115.mail.gq1.yahoo.com (web112115.mail.gq1.yahoo.com [67.195.22.93]) by menubar.gnome.org (Postfix) with SMTP id 91ACB750072 for ; Sat, 25 Sep 2010 22:29:24 +0000 (UTC) Received: (qmail 43982 invoked by uid 60001); 25 Sep 2010 22:29:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285453763; bh=oXB7vkuALU+0s22gPeiVZEftWruflzajAvI6INF+e4E=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=FzNILBT0cGGYrBXFy9TKMtRLLvduExId075d6CfASvWHP9HnuAU61PQd5XhDAJyU/+ujQjgquVwF4ET8LnLIX721PByUBPcnIcRXFuZTd1P77Tyef8iAWGYZVu5k50fiNjUeOyDEqJr0LQHd008tedwn4uPD/ZFXXPi3TDjfilg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=OUhswNhVBWFuqXvUvmm2RkTpHAe5wqSj/B8IvnfYZNJpt+wt2NdjP/xfHo/W9oAduD54xBv18Svjk8uKWeGrFU8guA5tlAp+NTJAJLcYjQtZBWCLK6Lt3RxyHpersPOgtNKMMEhoEHWQnfbQqJP1WIk6sH2QMXr2+OJh2Ssb5o8=; Message-ID: <17547.38973.qm@web112115.mail.gq1.yahoo.com> X-YMail-OSG: pPN0wSEVM1lH7qcgPtoEozPLJ61R1bZ9Mt2P2vQq.ru4Bm9 UHCAx_vTVowufYEjnFn1R58MR_ihE3RUTBNurGbZ_sMXON2VPVHGL1BoWwAx ULBv013DLUxrFI9.gyWlEbOhazYISOMl_.RaJD1ScuJYIzkDGIZoW.Sc.CnJ xxiexplE6Xad.XOYjrN57pMcWBdzlAQhJCRRlmmVl25Ovc_GRq5HBmkeSzyR Amno.NH3WYMc4e7nNB.Aj0ZaipV3dFPF8AM3bxjKgJHNbmUgEOTMG22Jdnpe 0Uo7q.U_PPCUh1RkpSHz10QyzZlwn5zP1PDmzXIp0h7pEP_8NGUefe4E_FZ4 gS7iIFZkq4AQenk4DBioaIUg- Received: from [87.69.49.127] by web112115.mail.gq1.yahoo.com via HTTP; Sat, 25 Sep 2010 15:29:22 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.105.279950 Date: Sat, 25 Sep 2010 15:29:22 -0700 (PDT) From: Sergei Steshenko Subject: Re: Gtk2::FileChooserDialog beahves erratically when files are updated in CWD To: gtk-perl-list@gnome.org, Torsten Schoenfeld In-Reply-To: <4C9E758D.5030709@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2010 22:29:35 -0000 =0A=0A--- On Sat, 9/25/10, Torsten Schoenfeld wrote:= =0A=0A> From: Torsten Schoenfeld =0A> Subject: Re: Gtk2= ::FileChooserDialog beahves erratically when files are updated in CWD=0A> T= o: gtk-perl-list@gnome.org=0A> Date: Saturday, September 25, 2010, 3:19 PM= =0A> On 26.09.2010 00:03, Sergei Steshenko=0A> wrote:=0A> > I have a self-b= uilt gtk+-2.20.1 stack on 32 bits Linux=0A> (SUSE-11.1).=0A> >=0A> > Again,= there _must_ be file updates in the directory.=0A> I.e., say, create=0A> >= an infinite loop (in a different terminal) which, say,=0A> once per second= (or=0A> > more frequently) performs 'touch' on a file or a=0A> number of t= hem.=0A> >=0A> > Or you did this ?=0A> =0A> Yeah, I did exactly this (and a= few variations), without=0A> encountering =0A> any problems.=A0 The file c= hooser updated fine (it moved=0A> the modified file =0A> to the top), but w= as still usable normally.=0A> _____________________________________________= __=0A> gtk-perl-list mailing list=0A> gtk-perl-list@gnome.org=0A> http://ma= il.gnome.org/mailman/listinfo/gtk-perl-list=0A> =0A=0AWas the order of non-= modified files constant ? In my case it wasn't, i.e.=0Ait looked like unsta= ble sort. Also, order of _directories_ was affected.=0A=0ADid you have dire= ctories in the directory with file(s) being updated ?=0A=0AThanks,=0A Serg= ei.=0A=0A=0A From gg@zip.com.au Sun Sep 26 00:51:28 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DAD7575010B for ; Sun, 26 Sep 2010 00:51:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gTOAgHcMx5lA for ; Sun, 26 Sep 2010 00:51:25 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-8.pacific.net.au [61.8.2.231]) by menubar.gnome.org (Postfix) with ESMTP id CFA07750103 for ; Sun, 26 Sep 2010 00:51:16 +0000 (UTC) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id B1FDB29D209; Sun, 26 Sep 2010 10:51:13 +1000 (EST) Received: from blah.blah (ppp2FF9.dyn.pacific.net.au [61.8.47.249]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id D337B27405; Sun, 26 Sep 2010 10:51:11 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1OzfRs-0005Rp-M2; Sun, 26 Sep 2010 10:50:36 +1000 From: Kevin Ryde To: Torsten Schoenfeld Subject: Re: buildable vs plain objects Organization: Bah Humbug References: <871v8zrhd2.fsf@blah.blah> <4C94EA18.10009@gmx.de> Mail-Copies-To: never Date: Sun, 26 Sep 2010 10:50:35 +1000 In-Reply-To: <4C94EA18.10009@gmx.de> (Torsten Schoenfeld's message of "Sat, 18 Sep 2010 18:34:32 +0200") Message-ID: <87r5ghiazo.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: muppet , gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2010 00:51:29 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Torsten Schoenfeld writes: > > built-in introspection mechanisms to construct the thing. Ah yes, the g_module lookup thingie loading up classes out of the shared libraries. "It's not a security hole, it's a feature." :-) > Implementing GtkBuildable is only necessary if you want to customize > the construction, I think. Perhaps the docs could be chopped, rather radically, to something like below. Perhaps synopsis bit could show how ADD_CHILD lets you do interesting things with sub-objects, or in some way emphasise the good things Buildable can do or is needed for. DESCRIPTION The Gtk2::Buildable interface allows objects and widgets to have "" objects, special property settings, or extra custom tags i= n a Gtk2::Builder UI description (). The main user of the Gtk2::Buildable interface is Gtk2::Builder, so there should be very little need for applications to call any of the Gtk2::Buildable methods. So this documentation deals with implement= ing a buildable object. Gtk2::Builder already supports plain Glib::Object or Gtk2::Widget wi= th "" construction and and "" settings, so often the "Gtk2::Buildable" interface is not needed. The only thing to note is an object or widget implemented in Perl must be loaded before buildi= ng. OVERRIDING BUILDABLE INTERFACE METHODS The buildable interface can be added to a Perl code object or widget subclass by putting "Gtk2::Buildable" in the interfaces list and implementing the following methods. In current Gtk2-Perl the custom tags code doesn't chain up to any buildable interfaces in superclasses. This means for instance if you implement Gtk2::Buildable on a new widget subclass then you lose the and tags normally available from Gtk2::Widget. This will likely change in the future, probably by chaining up by default for unhandled tags, maybe with a way to ask deliberately not to chain. SET_NAME ($self, $name) =B7 $name (string) ... --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=GtkBuildable.xs.chop.diff diff --git a/xs/GtkBuildable.xs b/xs/GtkBuildable.xs index 416cd3b..17edf84 100644 --- a/xs/GtkBuildable.xs +++ b/xs/GtkBuildable.xs @@ -794,81 +794,29 @@ MODULE = Gtk2::Buildable PACKAGE = Gtk2::Buildable =head1 DESCRIPTION -In order to allow construction from a Gtk2::Builder UI description -(L), -an object must implement the Gtk2::Buildable interface. The interface -includes methods for setting names and properties of objects, parsing -custom tags, and constructing child objects. - -The Gtk2::Buildable interface is implemented by all widgets and many -of the non-widget objects that are provided by GTK+. The main user of -this interface is Gtk2::Builder, so there should be very little need for -applications to call any of the Gtk2::Buildable methods. - -So, instead of focusing on how to call the methods of a Gtk2::Buildable, -this documentation deals with implementing a buildable object. - -=head1 WIDGETS - -Since Gtk2::Widget implements the Gtk2::Buildable interface, all widgets -get buildability gratis. If your widget requires no special markup -syntax to express its configuration, and all properties can be handled -through the standard mechanisms, you can simply add the name of your -perl-derived Glib::Object types to the C tag in the builder UI -description. You don't even have to do anything special in your class -definition. For example, objects of this class: - - package My::Frame; - use Gtk2; - use Glib::Object::Subclass - Gtk2::Frame::, - properties => [ - Glib::ParamSpec->int ('foo', ...), - ], - ; - - ... - - 1; - -could be expressed in a builder definition file like this: - - - 15 - - -Notice that the '::' package separator has been replaced with '__' in the -C attribute; this is because the ':' character is not valid for -GType type names. The mapping from perl package names to GType names should, -in general, be as simple as transliterating the colons. - - -=head1 PLAIN OBJECTS - -Glib::Object does not implement Gtk2::Buildable by itself, so to get a -builder UI file to create your custom Glib::Object subtypes, you'll have -add the Gtk2::Buildable interface to your class's interfaces list. - - package My::Thing; - use Gtk2; # to get Gtk2::Buildable - use Glib::Object::Subclass - Glib::Object::, - interfaces => [ 'Gtk2::Buildable' ], - ... - ; - -Again, if you have no special requirements, then that should be all you need -to do. +The Gtk2::Buildable interface allows objects and widgets to have +C<< >> objects, special property settings, or extra custom +tags in a Gtk2::Builder UI description +(L). + +The main user of the Gtk2::Buildable interface is Gtk2::Builder, so +there should be very little need for applications to call any of the +Gtk2::Buildable methods. So this documentation deals with +implementing a buildable object. + +Gtk2::Builder already supports plain Glib::Object or Gtk2::Widget with +C<< >> construction and and C<< >> settings, so +often the C interface is not needed. The only thing +to note is an object or widget implemented in Perl must be loaded +before building. =head1 OVERRIDING BUILDABLE INTERFACE METHODS -In some cases, you need to override the default Buildable behavior. Maybe -your objects already store their names, or you need some special markup -tags to express configuration. In these cases, add the Gtk2::Buildable -interface to your object declaration, and implement the following methods -as necessary. +The buildable interface can be added to a Perl code object or widget +subclass by putting C in the interfaces list and +implementing the following methods. -Note that in the current implementation the custom tags code doesn't +In current Gtk2-Perl the custom tags code doesn't chain up to any buildable interfaces in superclasses. This means for instance if you implement Gtk2::Buildable on a new widget subclass then you lose the and tags normally --=-=-=-- From gg@zip.com.au Sun Sep 26 01:03:11 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 03ED975010B for ; Sun, 26 Sep 2010 01:03:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l78w1a3cZmWe for ; Sun, 26 Sep 2010 01:03:08 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-8.pacific.net.au [61.8.2.231]) by menubar.gnome.org (Postfix) with ESMTP id 5C51E750103 for ; Sun, 26 Sep 2010 01:03:00 +0000 (UTC) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 1854629D85E; Sun, 26 Sep 2010 11:02:58 +1000 (EST) Received: from blah.blah (ppp2FF9.dyn.pacific.net.au [61.8.47.249]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 3BEEE27408; Sun, 26 Sep 2010 11:02:57 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1Ozfdj-0005Ss-5M; Sun, 26 Sep 2010 11:02:51 +1000 From: Kevin Ryde To: Torsten Schoenfeld Subject: Re: subclass versus new_with_foo Organization: Bah Humbug References: <87y6bwdfgg.fsf@blah.blah> <4C9534D2.1040609@gmx.de> Mail-Copies-To: never Date: Sun, 26 Sep 2010 11:02:51 +1000 In-Reply-To: <4C9534D2.1040609@gmx.de> (Torsten Schoenfeld's message of "Sat, 18 Sep 2010 23:53:22 +0200") Message-ID: <87mxr5iaf8.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2010 01:03:11 -0000 Torsten Schoenfeld writes: > > What if gtk_text_view_new_with_buffer some day changes such that it is > not equivalent to this anymore? That'd be the danger, if new_with_buffer doesn't document what it actually does. The gtk_menu_item_new_with_label is probably an example of that, changing from explicit child creation to going through a label string property. Maybe it depends which is worse, a method like new_with_buffer() that doesn't work in as much as it doesn't make a "new" of your subclass, versus coding some assumptions about what such a method should do. I expect a lot of subclasses might be faced with that dilemma, if the wrappers could try to address it. I suppose it doesn't come up in C code since methods are not inherited. You don't have a my_subclass_new_with_buffer() unless you make one yourself. The perils of C to OOP mapping, eh. > What we could do, I guess, is to adjust the xsub for > gtk_text_view_new_with_buffer such that it re-bless()-es the created > object into the package name given as the first argument. That doesn't work for a proper GObject subclass does it? Enough for a perl class, but not for a new gtype. -- It is most gratifying that your enthusiasm for our planet continues unabated. As a token of our appreciation we hope you will enjoy the two thermonuclear missiles we have just sent to converge with your craft. To ensure ongoing quality of service your death may be monitored for training purposes. Thank you. From mario.kemper@googlemail.com Sun Sep 26 16:23:28 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5F608750084 for ; Sun, 26 Sep 2010 16:23:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cP2Amwg8-YTu for ; Sun, 26 Sep 2010 16:23:23 +0000 (UTC) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by menubar.gnome.org (Postfix) with ESMTP id DAB3B750C0C for ; Sun, 26 Sep 2010 16:23:08 +0000 (UTC) Received: by bwz15 with SMTP id 15so4734233bwz.27 for ; Sun, 26 Sep 2010 09:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=IE6p/0H4pnSuy03gJUbAm/UG8a8aiK/Ut7lVY+ZZF00=; b=XV8aZxKdqwuSvaC3Mzb3TB7DFU2nVRilqiMJXdskxEAY8T/aYW3CNqM4Y3E064htJn M39l2OUw3Q6h72fL2dJrF1TG7pXlJirMLh8anUciRTYSsCTGMf8N8/JQ0FusPsmsyb5I jaovLaMJngZ2PghNhlzyInx5VSeuH8hpoogio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=cNbqh0fPllkmLHV/PrpFDrxOHkRpeVMnOynWzDrCvWzQADIPKZ1Sas6anmF3Pm3VNf djjyhqz3TPxl1UkW93cCWAVEQI3gvPI9GIEj9OtEq0DOGwvRDVavMi5NTVDR06ewTKpj eNe1eXEJpZanXpo6YlcFi2EeDDrJLcXySH0oQ= Received: by 10.204.133.91 with SMTP id e27mr4152662bkt.197.1285518186112; Sun, 26 Sep 2010 09:23:06 -0700 (PDT) Received: from [192.168.2.104] (p5DE86D12.dip.t-dialin.net [93.232.109.18]) by mx.google.com with ESMTPS id x19sm3514640bkv.9.2010.09.26.09.23.04 (version=SSLv3 cipher=RC4-MD5); Sun, 26 Sep 2010 09:23:04 -0700 (PDT) Subject: gdk-pixbuf-set-option missing? From: Mario Kemper To: "gtk-perl-list@gnome.org" Content-Type: text/plain; charset="UTF-8" Date: Sun, 26 Sep 2010 18:23:03 +0200 Message-ID: <1285518183.4111.16.camel@mario-xps> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2010 16:23:28 -0000 Is this method already covered by the bindings? http://library.gnome.org/devel/gdk-pixbuf/stable/gdk-pixbuf-Module-Interface.html#gdk-pixbuf-set-option I want include the "orientation"-flag when saving jpeg files. Is there any way to do this with current bindings? $pixbuf->get_option('orientation') works fine, btw. Including text chunks when saving png files does work as well, like this: $pixbuf->save( $filename, $filetype, "tEXt::Software" => "MySoftware", compression => $compression ); Anyone knows how to save the orientation flag? Regards Mario From kaffeetisch@gmx.de Sun Sep 26 17:06:44 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 86701750306 for ; Sun, 26 Sep 2010 17:06:44 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.813 X-Spam-Level: X-Spam-Status: No, score=-1.813 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, TW_GD=0.077, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mJaeAewS1k0h for ; Sun, 26 Sep 2010 17:06:41 +0000 (UTC) Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by menubar.gnome.org (Postfix) with SMTP id 6B3A67502B9 for ; Sun, 26 Sep 2010 17:06:31 +0000 (UTC) Received: (qmail invoked by alias); 26 Sep 2010 17:06:29 -0000 Received: from c162113.adsl.hansenet.de (EHLO home.hcsiteeffak.de) [213.39.162.113] by mail.gmx.net (mp066) with SMTP; 26 Sep 2010 19:06:29 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/CcaRmOF7CxdjE00sNtwif8dZ/Hx5LlG541NvSPd GExOcIKqtpJ24/ Message-ID: <4C9F7D95.2000400@gmx.de> Date: Sun, 26 Sep 2010 19:06:29 +0200 From: Torsten Schoenfeld User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100920 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: gdk-pixbuf-set-option missing? References: <1285518183.4111.16.camel@mario-xps> In-Reply-To: <1285518183.4111.16.camel@mario-xps> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2010 17:06:44 -0000 On 26.09.2010 18:23, Mario Kemper wrote: > Is this method already covered by the bindings? > http://library.gnome.org/devel/gdk-pixbuf/stable/gdk-pixbuf-Module-Interface.html#gdk-pixbuf-set-option It's not wrapped because gdk_pixbuf_set_option is not part of the public API, but rather only available to backends (in C lingo, those who define GDK_PIXBUF_ENABLE_BACKEND during compilation). That said, I definitely see how it can be useful and legitimate to use in normal applications. So, should we just wrap it anyway? From eexp01@gmail.com Mon Sep 27 05:06:02 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D29E975008A for ; Mon, 27 Sep 2010 05:06:02 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.437 X-Spam-Level: X-Spam-Status: No, score=-0.437 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=no Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SCbjpry5wT3t for ; Mon, 27 Sep 2010 05:06:01 +0000 (UTC) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by menubar.gnome.org (Postfix) with ESMTP id 55EF275004D for ; Mon, 27 Sep 2010 05:05:52 +0000 (UTC) Received: by pwi8 with SMTP id 8so1702352pwi.27 for ; Sun, 26 Sep 2010 22:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:to:date:subject :mime-version:content-transfer-encoding:from:message-id:user-agent; bh=TGsQi7Wdwb/2haxPxrTmA8zTrQT+THxXcnz+gjXdv6I=; b=hoNTqOHqe5NHpCH+4qXW1FjhHm6GH1Jl2zn8ZRRLdLhASUAt8GT8njs39WOtFcGYdf +TccRB0rbo74irgJ/TcmLvwV/1Gm22FVxiReEeY87+Cn4IcBNK9yavfkFpW0iiWxfXSc eKDacXqZnnm45ugP2yuf4IS1wwmg7rr1BWW4E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:to:date:subject:mime-version:content-transfer-encoding :from:message-id:user-agent; b=PDsGZJUUrQMX5P11s1jL/tX4PM+s/9RJqO9Xl7vP34oEX2NzYfqA9daG63KtKAaH6A Jk9AmyNvlXmVPtDV6V0h82TXEYYDjwGooEX3AmfnDTDFMttcCWyKmMedZx54NhxNra2P rW9e3m08CuTEvL/3p3LL1C8e/A/wzVJmUJ4pE= Received: by 10.114.110.2 with SMTP id i2mr7638899wac.142.1285563951380; Sun, 26 Sep 2010 22:05:51 -0700 (PDT) Received: from eexp-laptop ([58.20.51.237]) by mx.google.com with ESMTPS id 33sm9737327wad.18.2010.09.26.22.05.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 26 Sep 2010 22:05:49 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: gtk-perl-list@gnome.org Date: Mon, 27 Sep 2010 13:05:43 +0800 Subject: how to drop pic file on a Gtk::Image MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: eexpress Message-ID: User-Agent: Opera Mail/10.70 (Linux) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 05:06:03 -0000 I use libglade. but can not found any example about this. From gg@zip.com.au Wed Sep 29 22:04:49 2010 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1C0AD75011B for ; Wed, 29 Sep 2010 22:04:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.813 X-Spam-Level: X-Spam-Status: No, score=-1.813 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, TW_GD=0.077, T_TVD_MIME_NO_HEADERS=0.01] autolearn=ham Received: from menubar.gnome.org ([127.0.0.1]) by localhost (menubar.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V+cS7xRmeVjL for ; Wed, 29 Sep 2010 22:04:45 +0000 (UTC) Received: from mailout2.pacific.net.au (mailout2-2.pacific.net.au [61.8.2.225]) by menubar.gnome.org (Postfix) with ESMTP id 0F39675002F for ; Wed, 29 Sep 2010 22:04:36 +0000 (UTC) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id EF70C29B528; Thu, 30 Sep 2010 08:04:33 +1000 (EST) Received: from blah.blah (ppp2E3B.dyn.pacific.net.au [61.8.46.59]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 6F80427403; Thu, 30 Sep 2010 08:04:25 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1P14kC-0002Fa-Ai; Thu, 30 Sep 2010 08:03:20 +1000 From: Kevin Ryde To: Torsten Schoenfeld Subject: Re: gdk-pixbuf-set-option missing? Organization: Bah Humbug References: <1285518183.4111.16.camel@mario-xps> <4C9F7D95.2000400@gmx.de> Mail-Copies-To: never Date: Thu, 30 Sep 2010 08:03:20 +1000 In-Reply-To: <4C9F7D95.2000400@gmx.de> (Torsten Schoenfeld's message of "Sun, 26 Sep 2010 19:06:29 +0200") Message-ID: <87zkv0ryvr.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 22:04:49 -0000 --=-=-= Torsten Schoenfeld writes: > > gdk_pixbuf_set_option I though of using that too, so as to hold xpm "x_hot" and "y_hot" values in the same place they'd come back from the loader. Couple of lines below. > not part of the public API, but rather only available to backends Hard to tell how non-public it's meant to be. You'd think a set() corresponding to a get() would be fairly reasonable. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=GdkPixbuf.xs.set-option.diff diff --git a/xs/GdkPixbuf.xs b/xs/GdkPixbuf.xs index 8f470b1..45be7af 100644 --- a/xs/GdkPixbuf.xs +++ b/xs/GdkPixbuf.xs @@ -19,6 +19,7 @@ * $Id$ */ +#define GDK_PIXBUF_ENABLE_BACKEND 1 /* for gdk_pixbuf_set_option() prototype */ #include "gtk2perl.h" static void @@ -992,6 +993,15 @@ gdk_pixbuf_get_formats (class=NULL) g_slist_free (formats); PERL_UNUSED_VAR (ax); +## gdk_pixbuf_set_option() is a "back end" function, supposedly not +## protected by the same interface guarantees as other things. +## +## gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf, const gchar *key, const gchar *value); +gboolean gdk_pixbuf_set_option (pixbuf, key, value) + GdkPixbuf *pixbuf + const gchar *key + const gchar *value + #endif /* >= 2.2.0 */ #if GTK_CHECK_VERSION(2,4,0) --=-=-= -- The Bachelor is someone, married or not, who does not in his or her heart entirely understand why you would take a pizza out of a perfectly sound takeaway box and put it on a nice clean plate. (Darrel Bristow-Bovey) --=-=-=--