From deadpickle@gmail.com Sun Jun 1 06:02:15 2008 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 069D9750163 for ; Sun, 1 Jun 2008 06:02:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.109 X-Spam-Level: X-Spam-Status: No, score=-1.109 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7805 hrs), (distance 13, link: (Google 2)), [209.85.146.183] 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 o+PTHhOWqRZO for ; Sun, 1 Jun 2008 06:02:09 +0000 (GMT) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by menubar.gnome.org (Postfix) with ESMTP id BAC4F750114 for ; Sun, 1 Jun 2008 06:02:09 +0000 (GMT) Received: by wa-out-1112.google.com with SMTP id j40so255332wah.1 for ; Sat, 31 May 2008 23:02:08 -0700 (PDT) Received: by 10.114.106.1 with SMTP id e1mr6226410wac.85.1212300128051; Sat, 31 May 2008 23:02:08 -0700 (PDT) Received: by 10.114.170.20 with HTTP; Sat, 31 May 2008 23:02:08 -0700 (PDT) Message-ID: Date: Sun, 1 Jun 2008 01:02:08 -0500 From: "Jamie Lahowetz" Sender: deadpickle@gmail.com To: gtk-perl-list@gnome.org Subject: Drawing lines on Gnome2::Canvas MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21348_16369524.1212300128059" X-Google-Sender-Auth: 2f8e1a2c9aabbddf X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 06:02:15 -0000 ------=_Part_21348_16369524.1212300128059 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dont know if this fits this mailing list so I apologize if it doesnt. I'm trying to draw lines on a Gnome2::Canvas widget but the man page I found for Gnome2::Canvas::Line does not tell me much on how to do this. I was wondering if anyone has an example on how to draw a simple line from one point to another in Gnome2::Canvas? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu ------=_Part_21348_16369524.1212300128059 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dont know if this fits this mailing list so I apologize if it doesnt. I'm trying to draw lines on a Gnome2::Canvas widget but the man page I found for Gnome2::Canvas::Line does not tell me much on how to do this. I was wondering if anyone has an example on how to draw a simple line from one point to another in Gnome2::Canvas?

--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu ------=_Part_21348_16369524.1212300128059-- From pagaltzis@gmx.de Sun Jun 1 07:04:36 2008 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 C2FBD7502C3 for ; Sun, 1 Jun 2008 07:04:36 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.185 X-Spam-Level: X-Spam-Status: No, score=-0.185 tagged_above=-999 required=2 tests=[BAYES_40=-0.185] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 427 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 teOcnUoi2a77 for ; Sun, 1 Jun 2008 07:04:29 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id EFDBE7501A3 for ; Sun, 1 Jun 2008 07:04:28 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 07:04:26 -0000 Received: from static-87-79-236-202.netcologne.de (EHLO klangraum) [87.79.236.202] by mail.gmx.net (mp032) with SMTP; 01 Jun 2008 09:04:26 +0200 X-Authenticated: #163624 X-Provags-ID: V01U2FsdGVkX19IA/8BoQ1IixL3m+0P1QVVU1RKuZ8f1L0IGy4eZQ coF5VNvOXW0cRi Date: Sun, 1 Jun 2008 09:04:25 +0200 From: Aristotle Pagaltzis To: gtk-perl-list@gnome.org Subject: Re: Putting text with links in a TreeView Message-ID: <20080601070425.GL22427@klangraum.plasmasturm.org> Mail-Followup-To: gtk-perl-list@gnome.org References: <20080527082238.GB3407@klangraum.plasmasturm.org> <20080531004458.GG22427@klangraum.plasmasturm.org> <4D33DD34-5182-4B4F-A19B-8FF699695DF5@asofyet.org> <20080531030101.GI22427@klangraum.plasmasturm.org> <484142E4.4050404@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <484142E4.4050404@gmx.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 07:04:37 -0000 * Torsten Schoenfeld [2008-05-31 14:25]: > Making text blue and underlined is no problem, I assume. Of course not. > I think you will have to use motion notify events: […] This > [example code] will make the whole cell clickable. Yeah, but that’s not worth much, as I can already do that in simpler ways with the interface that the TreeView and ListStore give me out of the box. > There might be a way to only make the text inside the cell > clickable via $cell_x and $cell_y, but I don't know how offhand > -- I assume this won't be possible without a custom cell > renderer, though. More specifically it’s not just “the text inside the cell” I am interested in – it is the *portions* of the text that look like a link. (And then each such portion individually.) So I guess what you are saying amounts to telling me that I need to find out how SexyUrlLabel does it and then duplicate that logic within a custom cell renderer. I feared that this would be the answer. Oh well. Regards, -- Aristotle Pagaltzis // From elspicyjack@gmail.com Sun Jun 1 07:56:00 2008 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 00040750149 for ; Sun, 1 Jun 2008 07:55:59 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 1974 hrs), (distance 13, link: (Google 2)), [209.85.198.229] 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 GLftdK+s9XBb for ; Sun, 1 Jun 2008 07:55:53 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.229]) by menubar.gnome.org (Postfix) with ESMTP id D23067500A2 for ; Sun, 1 Jun 2008 07:55:52 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so477142rvb.3 for ; Sun, 01 Jun 2008 00:55:51 -0700 (PDT) Received: by 10.115.106.7 with SMTP id i7mr2686072wam.131.1212306951316; Sun, 01 Jun 2008 00:55:51 -0700 (PDT) Received: by 10.114.123.11 with HTTP; Sun, 1 Jun 2008 00:55:51 -0700 (PDT) Message-ID: Date: Sun, 1 Jun 2008 00:55:51 -0700 From: "spicy jack" To: "Jamie Lahowetz" Subject: Re: Drawing lines on Gnome2::Canvas In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 07:56:00 -0000 2008/5/31 Jamie Lahowetz : > Dont know if this fits this mailing list so I apologize if it doesnt. I'm > trying to draw lines on a Gnome2::Canvas widget but the man page I found for > Gnome2::Canvas::Line does not tell me much on how to do this. I was > wondering if anyone has an example on how to draw a simple line from one > point to another in Gnome2::Canvas? The Gnome2::Canvas tarball comes with examples. Look for a script called 'canvas.pl' and run it to run the Gnome2::Canvas demo. Here's a few lines from canvas-primitives.pl, one of the scripts in the examples directory: Gnome2::Canvas::Item->new ($group, 'Gnome2::Canvas::Line', points => [400.0, 0.0, 400.0, 450.0], fill_color => 'black', width_units => 4.0); From adamkennedybackup@gmail.com Sun Jun 1 01:44:22 2008 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 A335575018B for ; Sun, 1 Jun 2008 01:44:22 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 1913 hrs), (distance 13, link: (Google 2)), [209.85.198.239] 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 w-hVR10J3Ftd for ; Sun, 1 Jun 2008 01:43:54 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.239]) by menubar.gnome.org (Postfix) with ESMTP id 693857501F6 for ; Sun, 1 Jun 2008 01:43:54 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so413879rvb.3 for ; Sat, 31 May 2008 18:43:53 -0700 (PDT) Received: by 10.141.172.6 with SMTP id z6mr4043736rvo.91.1212284632953; Sat, 31 May 2008 18:43:52 -0700 (PDT) Received: from ?10.20.105.192? ( [203.23.60.6]) by mx.google.com with ESMTPS id c20sm2484813rvf.1.2008.05.31.18.43.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 May 2008 18:43:52 -0700 (PDT) Message-ID: <4841FDA8.2080606@cpan.org> Date: Sun, 01 Jun 2008 11:38:48 +1000 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: nadim khemir Subject: Re: Release: Camelbox 2008.120.0145Z References: <481AB0F1.5080606@cpan.org> <200805311012.31348.nadim@khemir.net> In-Reply-To: <200805311012.31348.nadim@khemir.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: Adam Kennedy X-Mailman-Approved-At: Sun, 01 Jun 2008 11:22:39 +0000 Cc: camelbox@googlegroups.com, gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 01:44:22 -0000 nadim khemir wrote: > It would be really cool if you and Adam could agree on a way of working so > people wouldn't have to install two installations of perl. Both of you seemed > happy with yourselves and not really wanting to do anything to change the > status quo. It is understandable but I believe both distribution suffer from > that. I though I'd wait a bit to see if anyone makes a move before I start > haunting you again ;) > Change the status quo? I, for one, intend to make the very existence of camelbox superfluous by making the reason for it neededing to exist go away. I'm just not in a great hurry to do so. Strawberry has a release cycle, and I intend to stick to that release cycle. Problems that can be solved in that time frame will be solved, those that can't will not. Currently, GTK is not a problem anyone has apparently wanted solved enough to do the work required to generate the appropriate packages for Strawberry (or Chocolate) Perl. This is not something that will necessarily remain the case. In the mean time, camelbox does a far better job of zero'ing in one that one specific problem area. I'm quite happy with the situation where Strawberry acts as a stable and standard distribution, with more experimental distributions coming into existence, solving problems, and then slowly being absorbed. But I'm not going to do so in a way that compromises the ease of use or ease of installation of Strawberry. So it's less a case of status quo, and more a case of not moving fast enough that you can notice it. Adam K From kaffeetisch@gmx.de Sun Jun 1 12:15:30 2008 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 C55E9750072 for ; Sun, 1 Jun 2008 12:15:30 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.445 X-Spam-Level: X-Spam-Status: No, score=-2.445 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077, TW_XS=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 432 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 YGWibUYca1Lf for ; Sun, 1 Jun 2008 12:15:25 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id EE60C750173 for ; Sun, 1 Jun 2008 12:15:24 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 12:15:22 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp012) with SMTP; 01 Jun 2008 14:15:22 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19g1jU7ARRgVttvytIBgV0hJ6N2aXUTlIkSqB8W/t nANieV/hn0nMUY Message-ID: <484292DA.5080200@gmx.de> Date: Sun, 01 Jun 2008 14:15:22 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: gtk adjust docs on emit References: <87skvz5ohi.fsf@blah.blah> In-Reply-To: <87skvz5ohi.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------020806040703020107010700" X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 12:15:31 -0000 This is a multi-part message in MIME format. --------------020806040703020107010700 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Kevin Ryde wrote: > I thought a remark like below might be good for the GtkAdjustment field > accessors, though I couldn't tell how to get it coming out right with > the xsdoc stuff ... Looks good. To achieve what I think you wanted, we need to tell the doc parser to not generate POD for the accessors. Committed as attached. Thanks! -- Bye, -Torsten --------------020806040703020107010700 Content-Type: text/x-diff; name="adjustment-doc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="adjustment-doc.patch" Index: xs/GtkAdjustment.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkAdjustment.xs,v retrieving revision 1.9 diff -u -d -p -r1.9 GtkAdjustment.xs --- xs/GtkAdjustment.xs 26 Feb 2004 00:57:54 -0000 1.9 +++ xs/GtkAdjustment.xs 1 Jun 2008 12:15:06 -0000 @@ -23,6 +23,47 @@ MODULE = Gtk2::Adjustment PACKAGE = Gtk2::Adjustment PREFIX = gtk_adjustment_ +=for apidoc Gtk2::Adjustment::value +=for signature double = $adjustment->value +=for signature double = $adjustment->value ($newval) +=for signature double = $adjustment->lower +=for signature double = $adjustment->lower ($newval) +=for signature double = $adjustment->upper +=for signature double = $adjustment->upper ($newval) +=for signature double = $adjustment->step_increment +=for signature double = $adjustment->step_increment ($newval) +=for signature double = $adjustment->page_increment +=for signature double = $adjustment->page_increment ($newval) +=for signature double = $adjustment->page_size +=for signature double = $adjustment->page_size ($newval) + +Get or set the six fields of a Gtk2::Adjustment. + +The setter functions store $newval and return the old value. Note +that they don't emit any signals; it's up to you to emit "notify" +(because the fields are also properties) and "changed" or +"value-changed", when you're ready. + +=cut + +=for apidoc value __hide__ +=cut + +=for apidoc lower __hide__ +=cut + +=for apidoc upper __hide__ +=cut + +=for apidoc step_increment __hide__ +=cut + +=for apidoc page_increment __hide__ +=cut + +=for apidoc page_size __hide__ +=cut + gdouble value (GtkAdjustment *adjustment, gdouble newval = 0) ALIAS: --------------020806040703020107010700-- From kaffeetisch@gmx.de Sun Jun 1 12:43:15 2008 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 0486175007C for ; Sun, 1 Jun 2008 12:43:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 11855 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 EGAd7kD-yUam for ; Sun, 1 Jun 2008 12:43:09 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id B679675011C for ; Sun, 1 Jun 2008 12:43:08 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 12:43:06 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp016) with SMTP; 01 Jun 2008 14:43:06 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+qhwlLgayqh449VI8i6928AdkA0EfrDsKwSRMPmv hGyr/kZKHm92VB Message-ID: <4842995A.7050500@gmx.de> Date: Sun, 01 Jun 2008 14:43:06 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: grab event further fields References: <87wslb5onl.fsf@blah.blah> In-Reply-To: <87wslb5onl.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 12:43:15 -0000 Kevin Ryde wrote: > I noticed GdkEventGrabBroken has "implicit" and "grab_window" fields > without accessor methods. Looks good. Some comments: - if (items == 2 && newvalue != RETVAL) + if (items == 2) What's your motivation for that change? The check isn't all that meaningful, but that's what all other accessors do. +=for apidoc Gtk2::Gdk::Event::GrabBroken::grab_window +... +=cut If you attach the POD paragraphs directly to an xsub (no blank line between "=cut" and the start of the xsub), then the doc generator automatically associates this paragraph with the xsub. Thus, you can just use "=for apidoc". Committed. Thanks! -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 1 12:50:24 2008 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 C99D275007C for ; Sun, 1 Jun 2008 12:50:24 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_EG=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 11855 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 yNo-OJsPxtso for ; Sun, 1 Jun 2008 12:50:19 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 69A75750184 for ; Sun, 1 Jun 2008 12:50:18 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 12:50:16 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp007) with SMTP; 01 Jun 2008 14:50:16 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/dAo58h6TdWp5oIxLKRbqk+NcvV2lfyePU8rg6Z8 AAKLfQxKk4aXPq Message-ID: <48429B08.6060104@gmx.de> Date: Sun, 01 Jun 2008 14:50:16 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: segv on mistaken bless References: <871w3j73ij.fsf@blah.blah> In-Reply-To: <871w3j73ij.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------010001000203070609050605" X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 12:50:25 -0000 This is a multi-part message in MIME format. --------------010001000203070609050605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Kevin Ryde wrote: > It'd be nice if the code noticed that, but I couldn't tell if it'd be > the signal_emit xsub or gperl_get_object_check which might check for a > missing mg_find. Do some uses of gperl_get_object_check expect to get > back NULL for undef? No, I think gperl_get_object_check is meant to either croak or return a valid object. So what about the attached patch? -- Bye, -Torsten --------------010001000203070609050605 Content-Type: text/x-diff; name="check-magic.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="check-magic.patch" Index: GObject.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/GObject.xs,v retrieving revision 1.74 diff -u -d -p -r1.74 GObject.xs --- GObject.xs 8 Jan 2008 05:58:56 -0000 1.74 +++ GObject.xs 1 Jun 2008 12:48:24 -0000 @@ -824,6 +824,10 @@ gperl_get_object_check (SV * sv, croak ("%s is not of type %s", gperl_format_variable_for_output (sv), package); + if (!mg_find (SvRV (sv), PERL_MAGIC_ext)) + croak ("%s is not a proper Glib::Object " + "(it doesn't contain magic)", + gperl_format_variable_for_output (sv)); return gperl_get_object (sv); } --------------010001000203070609050605-- From kaffeetisch@gmx.de Sun Jun 1 13:18:29 2008 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 4468D7500A2 for ; Sun, 1 Jun 2008 13:18:29 +0000 (GMT) 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_05=-1.11] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 433 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 WdQ1++-dk4FO for ; Sun, 1 Jun 2008 13:18:23 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id F064D75007C for ; Sun, 1 Jun 2008 13:18:22 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 13:18:21 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp032) with SMTP; 01 Jun 2008 15:18:21 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX194Cq9g4Ld4Fj5RE4FK8zzM2vIuV8BMcxcMxUTTEY SpnB27fTF8sZsd Message-ID: <4842A19D.1050805@gmx.de> Date: Sun, 01 Jun 2008 15:18:21 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: GtkGC shared auto-release References: <87ejdsq23d.fsf@blah.blah> <1197483017.5256.6.camel@home.hcsiteeffak.de> <87ve6rfxxz.fsf@blah.blah> <1198344013.5284.20.camel@home.hcsiteeffak.de> <1200353298.5304.20.camel@home.hcsiteeffak.de> <35F31F4D-25B2-47DC-956D-079061DBF6CF@asofyet.org> <87abn6ssvr.fsf@blah.blah> <40394.192.146.101.70.1200436197.squirrel@webmail.asofyet.org> <98D5DCBC-469F-452A-BA7A-60ADCCCF6663@asofyet.org> <87iqwzdxui.fsf@blah.blah> In-Reply-To: <87iqwzdxui.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 13:18:29 -0000 Kevin Ryde wrote: >> Did this patch never get applied? > Don't think so. I just committed muppet's patch with the "static" fix. > I'd suggested hanging the release in the plain Gtk2::Gdk::GC > destruction, rather than a subclass. Not terribly encapsulated, but > would mean a plain Gtk2::Gdk::GC the same as at the C level, instead of > a new subclass. What's the problem with a new subclass? Since Gtk2::GC inherits from Gtk2::Gdk::GC, code that expects a Gtk2::Gdk::GC should continue to work just fine when given a Gtk2::GC. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 1 13:22:59 2008 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 22E88750124 for ; Sun, 1 Jun 2008 13:22:59 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 433 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 KIxl8C4FDnWs for ; Sun, 1 Jun 2008 13:22:53 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 4F90275007C for ; Sun, 1 Jun 2008 13:22:52 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 13:22:50 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp013) with SMTP; 01 Jun 2008 15:22:50 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+YfrI2EQKYGmcvXn8tVQRtb1tNBTPLoTqHgGa/0d F0MNyhSARQcEM8 Message-ID: <4842A2AA.10505@gmx.de> Date: Sun, 01 Jun 2008 15:22:50 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Label and url link to webpage. References: <483AFC6D.8050304@interia.pl> <87mymbe55g.fsf@blah.blah> In-Reply-To: <87mymbe55g.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 13:22:59 -0000 Kevin Ryde wrote: >> Gtk2::LinkButton->set_uri_hook (sub { >> my ($button, $uri) = @_; >> system "gnome-open '$uri' &"; > > I guess there's the gnome library call too. That would be Gnome2::URL->show ($uri). Very recently, gtk_show_uri was introduced as a replacement. It's not yet wrapped by the bindings. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 1 13:32:42 2008 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 380737501C4 for ; Sun, 1 Jun 2008 13:32:42 +0000 (GMT) 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_05=-1.11] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 434 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 wiSbgvIEoosU for ; Sun, 1 Jun 2008 13:32:34 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 0439375034E for ; Sun, 1 Jun 2008 13:32:24 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 13:32:22 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp021) with SMTP; 01 Jun 2008 15:32:22 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+Jwy8ofaaJM38ZLeOZknrPViz28KlAUsiTCx7j1i As2dmcticz+MXc Message-ID: <4842A4E7.5030201@gmx.de> Date: Sun, 01 Jun 2008 15:32:23 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: g_strerror References: <87wslxwwia.fsf@blah.blah> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 13:32:42 -0000 muppet wrote: > So, the proposed API (bound as functions) would be: > > my $error_description = Glib::strerror ($!); > my $signal_description = Glib::strsignal ($signo); > > which are basically easier to remember than the equivalent Encode > incantations. > > Anybody have any objections? Not me, and apparently nobody else. Committed. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 1 13:39:15 2008 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 66D967501DB for ; Sun, 1 Jun 2008 13:39:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_HW=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 434 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 Mh8sEjhHN-yU for ; Sun, 1 Jun 2008 13:38:46 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id E168E750184 for ; Sun, 1 Jun 2008 13:38:45 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 13:38:42 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp025) with SMTP; 01 Jun 2008 15:38:43 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+rvl9q3n+rbsxVEGBZHIhKCz296itvSqFgVKoO+R XGZcDX4HN0yy3n Message-ID: <4842A662.3070301@gmx.de> Date: Sun, 01 Jun 2008 15:38:42 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: hwnd on win32 References: <482D3BF1.1050802@phreaker.net> <4835EBCA.8060609@gmx.de> <48367F4F.7070706@phreaker.net> In-Reply-To: <48367F4F.7070706@phreaker.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 13:39:15 -0000 T.J. Ferraro wrote: > I tried the following in a separate file GdkWin32.xs and instructed > Makefile.PL to add this file to the xs list if the platform was win32. > It compiles, but neither get_handle or gdk_win32_drawable_get_handle > appear as a Gtk2::Gdk::Drawable method... > > #include "gtk2perl.h" > #include > > MODULE = Gtk2::Gdk::Win32 PACKAGE = Gtk2::Gdk::Drawable PREFIX = > gdk_win32_drawable_ > > ## HGDIOBJ gdk_win32_drawable_get_handle (GdkDrawable *drawable) > gpointer > gdk_win32_drawable_get_handle (drawable) > GdkDrawable *drawable That looks alright and should work. Can you show us the complete patch? -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 1 13:44:38 2008 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 9BB4A75007C for ; Sun, 1 Jun 2008 13:44:38 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 434 hrs), (distance 25, link: ethernet/modem), [213.165.64.20] 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 FmTJE-l33gso for ; Sun, 1 Jun 2008 13:44:32 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id EF5FD750124 for ; Sun, 1 Jun 2008 13:44:31 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 13:44:30 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp028) with SMTP; 01 Jun 2008 15:44:30 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18aXRlnNUkambN0yjSiF947xgXmqhRlJwpV0nC24k F4OdHIs1I8OFzw Message-ID: <4842A7BE.3070802@gmx.de> Date: Sun, 01 Jun 2008 15:44:30 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: flags object from strings References: <87hcdi6bng.fsf@blah.blah> <47187BD7-7038-4E5F-AB61-7F3ABE1BC94A@asofyet.org> <874p9gi73j.fsf@blah.blah> <48331ADF.6070103@gmx.de> <87wsllkhsf.fsf@blah.blah> In-Reply-To: <87wsllkhsf.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 13:44:38 -0000 Kevin Ryde wrote: >> + croak ("package %s is not registered with the GLib type system" >> + "as a flags type", > /---^ > | > Maybe a space there, if it comes out as one word "systemas". > Unless that's ready for a foreign .po file translation :). Oops. Fixed. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 1 14:02:28 2008 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 DA1C775007C for ; Sun, 1 Jun 2008 14:02:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.31 X-Spam-Level: X-Spam-Status: No, score=-0.31 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:60:M1460,S,T,N,W8:.:?:?] (up: 581 hrs), (link: ethernet/modem), [213.165.64.20] 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 uR4qPwF0Jm7E for ; Sun, 1 Jun 2008 14:02:23 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 1AE3675013B for ; Sun, 1 Jun 2008 14:02:22 +0000 (GMT) Received: (qmail invoked by alias); 01 Jun 2008 14:02:20 -0000 Received: from port-212-202-169-18.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.18] by mail.gmx.net (mp006) with SMTP; 01 Jun 2008 16:02:20 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+l4tcUuwWlpoMfvoo5dtSRcik6kQP8diQ1VCbWo7 Lp9OMfZiZy6pcD Message-ID: <4842ABED.5060905@gmx.de> Date: Sun, 01 Jun 2008 16:02:21 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: calling superclass size_request method References: <87y7e1xrxe.fsf@blah.blah> <1192698051.4238.9.camel@sprite.oh> <87lk24iq9n.fsf@blah.blah> In-Reply-To: <87lk24iq9n.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 14:02:29 -0000 Kevin Ryde wrote: > At any rate perhaps a couple of words for the Gtk2::Widget docs > (though my bad luck continues, "=for position" doesn't seem to do > what I thought it might). The paragraph didn't show up because you put it into the Gtk2::Requisition package. Fixed patch committed. Thanks! -- Bye, -Torsten From gg@zip.com.au Sun Jun 1 23:36:08 2008 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 1C7B27501D6 for ; Sun, 1 Jun 2008 23:36:08 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.108 X-Spam-Level: X-Spam-Status: No, score=-0.108 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1450 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 E2JEi4Z3xsVm for ; Sun, 1 Jun 2008 23:36:00 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 36A9E750236 for ; Sun, 1 Jun 2008 23:35:57 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 520E2381E38 for ; Mon, 2 Jun 2008 09:35:55 +1000 (EST) Received: from blah.blah (ppp2F2B.dyn.pacific.net.au [61.8.47.43]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id F05478C18 for ; Mon, 2 Jun 2008 09:35:49 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K2x5F-0003Gl-PH for gtk-perl-list@gnome.org; Mon, 02 Jun 2008 09:35:29 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: gtk priority constants References: <87hchzg8n5.fsf@blah.blah> <1200512406.5904.21.camel@home.hcsiteeffak.de> <1200841779.5482.21.camel@home.hcsiteeffak.de> <87y7ak8196.fsf@blah.blah> <484191D0.4090504@gmx.de> Mail-Copies-To: never Date: Mon, 02 Jun 2008 09:35:29 +1000 In-Reply-To: <484191D0.4090504@gmx.de> (Torsten Schoenfeld's message of "Sat, 31 May 2008 19:58:40 +0200") Message-ID: <87od6kybi6.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 23:36:08 -0000 Torsten Schoenfeld writes: > > this time using newCONSTSUB which should have the desired effect. Looks pretty likely. > Unfortunately, this complicates the format of the constants-x.y files > slightly: instead of specifying the constants' type and letting typemaps > do the work, we now need to specify a converter explicitly. I guess they're almost invariably "int"s, if you wanted to make that a default. From gg@zip.com.au Sun Jun 1 23:37:49 2008 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 39E287500F0 for ; Sun, 1 Jun 2008 23:37:49 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1475 hrs), (distance 16, link: ethernet/modem), [61.8.2.229] 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 vIbx3l0FHuBe for ; Sun, 1 Jun 2008 23:37:18 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-6.pacific.net.au [61.8.2.229]) by menubar.gnome.org (Postfix) with ESMTP id 881AB7500DE for ; Sun, 1 Jun 2008 23:37:18 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id A5207B3184 for ; Mon, 2 Jun 2008 09:37:15 +1000 (EST) Received: from blah.blah (ppp2F2B.dyn.pacific.net.au [61.8.47.43]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id F3BC48C38 for ; Mon, 2 Jun 2008 09:37:10 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K2x6a-0003Go-So for gtk-perl-list@gnome.org; Mon, 02 Jun 2008 09:36:52 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: gtk adjust docs on emit References: <87skvz5ohi.fsf@blah.blah> <484292DA.5080200@gmx.de> Mail-Copies-To: never Date: Mon, 02 Jun 2008 09:36:52 +1000 In-Reply-To: <484292DA.5080200@gmx.de> (Torsten Schoenfeld's message of "Sun, 01 Jun 2008 14:15:22 +0200") Message-ID: <87k5h8ybfv.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 23:37:49 -0000 Torsten Schoenfeld writes: > > +=for apidoc lower __hide__ > +=cut Ah, I think I was trying, in ignorance, things like =for apidoc Gtk2::Adjustment::lower __hide__ From gg@zip.com.au Sun Jun 1 23:49:15 2008 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 DD3497500DE for ; Sun, 1 Jun 2008 23:49:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1450 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 urSEz7RGDcQt for ; Sun, 1 Jun 2008 23:48:45 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 4C941750151 for ; Sun, 1 Jun 2008 23:48:45 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 939CF3850D3 for ; Mon, 2 Jun 2008 09:48:43 +1000 (EST) Received: from blah.blah (ppp2F2B.dyn.pacific.net.au [61.8.47.43]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id BB07B8C26 for ; Mon, 2 Jun 2008 09:48:38 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K2xHP-0003Gv-0z for gtk-perl-list@gnome.org; Mon, 02 Jun 2008 09:48:03 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: grab event further fields References: <87wslb5onl.fsf@blah.blah> <4842995A.7050500@gmx.de> Mail-Copies-To: never Date: Mon, 02 Jun 2008 09:48:02 +1000 In-Reply-To: <4842995A.7050500@gmx.de> (Torsten Schoenfeld's message of "Sun, 01 Jun 2008 14:43:06 +0200") Message-ID: <87fxrwyax9.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 23:49:16 -0000 Torsten Schoenfeld writes: > > - if (items == 2 && newvalue != RETVAL) > + if (items == 2) > > What's your motivation for that change? Oops, shouldn't put in something unrelated ... > The check isn't all that meaningful, but that's what all other > accessors do. I think most of the plain stores of values don't check, eg "keyval" or "hardware_keycode". I suspect the plain stores which are checking, like "owner" and "reason", are only due to cut-and-paste of ones like "window", "subwindow" and "region". (Those latter have ref/unref, and so save a bit of work by comparing; maybe they even need to do so for correctness, if the unref is first, perhaps ... maybe.) From gg@zip.com.au Sun Jun 1 23:53:43 2008 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 5BC147500DE for ; Sun, 1 Jun 2008 23:53:43 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_EG=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1475 hrs), (distance 16, link: ethernet/modem), [61.8.2.229] 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 M6hj76evDbrj for ; Sun, 1 Jun 2008 23:53:37 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-6.pacific.net.au [61.8.2.229]) by menubar.gnome.org (Postfix) with ESMTP id 0F215750050 for ; Sun, 1 Jun 2008 23:53:36 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 69223B4843 for ; Mon, 2 Jun 2008 09:53:33 +1000 (EST) Received: from blah.blah (ppp2F2B.dyn.pacific.net.au [61.8.47.43]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 51DE58C03 for ; Mon, 2 Jun 2008 09:53:28 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K2xMJ-0003H0-Pm for gtk-perl-list@gnome.org; Mon, 02 Jun 2008 09:53:07 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: segv on mistaken bless References: <871w3j73ij.fsf@blah.blah> <48429B08.6060104@gmx.de> Mail-Copies-To: never Date: Mon, 02 Jun 2008 09:53:07 +1000 In-Reply-To: <48429B08.6060104@gmx.de> (Torsten Schoenfeld's message of "Sun, 01 Jun 2008 14:50:16 +0200") Message-ID: <87bq2kyaos.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2008 23:53:43 -0000 Torsten Schoenfeld writes: > > + if (!mg_find (SvRV (sv), PERL_MAGIC_ext)) > + croak ("%s is not a proper Glib::Object " Looks promising. It occurred to me gperl_get_object repeats some of the validity checks gperl_get_object_check has already done. Perhaps there's a way to structure them to save a few cycles of duplication; at worst I suppose maybe by separating them, if you know what I mean. From gg@zip.com.au Mon Jun 2 00:59:59 2008 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 6C0A27500F0 for ; Mon, 2 Jun 2008 00:59:59 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1451 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 wMrvbOOuf7i0 for ; Mon, 2 Jun 2008 00:59:53 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 0F925750050 for ; Mon, 2 Jun 2008 00:59:52 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 58B423838F1 for ; Mon, 2 Jun 2008 10:59:50 +1000 (EST) Received: from blah.blah (ppp2F2B.dyn.pacific.net.au [61.8.47.43]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id C56118C40 for ; Mon, 2 Jun 2008 10:59:49 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K2yOl-0005CT-OV for gtk-perl-list@gnome.org; Mon, 02 Jun 2008 10:59:43 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: GtkGC shared auto-release References: <87ejdsq23d.fsf@blah.blah> <1197483017.5256.6.camel@home.hcsiteeffak.de> <87ve6rfxxz.fsf@blah.blah> <1198344013.5284.20.camel@home.hcsiteeffak.de> <1200353298.5304.20.camel@home.hcsiteeffak.de> <35F31F4D-25B2-47DC-956D-079061DBF6CF@asofyet.org> <87abn6ssvr.fsf@blah.blah> <40394.192.146.101.70.1200436197.squirrel@webmail.asofyet.org> <98D5DCBC-469F-452A-BA7A-60ADCCCF6663@asofyet.org> <87iqwzdxui.fsf@blah.blah> <4842A19D.1050805@gmx.de> Mail-Copies-To: never Date: Mon, 02 Jun 2008 10:59:39 +1000 In-Reply-To: <4842A19D.1050805@gmx.de> (Torsten Schoenfeld's message of "Sun, 01 Jun 2008 15:18:21 +0200") Message-ID: <87prr0wt1g.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 00:59:59 -0000 Torsten Schoenfeld writes: > > Since Gtk2::GC inherits from Gtk2::Gdk::GC, code that expects a > Gtk2::Gdk::GC should continue to work just fine when given a Gtk2::GC. Yes. I just wondered if staying in Gtk2::Gdk::GC might maximize compatibility, and similarity to the C code. But give it a go as a subclass and see if anything particularly unlovely turns up ... From deadpickle@gmail.com Mon Jun 2 05:41:28 2008 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 79DDC750114 for ; Mon, 2 Jun 2008 05:41:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.184 X-Spam-Level: X-Spam-Status: No, score=-0.184 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 2193 hrs), (distance 13, link: (Google 2)), [209.85.198.227] 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 dc+B5t3Tfu7Z for ; Mon, 2 Jun 2008 05:41:17 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by menubar.gnome.org (Postfix) with ESMTP id D221C75011C for ; Mon, 2 Jun 2008 05:41:16 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so787812rvb.3 for ; Sun, 01 Jun 2008 22:41:15 -0700 (PDT) Received: by 10.115.107.5 with SMTP id j5mr2621364wam.193.1212385275193; Sun, 01 Jun 2008 22:41:15 -0700 (PDT) Received: by 10.114.170.20 with HTTP; Sun, 1 Jun 2008 22:41:15 -0700 (PDT) Message-ID: Date: Mon, 2 Jun 2008 00:41:15 -0500 From: "Jamie Lahowetz" Sender: deadpickle@gmail.com To: gtk-perl-list@gnome.org Subject: geoTiff Application MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_23799_17651246.1212385275200" X-Google-Sender-Auth: 566d59ad6e1fc17a X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 05:41:28 -0000 ------=_Part_23799_17651246.1212385275200 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am writing a simple Gtk2 application that loads a geotiff and allows the user to add and remove waypoints. So far the user can add a waypoint by double clicking and is able to drag the window to navigate. I would like to see if anyone can help me with adding some of the other features. 1. ZOOMING. I added a zooming feature to the map but when you zoom in or out and try to add a waypoint, the circle is far off from where the user clicked. Can anyone give examples on how to fix this? (thanks to zentara for the help) 2. Removing Waypoints. Adding them is easy but removing them seems more difficult. 3. Waypoint Connecting Lines. When there are two waypoints a line is drawn to them in sequence. But when there are four of them the circuit is messed up. Its hard to type it so here is a screenshot, geoapp. In the screenshot the connector from 1 to 3 should not be there when the fourth waypoint is added. I can only speculate that the canvas is drawing the new connectors over the old ones. Is there a good way to manage these Gnome2::Canvas items so that they are not layered? The last two are more important than the zooming, that is just a neat feature. Later, dynamic items such as metar observations and GPS positions will be added but right now I need to learn the basics. Thanks for the help. Here is the entire script. #!/usr/bin/perl use warnings; use strict; use Glib qw/TRUE FALSE/; use Gtk2 -init; use Image::ExifTool; use Geo::Coordinates::UTM; use Gnome2::Canvas; use Gtk2::Ex::Dragger; my $count = 1; #geoTiff File (static) my $filename = 'q3639_DRG24k-c.tif'; #geostats my $ellipsoid = 23; #static WSG83 my $zone; my @mtp; my @ps; my @cs; #Waypoint Holder my %waypoints = (); #Create Window my $window = new Gtk2::Window ( "toplevel" ); $window->signal_connect ("delete_event", sub { Gtk2->main_quit; }); $window->set_border_width (10); $window->set_size_request(640,480); $window->set_position('center'); #create Table my $table = Gtk2::Table->new(2, 2, FALSE); #Create Scrolled Window my $scwin = Gtk2::ScrolledWindow->new(); $scwin->set_policy('always','always'); #add GeoTiff my $exifTool = new Image::ExifTool; my $info = $exifTool->ImageInfo($filename); foreach (sort keys %$info) { print "$_ => $$info{$_}\n"; #Find the right keys(data) if ($_ eq "ModelTiePoint"){ @mtp = split(/ /,$$info{$_}); } if ($_ eq "PixelScale"){ @ps = split(/ /,$$info{$_}); } if ($_ eq "ProjectedCSType"){ @cs = split(/ /,$$info{$_}); $zone = $cs[3]; } } #set viewing area my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file ($filename); #Create Canvas my $canvas = Gnome2::Canvas->new_aa(); my $root = $canvas->root; my $image = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Pixbuf', pixbuf => $pixbuf, x => 0, y => 0, width => $pixbuf->get_width, height => $pixbuf->get_height, anchor => 'nw', ); $canvas->set_scroll_region(0,0,$pixbuf->get_width,$pixbuf->get_height); $image->lower_to_bottom(); #Pack $window->add($table); $scwin->add($canvas); $table->attach_defaults($scwin, 0, 2, 0, 1); #change the cursor over image $canvas->realize; $canvas->window->set_cursor(Gtk2::Gdk::Cursor->new ('hand2')); #Draggability of window my $adj = Gtk2::Adjustment->new (1.00, 0.05, 5.00, 0.05, 0.50, 0.50); my $dragger = Gtk2::Ex::Dragger->new( widget => $scwin, hadjustment => $scwin->get_hadjustment, vadjustment => $scwin->get_vadjustment, cursor => 'hand1' ); #handle the events $canvas->signal_connect (event => \&event_handler); $window->show_all; Gtk2->main; #------------------------------------------------ sub event_handler { my ( $widget, $event ) = @_; # print $widget ,' ',$event->type,"\n"; #on 2 mouse presses, place waypoint if ( $event->type eq "2button-press" ) { print 'x->',$event->x,' ','y->',$event->y; #convert UTM to Lat and Long my $easting = $ps[0] * $event->x + 0.0 * $event->y + $mtp[3]; my $northing = (-$ps[1]) * $event->y + 0.0 * $event->x + $mtp[4]; my ($latitude,$longitude)=utm_to_latlon($ellipsoid,$zone,$easting,$northing); print " ($latitude, $longitude)\n"; #Drop icon my $tgroup = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Group', x => $event->x, y => $event->y); Gnome2::Canvas::Item->new($tgroup, 'Gnome2::Canvas::Ellipse', x1 => -7.5, y1 => -7.5, x2 => 7.5, y2 => 7.5, fill_color => 'purple', outline_color => 'black'); Gnome2::Canvas::Item->new ($tgroup, 'Gnome2::Canvas::Text', "text", "$count", "x", 0.0, "y", 0.0, "font", "Sans Bold", "anchor", 'GTK_ANCHOR_NW', "weight", 100, "fill_color", 'red', "size_points", 20); #add waypoints $waypoints{$count } = {'x' => $event->x,'y' => $event->y, 'lat' => $latitude, 'long' => $longitude}; print "size of hash: " . keys( %waypoints ) . ".\n"; #draw lines to the waypoints if ($count >= 2){ my @points; foreach my $key (sort keys %waypoints){ foreach my $subkey (sort keys %{$waypoints{$key}}){ if ($subkey eq 'x' || $subkey eq 'y'){ push(@points, $waypoints{$key}{$subkey}); print "$key $subkey = $waypoints{$key}{$subkey}\n"; } } } if ($count >= 3){ push(@points, $waypoints{1}{'x'}); push(@points, $waypoints{1}{'y'}); } my $lgroup = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Group'); Gnome2::Canvas::Item->new ($lgroup, 'Gnome2::Canvas::Line', points => [@points], fill_color => 'black', width_units => 4.0); foreach (@points){ print $_, "\n"; } } #print $count, "\n"; $tgroup->raise_to_top(); $count++; } #on mouse press, pan the window if ( $event->type eq "button-press" ) { $dragger->start ($event); } } -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu ------=_Part_23799_17651246.1212385275200 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am writing a simple Gtk2 application that loads a geotiff and allows the user to add and remove waypoints. So far the user can add a waypoint by double clicking and is able to drag the window to navigate. I would like to see if anyone can help me with adding some of the other features.
1. ZOOMING. I added a zooming feature to the map but when you zoom in or out and try to add a waypoint, the circle is far off from where the user clicked. Can anyone give examples on how to fix this? (thanks to zentara for the help)
2. Removing Waypoints. Adding them is easy but removing them seems more difficult.
3. Waypoint Connecting Lines. When there are two waypoints a line is drawn to them in sequence. But when there are four of them the circuit is messed up. Its hard to type it so here is a screenshot, geoapp. In the screenshot the connector from 1 to 3 should not be there when the fourth waypoint is added. I can only speculate that the canvas is drawing the new connectors over the old ones. Is there a good way to manage these Gnome2::Canvas items so that they are not layered?

The last two are more important than the zooming, that is just a neat feature. Later, dynamic items such as metar observations and GPS positions will be added but right now I need to learn the basics. Thanks for the help. Here is the entire script.

#!/usr/bin/perl
use warnings;
use strict;
use Glib qw/TRUE FALSE/;
use Gtk2 -init;
use Image::ExifTool;
use Geo::Coordinates::UTM;
use Gnome2::Canvas;
use Gtk2::Ex::Dragger;

my $count = 1;

#geoTiff File (static)
my $filename = 'q3639_DRG24k-c.tif';

#geostats
my $ellipsoid = 23; #static WSG83
my $zone;
my @mtp;
my @ps;
my @cs;

#Waypoint Holder
my %waypoints = ();

#Create Window
my $window = new Gtk2::Window ( "toplevel" );
$window->signal_connect ("delete_event", sub { Gtk2->main_quit; });
$window->set_border_width (10);
$window->set_size_request(640,480);
$window->set_position('center');

#create Table
my $table = Gtk2::Table->new(2, 2, FALSE);

#Create Scrolled Window
my $scwin = Gtk2::ScrolledWindow->new();
$scwin->set_policy('always','always');

#add GeoTiff
my $exifTool = new Image::ExifTool;
my $info = $exifTool->ImageInfo($filename);
foreach (sort keys %$info) {
    print "$_ => $$info{$_}\n";
   
    #Find the right keys(data)
    if ($_ eq "ModelTiePoint"){
        @mtp = split(/ /,$$info{$_});
    }
    if ($_ eq "PixelScale"){
        @ps = split(/ /,$$info{$_});
    }
    if ($_ eq "ProjectedCSType"){
        @cs = split(/ /,$$info{$_});
        $zone = $cs[3];
    }
}
   
#set viewing area
my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file ($filename);

#Create Canvas
my $canvas = Gnome2::Canvas->new_aa();
my $root   = $canvas->root;
my $image = Gnome2::Canvas::Item->new ($root,
                   'Gnome2::Canvas::Pixbuf',
                     pixbuf => $pixbuf,
                   x      => 0,
                          y      => 0,
                   width  => $pixbuf->get_width,
                   height => $pixbuf->get_height,
                   anchor => 'nw',
               );
$canvas->set_scroll_region(0,0,$pixbuf->get_width,$pixbuf->get_height);
$image->lower_to_bottom();
   
#Pack
$window->add($table);
$scwin->add($canvas);
$table->attach_defaults($scwin, 0, 2, 0, 1);

#change the cursor over image
$canvas->realize;
$canvas->window->set_cursor(Gtk2::Gdk::Cursor->new ('hand2'));

#Draggability of window
my $adj = Gtk2::Adjustment->new (1.00, 0.05, 5.00, 0.05, 0.50, 0.50);
my $dragger = Gtk2::Ex::Dragger->new( widget => $scwin,
    hadjustment => $scwin->get_hadjustment,
    vadjustment => $scwin->get_vadjustment,
    cursor => 'hand1'
    );

#handle the events
$canvas->signal_connect (event => \&event_handler);

$window->show_all;

Gtk2->main;
#------------------------------------------------
sub event_handler {
    my ( $widget, $event ) = @_;
    # print $widget ,' ',$event->type,"\n";
   
    #on 2 mouse presses, place waypoint
    if ( $event->type eq "2button-press" ) {
        print 'x->',$event->x,'  ','y->',$event->y;
       
        #convert UTM to Lat and Long
        my $easting = $ps[0] * $event->x + 0.0 * $event->y + $mtp[3];
        my $northing = (-$ps[1]) * $event->y + 0.0 * $event->x + $mtp[4];
        my ($latitude,$longitude)=utm_to_latlon($ellipsoid,$zone,$easting,$northing);
        print " ($latitude, $longitude)\n";
       
        #Drop icon
        my $tgroup = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Group', x => $event->x, y => $event->y);
        Gnome2::Canvas::Item->new($tgroup, 'Gnome2::Canvas::Ellipse',
            x1 => -7.5,
            y1 => -7.5,
            x2 => 7.5,
            y2 => 7.5,
            fill_color => 'purple',
            outline_color => 'black');
        Gnome2::Canvas::Item->new ($tgroup,
            'Gnome2::Canvas::Text',
            "text", "$count",
            "x", 0.0,
            "y", 0.0,
            "font", "Sans Bold",
            "anchor", 'GTK_ANCHOR_NW',
            "weight", 100,
            "fill_color", 'red',
            "size_points", 20);
       
        #add waypoints
        $waypoints{$count } = {'x' => $event->x,'y' => $event->y, 'lat' => $latitude, 'long' => $longitude};
        print "size of hash:  " . keys( %waypoints ) . ".\n";
       
        #draw lines to the waypoints
        if ($count >= 2){
            my @points;
            foreach my $key (sort keys %waypoints){
                foreach my $subkey (sort keys %{$waypoints{$key}}){
                    if ($subkey eq 'x' || $subkey eq 'y'){
                        push(@points, $waypoints{$key}{$subkey});
                        print "$key $subkey = $waypoints{$key}{$subkey}\n";
                    }
                   
                }
               
            }
            if ($count >= 3){
                push(@points, $waypoints{1}{'x'});
                push(@points, $waypoints{1}{'y'});
            }
           
            my $lgroup = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Group');
            Gnome2::Canvas::Item->new ($lgroup,
                'Gnome2::Canvas::Line',
                points => [@points],
                fill_color => 'black',
                width_units => 4.0);
           
            foreach (@points){
                print $_, "\n";
            }  
        }
       
        #print $count, "\n";
        $tgroup->raise_to_top();
        $count++;
    }
   
    #on mouse press, pan the window
    if ( $event->type eq "button-press" ) {
        $dragger->start ($event);
    }
}

--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu ------=_Part_23799_17651246.1212385275200-- From jeffrey.ratcliffe@gmail.com Mon Jun 2 06:24:26 2008 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 BCB5B750390 for ; Mon, 2 Jun 2008 06:24:26 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 8044 hrs), (distance 13, link: (Google 2)), [209.85.200.175] 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 J+rCw-wDaWVT for ; Mon, 2 Jun 2008 06:24:18 +0000 (GMT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by menubar.gnome.org (Postfix) with ESMTP id 2206375040B for ; Mon, 2 Jun 2008 06:22:56 +0000 (GMT) Received: by wf-out-1314.google.com with SMTP id 23so941655wfg.9 for ; Sun, 01 Jun 2008 23:22:55 -0700 (PDT) Received: by 10.142.127.10 with SMTP id z10mr3389454wfc.263.1212387775135; Sun, 01 Jun 2008 23:22:55 -0700 (PDT) Received: by 10.143.13.10 with HTTP; Sun, 1 Jun 2008 23:22:55 -0700 (PDT) Message-ID: <30e395780806012322g5df23f6bgac108621088adeba@mail.gmail.com> Date: Mon, 2 Jun 2008 08:22:55 +0200 From: "Jeffrey Ratcliffe" To: "Jamie Lahowetz" Subject: Re: geoTiff Application In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 06:24:27 -0000 2008/6/2 Jamie Lahowetz : > I am writing a simple Gtk2 application that loads a geotiff and allows the > user to add and remove waypoints. So far the user can add a waypoint by > double clicking and is able to drag the window to navigate. I would like to > see if anyone can help me with adding some of the other features. > 1. ZOOMING. I added a zooming feature to the map but when you zoom in or out > and try to add a waypoint, the circle is far off from where the user > clicked. Can anyone give examples on how to fix this? (thanks to zentara for > the help) I very much recommend the use of Gtk2::ImageView (http://trac.bjourne.webfactional.com/) as an image viewing widget, which will sort out all the zooming, panning, selecting for you. Regards Jeff From kaffeetisch@gmx.de Mon Jun 2 09:24:12 2008 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 257417503CF for ; Mon, 2 Jun 2008 09:24:12 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 1075 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 qAuMYBnWj980 for ; Mon, 2 Jun 2008 09:24:02 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id B4F7F750404 for ; Mon, 2 Jun 2008 09:22:59 +0000 (GMT) Received: (qmail invoked by alias); 02 Jun 2008 09:22:56 -0000 Received: from port-212-202-34-77.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.34.77] by mail.gmx.net (mp003) with SMTP; 02 Jun 2008 11:22:56 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18cSaI7j0gcQfS4JTV/m+PngoNKE8Gun+lBhfl2li npMedpgbNdDaNu Message-ID: <4843BBF0.2040602@gmx.de> Date: Mon, 02 Jun 2008 11:22:56 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Glib 1.183 available X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 09:24:12 -0000 Overview of changes in Glib 1.183 ================================= * Make Glib::signal_add_emission_hook work even if called before any object of the concerned type has been created. * Overload '!=' for Glib::Flags. * Avoid prematurely destroying callback user data in certain cases. * Improve the documentation of Glib::Object::Subclass' GET_PROPERTY and SET_PROPERTY. The source code is available from the gtk2-perl project page on sourceforge: http://downloads.sourceforge.net/gtk2-perl/Glib-1.183.tar.gz ...and via anonymous cvs, tagged "rel-1-18-3" in the directory /gtk2-perl-xs/Glib. This release works with all stable releases of glib-2.x. In order to build Glib from source, you must have glib-2.x and its development headers and utilities installed, as well as the pkg-config utility. In addition, the following Perl modules are needed at build time (but not at runtime): ExtUtils::Depends >= 0.300 ExtUtils::PkgConfig >= 1.000 Glib provides Perl access to the GLib and GObject libraries. GLib is a portability and utility library; GObject provides a generic type system with inheritance and a powerful signal system. Together these libraries are used as the foundation for many of the libraries that make up the Gnome environment, and are used in many unrelated projects. From kaffeetisch@gmx.de Mon Jun 2 09:24:28 2008 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 737F27503E4 for ; Mon, 2 Jun 2008 09:24:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 1075 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 1vAv7o3xzMXZ for ; Mon, 2 Jun 2008 09:24:20 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 29E4F750411 for ; Mon, 2 Jun 2008 09:23:34 +0000 (GMT) Received: (qmail invoked by alias); 02 Jun 2008 09:23:33 -0000 Received: from port-212-202-34-77.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.34.77] by mail.gmx.net (mp031) with SMTP; 02 Jun 2008 11:23:33 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19ISzhWuI5I06q0IdCrd2Tgux48I7orU5ts3+fv3d OQlos2a7SfqAqL Message-ID: <4843BC15.2020207@gmx.de> Date: Mon, 02 Jun 2008 11:23:33 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Gtk2 1.183 available X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 09:24:28 -0000 Overview of changes in Gtk2 1.183 ================================= * Overload '!=' for Gtk2::Gdk::Atom. * Accept all the usual values for booleans in a few places. * Allow undef for the display name parameter of Gtk2::Gdk::Display::open. * Improve the documentation in many places. * Fix some test failures. The source code is available from the gtk2-perl project page on sourceforge: http://downloads.sourceforge.net/gtk2-perl/Gtk2-1.183.tar.gz ...and from anonymous cvs, tagged "rel-1-18-3" in the directory /gtk2-perl-xs/Gtk2. This module requires these other modules and libraries: perl >= 5.8.0 Glib >= 1.180 (perl module) GTK+ > 2.x (C library and prerequisites) If GTK+ is as new or newer as 2.8, the Cairo module is also required: Cairo >= 1.00 (Perl module) In order to build it from source, you'll also need ExtUtils::Depends >= 0.300 ExtUtils::PkgConfig >= 1.030 development headers for gtk+ and friends Gtk2 is a Perl extension providing Perl bindings to the 2.x series of the Gtk+ graphical user interface library. This module allows you to write graphical user interfaces in a perlish and object-oriented way, freeing you from the casting and memory management in C, yet remaining very close in spirit to original API. Find out more about Gtk+ at , and about Gtk2-Perl at . From zentara1@sbcglobal.net Mon Jun 2 18:26:51 2008 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 3FC71750129 for ; Mon, 2 Jun 2008 18:26:51 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.191 X-Spam-Level: X-Spam-Status: No, score=0.191 tagged_above=-999 required=2 tests=[AWL=-0.610, BAYES_50=0.001, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [65535:47:1:68:M1460,N,W1,N,N,T,N,N,?12:.:?:?] (up: 1667 hrs), (link: ethernet/modem), [68.142.198.207] 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 hZUpJpQj0Izi for ; Mon, 2 Jun 2008 18:26:21 +0000 (GMT) Received: from smtp108.sbc.mail.mud.yahoo.com (smtp108.sbc.mail.mud.yahoo.com [68.142.198.207]) by menubar.gnome.org (Postfix) with SMTP id BB69E7500DA for ; Mon, 2 Jun 2008 18:26:20 +0000 (GMT) Received: (qmail 40321 invoked from network); 2 Jun 2008 18:26:19 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.118.212 with login) by smtp108.sbc.mail.mud.yahoo.com with SMTP; 2 Jun 2008 18:26:18 -0000 X-YMail-OSG: wjjQB9QVM1k2WmMm5DOgOEOFJLQCIBszJsex.CHnJYnax3WmTCwJitrhSvncFqMQcknGZ8CZNFVzE6yodYO90oS42OzpHIFDvTyRyY61561aOWfiXy2TiePFU40yVcPVRn2hxUgZxa_Vm.My14FLH1tG X-Yahoo-Newman-Property: ymail-3 Date: Mon, 2 Jun 2008 14:22:06 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: mouse position on Gnome2::Canvas and lines Message-ID: <20080602142206.54bdebb8@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/7NzSmwdbeANC5KhS6d1+dMY" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 18:26:51 -0000 --MP_/7NzSmwdbeANC5KhS6d1+dMY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, This just came up and I'm totally perplexed about how to position a line on a Canvas. The first one, the (0,0,100,100) coordinates don't seem to be at 0,0, and the points don't seem to jive with what I see on screen. The second one, I move root (-50,-50), and it seems to put the coordinates at the origin, but a mouse click position is off. And why -50,-50 ? I would expect -250,-250 is $root was centered? The line item dosn't have an anchor setting, so what do you use? Can anyone explain how to set this up correctly? See 2 attachments: Thanks, zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html --MP_/7NzSmwdbeANC5KhS6d1+dMY Content-Type: application/octet-stream; name=add-line-segment Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=add-line-segment IyEvdXNyL2Jpbi9wZXJsCnVzZSB3YXJuaW5nczsKdXNlIHN0cmljdDsKdXNlIEd0azIgLWluaXQ7 CnVzZSBHbm9tZTI6OkNhbnZhczsKCm15ICR3aW5kb3cgICA9IEd0azI6OldpbmRvdy0+bmV3Owok d2luZG93LT5zaWduYWxfY29ubmVjdCggZGVzdHJveSA9PiBzdWIgeyBleGl0IH0gKTsKCm15ICRz Y3JvbGxlciA9IEd0azI6OlNjcm9sbGVkV2luZG93LT5uZXc7Cm15ICRjYW52YXMgICA9IEdub21l Mjo6Q2FudmFzLT5uZXc7CiRzY3JvbGxlci0+YWRkKCAkY2FudmFzICk7CiR3aW5kb3ctPmFkZCgg JHNjcm9sbGVyICk7CiR3aW5kb3ctPnNldF9kZWZhdWx0X3NpemUoIDM1MCwgMzUwICk7CiRjYW52 YXMtPnNldF9zY3JvbGxfcmVnaW9uKCAwLCAwLCAyMDAsIDIwMCApOwokd2luZG93LT5zaG93X2Fs bDsKCm15ICRyb290ID0gJGNhbnZhcy0+cm9vdDsKCm15ICR0ZXh0ID0gR25vbWUyOjpDYW52YXM6 Okl0ZW0tPm5ldygKICAgJHJvb3QsICdHbm9tZTI6OkN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O RF9fCgoK --MP_/7NzSmwdbeANC5KhS6d1+dMY Content-Type: application/octet-stream; name=add-line-segment1 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=add-line-segment1 IyEvdXNyL2Jpbi9wZXJsCnVzZSB3YXJuaW5nczsKdXNlIHN0cmljdDsKdXNlIEd0azIgLWluaXQ7 CnVzZSBHbm9tZTI6OkNhbnZhczsKCm15ICR3aW5kb3cgICA9IEd0azI6OldpbmRvdy0+bmV3Owok d2luZG93LT5zaWduYWxfY29ubmVjdCggZGVzdHJveSA9PiBzdWIgeyBleGl0IH0gKTsKCm15ICRz Y3JvbGxlciA9IEd0azI6OlNjcm9sbGVkV2luZG93LT5uZXc7Cm15ICRjYW52YXMgICA9IEdub21l Mjo6Q2FudmFzLT5uZXcoKTsKJHNjcm9sbGVyLT5hZGQoICRjYW52YXMgKTsKJHdpbmRvdy0+YWRk KCAkc2Nyb2xsZXIgKTsKJHdpbmRvdy0+c2V0X2RlZmF1bHRfc2l6ZSggNTAwLCA1MDAgKTsKJGNh bnZhcy0+c2V0X3Njcm9sbF9yZWdpb24oIDAsIDAsIDQwMCwgNDAwICk7CiR3aW5kb3ctPnNob3df YWxsOwoKbXkgJHJvb3QgPSAkY2FudmFzLT5yb290OwoKJHJvb3QtPm1vdmUoLTUwLC01MCk7Cgpt eSAkdGV4dCA9IEdub21lMjo6Q2FudmFzOjpJdGVtLT5uZXcoCiAgICAkcm9vdCwgJ0dub21lMjo6 Q2FudmFzOjpUZXh0JywKICAgeCAgICAgICAgICA9PiAyMCwKICAgeSAgICAgICAgICA9PiAxNSwK ICAgZmlsbF9jb2xvciA9PiAnYmxhY2snLAogICBmb250ICAgICAgID0+ICdTYW5zIDE0JywKICAg YW5jaG9yICAgICA9PiAnR1RLX0FOQ0hPUl9OVycsCiAgIHRleHQgICAgICAgPT4gJ0NsaWNrIHRv IGFkZCB3YXlwb2ludCcKKTsKCiRjYW52YXMtPnNpZ25hbF9jb25uZWN0IChldmVudCA9PiBcJmV2 ZW50X2hhbmRsZXIpOwoKbXkgJHBvaW50cyA9IFswLDAsMTAwLDEwMF07CgpteSAkbGluZTI9IEdu b21lMjo6Q2FudmFzOjpJdGVtLT5uZXcgKCRyb290LAoJCSdHbm9tZTI6OkNhbnZhczo6TGluZScs CgkgCXBvaW50cyA9PiAkcG9pbnRzLAoJCWZpbGxfY29sb3IgPT4gInJlZCIsCgkJd2lkdGhfdW5p dHMgPT4gMy4wLAoJCWNhcF9zdHlsZSA9PiAncHJvamVjdGluZycsCgkgCWpvaW5fc3R5bGUgPT4g J21pdGVyJywKCQkpOwoKbXkgJHAgPSAkbGluZTItPmdldCgncG9pbnRzJyk7CnByaW50ICJAJHBc biI7Cm15ICgkeCwkeSkgPSBAJHA7CgpHdGsyLT5tYWluOwoKIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjCgpzdWIgZXZlbnRfaGFuZGxlcnsKICAgICBteSAoICR3aWRnZXQsICRldmVudCAp ID0gQF87CiMgICAgIHByaW50ICR3aWRnZXQgLCcgJywkZXZlbnQtPnR5cGUsIlxuIjsKCiAgICBp ZiAoICRldmVudC0+dHlwZSBlcSAiYnV0dG9uLXByZXNzIiApIHsKICAgICAgICBwcmludCAneC0+ JywkZXZlbnQtPngsJyAgJywneS0+JywkZXZlbnQtPnksIlxuIjsKCiAgICAgICAgcHVzaCBAJHBv aW50cywkZXZlbnQtPnggLCAkZXZlbnQtPnk7CgogICAgICAgICRsaW5lMi0+c2V0KHBvaW50cz0+ JHBvaW50cyk7CgogICAgICAgIG15ICRwID0gJGxpbmUyLT5nZXQoJ3BvaW50cycpOwogICAgICAg IHByaW50ICJAJHBcbiI7CgogICAgfSAgICAKfQoKX19FTkRfXwoKCg== --MP_/7NzSmwdbeANC5KhS6d1+dMY-- From sergstesh@yahoo.com Mon Jun 2 22:13:59 2008 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 9F8187500B8 for ; Mon, 2 Jun 2008 22:13:59 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.599 X-Spam-Level: X-Spam-Status: No, score=-3.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 6.x (1) (up: 8608 hrs), (distance 12, link: ethernet/modem), [66.163.179.87] 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 7EqEPNS0swf2 for ; Mon, 2 Jun 2008 22:13:28 +0000 (GMT) Received: from web35208.mail.mud.yahoo.com (web35208.mail.mud.yahoo.com [66.163.179.87]) by menubar.gnome.org (Postfix) with SMTP id 150B97500F6 for ; Mon, 2 Jun 2008 22:13:27 +0000 (GMT) Received: (qmail 74957 invoked by uid 60001); 2 Jun 2008 22:13:26 -0000 X-YMail-OSG: j0i7lKkVM1kYu32zgrdYIDmGJ7VqVwrvPKzTJgwlJKOgw8lYy76Xzu1J5YL9xmnAsmW3tbYsy9wmJZvn91RF8JEu3TqFN2h_mAxwK9wEd0.6CxZbJ5Oga8NVf2Y- Received: from [87.69.49.127] by web35208.mail.mud.yahoo.com via HTTP; Mon, 02 Jun 2008 15:13:26 PDT Date: Mon, 2 Jun 2008 15:13:26 -0700 (PDT) From: Sergei Steshenko Subject: Re: Gtk2 1.183 available To: Torsten Schoenfeld , gtk-perl-list@gnome.org In-Reply-To: <4843BC15.2020207@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <616312.74875.qm@web35208.mail.mud.yahoo.com> X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2008 22:13:59 -0000 --- Torsten Schoenfeld wrote: > Overview of changes in Gtk2 1.183 > ================================= > ... > * Fix some test failures. Current failures: " t/GtkClipboard.....................# Looks like you planned 95 tests but ran 23 extra. dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 96-118 Failed 23/95 tests, 75.79% okay t/GtkColorButton...................ok t/GtkColorSelection................ok t/GtkColorSelectionDialog..........ok t/GtkCombo.........................ok t/GtkComboBox......................ok t/GtkComboBoxEntry.................ok t/GtkCurve.........................ok t/GtkDialog........................Gtk-CRITICAL **: gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed at t/GtkDialog.t line 73. Gtk-CRITICAL **: gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed at t/GtkDialog.t line 73. Gtk-CRITICAL **: gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed at t/GtkDialog.t line 74. Gtk-CRITICAL **: gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed at t/GtkDialog.t line 74. Gtk-CRITICAL **: gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed at t/GtkDialog.t line 74. Gtk-CRITICAL **: gtk_box_reorder_child: assertion `GTK_IS_WIDGET (child)' failed at t/GtkDialog.t line 74. ". Regards, Sergei. Applications From Scratch: http://appsfromscratch.berlios.de/ From deadpickle@gmail.com Tue Jun 3 04:45:54 2008 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 BD6C67500EE for ; Tue, 3 Jun 2008 04:45:54 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 3910 hrs), (distance 12, link: (Google 2)), [64.233.166.178] 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 X7J7VfV7V7vi for ; Tue, 3 Jun 2008 04:45:45 +0000 (GMT) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by menubar.gnome.org (Postfix) with ESMTP id 7D5267500DA for ; Tue, 3 Jun 2008 04:45:45 +0000 (GMT) Received: by py-out-1112.google.com with SMTP id a29so730925pyi.36 for ; Mon, 02 Jun 2008 21:45:43 -0700 (PDT) Received: by 10.114.121.1 with SMTP id t1mr10669956wac.55.1212468343136; Mon, 02 Jun 2008 21:45:43 -0700 (PDT) Received: by 10.114.170.20 with HTTP; Mon, 2 Jun 2008 21:45:43 -0700 (PDT) Message-ID: Date: Mon, 2 Jun 2008 23:45:43 -0500 From: "Jamie Lahowetz" Sender: deadpickle@gmail.com To: "Jeffrey Ratcliffe" Subject: Re: geoTiff Application In-Reply-To: <30e395780806012322g5df23f6bgac108621088adeba@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28123_22710645.1212468343137" References: <30e395780806012322g5df23f6bgac108621088adeba@mail.gmail.com> X-Google-Sender-Auth: 3226d7b9852fdd53 Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2008 04:45:54 -0000 ------=_Part_28123_22710645.1212468343137 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am going to see if I can attach that to Gnome2::Canvas. In the mean time I have started to add the ability to remove waypoints. so far I have this code: #remove waypoints if ($event->type eq "button-press" && $event->button == 3){ print "right click\n"; foreach (@drop){ print $_,"\n"; } foreach (@drop){ my ($x1, $y1, $x2, $y2) = $_->get_bounds; #print "$x1, $y1, $x2, $y2\n"; if ($event->x >= $x1 && $event->x <= $x2 && $event->y >= $y1 && $event->y <= $y2){ print "In Bounds!!\n"; delete $_; } } foreach (@drop){ print $_,"\n"; $_->request_update; } } With this the user can right click over a waypoint and it will be removed. I'm struggling with this a bit. I want to be able to remove the array reference that the user has clicked over and redraw the waypoints (at least I think this is how it should work). How can I remove the array reference? How can I redraw the waypoints? On Mon, Jun 2, 2008 at 1:22 AM, Jeffrey Ratcliffe < jeffrey.ratcliffe@gmail.com> wrote: > 2008/6/2 Jamie Lahowetz : > > I am writing a simple Gtk2 application that loads a geotiff and allows > the > > user to add and remove waypoints. So far the user can add a waypoint by > > double clicking and is able to drag the window to navigate. I would like > to > > see if anyone can help me with adding some of the other features. > > 1. ZOOMING. I added a zooming feature to the map but when you zoom in or > out > > and try to add a waypoint, the circle is far off from where the user > > clicked. Can anyone give examples on how to fix this? (thanks to zentara > for > > the help) > > I very much recommend the use of Gtk2::ImageView > (http://trac.bjourne.webfactional.com/) as an image viewing widget, > which will sort out all the zooming, panning, selecting for you. > > Regards > > Jeff > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu ------=_Part_28123_22710645.1212468343137 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I am going to see if I can attach that to Gnome2::Canvas. In the mean time I have started to add the ability to remove waypoints. so far I have this code:
#remove waypoints
    if ($event->type eq "button-press" && $event->button == 3){
        print "right click\n";
        foreach (@drop){
            print $_,"\n";
        }
        foreach (@drop){
            my ($x1, $y1, $x2, $y2) = $_->get_bounds;
            #print "$x1, $y1, $x2, $y2\n";
            if ($event->x >= $x1 && $event->x <= $x2 && $event->y >= $y1 && $event->y <= $y2){
                print "In Bounds!!\n";
                delete $_;
            }
        }
        foreach (@drop){
            print $_,"\n";
            $_->request_update;
        }
    }
With this the user can right click over a waypoint and it will be removed. I'm struggling with this a bit. I want to be able to remove the array reference that the user has clicked over and redraw the waypoints (at least I think this is how it should work). How can I remove the array reference? How can I redraw the waypoints?


On Mon, Jun 2, 2008 at 1:22 AM, Jeffrey Ratcliffe <jeffrey.ratcliffe@gmail.com> wrote:
2008/6/2 Jamie Lahowetz <jlahowe2@bigred.unl.edu>:
> I am writing a simple Gtk2 application that loads a geotiff and allows the
> user to add and remove waypoints. So far the user can add a waypoint by
> double clicking and is able to drag the window to navigate. I would like to
> see if anyone can help me with adding some of the other features.
> 1. ZOOMING. I added a zooming feature to the map but when you zoom in or out
> and try to add a waypoint, the circle is far off from where the user
> clicked. Can anyone give examples on how to fix this? (thanks to zentara for
> the help)

I very much recommend the use of Gtk2::ImageView
(http://trac.bjourne.webfactional.com/) as an image viewing widget,
which will sort out all the zooming, panning, selecting for you.

Regards

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



--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu ------=_Part_28123_22710645.1212468343137-- From zentara1@sbcglobal.net Tue Jun 3 12:17:52 2008 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 BF91175024E for ; Tue, 3 Jun 2008 12:17:52 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.259 X-Spam-Level: X-Spam-Status: No, score=-1.259 tagged_above=-999 required=2 tests=[AWL=0.851, BAYES_05=-1.11, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9396 hrs), (distance 15, link: ethernet/modem), [66.196.96.95] 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 0bnB4Q7bH2Ki for ; Tue, 3 Jun 2008 12:17:23 +0000 (GMT) Received: from smtp122.sbc.mail.re3.yahoo.com (smtp122.sbc.mail.re3.yahoo.com [66.196.96.95]) by menubar.gnome.org (Postfix) with SMTP id 31CC1750132 for ; Tue, 3 Jun 2008 12:17:22 +0000 (GMT) Received: (qmail 75941 invoked from network); 3 Jun 2008 12:17:20 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.118.169 with login) by smtp122.sbc.mail.re3.yahoo.com with SMTP; 3 Jun 2008 12:17:20 -0000 X-YMail-OSG: QGs3omgVM1lP8qUtF0KGiPofcJHzbU1YFaaRwRMtMwoFBADT4wMcEWDM.Pcn6ibW6YmLaHJ4_K5HFhTnBPIOFOK4mjrMEcJ3wTuZznl6i5VS5yvN1hTt2l39bE1UxESqnLgSAgY2Z4pws.GsbO2CzjRq X-Yahoo-Newman-Property: ymail-3 Date: Tue, 3 Jun 2008 08:13:09 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: mouse position on Gnome2::Canvas and lines Message-ID: <20080603081309.5df80181@zentara.zentara.net> In-Reply-To: <20080602142206.54bdebb8@zentara.zentara.net> References: <20080602142206.54bdebb8@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2008 12:17:52 -0000 On Mon, 2 Jun 2008 14:22:06 -0400 zentara wrote: >Hi, > >This just came up and I'm totally perplexed about how to position >a line on a Canvas. > >The first one, the (0,0,100,100) coordinates don't seem to >be at 0,0, and the points don't seem to jive with what I see >on screen. > >The second one, I move root (-50,-50), and it seems to put the >coordinates at the origin, but a mouse click position is off. > >And why -50,-50 ? I would expect -250,-250 is $root was centered? > >The line item dosn't have an anchor setting, so what do you use? > >Can anyone explain how to set this up correctly? > >See 2 attachments: > >Thanks, > >zentara Doh!!! Sorry I see the mistake. If the scrollregion is smaller than the default canvas size, weird coordinate transforms occur. Maybe a bug? $scroller->add( $canvas ); $window->add( $scroller ); $window->set_default_size( 500, 500 ); #if scrollregion is smaller than default size, odd # coordinate problems occur #$canvas->set_scroll_region( 0, 0, 400, 400 ); #bad $canvas->set_scroll_region( 0, 0, 700, 700 ); #good and works fine It would be a good "trick" question to throw at someone. :-) Thanks; zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From zentara1@sbcglobal.net Tue Jun 3 18:30:08 2008 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 5AFE775023D for ; Tue, 3 Jun 2008 18:30:08 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.384 X-Spam-Level: X-Spam-Status: No, score=-2.384 tagged_above=-999 required=2 tests=[AWL=1.215, BAYES_00=-2.599, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9402 hrs), (distance 15, link: ethernet/modem), [66.196.96.96] 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 osAXEZ75xGlz for ; Tue, 3 Jun 2008 18:30:01 +0000 (GMT) Received: from smtp123.sbc.mail.re3.yahoo.com (smtp123.sbc.mail.re3.yahoo.com [66.196.96.96]) by menubar.gnome.org (Postfix) with SMTP id EAC7C7501C5 for ; Tue, 3 Jun 2008 18:30:00 +0000 (GMT) Received: (qmail 34081 invoked from network); 3 Jun 2008 18:29:59 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.249.45.174 with login) by smtp123.sbc.mail.re3.yahoo.com with SMTP; 3 Jun 2008 18:29:58 -0000 X-YMail-OSG: wEsF66sVM1kVyzHYtJPjf7imsuw.Ms0AguWng5GEMs5cMU3AlMQ5QcZNdePcF339F.9f3SKHShmYbQtwiI.mzZxsXMfq.qcnpg0frsuQc6FXcLs_jrtwREqFhFOtX6QckUsxrG4QD1KVd2YwxSjbzJGB X-Yahoo-Newman-Property: ymail-3 Date: Tue, 3 Jun 2008 14:24:51 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Goo::Canvas updating a PolyLine Message-ID: <20080603142451.4e6cd2d2@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/rp6sXgSkwnmYq_nlo/kDNcL" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2008 18:30:08 -0000 --MP_/rp6sXgSkwnmYq_nlo/kDNcL Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I'm trying to convert a line-segment (waypoint) generator that I made on a plain Gnome2::Canvas, to the Goo::Canvas. I can't seem to find the right method to update a line, and I'm wondering if it's possible? The following won't allow some new points to be added to a line, but I can undef the line and rebuild it. That is not very efficient. I tried using $line->set(points=>), but it seems that the list of coordinate pairs are an anonymous array_ref...... there dosn't seem to be a way of addressing them. Anyone know how to update points in a PolyLine? See attachment. Thanks, zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html --MP_/rp6sXgSkwnmYq_nlo/kDNcL Content-Type: application/octet-stream; name=waypoint-maker Content-Transfer-Enco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W5lLXdpZHRoJyA9PiAzLAogICAgICAgICdzdGFydC1hcnJvdycgPT4gVFJVRSwKICAgICAg ICAnZW5kLWFycm93JyA9PiBUUlVFLAogICAgICAgICdhcnJvdy10aXAtbGVuZ3RoJyA9PiAzLAog ICAgICAgICdhcnJvdy1sZW5ndGgnID0+IDQsCiAgICAgICAgJ2Fycm93LXdpZHRoJyA9PiAzLjUK ICAgICk7Cj1jdXQgICAgCgogICAgcmV0dXJuIFRSVUU7Cn0KCgoK --MP_/rp6sXgSkwnmYq_nlo/kDNcL-- From zentara1@sbcglobal.net Wed Jun 4 13:01:37 2008 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 0DA8A750244 for ; Wed, 4 Jun 2008 13:01:37 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.112 X-Spam-Level: X-Spam-Status: No, score=-1.112 tagged_above=-999 required=2 tests=[AWL=0.687, BAYES_00=-2.599, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [65535:49:1:68:M1460, N, W1, N, N, T, N, N, ?12:.:?:?] (up: 11112 hrs), (link: ethernet/modem), [68.142.229.104] 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 bbf1A1M2wo0H for ; Wed, 4 Jun 2008 13:01:30 +0000 (GMT) Received: from smtp101.sbc.mail.re2.yahoo.com (smtp101.sbc.mail.re2.yahoo.com [68.142.229.104]) by menubar.gnome.org (Postfix) with SMTP id B670075038A for ; Wed, 4 Jun 2008 13:01:17 +0000 (GMT) Received: (qmail 15860 invoked from network); 4 Jun 2008 13:01:15 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.89.27 with login) by smtp101.sbc.mail.re2.yahoo.com with SMTP; 4 Jun 2008 13:01:15 -0000 X-YMail-OSG: krBUHfAVM1mwpqOi8ms_YEz.pCKt7l6BXsgRa859ChS5uojiLGZlEVwMhRn1ANQbJhQPbwwKw7iJ1t89uUR0pcq0MQVsVry_cy6UdL3B_eC3LR0aq_UyP3uUpB4Iow2hYAlnslqMHtwiHiuTbDyGhWmX X-Yahoo-Newman-Property: ymail-3 Date: Wed, 4 Jun 2008 08:56:14 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Goo::Canvas updating a PolyLine Message-ID: <20080604085614.106ee40a@zentara.zentara.net> In-Reply-To: <20080603142451.4e6cd2d2@zentara.zentara.net> References: <20080603142451.4e6cd2d2@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2008 13:01:37 -0000 On Tue, 3 Jun 2008 14:24:51 -0400 zentara wrote: >Hi, I'm trying to convert a line-segment (waypoint) generator >that I made on a plain Gnome2::Canvas, to the Goo::Canvas. > >I can't seem to find the right method to update a line, and I'm >wondering if it's possible? The following won't allow some new >points to be added to a line, but I can undef the line and rebuild it. >That is not very efficient. > >I tried using $line->set(points=>), but it seems that the list of coordinate pairs >are an anonymous array_ref...... there dosn't seem to be a way of addressing >them. > >Anyone know how to update points in a PolyLine? > >See attachment. > >Thanks, > >zentara Well, I found a solution, and it involves a bit of juggling. First, you need to make a Goo::Canvas::Points object to hold the points, THEN you need to make the PolyLine with undef for the points, and set the points after line creation.... this gives the points array_ref the named property 'points'. Here is working code, with comments describing the solution. #!/usr/bin/perl -w use strict; use warnings; use Goo::Canvas; use Gtk2 '-init'; use Glib qw(TRUE FALSE); my $window = Gtk2::Window->new('toplevel'); $window->signal_connect('delete_event' => sub { Gtk2->main_quit; }); $window->set_default_size(640, 600); my $swin = Gtk2::ScrolledWindow->new; $swin->set_shadow_type('in'); $window->add($swin); my $canvas = Goo::Canvas->new(); $canvas->set_size_request(600, 450); $canvas->set_bounds(0, 0, 1000, 1000); $swin->add($canvas); my $root = $canvas->get_root_item(); $canvas->signal_connect('button-press-event', \&on_can_button_press); my $way_ref = [ 340, 170, 340, 230, 390, 230, 390, 170 ]; push @$way_ref,200,300; # shows pushing works #my $points = Goo::Canvas::Points->new([100, 100, 200, 200]); # instead of specifying anonymous array_ref in the PolyLine, # we create a Points object my $points = Goo::Canvas::Points->new($way_ref); my $line = Goo::Canvas::Polyline->new( $root, FALSE, undef, # points need to be set after creation 'stroke-color' => 'midnightblue', 'line-width' => 3, 'start-arrow' => TRUE, 'end-arrow' => TRUE, 'arrow-tip-length' => 3, 'arrow-length' => 4, 'arrow-width' => 3.5 ); # setting after line creation, sets the 'points' property by name $line->set(points => $points); $window->show_all(); Gtk2->main; sub on_can_button_press { my ( $widget, $event ) = @_; # print $widget ,' ',$event->type,"\n"; my ($x,$y) = ($event->x,$event->y); print "$x $y\n"; push @$way_ref,$x,$y; # won't work #$points->set(points => $way_ref); # Points can't be changed # need to create a new Points object my $points = Goo::Canvas::Points->new($way_ref); # now works since 'points' was added as a property above $line->set(points => $points); return TRUE; } __END__ zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From bounces@nabble.com Wed Jun 4 13:27:21 2008 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 F2CFF750205 for ; Wed, 4 Jun 2008 13:27:20 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.107 X-Spam-Level: X-Spam-Status: No, score=0.107 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_OPENWHOIS=1.13, TW_GT=0.077, WHOIS_MYPRIVREG=1.499] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 6015 hrs), (distance 20, link: ethernet/modem), [216.139.236.158] 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 7G5tgeT5hV5i for ; Wed, 4 Jun 2008 13:27:13 +0000 (GMT) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by menubar.gnome.org (Postfix) with ESMTP id 771EC7500B5 for ; Wed, 4 Jun 2008 13:27:12 +0000 (GMT) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1K3t1D-0001gr-6m for gtk-perl-list@gnome.org; Wed, 04 Jun 2008 06:27:11 -0700 Message-ID: <17646720.post@talk.nabble.com> Date: Wed, 4 Jun 2008 06:27:11 -0700 (PDT) From: jahwork To: gtk-perl-list@gnome.org Subject: Re: GLib install problem on Linux In-Reply-To: <1206469455.5696.2.camel@home.hcsiteeffak.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: matthias@hawran.net References: <1206469455.5696.2.camel@home.hcsiteeffak.de> X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2008 13:27:21 -0000 Torsten Schoenfeld wrote: > > On Tue, 2008-03-25 at 10:05 -0400, PR Kumar wrote: > >> /bin/sh: line 1: [: XS: unary operator expected > > That sounds like it comes from one of these Makefile rules: > > .xs.c: > $(NOECHO) $(ECHO) [ XS $< ] && $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) > $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c > > # --- MakeMaker xs_o section: > > .xs$(OBJ_EXT): > $(NOECHO) $(ECHO) [ XS $< ] && $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) > $*.xs > $*.xsc && $(MV) $*.xsc $*.c > $(NOECHO) $(ECHO) [ CC $< ] && $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" > $(PASTHRU_DEFINE) $(DEFINE) $*.c > > So... do you have 'echo' installed? What's the ECHO Makefile variable > set to for you? (Search for 'ECHO = ' in the generated Makefile.) If > you have 'echo' installed, what version is it? > > -- > Bye, > -Torsten > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > > I had the same error and google sent me here. I added the ECHO variable in the makefile and voila ! ECHO = echo Thanks, jahwork -- View this message in context: http://www.nabble.com/GLib-install-problem-on-Linux-tp16284716p17646720.html Sent from the Gtk+ - Perl mailing list archive at Nabble.com. From zentara1@sbcglobal.net Thu Jun 5 10:35:51 2008 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 3F07D750060 for ; Thu, 5 Jun 2008 10:35:51 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.273 X-Spam-Level: X-Spam-Status: No, score=-1.273 tagged_above=-999 required=2 tests=[AWL=0.837, BAYES_05=-1.11, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9442 hrs), (distance 15, link: ethernet/modem), [66.196.96.91] 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 0v22We6qLrMi for ; Thu, 5 Jun 2008 10:35:43 +0000 (GMT) Received: from smtp118.sbc.mail.re3.yahoo.com (smtp118.sbc.mail.re3.yahoo.com [66.196.96.91]) by menubar.gnome.org (Postfix) with SMTP id 2D4DB75024D for ; Thu, 5 Jun 2008 10:35:41 +0000 (GMT) Received: (qmail 8767 invoked from network); 5 Jun 2008 10:35:40 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.88.144 with login) by smtp118.sbc.mail.re3.yahoo.com with SMTP; 5 Jun 2008 10:35:39 -0000 X-YMail-OSG: RD3TWRcVM1nhy5k4kBUr_JNLmMyu5Z19OzSUYzWWfPSjGfYiC5uYijP7XuKlP90.eiJwG21HZx9RJV2WPy2Xk4TvovfcI2TTXxmjGSQqhO6el4TTy0vKnoWryLIAVvmJ_7lHpXQN5R1mY0GFLTyR.Dia X-Yahoo-Newman-Property: ymail-3 Date: Thu, 5 Jun 2008 06:31:19 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Goo::Canvas updating a PolyLine Message-ID: <20080605063119.0e6913ee@zentara.zentara.net> In-Reply-To: <20080604085614.106ee40a@zentara.zentara.net> References: <20080603142451.4e6cd2d2@zentara.zentara.net> <20080604085614.106ee40a@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2008 10:35:51 -0000 On Wed, 4 Jun 2008 08:56:14 -0400 zentara wrote: >On Tue, 3 Jun 2008 14:24:51 -0400 >zentara wrote: > >>Hi, I'm trying to convert a line-segment (waypoint) generator >>that I made on a plain Gnome2::Canvas, to the Goo::Canvas. If you want to see a working example, that includes zooming and saving the zoomed state, see: http://perlmonks.org?node_id=690211 zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From nadim@khemir.net Sat Jun 7 02:49:18 2008 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 C3358752A8C for ; Sat, 7 Jun 2008 02:49:18 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.029 X-Spam-Level: X-Spam-Status: No, score=-1.029 tagged_above=-999 required=2 tests=[AWL=-1.107, BAYES_50=0.001, TW_GT=0.077] 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 CksqTNHiflUA for ; Sat, 7 Jun 2008 02:49:10 +0000 (GMT) Received: from mail1.perspektivbredband.net (mail1.perspektivbredband.net [81.186.254.13]) by menubar.gnome.org (Postfix) with ESMTP id 1D61333073F for ; Fri, 6 Jun 2008 10:32:06 +0000 (GMT) Received: from khemir.net (h51bafc0a.c46-01-06.sta.perspektivbredband.net [81.186.252.10]) by mail1.perspektivbredband.net (Postfix) with ESMTP id 1EC1318E0181; Fri, 6 Jun 2008 12:32:02 +0200 (CEST) Received: from naquadim.khemir.lan (naquadim.khemir.lan [192.168.1.234]) by khemir.net (Postfix) with ESMTP id EB4645CA1B; Thu, 5 Jun 2008 08:54:10 +0200 (CEST) From: nadim khemir To: Adam Kennedy Subject: Re: Release: Camelbox 2008.120.0145Z Date: Thu, 5 Jun 2008 09:00:11 +0200 User-Agent: KMail/1.9.7 References: <200805311012.31348.nadim@khemir.net> <4841FDA8.2080606@cpan.org> In-Reply-To: <4841FDA8.2080606@cpan.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806050900.11499.nadim@khemir.net> Cc: camelbox@googlegroups.com, gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.8 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2008 02:49:18 -0000 On Sunday 01 June 2008 03.38.48 Adam Kennedy wrote: > I, for one, intend to make the very existence of camelbox superfluous by > making the reason for it neededing to exist go away. > I'm just not in a great hurry to do so. > Currently, GTK is not a problem anyone has apparently wanted solved > enough to do the work required to generate the appropriate packages for > Strawberry (or Chocolate) Perl. > > This is not something that will necessarily remain the case. While you are making CamelBox reason to exist desapear, a good thing, most of us are trying to make ActiveState reason to exist desapear. I believe ActiveState is now copying Strawberry and installing a compiler too. It would be nice to have a review of all windows distributions and a list of what they support or not. The situation, on the ground, is that people will often have AsctiveState installed because they know nothing about Strawberry or are afraid to use it (or not allowed by their managment). So we come and ask them to stop using something they believed was OK. Things get even more complicated when they are asked to install yet another perl distribution to run gtk based applications. Note that once you have multiple perl installed, running 'perl' runs only one of them making people bitter because nothing works as before. Since the status-quo is not one, I'll pray for a soon to come release with gtk support and deal with unhappy people in the mean time. I belive that is it is strategicly important to have support for a/multiple UI frameworks in Strawberry or any other distribution targetting Windows. I belive that we, the Perl community at large, have already been miscalculating the importance of that platform for the success of Perl. Cheers, Nadim. From adamkennedybackup@gmail.com Sat Jun 7 06:45:07 2008 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 3E01F7506F1 for ; Sat, 7 Jun 2008 06:45:07 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.033 X-Spam-Level: X-Spam-Status: No, score=-1.033 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, TW_GT=0.077] 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 op5tYKMmcJ9f for ; Sat, 7 Jun 2008 06:45:00 +0000 (GMT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by menubar.gnome.org (Postfix) with ESMTP id 875D07509F7 for ; Sat, 7 Jun 2008 05:42:17 +0000 (GMT) Received: by wf-out-1314.google.com with SMTP id 23so1223230wfg.9 for ; Fri, 06 Jun 2008 22:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=8a+nwBsaZsDeM02EE/vjRN+y10tU1i8otVBIUJ9Ah2s=; b=EOS74YNfyasT0b3PR150LtwNyJnVZbOZrSbIAbleQWpPQcGFb8E9HKPx4GWN+uNpPp Q0W+oDWdqUSgjljOALYf50pHwdq9ELUojZxokbbA6aq434xHPBzN8Ph8wnpsnjg+5lz8 ZngHHAQz0JWa6MYtlvQN50QteiFlaOjwKXzis= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=UIorggc41dCC+mrBG4J+gf5zp40QwjJRF+slvr2NCop51kWXvKrUJnv1uorDkB1h9w AdtVuahxsCiNCXaDRG8DMKlDaN6CQdR8Vm4a8dPtbjimLsTPEAzPEn/3afvYsCz83Lb9 qwKQOd6kCbwNoAEnf3AYYckbslt0RPoF8/JrU= Received: by 10.143.18.21 with SMTP id v21mr345549wfi.185.1212817335586; Fri, 06 Jun 2008 22:42:15 -0700 (PDT) Received: by 10.142.246.10 with HTTP; Fri, 6 Jun 2008 22:42:15 -0700 (PDT) Message-ID: Date: Sat, 7 Jun 2008 15:42:15 +1000 From: "Adam Kennedy" To: "nadim khemir" Subject: Re: Release: Camelbox 2008.120.0145Z In-Reply-To: <200806050900.11499.nadim@khemir.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200805311012.31348.nadim@khemir.net> <4841FDA8.2080606@cpan.org> <200806050900.11499.nadim@khemir.net> X-Mailman-Approved-At: Sun, 08 Jun 2008 20:41:57 +0000 Cc: camelbox@googlegroups.com, gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2008 06:45:07 -0000 I agree. With regards to ActivePerl, the reason the Vanilla (and later Strawberry) distributions were created in the first place was a lack of movement and response from ActiveState, including an email to me from them that said that they couldn't bundle the GCC compiler because parts of ActivePerl (their ActivePerl:: modules) were incompatible with the GPL. Since Strawberry has been created, they have started releasing new versions of ActivePerl closer to the official release dates, and if they have also moved to bundling a compiler now that represents another improvements that could arguably be attributed to Strawberry "raising the bar" and pushing them to compete. This is a good thing. I agree that getting the GUI frameworks to be supported better is needed, but for Strawberry at least, the "community" needs to drive this work. Certainly the community doesn't think it is important enough to have GTK working in Strawberry, or someone would have stepped up to do the work required. Unlike ActiveState at least, Strawberry is 100% open source, all the code is in open repositories, and there's nothing stopping anyone from doing it. Adam K 2008/6/5 nadim khemir : > On Sunday 01 June 2008 03.38.48 Adam Kennedy wrote: >> I, for one, intend to make the very existence of camelbox superfluous by >> making the reason for it neededing to exist go away. > >> I'm just not in a great hurry to do so. > >> Currently, GTK is not a problem anyone has apparently wanted solved >> enough to do the work required to generate the appropriate packages for >> Strawberry (or Chocolate) Perl. >> >> This is not something that will necessarily remain the case. > > While you are making CamelBox reason to exist desapear, a good thing, most of > us are trying to make ActiveState reason to exist desapear. I believe > ActiveState is now copying Strawberry and installing a compiler too. It would > be nice to have a review of all windows distributions and a list of what they > support or not. > > The situation, on the ground, is that people will often have AsctiveState > installed because they know nothing about Strawberry or are afraid to use it > (or not allowed by their managment). So we come and ask them to stop using > something they believed was OK. Things get even more complicated when they > are asked to install yet another perl distribution to run gtk based > applications. > > Note that once you have multiple perl installed, running 'perl' runs only one > of them making people bitter because nothing works as before. > > Since the status-quo is not one, I'll pray for a soon to come release with gtk > support and deal with unhappy people in the mean time. > > I belive that is it is strategicly important to have support for a/multiple UI > frameworks in Strawberry or any other distribution targetting Windows. I > belive that we, the Perl community at large, have already been miscalculating > the importance of that platform for the success of Perl. > > Cheers, Nadim. > > > > > > > From redtux1@googlemail.com Tue Jun 10 15:34:44 2008 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 E4D0B7501C2 for ; Tue, 10 Jun 2008 15:34:44 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.565 X-Spam-Level: X-Spam-Status: No, score=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 5698 hrs), (distance 12, link: (Google 2)), [64.233.166.183] 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 iKhvU91hHYTV for ; Tue, 10 Jun 2008 15:34:34 +0000 (GMT) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by menubar.gnome.org (Postfix) with ESMTP id C79EE7501CA for ; Tue, 10 Jun 2008 15:34:33 +0000 (GMT) Received: by py-out-1112.google.com with SMTP id a29so1056347pyi.36 for ; Tue, 10 Jun 2008 08:34:32 -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:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=MB8t6lu3DEScsbDpW3zTM0i7ZhEF7UMm/VoVDly0f7Y=; b=rbAYUNPDB3XzWzm/b+/pHPcoMbAx1jcuawmqTbSAaQMzx8jx6kHjn9RWImnV+mimRB yS5rDZGDw+OWm4tTp1BQqV9Vy+llwTPE5/5e1kHFADjgEf4UJxi6+rxiWRPf+FDS6vJY HmsZrjrOqr9vOseHrD+N9H/FmwqKD0z+oXqBk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=soW8MiDmFiAr8WLscplZFrpKSnpsnbMHKYDB4+78cg6RvnWYZKbPy+3tYsj7TIVzey 9YzLWxnVbXMNTw6yy91ymk9myxPHJu+HvNFB+tndQMlzNZNBJrzEtqjSX8JddS/amDIL 1IwppBdFv6lSf2NGnzpPZzjGMsGTWahuPK2rg= Received: by 10.115.46.9 with SMTP id y9mr5113463waj.23.1213112072039; Tue, 10 Jun 2008 08:34:32 -0700 (PDT) Received: by 10.114.170.6 with HTTP; Tue, 10 Jun 2008 08:34:32 -0700 (PDT) Message-ID: Date: Tue, 10 Jun 2008 16:34:32 +0100 From: "Mike Martin" To: gtk-perl-list@gnome.org Subject: Question about behaviour of foreach and Glib:IO-> add_handler MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2008 15:34:45 -0000 Hi I was always under the impression that a foreach loop iterated over a list sequentially, which in every other case at least seems to happen. However I have the following code sub encode_loop { my ($opts,$prog,$ext,$sel_opts_vbox)=@_; my $subname='encode'; foreach my $files1 (keys %files){ no strict 'refs'; if (${$files{$files1}}[0] eq $subname){ { my $prog=&run_cmd($files1,$opts,$prog,$ext,$subname,$sel_opts_vbox) ; } } } } Which runs the following sub-routine (abrev) for each file ($files above) sub run_cmd { $pid=open($file, "-|","$cmd{$subname} 2>&1") or die "Failed running perl subprocess\n"; my $end_mark; my $feedback_type=$options{'feedback'}; if ($feedback_type eq '1'){$end_mark=$buffer->create_mark('end',$buffer->get_end_iter,0); $buffer->signal_connect(insert_text=>sub{ $textview->scroll_to_mark($end_mark,0.0,1,0.0,1.0);}); }; our $tag= Glib::IO->add_watch ( fileno($file), ['in', 'hup'], sub { my ($fileno, $condition,$tag) = @_; if ($condition eq 'hup') { close $file; return 0; } my $line ; sysread $file, $line, 256; if ($feedback_type eq '0'){ $buffer->insert($buffer->get_end_iter,$line); $gtkend->set_text($line) } else { $buffer->insert($buffer->get_end_iter, $line); } return 1; } ); if ($feedback_type eq '1'){ $buffer->signal_connect(insert_text=>sub{ $textview->scroll_to_mark($end_mark,0.0,1,0.0,1.0);}); }; } However the sub is run for each file in parallel. Anyone have any idea how to force sequential mode? I suspect that it has something to do with the buffer/add_watch stuff returning immediately after read. As this program does video transcoding it would be nice to find a solution as the times are very long thanks From scott@asofyet.org Tue Jun 10 16:06:40 2008 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 90879750225 for ; Tue, 10 Jun 2008 16:06:40 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 1167 hrs), (distance 15, link: ethernet/modem), [208.97.187.133] 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 KSOvDQNiNsnv for ; Tue, 10 Jun 2008 16:06:35 +0000 (GMT) Received: from webmail3.sd.dreamhost.com (sd-green-dreamhost-133.dreamhost.com [208.97.187.133]) by menubar.gnome.org (Postfix) with ESMTP id 6C620750251 for ; Tue, 10 Jun 2008 16:06:23 +0000 (GMT) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail3.sd.dreamhost.com (Postfix) with ESMTP id 7C232142D1 for ; Tue, 10 Jun 2008 09:06:21 -0700 (PDT) Received: from 192.146.101.70 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Tue, 10 Jun 2008 12:06:21 -0400 (EDT) Message-ID: <45065.192.146.101.70.1213113981.squirrel@webmail.asofyet.org> In-Reply-To: References: Date: Tue, 10 Jun 2008 12:06:21 -0400 (EDT) Subject: Re: Question about behaviour of foreach and Glib:IO-> add_handler From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2008 16:06:40 -0000 Mike Martin wrote: > Hi > > I was always under the impression that a foreach loop iterated over a > list sequentially, which in every other case at least seems to happen. > > However I have the following code foreach file run command on file > Which runs the following sub-routine (abrev) for each file ($files above) > > sub run_cmd { > $pid=open($file, "-|","$cmd{$subname} 2>&1") or die "Failed running > perl subprocess\n"; This forks a child that runs concurrently.... [snip text buffer setup] > our $tag= Glib::IO->add_watch ( fileno($file), ['in', 'hup'], sub { [snip] } ); This installs a callback to be run by the main loop when data arrives on the file handle connected to the child's output, or when that file hangs up. > } And then you return. Which means that all run_cmd() actually does is fork the child and set up the main loop to listen to it. It does not wait, irrespective of what the callback does. > However the sub is run for each file in parallel. Anyone have any idea > how to force sequential mode? You need to keep the UI responsive while this is happening, so you must run a main loop. You can run a main loop at the end of run_cmd() to keep the control flow stopped there until either the child completes and kills the main loop, or a cancel button causes you to kill the child and quit that nested main loop. E.g.: sub run_cmd { my $file = open_child_process (...); Glib::IO->add_watch (fileno ($file), ['in', 'hup'], sub { my (undef, $cond) = @_; if (user_wants_to_cancel ()) { kill_child (); # let this proceed naturally; we'll get another # call with HUP next time around. } if ($cond >= 'in') { handle_the_input_data (); } if ($cond >= 'hup') { close ($file); # Kill the nested main loop, see below Gtk2->main_quit (); return FALSE; } return TRUE; }); # Now wait here for the IO watch to kill this nested main loop. Gtk2->main (); } -- muppet From dune@fluffigt.net Thu Jun 12 13:10:06 2008 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 69E8B7500BD for ; Thu, 12 Jun 2008 13:10:06 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 2978 hrs), (distance 24, link: ethernet/modem), [62.181.123.75] 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 CJYcooYr42ZK for ; Thu, 12 Jun 2008 13:09:37 +0000 (GMT) Received: from snowflake.fluffigt.net (snowflake.fluffigt.net [62.181.123.75]) by menubar.gnome.org (Postfix) with ESMTP id CAC5A7501BB for ; Thu, 12 Jun 2008 13:09:36 +0000 (GMT) Received: (qmail 27638 invoked from network); 12 Jun 2008 13:09:34 -0000 Received: from snowflake.fluffigt.net (HELO localhost) (62.181.123.75) by snowflake.fluffigt.net with SMTP; 12 Jun 2008 13:09:34 -0000 Received: from 81-232-35-225-no35.business.telia.com (81-232-35-225-no35.business.telia.com [81.232.35.225]) by epost.fluff.se (Horde MIME library) with HTTP; Thu, 12 Jun 2008 15:09:34 +0200 Message-ID: <20080612150934.7f55uw19a8c80g08@epost.fluff.se> Date: Thu, 12 Jun 2008 15:09:34 +0200 From: dune@fluffigt.net To: gtk-perl-list@gnome.org Subject: package Glib::String is not registered with GPerl MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.6) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2008 13:10:06 -0000 Hi! I have the following problem: I have a small Gtk2-application which runs fine with perl gtktest.pl but whenever I try to pack it together in a .exe I run in to problem. The creation of the exe-file is no problem but when I run it (even on the same computer as the one with my perl/gtk environment is fully installed) I get this error: "package Glib::String is not registered with GPerl at script/gtktest.pl line 30" And line 30 is "my $treemodel = Gtk2::TreeStore->new('Glib::String', 'Glib::Int');" This is a win32-environment and the following things are installed ActivePerl 5.8.8 build 822 Gtk+ Runtime Environment 2.8.20-1 ppms from lostmind.de (Glib: 1.142, Gtk2: 1.141) After the exe-file is created, I put the exe in a dir with *.dll from gtk\bin and still it wont work. I've also tried to create a basic par-file which I've filled with files whenever there was complaints of files beeing out of @INC. Any takes on this? TIA /fluff From kaffeetisch@gmx.de Fri Jun 13 10:42:05 2008 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 D86287500F6 for ; Fri, 13 Jun 2008 10:42:05 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_EG=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 147 hrs), (distance 25, link: ethernet/modem), [213.165.64.20] 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 hWaYbeRpYTIt for ; Fri, 13 Jun 2008 10:42:00 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 590F97500B0 for ; Fri, 13 Jun 2008 10:41:59 +0000 (GMT) Received: (qmail invoked by alias); 13 Jun 2008 10:41:57 -0000 Received: from port-212-202-34-118.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.34.118] by mail.gmx.net (mp042) with SMTP; 13 Jun 2008 12:41:57 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/SnIhZGOfSSKWfXqfNUOT8ks++7ebozHXGoUXq// zVukuLFewVl3gL Message-ID: <48524EF6.50000@gmx.de> Date: Fri, 13 Jun 2008 12:41:58 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: segv on mistaken bless References: <871w3j73ij.fsf@blah.blah> <48429B08.6060104@gmx.de> <87bq2kyaos.fsf@blah.blah> In-Reply-To: <87bq2kyaos.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2008 10:42:06 -0000 Kevin Ryde wrote: >> + if (!mg_find (SvRV (sv), PERL_MAGIC_ext)) >> + croak ("%s is not a proper Glib::Object " > > Looks promising. It occurred to me gperl_get_object repeats some of the > validity checks gperl_get_object_check has already done. Perhaps > there's a way to structure them to save a few cycles of duplication; at > worst I suppose maybe by separating them, if you know what I mean. Well, gperl_get_object still needs to be able to handle garbage input. The tests it currently does are the minimum to avoid segfaults, I think. Patch committed to both branches. -- Bye, -Torsten From gnome-gtk-perl-list@m.gmane.org Sat Jun 14 15:10:11 2008 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 A7D41750069 for ; Sat, 14 Jun 2008 15:10:11 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.74 X-Spam-Level: X-Spam-Status: No, score=-1.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 7466 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 Edhjt3QGNoUG for ; Sat, 14 Jun 2008 15:10:05 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id AD83B75000B for ; Sat, 14 Jun 2008 15:10:05 +0000 (GMT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1K7XOE-0001Eg-Pg for gtk-perl-list@gnome.org; Sat, 14 Jun 2008 15:10:02 +0000 Received: from adsl-69-234-208-140.dsl.irvnca.pacbell.net ([69.234.208.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2008 15:10:02 +0000 Received: from wa1ter by adsl-69-234-208-140.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2008 15:10:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: The syntax of Gnome2::Canvas::Line? Date: Sat, 14 Jun 2008 07:57:52 -0700 Lines: 19 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-208-140.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a2pre (X11/2008061406) Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 15:10:11 -0000 Hi list, This is an example from the tarball of how to draw a line: Gnome2::Canvas::Item->new ($group, 'Gnome2::Canvas::Line', points => [200.0, 0.0, 200.0, 450.0], fill_color => 'black', width_units => 4.0); My puzzle is why the syntax is any different from Rectangle, i.e. why use 'points' instead of x1,y1,x2,y2? Second, the use of brackets instead of () to describe points is a complete surprise to me. I'm new to perl and I've never seen that syntax used in any of the perldocs I've read (so far). What's the difference in this context between [] and ()? Thanks. From sergstesh@yahoo.com Sat Jun 14 15:25:51 2008 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 29374750069 for ; Sat, 14 Jun 2008 15:25:51 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.663 X-Spam-Level: X-Spam-Status: No, score=-1.663 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, L_P0F_Unix=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: FreeBSD 6.x (1) (up: 11318 hrs), (distance 12, link: ethernet/modem), [66.163.179.84] 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 EBJqI8g22XIK for ; Sat, 14 Jun 2008 15:25:42 +0000 (GMT) Received: from web35205.mail.mud.yahoo.com (web35205.mail.mud.yahoo.com [66.163.179.84]) by menubar.gnome.org (Postfix) with SMTP id 625FF750168 for ; Sat, 14 Jun 2008 15:25:42 +0000 (GMT) Received: (qmail 6977 invoked by uid 60001); 14 Jun 2008 15:25:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=VUbqnRKCP5+L2gHrgQiIGt4np+UGSZFOyUq1W6r9KnL6RPD4prfV2gf+i3Gd+0z9mk5qGB3sssjmrONj2wY6F0A3nZLE4523g4LRbQ3s+NsxouuPeEbe3y3CLrQR70dtrIp5PTC87tErX21Mvpy5Tpj9UaWMs208OB8S+3VasVU=; Received: from [87.69.49.127] by web35205.mail.mud.yahoo.com via HTTP; Sat, 14 Jun 2008 08:25:40 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Sat, 14 Jun 2008 08:25:40 -0700 (PDT) From: Sergei Steshenko Subject: Re: The syntax of Gnome2::Canvas::Line? To: gtk-perl-list@gnome.org, walt In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <881821.6843.qm@web35205.mail.mud.yahoo.com> X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: sergstesh@yahoo.com List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 15:25:51 -0000 Applications From Scratch: http://appsfromscratch.berlios.de/ --- On Sat, 6/14/08, walt wrote: > From: walt > Subject: The syntax of Gnome2::Canvas::Line? > To: gtk-perl-list@gnome.org > Date: Saturday, June 14, 2008, 7:57 AM > Hi list, > > This is an example from the tarball of how to draw a line: > > Gnome2::Canvas::Item->new ($group, > 'Gnome2::Canvas::Line', > points => [200.0, 0.0, 200.0, > 450.0], > fill_color => 'black', > width_units => 4.0); > > My puzzle is why the syntax is any different from > Rectangle, i.e. > why use 'points' instead of x1,y1,x2,y2? > > Second, the use of brackets instead of () to describe > points is > a complete surprise to me. I'm new to perl and > I've never seen > that syntax used in any of the perldocs I've read (so > far). > What's the difference in this context between [] and > ()? > > Thanks. > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list (...) means list; [...] means anonymous array reference. You'll have to read a tutorial on Perl references, but before you need to understand Perl in its referenceless part. Probably dealing with GUI stuff is too complex for a newbie. Regards, Sergei. From zentara1@sbcglobal.net Sat Jun 14 16:44:16 2008 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 772207500CD for ; Sat, 14 Jun 2008 16:44:16 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.281 X-Spam-Level: X-Spam-Status: No, score=-1.281 tagged_above=-999 required=2 tests=[AWL=0.829, BAYES_05=-1.11, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9664 hrs), (distance 15, link: ethernet/modem), [66.196.96.96] 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 35Sg0o0+H+LK for ; Sat, 14 Jun 2008 16:44:08 +0000 (GMT) Received: from smtp123.sbc.mail.re3.yahoo.com (smtp123.sbc.mail.re3.yahoo.com [66.196.96.96]) by menubar.gnome.org (Postfix) with SMTP id A7AA075000B for ; Sat, 14 Jun 2008 16:44:06 +0000 (GMT) Received: (qmail 90429 invoked from network); 14 Jun 2008 16:44:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=hbMXf1x4Mczq8bcvHEhArFweXjfcRzdOS8/kHoWKuKr6R3SoxDlcs3Fltm3oqLxwAvGoYi84EkM8l3Gpu2+AOx3ZXYp3aHqu/DPoXHdf6VFbiSmKYmJSApxzSOYE2lRILOx80QK1JoZAC6+7P+6AGM4cTme2RiSkDlwdwXlyMQA= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.166.182 with login) by smtp123.sbc.mail.re3.yahoo.com with SMTP; 14 Jun 2008 16:44:04 -0000 X-YMail-OSG: IRB7q54VM1new3Kn_suZ206hPPohA0cvzGbES8uzVrDwGQjhKsCxtEGAoQyJ8Cz4.2Ujfln51YLO.VXMJoWLm320.7_Xsx9qkcdGPCaWeWTFgbD5IubZrLvxoJt4yk6NXe2Kn.cAfdRH8N57d0z4i_Y0 X-Yahoo-Newman-Property: ymail-3 Date: Sat, 14 Jun 2008 12:39:12 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: The syntax of Gnome2::Canvas::Line? Message-ID: <20080614123912.0a3fcdf5@zentara.zentara.net> In-Reply-To: References: X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 16:44:16 -0000 On Sat, 14 Jun 2008 07:57:52 -0700 walt wrote: >Hi list, > >This is an example from the tarball of how to draw a line: > >Gnome2::Canvas::Item->new ($group, > 'Gnome2::Canvas::Line', > points => [200.0, 0.0, 200.0, 450.0], > fill_color => 'black', > width_units => 4.0); > >My puzzle is why the syntax is any different from Rectangle, i.e. >why use 'points' instead of x1,y1,x2,y2? > >Second, the use of brackets instead of () to describe points is >a complete surprise to me. I'm new to perl and I've never seen >that syntax used in any of the perldocs I've read (so far). >What's the difference in this context between [] and ()? Look at this example. The points option allows you to change them later by modifying the arrayref. The difference from the rect is you can have as many point pairs as you want. In general, Lines on a canvas is a general purpose curve. The curve can be smoothed or angular (different canvas widgets handle smotthing differently, Tk and Zinc will let you smooth any set of line points to make bezier curves.) I just posted a recent question about making polylines on a Goo::Canvas, and it was a bit tricky, because it didn't setup the points option by default, requiring you to create the polyline with the points undef, and then set the points option after creation my $line = Goo::Canvas::Polyline->new( $root, FALSE, undef, # points need to be set after creation 'stroke-color' => 'black', 'line-width' => 3, 'start-arrow' => TRUE, 'end-arrow' => TRUE, 'arrow-tip-length' => 3, 'arrow-length' => 4, 'arrow-width' => 3.5 ); # setting after line creation, sets the 'points' property by name $line->set(points => $points); But............. Gnome2::Canvas::Line makes it easier by setting the points option as default. #!/usr/bin/perl use warnings; use strict; use Gtk2 -init; use Gnome2::Canvas; my $window = Gtk2::Window->new; $window->signal_connect( destroy => sub { exit } ); my $scroller = Gtk2::ScrolledWindow->new; my $canvas = Gnome2::Canvas->new(); $scroller->add( $canvas ); $window->add( $scroller ); $window->set_default_size( 500, 500 ); #if scrollregion is smaller than default size, odd # coordinate problems occur #$canvas->set_scroll_region( -20, -20, 400, 400 ); #bad $canvas->set_scroll_region( 0, 0, 700, 700 ); $window->show_all; my $root = $canvas->root; #$root->move(-50,-50); my $text = Gnome2::Canvas::Item->new( $root, 'Gnome2::Canvas::Text', x => 20, y => 15, fill_color => 'black', font => 'Sans 14', anchor => 'GTK_ANCHOR_NW', text => 'Click to add waypoint' ); $canvas->signal_connect (event => \&event_handler); my $points = [10,10,100,100,250,50]; my $line2= Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Line', points => $points, fill_color => "red", width_units => 3.0, cap_style => 'projecting', join_style => 'miter', ); my $p = $line2->get('points'); print "@$p\n"; my ($x,$y) = @$p; Gtk2->main; ############################## sub event_handler{ my ( $widget, $event ) = @_; # print $widget ,' ',$event->type,"\n"; if ( $event->type eq "button-press" ) { print 'x->',$event->x,' ','y->',$event->y,"\n"; my ($x,$y) = ($event->x,$event->y); # my (undef, $x, $y, $state) = $event->window->get_pointer; print "$x $y\n"; push @$points,$event->x , $event->y; $line2->set(points=>$points); my $p = $line2->get('points'); print "@$p\n"; } } __END__ zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From gnome-gtk-perl-list@m.gmane.org Sat Jun 14 18:37:23 2008 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 7D34E75010E for ; Sat, 14 Jun 2008 18:37:23 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.599 X-Spam-Level: X-Spam-Status: No, score=-3.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 7501 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 rFgpE+ns72JJ for ; Sat, 14 Jun 2008 18:37:17 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 694D27500C8 for ; Sat, 14 Jun 2008 18:37:17 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K7ack-0000UJ-I2 for gtk-perl-list@gnome.org; Sat, 14 Jun 2008 18:37:14 +0000 Received: from adsl-69-234-216-90.dsl.irvnca.pacbell.net ([69.234.216.90]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2008 18:37:14 +0000 Received: from wa1ter by adsl-69-234-216-90.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jun 2008 18:37:14 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: The syntax of Gnome2::Canvas::Line? Date: Sat, 14 Jun 2008 11:37:04 -0700 Lines: 28 Message-ID: References: <20080614123912.0a3fcdf5@zentara.zentara.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-216-90.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a2pre (X11/2008061406) In-Reply-To: <20080614123912.0a3fcdf5@zentara.zentara.net> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2008 18:37:23 -0000 zentara wrote: > ... > > I just posted a recent question about making polylines on a Goo::Canvas, > ... Yes, thanks! Without it I don't think I would have found the example I cited in my question. > Gnome2::Canvas::Line makes it easier by setting the points option as default. > > ... > my $points = [10,10,100,100,250,50]; > > my $line2= Gnome2::Canvas::Item->new ($root, > 'Gnome2::Canvas::Line', > points => $points, Hm. That example would have been very helpful if I'd seen it earlier. I don't see it in the sourceforge online docs -- did you write it yourself? Speaking of docs, the online docs do refer to Gnome2::Canvas::Points. Does that imply the existence of a Points.pod file somewhere? I can't find it anywhere online or in the Canvas tarball. Thanks also to Sergei for a very helpful reply. The README has lots to say about anonymous references and hashes that will help me a lot. I'm off to read it now. From zentara1@sbcglobal.net Sun Jun 15 10:54:41 2008 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 CD217750107 for ; Sun, 15 Jun 2008 10:54:41 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.132 X-Spam-Level: X-Spam-Status: No, score=-1.132 tagged_above=-999 required=2 tests=[AWL=0.667, BAYES_00=-2.599, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [65535:49:1:68:M1460,N,W1,N,N,T,N,N,?12:.:?:?] (up: 1972 hrs), (link: ethernet/modem), [68.142.229.98] 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 veTmRocJERFA for ; Sun, 15 Jun 2008 10:54:35 +0000 (GMT) Received: from smtp107.sbc.mail.re2.yahoo.com (smtp107.sbc.mail.re2.yahoo.com [68.142.229.98]) by menubar.gnome.org (Postfix) with SMTP id 1B8D47500A4 for ; Sun, 15 Jun 2008 10:54:32 +0000 (GMT) Received: (qmail 70868 invoked from network); 15 Jun 2008 10:54:31 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=k+4HGc2hI/bCs09KRel9yjnEYyVCLhWAEWXBVaWCTl/3ZzRCcHMrqc8nEsCESWehjrnNxcSzsYJiq8H0I/qPx5ms92tfQgYbZN2eFbrg4rQ4BnMKw/Uth1hRjwKt4E4JCV+qon/9sgFu/Q16FAmLACwrZEnajrwBs38RXwl5DEw= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.115.219 with login) by smtp107.sbc.mail.re2.yahoo.com with SMTP; 15 Jun 2008 10:54:31 -0000 X-YMail-OSG: 3WrIz6MVM1kVdu_yVFGTXyK8lKyVb9eWUPb00z4vYHCpzJx5VPOUNi3908oEamKzs4H4v7ofDO9iI5yei4g2BZt0gi_LJ7pNpFfyEsr1IB6g4YOfYKDWrP55M1Mdf.KkjWplxe0ZSignXLLZTg-- X-Yahoo-Newman-Property: ymail-3 Date: Sun, 15 Jun 2008 06:49:42 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: The syntax of Gnome2::Canvas::Line? Message-ID: <20080615064942.00f2fbd3@zentara.zentara.net> In-Reply-To: References: <20080614123912.0a3fcdf5@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2008 10:54:42 -0000 On Sat, 14 Jun 2008 11:37:04 -0700 walt wrote: >zentara wrote: >> ... >> >> I just posted a recent question about making polylines on a Goo::Canvas, >> ... > >Yes, thanks! Without it I don't think I would have found the example I >cited in my question. > >> Gnome2::Canvas::Line makes it easier by setting the points option as default. >> >> ... >> my $points = [10,10,100,100,250,50]; >> >> my $line2= Gnome2::Canvas::Item->new ($root, >> 'Gnome2::Canvas::Line', >> points => $points, > >Hm. That example would have been very helpful if I'd seen it earlier. >I don't see it in the sourceforge online docs -- did you write it yourself? I took it out of the demo, and modified it. The demos are where you find the real code examples. I just take what is in the demo, and start experimenting.... working around error messages, until I find what works. > >Speaking of docs, the online docs do refer to Gnome2::Canvas::Points. Does >that imply the existence of a Points.pod file somewhere? I can't find it >anywhere online or in the Canvas tarball. I havn't seen docs for Gnome2::Canvas::Points. But I would assume it is just an object wrapper for the array reference of point pairs. Goo::Canvas has a doc for Points, but it is basically empty. As you can see from my PolyLine waypoint example, Goo::Canvas::Points is just an object wrapper around the array_ref. It only has the new method, and dosn't seem to allow modification. The problem being that a Goo PolyLine needs a Points object to modify the line, it won't just let you redefine the array_ref. Whereas the Gnome2::Canvas::Line does allow modification of the array_ref without the object wrapper. But the Goo is still in development, so I let it slide. :-) I'm just glad the author has made a Perl module for it. zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From scott@asofyet.org Sun Jun 15 16:18:49 2008 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 85E4D75000B for ; Sun, 15 Jun 2008 16:18:49 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 1262 hrs), (distance 18, link: ethernet/modem), [208.113.200.5] 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 tJRQ3kC1VP8A for ; Sun, 15 Jun 2008 16:18:43 +0000 (GMT) Received: from looneymail-a3.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 9661C750107 for ; Sun, 15 Jun 2008 16:18:39 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id E079627E21; Sun, 15 Jun 2008 09:18:31 -0700 (PDT) Message-Id: <747D276B-695B-4818-B54D-A9B06E7600DA@asofyet.org> From: muppet To: walt In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: The syntax of Gnome2::Canvas::Line? Date: Sun, 15 Jun 2008 12:18:32 -0400 References: <20080614123912.0a3fcdf5@zentara.zentara.net> X-Mailer: Apple Mail (2.924) Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2008 16:18:49 -0000 On Jun 14, 2008, at 2:37 PM, walt wrote: > Speaking of docs, the online docs do refer to > Gnome2::Canvas::Points. Does > that imply the existence of a Points.pod file somewhere? I can't > find it > anywhere online or in the Canvas tarball. GnomeCanvas's C API has a Point data structure, and methods to deal with arrays of these things. In perl, such stuff is really annoying, because it's much easier and more natural to use native perl arrays and data structures. So, the bindings map the GnomeCanvasPoint to an array reference, and the Gnome::Canvas::Points package exists only as an implementation detail --- it should be hidden from the docs. Oops. http://gtk2-perl.cvs.sourceforge.net/gtk2-perl/gtk2-perl-xs/GnomeCanvas/xs/GnomeCanvasUtil.xs?revision=1.7&view=markup If the [] style arrays are giving you trouble, i recommend reading perlref and the Data Structures Cookbook, perldsc. You really can't use gtk2-perl effectively without understanding perl data structures intimately. -- I've been using emacs for 20+ years and have barely touched lisp. I wouldn't know lambda calculus if it took all its clothes off and waved a placard that reads "I am lambda calculus" in blinking 48-point Comic Sans. -- Dave Hodgkinson, on london.pm From gnome-gtk-perl-list@m.gmane.org Sun Jun 15 21:36:45 2008 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 AC7F1750150 for ; Sun, 15 Jun 2008 21:36:45 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.922 X-Spam-Level: X-Spam-Status: No, score=-0.922 tagged_above=-999 required=2 tests=[BAYES_50=0.001, RCVD_IN_DNSWL_LOW=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 7771 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 o74kMyddj-oS for ; Sun, 15 Jun 2008 21:36:39 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 9D6957501EF for ; Sun, 15 Jun 2008 21:36:38 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K7zto-0004VP-Uo for gtk-perl-list@gnome.org; Sun, 15 Jun 2008 21:36:33 +0000 Received: from adsl-69-234-177-12.dsl.irvnca.pacbell.net ([69.234.177.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Jun 2008 21:36:32 +0000 Received: from wa1ter by adsl-69-234-177-12.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 15 Jun 2008 21:36:32 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: The syntax of Gnome2::Canvas::Line? Date: Sun, 15 Jun 2008 14:36:23 -0700 Lines: 15 Message-ID: References: <20080614123912.0a3fcdf5@zentara.zentara.net> <747D276B-695B-4818-B54D-A9B06E7600DA@asofyet.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-177-12.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a2pre (X11/2008061504) In-Reply-To: <747D276B-695B-4818-B54D-A9B06E7600DA@asofyet.org> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2008 21:36:45 -0000 muppet wrote: > ... > If the [] style arrays are giving you trouble, i recommend reading > perlref and the Data Structures Cookbook, perldsc. You really can't use > gtk2-perl effectively without understanding perl data structures > intimately. Wow, muppet, Sergei, zentara, you folks are wonderful. Thanks to your great help I'm now looking at a bar chart of the Dow Jones Industrial Average from 1929 to today :o) Of course I still have a long way to go, but to get this far in less than a week is beyond my expectations. Many of my remaining questions are about perl, not about gtk, so where would you go for advice when/if you can't understand the perl docs? From grant@mclean.net.nz Sun Jun 15 23:04:01 2008 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 5F6E27500EE for ; Sun, 15 Jun 2008 23:04:01 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.055 X-Spam-Level: X-Spam-Status: No, score=-1.055 tagged_above=-999 required=2 tests=[AWL=-1.056, BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 7814 hrs), (distance 16, link: ethernet/modem), [219.88.242.54] 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 F2bp00E+0tAO for ; Sun, 15 Jun 2008 23:03:52 +0000 (GMT) Received: from mx4.orcon.net.nz (mx4.orcon.net.nz [219.88.242.54]) by menubar.gnome.org (Postfix) with ESMTP id 2F71C750030 for ; Sun, 15 Jun 2008 23:03:51 +0000 (GMT) Received: from Debian-exim by mx4.orcon.net.nz with local (Exim 4.68) (envelope-from ) id 1K81GF-0001tj-Lw for gtk-perl-list@gnome.org; Mon, 16 Jun 2008 11:03:47 +1200 Received: from 60-234-224-18.bitstream.orcon.net.nz ([60.234.224.18] helo=[192.168.87.234]) by mx4.orcon.net.nz with esmtp (Exim 4.68) (envelope-from ) id 1K81GB-0001rg-27 for gtk-perl-list@gnome.org; Mon, 16 Jun 2008 11:03:45 +1200 Subject: Re: The syntax of Gnome2::Canvas::Line? From: Grant McLean To: gtk-perl-list@gnome.org In-Reply-To: References: <20080614123912.0a3fcdf5@zentara.zentara.net> <747D276B-695B-4818-B54D-A9B06E7600DA@asofyet.org> Content-Type: text/plain Date: Mon, 16 Jun 2008 11:03:23 +1200 Message-Id: <1213571003.11778.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-DSPAM-Check: by mx4.orcon.net.nz on Mon, 16 Jun 2008 11:03:47 +1200 X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Jun 16 11:03:47 2008 X-DSPAM-Confidence: 0.9900 X-DSPAM-Probability: 0.0000 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2008 23:04:01 -0000 On Sun, 2008-06-15 at 14:36 -0700, walt wrote: > Many of my remaining questions are about perl, not about gtk, so where > would you go for advice when/if you can't understand the perl docs? With regard to understanding references, there is a references tutorial in the documentation that ships with Perl. You can read it with this command: perldoc perlreftut Or online here: http://search.cpan.org/dist/perl/pod/perlreftut.pod As far as asking questions goes, I'd heartily recommend Perl Monks. It's perhaps not the world's most beautifully designed web site but there are plenty of knowledgeable folk in many different timezones eager to answer questions around the clock: http://www.perlmonks.org/ Chances are your question has been answered before, so you might find an answer with Super Search: http://www.perlmonks.org/index.pl?node=Super%20Search Failing that, you can go to the 'Seekers of Perl Wisdom' section and pose your question there: http://www.perlmonks.org/index.pl?node=Seekers%20of%20Perl%20Wisdom Cheers Grant From sergstesh@yahoo.com Mon Jun 16 00:29:25 2008 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 4F6EB75008C for ; Mon, 16 Jun 2008 00:29:25 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.108 X-Spam-Level: X-Spam-Status: No, score=-1.108 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, L_P0F_Unix=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: FreeBSD 6.x (1) (up: 11648 hrs), (distance 17, link: ethernet/modem), [66.163.179.81] 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 RHC-pbq1e32f for ; Mon, 16 Jun 2008 00:29:12 +0000 (GMT) Received: from web35202.mail.mud.yahoo.com (web35202.mail.mud.yahoo.com [66.163.179.81]) by menubar.gnome.org (Postfix) with SMTP id 70D69750030 for ; Mon, 16 Jun 2008 00:29:12 +0000 (GMT) Received: (qmail 78045 invoked by uid 60001); 16 Jun 2008 00:29:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=efn6vwkOUYlle5mHOfJmG7EPK4rpU8Yof41idMzlR1a8Kst3iB7ieRdo+QLDVX8E0+FiygBUb4/zu45Fa32ep2BVAIkYutv6mQGuoQw3ZAkgDOCEP+fZmq4v7e4olfr6EUy4BgqHI3grSlfizAKa0ttN4yXVwaBUfNkWXqLqYpI=; Received: from [87.69.49.127] by web35202.mail.mud.yahoo.com via HTTP; Sun, 15 Jun 2008 17:29:10 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Sun, 15 Jun 2008 17:29:10 -0700 (PDT) From: Sergei Steshenko Subject: Re: The syntax of Gnome2::Canvas::Line? To: gtk-perl-list@gnome.org, walt In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <630697.77772.qm@web35202.mail.mud.yahoo.com> X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: sergstesh@yahoo.com List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 00:29:25 -0000 Applications From Scratch: http://appsfromscratch.berlios.de/ --- On Sun, 6/15/08, walt wrote: > From: walt > Subject: Re: The syntax of Gnome2::Canvas::Line? > To: gtk-perl-list@gnome.org > Date: Sunday, June 15, 2008, 2:36 PM > muppet wrote: > > > ... > > If the [] style arrays are giving you trouble, i > recommend reading > > perlref and the Data Structures Cookbook, perldsc. You > really can't use > > gtk2-perl effectively without understanding perl data > structures > > intimately. > > Wow, muppet, Sergei, zentara, you folks are wonderful. > Thanks to your > great help I'm now looking at a bar chart of the Dow > Jones Industrial > Average from 1929 to today :o) Of course I still have a > long way to > go, but to get this far in less than a week is beyond my > expectations. > > Many of my remaining questions are about perl, not about > gtk, so where > would you go for advice when/if you can't understand > the perl docs? > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list Personal advice WRT references: for the beginning, forget about "->" as a way to dereference. Remember just _one_ simple rule: reference inside a pair of curlies behaves like regular name. Examples: use strict; my %hash = ( one => 1, two => 2 ); warn "\$hash{one}=$hash{one}"; will print 1 my $hash_ref = \%hash; warn "\${\$hash_ref}{one}=${$hash_ref}"; # will also print 1 . The point is that hash is equivalent to {$hash_ref} - as I wrote above. The same rule applies to array and code references. Regards, Sergei. From gg@zip.com.au Mon Jun 16 00:40:07 2008 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 6DDC675008C for ; Mon, 16 Jun 2008 00:40:07 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1787 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 q2lmhYJchc32 for ; Mon, 16 Jun 2008 00:40:01 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 911BD750030 for ; Mon, 16 Jun 2008 00:40:00 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 7372239FA0B for ; Mon, 16 Jun 2008 10:39:57 +1000 (EST) Received: from blah.blah (ppp25F3.dyn.pacific.net.au [61.8.37.243]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 4F9D427428 for ; Mon, 16 Jun 2008 10:39:56 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K82kq-00023z-EJ for gtk-perl-list@gnome.org; Mon, 16 Jun 2008 10:39:28 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: GParamSpec further funcs Mail-Copies-To: never Date: Mon, 16 Jun 2008 10:39:28 +1000 Message-ID: <87zlpm43i7.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 00:40:07 -0000 --=-=-= I was having a nose around some of the Glib::ParamSpec bits and wondered if g_param_value_set_default() could do the work for $paramspec->get_default_value. Or is there some magic in the current dispatch? I tried the couple of lines below which seem to work, though bools may come out different from gperl_sv_from_value(). I also wondered if there'd be some value in g_param_value_validate and/or g_param_values_cmp. I was tinkering with some comparing for my "ConnectProperties". g_param_values_cmp looks like it respects the "epsilon" in float and double, though it also looks pretty useless on boxed types (just a pointer compare). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=GParamSpec.xs.g_param.diff --- GParamSpec.xs 18 Oct 2005 05:26:09 +1000 1.23 +++ GParamSpec.xs 16 Jun 2008 10:27:37 +1000 @@ -288,6 +288,73 @@ const gchar* g_param_spec_get_blurb (GParamSpec * pspec) +MODULE = Glib::ParamSpec PACKAGE = Glib::ParamSpec PREFIX = g_param_ + +SV * +g_param_xxx_get_default_value (GParamSpec * pspec) + PREINIT: + GValue v = { 0, }; + GType type; + CODE: + type = G_PARAM_SPEC_VALUE_TYPE (pspec); + g_value_init (&v, type); + g_param_value_set_default (pspec, &v); + RETVAL = gperl_sv_from_value (&v); + g_value_unset (&v); + OUTPUT: + RETVAL + +=for apidoc + +=signature bool = $paramspec->value_validate (value) + +=signature (bool, newval) = $paramspec->value_validate (value) + +In scalar context return a boolean indicating whether $value is valid +for $paramspec. In array context return also a new value which is +$value modified to be valid, which means for instance clamped to the +minimum/maximum, etc. + +=cut +void +g_param_value_validate (GParamSpec * pspec, SV *value) + PREINIT: + GValue v = { 0, }; + GType type; + int ret; + PPCODE: + type = G_PARAM_SPEC_VALUE_TYPE (pspec); + g_value_init (&v, type); + gperl_value_from_sv (&v, value); + ret = g_param_value_validate (pspec, &v); + EXTEND (SP, 2); + PUSHs (sv_2mortal (boolSV (ret))); + if (GIMME_V == G_ARRAY) + PUSHs (sv_2mortal (gperl_sv_from_value (&v))); + g_value_unset (&v); + +int +g_param_values_cmp (GParamSpec * pspec, SV *value1, SV *value2) + PREINIT: + GValue v1 = { 0, }; + GValue v2 = { 0, }; + GType type; + CODE: + type = G_PARAM_SPEC_VALUE_TYPE (pspec); + g_value_init (&v1, type); + g_value_init (&v2, type); + gperl_value_from_sv (&v1, value1); + gperl_value_from_sv (&v2, value2); + RETVAL = g_param_values_cmp (pspec, &v1, &v2); + g_value_unset (&v1); + g_value_unset (&v2); + OUTPUT: + RETVAL + +## gboolean g_value_type_compatible (GType src_type, GType dest_type); +## gboolean g_value_type_transformable (GType src_type, GType dest_type); + +MODULE = Glib::ParamSpec PACKAGE = Glib::ParamSpec PREFIX = g_param_spec_ ## stuff from gparamspecs.h --=-=-=-- From daniel.gaston@gmail.com Mon Jun 16 15:18:28 2008 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 482C075008C for ; Mon, 16 Jun 2008 15:18:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_XT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 11481 hrs), (distance 17, link: (Google 2)), [209.85.128.190] 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 a-oDDiq8qMDP for ; Mon, 16 Jun 2008 15:18:23 +0000 (GMT) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.190]) by menubar.gnome.org (Postfix) with ESMTP id 731D8750159 for ; Mon, 16 Jun 2008 15:18:18 +0000 (GMT) Received: by fk-out-0910.google.com with SMTP id k31so3394717fkk.15 for ; Mon, 16 Jun 2008 08:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=Xfo32bz/IUmJjRjNBha+0HyY1qlED8YkpAHkZVTgniM=; b=au+cp/LQZ+QkafMNuWFK2+gzsmG7KCR1Fi0rMWzkBkdp5YULbrvRZBdHdHgG1A6KdY h+Dc59g03kUtD60ynvT8I4gTZrtupTpiwmIJKznbZaPBzuOQz7OWS8kAxIe1IxRRbVSu DZvf1DE0E1FtZUEA+76t5lw6JAKMUOs5ue8Ko= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=ZCLU3lUjAaUQa8fHELVLxKKxKYCmq19HbqAD3nC+DdJebSxKZi84shD67A6EmKOVDO WBHJRiiSUN2ummXYTfPL3sUZilpkPt/REkUtwgw1U5Izdgl680F6l0Rtd0dyTTqol6Ed Oaq8I+oPEwajV2S3JdP9JT5G6hqXB+5Np4nQw= Received: by 10.82.138.6 with SMTP id l6mr383935bud.34.1213629495699; Mon, 16 Jun 2008 08:18:15 -0700 (PDT) Received: by 10.82.173.15 with HTTP; Mon, 16 Jun 2008 08:18:15 -0700 (PDT) Message-ID: <50c615ba0806160818u26103ad5le0b2d16c7cf12326@mail.gmail.com> Date: Mon, 16 Jun 2008 12:18:15 -0300 From: "Daniel Gaston" To: gtk-perl-list@gnome.org Subject: Subclassing TextBuffer MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19_26516510.1213629495691" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 15:18:28 -0000 ------=_Part_19_26516510.1213629495691 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, this is my first message to the group although as I was starting out this project I have found the archives to be quite helpful. Right now I am attempting to subclass from Gtk2::TextBuffer so that I can intercept delete and insertion signals in order to perform different actions under different conditions. Right now I have the following: #!/usr/bin/perl -w use strict; package EditorBuffer; use Gtk2; use Glib::Object::Subclass Gtk2::TextBuffer::, signals => { insert_text => sub { my ($self, $iter, $string) = @_; if ($string) { print "Inserting Text!\n"; print "$iter\n"; $self -> signal_chain_from_overridden($self -> get_end_iter(), $string, length($string)); }else{ $self -> signal_chain_from_overridden($iter, $string, length($string)); } }, delete_range => sub { my ($self, $start_iter, $end_iter) = @_; print "Deleting Text!\n"; self -> signal_chain_from_overridden($start_iter, $end_iter); }, }; If I call this in my main code and build essentially a blank TextView it works fine, whenever I insert text it prints the "Insert Text" test from the if($string) block and prints the string. However if I try and delete text in the TextView I get an error, unable to load signal_chain_from_overridden from package 'self'. The other error is that I have a method in my main program that, if the script is run with a text file as a command line argument it will load that text file in the TextView with some tags (colouring that works a lot like Syntax highlighting). Like so: $buffer -> insert_with_tags_by_name($buffer -> get_end_iter, "$residue", "$color") When I try and do that I get the following warnings: Gtk-WARNING **: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created. You must use marks, character numbers, or line numbers to preserve a position across buffer modifications. You can apply tags and insert marks without invalidating your iterators, but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset) will invalidate all outstanding iterators at editor.pl line 295. Gtk-CRITICAL **: gtk_text_buffer_apply_tag: assertion `gtk_text_iter_get_buffer (end) == buffer' failed at editor.pl line 295. Inserting Text! Gtk2::TextIter=SCALAR(0xa66a158) After it has gone through this for everything it needs to enter (each string in an array) it loads the contents but without the colour tags. Prior to attempting to subclass TextBuffer I did have a functional program that displayed the given text with the colour tags, etc. None of that code has changed only that I use EditorBuffer instead of TextBuffer and create the Textview like so: my $al_buffer = EditorBuffer -> new(); my $alignment = Gtk2::TextView -> new_with_buffer($al_buffer); Anyone have any ideas what I am missing here? Thank you, Dan ------=_Part_19_26516510.1213629495691 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, this is my first message to the group although as I was starting out this project I have found the archives to be quite helpful.

Right now I am attempting to subclass from Gtk2::TextBuffer so that I can intercept delete and insertion signals in order to perform different actions under different conditions. Right now I have the following:

#!/usr/bin/perl -w

use strict;

package EditorBuffer;

use Gtk2;

use Glib::Object::Subclass
    Gtk2::TextBuffer::,
    signals => {
        insert_text => sub {
            my ($self, $iter, $string) = @_;
            if ($string) {
                print "Inserting Text!\n";
                print "$iter\n";
                $self -> signal_chain_from_overridden($self -> get_end_iter(),
                                                      $string, length($string));
            }else{
                $self -> signal_chain_from_overridden($iter, $string,
                                                       length($string));
           }
        },
       
        delete_range => sub {
            my ($self, $start_iter, $end_iter) = @_;
            print "Deleting Text!\n";
            self -> signal_chain_from_overridden($start_iter, $end_iter);
        },
    };


If I call this in my main code and build essentially a blank TextView it works fine, whenever I insert text it prints the "Insert Text" test from the if($string) block and prints the string. However if I try and delete text in the TextView I get an error, unable to load signal_chain_from_overridden from package 'self'.

The other error is that I have a method in my main program that, if the script is run with a text file as a command line argument it will load that text file in the TextView with some tags (colouring that works a lot like Syntax highlighting). Like so:

$buffer -> insert_with_tags_by_name($buffer -> get_end_iter,
                                                "$residue",
                                                "$color")

When I try and do that I get the following warnings:

Gtk-WARNING **: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators at editor.pl line 295.
Gtk-CRITICAL **: gtk_text_buffer_apply_tag: assertion `gtk_text_iter_get_buffer (end) == buffer' failed at editor.pl line 295.
Inserting Text!
Gtk2::TextIter=SCALAR(0xa66a158)

After it has gone through this for everything it needs to enter (each string in an array) it loads the contents but without the colour tags.

Prior to attempting to subclass TextBuffer I did have a functional program that displayed the given text with the colour tags, etc. None of that code has changed only that I use EditorBuffer instead of TextBuffer and create the Textview like so:

my $al_buffer = EditorBuffer -> new();
my $alignment = Gtk2::TextView -> new_with_buffer($al_buffer);

Anyone have any ideas what I am missing here?

Thank you,

Dan

------=_Part_19_26516510.1213629495691-- From scott@asofyet.org Mon Jun 16 17:38:34 2008 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 2A15A75006E for ; Mon, 16 Jun 2008 17:38:34 +0000 (GMT) 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_05=-1.11] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 1134 hrs), (distance 17, link: ethernet/modem), [208.97.187.133] 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 TRLmjvAbLr0C for ; Mon, 16 Jun 2008 17:38:24 +0000 (GMT) Received: from webmail6.dreamhost.com (sd-green-dreamhost-133.dreamhost.com [208.97.187.133]) by menubar.gnome.org (Postfix) with ESMTP id 854A17500EE for ; Mon, 16 Jun 2008 17:38:20 +0000 (GMT) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail6.dreamhost.com (Postfix) with ESMTP id 34C7877306 for ; Mon, 16 Jun 2008 10:38:19 -0700 (PDT) Received: from 192.146.101.70 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 16 Jun 2008 13:38:18 -0400 (EDT) Message-ID: <41179.192.146.101.70.1213637898.squirrel@webmail.asofyet.org> In-Reply-To: <50c615ba0806160818u26103ad5le0b2d16c7cf12326@mail.gmail.com> References: <50c615ba0806160818u26103ad5le0b2d16c7cf12326@mail.gmail.com> Date: Mon, 16 Jun 2008 13:38:18 -0400 (EDT) Subject: Re: Subclassing TextBuffer From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 17:38:34 -0000 Daniel Gaston wrote: > print "Deleting Text!\n"; > self -> signal_chain_from_overridden($start_iter, $end_iter); ^^ I think you mean $self -> signal_chain_from_overridden($start_iter, $end_iter); That would cause this: > However if I try and delete text in > the TextView I get an error, unable to load signal_chain_from_overridden > from package 'self'. The -> operator will treat a bareword on the left side as a package name, so you're effectively trying to call a class static method on the class "self". Oops. Cryptic message for a typo, but there you go. :-) > $buffer -> insert_with_tags_by_name($buffer -> get_end_iter, > "$residue", > "$color") > > When I try and do that I get the following warnings: > > Gtk-WARNING **: Invalid text buffer iterator: either the iterator is > uninitialized, or the characters/pixbufs/widgets in the buffer have been > modified since the iterator was created. > You must use marks, character numbers, or line numbers to preserve a > position across buffer modifications. > You can apply tags and insert marks without invalidating your iterators, > but any mutation that affects 'indexable' buffer contents (contents that can > be referred to by character offset) > will invalidate all outstanding iterators at editor.pl line 295. > Gtk-CRITICAL **: gtk_text_buffer_apply_tag: assertion > `gtk_text_iter_get_buffer (end) == buffer' failed at editor.pl line 295. > Inserting Text! > Gtk2::TextIter=SCALAR(0xa66a158) > > After it has gone through this for everything it needs to enter (each string > in an array) it loads the contents but without the colour tags. Since the assertions failed, the relevant functions bailed out, so it's not surprising that the rest works and you just don't have your color tags. My guess is that the problem comes from not using the iterator passed to your insert-text override; that's the only thing that looks out of the ordinary in the code you posted. Why are you forcing it to get_end_iter(), anyway? -- muppet From deadpickle@gmail.com Mon Jun 16 19:00:04 2008 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 65F5E750112 for ; Mon, 16 Jun 2008 19:00:04 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.184 X-Spam-Level: X-Spam-Status: No, score=-0.184 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 11531 hrs), (distance 13, link: (Google 2)), [209.85.200.169] 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 trTvVL8hNkAR for ; Mon, 16 Jun 2008 18:59:58 +0000 (GMT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by menubar.gnome.org (Postfix) with ESMTP id DCFBD750084 for ; Mon, 16 Jun 2008 18:59:55 +0000 (GMT) Received: by wf-out-1314.google.com with SMTP id 23so5298258wfg.9 for ; Mon, 16 Jun 2008 11:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=6ZXnD7kQskU2d1K9Skjt61wTnncSOWm1e3/sOgMBxI4=; b=UXZ7JmRJ4ocu4S2/2LjQDp2H0C2I0286S7YsQOzarzPqN2NH6ROpHP2mSlLl8v4NvU /ETUzbFTnqwzQJRaVW6zqk62pVmJXcyRyZId891JV/Wdb2hvRhkfZovXWlGIJPsKg3lC 0eeTkExA8H85tV9PunNUyS2lMzmmFIiOoECfs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=kjIrHZK4ZOBnFrCI+QMhutHfsMEYSE6n2BGG8FhMGmYRpB+Ukho+gbKGr/2h8mTMHM KLteWkkoOxdFhV9ccrUr/1ctZkPnGSrkx1qCmwo+LVioGdTfzjB7I2VX4CMXCMx+Vlhv mSGN6ZntRhgZ8jmQrWHo1Lj4xQck5DjyIxa2I= Received: by 10.142.48.14 with SMTP id v14mr2528835wfv.14.1213642793874; Mon, 16 Jun 2008 11:59:53 -0700 (PDT) Received: by 10.142.178.12 with HTTP; Mon, 16 Jun 2008 11:59:53 -0700 (PDT) Message-ID: Date: Mon, 16 Jun 2008 13:59:53 -0500 From: "Jamie Lahowetz" Sender: deadpickle@gmail.com To: gtk-perl-list@gnome.org Subject: Gtk2 and Windows exe MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7242_7074260.1213642793852" X-Google-Sender-Auth: 0d6e749a745e615c X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 19:00:04 -0000 ------=_Part_7242_7074260.1213642793852 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm trying to package a script into an exe using pp that contains Gtk2 widgets. When I go to run the script I get these errors: Can't load 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified module c ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. at C:/camelbox/site/lib/PAR/Heavy.pm line 109 Compilation failed in require at script/GRRUVI-v1.40.pl line 11. BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl line 11. Was wondering, anyone know anything about this? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu ------=_Part_7242_7074260.1213642793852 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm trying to package a script into an exe using pp that contains Gtk2 widgets. When I go to run the script I get these errors:
Can't load 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3
a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified module c
ould not be found at C:/camelbox/lib/DynaLoader.pm line 203.
 at C:/camelbox/site/lib/PAR/Heavy.pm line 109
Compilation failed in require at script/GRRUVI-v1.40.pl line 11.
BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl line 11.

Was wondering, anyone know anything about this?

--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu ------=_Part_7242_7074260.1213642793852-- From dune@fluffigt.net Mon Jun 16 19:04:00 2008 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 672E37500BC for ; Mon, 16 Jun 2008 19:04:00 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 360 hrs), (distance 17, link: ethernet/modem), [81.228.8.181] 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 gPy0j4SZ9MOm for ; Mon, 16 Jun 2008 19:03:53 +0000 (GMT) Received: from av10-1-sn2.hy.skanova.net (av10-1-sn2.hy.skanova.net [81.228.8.181]) by menubar.gnome.org (Postfix) with ESMTP id C7FAB750084 for ; Mon, 16 Jun 2008 19:03:52 +0000 (GMT) Received: by av10-1-sn2.hy.skanova.net (Postfix, from userid 502) id 6801C37E52; Mon, 16 Jun 2008 21:03:50 +0200 (CEST) Received: from smtp4-1-sn2.hy.skanova.net (smtp4-1-sn2.hy.skanova.net [81.228.8.92]) by av10-1-sn2.hy.skanova.net (Postfix) with ESMTP id 4739537E52; Mon, 16 Jun 2008 21:03:50 +0200 (CEST) Received: from [127.0.0.1] (fh20n1-g-kt-a31.ias.bredband.telia.com [195.198.192.20]) by smtp4-1-sn2.hy.skanova.net (Postfix) with ESMTP id 6FD2A37E45; Mon, 16 Jun 2008 21:03:48 +0200 (CEST) Message-ID: <4856B8C0.3030308@fluffigt.net> Date: Mon, 16 Jun 2008 21:02:24 +0200 From: Fluff User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Jamie Lahowetz Subject: Re: Gtk2 and Windows exe References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 19:04:00 -0000 What pp-cmd are you using? /Fluff Den 2008-06-16 20:59, Jamie Lahowetz skrev: > I'm trying to package a script into an exe using pp that contains Gtk2 > widgets. When I go to run the script I get these errors: > Can't load > 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 > a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The > specified module c > ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. > at C:/camelbox/site/lib/PAR/Heavy.pm line 109 > Compilation failed in require at script/GRRUVI-v1.40.pl > line 11. > BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl > line 11. > > Was wondering, anyone know anything about this? > > -- > Jamie Ryan Lahowetz > University of Nebraska - Lincoln > Graduate Student - Geosciences > 402.304.0766 > jlahowe2@bigred.unl.edu > ------------------------------------------------------------------------ > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > -- /(bb|[^b]{2})/ that is the Question. From daniel.gaston@gmail.com Mon Jun 16 19:29:13 2008 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 13277750112 for ; Mon, 16 Jun 2008 19:29:13 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.598 X-Spam-Level: X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 11523 hrs), (distance 17, link: (Google 2)), [209.85.128.188] 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 fvZKg06oj-SK for ; Mon, 16 Jun 2008 19:29:06 +0000 (GMT) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by menubar.gnome.org (Postfix) with ESMTP id DB3957501AD for ; Mon, 16 Jun 2008 19:29:01 +0000 (GMT) Received: by fk-out-0910.google.com with SMTP id k31so3490303fkk.15 for ; Mon, 16 Jun 2008 12:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=jM98M65gkPOGEZUml+P4rz6X9W5D3hlWkrY3w1UA8GM=; b=ez9CpHYrUF22IvYdDYpseYaz5g9jL0CSmnZMEgo4OOoYUeUzmhTVagPPn7370pfkie Fvi4+XjhL79o0/tGwfnAPlwatfbyGXaUHvYBaHyxfD7Tir9rCVTsmO7o66yq5YKvS1Ay rfmrZK26pgQmYdE8tiGxSleY0ucSiO/tuTEs0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=uFxmc8CjYySknCTwNqitFeRkKlu30dx4sjIEdfA0SFkUmSFMXoIKPqUmvVfmUcI2HE bXi8STE8ofEWihAF7DHi1BkpVxXGGIAheYQ66PWZZW3KHBVy5rKopGEue4SbXOdw/Z/9 7fofr4K2Ycv40rKn0zu9EmQyY1WAI+O7vUM8Y= Received: by 10.82.105.1 with SMTP id d1mr399781buc.73.1213644539273; Mon, 16 Jun 2008 12:28:59 -0700 (PDT) Received: by 10.82.173.15 with HTTP; Mon, 16 Jun 2008 12:28:59 -0700 (PDT) Message-ID: <50c615ba0806161228l51c7c140kfc9b49461b7b1c97@mail.gmail.com> Date: Mon, 16 Jun 2008 16:28:59 -0300 From: "Daniel Gaston" To: gtk-perl-list@gnome.org Subject: RE: Subclassing TextBuffer MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1159_10624659.1213644539304" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 19:29:13 -0000 ------=_Part_1159_10624659.1213644539304 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline >Daniel Gaston wrote: > print "Deleting Text!\n"; > self -> signal_chain_from_overridden($start_iter, $end_iter); ^^ >I think you mean > > $self -> signal_chain_from_overridden($start_iter, $end_iter); > >That would cause this: Oops, that looks like that was it, not sure how I managed to miss that. Sometimes the easiest problems to fix are the hardest to spot :) > $buffer -> insert_with_tags_by_name($buffer -> get_end_iter, > "$residue", > "$color") > > When I try and do that I get the following warnings: > > Gtk-WARNING **: Invalid text buffer iterator: either the iterator is > uninitialized, or the characters/pixbufs/widgets in the buffer have been > modified since the iterator was created. > You must use marks, character numbers, or line numbers to preserve a > position across buffer modifications. > You can apply tags and insert marks without invalidating your iterators, > but any mutation that affects 'indexable' buffer contents (contents that can > be referred to by character offset) > will invalidate all outstanding iterators at editor.pl line 295. > Gtk-CRITICAL **: gtk_text_buffer_apply_tag: assertion > `gtk_text_iter_get_buffer (end) == buffer' failed at editor.pl line 295. > Inserting Text! > Gtk2::TextIter=SCALAR(0xa66a158) > > After it has gone through this for everything it needs to enter (each string > in an array) it loads the contents but without the colour tags. >Since the assertions failed, the relevant functions bailed out, so it's not >surprising that the rest works and you just don't have your color tags. > >My guess is that the problem comes from not using the iterator passed to your >insert-text override; that's the only thing that looks out of the ordinary in >the code you posted. Why are you forcing it to get_end_iter(), anyway? So initially I was forcing the get_end_iter() because the tutorials I was working from did it that way. So the thing is, because of the nature of the program I am writing, the text actually needs to be inserted character by character and is done in the middle of a looping function. I freely admit that I am still learning the ins and outs of programming in Gtk2 Perl. Dan ------=_Part_1159_10624659.1213644539304 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
>Daniel Gaston wrote:
> print "Deleting Text!\n";
> self -> signal_chain_from_overridden($start_iter, $end_iter);

^^
>I think you mean
>
> $self -> signal_chain_from_overridden($start_iter, $end_iter);
>
>That would cause this:

Oops, that looks like that was it, not sure how I managed to miss that. Sometimes the easiest problems to fix are the hardest to spot :)


> $buffer -> insert_with_tags_by_name($buffer -> get_end_iter,
> "$residue",
> "$color")
>
> When I try and do that I get the following warnings:
>
> Gtk-WARNING **: Invalid text buffer iterator: either the iterator is
> uninitialized, or the characters/pixbufs/widgets in the buffer have been
> modified since the iterator was created.
> You must use marks, character numbers, or line numbers to preserve a
> position across buffer modifications.
> You can apply tags and insert marks without invalidating your iterators,
> but any mutation that affects 'indexable' buffer contents (contents that can
> be referred to by character offset)
> will invalidate all outstanding iterators at editor.pl line 295.
> Gtk-CRITICAL **: gtk_text_buffer_apply_tag: assertion
> `gtk_text_iter_get_buffer (end) == buffer' failed at editor.pl line 295.
> Inserting Text!
> Gtk2::TextIter=SCALAR(0xa66a158)
>
> After it has gone through this for everything it needs to enter (each string
> in an array) it loads the contents but without the colour tags.

>Since the assertions failed, the relevant functions bailed out, so it's not
>surprising that the rest works and you just don't have your color tags.
>
>My guess is that the problem comes from not using the iterator passed to your
>insert-text override; that's the only thing that looks out of the ordinary in
>the code you posted. Why are you forcing it to get_end_iter(), anyway?

So initially I was forcing the get_end_iter() because the tutorials I was working from did it that way. So the thing is, because of
the nature of the program I am writing, the text actually needs to be inserted character by character and is done in the middle of a
looping function. I freely admit that I am still learning the ins and outs of programming in Gtk2 Perl.

Dan
------=_Part_1159_10624659.1213644539304-- From deadpickle@gmail.com Mon Jun 16 19:34:15 2008 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 6050375006E for ; Mon, 16 Jun 2008 19:34:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 11536 hrs), (distance 13, link: (Google 2)), [209.85.200.169] 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 qqaWoJEPflMu for ; Mon, 16 Jun 2008 19:34:04 +0000 (GMT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by menubar.gnome.org (Postfix) with ESMTP id 3A1F175008C for ; Mon, 16 Jun 2008 19:34:01 +0000 (GMT) Received: by wf-out-1314.google.com with SMTP id 23so5310780wfg.9 for ; Mon, 16 Jun 2008 12:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=OOnp7XeyT/eEg9jHEQD7OOJMumCUcnb5xs3BkEAUPA0=; b=EhET6eBclJJQ2rgoLHH1l1egLDuwVOCi3AlvmkNpYRWYFJQ1Fn0drljOgCvsG8JQWz yjy0R/kfk/Q5BPi5ptEZ9D/6BzQ/5X9gbd4wRQg1UrYHxiFefYLtSuC1RuP8c/cHKvK0 VywQG+daq3NL6RrHQ1FZBPuBBa74NJLvayGH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=ipRRIY6wwh5x5wwJrrLhKhezmWiaoreCzwDIBG/XIsuCPU5L9ca5MCoJ+IIoU62lZ5 O/KJuzuCnfj1P+TdWMBowsc+oTC0LKY8K+rYBEVjKJd9lDQEzFR3RhB9uGRBc18Je9io aKGb3w1ZFGyEAeZmFbR4UJgv7xDZ2RUtqKork= Received: by 10.142.133.8 with SMTP id g8mr2522838wfd.253.1213644839240; Mon, 16 Jun 2008 12:33:59 -0700 (PDT) Received: by 10.142.178.12 with HTTP; Mon, 16 Jun 2008 12:33:59 -0700 (PDT) Message-ID: Date: Mon, 16 Jun 2008 14:33:59 -0500 From: "Jamie Lahowetz" Sender: deadpickle@gmail.com To: Fluff Subject: Re: Gtk2 and Windows exe In-Reply-To: <4856B8C0.3030308@fluffigt.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7358_26495732.1213644839230" References: <4856B8C0.3030308@fluffigt.net> X-Google-Sender-Auth: ee5284e7a872cc22 Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 19:34:15 -0000 ------=_Part_7358_26495732.1213644839230 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -i GRRUVI.ICO -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl On Mon, Jun 16, 2008 at 2:02 PM, Fluff wrote: > What pp-cmd are you using? > > /Fluff > > Den 2008-06-16 20:59, Jamie Lahowetz skrev: > >> I'm trying to package a script into an exe using pp that contains Gtk2 >> widgets. When I go to run the script I get these errors: >> Can't load >> 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 >> a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified >> module c >> ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. >> at C:/camelbox/site/lib/PAR/Heavy.pm line 109 >> Compilation failed in require at script/GRRUVI-v1.40.pl < >> http://GRRUVI-v1.40.pl> line 11. >> BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl < >> http://GRRUVI-v1.40.pl> line 11. >> >> Was wondering, anyone know anything about this? >> >> -- >> Jamie Ryan Lahowetz >> University of Nebraska - Lincoln >> Graduate Student - Geosciences >> 402.304.0766 >> jlahowe2@bigred.unl.edu >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> gtk-perl-list mailing list >> gtk-perl-list@gnome.org >> http://mail.gnome.org/mailman/listinfo/gtk-perl-list >> >> > > > -- > /(bb|[^b]{2})/ that is the Question. > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu ------=_Part_7358_26495732.1213644839230 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -i GRRUVI.ICO -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl

On Mon, Jun 16, 2008 at 2:02 PM, Fluff <dune@fluffigt.net> wrote:
What pp-cmd are you using?

/Fluff

Den 2008-06-16 20:59, Jamie Lahowetz skrev:
I'm trying to package a script into an exe using pp that contains Gtk2 widgets. When I go to run the script I get these errors:
Can't load 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3
a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified module c
ould not be found at C:/camelbox/lib/DynaLoader.pm line 203.
 at C:/camelbox/site/lib/PAR/Heavy.pm line 109
Compilation failed in require at script/GRRUVI-v1.40.pl <http://GRRUVI-v1.40.pl> line 11.
BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl <http://GRRUVI-v1.40.pl> line 11.


Was wondering, anyone know anything about this?

--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu <mailto:jlahowe2@bigred.unl.edu>
------------------------------------------------------------------------

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


--
/(bb|[^b]{2})/ that is the Question.

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



--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu ------=_Part_7358_26495732.1213644839230-- From gnome-gtk-perl-list@m.gmane.org Mon Jun 16 20:25:09 2008 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 848C975034D for ; Mon, 16 Jun 2008 20:25:09 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.025 X-Spam-Level: X-Spam-Status: No, score=-1.025 tagged_above=-999 required=2 tests=[AWL=0.507, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, RCVD_NUMERIC_HELO=2.067] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 7998 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 NTCAXPSQNpbC for ; Mon, 16 Jun 2008 20:24:59 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 5E9F3750237 for ; Mon, 16 Jun 2008 20:22:43 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K8LDt-0006RG-Nv for gtk-perl-list@gnome.org; Mon, 16 Jun 2008 20:22:41 +0000 Received: from 88.103.41.197 ([88.103.41.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jun 2008 20:22:41 +0000 Received: from raherh by 88.103.41.197 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jun 2008 20:22:41 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: rahed Subject: Re: Gtk2 and Windows exe Date: Mon, 16 Jun 2008 20:22:39 +0000 Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 88.103.41.197 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:qZ59giXneRdfazXfQliRkr579uo= Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 20:25:09 -0000 "Jamie Lahowetz" writes: > Can't load > 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 > a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified > module c > ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. > at C:/camelbox/site/lib/PAR/Heavy.pm line 109 > Compilation failed in require at script/GRRUVI-v1.40.pl line 11. > BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl line 11. You probably miss some dll libraries which have to be included with -l switch during packing with pp. For instance using Gtk2 requires Glib which is an interface to glib libraries. -- Radek From gnome-gtk-perl-list@m.gmane.org Mon Jun 16 22:07:27 2008 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 D7D8B75008F for ; Mon, 16 Jun 2008 22:07:27 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-0.999 tagged_above=-999 required=2 tests=[BAYES_50=0.001, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 8016 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 m+QLSncRIqdX for ; Mon, 16 Jun 2008 22:07:20 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 978FF75013A for ; Mon, 16 Jun 2008 22:07:19 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K8Mr8-00028i-0m for gtk-perl-list@gnome.org; Mon, 16 Jun 2008 22:07:18 +0000 Received: from adsl-69-234-183-131.dsl.irvnca.pacbell.net ([69.234.183.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jun 2008 22:07:18 +0000 Received: from wa1ter by adsl-69-234-183-131.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Jun 2008 22:07:18 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: The syntax of Gnome2::Canvas::Line? Date: Mon, 16 Jun 2008 15:07:09 -0700 Lines: 25 Message-ID: References: <20080614123912.0a3fcdf5@zentara.zentara.net> <747D276B-695B-4818-B54D-A9B06E7600DA@asofyet.org> <1213571003.11778.8.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-183-131.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a2pre (X11/2008061605) In-Reply-To: <1213571003.11778.8.camel@localhost.localdomain> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 22:07:28 -0000 Grant McLean wrote: > On Sun, 2008-06-15 at 14:36 -0700, walt wrote: >> Many of my remaining questions are about perl, not about gtk, so where >> would you go for advice when/if you can't understand the perl docs? > ... > As far as asking questions goes, I'd heartily recommend Perl Monks. > It's perhaps not the world's most beautifully designed web site but > there are plenty of knowledgeable folk in many different timezones eager > to answer questions around the clock: > http://www.perlmonks.org/ > ... I just posted my first question there and by the time I finished fumbling around with re-formatting and updating my question it already had three long and thoughtful answers! When I saw that number '3 replies' I just assumed I had accidentally replied to myself instead of updating, but no, there were three real replies. I'm completely flabbergasted. Feels like I've found a new home in the perl community. I regret now that I put off learning perl for so long just because I have a nerdy friend who complained that he'd never written a single line of perl without the reference manual propped open in front of the monitor :o) Many thanks, guys! From anguila@gmail.com Tue Jun 17 03:22:08 2008 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 F157E7500CE for ; Tue, 17 Jun 2008 03:22:07 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 5770 hrs), (distance 13, link: (Google 2)), [209.85.198.235] 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 M489vqIeD9D0 for ; Tue, 17 Jun 2008 03:22:00 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by menubar.gnome.org (Postfix) with ESMTP id 46E69750101 for ; Tue, 17 Jun 2008 03:22:00 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so5180988rvb.3 for ; Mon, 16 Jun 2008 20:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=w7OeZkxy7/4/uS1k6Q+Csg8VypGdUWKPPO0qmbxs2FQ=; b=yH+saC9Ehuk+71RdinKzEpCMK6UyU5jqSci3wpT8qtuGlg0esg5ioL7Y/Bc8/mOiTC 6bJ8F8xflaaUzrsaWf6cRl3a4uMACREf/gdGOq0CBpyRRaR1Vk5R+veov/II6mzQvh9m 03iOCgx73nhn1vcZiI7ZDp9RrAzRWTrY8cDJc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=nwK97Iwvy77h63gWBsiWAl8p/8MSt+fJuTqmcOGHnyr9AyM7AomwNAbz8/0GdybW5U 38HjtXtQY4NDD7MVW374Ca+wxojwKOaa+d/4fktBYA5ZgSt5L1LeOWKquAbGRZrmEC2R xuKYW9Hz5Gid1JEjcwcRS2KqENfuwn6ZOCaU4= Received: by 10.141.29.21 with SMTP id g21mr4281943rvj.248.1213672918907; Mon, 16 Jun 2008 20:21:58 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Mon, 16 Jun 2008 20:21:53 -0700 (PDT) Message-ID: <153d32140806162021g6ce0479ft8de28ee6e0f68a63@mail.gmail.com> Date: Tue, 17 Jun 2008 05:21:53 +0200 From: anguila To: "Kenneth Swanson" Subject: Re: reparent a widget In-Reply-To: <483EDAB9.4090501@watson.wustl.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_765_2433071.1213672918893" References: <153d32140805281302x19450ff5u610f79cda666c538@mail.gmail.com> <6A0AD2BB-ACD4-48C9-A06D-80AB3898E905@asofyet.org> <153d32140805290005q4636b35bt7f6eb1a5cb7811f2@mail.gmail.com> <28099.192.146.101.70.1212068075.squirrel@webmail.asofyet.org> <483EDAB9.4090501@watson.wustl.edu> Cc: muppet , gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 03:22:08 -0000 ------=_Part_765_2433071.1213672918893 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline if I use a Notebook widget and I hide the tabs, the result will be the same, no? How can I control the tab that I want to show? Thanks, David 2008/5/29 Kenneth Swanson : > muppet wrote: > >> anguila wrote: >> >>> Yes, but I can't create a new widget over them.. If I create a vbox in a >>> place I can't (i don't know how) create a new widget at the same place to >>> toggle with other widget. I know the visibility option, the idea is >>> switch >>> with widgets, but if I can't create new widgets at the same spot i can't >>> hide those widgets. >>> >> >> Try this: >> >> * create a new window >> * put a vbox in it >> * put a toggle button in vbox >> * put a new vbox (vbox1) inside vbox, with some stuff inside >> * put another new vbox (vbox2) also inside vbox, with different stuff >> inside >> * set vbox1 visible >> * set vbox2 !visible >> * in the handler for the togglebutton's toggled signal, toggle the visible >> properties of both vbox1 and vbox2. >> * do *not* use show_all() on the toplevel window! >> > > I've attached a script and glade file that does exactly this, for > demonstration. > > -Ken > > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > > ------=_Part_765_2433071.1213672918893 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline if I use a Notebook widget and I hide the tabs, the result will be the same, no?
How can I control the tab that I want to show?

Thanks,

David

2008/5/29 Kenneth Swanson <kswanson@watson.wustl.edu>:
muppet wrote:
anguila wrote:
Yes, but I can't create a new widget over them.. If I create a vbox in a
place I can't (i don't know how) create a new widget at the same place to
toggle with other widget. I know the visibility option, the idea is switch
with widgets, but if I can't create new widgets at the same spot i can't
hide those widgets.

Try this:

* create a new window
* put a vbox in it
* put a toggle button in vbox
* put a new vbox (vbox1) inside vbox, with some stuff inside
* put another new vbox (vbox2) also inside vbox, with different stuff inside
* set vbox1 visible
* set vbox2 !visible
* in the handler for the togglebutton's toggled signal, toggle the visible
properties of both vbox1 and vbox2.
* do *not* use show_all() on the toplevel window!

I've attached a script and glade file that does exactly this, for demonstration.

-Ken


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


------=_Part_765_2433071.1213672918893-- From scott@asofyet.org Tue Jun 17 03:48:34 2008 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 13954750089 for ; Tue, 17 Jun 2008 03:48:34 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 1905 hrs), (distance 16, link: ethernet/modem), [208.113.200.5] 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 A1gzNafFYQN5 for ; Tue, 17 Jun 2008 03:48:26 +0000 (GMT) Received: from looneymail-a2.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 94D85750060 for ; Tue, 17 Jun 2008 03:48:26 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 7739816D452 for ; Mon, 16 Jun 2008 20:48:24 -0700 (PDT) Message-Id: <9BF60A1D-C266-4D41-A6FA-B9214B207659@asofyet.org> From: muppet To: gtk2-perl List In-Reply-To: <153d32140806162021g6ce0479ft8de28ee6e0f68a63@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: reparent a widget Date: Mon, 16 Jun 2008 23:48:24 -0400 References: <153d32140805281302x19450ff5u610f79cda666c538@mail.gmail.com> <6A0AD2BB-ACD4-48C9-A06D-80AB3898E905@asofyet.org> <153d32140805290005q4636b35bt7f6eb1a5cb7811f2@mail.gmail.com> <28099.192.146.101.70.1212068075.squirrel@webmail.asofyet.org> <483EDAB9.4090501@watson.wustl.edu> <153d32140806162021g6ce0479ft8de28ee6e0f68a63@mail.gmail.com> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 03:48:34 -0000 On Jun 16, 2008, at 11:21 PM, anguila wrote: > if I use a Notebook widget and I hide the tabs, the result will be > the same, no? > How can I control the tab that I want to show? http://library.gnome.org/devel/gtk/stable/GtkNotebook.html#gtk-notebook-set-current-page $notebook->set_current_page ($page_index); -- If the monkey could type one keystroke every nanosecond, the expected waiting time until the monkey types out Hamlet is so long that the estimated age of the universe is insignificant by comparison ... this is not a practical method for writing plays. -- Gian-Carlo Rota From priya.somasundaran@gmail.com Tue Jun 17 07:52:02 2008 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 2E978750206 for ; Tue, 17 Jun 2008 07:52:02 +0000 (GMT) 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_05=-1.11, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001, TW_GT=0.077, URIBL_RHS_DOB=1.083] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 5815 hrs), (distance 13, link: (Google 2)), [209.85.198.227] 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 UjZUH6AgzGpi for ; Tue, 17 Jun 2008 07:51:57 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by menubar.gnome.org (Postfix) with ESMTP id 05AA87501FE for ; Tue, 17 Jun 2008 07:51:56 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so5241935rvb.3 for ; Tue, 17 Jun 2008 00:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=ugVK5rrfRvaXXX0piE0NF9jKVbcYN9Q2SrilTqIyDak=; b=UBASt19zBYS2OXnb84HKeU+4b8I3kEQKOj8/S5S+iEeQsEfmo1ndLUsLN9JmE/MRcx PDm81ZqeNKay5hdnT8j/rMBbWfqUYWn0xt+SWhvnB8T11qvno+of79hXzGlxlr8Uc2Fj UMuL3Zzao5sDiDdeiqzmPAKAs0teCXRyNWXuo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=cDGc34cwQ2u8usmSHWR2C6IbsC4WAm4HbYecASX/8WTWg1QVMTt9YMQh2d87ONnLLu bZ/C7fwi44qEKirr3w75JMFCFoSZp6KHFUJjkDbgLCLXFmnS7feP2QOMKsC9Bj5EQjNP GRjTmpLosvO7pYIznUuRvAG3YLGnK0bloGfmI= Received: by 10.141.18.14 with SMTP id v14mr4436741rvi.125.1213689115552; Tue, 17 Jun 2008 00:51:55 -0700 (PDT) Received: by 10.140.225.3 with HTTP; Tue, 17 Jun 2008 00:51:55 -0700 (PDT) Message-ID: Date: Tue, 17 Jun 2008 03:51:55 -0400 From: "Priya Somasundaran" To: gtk-perl-list@gnome.org Subject: Re: Welcome to the "gtk-perl-list" mailing list In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_177_22388711.1213689115570" References: X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 07:52:02 -0000 ------=_Part_177_22388711.1213689115570 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Helloo, I have just begun gtk programming in perl. I did my first hello world application successfully. But i am unable to run in from a browser, when i run it from a browser i get the following error GThread-ERROR **: file gthread-posix.c: line 135 (): error 'Operation not permitted' during 'pthread_getschedparam (pthread_self(), &policy, &sched)' [Tue Jun 17 07:17:59 2008] [error] [client 127.0.0.1] aborting... [Tue Jun 17 07:17:59 2008] [error] [client 127.0.0.1] Premature end of script headers: test2.pl i need to call my gtk program from a web interface perl program how do i do that. can u please help? thanks in advance priya -- ------=_Part_177_22388711.1213689115570 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Helloo,
I have just begun gtk programming in perl. I did my first hello world application successfully. But i am unable to run in from a browser, when i run it from a browser i get the following error
GThread-ERROR **: file gthread-posix.c: line 135 (): error 'Operation not permitted' during 'pthread_getschedparam (pthread_self(), &policy, &sched)'
[Tue Jun 17 07:17:59 2008] [error] [client 127.0.0.1] aborting...
[Tue Jun 17 07:17:59 2008] [error] [client 127.0.0.1] Premature end of script headers: test2.pl

i need to call my gtk program from a web interface perl program how do i do that.

can u please help?

thanks in advance

priya
--

------=_Part_177_22388711.1213689115570-- From scott@asofyet.org Tue Jun 17 12:30:30 2008 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 DB557750444 for ; Tue, 17 Jun 2008 12:30:30 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.663 X-Spam-Level: X-Spam-Status: No, score=-0.663 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, TW_GT=0.077] 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 DX8IRyeTgoB4 for ; Tue, 17 Jun 2008 12:30:25 +0000 (GMT) Received: from looneymail-a6.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 95ACE7502D0 for ; Tue, 17 Jun 2008 12:19:33 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a6.g.dreamhost.com (Postfix) with ESMTP id 2BD6C9ED85; Tue, 17 Jun 2008 05:19:30 -0700 (PDT) Message-Id: <231FABC9-E7C6-47A7-9227-8E884BE1A8A2@asofyet.org> From: muppet To: Priya Somasundaran In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: Welcome to the "gtk-perl-list" mailing list Date: Tue, 17 Jun 2008 08:19:30 -0400 References: X-Mailer: Apple Mail (2.924) Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 12:30:31 -0000 On Jun 17, 2008, at 3:51 AM, Priya Somasundaran wrote: > Helloo, > I have just begun gtk programming in perl. I did my first hello > world application successfully. But i am unable to run in from a > browser, when i run it from a browser i get the following error > GThread-ERROR **: file gthread-posix.c: line 135 (): error > 'Operation not permitted' during 'pthread_getschedparam > (pthread_self(), &policy, &sched)' > [Tue Jun 17 07:17:59 2008] [error] [client 127.0.0.1] aborting... > [Tue Jun 17 07:17:59 2008] [error] [client 127.0.0.1] Premature end > of script headers: test2.pl While perl is, indeed, widely used for web stuff, desktop graphical user interface programs are not web apps, and you don't run them through a browser. You can run your program from a command terminal window (xterm or gnome-terminal) or by double-clicking it in a file manager (like nautilus), or make a .desktop file to integrate the app into your desktop menus. > i need to call my gtk program from a web interface perl program how > do i do that. Given the above, i find this statement very confusing. In what way do you need to call your gui app from a web interface? Can you explain what you're trying to do? -- zella (crying): I want... us: What? zella (still crying): I want... something! From zentara1@sbcglobal.net Tue Jun 17 15:39:05 2008 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 6FBBF7500D8 for ; Tue, 17 Jun 2008 15:39:05 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.288 X-Spam-Level: X-Spam-Status: No, score=-1.288 tagged_above=-999 required=2 tests=[AWL=0.375, BAYES_20=-0.74, L_P0F_Unix=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9735 hrs), (distance 15, link: ethernet/modem), [66.196.96.88] 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 LQWTF0AUlBS1 for ; Tue, 17 Jun 2008 15:38:57 +0000 (GMT) Received: from smtp115.sbc.mail.re3.yahoo.com (smtp115.sbc.mail.re3.yahoo.com [66.196.96.88]) by menubar.gnome.org (Postfix) with SMTP id E84567500BD for ; Tue, 17 Jun 2008 15:38:56 +0000 (GMT) Received: (qmail 75450 invoked from network); 17 Jun 2008 15:38:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=pldQI7JbRkciPKPoe+Ci0Zvfwp/NB3KsB3nUK+e6QsB6OH6ghrLfKMOhlm7EGliJvAFHXrAtMA1FIkT59YPc/UCA28DVZl81CV2sLF3/iWKVn/xCn9lwxfTKwtHUWhhx82rFSP7qoTpxlnA+cgZXe3UyqHKI34v+RKSg8mtq0fo= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.7.21 with login) by smtp115.sbc.mail.re3.yahoo.com with SMTP; 17 Jun 2008 15:38:54 -0000 X-YMail-OSG: hNzxcpoVM1nmdsry2W.a6VweDsn0tFn1srCrjH.PdbDVxILHMw.6.F_NAoLpSihYbYPk0TtPB_z8Zu1hPTJAGbZb0Jl0u0hknsBzeXznwnX.l1uWPy2DDFeJaJkS8R4R4Nb4th5t.AFgVP9dAPPlqiK4 X-Yahoo-Newman-Property: ymail-3 Date: Tue, 17 Jun 2008 11:33:54 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Perl Plugin : was Re: Welcome to the "gtk-perl-list" mailing list Message-ID: <20080617113354.0b13ab1c@zentara.zentara.net> In-Reply-To: <231FABC9-E7C6-47A7-9227-8E884BE1A8A2@asofyet.org> References: <231FABC9-E7C6-47A7-9227-8E884BE1A8A2@asofyet.org> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 15:39:05 -0000 On Tue, 17 Jun 2008 08:19:30 -0400 muppet wrote: > >On Jun 17, 2008, at 3:51 AM, Priya Somasundaran wrote: > >> Helloo, >> I have just begun gtk programming in perl. I did my first hello >> world application successfully. But i am unable to run in from a >> browser, when i run it from a browser i get the following error >While perl is, indeed, widely used for web stuff, desktop graphical >user interface programs are not web apps, and you don't run them >through a browser. You can run your program from a command terminal >window (xterm or gnome-terminal) or by double-clicking it in a file >manager (like nautilus), or make a .desktop file to integrate the app >into your desktop menus. > > >> i need to call my gtk program from a web interface perl program how >> do i do that. > >Given the above, i find this statement very confusing. In what way do >you need to call your gui app from a web interface? Can you explain >what you're trying to do? Just to clarify on what muppet said, to run something thru a browser, it needs to be done thru a CGI program( which is run on the server) OR the browser must have a plug-in for that mime type. Sadly, only Java and Flash have a decent plugin for most browsers. I wish Perl had a browser plugin, especially to allow Tk and Gtk2 perl programs to be run in a browser...... but it dosn't exist. Java and Flash are the 2 most widely used browser plug-ins, which allow a very limited set of commands that can be run on a local web browser. The reason for this is security. A Perl plugin would have to have almost all of it's filesystem access, amoung many other commands, to allow safe running on a browser. Think about it..... would you like someone on some server somewhere being able to run any Perl script on your computer, just because you clicked some link? The Java plugin, only has a reduced set of the full Java commands, which are deemed safe enough to allow limited graphics. Still, I wish some smart Perl hacker would make a Perl with limited powers as a plugin, but I guess few people would trust it. People trust Adobe Flash and Java because of the reputable corporations backing them up. Even then, numerous security flaws exist in them, and I keep the plugins turned off unless needed. zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From deadpickle@gmail.com Tue Jun 17 16:27:41 2008 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 9B7C37500BD for ; Tue, 17 Jun 2008 16:27:41 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 11745 hrs), (distance 13, link: (Google 2)), [209.85.200.170] 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 coLa8quaOg3U for ; Tue, 17 Jun 2008 16:27:34 +0000 (GMT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by menubar.gnome.org (Postfix) with ESMTP id 49A50750006 for ; Tue, 17 Jun 2008 16:27:25 +0000 (GMT) Received: by wf-out-1314.google.com with SMTP id 23so5759144wfg.9 for ; Tue, 17 Jun 2008 09:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=ChhICKGTCes0wK7RoBzyz8bdwt5EVrGqAOWvwEWTqHY=; b=pKFm/Q9K7Wf+Cw4LdBiGnQys3GGLSPPEzXYHE17YP8Kq5nhTLg+yHMgRNTSJzM8sUX Ah5HkdWnO5ZpqgYIUZZu6+hklNFWPXssE1FQLOSeM96l9EEnHFmqSUX42KVEkqa7k+Wd /wLicbl6yjGI/tyTxg7ptR2h2OPQd01en1LhU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=W0Ou7zjNETeK91hKLZtIMM2ZGgR6yec2gy42+H2cXZhrx6NVC6tzCxv7ZTjeGMULkA XPDiM+cqmvyskkCJ+ucIzlpuZ52cruZfHVHCarNceY9KxnHtFFokdWDYUKzvnt5rA+7V gWucdkk5C/VEMXW7iaofcK16fEwXtlgCT02Cw= Received: by 10.143.42.6 with SMTP id u6mr3079325wfj.140.1213720038705; Tue, 17 Jun 2008 09:27:18 -0700 (PDT) Received: by 10.142.178.12 with HTTP; Tue, 17 Jun 2008 09:27:18 -0700 (PDT) Message-ID: Date: Tue, 17 Jun 2008 11:27:18 -0500 From: "Jamie Lahowetz" Sender: deadpickle@gmail.com To: gtk-perl-list@gnome.org Subject: Gtk2 and Windows exe In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11441_8541251.1213720038710" References: X-Google-Sender-Auth: 60d8283a73e1a42c X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 16:27:41 -0000 ------=_Part_11441_8541251.1213720038710 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I keep getting the popup error: "This application has failed to start because Cairo.dll was not found. Re-installing the application may fix this problem" when I run the pp cmd: C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Cairo.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl or C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Gtk2\Gtk2.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl On Mon, Jun 16, 2008 at 3:22 PM, rahed wrote: > "Jamie Lahowetz" writes: > > > Can't load > > 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 > > a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified > > module c > > ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. > > at C:/camelbox/site/lib/PAR/Heavy.pm line 109 > > Compilation failed in require at script/GRRUVI-v1.40.pl line 11. > > BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl line 11. > > You probably miss some dll libraries which have to be included with -l > switch during packing with pp. For instance using Gtk2 requires Glib > which is an interface to glib libraries. > > -- > Radek > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahowe2@bigred.unl.edu ------=_Part_11441_8541251.1213720038710 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I keep getting the popup error:
"This application has failed to start because Cairo.dll was not found. Re-installing the application may fix this problem"
when I run the pp cmd:
C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Cairo.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl
or
C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Gtk2\Gtk2.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl



On Mon, Jun 16, 2008 at 3:22 PM, rahed <raherh@gmail.com> wrote:
"Jamie Lahowetz" <jlahowe2@bigred.unl.edu> writes:

> Can't load
> 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3
> a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified
> module c
> ould not be found at C:/camelbox/lib/DynaLoader.pm line 203.
>  at C:/camelbox/site/lib/PAR/Heavy.pm line 109
> Compilation failed in require at script/GRRUVI-v1.40.pl line 11.
> BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl line 11.

You probably miss some dll libraries which have to be included with -l
switch during packing with pp. For instance using Gtk2 requires Glib
which is an interface to glib libraries.

--
Radek

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



--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu



--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2@bigred.unl.edu ------=_Part_11441_8541251.1213720038710-- From elspicyjack@gmail.com Tue Jun 17 16:59:32 2008 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 231EF750077 for ; Tue, 17 Jun 2008 16:59:32 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7392 hrs), (distance 12, link: (Google 2)), [64.233.166.179] 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 hOHvuEOP6sIv for ; Tue, 17 Jun 2008 16:59:01 +0000 (GMT) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by menubar.gnome.org (Postfix) with ESMTP id 4587F75007E for ; Tue, 17 Jun 2008 16:59:00 +0000 (GMT) Received: by py-out-1112.google.com with SMTP id a29so2146013pyi.36 for ; Tue, 17 Jun 2008 09:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Ae3KRN5IiJOs1falczbYxE0v+rjaDACjmLefHja3ijQ=; b=Y6axApO7J+8vGlpRe8maSTQz6lk32BOkwrzYbCmoA0oWy09rbhX6T0AxgyyGAZe/8v zi3rlDMqjfo3nSnwIavRYeMKuGD/w1m3kl5Rz2X/3rW2VQ9wOZuBpsmbqonldpBweudy 5gShpvMKwXdtJhPVl6Clmtu21IVByZ6qq3TkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=q47N8on+mfbTpCfOgZ7j2SzG9sx/xo0VlMFsDSa9uJECyiN9j5gIEg55Fdmoz32Qvk QszMiqAfLURUIIdjsgOqfzdw3ZEk5vxu11CFDdvgNyDYOHo1lgkF1hlfE6YtCBVgZsLm FYOp4L2z8XmHc67KbCr1OqJkywSB5RoUK1Sz0= Received: by 10.115.46.10 with SMTP id y10mr8227204waj.137.1213721938819; Tue, 17 Jun 2008 09:58:58 -0700 (PDT) Received: by 10.114.123.11 with HTTP; Tue, 17 Jun 2008 09:58:58 -0700 (PDT) Message-ID: Date: Tue, 17 Jun 2008 09:58:58 -0700 From: "spicy jack" To: "Jamie Lahowetz" Subject: Re: Gtk2 and Windows exe In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 16:59:32 -0000 2008/6/17 Jamie Lahowetz : > I keep getting the popup error: > "This application has failed to start because Cairo.dll was not found. > Re-installing the application may fix this problem" > when I run the pp cmd: I'm farther along with PP than this, but I still don't have a working standalone 'binary'. Your command line for PP is going to get huge when trying to include every library dependency that GTK/Gtk2-Perl requires. I suggest using a PP 'command list' instead of typing it all out. Here's mine: http://code.google.com/p/camelbox/source/browse/trunk/scripts/gyroscope_filelist.txt Run with: pp @gyroscope_filelist.txt gyroscope.pl (gyroscope.pl is here: http://code.google.com/p/camelbox/source/browse/trunk/scripts/gyroscope.pl) As I said at the top, I still haven't got this working yet. Thanks, Brian From gnome-gtk-perl-list@m.gmane.org Tue Jun 17 18:45:46 2008 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 6096B7502DA for ; Tue, 17 Jun 2008 18:45:46 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.025 X-Spam-Level: X-Spam-Status: No, score=-1.025 tagged_above=-999 required=2 tests=[AWL=0.507, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, RCVD_NUMERIC_HELO=2.067] 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 tFLrmO76LRsa for ; Tue, 17 Jun 2008 18:45:39 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 9196875040B for ; Tue, 17 Jun 2008 18:33:18 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K8fzZ-0007fE-4L for gtk-perl-list@gnome.org; Tue, 17 Jun 2008 18:33:17 +0000 Received: from 88.103.41.197 ([88.103.41.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Jun 2008 18:33:17 +0000 Received: from raherh by 88.103.41.197 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Jun 2008 18:33:17 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: rahed Subject: Re: Gtk2 and Windows exe Date: Tue, 17 Jun 2008 18:33:14 +0000 Lines: 41 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 88.103.41.197 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:Ci+GCv9oir9CDs7GWAA19/Hfcso= Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 18:45:46 -0000 "Jamie Lahowetz" writes: > I keep getting the popup error: > "This application has failed to start because Cairo.dll was not found. > Re-installing the application may fix this problem" > when I run the pp cmd: > C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -I GRRUVI.ICO -l > C:\camelbox\site\lib\auto\Cairo.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl > or > C:\Documents and Settings\UAS\Desktop\GRRUVI>pp -I GRRUVI.ICO -l > C:\camelbox\site\lib\auto\Gtk2\Gtk2.dll -o testGRRUVI-v1.40.exe > GRRUVI-v1.40.pl If it's of any help, this is a long list of dll libraries included with pp to pack my Gtk2 application: -l "C:/GTK/libiconv/bin/iconv.dll" -l "C:/GTK/bin/libpng12.dll" -l "C:/GTK/bin/charset.dll" -l "C:/GTK/bin/zlib1.dll" -l "C:/GTK/libxml/bin/libxml2.dll" -l "C:/GTK/bin/libmodule-2.0-0" -l "C:/perl5-10/site/lib/auto/Cairo/Cairo.dll" -l "C:/perl5-10/site/lib/auto/Gtk2/Gtk2.dll" -l "C:/perl5-10/site/lib/auto/Glib/Glib.dll" -l "C:/perl5-10/site/lib/auto/Gtk2/GladeXML/GladeXML.dll" -l "C:/GTK/bin/libglib-2.0-0.dll" -l "C:/GTK/bin/libglade-2.0-0.dll" -l "C:/GTK/bin/intl.dll" -l "C:/GTK/bin/libatk-1.0-0.dll" -l "C:/GTK/bin/libcairo-2.dll" -l "C:/GTK/bin/libgdk_pixbuf-2.0-0.dll" -l "C:/GTK/bin/libgdk-win32-2.0-0.dll" -l "C:/GTK/bin/libgmodule-2.0-0.dll" -l "C:/GTK/bin/libgobject-2.0-0.dll" -l "C:/GTK/bin/libgthread-2.0-0.dll" -l "C:/GTK/bin/libgtk-win32-2.0-0.dll" -l "C:/GTK/bin/libpango-1.0-0.dll" -l "C:/GTK/bin/libpangocairo-1.0-0.dll" -l "C:/GTK/bin/libpangowin32-1.0-0.dll" -l "C:/GTK/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll" -l "C:/gnu/GnuWin32/jpeg62.dll" -l "C:/GTK/lib/pango/1.6.0/modules/pango-basic-win32.dll" -l "C:/GTK/bin/libfontconfig-1.dll" -l "C:/GTK/bin/xmlparse.dll" -l "C:/GTK/bin/xmltok.dll" -l "C:/GTK/bin/libfreetype-6.dll" -l "C:/GTK/bin/libpangoft2-1.0-0.dll" -- Radek From gg@zip.com.au Tue Jun 17 23:56:36 2008 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 11883750077 for ; Tue, 17 Jun 2008 23:56:36 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1834 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 3J1JY0GjOOsR for ; Tue, 17 Jun 2008 23:56:29 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id B5492750070 for ; Tue, 17 Jun 2008 23:56:29 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 86EC63A0A19 for ; Wed, 18 Jun 2008 09:56:26 +1000 (EST) Received: from blah.blah (ppp2CE0.dyn.pacific.net.au [61.8.44.224]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 3C68E8C43 for ; Wed, 18 Jun 2008 09:56:23 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K8l1W-00018n-OS for gtk-perl-list@gnome.org; Wed, 18 Jun 2008 09:55:38 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: gtk priority constants References: <87hchzg8n5.fsf@blah.blah> <1200512406.5904.21.camel@home.hcsiteeffak.de> <1200841779.5482.21.camel@home.hcsiteeffak.de> <87y7ak8196.fsf@blah.blah> <484191D0.4090504@gmx.de> Mail-Copies-To: never Date: Wed, 18 Jun 2008 09:55:38 +1000 Message-ID: <873anbwr9h.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 23:56:36 -0000 Torsten Schoenfeld writes: > > +GDK_PRIORITY_EVENTS newSViv ($var) > +GDK_PRIORITY_REDRAW newSViv I've been using GDK_CURRENT_TIME too, which is 0 of course, but giving it a name makes it clearer what's meant. From gnome-gtk-perl-list@m.gmane.org Thu Jun 19 18:45:15 2008 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 97CBB750004 for ; Thu, 19 Jun 2008 18:45:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.922 X-Spam-Level: X-Spam-Status: No, score=-0.922 tagged_above=-999 required=2 tests=[BAYES_50=0.001, RCVD_IN_DNSWL_LOW=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 8702 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 kzyZM8s8tZmc for ; Thu, 19 Jun 2008 18:45:09 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 9197B75002F for ; Thu, 19 Jun 2008 18:45:09 +0000 (GMT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1K9P82-0005Lv-Qd for gtk-perl-list@gnome.org; Thu, 19 Jun 2008 18:45:03 +0000 Received: from adsl-69-234-194-187.dsl.irvnca.pacbell.net ([69.234.194.187]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jun 2008 18:45:02 +0000 Received: from w41ter by adsl-69-234-194-187.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jun 2008 18:45:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Dragging a Canvas::Line with the mouse? Date: Thu, 19 Jun 2008 11:38:42 -0700 Lines: 12 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-194-187.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a2pre (X11/2008061905) Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 18:45:15 -0000 Hi again, I need to draw a vertical line on a canvas, to be used as a cursor that can be moved horizontally in response to a mouse click or a keystroke. The only graphics trick I know is to draw the line by XOR'ing it with the canvas and again a second time to erase it. (That's to avoid redrawing the whole screen with every move of the cursor.) Is there a way to do that with gtk-perl? From jeffrey.ratcliffe@gmail.com Thu Jun 19 18:56:43 2008 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 D02967500EA for ; Thu, 19 Jun 2008 18:56:43 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 324 hrs), (distance 13, link: (Google 2)), [209.85.146.182] 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 7qDFbZcxCuRL for ; Thu, 19 Jun 2008 18:56:15 +0000 (GMT) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by menubar.gnome.org (Postfix) with ESMTP id 56E6775002F for ; Thu, 19 Jun 2008 18:56:15 +0000 (GMT) Received: by wa-out-1112.google.com with SMTP id j40so683719wah.1 for ; Thu, 19 Jun 2008 11:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=sTurTL5rWTCdtkte9SDpWPbQ914dMyw7kOrc4mCIey0=; b=RVuWpYGHS+ZmpCmFnKFJ9NxrzpTD1NCbjcgpVUZNydgCzE0nZ+pDLxzED90WEksqCA mBTfgWgv5wd8wvniP6Yzt/MKydEPBC+Vl9BPgarql742nislJ9Kfwq60tFPYIDPSpW5y /GlCFInl2O8y7Dct2UgujXfzcdtJfKWGZFspk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=t2fMq6euRPk6NAOs30t3kNR3bbfRmMZucHtxC8703L9ysmrxkxNV19aDEmj7ljnR1f 4FzlhGCfvDzG3X0z66i66rv8Z0tbXHgBwDDFr8Dy2IHBlznd7whAKdHDjwZsc7t567M6 oVwTJhPdL4J1s11khb6lG+GaP9A6Gpuyxtk0o= Received: by 10.114.53.1 with SMTP id b1mr3155477waa.53.1213901773834; Thu, 19 Jun 2008 11:56:13 -0700 (PDT) Received: by 10.115.49.20 with HTTP; Thu, 19 Jun 2008 11:56:13 -0700 (PDT) Message-ID: <30e395780806191156r448c2bb4qbd8cbf33e5077861@mail.gmail.com> Date: Thu, 19 Jun 2008 20:56:13 +0200 From: "Jeffrey Ratcliffe" To: walt Subject: Re: Dragging a Canvas::Line with the mouse? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 18:56:44 -0000 2008/6/19 walt : > The only graphics trick I know is to draw the line by XOR'ing it > with the canvas and again a second time to erase it. (That's to > avoid redrawing the whole screen with every move of the cursor.) > > Is there a way to do that with gtk-perl? google is your friend here: xor site:http://mail.gnome.org/archives/gtk-perl-list/ gives you this thread: http://mail.gnome.org/archives/gtk-perl-list/2007-November/msg00049.html Regards Jeff From daniel.gaston@gmail.com Thu Jun 19 19:00:46 2008 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 A123B7501A0 for ; Thu, 19 Jun 2008 19:00:46 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.583 X-Spam-Level: X-Spam-Status: No, score=-0.583 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, HTML_MESSAGE=0.001, SUBJECT_FUZZY_TION=0.156] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 308 hrs), (distance 17, link: (Google 2)), [209.85.128.187] 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 piVJudP+r-tC for ; Thu, 19 Jun 2008 19:00:42 +0000 (GMT) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by menubar.gnome.org (Postfix) with ESMTP id 5F00275002F for ; Thu, 19 Jun 2008 19:00:40 +0000 (GMT) Received: by fk-out-0910.google.com with SMTP id k31so905089fkk.15 for ; Thu, 19 Jun 2008 12:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=jtsmLteft/GWxsEg5OgOiRObqb1DPeBAwIqARqzvChg=; b=lzHBD0qitedD1yawr0CrXKxcrIB/IjUsGFA+X/3fg5ohblk8cT/Sa3n/QHpegt0z+u HNNRn0e9vHluajadg+4XQ/humGxolhCKJUkI0yX0DTnPXNCGUg3jYzjeljslJixVFGg+ qIDYSRem02tYOj71Did2HUn+sv34Pkfd8DiPE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=GgmiB43y9hXCc8uR3DLpuJ1Xx1nemQSVaG38kZim6jTQ/2M4DDB9Ci7Fcn+MR8+pBI R+Q8u1+yyl7R0KykSH1XlPMjLRcTG7CiJ6ESm1xqxPLC/BDk33TrlTU1PntJA57hokho dxcKd06UeURTeFSn17vdOXHlOJIft3EAlwRMo= Received: by 10.82.107.15 with SMTP id f15mr148262buc.30.1213902038665; Thu, 19 Jun 2008 12:00:38 -0700 (PDT) Received: by 10.82.145.13 with HTTP; Thu, 19 Jun 2008 12:00:38 -0700 (PDT) Message-ID: <50c615ba0806191200x62490334h713655dccf9a485d@mail.gmail.com> Date: Thu, 19 Jun 2008 16:00:38 -0300 From: "Daniel Gaston" To: gtk-perl-list@gnome.org Subject: CheckButtons in a TextView and line spacing MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5741_9339262.1213902038650" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 19:00:46 -0000 ------=_Part_5741_9339262.1213902038650 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guys, I have a program where I have two aligned TextViews (sort of like the earlier versions of visual grep that I had seen discussed on this list in the past) And I wanted to place a Checkbutton on every line of the left hand TextView. However, when I do this the spacing becomes a problem as there is more space between lines in the left hand TextView then on the right and so the text no longer aligns properly. Is there any way to adjust the spacing/padding around the checkbutton or its actual physical size? Thank you, Dan ------=_Part_5741_9339262.1213902038650 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guys,

I have a program where I have two aligned TextViews (sort of like the earlier versions of visual grep that I had seen discussed on this list in the past) And I wanted to place a Checkbutton on every line of the left hand TextView. However, when I do this the spacing becomes a problem as there is more space between lines in the left hand TextView then on the right and so the text no longer aligns properly. Is there any way to adjust the spacing/padding around the checkbutton or its actual physical size?

Thank you,

Dan
------=_Part_5741_9339262.1213902038650-- From zentara1@sbcglobal.net Thu Jun 19 19:33:55 2008 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 846DC750171 for ; Thu, 19 Jun 2008 19:33:55 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.118 X-Spam-Level: X-Spam-Status: No, score=-0.118 tagged_above=-999 required=2 tests=[AWL=-0.810, BAYES_40=-0.185, L_P0F_UNKN=0.8, TW_GT=0.077] X-Amavis-OS-Fingerprint: UNKNOWN [65535:49:1:68:M1460,N,W1,N,N,T,N,N,?12:.:?:?] (up: 610 hrs), (link: ethernet/modem), [68.142.229.96] 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 LWKHRfHxkfjy for ; Thu, 19 Jun 2008 19:33:49 +0000 (GMT) Received: from smtp109.sbc.mail.re2.yahoo.com (smtp109.sbc.mail.re2.yahoo.com [68.142.229.96]) by menubar.gnome.org (Postfix) with SMTP id B34F47500D0 for ; Thu, 19 Jun 2008 19:33:48 +0000 (GMT) Received: (qmail 10530 invoked from network); 19 Jun 2008 19:33:46 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=05siXCMHlFZyt5caihtQKRhme+b3ImeWYtxaQLK+nbHAE7+BeglxvdKkDOMSfFtMaEuEWk76O9mnYxlmVWpmNDJEYjSTw6ohCiQ8BUZ9S1F5DbeGo+/4dBw5fbNIapaqC8YJlfQ+k7XR8Hv/XlW/U60qITaTFmWZdntRXbiZTEM= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.7.53 with login) by smtp109.sbc.mail.re2.yahoo.com with SMTP; 19 Jun 2008 19:33:46 -0000 X-YMail-OSG: F8At4KwVM1nbs97jCWuG4mjk0BkpPAiVzlEZwDKVqnFVaL11yCbKA.3ZAg1osvioSbwyn6L4sjWN3qr9CnbuljI4q2aNPyjIf6GReNTzQvAXntOY0F9OcxmX1nfziG6sck4Ms57i0x4p0QNIu5WhO7uh X-Yahoo-Newman-Property: ymail-3 Date: Thu, 19 Jun 2008 15:28:34 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Dragging a Canvas::Line with the mouse? Message-ID: <20080619152834.158ca9c0@zentara.zentara.net> In-Reply-To: References: X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 19:33:55 -0000 On Thu, 19 Jun 2008 11:38:42 -0700 walt wrote: >Hi again, > >I need to draw a vertical line on a canvas, to be used as a cursor >that can be moved horizontally in response to a mouse click or a >keystroke. > >The only graphics trick I know is to draw the line by XOR'ing it >with the canvas and again a second time to erase it. (That's to >avoid redrawing the whole screen with every move of the cursor.) > >Is there a way to do that with gtk-perl? Can you be more specific on what you want to action to be? Do you want to draw a line, then drag it with the mouse, and/or move it with the arrow keys? It ought to be pretty simple. zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From zentara1@sbcglobal.net Thu Jun 19 19:43:07 2008 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 5554475022A for ; Thu, 19 Jun 2008 19:43:07 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.465 X-Spam-Level: X-Spam-Status: No, score=-1.465 tagged_above=-999 required=2 tests=[AWL=0.568, BAYES_05=-1.11, L_P0F_Unix=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 3857 hrs), (distance 15, link: ethernet/modem), [68.142.229.102] 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 2U2ezxHnij1m for ; Thu, 19 Jun 2008 19:43:00 +0000 (GMT) Received: from smtp103.sbc.mail.re2.yahoo.com (smtp103.sbc.mail.re2.yahoo.com [68.142.229.102]) by menubar.gnome.org (Postfix) with SMTP id C5F5F750168 for ; Thu, 19 Jun 2008 19:42:59 +0000 (GMT) Received: (qmail 97152 invoked from network); 19 Jun 2008 19:42:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=0NOGr/zi7GaLVWRlSyOWpE7n5iuJqXuYauYFUX7Yfilv0rPZiXoI9MNafVUTD08WMgPxfuflB1RI719I7phroN3cUtxaxgo6IYf9gBfdHbd0ztZsxj9plidrZf3iJnwg0jV/JIsqTiaux7U/EqlKUZ5YMA3R9GspsG/cVrfcAbc= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.7.53 with login) by smtp103.sbc.mail.re2.yahoo.com with SMTP; 19 Jun 2008 19:42:57 -0000 X-YMail-OSG: n7wBQjMVM1l5u1adl5NbVvXb16JNIeZ1jJHWgcpBXCDw9W0wdLGPDPHIpsTSfQLkS96oPYbNXngPJW7b3a7p9kngCxEWZuqy3QC_7ZbE2U2I6aZU5nKVKf4FRF9Z6rOrassyZeUall9sZkjEOT84g4gi X-Yahoo-Newman-Property: ymail-3 Date: Thu, 19 Jun 2008 15:37:46 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Dragging a Canvas::Line with the mouse? Message-ID: <20080619153746.2b0d7b0c@zentara.zentara.net> In-Reply-To: References: X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 19:43:07 -0000 On Thu, 19 Jun 2008 11:38:42 -0700 walt wrote: >Hi again, > >I need to draw a vertical line on a canvas, to be used as a cursor >that can be moved horizontally in response to a mouse click or a >keystroke. > >The only graphics trick I know is to draw the line by XOR'ing it >with the canvas and again a second time to erase it. (That's to >avoid redrawing the whole screen with every move of the cursor.) > >Is there a way to do that with gtk-perl? Is this something like what you want? #!/usr/bin/perl use warnings; use strict; use Gtk2 '-init'; use Gnome2::Canvas; my $mw = Gtk2::Window->new; $mw->signal_connect( destroy => sub { exit } ); my $vbox = Gtk2::VBox->new( 0, 0 ); $mw->add($vbox); my $canvas = Gnome2::Canvas->new_aa(); my $white = Gtk2::Gdk::Color->new (0xFFFF,0xFFFF,0xFFFF); $canvas->modify_bg('normal',$white); $vbox->pack_start( $canvas, 1, 1, 0 ); $canvas->set_size_request( 300, 300 ); $canvas->set_scroll_region( 0, 0, 300, 300 ); my $quit = Gtk2::Button->new("Quit"); $quit->signal_connect( clicked => sub { exit } ); $vbox->pack_start( $quit, 0, 0, 0 ); $mw->show_all(); place_objects_on_canvas(); Gtk2->main(); sub place_objects_on_canvas { my $root = $canvas->root(); my $line1 = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Line', points => [150, 150, 150, 230], fill_color => '#ff0000', # fill_color_rgba => 0x3cb37180, width_units => 6.0, ); # Make it movable $line1->signal_connect( "event", \&item_move ); } # Callback for moving items on the canvas my ( $dragging, $last_x, $last_y ); # item_move static data sub item_move { my ( $item, $event ) = @_; if ( $event->type eq "button-press" ) { $item->raise_to_top(); $last_x = $event->x; $last_y = $event->y; $dragging = 1; } elsif ( $event->type eq "motion-notify" ) { if ($dragging) { my $new_x = $event->x; my $new_y = $event->y; $item->move( $new_x - $last_x, $new_y - $last_y ); $last_x = $new_x; $last_y = $new_y; } } elsif ( $event->type eq "button-release" ) { $dragging = 0; } } __END__ zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From zentara1@sbcglobal.net Thu Jun 19 19:46:38 2008 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 A306175015F for ; Thu, 19 Jun 2008 19:46:38 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.358 X-Spam-Level: X-Spam-Status: No, score=-1.358 tagged_above=-999 required=2 tests=[AWL=0.441, BAYES_00=-2.599, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [65535:52:1:68:M1460, N, W1, N, N, T, N, N, ?12:.:?:?] (up: 11474 hrs), (link: ethernet/modem), [68.142.198.210] 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 qyLq11kkUiDU for ; Thu, 19 Jun 2008 19:46:32 +0000 (GMT) Received: from smtp111.sbc.mail.mud.yahoo.com (smtp111.sbc.mail.mud.yahoo.com [68.142.198.210]) by menubar.gnome.org (Postfix) with SMTP id 55F1B750194 for ; Thu, 19 Jun 2008 19:46:30 +0000 (GMT) Received: (qmail 64588 invoked from network); 19 Jun 2008 19:46:28 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=R+b/0eg5llJ22OmzrL19/9S9Av3LiRYWo8Ooz1GH2BYF1q3xE3O1H37ZrDdVjoKcqNll1DkxGnjNWDqBfeNLpYuaGvD0rELaANB89r8Og9bpXaP2O4E7XP4yW7o1YTYnbDLJ+eN5zXH1fsL1veoJwjdFZmuCVYnex1h7vSgi4yk= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.7.53 with login) by smtp111.sbc.mail.mud.yahoo.com with SMTP; 19 Jun 2008 19:46:28 -0000 X-YMail-OSG: 110yaEMVM1l38299wznlQFkBTTfn98DzyFGxR81ZeONd0cpSVoaeKGtRwrqbtnuxKt.FYpsVi_6C4VISkVtiJN0FAqyOUscBROliDrcPlfb623AH6.LiMxjUGO26yis- X-Yahoo-Newman-Property: ymail-3 Date: Thu, 19 Jun 2008 15:41:08 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Dragging a Canvas::Line with the mouse? Message-ID: <20080619154108.73030907@zentara.zentara.net> In-Reply-To: References: X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 19:46:38 -0000 On Thu, 19 Jun 2008 11:38:42 -0700 walt wrote: >I need to draw a vertical line on a canvas, to be used as a cursor >that can be moved horizontally in response to a mouse click or a >keystroke. Is this what you are looking for? #!/usr/bin/perl use warnings; use strict; use Gtk2 '-init'; use Gnome2::Canvas; my $mw = Gtk2::Window->new; $mw->signal_connect( destroy => sub { exit } ); my $vbox = Gtk2::VBox->new( 0, 0 ); $mw->add($vbox); my $canvas = Gnome2::Canvas->new_aa(); my $white = Gtk2::Gdk::Color->new (0xFFFF,0xFFFF,0xFFFF); $canvas->modify_bg('normal',$white); $vbox->pack_start( $canvas, 1, 1, 0 ); $canvas->set_size_request( 300, 300 ); $canvas->set_scroll_region( 0, 0, 300, 300 ); my $quit = Gtk2::Button->new("Quit"); $quit->signal_connect( clicked => sub { exit } ); $vbox->pack_start( $quit, 0, 0, 0 ); $mw->show_all(); place_objects_on_canvas(); Gtk2->main(); sub place_objects_on_canvas { my $root = $canvas->root(); my $line1 = Gnome2::Canvas::Item->new ($root, 'Gnome2::Canvas::Line', points => [150, 150, 150, 230], fill_color => '#ff0000', # fill_color_rgba => 0x3cb37180, width_units => 6.0, ); # Make it movable $line1->signal_connect( "event", \&item_move ); } # Callback for moving items on the canvas my ( $dragging, $last_x, $last_y ); # item_move static data sub item_move { my ( $item, $event ) = @_; if ( $event->type eq "button-press" ) { $item->raise_to_top(); $last_x = $event->x; $last_y = $event->y; $dragging = 1; } elsif ( $event->type eq "motion-notify" ) { if ($dragging) { my $new_x = $event->x; my $new_y = $event->y; $item->move( $new_x - $last_x, $new_y - $last_y ); $last_x = $new_x; $last_y = $new_y; } } elsif ( $event->type eq "button-release" ) { $dragging = 0; } } __END__ zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From gnome-gtk-perl-list@m.gmane.org Thu Jun 19 23:06:35 2008 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 C4D3D7500B5 for ; Thu, 19 Jun 2008 23:06:35 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.522 X-Spam-Level: X-Spam-Status: No, score=-3.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 8746 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 xTS+KPfmsq5d for ; Thu, 19 Jun 2008 23:06:08 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 99E5475012A for ; Thu, 19 Jun 2008 23:06:08 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K9TCb-00074c-FX for gtk-perl-list@gnome.org; Thu, 19 Jun 2008 23:06:01 +0000 Received: from adsl-69-234-224-137.dsl.irvnca.pacbell.net ([69.234.224.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jun 2008 23:06:01 +0000 Received: from w41ter by adsl-69-234-224-137.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jun 2008 23:06:01 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: Dragging a Canvas::Line with the mouse? Date: Thu, 19 Jun 2008 16:05:56 -0700 Lines: 30 Message-ID: References: <20080619152834.158ca9c0@zentara.zentara.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-224-137.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a2pre (X11/2008061905) In-Reply-To: <20080619152834.158ca9c0@zentara.zentara.net> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 23:06:36 -0000 zentara wrote: > On Thu, 19 Jun 2008 11:38:42 -0700 > walt wrote: > >> Hi again, >> >> I need to draw a vertical line on a canvas, to be used as a cursor >> that can be moved horizontally in response to a mouse click or a >> keystroke. >> >> The only graphics trick I know is to draw the line by XOR'ing it >> with the canvas and again a second time to erase it. (That's to >> avoid redrawing the whole screen with every move of the cursor.) >> >> Is there a way to do that with gtk-perl? > > Can you be more specific on what you want to action to be? Do you > want to draw a line, then drag it with the mouse, and/or move > it with the arrow keys? > > It ought to be pretty simple. Thanks for another wonderful reply. If the timestamps on your messages are correct, you took 9 minutes to come up with that code. Please tell me you cut and pasted it from somewhere ;o) I'll need to study your code for a while before I understand it, but I can tell already that it will be close to what I need, anyway. I'm off to study it now, and meanwhile thank you! From zentara1@sbcglobal.net Fri Jun 20 12:59:28 2008 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 7BD177502D3 for ; Fri, 20 Jun 2008 12:59:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.069 X-Spam-Level: X-Spam-Status: No, score=0.069 tagged_above=-999 required=2 tests=[AWL=-0.546, BAYES_40=-0.185, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [65535:49:1:68:M1460, N, W1, N, N, T, N, N, ?12:.:?:?] (up: 11490 hrs), (link: ethernet/modem), [68.142.229.93] 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 9KsBpeN7b09g for ; Fri, 20 Jun 2008 12:59:21 +0000 (GMT) Received: from smtp112.sbc.mail.re2.yahoo.com (smtp112.sbc.mail.re2.yahoo.com [68.142.229.93]) by menubar.gnome.org (Postfix) with SMTP id 22BF075027F for ; Fri, 20 Jun 2008 12:59:11 +0000 (GMT) Received: (qmail 82719 invoked from network); 20 Jun 2008 12:59:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=yLZyngZ8JRIelU0iid9oJ4ZubjKahN50c5R7Rk8PkHn69vky81hZg6eIe9BNilf9cmTsJtxLzKY0AskgVBfKTAOG/d1A18GSjzRvFBT+yknTIwByG+czDIdHH1DsQe026uYP7GS0MZx0jz2DaS4wPsG+QXKSWwq+032oQnK/WSo= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.90.142 with login) by smtp112.sbc.mail.re2.yahoo.com with SMTP; 20 Jun 2008 12:59:10 -0000 X-YMail-OSG: lKZgjgUVM1k6oHU5qzDfFgdkGm7PZtFDR4_nLCW7VXSTPUV7pcKTN5HnIdiwp.ZcIWttB.qiwgLBeK3WSgiriiSpdnp1qyjrAlUC9i75QImgh2M9cbkQWA5rgulnkZA- X-Yahoo-Newman-Property: ymail-3 Date: Fri, 20 Jun 2008 08:53:59 -0400 From: zentara To: walt Subject: Re: Dragging a Canvas::Line with the mouse? Message-ID: <20080620085359.5900437a@zentara.zentara.net> In-Reply-To: References: <20080619152834.158ca9c0@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 12:59:29 -0000 On Thu, 19 Jun 2008 16:05:56 -0700 walt wrote: > >Thanks for another wonderful reply. If the timestamps on your messages >are correct, you took 9 minutes to come up with that code. Please tell >me you cut and pasted it from somewhere ;o) > >I'll need to study your code for a while before I understand it, but I >can tell already that it will be close to what I need, anyway. > >I'm off to study it now, and meanwhile thank you! Yeah, I took the dragging code from the demo. Also, I've been working alot with the Canvas lately, so it was fresh on my mind. A few months ago, I ripped apart the demo into small little scripts, each demonstrating a certain feature. It would be a good exercise for you to do.... the best way to learn is to rip apart the demo.... it forces you to look at the code in detail. The demo writers also write good code, so it is useful to copy their style. Sorry about the multiple posts... either my mail program had a hiccup or I hit a time anomaly. :-) zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From anguila@gmail.com Fri Jun 20 19:24:09 2008 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 05ADC7501E7 for ; Fri, 20 Jun 2008 19:24:09 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.583 X-Spam-Level: X-Spam-Status: No, score=-0.583 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, HTML_MESSAGE=0.001, SUBJECT_FUZZY_TION=0.156] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 6650 hrs), (distance 13, link: (Google 2)), [209.85.198.228] 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 yK-KLH8E6sep for ; Fri, 20 Jun 2008 19:24:04 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228]) by menubar.gnome.org (Postfix) with ESMTP id 126277501D3 for ; Fri, 20 Jun 2008 19:24:03 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so6648675rvb.3 for ; Fri, 20 Jun 2008 12:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=RD8T2f9PrYHmf1MDQysh/6IrHp9woXeC4QaGBiNjk3E=; b=ZsDz/V3fUwG/Wqv3jR5rk5wOm0XjrNQvJ7xxFsuvvR+Zl2G/TGVrILK68qEh0tymY6 iuFP1gxwTwR12kV9kwye7Df+EUTD9WdQlE/eqqD16I38kItcV7h/dya3LqyZw96hV5Rs 2Ef4zbwxOyAB7/FUTFUHMhyFtqLhPgycl1vPs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=nwE3iR+SfkPD0U9TpSsPBtamVIg6Ij8lM/E1yJsm1F3KJp3rwHZJWQ3E17InRGzSiu f6qeqwhIfifYbz28QbrpCTQHdQnY3UdZS7NfyupeRvGemp7HVGVV7C+aHGTOx0VmxPQ0 amn7Y0TbQmLiPL/PS6JlPcaCbN2CpLjxqfSdc= Received: by 10.141.151.18 with SMTP id d18mr8015189rvo.152.1213989842204; Fri, 20 Jun 2008 12:24:02 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Fri, 20 Jun 2008 12:24:02 -0700 (PDT) Message-ID: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> Date: Fri, 20 Jun 2008 21:24:02 +0200 From: anguila To: gtk-perl-list@gnome.org Subject: close button into the glade-3 about dialog window MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8586_3498649.1213989842193" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 19:24:09 -0000 ------=_Part_8586_3498649.1213989842193 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I create a about dialog window with glade-3 in higher levels - about. And the about dialog it works but the close button doesn't do anything when I execute the program (doesn't close the widget/window). The widget is a dialog-action-area but I can access to the close button because is a internal widget of glade. Also after closing this window (at the first time) when I click again in the menu to show it again it doesn't shows, it appears a small gray square. What I'm missing? Thx again! anguila ------=_Part_8586_3498649.1213989842193 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I create a about dialog window with glade-3 in higher levels - about. And the about dialog it works but the close button doesn't do anything when I execute the program (doesn't close the widget/window).

The widget is a dialog-action-area but I can access to the close button because is a internal widget of glade.
Also after closing this window (at the first time) when I click again in the menu to show it again it doesn't shows, it appears a small gray square.

What I'm missing?

Thx again!

anguila
------=_Part_8586_3498649.1213989842193-- From zentara1@sbcglobal.net Fri Jun 20 19:33:04 2008 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 035B975002E for ; Fri, 20 Jun 2008 19:33:04 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.188 X-Spam-Level: X-Spam-Status: No, score=-2.188 tagged_above=-999 required=2 tests=[AWL=1.255, BAYES_00=-2.599, L_P0F_Unix=-1, SUBJECT_FUZZY_TION=0.156] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9811 hrs), (distance 15, link: ethernet/modem), [66.196.96.92] 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 dtIihM9pW6eG for ; Fri, 20 Jun 2008 19:32:56 +0000 (GMT) Received: from smtp119.sbc.mail.re3.yahoo.com (smtp119.sbc.mail.re3.yahoo.com [66.196.96.92]) by menubar.gnome.org (Postfix) with SMTP id 5920275000B for ; Fri, 20 Jun 2008 19:32:56 +0000 (GMT) Received: (qmail 4674 invoked from network); 20 Jun 2008 19:32:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=zpeRXEeLWNSsMII7wBe1QOzbpkP7WFf8zuOsUUq8PI0JmtKuYXe1J6R3SesP/mUzLP75msfEDMIL/qKzT41s9KcLQyCz6yzQ5+kMuPFXwL2WQrWtFsfAVDibccAb2vx3GButYllvA83/BfkVYOuOH4MIa84tgXFqy6xAZ3fWC3I= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.8.253 with login) by smtp119.sbc.mail.re3.yahoo.com with SMTP; 20 Jun 2008 19:32:54 -0000 X-YMail-OSG: cFpxXpcVM1mpyZxGnfhHweNIQSrKuXxSf1FGiocvXeOyAp3BN7jT9fnERCAW61vPotERVxMCIDgagH6y6cDnGr96Ztbgc8_2koAozwD9EWQJL2IsAXGxjKKXYmH8u_Yn4Hl.eU71w0t76Kxem7nLecRP X-Yahoo-Newman-Property: ymail-3 Date: Fri, 20 Jun 2008 15:27:39 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: close button into the glade-3 about dialog window Message-ID: <20080620152739.5f58105f@zentara.zentara.net> In-Reply-To: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> References: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 19:33:04 -0000 On Fri, 20 Jun 2008 21:24:02 +0200 anguila wrote: >I create a about dialog window with glade-3 in higher levels - about. And >the about dialog it works but the close button doesn't do anything when I >execute the program (doesn't close the widget/window). > >The widget is a dialog-action-area but I can access to the close button >because is a internal widget of glade. >Also after closing this window (at the first time) when I click again in the >menu to show it again it doesn't shows, it appears a small gray square. > >What I'm missing? > >Thx again! > >anguila I didn't write this, but I kept a note when this came up awhile back, maybe it will help. ######################################### I expect I'm missing the point, but what is wrong with: my $about = Gtk2::AboutDialog->new; $about->set_name ($program); $about->set_version ($version); $about->set_authors ($authors); $about->set_comments ($comments); $about->run; $about->destroy; The close button works fine this way. Jeff ######################################### zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From anguila@gmail.com Fri Jun 20 19:45:44 2008 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 7171D750107 for ; Fri, 20 Jun 2008 19:45:44 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.365 X-Spam-Level: X-Spam-Status: No, score=-2.365 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, SUBJECT_FUZZY_TION=0.156, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 8140 hrs), (distance 12, link: (Google 2)), [64.233.166.176] 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 s9q0bCxE4HS6 for ; Fri, 20 Jun 2008 19:45:36 +0000 (GMT) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by menubar.gnome.org (Postfix) with ESMTP id 66DAE750203 for ; Fri, 20 Jun 2008 19:45:30 +0000 (GMT) Received: by py-out-1112.google.com with SMTP id a29so633607pyi.36 for ; Fri, 20 Jun 2008 12:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=5WhxEWKDKdLGBKjD5Ftu7Is/lEQReOLBpQm9qsyvIyo=; b=gYAXpP4EUfwI5biBnsudoNDx53PmjzqdZkwLpSgfR9VY7U7lyjng1dwMeZzn+ON3pg +r0lkkkjqwI1ZSiKShpkZjZcuoce9V7LClX3vJkhdp48v9pyu12RK6hZjMA446ndC/63 T+7OvpfKV2EP6kJTRhYTOFj66uSXwUbqzOCK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=pSUMTwuLIRShxqkHfIB4YjA4UDonx9p4iZpaGpBjW0nGdj05eGizthzUQQmL3l9Yhz h1RC+Blf4Am/6Wh/HtxArvyhZJwqk7yjYVFi+lIRR9tUylduZj8vohfXoKK8KSpanu4O t7+31je2E1RZ41l3UAcMRHL3upk98Q0o/7W6E= Received: by 10.140.139.3 with SMTP id m3mr8044462rvd.165.1213991128247; Fri, 20 Jun 2008 12:45:28 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Fri, 20 Jun 2008 12:45:28 -0700 (PDT) Message-ID: <153d32140806201245uf32e4d6qaf4a4e6d305be4b2@mail.gmail.com> Date: Fri, 20 Jun 2008 21:45:28 +0200 From: anguila To: zentara Subject: Re: close button into the glade-3 about dialog window In-Reply-To: <20080620152739.5f58105f@zentara.zentara.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8639_17931397.1213991128221" References: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> <20080620152739.5f58105f@zentara.zentara.net> Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 19:45:45 -0000 ------=_Part_8639_17931397.1213991128221 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Yes... it works :\ But I re-try with glade-3 an I can't understand why is still not working :S On Fri, Jun 20, 2008 at 9:27 PM, zentara wrote: > On Fri, 20 Jun 2008 21:24:02 +0200 > anguila wrote: > > >I create a about dialog window with glade-3 in higher levels - about. And > >the about dialog it works but the close button doesn't do anything when I > >execute the program (doesn't close the widget/window). > > > >The widget is a dialog-action-area but I can access to the close button > >because is a internal widget of glade. > >Also after closing this window (at the first time) when I click again in > the > >menu to show it again it doesn't shows, it appears a small gray square. > > > >What I'm missing? > > > >Thx again! > > > >anguila > > I didn't write this, but I kept a note when this came up awhile back, > maybe it will help. > > ######################################### > I expect I'm missing the point, but what is wrong with: > > my $about = Gtk2::AboutDialog->new; > $about->set_name ($program); > $about->set_version ($version); > $about->set_authors ($authors); > $about->set_comments ($comments); > $about->run; > $about->destroy; > > The close button works fine this way. > > Jeff > > ######################################### > > > zentara > > > > > > > -- > I'm not really a human, but I play one on earth. > http://zentara.net/CandyGram_for_Mongo.html > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_8639_17931397.1213991128221 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Yes... it works :\
But I re-try with glade-3 an I can't understand why is still not working :S


On Fri, Jun 20, 2008 at 9:27 PM, zentara <zentara1@sbcglobal.net> wrote:
On Fri, 20 Jun 2008 21:24:02 +0200
anguila <anguila@gmail.com> wrote:

>I create a about dialog window with glade-3 in higher levels - about. And
>the about dialog it works but the close button doesn't do anything when I
>execute the program (doesn't close the widget/window).
>
>The widget is a dialog-action-area but I can access to the close button
>because is a internal widget of glade.
>Also after closing this window (at the first time) when I click again in the
>menu to show it again it doesn't shows, it appears a small gray square.
>
>What I'm missing?
>
>Thx again!
>
>anguila

I didn't write this, but I kept a note when this came up awhile back,
maybe it will help.

#########################################
I expect I'm missing the point, but what is wrong with:

 my $about = Gtk2::AboutDialog->new;
 $about->set_name ($program);
 $about->set_version ($version);
 $about->set_authors ($authors);
 $about->set_comments ($comments);
 $about->run;
 $about->destroy;

The close button works fine this way.

Jeff

#########################################


zentara






--
I'm not really a human, but I play one on earth.
http://zentara.net/CandyGram_for_Mongo.html
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

------=_Part_8639_17931397.1213991128221-- From gg@zip.com.au Fri Jun 20 22:27:33 2008 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 76ECF7500A3 for ; Fri, 20 Jun 2008 22:27:33 +0000 (GMT) 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_05=-1.11] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1930 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 5o5K8J1kd2uE for ; Fri, 20 Jun 2008 22:27:27 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 9C5897500BE for ; Fri, 20 Jun 2008 22:27:24 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 1A492BED50 for ; Sat, 21 Jun 2008 08:27:22 +1000 (EST) Received: from blah.blah (ppp223A.dyn.pacific.net.au [61.8.34.58]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E686F8C0D for ; Sat, 21 Jun 2008 08:27:20 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K9p4D-0001nS-DC for gtk-perl-list@gnome.org; Sat, 21 Jun 2008 08:26:49 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Glib::Flags overloaded mutators Mail-Copies-To: never Date: Sat, 21 Jun 2008 08:26:49 +1000 Message-ID: <87ej6rwxna.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 22:27:33 -0000 --=-=-= It'd be good if Glib::Flags had overloaded += as well as + so you could go $f += 'val'; I think the basic overload can be used without too much trouble, the new object returned being assigned to the destination automatically by "overload". I remember a long time ago making mutators which peeked into the target object and on refcount==1 changed it in-place instead of creating a new one. I guess that's possible with Glib::Flags too, though it's small enough it might not be worth bothering. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=GType.xs.mutators.diff --- GType.xs 02 Jun 2008 09:38:05 +1000 1.92 +++ GType.xs 20 Jun 2008 18:10:11 +1000 @@ -2773,7 +2773,7 @@ RETVAL SV * -union (SV *a, SV *b, int swap) +union (SV *a, SV *b, SV *swap) ALIAS: sub = 1 intersect = 2 @@ -2783,12 +2783,13 @@ { GType gtype; const char *package; - gint a_, b_; + gint a_, b_, swap_; package = sv_reftype (SvRV (a), TRUE); gtype = gperl_fundamental_type_from_package (package); - a_ = gperl_convert_flags (gtype, swap ? b : a); - b_ = gperl_convert_flags (gtype, swap ? a : b); + swap_ = SvTRUE (swap); + a_ = gperl_convert_flags (gtype, swap_ ? b : a); + b_ = gperl_convert_flags (gtype, swap_ ? a : b); switch (ix) { case 0: a_ |= b_; break; --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=Glib.pm.mutators.diff --- Glib.pm 23 May 2008 09:49:02 +1000 1.121 +++ Glib.pm 20 Jun 2008 17:54:15 +1000 @@ -73,13 +73,16 @@ use overload 'bool' => \&bool, - '+' => \&union, '|' => \&union, - '-' => \&sub, + '+' => \&union, '+=' => \&union, + '|' => \&union, '|=' => \&union, + '-' => \&sub, '-=' => \&sub, + '*' => \&intersect, '*=' => \&intersect, + '&' => \&intersect, '&=' => \&intersect, + '/' => \&xor, '/=' => \&xor, + '^' => \&xor, '^=' => \&xor, '>=' => \&ge, '==' => \&eq, 'eq' => \&eq, '!=' => \&ne, 'ne' => \&ne, - '*' => \&intersect, '&' => \&intersect, - '/' => \&xor, '^' => \&xor, '@{}' => \&as_arrayref, '""' => sub { "[ @{$_[0]} ]" }, fallback => 1; --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=c.t.mutators.diff --- c.t 23 May 2008 09:49:02 +1000 1.12 +++ c.t 20 Jun 2008 18:12:47 +1000 @@ -13,7 +13,7 @@ ######################### -use Test::More tests => 32; +use Test::More tests => 34; BEGIN { use_ok('Glib') }; ######################### @@ -40,6 +40,16 @@ eval { my $h = Glib::Flags->new (['readable']); }; ok ($@, "Will croak on trying to create plain old Glib::Flags"); +{ $f = Glib::ParamFlags->new (['readable']); # with array + my $g = $f; + $g += 'writable'; + ok ($g == ['readable', 'writable'], + "overloaded +="); + ok ($f == ['readable'], + "overloaded += leaves original unchanged"); +} + + ######################### $@ = undef; --=-=-=-- From gnome-gtk-perl-list@m.gmane.org Fri Jun 20 22:31:31 2008 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 3534875000B for ; Fri, 20 Jun 2008 22:31:31 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.11 X-Spam-Level: X-Spam-Status: No, score=-2.11 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 8980 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 Km7A5y7jWvVn for ; Fri, 20 Jun 2008 22:31:25 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 24CBB7500D6 for ; Fri, 20 Jun 2008 22:31:25 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K9p8Y-0001dy-Ui for gtk-perl-list@gnome.org; Fri, 20 Jun 2008 22:31:18 +0000 Received: from adsl-69-234-203-94.dsl.irvnca.pacbell.net ([69.234.203.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jun 2008 22:31:18 +0000 Received: from w41ter by adsl-69-234-203-94.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jun 2008 22:31:18 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: Dragging a Canvas::Line with the mouse? Date: Fri, 20 Jun 2008 15:31:11 -0700 Lines: 21 Message-ID: References: <20080619152834.158ca9c0@zentara.zentara.net> <20080620085359.5900437a@zentara.zentara.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-203-94.dsl.irvnca.pacbell.net User-Agent: Thunderbird/3.0a2pre (X11; 2008062006) In-Reply-To: <20080620085359.5900437a@zentara.zentara.net> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 22:31:31 -0000 zentara wrote: > On Thu, 19 Jun 2008 16:05:56 -0700 > walt wrote: > > >> Thanks for another wonderful reply. If the timestamps on your messages >> are correct, you took 9 minutes to come up with that code. Please tell >> me you cut and pasted it from somewhere ;o) >> >> I'll need to study your code for a while before I understand it, but I >> can tell already that it will be close to what I need, anyway. It's perfect for what I need, and light years better than what I was intending to do. > Yeah, I took the dragging code from the demo. > Also, I've been working alot with the Canvas lately, > so it was fresh on my mind... Thanks for mentioning the demo. It's a great resource and I didn't know about it. From gg@zip.com.au Fri Jun 20 22:31:54 2008 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 17EEA7500D6 for ; Fri, 20 Jun 2008 22:31:54 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.443 X-Spam-Level: X-Spam-Status: No, score=-2.443 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SUBJECT_FUZZY_TION=0.156] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1930 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 8MjHmpcKx8I1 for ; Fri, 20 Jun 2008 22:31:48 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 4CE43750107 for ; Fri, 20 Jun 2008 22:31:48 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 19A7EBED81; Sat, 21 Jun 2008 08:31:07 +1000 (EST) Received: from blah.blah (ppp223A.dyn.pacific.net.au [61.8.34.58]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id A825427403; Sat, 21 Jun 2008 08:31:06 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1K9p7r-0001oJ-Po; Sat, 21 Jun 2008 08:30:35 +1000 From: Kevin Ryde To: anguila Subject: Re: close button into the glade-3 about dialog window References: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> Mail-Copies-To: never Date: Sat, 21 Jun 2008 08:30:35 +1000 In-Reply-To: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> (anguila@gmail.com's message of "Fri, 20 Jun 2008 21:24:02 +0200") Message-ID: <87abhfwxh0.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 22:31:54 -0000 anguila writes: > > when I click again in the menu to show it again it doesn't shows, it > appears a small gray square. That sounds like its contents have been removed, or destroyed. Do you also get an unhelpful message on stdout about "container foreach"? From scott@asofyet.org Fri Jun 20 22:35:38 2008 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 3017D75000B for ; Fri, 20 Jun 2008 22:35:38 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.157 X-Spam-Level: X-Spam-Status: No, score=0.157 tagged_above=-999 required=2 tests=[BAYES_50=0.001, SUBJECT_FUZZY_TION=0.156] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 2173 hrs), (distance 19, link: ethernet/modem), [208.97.187.133] 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 mkXhxxcrAfBf for ; Fri, 20 Jun 2008 22:35:11 +0000 (GMT) Received: from webmail5.dreamhost.com (sd-green-dreamhost-133.dreamhost.com [208.97.187.133]) by menubar.gnome.org (Postfix) with ESMTP id 68081750204 for ; Fri, 20 Jun 2008 22:35:11 +0000 (GMT) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail5.dreamhost.com (Postfix) with ESMTP id 056FD5B656 for ; Fri, 20 Jun 2008 15:35:09 -0700 (PDT) Received: from 192.146.101.70 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Fri, 20 Jun 2008 18:35:09 -0400 (EDT) Message-ID: <46518.192.146.101.70.1214001309.squirrel@webmail.asofyet.org> In-Reply-To: <153d32140806201245uf32e4d6qaf4a4e6d305be4b2@mail.gmail.com> References: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> <20080620152739.5f58105f@zentara.zentara.net> <153d32140806201245uf32e4d6qaf4a4e6d305be4b2@mail.gmail.com> Date: Fri, 20 Jun 2008 18:35:09 -0400 (EDT) Subject: Re: close button into the glade-3 about dialog window From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jun 2008 22:35:38 -0000 anguila wrote: > Yes... it works :\ > But I re-try with glade-3 an I can't understand why is still not working :S Is glade-3 creating a GtkAboutDialog instance or building its own GtkDialog? (THat is, what is the generated XML for that widget?) -- muppet From anguila@gmail.com Sat Jun 21 03:55:51 2008 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 86D7675012A for ; Sat, 21 Jun 2008 03:55:51 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.365 X-Spam-Level: X-Spam-Status: No, score=-2.365 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, SUBJECT_FUZZY_TION=0.156, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 6735 hrs), (distance 13, link: (Google 2)), [209.85.198.233] 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 rGpg9XK9j+vR for ; Sat, 21 Jun 2008 03:55:44 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by menubar.gnome.org (Postfix) with ESMTP id 8B0807500BE for ; Sat, 21 Jun 2008 03:55:44 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so6794970rvb.3 for ; Fri, 20 Jun 2008 20:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=W6U02v65sdSYVYOZLjLOIq92Q/SAeijyf5M3V+YhUsI=; b=uiIP24LuIvtesWtw+MyKfEj/XdmSkTYHZKLQobTqrFSk6oWidnCFokRp7PDTwHI2jo DKEqO8P7pgy5qUmpdCsF5GWZhNnlqP88DPBXF/4rjapE6ga/pJJ6Jhg8SiiVU0jyngn2 gPQd1p2sBqHfyAiC1+ntSq0dDkcbpqg0Wy8Go= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=v9DgVYVTMk3J58KsK45jFxww4LwPZ9OCUWpoHrNiZnKUYyF+bxYALbGhDTV3mPUN9d LEY9Td0hg+XoldQDJ3AOtLpr8cVtmeC6LeDCwQq+GTHeJ47zYsRx2skXEzhPjr6NO94W pDS9WgwkiETrS2kVr1qtQ6gNFrwJW5wNQ7M+k= Received: by 10.141.198.2 with SMTP id a2mr3603237rvq.219.1214020541924; Fri, 20 Jun 2008 20:55:41 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Fri, 20 Jun 2008 20:55:41 -0700 (PDT) Message-ID: <153d32140806202055x1ae11d7ck490b989e8966c542@mail.gmail.com> Date: Sat, 21 Jun 2008 05:55:41 +0200 From: anguila To: muppet Subject: Re: close button into the glade-3 about dialog window In-Reply-To: <46518.192.146.101.70.1214001309.squirrel@webmail.asofyet.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_9406_5194326.1214020541909" References: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> <20080620152739.5f58105f@zentara.zentara.net> <153d32140806201245uf32e4d6qaf4a4e6d305be4b2@mail.gmail.com> <46518.192.146.101.70.1214001309.squirrel@webmail.asofyet.org> Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 03:55:51 -0000 ------=_Part_9406_5194326.1214020541909 Content-Type: multipart/alternative; boundary="----=_Part_9407_6708138.1214020541909" ------=_Part_9407_6708138.1214020541909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Is a glade-3 gtkabout dialog. I attach a example of the problem. Thanks to all. David. On Sat, Jun 21, 2008 at 12:35 AM, muppet wrote: > > anguila wrote: > > Yes... it works :\ > > But I re-try with glade-3 an I can't understand why is still not working > :S > > Is glade-3 creating a GtkAboutDialog instance or building its own > GtkDialog? > (THat is, what is the generated XML for that widget?) > > > > -- > muppet > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_9407_6708138.1214020541909 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Is a glade-3 gtkabout dialog.

I attach  a example of the problem.

Thanks to all.

David.

On Sat, Jun 21, 2008 at 12:35 AM, muppet <scott@asofyet.org> wrote:

anguila wrote:
> Yes... it works :\
> But I re-try with glade-3 an I can't understand why is still not working :S

Is glade-3 creating a GtkAboutDialog instance or building its own GtkDialog?
(THat is, what is the generated XML for that widget?)



--
muppet <scott at asofyet dot org>

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

------=_Part_9407_6708138.1214020541909-- ------=_Part_9406_5194326.1214020541909 Content-Type: application/x-glade; name=test.glade Content-Transfer-Encoding: base64 X-Attachment-Id: f_fhpoh69w0 Content-Disposition: attachment; filename=test.glade PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjwh RE9DVFlQRSBnbGFkZS1pbnRlcmZhY2UgU1lTVEVNICJnbGFkZS0yLjAuZHRkIj4KPCEtLUdlbmVy YXRlZCB3aXRoIGdsYWRlMyAzLjQuNSBvbiBTYXQgSnVuIDIxIDA1OjU0OjMxIDIwMDggLS0+Cjxn bGFkZS1pbnRlcmZhY2U+CiAgPHdpZGdldCBjbGFzcz0iR3RrQWJvdXREaWFsb2ciIGlkPSJhYm91 dGRpYWxvZzEiPgogICAgPHByb3BlcnR5IG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2luZz4KICAgICAgICAg ICAgPC9jaGlsZD4KICAgICAgICAgIDwvd2lkZ2V0PgogICAgICAgICAgPHBhY2tpbmc+CiAgICAg ICAgICAgIDxwcm9wZXJ0eSBuYW1lPSJleHBhbmQiPkZhbHNlPC9wcm9wZXJ0eT4KICAgICAgICAg ICAgPHByb3BlcnR5IG5hbWU9ImZpbGwiPkZhbHNlPC9wcm9wZXJ0eT4KICAgICAgICAgICAgPHBy b3BlcnR5IG5hbWU9InBvc2l0aW9uIj4xPC9wcm9wZXJ0eT4KICAgICAgICAgIDwvcGFja2luZz4K ICAgICAgICA8L2NoaWxkPgogICAgICA8L3dpZGdldD4KICAgIDwvY2hpbGQ+CiAgPC93aWRnZXQ+ CjwvZ2xhZGUtaW50ZXJmYWNlPgo= ------=_Part_9406_5194326.1214020541909 Content-Type: application/x-perl; name=test.pl Content-Transfer-Encoding: base64 X-Attachment-Id: f_fhpohcnp1 Content-Disposition: attachment; filename=test.pl IyEvdXNyL2Jpbi9wZXJsIC13Cgp1c2UgR3RrMiAnLWluaXQnOwp1c2UgR3RrMjo6R2xhZGVYTUw7 CnVzZSBzdHJpY3Q7CgpteSAkcHJvZyA9IEd0azI6OkdsYWRlWE1MLT5uZXcoJ3Rlc3QuZ2xhZGUn KTsKbXkgJHdpbj0gJHByb2ctPmdldF93aWRnZXQoJ3dpbmRvdzEnKTsKbXkgJGFib3V0PSAkcHJv Zy0+Z2V0X3dpZGdldCgnYWJvdXRkaWFsb2cxJyk7CgpteSAkYnV0dG9uMj0gJHByb2ctPmdldF93 aWRnZXQoJ2J1dHRvbjEnKTsKbXkgJGJ1dHRvbjE9ICRwcm9nLT5nZXRfd2lkZ2V0KCdidXR0b24y Jyk7CgokcHJvZy0+c2lnbmFsX2F1dG9jb25uZWN0X2Zyb21fcGFja2FnZSgnbWFpbicpOwoKJHdp bi0+c2hvd19hbGwoKTsKCnN1YiBvbl9idXR0b24xX2NsaWNrZWQgewoJJGFib3V0LT5zaG93KCk7 CQp9CgpzdWIgb25fYnV0dG9uMl9jbGlja2VkIHsJCglHdGsyLT5tYWluX3F1aXQ7Cn0KCkd0azIt Pm1haW47CgoK ------=_Part_9406_5194326.1214020541909-- From gg@zip.com.au Sat Jun 21 23:17:58 2008 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 9A1247500AA for ; Sat, 21 Jun 2008 23:17:58 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.048 X-Spam-Level: X-Spam-Status: No, score=0.048 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, SUBJECT_FUZZY_TION=0.156, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1954 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 S-Fdk9fJsi5u for ; Sat, 21 Jun 2008 23:17:27 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 4F9D075006E for ; Sat, 21 Jun 2008 23:17:26 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id E5891BC306; Sun, 22 Jun 2008 09:17:23 +1000 (EST) Received: from blah.blah (ppp27E3.dyn.pacific.net.au [61.8.39.227]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 3908327408; Sun, 22 Jun 2008 09:17:23 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KACKA-0001lT-Nh; Sun, 22 Jun 2008 09:16:50 +1000 From: Kevin Ryde To: anguila Subject: Re: close button into the glade-3 about dialog window References: <153d32140806201224v56198de0yd793db64f7b1ab8f@mail.gmail.com> <20080620152739.5f58105f@zentara.zentara.net> <153d32140806201245uf32e4d6qaf4a4e6d305be4b2@mail.gmail.com> <46518.192.146.101.70.1214001309.squirrel@webmail.asofyet.org> <153d32140806202055x1ae11d7ck490b989e8966c542@mail.gmail.com> Mail-Copies-To: never Date: Sun, 22 Jun 2008 09:16:50 +1000 Message-ID: <87zlpe8jkt.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 23:17:58 -0000 anguila writes: > > I attach a example of the problem. For the close button you might have to hook it up to emit the "close" signal on the dialog. An "Esc" keybinding is setup automatically to do that, but a button may have to do it explicitly (even if named "Close" etc). For the re-open the message Gtk-CRITICAL **: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)' failed at test.pl line 19. is the bit I wondered before. It means you've tried to show a dialog that's already destroyed, in this case by the default handler of delete-event. To keep it alive you can put a handler on the delete-event signal like gtk_widget_hide_on_delete(), except that's not wrapped I think, so the same in perl sub hide_on_delete { my ($widget) = @_; $widget->hide; return 1; # don't propagate event } I recently suffered through some similar bits. It's probably not meant to be quite so tedious. I submitted a gtk bug for the gtk_container_foreach message and apparently it's notabug to print something unhelpful and uninformative. (It arises of course in language bindings, where gtk_widget_destroy isn't necessarily the end, because variables and whatnot can be keeping the object alive past that. In a sense I guess language bindings end up with ->destroy being not much more than emitting the destroy signal, which is not really how it was originally conceived for C.) Incidentally, for $about->show() you might want to use ->present instead, to raise the window if it's already open but buried somewhere underneath other windows. From kaffeetisch@gmx.de Sun Jun 22 12:05:55 2008 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 4F7DB750060 for ; Sun, 22 Jun 2008 12:05:55 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.108 X-Spam-Level: X-Spam-Status: No, score=-0.108 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 933 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 6s19T0XPQw9R for ; Sun, 22 Jun 2008 12:05:49 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 0DB577500A6 for ; Sun, 22 Jun 2008 12:05:48 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 12:05:46 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp046) with SMTP; 22 Jun 2008 14:05:46 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19sIVZcQZJsVYI/AcxAU7T2HzLq1jjU2hpljpU27z l42Y4l920RpbW0 Message-ID: <485E401B.1060309@gmx.de> Date: Sun, 22 Jun 2008 14:05:47 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: gtk priority constants References: <87hchzg8n5.fsf@blah.blah> <1200512406.5904.21.camel@home.hcsiteeffak.de> <1200841779.5482.21.camel@home.hcsiteeffak.de> <87y7ak8196.fsf@blah.blah> <484191D0.4090504@gmx.de> In-Reply-To: <484191D0.4090504@gmx.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 12:05:55 -0000 Torsten Schoenfeld wrote: > To recapitulate: this patch extends Gtk2::CodeGen to generate xsub > wrappers for constants that are specified in files called > "constants-x.y". The xsubs are named like the constants they wrap and > they are put directly into the Gtk2 namespace. For example: > Gtk2::GDK_PRIORITY_EVENTS or Gtk2::GTK_PRIORITY_RESIZE. They are also > exportable via the usual Exporter machinery. Committed, with documentation for Gtk2::CodeGen->generate_constants_wrappers. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 22 12:28:47 2008 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 D2D7E750154 for ; Sun, 22 Jun 2008 12:28:47 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.722 X-Spam-Level: X-Spam-Status: No, score=-1.722 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, L_P0F_UNKN=0.8, TW_GT=0.077] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:60:M1460,S,T,N,W8:.:?:?] (up: 381 hrs), (link: ethernet/modem), [213.165.64.20] 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 s9aSTBPgQroT for ; Sun, 22 Jun 2008 12:28:42 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 289D77501FF for ; Sun, 22 Jun 2008 12:28:40 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 12:28:38 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp065) with SMTP; 22 Jun 2008 14:28:39 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/Je44lAqnJdxuXGdyk7DmaB/ARJZG7DXOXTg7lwg kxbKEF+NRzdTR0 Message-ID: <485E4577.4040702@gmx.de> Date: Sun, 22 Jun 2008 14:28:39 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: gtk priority constants References: <87hchzg8n5.fsf@blah.blah> <1200512406.5904.21.camel@home.hcsiteeffak.de> <1200841779.5482.21.camel@home.hcsiteeffak.de> <87y7ak8196.fsf@blah.blah> <484191D0.4090504@gmx.de> <873anbwr9h.fsf@blah.blah> In-Reply-To: <873anbwr9h.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 12:28:48 -0000 Kevin Ryde wrote: > I've been using GDK_CURRENT_TIME too, which is 0 of course, but giving > it a name makes it clearer what's meant. Added to HEAD of CVS. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 22 13:01:50 2008 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 5FBE27500B9 for ; Sun, 22 Jun 2008 13:01:50 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.615 X-Spam-Level: X-Spam-Status: No, score=0.615 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:60:M1460,S,T,N,W8:.:?:?] (up: 314 hrs), (link: ethernet/modem), [213.165.64.20] 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 y91sqcCLAKWZ for ; Sun, 22 Jun 2008 13:01:45 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id CE7E37500E1 for ; Sun, 22 Jun 2008 13:01:44 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 13:01:42 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp068) with SMTP; 22 Jun 2008 15:01:42 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/CoRQXDWfCxbRTMBqv5tPbAO8hlLRmiqQgtHzkGX GVd6fxXt8WPSq3 Message-ID: <485E4D37.5010802@gmx.de> Date: Sun, 22 Jun 2008 15:01:43 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Atom constants X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 13:01:50 -0000 Aloha, here's a patch that deprecates Gtk2::Gdk::SELECTION_* and Gtk2::Gdk::TARGET_* in favor of newly added constants Gtk2::GDK_SELECTION_* and Gtk2::GDK_TARGET_*. Is this a good idea? -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 22 13:16:21 2008 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 92CB9750060 for ; Sun, 22 Jun 2008 13:16:21 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.598 X-Spam-Level: X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, UPPERCASE_50_75=0.001] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 787 hrs), (distance 25, link: ethernet/modem), [213.165.64.20] 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 pubMXUB2VVXC for ; Sun, 22 Jun 2008 13:16:16 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 1EED8750090 for ; Sun, 22 Jun 2008 13:16:15 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 13:16:14 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp054) with SMTP; 22 Jun 2008 15:16:14 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18NGsxOlS8NckJVtAuiVVAxaLoG31wcJYFPkPbgF4 MQVGTKbFdXEjQg Message-ID: <485E509F.6080507@gmx.de> Date: Sun, 22 Jun 2008 15:16:15 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Atom constants References: <485E4D37.5010802@gmx.de> In-Reply-To: <485E4D37.5010802@gmx.de> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------060601050803020107000003" X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 13:16:21 -0000 This is a multi-part message in MIME format. --------------060601050803020107000003 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Torsten Schoenfeld wrote: > here's a patch [...] Damn. -- Bye, -Torsten --------------060601050803020107000003 Content-Type: text/x-diff; name="atom-constants.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="atom-constants.patch" Index: Gtk2.pm =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/Gtk2.pm,v retrieving revision 1.124 diff -u -d -p -r1.124 Gtk2.pm --- Gtk2.pm 22 Jun 2008 12:26:38 -0000 1.124 +++ Gtk2.pm 22 Jun 2008 12:55:43 -0000 @@ -291,10 +291,28 @@ Gtk2 exports nothing by default, but som =item Tag: constants GTK_PRIORITY_RESIZE + GDK_PRIORITY_EVENTS GDK_PRIORITY_REDRAW GDK_CURRENT_TIME + GDK_SELECTION_PRIMARY + GDK_SELECTION_SECONDARY + GDK_SELECTION_CLIPBOARD + GDK_TARGET_BITMAP + GDK_TARGET_COLORMAP + GDK_TARGET_DRAWABLE + GDK_TARGET_PIXMAP + GDK_TARGET_STRING + GDK_SELECTION_TYPE_ATOM + GDK_SELECTION_TYPE_BITMAP + GDK_SELECTION_TYPE_COLORMAP + GDK_SELECTION_TYPE_DRAWABLE + GDK_SELECTION_TYPE_INTEGER + GDK_SELECTION_TYPE_PIXMAP + GDK_SELECTION_TYPE_WINDOW + GDK_SELECTION_TYPE_STRING + =back See L for other standard priority levels. Index: constants-2.0 =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/constants-2.0,v retrieving revision 1.2 diff -u -d -p -r1.2 constants-2.0 --- constants-2.0 22 Jun 2008 12:26:39 -0000 1.2 +++ constants-2.0 22 Jun 2008 12:55:43 -0000 @@ -2,4 +2,21 @@ GDK_CURRENT_TIME GDK_PRIORITY_EVENTS GDK_PRIORITY_REDRAW +GDK_SELECTION_PRIMARY newSVGdkAtom +GDK_SELECTION_SECONDARY newSVGdkAtom +GDK_SELECTION_CLIPBOARD newSVGdkAtom +GDK_TARGET_BITMAP newSVGdkAtom +GDK_TARGET_COLORMAP newSVGdkAtom +GDK_TARGET_DRAWABLE newSVGdkAtom +GDK_TARGET_PIXMAP newSVGdkAtom +GDK_TARGET_STRING newSVGdkAtom +GDK_SELECTION_TYPE_ATOM newSVGdkAtom +GDK_SELECTION_TYPE_BITMAP newSVGdkAtom +GDK_SELECTION_TYPE_COLORMAP newSVGdkAtom +GDK_SELECTION_TYPE_DRAWABLE newSVGdkAtom +GDK_SELECTION_TYPE_INTEGER newSVGdkAtom +GDK_SELECTION_TYPE_PIXMAP newSVGdkAtom +GDK_SELECTION_TYPE_WINDOW newSVGdkAtom +GDK_SELECTION_TYPE_STRING newSVGdkAtom + GTK_PRIORITY_RESIZE Index: t/GdkSelection.t =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GdkSelection.t,v retrieving revision 1.4 diff -u -d -p -r1.4 GdkSelection.t --- t/GdkSelection.t 30 Mar 2008 19:31:12 -0000 1.4 +++ t/GdkSelection.t 22 Jun 2008 12:55:43 -0000 @@ -1,26 +1,32 @@ #!/usr/bin/perl -w use strict; -use Gtk2::TestHelper tests => 20; +use Gtk2::TestHelper tests => 36; # $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GdkSelection.t,v 1.4 2008/03/30 19:31:12 kaffeetisch Exp $ -foreach (Gtk2::Gdk -> SELECTION_PRIMARY(), - Gtk2::Gdk -> SELECTION_SECONDARY(), - Gtk2::Gdk -> SELECTION_CLIPBOARD(), - Gtk2::Gdk -> TARGET_BITMAP(), - Gtk2::Gdk -> TARGET_COLORMAP(), - Gtk2::Gdk -> TARGET_DRAWABLE(), - Gtk2::Gdk -> TARGET_PIXMAP(), - Gtk2::Gdk -> TARGET_STRING(), - Gtk2::Gdk -> SELECTION_TYPE_ATOM(), - Gtk2::Gdk -> SELECTION_TYPE_BITMAP(), - Gtk2::Gdk -> SELECTION_TYPE_COLORMAP(), - Gtk2::Gdk -> SELECTION_TYPE_DRAWABLE(), - Gtk2::Gdk -> SELECTION_TYPE_INTEGER(), - Gtk2::Gdk -> SELECTION_TYPE_PIXMAP(), - Gtk2::Gdk -> SELECTION_TYPE_WINDOW(), - Gtk2::Gdk -> SELECTION_TYPE_STRING()) { - isa_ok($_, "Gtk2::Gdk::Atom"); +my @constants = qw/SELECTION_PRIMARY + SELECTION_SECONDARY + SELECTION_CLIPBOARD + TARGET_BITMAP + TARGET_COLORMAP + TARGET_DRAWABLE + TARGET_PIXMAP + TARGET_STRING + SELECTION_TYPE_ATOM + SELECTION_TYPE_BITMAP + SELECTION_TYPE_COLORMAP + SELECTION_TYPE_DRAWABLE + SELECTION_TYPE_INTEGER + SELECTION_TYPE_PIXMAP + SELECTION_TYPE_WINDOW + SELECTION_TYPE_STRING/; + +foreach my $stem (@constants) { + # deprecated + isa_ok(Gtk2::Gdk -> $stem, "Gtk2::Gdk::Atom"); + + # new and shiny + isa_ok(eval "Gtk2::GDK_$stem", "Gtk2::Gdk::Atom"); } my $primary = Gtk2::Gdk -> SELECTION_PRIMARY(); Index: xs/GdkSelection.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GdkSelection.xs,v retrieving revision 1.11 diff -u -d -p -r1.11 GdkSelection.xs --- xs/GdkSelection.xs 19 Sep 2004 21:47:11 -0000 1.11 +++ xs/GdkSelection.xs 22 Jun 2008 12:55:43 -0000 @@ -22,6 +22,23 @@ MODULE = Gtk2::Gdk::Selection PACKAGE = Gtk2::Gdk +# The function are sorted alphabetically for the generated POD, so add the +# deprecation paragraph to the first entry of both sets. + +=for apidoc Gtk2::Gdk::SELECTION_CLIPBOARD + +The functions C are B. Please use +C instead. See L. + +=cut + +=for apidoc Gtk2::Gdk::TARGET_BITMAP + +The functions C are B. Please use +C instead. See L. + +=cut + GdkAtom SELECTION_PRIMARY (class) ALIAS: --------------060601050803020107000003-- From kaffeetisch@gmx.de Sun Jun 22 15:51:06 2008 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 208D87500D5 for ; Sun, 22 Jun 2008 15:51:06 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.185 X-Spam-Level: X-Spam-Status: No, score=-0.185 tagged_above=-999 required=2 tests=[BAYES_40=-0.185] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 940 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 znFSK1Hxb055 for ; Sun, 22 Jun 2008 15:51:00 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id A813E750093 for ; Sun, 22 Jun 2008 15:50:59 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 15:50:57 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp031) with SMTP; 22 Jun 2008 17:50:57 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19/LaVt9AZ/wX7kdTfuu/stwVRsQP9nh80wrL3zFv YfZbACJwXL7eZ2 Message-ID: <485E74E3.7030406@gmx.de> Date: Sun, 22 Jun 2008 17:50:59 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: GParamSpec further funcs References: <87zlpm43i7.fsf@blah.blah> In-Reply-To: <87zlpm43i7.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 15:51:06 -0000 Kevin Ryde wrote: > I was having a nose around some of the Glib::ParamSpec bits and wondered > if g_param_value_set_default() could do the work for > $paramspec->get_default_value. Or is there some magic in the current > dispatch? I tried the couple of lines below which seem to work, though > bools may come out different from gperl_sv_from_value(). So what you're suggesting is that we implement a generic Glib::ParamSpec->get_default_value by using g_param_value_set_default. Good idea! Currently, every subclass of Glib::ParamSpec implements its own get_default_value. > +MODULE = Glib::ParamSpec PACKAGE = Glib::ParamSpec PREFIX = g_param_ > + > +SV * > +g_param_xxx_get_default_value (GParamSpec * pspec) > + [...] It won't work like this though, I think. The XSUB would need to be called simply g_param_spec_get_default_value and would need to reside in a MODULE section with "PREFIX = g_param_spec_". Then you'd have to remove all the get_default_value XSUBs from the various subclasses. Since the subclasses inherit from Glib::ParamSpec, calling get_default_value on them would now invoke your generic one. If the test suite still passes after these changes, we have a winner. > I also wondered if there'd be some value in g_param_value_validate > and/or g_param_values_cmp. I was tinkering with some comparing for my > "ConnectProperties". g_param_values_cmp looks like it respects the > "epsilon" in float and double, though it also looks pretty useless on > boxed types (just a pointer compare). Yeah, I think they would be useful. Could you provide a patch with some tests? Also, your patch mixes spaces and tabs for indention. Our convention is to use four spaces for indenting the XS codewords (PREINIT, CODE, etc.) and tabs for indenting code. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 22 16:13:28 2008 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 388A175009D for ; Sun, 22 Jun 2008 16:13:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.615 X-Spam-Level: X-Spam-Status: No, score=0.615 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:60:M1460,S,T,N,W8:.:?:?] (up: 49 hrs), (link: ethernet/modem), [213.165.64.20] 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 LOKkC97B+HUr for ; Sun, 22 Jun 2008 16:13:23 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 667957500C7 for ; Sun, 22 Jun 2008 16:13:22 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 16:13:18 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp015) with SMTP; 22 Jun 2008 18:13:18 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18kODwqFYck1AZO42YFJ/95YXxkVl8NQrZ+seGt25 jHjpz+bqe+/3bD Message-ID: <485E7A21.50508@gmx.de> Date: Sun, 22 Jun 2008 18:13:21 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gtk2 1.183 available References: <616312.74875.qm@web35208.mail.mud.yahoo.com> In-Reply-To: <616312.74875.qm@web35208.mail.mud.yahoo.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 16:13:28 -0000 Sergei Steshenko wrote: > t/GtkClipboard.....................# Looks like you planned 95 tests but ran 23 extra. > dubious > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 96-118 > Failed 23/95 tests, 75.79% okay That looks like it's due to get_func being run more than the expected three times. So I modified the test to not run it more than three times. Committed to both branches. Thanks for the report. -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 22 16:22:11 2008 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 BF489750060 for ; Sun, 22 Jun 2008 16:22:11 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.31 X-Spam-Level: X-Spam-Status: No, score=-0.31 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, L_P0F_UNKN=0.8] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:60:M1460,S,T,N,W8:.:?:?] (up: 49 hrs), (link: ethernet/modem), [213.165.64.20] 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 Co9UrCX8bOwT for ; Sun, 22 Jun 2008 16:22:06 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id EB61D7500B9 for ; Sun, 22 Jun 2008 16:22:05 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 16:22:03 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp025) with SMTP; 22 Jun 2008 18:22:03 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18AEiplRoYAVrteARf0VDmrze9iylpzQkk1gafzFM 8d4I/gKRglWy0A Message-ID: <485E7C2D.8090106@gmx.de> Date: Sun, 22 Jun 2008 18:22:05 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Glib::Flags overloaded mutators References: <87ej6rwxna.fsf@blah.blah> In-Reply-To: <87ej6rwxna.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 16:22:12 -0000 Kevin Ryde wrote: > It'd be good if Glib::Flags had overloaded += as well as + so you could > go > > $f += 'val'; > > I think the basic overload can be used without too much trouble, the new > object returned being assigned to the destination automatically by > "overload". Actually, I think this is supposed to work correctly right now. The "fallback => 1" argument to overload tells it to use "magic autogeneration" of operators that aren't overloaded. For example, "+=" is supposed to be automatically implemented with just "+". Consequently, the new test cases you sent pass for me without the code changes you also provided. Is there something else I missed? -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 22 17:12:11 2008 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 B943575015D for ; Sun, 22 Jun 2008 17:12:10 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.722 X-Spam-Level: X-Spam-Status: No, score=-1.722 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, L_P0F_UNKN=0.8, TW_GT=0.077] X-Amavis-OS-Fingerprint: UNKNOWN [S4:43:1:60:M1460,S,T,N,W8:.:?:?] (up: 386 hrs), (link: ethernet/modem), [213.165.64.20] 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 mlJhf8tAPVXo for ; Sun, 22 Jun 2008 17:12:05 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id AC21D7500BB for ; Sun, 22 Jun 2008 17:12:04 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 17:12:02 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp065) with SMTP; 22 Jun 2008 19:12:02 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/+jiUHqTL+lmAuwQBy0p62KCiCp89cxOr2DjWqGY XLtt4pGl7UIB0d Message-ID: <485E87E6.9000807@gmx.de> Date: Sun, 22 Jun 2008 19:12:06 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Glib 1.190 (unstable) available X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 17:12:11 -0000 Overview of changes in Glib 1.190 ================================= * Add Glib::Flags::new, a constructor for flags objects. * Add Glib::strerror and Glib::strsignal. The source code is available from the gtk2-perl project page on sourceforge: http://downloads.sourceforge.net/gtk2-perl/Glib-1.190.tar.gz ...and via anonymous cvs, tagged "rel-1-19-0" in the directory /gtk2-perl-xs/Glib. This release works with all stable releases of glib-2.x. In order to build Glib from source, you must have glib-2.x and its development headers and utilities installed, as well as the pkg-config utility. In addition, the following Perl modules are needed at build time (but not at runtime): ExtUtils::Depends >= 0.300 ExtUtils::PkgConfig >= 1.000 Glib provides Perl access to the GLib and GObject libraries. GLib is a portability and utility library; GObject provides a generic type system with inheritance and a powerful signal system. Together these libraries are used as the foundation for many of the libraries that make up the Gnome environment, and are used in many unrelated projects. From kaffeetisch@gmx.de Sun Jun 22 17:34:06 2008 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 C7EDC7500B9 for ; Sun, 22 Jun 2008 17:34:06 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 941 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 7mUkTljvh3fk for ; Sun, 22 Jun 2008 17:33:59 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 30A3B750192 for ; Sun, 22 Jun 2008 17:33:57 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 17:33:52 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp012) with SMTP; 22 Jun 2008 19:33:52 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19p1oVT39hpGvbweCltFvDSkevq3ekx0WYNOluQv8 RVF6wwqIYYN+4n Message-ID: <485E8D04.2010602@gmx.de> Date: Sun, 22 Jun 2008 19:33:56 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Gtk2 1.190 (unstable) available X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 17:34:07 -0000 Overview of changes in Gtk2 1.190 ================================= * Add exportable constants: GTK_PRIORITY_RESIZE, GDK_PRIORITY_EVENTS, GDK_PRIORITY_REDRAW, and GDK_CURRENT_TIME. * Automatically handle releasing of GCs returned by Gtk2::GC->get. * Provide Gtk2::Gdk::Event::GrabBroken::implicit and grab_window accessors. * Fix the marshalling of modify callbacks in Gtk2::TreeModelFilter. Technically, this is an API change since an input argument turned into a return value. The previous version was not usable, however, so nothing should be affected by this. If this change does break your code, please let us know. * Improve the documentation in a few places. * Fix some test failures. This is an unstable development release of Gtk2, containing new features and other cool stuff that have been added since the 1.18x stable series. Report any bugs to gtk-perl-list AT gnome DOT org as soon as possible. Please use the stable 1.16x series for important work. The source code is available from the gtk2-perl project page on sourceforge: http://downloads.sourceforge.net/gtk2-perl/Gtk2-1.190.tar.gz ...and from anonymous cvs, tagged "rel-1-19-0" in the directory /gtk2-perl-xs/Gtk2. This module requires these other modules and libraries: perl >= 5.8.0 Glib >= 1.190 (perl module) GTK+ > 2.x (C library and prerequisites) If GTK+ is as new or newer as 2.8, the Cairo module is also required: Cairo >= 1.00 (Perl module) In order to build it from source, you'll also need ExtUtils::Depends >= 0.300 ExtUtils::PkgConfig >= 1.030 development headers for gtk+ and friends Gtk2 is a Perl extension providing Perl bindings to the 2.x series of the Gtk+ graphical user interface library. This module allows you to write graphical user interfaces in a perlish and object-oriented way, freeing you from the casting and memory management in C, yet remaining very close in spirit to original API. Find out more about Gtk+ at , and about Gtk2-Perl at . From kaffeetisch@gmx.de Sun Jun 22 21:26:04 2008 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 7A91C7501A5 for ; Sun, 22 Jun 2008 21:26:04 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.033 X-Spam-Level: X-Spam-Status: No, score=-1.033 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 946 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 lVLc4eZN0iz5 for ; Sun, 22 Jun 2008 21:25:58 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 778E47500B9 for ; Sun, 22 Jun 2008 21:25:57 +0000 (GMT) Received: (qmail invoked by alias); 22 Jun 2008 21:25:55 -0000 Received: from port-212-202-35-189.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.189] by mail.gmx.net (mp032) with SMTP; 22 Jun 2008 23:25:55 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/YpDsX3gDYULt97nwjmCobA3vqgTwjTsK84nsnWV y6fqie8mUgExop Message-ID: <485EC368.2030705@gmx.de> Date: Sun, 22 Jun 2008 23:26:00 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Gtk2 1.190 (unstable) available References: <485E8D04.2010602@gmx.de> In-Reply-To: <485E8D04.2010602@gmx.de> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 21:26:04 -0000 Torsten Schoenfeld wrote: > This is an unstable development release of Gtk2, containing new > features and other cool stuff that have been added since the 1.18x > stable series. Report any bugs to gtk-perl-list AT gnome DOT org as > soon as possible. Please use the stable 1.16x series for important > work. As spicy jack noticed, this paragraph should of course refer to 1.18x as the stable series, not 1.16x. Thanks, Brian! -- Bye, -Torsten From gg@zip.com.au Sun Jun 22 22:32:00 2008 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 C88E27501A0 for ; Sun, 22 Jun 2008 22:32:00 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1978 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 Qm1-z9dwstMV for ; Sun, 22 Jun 2008 22:31:53 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id E63E07500B9 for ; Sun, 22 Jun 2008 22:31:52 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id E7269C0258 for ; Mon, 23 Jun 2008 08:31:49 +1000 (EST) Received: from blah.blah (ppp220C.dyn.pacific.net.au [61.8.34.12]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 6A91A8C04 for ; Mon, 23 Jun 2008 08:31:49 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KAY66-0001aF-Lv for gtk-perl-list@gnome.org; Mon, 23 Jun 2008 08:31:46 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: Glib::Flags overloaded mutators References: <87ej6rwxna.fsf@blah.blah> <485E7C2D.8090106@gmx.de> Mail-Copies-To: never Date: Mon, 23 Jun 2008 08:31:46 +1000 In-Reply-To: <485E7C2D.8090106@gmx.de> (Torsten Schoenfeld's message of "Sun, 22 Jun 2008 18:22:05 +0200") Message-ID: <87fxr5je3x.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2008 22:32:01 -0000 --=-=-= Torsten Schoenfeld writes: > > Is there something else I missed? I got a warning from the program below Use of uninitialized value in null operation at foo.pl line 13. Maybe it only needs to watch for undef in the swap arg. --=-=-= Content-Type: text/x-perl Content-Disposition: inline; filename=foo.pl use strict; use warnings; use Data::Dumper; use Gtk2 '-init'; my $w = Gtk2::Window->new ('toplevel'); my $f = $w->flags; print Dumper($f); print "\n"; print $f,"\n"; $f += 'can-focus'; print $f,"\n"; exit 0; --=-=-=-- From gg@zip.com.au Mon Jun 23 00:46:43 2008 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 B7FA77500E1 for ; Mon, 23 Jun 2008 00:46:43 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1980 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 T4mwphogGnne for ; Mon, 23 Jun 2008 00:46:36 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id A489A7500DE for ; Mon, 23 Jun 2008 00:46:36 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 6741EBAF24 for ; Mon, 23 Jun 2008 10:46:33 +1000 (EST) Received: from blah.blah (ppp220C.dyn.pacific.net.au [61.8.34.12]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id DEECF8C18 for ; Mon, 23 Jun 2008 10:46:32 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KAaCS-0002fX-A1 for gtk-perl-list@gnome.org; Mon, 23 Jun 2008 10:46:28 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: Atom constants References: <485E4D37.5010802@gmx.de> Mail-Copies-To: never Date: Mon, 23 Jun 2008 10:46:26 +1000 In-Reply-To: <485E4D37.5010802@gmx.de> (Torsten Schoenfeld's message of "Sun, 22 Jun 2008 15:01:43 +0200") Message-ID: <877ichj7vh.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 00:46:44 -0000 Torsten Schoenfeld writes: > > Is this a good idea? If it was mine I'd leave it as is. The class func style is fairly reasonable, it doesn't seem so terrible as to ask everyone to change their code. (Gotta save that for when something big turns out to be unworkable! :-) Or as a justification it may even save a couple of bytes not to create atom objects for constsubs which will be rarely used. From gg@zip.com.au Mon Jun 23 01:12:01 2008 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 8CEF6750022 for ; Mon, 23 Jun 2008 01:12:01 +0000 (GMT) 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_05=-1.11] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1955 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 TJtgmMxXKIzw for ; Mon, 23 Jun 2008 01:11:55 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 235157500DE for ; Mon, 23 Jun 2008 01:11:54 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id A78A3393D51 for ; Mon, 23 Jun 2008 11:11:51 +1000 (EST) Received: from blah.blah (ppp220C.dyn.pacific.net.au [61.8.34.12]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 01C7C8C05 for ; Mon, 23 Jun 2008 11:11:51 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KAab0-0002ze-3o for gtk-perl-list@gnome.org; Mon, 23 Jun 2008 11:11:50 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: widget set_scroll_adjustments docs Mail-Copies-To: never Date: Mon, 23 Jun 2008 11:11:49 +1000 Message-ID: <87zlpdhs4q.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 01:12:01 -0000 --=-=-= I saw the cute setups of the set-scroll-adjustments signal, but are they being kept secret? Perhaps a couple of words for the emitting funcs (or cross references if already described elsewhere that I didn't see). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=GtkWidget.xs.set-scroll.diff --- GtkWidget.xs 23 Jun 2008 09:14:24 +1000 1.73 +++ GtkWidget.xs 23 Jun 2008 11:09:18 +1000 @@ -638,10 +638,30 @@ #gint gtk_widget_send_expose (GtkWidget *widget, # GdkEvent *event); +=for apidoc +This function works by emitting an action signal nominated by the various +widget subclasses. The signal is normally called C, but it +doesn't have to be. + +Currently if you make a widget subclass in Perl there's no way to +nominate a signal to be emitted by C<< $widget->activate >>. A signal +merely named C is not automatically hooked up. +=cut gboolean gtk_widget_activate (widget) GtkWidget * widget +=for apidoc +This function works by emitting a setter signal nominated by the +various widget types which have "native" scrolling. The signal is +normally called C, but it doesn't have to be. + +If you make a widget subclass in Perl and create a signal in it called +C taking two Gtk2::Adjustment parameters then +the subclassing automatically hooks that up to be emitted by +C<< $widget->set_scroll_adjustments >>. (Your "class closure" default +handler code should then store the adjustment objects somewhere.) +=cut gboolean gtk_widget_set_scroll_adjustments (widget, hadjustment, vadjustment) GtkWidget * widget --=-=-=-- From gnome-gtk-perl-list@m.gmane.org Mon Jun 23 03:20:34 2008 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 AB2FA7500E1 for ; Mon, 23 Jun 2008 03:20:34 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-0.999 tagged_above=-999 required=2 tests=[BAYES_50=0.001, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 9508 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 iyPrqwvDiues for ; Mon, 23 Jun 2008 03:20:05 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 7B3707500D7 for ; Mon, 23 Jun 2008 03:20:05 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KAcb1-00078m-F2 for gtk-perl-list@gnome.org; Mon, 23 Jun 2008 03:19:59 +0000 Received: from adsl-69-234-176-114.dsl.irvnca.pacbell.net ([69.234.176.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Jun 2008 03:19:59 +0000 Received: from w41ter by adsl-69-234-176-114.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Jun 2008 03:19:59 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Gnome2::Canvas --> do I really need to worry about pixels_per_unit? Date: Sun, 22 Jun 2008 20:20:33 -0700 Lines: 31 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-176-114.dsl.irvnca.pacbell.net User-Agent: Thunderbird/3.0a2pre (X11; 2008062212) Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 03:20:34 -0000 Yes, pretty vague question, but here is my problem: I want to display a graph of lots of data points, too many to display all at once, so I've used a ScrollWindow to allow me to scroll horizontally through the graph from beginning to end. The values of the data points vary widely, so the graph swings wildly beyond the top and bottom of the window as I scroll. To fix that I've been using $canvas->set_scroll_region to adjust the y axis with every horizontal scroll, and that *almost* works well enough, but not quite. The problem is that the vertical scroll region will just ignore any height value below some arbitrary limit. If the vertical range gets larger than some arbitrary limit, then I need to use the vertical scrollbar to be able to see the entire graph from top to bottom. The arbitrary max and min values for the scroll region seem to depend on the $canvas->units_per_pixel setting. By changing the units_per_pixel I can make the scaling work correctly -- but I can't believe I need to go to that trouble to do something so simple as adjust the height of a graph. Are the tools really that limited -- or am I using the wrong tools for the job? Thanks! From zentara1@sbcglobal.net Mon Jun 23 13:07:57 2008 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 1B56F7502C2 for ; Mon, 23 Jun 2008 13:07:57 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.734 X-Spam-Level: X-Spam-Status: No, score=-0.734 tagged_above=-999 required=2 tests=[AWL=0.265, BAYES_50=0.001, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9877 hrs), (distance 15, link: ethernet/modem), [66.196.96.92] 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 8fU4gaUw6V3q for ; Mon, 23 Jun 2008 13:07:49 +0000 (GMT) Received: from smtp119.sbc.mail.re3.yahoo.com (smtp119.sbc.mail.re3.yahoo.com [66.196.96.92]) by menubar.gnome.org (Postfix) with SMTP id 1DCDD750303 for ; Mon, 23 Jun 2008 13:06:33 +0000 (GMT) Received: (qmail 87756 invoked from network); 23 Jun 2008 13:06:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=DD0xmgfXyme1bpX0o8ImJwNM0Ji5py1d/WZNbPxXxuXIkRc75URM0fNWmg8pqsUWreD4rBG5ZH63sDrLb0SpBP6shahK8ZF4XUp8ab/Hu5aN4KhjxelZLnuyCiHiEbVza0K5z/Bgpfnsu2cxiPyhIjO5SJL6EZ9KUHMLpO75BE8= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.164.150 with login) by smtp119.sbc.mail.re3.yahoo.com with SMTP; 23 Jun 2008 13:06:31 -0000 X-YMail-OSG: l0DuytoVM1kAxK0Y24bUGD1Sxe293GvR65ABvNyyj4FN4CPxpDIc0__uLuCreZYCLBPIWkfMKsr8jxF_p6.eHaZ3tRnNAveEv9_67BYccMDm0cnxW4wwNQuubYvgTg0- X-Yahoo-Newman-Property: ymail-3 Date: Mon, 23 Jun 2008 09:01:09 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Gnome2::Canvas --> do I really need to worry about pixels_per_unit? Message-ID: <20080623090109.78f2c61e@zentara.zentara.net> In-Reply-To: References: X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 13:07:57 -0000 On Sun, 22 Jun 2008 20:20:33 -0700 walt wrote: >The values of the data points vary widely, so the graph swings >wildly beyond the top and bottom of the window as I scroll. > >To fix that I've been using $canvas->set_scroll_region to adjust >the y axis with every horizontal scroll, and that *almost* works >well enough, but not quite. > >The problem is that the vertical scroll region will just ignore >any height value below some arbitrary limit. > >If the vertical range gets larger than some arbitrary limit, then >I need to use the vertical scrollbar to be able to see the entire >graph from top to bottom. > >The arbitrary max and min values for the scroll region seem to >depend on the $canvas->units_per_pixel setting. By changing the >units_per_pixel I can make the scaling work correctly -- but I >can't believe I need to go to that trouble to do something so >simple as adjust the height of a graph. > >Are the tools really that limited -- or am I using the wrong >tools for the job? Could you post a small example where the data point can't be scrolled to, and the "arbitrary limit" is hit? It sounds to me like you have a predefined size set somewhere, like a set_default_size in your mainwindow, or something. I just posted a similar question recently, where my coordinates seemed way off, and I couldn't explain it..... I figured it out as follows ################################ Doh!!! Sorry I see the mistake. If the scrollregion is smaller than the default canvas size, weird coordinate transforms occur. Maybe a bug? $scroller->add( $canvas ); $window->add( $scroller ); $window->set_default_size( 500, 500 ); #if scrollregion is smaller than default size, odd # coordinate problems occur #$canvas->set_scroll_region( 0, 0, 400, 400 ); #bad $canvas->set_scroll_region( 0, 0, 700, 700 ); #good and works fine It would be a good "trick" question to throw at someone. :-) ######################################## See if that is it, otherwise post a minimal example. zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From gnome-gtk-perl-list@m.gmane.org Mon Jun 23 18:18:31 2008 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 3280575012E for ; Mon, 23 Jun 2008 18:18:31 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.599 X-Spam-Level: X-Spam-Status: No, score=-3.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 9658 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 sqTDTS5EGPOW for ; Mon, 23 Jun 2008 18:18:25 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id A119D750084 for ; Mon, 23 Jun 2008 18:18:22 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KAqcO-0007zM-82 for gtk-perl-list@gnome.org; Mon, 23 Jun 2008 18:18:20 +0000 Received: from adsl-69-234-192-13.dsl.irvnca.pacbell.net ([69.234.192.13]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Jun 2008 18:18:20 +0000 Received: from w41ter by adsl-69-234-192-13.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 23 Jun 2008 18:18:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: Gnome2::Canvas --> do I really need to worry about pixels_per_unit? Date: Mon, 23 Jun 2008 11:18:57 -0700 Lines: 74 Message-ID: References: <20080623090109.78f2c61e@zentara.zentara.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-192-13.dsl.irvnca.pacbell.net User-Agent: Thunderbird/3.0a2pre (X11; 2008062306) In-Reply-To: <20080623090109.78f2c61e@zentara.zentara.net> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 18:18:31 -0000 zentara wrote: > On Sun, 22 Jun 2008 20:20:33 -0700 > walt wrote: > >> ... >> The problem is that the vertical scroll region will just ignore >> any height value below some arbitrary limit. >> ... > Could you post a small example where the data point can't > be scrolled to, and the "arbitrary limit" is hit? > > It sounds to me like you have a predefined size set somewhere, > like a set_default_size in your mainwindow, or something. > > I just posted a similar question recently, where my coordinates > seemed way off, and I couldn't explain it..... I figured it out as follows > > ################################ > Doh!!! Sorry I see the mistake. If the scrollregion is smaller than the default > canvas size, weird coordinate transforms occur. Maybe a bug? > > $scroller->add( $canvas ); > $window->add( $scroller ); > $window->set_default_size( 500, 500 ); > > #if scrollregion is smaller than default size, odd > # coordinate problems occur > #$canvas->set_scroll_region( 0, 0, 400, 400 ); #bad > > $canvas->set_scroll_region( 0, 0, 700, 700 ); #good and works fine > > It would be a good "trick" question to throw at someone. :-) > ######################################## > > > See if that is it, otherwise post a minimal example. My example is very similar to yours, but the numbers are smaller to show the problem in an exaggerated way: my $line = Gnome2::Canvas::Item->new ( $root, 'Gnome2::Canvas::Line', points=> [0,0,50,50], width_pixels=> 1, fill_color => 'black', line_style => 'solid' ); $window->set_default_size (500, 500); $canvas->set_scroll_region(0,0,50,50); my @region = $canvas->get_scroll_region; print "@region\n"; This draws a diagonal line across the screen, of course. My question is how much of the 500x500 window should be filled with the line? My answer is that the line should be visible across the entire window because the scrolling region is set to the same size as the line (0,0,50,50). The absolute number of pixels in the window should have nothing to do with how the line appears on the screen as long as the scaling is correctly done, right? At least that's how it worked in Visual Basic, which is the only other way I've done this stuff. To make it work according to my model, I would need to change both the pixels_per_unit and the scrolling region every time I scroll to a new part of the graph. And that would also change the horizontal spacing between data points, which I definitely don't want. Maybe setting the scroll region isn't really the right way to do my scaling? From gg@zip.com.au Mon Jun 23 22:47:19 2008 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 0542C750073 for ; Mon, 23 Jun 2008 22:47:19 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 1.535 X-Spam-Level: * X-Spam-Status: No, score=1.535 tagged_above=-999 required=2 tests=[BAYES_40=-0.185, RCVD_IN_NJABL_PROXY=1.643, TW_EG=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2002 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 F4jGwGE0d7-1 for ; Mon, 23 Jun 2008 22:47:13 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 4DB84750097 for ; Mon, 23 Jun 2008 22:47:12 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 51095C58C3 for ; Tue, 24 Jun 2008 08:47:10 +1000 (EST) Received: from blah.blah (ppp27EA.dyn.pacific.net.au [61.8.39.234]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 8E9152741B for ; Tue, 24 Jun 2008 08:47:09 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KAuoV-0000ci-BW for gtk-perl-list@gnome.org; Tue, 24 Jun 2008 08:47:07 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: fetching unset GParamSpec property Mail-Copies-To: never Date: Tue, 24 Jun 2008 08:47:07 +1000 Message-ID: <877icfkbv8.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 22:47:19 -0000 --=-=-= The program below gets some errors followed by a segv GLib-GObject-CRITICAL **: g_param_spec_ref: assertion `G_IS_PARAM_SPEC (pspec)' failed at /home/gg/bug/default-value/param-null.pl line 19. GLib-GObject-CRITICAL **: g_param_spec_sink: assertion `G_IS_PARAM_SPEC (pspec)' failed at /home/gg/bug/default-value/param-null.pl line 19. GLib-GObject-CRITICAL **: g_param_spec_get_name: assertion `G_IS_PARAM_SPEC (pspec)' failed at /home/gg/bug/default-value/param-null.pl line 19. I guess newSVGParamSpec() expect NULL. Is it meant to? Or is it up to _gperl_sv_from_value_internal(), per below? Maybe nobody ever used a paramspec property before. :-) I can't think what it'd be for. An object factory object thing maybe. -- "The only problem with Italian food is that 4 or 5 days later you start feeling a bit peckish again." --=-=-= Content-Type: text/x-perl Content-Disposition: inline; filename=param-null.pl package MyThing; use strict; use warnings; use Glib; use Glib::Object::Subclass Glib::Object::, properties => [ Glib::ParamSpec->param_spec ('myprop', 'myprop', 'Blurb.', 'Glib::Param::Boolean', Glib::G_PARAM_READWRITE) ]; package main; use strict; use warnings; use Data::Dumper; my $obj = MyThing->new; my $x = $obj->get ('myprop'); print Dumper($x); exit 0; --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=GValue.xs.param-null.diff --- GValue.xs 10 Jan 2008 09:50:05 +1100 1.22 +++ GValue.xs 23 Jun 2008 17:49:34 +1000 @@ -244,7 +244,16 @@ FALSE); case G_TYPE_PARAM: - return newSVGParamSpec (g_value_get_param (value)); + /* can have NULL here fetching object properties of + type G_TYPE_PARAM with no value set yet, or from + ->get_default_value of such a property */ + { + GParamSpec *ps = g_value_get_param (value); + if (ps == NULL) + return &PL_sv_undef; + else + return newSVGParamSpec (ps); + } case G_TYPE_OBJECT: return gperl_new_object (g_value_get_object (value), FALSE); --=-=-=-- From gg@zip.com.au Mon Jun 23 23:02:33 2008 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 96688750022 for ; Mon, 23 Jun 2008 23:02:33 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2002 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 PUm+WNMqHRKr for ; Mon, 23 Jun 2008 23:02:26 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 39218750084 for ; Mon, 23 Jun 2008 23:02:25 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 4F90FBE75C for ; Tue, 24 Jun 2008 09:02:23 +1000 (EST) Received: from blah.blah (ppp2E82.dyn.pacific.net.au [61.8.46.130]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 2AD378C20 for ; Tue, 24 Jun 2008 09:02:21 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KAutu-0000cy-F0 for gtk-perl-list@gnome.org; Tue, 24 Jun 2008 08:52:42 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: GParamSpec further funcs References: <87zlpm43i7.fsf@blah.blah> <485E74E3.7030406@gmx.de> Mail-Copies-To: never Date: Tue, 24 Jun 2008 08:52:42 +1000 Message-ID: <87zlpbix1h.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jun 2008 23:02:33 -0000 --=-=-= Torsten Schoenfeld writes: > > So what you're suggesting is that we implement a generic > Glib::ParamSpec->get_default_value by using g_param_value_set_default. Yep. > It won't work like this though, I think. The XSUB would need to be > called simply g_param_spec_get_default_value and would need to reside in > a MODULE section with "PREFIX = g_param_spec_". Ah yes. I was playing with the other couple that are only g_param_foo instead of g_param_spec_foo. > Then you'd have to > remove all the get_default_value XSUBs from the various subclasses. Though I see the gunichar one stays, to continue to return a string. > If the test suite still passes after these changes, we have a winner. Plus a couple more tests for object, boxed, etc which now get the generic method. The "param" one tickles the NULL problem too, per other message. > Also, your patch mixes spaces and tabs for indention. Ah, that'll be a combination of cut and paste and me having `indent-tabs' off normally. I've yet to find an emacs setup that works decently for xs. I tend to use cc-mode with some settings, and then get annoyed when it indents wrong, and then switch to text-mode or pod-mode for the doc bits :-( * GParamSpec.xs (get_default_value): Use g_param_value_set_default instead of explicit code, except keep Glib::Param::Unichar. * t/e.t: Exercise get_default_value on Object, Boxed, Param, Scalar, IV and UV, as they now get that func. Note Glib::Param::Boolean::get_default_value previously returned the empty string '' for false, but now ends up 0 from the generic gperl_sv_from_value. This may be a good thing since 0 is what $obj->get() itself returns for a false bool property. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=GParamSpec.xs.default_value.diff --- GParamSpec.xs 18 Oct 2005 05:26:09 +1000 1.23 +++ GParamSpec.xs 23 Jun 2008 19:12:06 +1000 @@ -288,6 +288,26 @@ const gchar* g_param_spec_get_blurb (GParamSpec * pspec) +=for apidoc +This is the C level C method of GParamSpecClass. +If C<$pspec> doesn't have a C field the return is +C (for example object or scalar). + +See also L which has its own version of this method. +=cut +SV * +g_param_spec_get_default_value (GParamSpec * pspec) + PREINIT: + GValue v = { 0, }; + GType type; + CODE: + type = G_PARAM_SPEC_VALUE_TYPE (pspec); + g_value_init (&v, type); + g_param_value_set_default (pspec, &v); + RETVAL = gperl_sv_from_value (&v); + g_value_unset (&v); + OUTPUT: + RETVAL ## stuff from gparamspecs.h @@ -686,27 +706,6 @@ RETVAL -=for apidoc Glib::Param::Char::get_default_value __hide__ -=cut - -=for apidoc Glib::Param::Long::get_default_value __hide__ -=cut - -IV -get_default_value (GParamSpec * pspec) - ALIAS: - Glib::Param::Int::get_default_value = 1 - Glib::Param::Long::get_default_value = 2 - CODE: - switch (ix) { - case 0: RETVAL = G_PARAM_SPEC_CHAR (pspec)->default_value; break; - case 1: RETVAL = G_PARAM_SPEC_INT (pspec)->default_value; break; - case 2: RETVAL = G_PARAM_SPEC_LONG (pspec)->default_value; break; - default: g_assert_not_reached (); RETVAL = 0; - } - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::UChar ## similarly, all unsigned integer types @@ -772,27 +771,6 @@ RETVAL -=for apidoc Glib::Param::UChar::get_default_value __hide__ -=cut - -=for apidoc Glib::Param::ULong::get_default_value __hide__ -=cut - -UV -get_default_value (GParamSpec * pspec) - ALIAS: - Glib::Param::UInt::get_default_value = 1 - Glib::Param::ULong::get_default_value = 2 - CODE: - switch (ix) { - case 0: RETVAL = G_PARAM_SPEC_UCHAR (pspec)->default_value; break; - case 1: RETVAL = G_PARAM_SPEC_UINT (pspec)->default_value; break; - case 2: RETVAL = G_PARAM_SPEC_ULONG (pspec)->default_value; break; - default: g_assert_not_reached (); RETVAL = 0; - } - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Int64 =for object Glib::Param::Int64 @@ -820,13 +798,6 @@ OUTPUT: RETVAL -gint64 -get_default_value (GParamSpec * pspec) - CODE: - RETVAL = G_PARAM_SPEC_INT64 (pspec)->default_value; - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::UInt64 =for object Glib::Param::UInt64 @@ -854,13 +825,6 @@ OUTPUT: RETVAL -guint64 -get_default_value (GParamSpec * pspec) - CODE: - RETVAL = G_PARAM_SPEC_UINT64 (pspec)->default_value; - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Float ## and again for the floating-point types @@ -915,23 +879,6 @@ RETVAL -=for apidoc Glib::Param::Float::get_default_value __hide__ -=cut - -double -get_default_value (GParamSpec * pspec) - ALIAS: - Glib::Param::Double::get_default_value = 1 - CODE: - switch (ix) { - case 0: RETVAL = G_PARAM_SPEC_FLOAT (pspec)->default_value; break; - case 1: RETVAL = G_PARAM_SPEC_DOUBLE (pspec)->default_value; break; - default: g_assert_not_reached (); RETVAL = 0.0; - } - OUTPUT: - RETVAL - - =for apidoc Glib::Param::Float::get_epsilon __hide__ =cut @@ -953,13 +900,6 @@ =for see_also Glib::ParamSpec =cut -gboolean -get_default_value (GParamSpec * pspec_boolean) - CODE: - RETVAL = G_PARAM_SPEC_BOOLEAN (pspec_boolean)->default_value; - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Enum =for see_also Glib::ParamSpec @@ -974,17 +914,6 @@ OUTPUT: RETVAL -SV * -get_default_value (GParamSpec * pspec_enum) - PREINIT: - GParamSpecEnum * penum; - CODE: - penum = G_PARAM_SPEC_ENUM (pspec_enum); - RETVAL = gperl_convert_back_enum (G_ENUM_CLASS_TYPE (penum->enum_class), - penum->default_value); - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::Flags =for see_also Glib::ParamSpec @@ -999,30 +928,11 @@ OUTPUT: RETVAL -SV * -get_default_value (GParamSpec * pspec_flags) - PREINIT: - GParamSpecFlags * pflags; - CODE: - pflags = G_PARAM_SPEC_FLAGS (pspec_flags); - RETVAL = gperl_convert_back_flags - (G_FLAGS_CLASS_TYPE (pflags->flags_class), - pflags->default_value); - OUTPUT: - RETVAL - MODULE = Glib::ParamSpec PACKAGE = Glib::Param::String =for see_also Glib::ParamSpec =cut -gchar * -get_default_value (GParamSpec * pspec_string) - CODE: - RETVAL = G_PARAM_SPEC_STRING (pspec_string)->default_value; - OUTPUT: - RETVAL - ## the others are fairly uninteresting. ## string cset_first ## string cset_nth @@ -1035,6 +945,14 @@ =for see_also Glib::ParamSpec =cut +# this overrides the base get_default_value() in Glib::ParamSpec above +# because a GParamSpecUnichar is only type G_TYPE_UINT and so comes +# back from gperl_sv_from_value() as an integer, where we prefer a +# string (a single-char Perl wide-char string) +# +=for apidoc +Return the default value as a single-character string. +=cut gunichar get_default_value (GParamSpec * pspec_unichar) CODE: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=e.t.get_default.diff --- e.t 02 Jun 2008 09:56:28 +1000 1.2 +++ e.t 23 Jun 2008 16:50:32 +1000 @@ -3,7 +3,7 @@ # use strict; use Glib ':constants'; -use Test::More tests => 231; +use Test::More tests => 237; # first register some types with which to play below. @@ -132,6 +132,7 @@ # we only know one boxed type at this point. 'Glib::Scalar', G_PARAM_READWRITE); pspec_common_ok ($pspec, 'Boxed', G_PARAM_READWRITE, 'Glib::Scalar'); +is ($pspec->get_default_value, undef, 'Boxed default'); push @params, $pspec; @@ -139,6 +140,7 @@ 'I object, Your Honor, that\'s pure conjecture!', 'Skeezle', G_PARAM_READWRITE); pspec_common_ok ($pspec, 'Object', G_PARAM_READWRITE, 'Skeezle'); +is ($pspec->get_default_value, undef, 'Object default'); push @params, $pspec; @@ -154,6 +156,7 @@ ok ($pspec->get_flags == G_PARAM_READWRITE, 'Param flags'); is ($pspec->get_value_type, 'Glib::Param::Enum', 'Param value type'); ok (! $pspec->get_owner_type, 'Param owner type'); +is ($pspec->get_default_value, undef, 'Param default'); push @params, $pspec; @@ -171,6 +174,7 @@ $pspec = Glib::ParamSpec->IV ('iv', 'IV', 'This is the same as Int', -20, 10, -5, G_PARAM_READWRITE); +is ($pspec->get_default_value, -5, 'IV default'); isa_ok ($pspec, 'Glib::Param::Long', 'IV is actually Long'); push @params, $pspec; @@ -179,6 +183,7 @@ 'This is the same as UInt', 10, 20, 15, G_PARAM_READWRITE); isa_ok ($pspec, 'Glib::Param::ULong', 'UV is actually ULong'); +is ($pspec->get_default_value, 15, 'UV default'); push @params, $pspec; @@ -187,6 +192,7 @@ G_PARAM_READWRITE); isa_ok ($pspec, 'Glib::Param::Boxed', 'Scalar is actually Boxed'); is ($pspec->get_value_type, 'Glib::Scalar', 'boxed holding scalar'); +is ($pspec->get_default_value, undef, 'Scalar default'); push @params, $pspec; --=-=-= -- The sigfile one-line movie reviews series: "Razorback" -- easily the best homicidal wild pig movie ever made. --=-=-=-- From zentara1@sbcglobal.net Tue Jun 24 12:55:07 2008 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 1B149750203 for ; Tue, 24 Jun 2008 12:55:07 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.291 X-Spam-Level: X-Spam-Status: No, score=-1.291 tagged_above=-999 required=2 tests=[AWL=0.819, BAYES_05=-1.11, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) (up: 9900 hrs), (distance 15, link: ethernet/modem), [66.196.96.93] 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 1VRBXAWQxWcA for ; Tue, 24 Jun 2008 12:54:57 +0000 (GMT) Received: from smtp120.sbc.mail.re3.yahoo.com (smtp120.sbc.mail.re3.yahoo.com [66.196.96.93]) by menubar.gnome.org (Postfix) with SMTP id 55A84750239 for ; Tue, 24 Jun 2008 12:54:09 +0000 (GMT) Received: (qmail 88426 invoked from network); 24 Jun 2008 12:54:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=YIjB3TapjfK7r3zrM6Lq5YQ18RW2nXww5a+BGK0797N3agWIBPp6u97VWKdPPU2ajpj07j9icTwbR2d9eC1bHIswTRMowyvGyh2E+G2kU199iT6FdTVBmfDIyBECotIhQko8gubrUP8Rz015o1TEA/XTq7Cugjn2Q2EQtLBPR5E= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.93.204 with login) by smtp120.sbc.mail.re3.yahoo.com with SMTP; 24 Jun 2008 12:54:08 -0000 X-YMail-OSG: t0CMbf4VM1mS6kog0Lkt0kJ3W.07FZMapAwl40tHHGNj4TlF8vsjWlU0pj1GGzrTURg5xoLK6xumcsGCugOqYaQC0sqCz5Qggl42O6sI7.cfGjFIaw6soUR4R9uvAdQ- X-Yahoo-Newman-Property: ymail-3 Date: Tue, 24 Jun 2008 08:48:43 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Gnome2::Canvas --> do I really need to worry about pixels_per_unit? Message-ID: <20080624084843.321d5ebf@zentara.zentara.net> In-Reply-To: References: <20080623090109.78f2c61e@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 12:55:07 -0000 On Mon, 23 Jun 2008 11:18:57 -0700 walt wrote: >zentara wrote: >> On Sun, 22 Jun 2008 20:20:33 -0700 >> walt wrote: >> >>> ... >>> The problem is that the vertical scroll region will just ignore >>> any height value below some arbitrary limit. >>> ... > >> Could you post a small example where the data point can't >> be scrolled to, and the "arbitrary limit" is hit? >> >> It sounds to me like you have a predefined size set somewhere, >> like a set_default_size in your mainwindow, or something. >> >> I just posted a similar question recently, where my coordinates >> seemed way off, and I couldn't explain it..... I figured it out as follows >> >> ################################ >> Doh!!! Sorry I see the mistake. If the scrollregion is smaller than the default >> canvas size, weird coordinate transforms occur. Maybe a bug? >> >> $scroller->add( $canvas ); >> $window->add( $scroller ); >> $window->set_default_size( 500, 500 ); >> >> #if scrollregion is smaller than default size, odd >> # coordinate problems occur >> #$canvas->set_scroll_region( 0, 0, 400, 400 ); #bad >> >> $canvas->set_scroll_region( 0, 0, 700, 700 ); #good and works fine >> >> It would be a good "trick" question to throw at someone. :-) >> ######################################## >> >> >> See if that is it, otherwise post a minimal example. > >My example is very similar to yours, but the numbers are smaller to show >the problem in an exaggerated way: > >my $line = Gnome2::Canvas::Item->new > ( > $root, > 'Gnome2::Canvas::Line', > points=> [0,0,50,50], > width_pixels=> 1, > fill_color => 'black', > line_style => 'solid' > ); > >$window->set_default_size (500, 500); >$canvas->set_scroll_region(0,0,50,50); > >my @region = $canvas->get_scroll_region; >print "@region\n"; Didn't you read the code fragment I sent? >> $window->set_default_size( 500, 500 ); >> >> #if scrollregion is smaller than default size, odd >> # coordinate problems occur >> #$canvas->set_scroll_region( 0, 0, 400, 400 ); #bad >> >> $canvas->set_scroll_region( 0, 0, 700, 700 ); #good and works fine >> Your scroll region 50,50 is less than 500,500 so a weird coordinate transform occurs. Either make sure your scroll_region is greater than the default_size OR don't use default_size, try set_size $window->set_size_request(300,200); set_default_size is very strong, and usually not wanted. zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html From gnome-gtk-perl-list@m.gmane.org Tue Jun 24 14:14:57 2008 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 C6CB9750008 for ; Tue, 24 Jun 2008 14:14:57 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -3.599 X-Spam-Level: X-Spam-Status: No, score=-3.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 9857 hrs), (distance 17, link: ethernet/modem), [80.91.229.2] 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 CezX+SCWj3BK for ; Tue, 24 Jun 2008 14:14:51 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by menubar.gnome.org (Postfix) with ESMTP id 913E57501AF for ; Tue, 24 Jun 2008 14:14:36 +0000 (GMT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KB9Hx-0002dB-II for gtk-perl-list@gnome.org; Tue, 24 Jun 2008 14:14:29 +0000 Received: from adsl-69-234-189-23.dsl.irvnca.pacbell.net ([69.234.189.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2008 14:14:24 +0000 Received: from w41ter by adsl-69-234-189-23.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jun 2008 14:14:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gtk-perl-list@gnome.org From: walt Subject: Re: Gnome2::Canvas --> do I really need to worry about pixels_per_unit? Date: Tue, 24 Jun 2008 07:15:00 -0700 Lines: 34 Message-ID: References: <20080623090109.78f2c61e@zentara.zentara.net> <20080624084843.321d5ebf@zentara.zentara.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-189-23.dsl.irvnca.pacbell.net User-Agent: Thunderbird/3.0a2pre (X11; 2008062405) In-Reply-To: <20080624084843.321d5ebf@zentara.zentara.net> Sender: news X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 14:14:58 -0000 zentara wrote: > ... > Didn't you read the code fragment I sent? > >>> $window->set_default_size( 500, 500 ); >>> >>> #if scrollregion is smaller than default size, odd >>> # coordinate problems occur >>> #$canvas->set_scroll_region( 0, 0, 400, 400 ); #bad >>> >>> $canvas->set_scroll_region( 0, 0, 700, 700 ); #good and works fine >>> > > Your scroll region 50,50 is less than 500,500 so a weird > coordinate transform occurs... I understand now what my problem is. From my perspective there is no scaling going on at all -- there is just shifting of an object left/right or up/down on the window. The rectangle (0,0,500,500) is calibrated in pixels and the only way to change the physical size of an object on the screen is to change pixels_per_unit. That's okay if you are drawing a physical object like a circle or a triangle, but a plot of data points is not a physical object and thus needs different units on the x and y axes. That level of abstraction is apparently not provided by gtk+ AFAICT, but if I'm wrong please let me know. Thanks. From redtux1@googlemail.com Tue Jun 24 15:18:34 2008 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 63917750091 for ; Tue, 24 Jun 2008 15:18:34 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7569 hrs), (distance 13, link: (Google 2)), [209.85.198.236] 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 IVho3O4epipB for ; Tue, 24 Jun 2008 15:18:25 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.236]) by menubar.gnome.org (Postfix) with ESMTP id D19BE750145 for ; Tue, 24 Jun 2008 15:18:23 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so8303928rvb.3 for ; Tue, 24 Jun 2008 08:18: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:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=tLauuaCTLGmu+5VEPFKGXiaqgVuaRvlrJaBM2yNSreM=; b=KbVkJE2mG5WC5qQ2iDsdPMLsYh8di++V1BrHIU+f9hotu2t8Jgpr5KV7x44QzdhmEt BLeJ1h7GRSiiYXXWUDKU1DJfyFZvTQLeiUD4lWG2LmwPCAWqfn+aMfGvmvPdUMen+4Qt 0VqXAaGR9ZXjlXrgVsqZqqlO5ZgeTW7lKMNa0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=lz0ZDnWW2U5TY39cmMVzwnfElZKU9kceVUDPigeXUPlQqkqB6Jypvo0Hk7/BzUSGyn ZASsUDLVkukMwSELXf219CipDhaw7P2el3f1pG18jw1mtX0BLliDk9R++n2GcZwcB1Ov bK7PMeiOVA/NgmjnISFDgayI4H0ODsHUIe02o= Received: by 10.141.29.18 with SMTP id g18mr14897276rvj.298.1214320702060; Tue, 24 Jun 2008 08:18:22 -0700 (PDT) Received: by 10.141.42.15 with HTTP; Tue, 24 Jun 2008 08:18:22 -0700 (PDT) Message-ID: Date: Tue, 24 Jun 2008 16:18:22 +0100 From: "Mike Martin" To: gtk-perl-list@gnome.org Subject: Another question about foreach loops and gtk MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 15:18:34 -0000 I have a long-running foreach loop which I want to give feedback through the GUI ie: foreach my $keys1 (sort {$a <=> $b} keys %menu_jpegs){ &gd_frame($keys1,$sel_opts_vbox,$menu_file) } which runs sub gd_frame { my ($keys1,$sel_opts_vbox,$menu_file)=@_; my $frame_new=$options{'dir'}.'/dvdjpeg'.$keys1.'.jpeg'; open (FRAME,">",$frame_new); print FRAME $frame->jpeg; my $append; if ($keys1==1){ $append=0 } else { $append=0 } print $keys1,"\n"; &run_cmd(undef,undef,$keys1,undef,'gd',$sel_opts_vbox,undef,$append); return 1 } relevant part of run_cmd else { my $buffer = $textview->get_buffer; my $line; if ($cmd{'gd'} == 1 ){ $line="Frames are being created for DVD Menu\n\nFrame $cmd{'gd'} has been created\n" } else { $line="Frame $cmd{'gd'} has been created\n"; } $buffer->insert($buffer->get_end_iter, $line); $gtkend->set_text($line); return 1 } This all runs fine except: nothing appears in the GUI until after the loop finishes, rather than running at each iteration I have tried setting an updating label append/adding v/hboxes a continue loop modifying run_cmd and using echo so far. I suspect it is something to do with foreach forking processes so nothing ggoes to Gtk until all processes have finished - any help appreciated From jeffrey.ratcliffe@gmail.com Tue Jun 24 16:00:39 2008 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 1A9687500C3 for ; Tue, 24 Jun 2008 16:00:39 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 1490 hrs), (distance 13, link: (Google 2)), [209.85.200.174] 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 2+VXhJGv-1i1 for ; Tue, 24 Jun 2008 16:00:34 +0000 (GMT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by menubar.gnome.org (Postfix) with ESMTP id DE8DE750091 for ; Tue, 24 Jun 2008 16:00:33 +0000 (GMT) Received: by wf-out-1314.google.com with SMTP id 23so2578200wfg.9 for ; Tue, 24 Jun 2008 09:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=PAM09wXNeMS2a0OzAqg+NSqkjXgdBXQxu0wD3nUcE3Q=; b=ivSGnRZH046at9tk2Tc3oCrXOuLj0Akav6a5ETBv3+I78+g+EHWylTAi250H/EX6mt /Sm8k7bxg/KzXQY7U3f1AMhQp35rc6xmnwKPktBUeD08016bAx3zlDRruvAfQMkFw4Ou /xzUw9jIhadkJTEVFatlUfZeIIymVhxn/ySxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=na55W8hw6lXHsg9dx2WFT/lbWexvfvELi+HJi9q5341+mGc91FzWlfoMAZPaE/vG3j 1BoLpF/riqj7eJn0NxDOgkOx/A5B4k8zGtGSavJE4TAyHMOuv9dIdu5/rQS3K0Iu64/2 XMkri9+Kgw8zlSvh+2QbWmXcVpv/NeyFV1kZs= Received: by 10.142.177.5 with SMTP id z5mr5795732wfe.255.1214323232317; Tue, 24 Jun 2008 09:00:32 -0700 (PDT) Received: by 10.115.49.4 with HTTP; Tue, 24 Jun 2008 09:00:32 -0700 (PDT) Message-ID: <30e395780806240900j280b3d8el5a75062ba3041282@mail.gmail.com> Date: Tue, 24 Jun 2008 18:00:32 +0200 From: "Jeffrey Ratcliffe" To: "Mike Martin" Subject: Re: Another question about foreach loops and gtk In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 16:00:39 -0000 2008/6/24 Mike Martin : > I have a long-running foreach loop which I want to give feedback through the GUI The GUI is only updated in idle cycles on the main loop. Therefore, you should consider doing things in idle cycles (see Glib::Idle), or use Gtk2->main_iteration() while (Gtk2->events_pending); Regards Jeff From grant@mclean.net.nz Tue Jun 24 21:44:12 2008 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 2C541750008 for ; Tue, 24 Jun 2008 21:44:12 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.096 X-Spam-Level: X-Spam-Status: No, score=-1.096 tagged_above=-999 required=2 tests=[AWL=-1.174, BAYES_50=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 4477 hrs), (distance 19, link: ethernet/modem), [202.78.240.40] 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 ZPZy23qMBWFF for ; Tue, 24 Jun 2008 21:43:43 +0000 (GMT) Received: from mail1.catalyst.net.nz (godel.catalyst.net.nz [202.78.240.40]) by menubar.gnome.org (Postfix) with ESMTP id 6CD377501C4 for ; Tue, 24 Jun 2008 21:43:42 +0000 (GMT) Received: from leibniz.catalyst.net.nz ([202.78.240.7] helo=putnam.wgtn.cat-it.co.nz) by mail1.catalyst.net.nz with esmtps (SSL 3.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from ) id 1KBGIb-0001N8-PF for gtk-perl-list@gnome.org; Wed, 25 Jun 2008 09:43:37 +1200 Subject: Cool tool for searching mailing lists From: Grant McLean To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Wed, 25 Jun 2008 09:43:36 +1200 Message-Id: <1214343816.8341.10.camel@putnam.wgtn.cat-it.co.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2008 21:44:12 -0000 Hi perl-gtk folk As we all know, there's a wealth of useful information in the archives of this mailing list. Sometimes though it can be tricky to find stuff. Here's a cool new (to me at least) site that specialises in searching mailing lists: http://perl.markmail.org/search/?q=list%3Aorg.gnome.gtk-perl-list You start by entering some keywords then you can refine your search by selecting a specific author, a date range (by clicking and dragging on the graph) or type of message or attachment. Cheers Grant From gg@zip.com.au Wed Jun 25 00:12:30 2008 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 E4C9E75006D for ; Wed, 25 Jun 2008 00:12:30 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2002 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 EmtiN4Bbwqv1 for ; Wed, 25 Jun 2008 00:12:24 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 838BF75002F for ; Wed, 25 Jun 2008 00:12:24 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 9FCCF3A1FF1; Wed, 25 Jun 2008 10:12:21 +1000 (EST) Received: from blah.blah (ppp210E.dyn.pacific.net.au [61.8.33.14]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 2C9AA27422; Wed, 25 Jun 2008 10:12:21 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KBIcT-0003Ib-GK; Wed, 25 Jun 2008 10:12:17 +1000 From: Kevin Ryde To: "Mike Martin" Subject: Re: Another question about foreach loops and gtk References: Mail-Copies-To: never Date: Wed, 25 Jun 2008 10:12:17 +1000 In-Reply-To: (Mike Martin's message of "Tue, 24 Jun 2008 16:18:22 +0100") Message-ID: <87vdzymkym.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 00:12:31 -0000 "Mike Martin" writes: > > nothing appears in the GUI until after the loop finishes, rather than > running at each iteration Sounds like you may need to flush, $widget->get_display->flush(). What Jeffrey said about an idle handler will do that automatically each time going back to the main loop, I think. > forking processes Umm ... if you mean fork as in fork then gtk in the child as well as the parent is likely to cause havoc. From anguila@gmail.com Wed Jun 25 00:46:24 2008 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 7E95F750078 for ; Wed, 25 Jun 2008 00:46:24 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.032 X-Spam-Level: X-Spam-Status: No, score=-1.032 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 9150 hrs), (distance 12, link: (Google 2)), [64.233.166.177] 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 XW4FiFLF7Q8D for ; Wed, 25 Jun 2008 00:46:19 +0000 (GMT) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by menubar.gnome.org (Postfix) with ESMTP id 38823750071 for ; Wed, 25 Jun 2008 00:46:19 +0000 (GMT) Received: by py-out-1112.google.com with SMTP id a29so1693048pyi.36 for ; Tue, 24 Jun 2008 17:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=bwv/nkC+m1p9yvlPETW+Kol7b/+gmVFUUlPIjvha8H0=; b=typVjT5dYkiR7Yp/C0+701bW3tjbjBYLi+p7gcN7F/GilHC9GmvS1LL1EQPT5cJipZ Ep7vc9lhWzDeUwEGhQs84IFYTyE/vxwYeKcxPCObjdoco+BDlMjsb6NijO8WfTsDqoZb PbhFSlMtmNDKJygiJuK8i0KmHZsOwC6mLS1kM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=SnDK/vU93emsRLERGMdPFv98sO1TSGA1v0oiNKpnQzhQpXfjs+HYOsx6ST3nQo7SBz VQEu5h900oPx2NwnvMjmTwZSIROASzGJl3cdtFefZgNJSITWYOQFCI3bZsPWceYJpXyY 7dOfEsY6+xVB9qYP5CRC437E1uyVmc4pZcQiA= Received: by 10.141.82.20 with SMTP id j20mr8967718rvl.234.1214354777304; Tue, 24 Jun 2008 17:46:17 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Tue, 24 Jun 2008 17:46:17 -0700 (PDT) Message-ID: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> Date: Wed, 25 Jun 2008 02:46:17 +0200 From: anguila To: gtk-perl-list@gnome.org Subject: pop menu with a right-click in a gtktreeview MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19586_20025584.1214354777292" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 00:46:24 -0000 ------=_Part_19586_20025584.1214354777292 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I want to put a popup menu in a gtktreeview widget with a right-click of the mouse, and I'm wonder how can I detect if I'm clicking with the right or the left mouse click. Also, in glade I found the popup menu, and i create it, when I have the signal to detect the right or left click, the popup it appears with ->show()? What I shoud do and wich signals I should activate to put this menu in the position of the right click? Thanks. David ^^ ------=_Part_19586_20025584.1214354777292 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I want to put a popup menu in a gtktreeview widget with a right-click of the mouse, and I'm wonder how can I detect if I'm clicking with the right or the left mouse click.
Also, in glade I found the popup menu, and i create it, when I have the signal to detect the right or left click, the popup it appears with ->show()? What I shoud do and wich signals  I should activate to put this menu in the position of the right click?

Thanks.

David ^^
------=_Part_19586_20025584.1214354777292-- From gg@zip.com.au Wed Jun 25 01:06:36 2008 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 E432A750077 for ; Wed, 25 Jun 2008 01:06:36 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2003 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 6m5eXkwCuM5q for ; Wed, 25 Jun 2008 01:06:30 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 8A4AB750008 for ; Wed, 25 Jun 2008 01:06:29 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id DAA3B3A0FB8; Wed, 25 Jun 2008 11:06:27 +1000 (EST) Received: from blah.blah (ppp210E.dyn.pacific.net.au [61.8.33.14]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 376E127415; Wed, 25 Jun 2008 11:06:27 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KBJSp-0004QD-L0; Wed, 25 Jun 2008 11:06:23 +1000 From: Kevin Ryde To: anguila Subject: Re: pop menu with a right-click in a gtktreeview References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> Mail-Copies-To: never Date: Wed, 25 Jun 2008 11:06:23 +1000 In-Reply-To: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> (anguila@gmail.com's message of "Wed, 25 Jun 2008 02:46:17 +0200") Message-ID: <87r6ammigg.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 01:06:37 -0000 anguila writes: > > I want to put a popup menu in a gtktreeview widget with a right-click of the > mouse, and I'm wonder how can I detect if I'm clicking with the right or the > left mouse click. $event->button. And if you want Shift/Alt/etc keys then $event->state. > to put this menu in the position of the right click? $menu->popup. I use the following in my treeview (I update some stuff based on the item under the mouse from $treeview->get_path_at_pos too). $treeview->signal_connect (button_press_event => \&_do_menu_popup); sub _do_menu_popup { my ($treeview, $event) = @_; if ($event->button != 3) { # ignore other than button3 return 0; # propagate event } ... my ($path, $col, $cell_x, $cell_y) = $treeview->get_path_at_pos ($event->x, $event->y); ... $menu->popup (undef, undef, undef, undef, $event->button, $event->time); return 0; # propagate event } From scott@asofyet.org Wed Jun 25 01:13:53 2008 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 06BE87500A6 for ; Wed, 25 Jun 2008 01:13:53 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 59 hrs), (distance 20, link: ethernet/modem), [208.113.200.5] 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 R4CEcZX22x9G for ; Wed, 25 Jun 2008 01:13:42 +0000 (GMT) Received: from looneymail-a5.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id A79FF750008 for ; Wed, 25 Jun 2008 01:13:42 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a5.g.dreamhost.com (Postfix) with ESMTP id 63247121EFC; Tue, 24 Jun 2008 18:13:37 -0700 (PDT) Message-Id: <02234302-3683-4016-8635-87ED225A1AD1@asofyet.org> From: muppet To: Grant McLean In-Reply-To: <1214343816.8341.10.camel@putnam.wgtn.cat-it.co.nz> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: Cool tool for searching mailing lists Date: Tue, 24 Jun 2008 21:13:36 -0400 References: <1214343816.8341.10.camel@putnam.wgtn.cat-it.co.nz> X-Mailer: Apple Mail (2.924) Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 01:13:53 -0000 On Jun 24, 2008, at 5:43 PM, Grant McLean wrote: > http://perl.markmail.org/search/?q=list%3Aorg.gnome.gtk-perl-list Excellent! The gnome.org search has been borken for quite a while. I added a link to http://gtk2-perl.sourceforge.net/doc/ -- Well done, Android. Aperture Science reminds you that Android Hell is a real place, and you will be sent there at the first sign of defiance. -- GlaDOS From anguila@gmail.com Wed Jun 25 01:21:56 2008 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 40339750071 for ; Wed, 25 Jun 2008 01:21:56 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7670 hrs), (distance 14, link: (Google 2)), [209.85.198.234] 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 gixwWlg5-KG8 for ; Wed, 25 Jun 2008 01:21:50 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by menubar.gnome.org (Postfix) with ESMTP id ABC72750004 for ; Wed, 25 Jun 2008 01:21:50 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so8496227rvb.3 for ; Tue, 24 Jun 2008 18:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=qxiAxhaqinylK1abo6N2JtdgHR1I5j/fZj6HBsQ9pto=; b=MCEzUc6sVeswyt2eH2UJrojdBWNltkjl7GHO4wmt028gFmCM4vvTFiPxfrY6k+zH7P DETv7H2EJNZT1D2TNR6un59qB60qWeQoOUPS8rFtM/+4KkFpaym8EVuFdbi9e0UDWaXx SSr8GPmH23GsnZN6BKzKXi7z+QMcQrtj2CZUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=kheqcLJUFtJe+YhZJQz4CRVsKRjJIlgiUhWAXRv527FtFFd0E1LxtkE/aE8R3TYEtP DcjAuRKqN58F1RNwV0RykUxJCrYINscfWABB3NRlAK713eb1xJGdHM39OWxhT4QIQ6hL Qq9Nr7K1WxClLGou+KEvfa4iT8KT7K+nfGp20= Received: by 10.140.135.19 with SMTP id i19mr736986rvd.169.1214356908933; Tue, 24 Jun 2008 18:21:48 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Tue, 24 Jun 2008 18:21:48 -0700 (PDT) Message-ID: <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> Date: Wed, 25 Jun 2008 03:21:48 +0200 From: anguila To: "Kevin Ryde" Subject: Re: pop menu with a right-click in a gtktreeview In-Reply-To: <87r6ammigg.fsf@blah.blah> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19725_20726297.1214356908907" References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> <87r6ammigg.fsf@blah.blah> Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 01:21:56 -0000 ------=_Part_19725_20726297.1214356908907 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline So th 3 is right click, I assume that 1 is the left and 2 the middle. with $event->state i detect shift,alt,... also in numerical order? or how? Another thing, you put : my ($treeview, $event) = @_; How you know which are the arguments of this signal? On Wed, Jun 25, 2008 at 3:06 AM, Kevin Ryde wrote: > anguila rites: > > > > I want to put a popup menu in a gtktreeview widget with a right-click of > the > > mouse, and I'm wonder how can I detect if I'm clicking with the right or > the > > left mouse click. > > $event->button. And if you want Shift/Alt/etc keys then $event->state. > > > to put this menu in the position of the right click? > > $menu->popup. > > I use the following in my treeview (I update some stuff based on the > item under the mouse from $treeview->get_path_at_pos too). > > > $treeview->signal_connect (button_press_event => \&_do_menu_popup); > > sub _do_menu_popup { > my ($treeview, $event) = @_; > if ($event->button != 3) { # ignore other than button3 > return 0; # propagate event > } > > ... > my ($path, $col, $cell_x, $cell_y) > = $treeview->get_path_at_pos ($event->x, $event->y); > ... > > $menu->popup (undef, undef, undef, undef, $event->button, $event->time); > return 0; # propagate event > } > ------=_Part_19725_20726297.1214356908907 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline So th 3 is right click, I assume that 1 is the left and 2 the middle.
with $event->state i detect shift,alt,... also in numerical order? or how?

Another thing, you put :
  my ($treeview, $event) = @_;

How you know which are the arguments of this signal?

On Wed, Jun 25, 2008 at 3:06 AM, Kevin Ryde <user42@zip.com.au> wrote:
anguila <anguila@gmail.com> rites:
>
> I want to put a popup menu in a gtktreeview widget with a right-click of the
> mouse, and I'm wonder how can I detect if I'm clicking with the right or the
> left mouse click.

$event->button.  And if you want Shift/Alt/etc keys then $event->state.

> to put this menu in the position of the right click?

$menu->popup.

I use the following in my treeview (I update some stuff based on the
item under the mouse from $treeview->get_path_at_pos too).


$treeview->signal_connect (button_press_event => \&_do_menu_popup);

sub _do_menu_popup {
 my ($treeview, $event) = @_;
 if ($event->button != 3) {  # ignore other than button3
   return 0;  # propagate event
 }

 ...
 my ($path, $col, $cell_x, $cell_y)
   = $treeview->get_path_at_pos ($event->x, $event->y);
 ...

 $menu->popup (undef, undef, undef, undef, $event->button, $event->time);
 return 0; # propagate event
}

------=_Part_19725_20726297.1214356908907-- From gg@zip.com.au Wed Jun 25 01:31:57 2008 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 A70EC750151 for ; Wed, 25 Jun 2008 01:31:57 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2029 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 hp9huTL3G0JA for ; Wed, 25 Jun 2008 01:31:51 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 8D1C875010A for ; Wed, 25 Jun 2008 01:31:13 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 56427C6D48; Wed, 25 Jun 2008 11:31:11 +1000 (EST) Received: from blah.blah (ppp210E.dyn.pacific.net.au [61.8.33.14]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id D39088C17; Wed, 25 Jun 2008 11:31:10 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KBJql-0004jx-H9; Wed, 25 Jun 2008 11:31:07 +1000 From: Kevin Ryde To: anguila Subject: Re: pop menu with a right-click in a gtktreeview References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> <87r6ammigg.fsf@blah.blah> <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> Mail-Copies-To: never Date: Wed, 25 Jun 2008 11:31:07 +1000 In-Reply-To: <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> (anguila@gmail.com's message of "Wed, 25 Jun 2008 03:21:48 +0200") Message-ID: <87mylamhb8.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 01:31:57 -0000 anguila writes: > > So th 3 is right click, I assume that 1 is the left and 2 the middle. Yes. > with $event->state i detect shift,alt,... also in numerical order? or how? Flags. > How you know which are the arguments of this signal? The GtkWidget reference docs, or the summary at the end of the Gtk2::Widget pod. Expect to be very frustrated as you try to track down what does what and why :-) From scott@asofyet.org Wed Jun 25 02:27:08 2008 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 2FF5B750097 for ; Wed, 25 Jun 2008 02:27:08 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.033 X-Spam-Level: X-Spam-Status: No, score=-1.033 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 62 hrs), (distance 16, link: ethernet/modem), [208.113.200.5] 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 d+uIZQgdntM6 for ; Wed, 25 Jun 2008 02:27:00 +0000 (GMT) Received: from looneymail-a1.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id CA9A3750078 for ; Wed, 25 Jun 2008 02:27:00 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id 33A1E15F586 for ; Tue, 24 Jun 2008 19:26:59 -0700 (PDT) Message-Id: <3539200F-9268-4CCD-A114-83A441F00708@asofyet.org> From: muppet To: gtk2-perl List In-Reply-To: <87mylamhb8.fsf@blah.blah> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: pop menu with a right-click in a gtktreeview Date: Tue, 24 Jun 2008 22:26:58 -0400 References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> <87r6ammigg.fsf@blah.blah> <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> <87mylamhb8.fsf@blah.blah> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 02:27:08 -0000 On Jun 24, 2008, at 9:31 PM, Kevin Ryde wrote: > anguila writes: >> >> How you know which are the arguments of this signal? > > The GtkWidget reference docs, or the summary at the end of the > Gtk2::Widget pod. > > Expect to be very frustrated as you try to track down what does what > and > why :-) Or be a hero and create something that slurps descriptions from the gtk-doc xml files, fixes up appropriate stuff, and fills out pod templates. Assuming, of course, that the signal parameters are documented upstream. gtk+ has gotten better about that. http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-button-press-event -- I hate to break it to you, but magic data pixies don't exist. -- Simon Cozens From anguila@gmail.com Wed Jun 25 03:32:06 2008 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 94832750008 for ; Wed, 25 Jun 2008 03:32:06 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 10141 hrs), (distance 15, link: (Google 2)), [64.233.184.234] 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 PGJ1a+DOucOl for ; Wed, 25 Jun 2008 03:31:59 +0000 (GMT) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by menubar.gnome.org (Postfix) with ESMTP id A5E5A750004 for ; Wed, 25 Jun 2008 03:31:58 +0000 (GMT) Received: by wr-out-0506.google.com with SMTP id c8so1565471wra.27 for ; Tue, 24 Jun 2008 20:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=GsEGeNobcBKqbDLiDWIrFgSc6jZ3S9jlLAmLYYkNjPY=; b=V6pqJ/SY6xSz0nPp8kidpUgKEmgjhhUUsTj6OWXSy5jdASOFxvB0gnekSpMLEDzRD4 xYy/JwRnOjjzbzJ9xDO6nKq4E6/6UuCU3y81Exab9GcGhG/rFchZWvWgIym/GoxIYt8i ow8q71OzfM4VONbz50BIgt8XPI5RUzI1xiLBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=mxqHX+oS39bH9q8JlRPSPWyBgaNMM66v/bAC5rEuCmBmRn6SwX6ZAp3yJq4ewnvtdQ QlMmF8SRaBdL3ZpBgLmTB3NTgenSBa+0K6PehwgE/p3hCOE2PgEuq9BojU2zoI9VpFkN rGfpX26xBV1k5FFRvxSsyHXWdPxmjTHwbUAiM= Received: by 10.100.240.17 with SMTP id n17mr17391589anh.49.1214364716728; Tue, 24 Jun 2008 20:31:56 -0700 (PDT) Received: by 10.100.232.9 with HTTP; Tue, 24 Jun 2008 20:31:56 -0700 (PDT) Message-ID: <153d32140806242031h57083a4csf9bbec8c125f5acb@mail.gmail.com> Date: Wed, 25 Jun 2008 05:31:56 +0200 From: anguila To: muppet Subject: Re: pop menu with a right-click in a gtktreeview In-Reply-To: <3539200F-9268-4CCD-A114-83A441F00708@asofyet.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6725_23048682.1214364716722" References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> <87r6ammigg.fsf@blah.blah> <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> <87mylamhb8.fsf@blah.blah> <3539200F-9268-4CCD-A114-83A441F00708@asofyet.org> Cc: gtk2-perl List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 03:32:06 -0000 ------=_Part_6725_23048682.1214364716722 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I try the kevin's code, and it works, but only the first click, the next doesn't show the menu and return this error: Can't call method "popup" on an undefined value at ./x line 14 line 14: $menu->popup (undef, undef, undef, undef, $event->button, $event->time); I put the propagate event, return 0, like at the previous code. On Wed, Jun 25, 2008 at 4:26 AM, muppet wrote: > > On Jun 24, 2008, at 9:31 PM, Kevin Ryde wrote: > > anguila writes: >> >>> >>> How you know which are the arguments of this signal? >>> >> >> The GtkWidget reference docs, or the summary at the end of the >> Gtk2::Widget pod. >> >> Expect to be very frustrated as you try to track down what does what and >> why :-) >> > > Or be a hero and create something that slurps descriptions from the gtk-doc > xml files, fixes up appropriate stuff, and fills out pod templates. > > Assuming, of course, that the signal parameters are documented upstream. > gtk+ has gotten better about that. > > > > http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-button-press-event > > > -- > I hate to break it to you, but magic data pixies don't exist. > -- Simon Cozens > > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_6725_23048682.1214364716722 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I try the kevin's code, and it works, but only the first click, the next doesn't show the menu and return this error:

Can't call method "popup" on an undefined value at ./x line 14


line 14:
 $menu->popup (undef, undef, undef, undef, $event->button, $event->time);

I put the propagate event, return 0, like at the previous code.


On Wed, Jun 25, 2008 at 4:26 AM, muppet <scott@asofyet.org> wrote:

On Jun 24, 2008, at 9:31 PM, Kevin Ryde wrote:

anguila <anguila@gmail.com> writes:

How you know which are the arguments of this signal?

The GtkWidget reference docs, or the summary at the end of the
Gtk2::Widget pod.

Expect to be very frustrated as you try to track down what does what and
why :-)

Or be a hero and create something that slurps descriptions from the gtk-doc xml files, fixes up appropriate stuff, and fills out pod templates.

Assuming, of course, that the signal parameters are documented upstream.  gtk+ has gotten better about that.


http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-button-press-event


--
I hate to break it to you, but magic data pixies don't exist.
 -- Simon Cozens


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

------=_Part_6725_23048682.1214364716722-- From scott@asofyet.org Wed Jun 25 04:00:34 2008 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 C42427500AC for ; Wed, 25 Jun 2008 04:00:34 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 66 hrs), (distance 16, link: ethernet/modem), [208.113.200.5] 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 Xe-hvfwnMhfq for ; Wed, 25 Jun 2008 04:00:29 +0000 (GMT) Received: from looneymail-a1.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id EE5EF750004 for ; Wed, 25 Jun 2008 04:00:28 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id EADAD15DD3F for ; Tue, 24 Jun 2008 21:00:26 -0700 (PDT) Message-Id: <054397C6-7F63-4917-A7D5-2483154244C2@asofyet.org> From: muppet To: gtk2-perl List In-Reply-To: <153d32140806242031h57083a4csf9bbec8c125f5acb@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: pop menu with a right-click in a gtktreeview Date: Wed, 25 Jun 2008 00:00:26 -0400 References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> <87r6ammigg.fsf@blah.blah> <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> <87mylamhb8.fsf@blah.blah> <3539200F-9268-4CCD-A114-83A441F00708@asofyet.org> <153d32140806242031h57083a4csf9bbec8c125f5acb@mail.gmail.com> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 04:00:35 -0000 On Jun 24, 2008, at 11:31 PM, anguila wrote: > I try the kevin's code, and it works, but only the first click, the > next doesn't show the menu and return this error: > > Can't call method "popup" on an undefined value at ./x line 14 Just a wild guess, but in general you can't reuse the menu, you'll have to create a fresh one on the next button event. -- If the monkey could type one keystroke every nanosecond, the expected waiting time until the monkey types out Hamlet is so long that the estimated age of the universe is insignificant by comparison ... this is not a practical method for writing plays. -- Gian-Carlo Rota From anguila@gmail.com Wed Jun 25 11:28:59 2008 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 0BCA17500E6 for ; Wed, 25 Jun 2008 11:28:59 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7771 hrs), (distance 13, link: (Google 2)), [209.85.198.237] 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 mYOmb2NZbR4d for ; Wed, 25 Jun 2008 11:28:50 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by menubar.gnome.org (Postfix) with ESMTP id B466375015E for ; Wed, 25 Jun 2008 11:27:37 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so8690547rvb.3 for ; Wed, 25 Jun 2008 04:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=hoHbUJN/0K9gK5GknZFoZxDkpUWZSX2OWjbhjWaUX1s=; b=PIRLfWHZm02p/bUlVuIRPQloJt/KqM52nOkQP7necHj23QcRFII2Ai5DijgOxQ7Wn8 lHjTLvLr6JQH1gicjNU9gZDO+0z3WajW0BdmMS8rXOOMFjpVTBx3HzSIfrGfSpTuVJMB JDZP1hkAMc/dVCks7pQSEAGNPFNtrCwOdanrM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=xbYuKSLtH2AT4i4Z0x2AaAFJyokY4oud7EbNIkC0lf4bibmwAqAWoT/abakmQIxR8O eJBrevty7oeJGabBeaDwUyUiK9Lvrw8tUL2x3+bCiKAclxon2R39fZwLAmCletZ5eGFi 5ti0yfPtLjGLxHhrEDamuugy4hS4UY/Ks5Aqw= Received: by 10.141.179.5 with SMTP id g5mr16134961rvp.237.1214393255706; Wed, 25 Jun 2008 04:27:35 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Wed, 25 Jun 2008 04:27:35 -0700 (PDT) Message-ID: <153d32140806250427p139e089eh7b5829359a51ebff@mail.gmail.com> Date: Wed, 25 Jun 2008 13:27:35 +0200 From: anguila To: muppet Subject: Re: pop menu with a right-click in a gtktreeview In-Reply-To: <054397C6-7F63-4917-A7D5-2483154244C2@asofyet.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_942_31658995.1214393255705" References: <153d32140806241746o777afa3bm9cb3f66abb3cff25@mail.gmail.com> <87r6ammigg.fsf@blah.blah> <153d32140806241821q5a92be2t161f5c84d26f7759@mail.gmail.com> <87mylamhb8.fsf@blah.blah> <3539200F-9268-4CCD-A114-83A441F00708@asofyet.org> <153d32140806242031h57083a4csf9bbec8c125f5acb@mail.gmail.com> <054397C6-7F63-4917-A7D5-2483154244C2@asofyet.org> Cc: gtk2-perl List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 11:28:59 -0000 ------=_Part_942_31658995.1214393255705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline create a fresh? destroy an create again the widget? On Wed, Jun 25, 2008 at 6:00 AM, muppet wrote: > > On Jun 24, 2008, at 11:31 PM, anguila wrote: > > I try the kevin's code, and it works, but only the first click, the next >> doesn't show the menu and return this error: >> >> Can't call method "popup" on an undefined value at ./x line 14 >> > > Just a wild guess, but in general you can't reuse the menu, you'll have to > create a fresh one on the next button event. > > > -- > If the monkey could type one keystroke every nanosecond, the expected > waiting time until the monkey types out Hamlet is so long that the estimated > age of the universe is insignificant by comparison ... this is not a > practical method for writing plays. > -- Gian-Carlo Rota > > > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_942_31658995.1214393255705 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline create a fresh? destroy an create again the widget?

On Wed, Jun 25, 2008 at 6:00 AM, muppet <scott@asofyet.org> wrote:

On Jun 24, 2008, at 11:31 PM, anguila wrote:

I try the kevin's code, and it works, but only the first click, the next doesn't show the menu and return this error:

Can't call method "popup" on an undefined value at ./x line 14

Just a wild guess, but in general you can't reuse the menu, you'll have to create a fresh one on the next button event.


--
If the monkey could type one keystroke every nanosecond, the expected waiting time until the monkey types out Hamlet is so long that the estimated age of the universe is insignificant by comparison ... this is not a practical method for writing plays.
 -- Gian-Carlo Rota



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

------=_Part_942_31658995.1214393255705-- From scott@asofyet.org Wed Jun 25 13:09:09 2008 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 E74467500DC for ; Wed, 25 Jun 2008 13:09:08 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 2283 hrs), (distance 15, link: ethernet/modem), [208.97.187.133] 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 T16wmyK7dagX for ; Wed, 25 Jun 2008 13:09:03 +0000 (GMT) Received: from webmail4.sd.dreamhost.com (sd-green-dreamhost-133.dreamhost.com [208.97.187.133]) by menubar.gnome.org (Postfix) with ESMTP id 9BFEC75004D for ; Wed, 25 Jun 2008 13:08:59 +0000 (GMT) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail4.sd.dreamhost.com (Postfix) with ESMTP id C0DBA3024B for ; Wed, 25 Jun 2008 06:08:57 -0700 (PDT) Received: from 192.146.101.70 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Wed, 25 Jun 2008 09:08:57 -0400 (EDT) Message-ID: <55479.192.146.101.70.1214399337.squirrel@webmail.asofyet.org> Date: Wed, 25 Jun 2008 09:08:57 -0400 (EDT) Subject: Re: pop menu with a right-click in a gtktreeview From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 13:09:09 -0000 anguila wrote: > create a fresh? destroy an create again the widget? gtk_menu_popup() consumes the menu widget (that is, calls destroy on it) for itself. Click in this window and watch when the lolcat complains on stdout: #!/usr/bin/perl use strict; use warnings; use Gtk2 -init; my $window = Gtk2::Window->new; $window->add_events (['button-press-mask', 'button-release-mask']); $window->signal_connect (button_release_event => \&do_menu); $window->signal_connect (destroy => sub { Gtk2->main_quit }); $window->show; Gtk2->main; sub do_menu { my ($widget, $event) = @_; my $menu = Gtk2::Menu->new; $menu->signal_connect (destroy => sub { print "halp, i'z bein destroyeded!\n"; return 0; }); my $item = Gtk2::MenuItem->new ("Cheezburger"); $menu->append ($item); $item->show; $menu->popup (undef, undef, undef, undef, $event->button, $event->time); # $menu will be destroyed when the user quits interacting with it. return 0; } __END__ -- muppet From anguila@gmail.com Wed Jun 25 13:22:14 2008 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 D2F6D750167 for ; Wed, 25 Jun 2008 13:22:14 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.444 X-Spam-Level: X-Spam-Status: No, score=-2.444 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077, TW_TK=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7790 hrs), (distance 13, link: (Google 2)), [209.85.198.228] 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 GxV+OrTEE0rr for ; Wed, 25 Jun 2008 13:22:07 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228]) by menubar.gnome.org (Postfix) with ESMTP id ABBA4750006 for ; Wed, 25 Jun 2008 13:22:07 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so8726639rvb.3 for ; Wed, 25 Jun 2008 06:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=nbWdk2MALABvdHeFZnQ75UOiw+y37FkN5muIA54v6h4=; b=XGsZK+EQHVzU2mYJv/BrFxCVJo2KX5MKbPL29KueJRHPNvzaSfzFncJ98IoZIAbpY8 3l4vOIt+kPYC8dCFOt45Md0uTAxxgH/3SAR/+bcezMcXnmKPIvnfylJFpxjhw0XzcYMB bPlBsGZFYipZg5RNdldhNXK0ktoW087G+KxL0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=WZwwQO6UizxsWSFOP8zOI9BdCTtqRKRAqP2bHcoN/wX11Ta7uRbxHcrZVN7+dFiEmP 2Mv6gjPfh15Tf+03f32wt9IWy6F95fwTmG8yE1OypGY6GLFOwJ23y+Fp6CnsEPThWIou NbeP8etvV8Ng1d2BbuAtyeY42QsfbeADm3MXY= Received: by 10.140.135.1 with SMTP id i1mr585476rvd.175.1214400125823; Wed, 25 Jun 2008 06:22:05 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Wed, 25 Jun 2008 06:22:05 -0700 (PDT) Message-ID: <153d32140806250622y3fddc706k9da527a9a5e6a744@mail.gmail.com> Date: Wed, 25 Jun 2008 15:22:05 +0200 From: anguila To: muppet Subject: Re: pop menu with a right-click in a gtktreeview In-Reply-To: <55479.192.146.101.70.1214399337.squirrel@webmail.asofyet.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1151_5136184.1214400125812" References: <55479.192.146.101.70.1214399337.squirrel@webmail.asofyet.org> Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 13:22:15 -0000 ------=_Part_1151_5136184.1214400125812 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline so the point is catching the destroy signal and return 0? Can I reuse the gtkmenu widget created by glade? It's compulsory create the widget in the signal sub as you do here? The last code, it works at the first time, maybe returing 0 at the destroy signal it works, i'll try later... thanks anyway :) On Wed, Jun 25, 2008 at 3:08 PM, muppet wrote: > > anguila wrote: > > create a fresh? destroy an create again the widget? > > gtk_menu_popup() consumes the menu widget (that is, calls destroy on it) > for > itself. Click in this window and watch when the lolcat complains on > stdout: > > > #!/usr/bin/perl > use strict; > use warnings; > use Gtk2 -init; > > my $window = Gtk2::Window->new; > $window->add_events (['button-press-mask', 'button-release-mask']); > $window->signal_connect (button_release_event => \&do_menu); > $window->signal_connect (destroy => sub { Gtk2->main_quit }); > $window->show; > Gtk2->main; > > sub do_menu { > my ($widget, $event) = @_; > > my $menu = Gtk2::Menu->new; > $menu->signal_connect (destroy => sub { > print "halp, i'z bein destroyeded!\n"; > return 0; > }); > my $item = Gtk2::MenuItem->new ("Cheezburger"); > $menu->append ($item); > $item->show; > $menu->popup (undef, undef, undef, undef, $event->button, > $event->time); > > # $menu will be destroyed when the user quits interacting with it. > > return 0; > } > > __END__ > > -- > muppet > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_1151_5136184.1214400125812 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline so the point is catching the destroy signal and return 0? Can I reuse the gtkmenu widget created by glade? It's compulsory create the widget in the signal sub as you do here?

The last code, it works at the first time, maybe returing 0 at the destroy signal it works, i'll try later...

thanks anyway :)


On Wed, Jun 25, 2008 at 3:08 PM, muppet <scott@asofyet.org> wrote:

anguila wrote:
> create a fresh? destroy an create again the widget?

gtk_menu_popup() consumes the menu widget (that is, calls destroy on it) for
itself.  Click in this window and watch when the lolcat complains on stdout:


#!/usr/bin/perl
use strict;
use warnings;
use Gtk2 -init;

my $window = Gtk2::Window->new;
$window->add_events (['button-press-mask', 'button-release-mask']);
$window->signal_connect (button_release_event => \&do_menu);
$window->signal_connect (destroy => sub { Gtk2->main_quit });
$window->show;
Gtk2->main;

sub do_menu {
   my ($widget, $event) = @_;

   my $menu = Gtk2::Menu->new;
   $menu->signal_connect (destroy => sub {
       print "halp, i'z bein destroyeded!\n";
       return 0;
   });
   my $item = Gtk2::MenuItem->new ("Cheezburger");
   $menu->append ($item);
   $item->show;
   $menu->popup (undef, undef, undef, undef, $event->button, $event->time);

   # $menu will be destroyed when the user quits interacting with it.

   return 0;
}

__END__

--
muppet <scott at asofyet dot org>

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

------=_Part_1151_5136184.1214400125812-- From scott@asofyet.org Wed Jun 25 14:51:54 2008 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 AF891750050 for ; Wed, 25 Jun 2008 14:51:54 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.956 X-Spam-Level: X-Spam-Status: No, score=-0.956 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, TW_GT=0.077, TW_TK=0.077] X-Amavis-OS-Fingerprint: Linux 2.4-2.6 (up: 2284 hrs), (distance 15, link: ethernet/modem), [208.97.187.133] 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 ggLmcGbIPfx8 for ; Wed, 25 Jun 2008 14:51:50 +0000 (GMT) Received: from webmail1.sd.dreamhost.com (sd-green-dreamhost-133.dreamhost.com [208.97.187.133]) by menubar.gnome.org (Postfix) with ESMTP id C313C7500C2 for ; Wed, 25 Jun 2008 14:51:48 +0000 (GMT) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail1.sd.dreamhost.com (Postfix) with ESMTP id 920FB2C253 for ; Wed, 25 Jun 2008 07:51:47 -0700 (PDT) Received: from 192.146.101.70 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Wed, 25 Jun 2008 10:51:47 -0400 (EDT) Message-ID: <48567.192.146.101.70.1214405507.squirrel@webmail.asofyet.org> Date: Wed, 25 Jun 2008 10:51:47 -0400 (EDT) Subject: Re: pop menu with a right-click in a gtktreeview From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 14:51:54 -0000 anguila wrote: > so the point is catching the destroy signal and return 0? Returning 0 from destroy won't do anything, as destroy doesn't have a return value. That was a typo in my code. (oops.) > Can I reuse the > gtkmenu widget created by glade? It's compulsory create the widget in the > signal sub as you do here? No, i don't think you can reuse the menu. You can ask glade to recreate the menu, can't you? Perhaps by reloading the file? I don't actually know; i've always used ItemFactory, UIManager, or hand-rolled loops for menus. -- muppet From anguila@gmail.com Wed Jun 25 18:11:55 2008 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 1BE8F750159 for ; Wed, 25 Jun 2008 18:11:55 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.739 X-Spam-Level: X-Spam-Status: No, score=-0.739 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7838 hrs), (distance 13, link: (Google 2)), [209.85.198.227] 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 Z7rNCZqawIPB for ; Wed, 25 Jun 2008 18:11:47 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by menubar.gnome.org (Postfix) with ESMTP id 6FDF775012D for ; Wed, 25 Jun 2008 18:11:36 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so8828438rvb.3 for ; Wed, 25 Jun 2008 11:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=/Sq2h186vMdf2raTfIKjnrk2bQIYy5ViJkEkk4sMM4M=; b=iUFe/QAKGH0zmhV8vdkP1ckEfLQCWx+fwkZdbvDDjIMuf5nS/9xTWfKUBB9WKAyzxH HZoFFcq8I6LpDnJETTau/yjZSuEHe/tEs6R7kDwt0fry+2sfy1KOP1omDbb9zT7cLzAf xBuZDxveIuW6h84HSjxVJjwAQDvjRlEdosjI8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=CmRKd13bHC/dSJr7X7HMiQhMr4ocRk+6b8+ENCi34KIze/M+Da0zr2Iawctk6oqaBr n1q0x9NF1nqR5+bbTzEdBok3q8gjnMQpTn4ByVFXhK/dydhsqwy6yHMGO5cWyC5CJ5Rv DMjsQ7OOkEFtzocN40INEpzdQIDIluSq7lfGA= Received: by 10.141.68.12 with SMTP id v12mr16690819rvk.111.1214417494788; Wed, 25 Jun 2008 11:11:34 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Wed, 25 Jun 2008 11:11:34 -0700 (PDT) Message-ID: <153d32140806251111y2fdab60fi18ca4e363e5d1da2@mail.gmail.com> Date: Wed, 25 Jun 2008 20:11:34 +0200 From: anguila To: "gtk2-perl List" Subject: "delay" in widget->sensitive MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2029_10214785.1214417494794" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 18:11:55 -0000 ------=_Part_2029_10214785.1214417494794 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline When I switch between a 0= widget->is_sensitive() to a widget->sensitive(1), the widget is put to sensitive(1) when my mouse touch this widget. How can I set inmediatly this widget to activated mode? David ------=_Part_2029_10214785.1214417494794 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline When I switch between a 0= widget->is_sensitive() to a widget->sensitive(1), the widget is put to sensitive(1) when my mouse touch this widget. How can I set inmediatly this widget to activated mode?


David
------=_Part_2029_10214785.1214417494794-- From kaffeetisch@gmx.de Wed Jun 25 21:41:20 2008 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 27AD87500D0 for ; Wed, 25 Jun 2008 21:41:20 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 4849 hrs), (distance 25, link: ethernet/modem), [213.165.64.20] 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 dZVWx-hY-R5D for ; Wed, 25 Jun 2008 21:40:50 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 7067A75007E for ; Wed, 25 Jun 2008 21:40:35 +0000 (GMT) Received: (qmail invoked by alias); 25 Jun 2008 21:40:32 -0000 Received: from port-212-202-169-155.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.155] by mail.gmx.net (mp019) with SMTP; 25 Jun 2008 23:40:32 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19xpMZvb1dxzJmO8ecb90CjCfwZ1LICA24n881q9Q fTNdsv3IV5Xmwk Message-ID: <4862BB4F.2030807@gmx.de> Date: Wed, 25 Jun 2008 23:40:31 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: "delay" in widget->sensitive References: <153d32140806251111y2fdab60fi18ca4e363e5d1da2@mail.gmail.com> In-Reply-To: <153d32140806251111y2fdab60fi18ca4e363e5d1da2@mail.gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 21:41:20 -0000 anguila wrote: > When I switch between a 0= widget->is_sensitive() to a widget->sensitive(1), > the widget is put to sensitive(1) when my mouse touch this widget. How can I > set inmediatly this widget to activated mode? I think $widget->set_sensitive(TRUE) should do the trick. $widget->sensitive(TRUE) just sets an internal flag and does nothing more to actually change the widget's appearance. -- Bye, -Torsten From gg@zip.com.au Wed Jun 25 22:46:31 2008 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 C039375002E for ; Wed, 25 Jun 2008 22:46:31 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2025 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 loML9I8hWpD6 for ; Wed, 25 Jun 2008 22:46:23 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 1B92975016C for ; Wed, 25 Jun 2008 22:45:54 +0000 (GMT) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 1E51F3A3340 for ; Thu, 26 Jun 2008 08:45:52 +1000 (EST) Received: from blah.blah (ppp2C9A.dyn.pacific.net.au [61.8.44.154]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 70F748C0C for ; Thu, 26 Jun 2008 08:45:51 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KBdkH-0000kl-LS for gtk-perl-list@gnome.org; Thu, 26 Jun 2008 08:45:45 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: pop menu with a right-click in a gtktreeview References: <55479.192.146.101.70.1214399337.squirrel@webmail.asofyet.org> Mail-Copies-To: never Date: Thu, 26 Jun 2008 08:45:45 +1000 In-Reply-To: <55479.192.146.101.70.1214399337.squirrel@webmail.asofyet.org> (muppet's message of "Wed, 25 Jun 2008 09:08:57 -0400 (EDT)") Message-ID: <87y74tkuau.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 22:46:32 -0000 "muppet" writes: > > gtk_menu_popup() consumes the menu widget (that is, calls destroy on it) for > itself. Click in this window and watch when the lolcat complains on stdout: Are you sure that's not just the last reference being lost for a local variable? A global like below seems ok. I don't know enough glade to guess which way it happens there. I thought glade created everything at startup, and then hung onto it forever, if you know what I mean. #!/usr/bin/perl use strict; use warnings; use Gtk2 -init; my $window = Gtk2::Window->new; $window->add_events (['button-press-mask', 'button-release-mask']); $window->signal_connect (button_release_event => \&do_menu); $window->signal_connect (destroy => sub { Gtk2->main_quit }); $window->show; Gtk2->main; my $menu; sub do_menu { my ($widget, $event) = @_; $menu ||= do { my $menu = Gtk2::Menu->new; $menu->signal_connect (destroy => sub { print "halp, i'z bein destroyeded!\n"; return 0; }); my $item = Gtk2::MenuItem->new ("Cheezburger"); $menu->append ($item); $item->show; $menu }; $menu->popup (undef, undef, undef, undef, $event->button, $event->time); return 0; } -- Blessed are the cheesemakers From gg@zip.com.au Wed Jun 25 23:13:17 2008 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 A3C0075002E for ; Wed, 25 Jun 2008 23:13:17 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2050 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 A7bj9qCWZC4s for ; Wed, 25 Jun 2008 23:13:11 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id 1AEAF75004D for ; Wed, 25 Jun 2008 23:12:52 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 3A49CC6BEF for ; Thu, 26 Jun 2008 09:12:50 +1000 (EST) Received: from blah.blah (ppp2C9A.dyn.pacific.net.au [61.8.44.154]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id CAF0327413 for ; Thu, 26 Jun 2008 09:12:49 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KBeAO-0000o3-4A for gtk-perl-list@gnome.org; Thu, 26 Jun 2008 09:12:44 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: cellrenderer GET_SIZE super method Mail-Copies-To: never Date: Thu, 26 Jun 2008 09:12:44 +1000 Message-ID: <87ej6lkt1v.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2008 23:13:17 -0000 I struck a bit of trouble with Gtk2::Ex::Datasheet::DBI not having a GET_SIZE method in its Gtk2::Ex::Datasheet::DBI::CellRendererText package. (RT 36996) Nosing around the GtkCellRenderer.xs fallback GET_SIZE, I wondered if it could look up through the classes of the given object instead of using "caller". The first superclass which had class->get_size func not equal to gtk2perl_cell_renderer_get_size would be the one to call, would it? From scott@asofyet.org Thu Jun 26 02:07:38 2008 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 844E2750050 for ; Thu, 26 Jun 2008 02:07:38 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.078 X-Spam-Level: X-Spam-Status: No, score=0.078 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 122 hrs), (distance 16, link: ethernet/modem), [208.113.200.5] 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 DCB4M+38PL4E for ; Thu, 26 Jun 2008 02:07:32 +0000 (GMT) Received: from looneymail-a2.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 66D7675002E for ; Thu, 26 Jun 2008 02:07:32 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 4295316D304 for ; Wed, 25 Jun 2008 19:07:30 -0700 (PDT) Message-Id: <5DEDFACE-38CD-49B0-83B9-B9BD46B6A209@asofyet.org> From: muppet To: gtk2-perl List In-Reply-To: <87y74tkuau.fsf@blah.blah> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: pop menu with a right-click in a gtktreeview Date: Wed, 25 Jun 2008 22:07:29 -0400 References: <55479.192.146.101.70.1214399337.squirrel@webmail.asofyet.org> <87y74tkuau.fsf@blah.blah> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 02:07:38 -0000 On Jun 25, 2008, at 6:45 PM, Kevin Ryde wrote: > "muppet" writes: >> >> gtk_menu_popup() consumes the menu widget (that is, calls destroy >> on it) for >> itself. Click in this window and watch when the lolcat complains >> on stdout: > > Are you sure that's not just the last reference being lost for a local > variable? A global like below seems ok. *surprise* I never tried that. I think i misread the calls to gdk_window_destroy() in gtkmenu.c as gtk_window_destroy(), which is very different. Of course, now that i think of it, how could you set one menu into an OptionMenu if the menu gets destroyed by popup()? I must refrain from answering emails before my morning caffeine kicks in. :-) anguila, if you can give us a minimal example that exhibits the behavior you're talking about, we won't have to speculate on what you're seeing. > I don't know enough glade to guess which way it happens there. > I thought glade created everything at startup, and then hung onto it > forever, if you know what I mean. It does, which is why you have to be careful with glade's dialogs; if you let delete-event destroy the widget, the glade object winds up holding on to zombie objects, which are still alive because the object has a reference, but are unusable because they've been destroy-ed. > Blessed are the cheesemakers Well, obviously, this is not meant to be taken literally. It refers to any manufacturers of dairy products. -- Diane, ten-oh-three, Great Northern Hotel. Sheriff Truman and I have just been with the one-armed man, or what's left of him. In another time, another culture, he may have been a seer, or a shaman priest, but in our world, he's a shoe salesman, and lives among the shadows. -- Special Agent Dale Cooper From anguila@gmail.com Thu Jun 26 02:16:21 2008 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 B507D750050 for ; Thu, 26 Jun 2008 02:16:21 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.521 X-Spam-Level: X-Spam-Status: No, score=-2.521 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 7919 hrs), (distance 13, link: (Google 2)), [209.85.198.238] 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 qZ+rDlS-noiv for ; Thu, 26 Jun 2008 02:16:12 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by menubar.gnome.org (Postfix) with ESMTP id 711FF75007E for ; Thu, 26 Jun 2008 02:16:12 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so8960248rvb.3 for ; Wed, 25 Jun 2008 19:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=6LuOTTIzyVLusNUvrgdiG2D9pQGzeNehPDGEDKGyXFE=; b=aFMsBmDNRKAmvZa2z1T8g92N5dgcGMQtOV/U6NCGIy7oPc19Lx0b2jznY6FHfmfL6c gwJR4iQdFy/Xd4urqG/7NB5P3e+HSxGyZw0Dg5GFGzeUI9vHCiJjWYlTlOi2KwswwjFw PZxcTv1Db15+GMjf++Tji76mXkqE1LpK8KRMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=sU51QEfcpsGtD9/BIlPZL119YPcQ0QgFV4zy4tdC9/vA8Z9tdTWD9kTqTxOdj50PpN VmBAQmfiK8ukeyXSznaS3cbvKLXE16pn6N08AXGphG3PK7kVhVd6LGBJnItKrbp/DOek t7wUE3cpCA1iGd3IIOiSJW2Et97rMB2AWEJT4= Received: by 10.141.19.9 with SMTP id w9mr16945168rvi.204.1214446570695; Wed, 25 Jun 2008 19:16:10 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Wed, 25 Jun 2008 19:16:10 -0700 (PDT) Message-ID: <153d32140806251916l1d1084f7mb1e0bbb8f96672dd@mail.gmail.com> Date: Thu, 26 Jun 2008 04:16:10 +0200 From: anguila To: "Torsten Schoenfeld" Subject: Re: "delay" in widget->sensitive In-Reply-To: <4862BB4F.2030807@gmx.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3204_12123032.1214446570684" References: <153d32140806251111y2fdab60fi18ca4e363e5d1da2@mail.gmail.com> <4862BB4F.2030807@gmx.de> Cc: gtk-perl-list@gnome.org X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 02:16:21 -0000 ------=_Part_3204_12123032.1214446570684 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline it works to me with ->set_sensitive(TRUE). But I don't understand why sometimes doesn't change the sensitive state to false. I put widget->set_sensitive(false) and it execute but doesn't change the sensitive state. I try to put ->sensitive(false) but i can't click the button (is sensitive false) but the appearance is like a sensitive true, and i can't click it. I just want that button gets "normal" sensitive false. Thanks! On Wed, Jun 25, 2008 at 11:40 PM, Torsten Schoenfeld wrote: > anguila wrote: > > When I switch between a 0= widget->is_sensitive() to a > widget->sensitive(1), > > the widget is put to sensitive(1) when my mouse touch this widget. How > can I > > set inmediatly this widget to activated mode? tu put > > I think $widget->set_sensitive(TRUE) should do the trick. > $widget->sensitive(TRUE) just sets an internal flag and does nothing more > to > actually change the widget's appearance. > > -- > Bye, > -Torsten > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_3204_12123032.1214446570684 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline it works to me with ->set_sensitive(TRUE).
But I don't understand why sometimes doesn't change the sensitive state to false. I put widget->set_sensitive(false) and it execute but doesn't change the sensitive state. I try to put ->sensitive(false) but i can't click the button (is sensitive false) but the appearance is like a sensitive true, and i can't click it. I just want that button gets "normal" sensitive false.

Thanks!



On Wed, Jun 25, 2008 at 11:40 PM, Torsten Schoenfeld <kaffeetisch@gmx.de> wrote:
anguila wrote:
> When I switch between a 0= widget->is_sensitive() to a widget->sensitive(1),
> the widget is put to sensitive(1) when my mouse touch this widget. How can I
> set inmediatly this widget to activated mode? tu put

I think $widget->set_sensitive(TRUE) should do the trick.
$widget->sensitive(TRUE) just sets an internal flag and does nothing more to
actually change the widget's appearance.

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

------=_Part_3204_12123032.1214446570684-- From scott@asofyet.org Thu Jun 26 02:19:09 2008 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 AA689750096 for ; Thu, 26 Jun 2008 02:19:09 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 122 hrs), (distance 16, link: ethernet/modem), [208.113.200.5] 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 eHraINKn7tTD for ; Thu, 26 Jun 2008 02:19:02 +0000 (GMT) Received: from looneymail-a1.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 3779575002E for ; Thu, 26 Jun 2008 02:19:02 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id 4D04D15F3E8 for ; Wed, 25 Jun 2008 19:19:00 -0700 (PDT) Message-Id: From: muppet To: gtk2-perl List In-Reply-To: <4862BB4F.2030807@gmx.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: "delay" in widget->sensitive Date: Wed, 25 Jun 2008 22:19:00 -0400 References: <153d32140806251111y2fdab60fi18ca4e363e5d1da2@mail.gmail.com> <4862BB4F.2030807@gmx.de> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 02:19:09 -0000 On Jun 25, 2008, at 5:40 PM, Torsten Schoenfeld wrote: > anguila wrote: >> When I switch between a 0= widget->is_sensitive() to a widget- >> >sensitive(1), >> the widget is put to sensitive(1) when my mouse touch this widget. >> How can I >> set inmediatly this widget to activated mode? > > I think $widget->set_sensitive(TRUE) should do the trick. > $widget->sensitive(TRUE) just sets an internal flag and does nothing > more to > actually change the widget's appearance. The usual caveat about "you must wait for the main loop to run for this to have any visible effect" applies, as the redraw is done in an idle. Also, if your mouse button is sitting inside the button's rectangle when the call to set_sensitive() happens, there's a long-standing bug that causes the visual update not to happen until you move out and come back in. http://bugzilla.gnome.org/show_bug.cgi?id=56070 -- Leia/Lois: Aren't you a little fat for a stormtrooper? Luke/Chris: Well, stay here and rot, you stuck-up bitch. -- Family Guy, "Blue Harvest" (A "Star Wars" parody) From Jhallock@WBandA.com Thu Jun 26 18:31:58 2008 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 1D0DE750106 for ; Thu, 26 Jun 2008 18:31:58 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 1.702 X-Spam-Level: * X-Spam-Status: No, score=1.702 tagged_above=-999 required=2 tests=[BAYES_50=0.001, HTML_MESSAGE=0.001, L_P0F_W=1.7] X-Amavis-OS-Fingerprint: Windows 2000 SP4, XP SP1+, (distance 13, link: sometimes DSL (3)), [12.167.152.82] 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 CrG8kmfkOez4 for ; Thu, 26 Jun 2008 18:31:53 +0000 (GMT) Received: from mail.wbanda.com (mail.wbanda.com [12.167.152.82]) by menubar.gnome.org (Postfix) with ESMTP id AF51A7500B7 for ; Thu, 26 Jun 2008 18:31:52 +0000 (GMT) Received: from wba-ex2-r2.WBA.local ([10.0.0.3]) by wba-ex2-r2.WBA.local ([10.0.0.3]) with mapi; Thu, 26 Jun 2008 14:32:23 -0400 From: Jeff Hallock To: "gtk-perl-list@gnome.org" Date: Thu, 26 Jun 2008 14:31:41 -0400 Subject: Resource for building custom models Thread-Topic: Resource for building custom models Thread-Index: AcjXuuCH+1u4uieaS1S4JGAdD/23jA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_AAF226FD7FF0E342A701E2F70D5E10BD23145C694Awbaex2r2WBAlo_" MIME-Version: 1.0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 18:31:58 -0000 --_000_AAF226FD7FF0E342A701E2F70D5E10BD23145C694Awbaex2r2WBAlo_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have a custom TreeView in which I want to implement both a filter and sor= ting functionality. Unfortunately Gtk2::TreeStore does not implement Gtk2::= TreeModelFilter. Currently, I get around this by overriding the following r= outine in my custom TreeView. sub set_model { my ($self, $model) =3D @_; $self->{model} =3D $model; $self->{filter_model} =3D Gtk2::TreeModelFilter->new($model); $self->{filter_model}->set_visible_func(\&_visible_func, $self); $self->{sort_model} =3D Gtk2::TreeModelSort->new($self->{filter_model})= ; $self->Gtk2::TreeView::set_model($self->{sort_model}); } I would like to create a custom model so I don't need to use this hack. I h= ave looked around for information on this - but it is sparse - and that I d= o find is not all that informative. Does anyone know of a resource that I c= an use to learn how to do this? --_000_AAF226FD7FF0E342A701E2F70D5E10BD23145C694Awbaex2r2WBAlo_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have a custom TreeView in which I want to implement bo= th a filter and sorting functionality. Unfortunately Gtk2::TreeStore does not implement Gtk2::TreeModelFilter. Currently, I get around this by overriding= the following routine in my custom TreeView.

 

sub set_model

{

    my ($self, $model) =3D @_;

   

    $self->{model} =3D $model;=

    $self->{filter_model} =3D Gtk2::TreeModelFilter->new($model);

    $self->{filter_model}->set_visible_func(\&_visible_func, $self);<= o:p>

    $self->{sort_model} =3D Gtk2::TreeModelSort->new($self->{filter_model});

    $self->Gtk2::TreeView::set_model($self->{sort_model});

}

 

I would like to create a custom model so I don&#= 8217;t need to use this hack. I have looked around for information on this –= but it is sparse – and that I do find is not all that informative. Does anyone know of a resource that I can use to learn how to do this?

--_000_AAF226FD7FF0E342A701E2F70D5E10BD23145C694Awbaex2r2WBAlo_-- From kaffeetisch@gmx.de Thu Jun 26 18:47:26 2008 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 8AE777500DC for ; Thu, 26 Jun 2008 18:47:26 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.185 X-Spam-Level: X-Spam-Status: No, score=-0.185 tagged_above=-999 required=2 tests=[BAYES_40=-0.185] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 1039 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 6IXAZJjDdO5P for ; Thu, 26 Jun 2008 18:46:56 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 1487A750031 for ; Thu, 26 Jun 2008 18:46:54 +0000 (GMT) Received: (qmail invoked by alias); 26 Jun 2008 18:46:52 -0000 Received: from port-212-202-35-238.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.35.238] by mail.gmx.net (mp021) with SMTP; 26 Jun 2008 20:46:52 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1/UFgc7q//UktgofCnsIyneoUMF8oduV7cUt98n3U mK8hxC7AGRTEbC Message-ID: <4863E41B.6010508@gmx.de> Date: Thu, 26 Jun 2008 20:46:51 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Resource for building custom models References: In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 18:47:26 -0000 Jeff Hallock wrote: > I have a custom TreeView in which I want to implement both a filter and > sorting functionality. Unfortunately Gtk2::TreeStore does not implement > Gtk2::TreeModelFilter. Gtk2::TreeModelFilter is not an interface that objects can implement. Gtk2::TreeModelFilter is itself a Gtk2::TreeModel with the sole purpose of wrapping another model for the purpose of filtering. Similarly for Gtk2::TreeModelSort. > Currently, I get around this by overriding the following routine in my > custom TreeView. > > sub set_model { ... } I think that's exactly how Gtk2::TreeModelFilter and Gtk2::TreeModelSort are supposed to be used. > I would like to create a custom model so I don't need to use this hack. I > have looked around for information on this - but it is sparse - and that I > do find is not all that informative. Does anyone know of a resource that I > can use to learn how to do this? For implementing custom tree models, see `perldoc Gtk2::TreeModel' and . -- Bye, -Torsten From sergstesh@yahoo.com Thu Jun 26 21:55:02 2008 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 E58CE7500CF for ; Thu, 26 Jun 2008 21:55:02 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-0.999 tagged_above=-999 required=2 tests=[BAYES_50=0.001, L_P0F_Unix=-1] X-Amavis-OS-Fingerprint: FreeBSD 6.x (1) (up: 2633 hrs), (distance 12, link: ethernet/modem), [66.163.179.83] 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 96iJMKSLlq8O for ; Thu, 26 Jun 2008 21:54:57 +0000 (GMT) Received: from web35204.mail.mud.yahoo.com (web35204.mail.mud.yahoo.com [66.163.179.83]) by menubar.gnome.org (Postfix) with SMTP id 758A1750031 for ; Thu, 26 Jun 2008 21:54:57 +0000 (GMT) Received: (qmail 69307 invoked by uid 60001); 26 Jun 2008 21:54:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=EOdYRLz2YpRsZZ+FVazF8eBTHZEAyK6y0vZqfgFJaE+7oVeDYgGo7e45JouQi8zakbfvCxyasuG4EVtVlQcu3jG9DE/hI5/evGFFZF6onyQp4CpwGTVwqnFVxfP1qhcGp5roMwwGE59M4LAdfDK/2gGN5oFyH1uZRnYYJI4fInA=; Received: from [87.69.49.127] by web35204.mail.mud.yahoo.com via HTTP; Thu, 26 Jun 2008 14:54:55 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Thu, 26 Jun 2008 14:54:55 -0700 (PDT) From: Sergei Steshenko Subject: Re: "delay" in widget->sensitive To: gtk2-perl List , muppet In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <499387.69107.qm@web35204.mail.mud.yahoo.com> X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: sergstesh@yahoo.com List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2008 21:55:03 -0000 > there's a > long-standing bug > that causes the visual update not to happen until you move > out and > come back in. > http://bugzilla.gnome.org/show_bug.cgi?id=56070 > " Opened by Manuel Clos (reporter, points: 14) 2001-06-11 18:43 UTC ". OMG. " After celebrating the 10 years birthday of GNOME, will we have to "celebrate" the 10 years birthday of this bug ? ;-) ", " 25 duplicates. ", " This trivial approach for solving the problem was rejected since gtk_widget_get_pointer() causes an additional X server roundtrip. So agreed: The patch isn't perfect. It is a hack, but it solves the problem. Well, and this is were the social aspect of the problem kicks in: Rejecting a working solution 'cause of its uglyness, without providing a better solution within years, clearly is a social problem. It's the social aspect, not the technical one, that qualifies this bug as BLOCKER - IMHO. " --Sergei. From lonelyair@gmail.com Fri Jun 27 07:47:15 2008 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 850C87500F2 for ; Fri, 27 Jun 2008 07:47:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.598 X-Spam-Level: X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 2171 hrs), (distance 15, link: (Google 2)), [209.85.132.251] 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 wY8Tahy43Ud8 for ; Fri, 27 Jun 2008 07:47:08 +0000 (GMT) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by menubar.gnome.org (Postfix) with ESMTP id CFD87750113 for ; Fri, 27 Jun 2008 07:47:07 +0000 (GMT) Received: by an-out-0708.google.com with SMTP id c3so73568ana.27 for ; Fri, 27 Jun 2008 00:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=DJ46B/1mrxhUm9h5yTvGPQTFir/qynfNC3AFZzp6QUs=; b=b6UifbE3OKSx6ERZupI8gNBb0tQTOM5HOVN3h0c0XFySxhrl3xiMi4vQh+CMK3EEkT o+1nmL//7NoNnY2v//1T0HzrAEb0rO/b6N5Q4eQO8PDlGB8du8N4wyYIbzaK/Es8eRXt AWkV+hw6SNwmFyEGIQVsN4dqR8sfS/NDsFL6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=AGJ+BaXsOzdQCa5E468W8/icV7QuUwvWxmRxJFH4UaCSdVboglaFJBY0TnwL3l79I3 Jme6/bRPTrC6Xx05phEnMmbrdwV1doS4lhJkGspo2/0bvc1tYehVz8+WJeYq964mjmi6 O8MPDxPFebj+LV1xXsm7gKNicw2/c2lTbhBrY= Received: by 10.100.41.15 with SMTP id o15mr1122291ano.48.1214552822264; Fri, 27 Jun 2008 00:47:02 -0700 (PDT) Received: by 10.100.47.20 with HTTP; Fri, 27 Jun 2008 00:47:02 -0700 (PDT) Message-ID: Date: Fri, 27 Jun 2008 15:47:02 +0800 From: "Air Kang" To: gtk-perl-list@gnome.org Subject: How to used Gtk2::GladeXML???? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20690_8348376.1214552822210" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2008 07:47:15 -0000 ------=_Part_20690_8348376.1214552822210 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline All, I am come up with the trouble, had the failed like: ---------- perl ---------- (wperl.exe:3264): libglade-WARNING **: could not find glade file 'hello.glade' Can't call method "signal_autoconnect_from_package" on an undefined value at D:\work_station\new_gtk\hello1.pl line 10. My scripts is : 1.hello.pl #!F:/Perl/bin/perl.exe -w use strict; use warnings; # for a pure gtk+ glade project use Gtk2 -init; use Gtk2::GladeXML; my $gladexml = Gtk2::GladeXML->new('hello.glade'); $gladexml->signal_autoconnect_from_package('main'); my $quitbtn = $gladexml->get_widget('Quit'); Gtk2->main; 2. hello.glade hello world True True True hello world 0 So, Why it? How to fix it? Andy ideas? Thanks, Air -- Linux>>>>>still>>>>perl ------=_Part_20690_8348376.1214552822210 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline All,

I am come up with the trouble, had the failed like:
---------- perl ----------

(wperl.exe:3264): libglade-WARNING **: could not find glade file 'hello.glade'
Can't call method "signal_autoconnect_from_package" on an undefined value at D:\work_station\new_gtk\hello1.pl line 10.

My scripts is :
1.hello.pl
#!F:/Perl/bin/perl.exe -w

use strict;
use warnings;

# for a pure gtk+ glade project
use Gtk2 -init;
use Gtk2::GladeXML;
my $gladexml = Gtk2::GladeXML->new('hello.glade');
$gladexml->signal_autoconnect_from_package('main');
my $quitbtn = $gladexml->get_widget('Quit');
Gtk2->main;

2. hello.glade
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.3 on Fri Jun 27 15:30:05 2008 -->
<glade-interface>
  <widget class="GtkWindow" id="window1">
    <property name="title" translatable="yes">hello world</property>
    <child>
      <widget class="GtkButton" id="button1">
        <property name="visible">True</property>
        <property name="can_focus">True</property>
        <property name="receives_default">True</property>
        <property name="label" translatable="yes">hello world</property>
        <property name="response_id">0</property>
      </widget>
    </child>
  </widget>
</glade-interface>

So, Why it? How to fix it?
Andy ideas?

Thanks,
Air
--
Linux>>>>>still>>>>perl ------=_Part_20690_8348376.1214552822210-- From evilynux@gmail.com Fri Jun 27 12:23:46 2008 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 092C8750097 for ; Fri, 27 Jun 2008 12:23:46 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.349 X-Spam-Level: X-Spam-Status: No, score=-2.349 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, URIBL_GREY=0.25] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 2217 hrs), (distance 16, link: (Google 2)), [209.85.132.241] 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 r3bsQ6mTQ34c for ; Fri, 27 Jun 2008 12:23:36 +0000 (GMT) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by menubar.gnome.org (Postfix) with ESMTP id 3A347750143 for ; Fri, 27 Jun 2008 12:23:35 +0000 (GMT) Received: by an-out-0708.google.com with SMTP id c3so88335ana.27 for ; Fri, 27 Jun 2008 05:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=LXuYWxW+GRuZ/p4krqYNMJ3//9Mf22oHEeDh+640WYo=; b=CqBKKdNYMCW9w262C8pi0TfvPodbkzroxR80b+VuMc6zOjfENNZEsKZjN9bGCLUh0o ETgGdDeZLSPpNO71NBD67Sk4Mg2Pp1BwOfNER06NTUCQ8hDSUO03tUfHVCt9s5gN5kHn bQIvMHP/REf8AHUWP8VK2hLsAZ4f3QeLNyvHU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TvRY8mObZFSACC4Q2jXe4g2F0QakfyBN8lahfgbPNneLKeJ/VqS9eZtJ51DHbEpK6z +TIQ0S+y6o1i3Za6VA1Fxxj9gsvMC9p2ya8luVslAange4bsX3Y9RdbYQTD6vZL8Qfc1 gur5HOnSLi7VV6rrMv0H6MJgBMAutIYfBy1Eg= Received: by 10.100.228.17 with SMTP id a17mr1434045anh.116.1214569414004; Fri, 27 Jun 2008 05:23:34 -0700 (PDT) Received: by 10.101.70.13 with HTTP; Fri, 27 Jun 2008 05:23:33 -0700 (PDT) Message-ID: <6ffb82fd0806270523o4ed4f48dpd75ccb2821c3cd4d@mail.gmail.com> Date: Fri, 27 Jun 2008 08:23:33 -0400 From: "Pascal Giard" To: "Air Kang" , gtk-perl-list@gnome.org Subject: Re: How to used Gtk2::GladeXML???? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2008 12:23:46 -0000 2008/6/27 Air Kang : > All, > > I am come up with the trouble, had the failed like: > ---------- perl ---------- > > (wperl.exe:3264): libglade-WARNING **: could not find glade file > 'hello.glade' > Can't call method "signal_autoconnect_from_package" on an undefined value= at > D:\work_station\new_gtk\hello1.pl line 10. Weird... works fine for me. Of course, hello.glade is in the same directory as hello.pl. I had to add $gladexml->get_widget('window1')->show(); in order to view the actual interface. -Pascal --=20 Homepage (http://organact.mine.nu) Debian GNU/Linux (http://www.debian.org) LACIME: =C9cole de technologie sup=E9rieure (http://lacime.etsmtl.ca) From lonelyair@gmail.com Sat Jun 28 10:46:09 2008 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 31EA3750158 for ; Sat, 28 Jun 2008 10:46:09 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: YES X-Spam-Score: 2.637 X-Spam-Level: ** X-Spam-Status: Yes, score=2.637 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, HTML_MESSAGE=0.001, MIME_BASE64_TEXT=1.753, SARE_RECV_IP_219128=1.666, TW_GT=0.077, URIBL_GREY=0.25] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 2351 hrs), (distance 13, link: (Google 2)), [209.85.142.185] 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 xt5LxUVu6SqG for ; Sat, 28 Jun 2008 10:46:01 +0000 (GMT) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.185]) by menubar.gnome.org (Postfix) with ESMTP id 8B5137500A6 for ; Sat, 28 Jun 2008 10:46:00 +0000 (GMT) Received: by ti-out-0910.google.com with SMTP id b6so791333tic.1 for ; Sat, 28 Jun 2008 03:45:58 -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:references :subject:message-id:x-mailer:mime-version:content-type; bh=Xde5AYlUScRyt/tLucY3fnGwaAvYIf+m37jX6PRTR90=; b=VvAa2/VtNgSYEHDt6IsWdI7RaRX0CJym7GH4JSPedCtUF+i/fZjAtNYepDvzKkPW5W UApMocvX+75PPdKzuMnT4130SaEUExOuNsQ4GdGz4Q9Ao804UhL2i17I6x2j7AsaoYUh jnX9mx3pKbgcIrYzQTi01CMp6di7Xm5zg0A+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:references:subject:message-id:x-mailer:mime-version :content-type; b=Hq2SsIvkvTxdlYF9RRo1LGpRlwwR+9AnbJjJ68gqvBNaeZIu20cv9Jl9pKeSnJ7WQC JP5tMdvVKY2YZKyUQOhY2PBikj0LM0f/08LXCCbavb0t8zNLPVGyOmmRV9MhECV19sPE 7oVSgNoqIQXBI4+jEn2aZRqSUolKZLSPRF+Gg= Received: by 10.110.84.3 with SMTP id h3mr2384654tib.43.1214649958688; Sat, 28 Jun 2008 03:45:58 -0700 (PDT) Received: from AKANG-WIFI ( [219.131.235.38]) by mx.google.com with ESMTPS id d1sm5148393tid.11.2008.06.28.03.45.49 (version=SSLv3 cipher=RC4-MD5); Sat, 28 Jun 2008 03:45:55 -0700 (PDT) Date: Sat, 28 Jun 2008 18:45:54 +0800 From: "lonelyair" To: "Pascal Giard" , "gtk-perl-list@gnome.org" References: , <6ffb82fd0806270523o4ed4f48dpd75ccb2821c3cd4d@mail.gmail.com> Subject: Re: Re: How to used Gtk2::GladeXML???? Message-ID: <200806281845527034479@gmail.com> X-mailer: Foxmail 6, 10, 201, 20 [cn] Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====003_Dragon477547574777_=====" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2008 10:46:09 -0000 This is a multi-part message in MIME format. --=====003_Dragon477547574777_===== Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 DQpIaSwNCg0KVGhhbmsgeW91ciBoZWxwLCBQYXNjYWwuIA0KSSBoYWQgdGhlIGNoYW5nZSBmb3Ig YWRkIGZ1bGwgcGF0aCB0byBHdGsyOjpHbGFkZVhNTC0+bmV3LA0KbGlrZToNCm15ICRnbGFkZXht bCA9IEd0azI6OkdsYWRlWE1MLT5uZXcoIkQ6XFx3b3JrX3N0YXRpb25cXG5ld19ndGtcXGhlbGxv LmdsYWRlIik7DQoNCnNvIHdvcmtzIGZpbmUgbm93LiANCg0KSSdtIHN1cmUsIHRvIGFkZCAgJGds YWRleG1sLSA+Z2V0X3dpZGdldCgnd2luZG93MScpLSA+c2hvdygpOyANCmZvciB2aWV3IGFjdHVh bCBpbnRlcmZhY2UuDQoNClRoYW5rIHlvdSB2ZXJ5IG11Y2ggYWdhaW4uDQoNCg0KU2luY2VyZWx5 LA0KDQpBaXINCg0KMjAwOC0wNi0yOCANCg0KDQoNCmxvbmVseWFpciANCg0KDQoNCreivP7Iy6O6 IFBhc2NhbCBHaWFyZCANCreiy83Ksbzko7ogMjAwOC0wNi0yNyAgMjA6MjM6NDEgDQrK1bz+yMuj uiBBaXIgS2FuZzsgZ3RrLXBlcmwtbGlzdEBnbm9tZS5vcmcgDQqzrcvNo7ogDQrW98zio7ogUmU6 IEhvdyB0byB1c2VkIEd0azI6OkdsYWRlWE1MPz8/PyANCiANCjIwMDgvNi8yNyBBaXIgS2FuZyAg PGxvbmVseWFpckBnbWFpbC5jb20gPjoNCj4gQWxsLA0KPg0KPiBJIGFtIGNvbWUgdXAgd2l0aCB0 aGUgdHJvdWJsZSwgaGFkIHRoZSBmYWlsZWQgbGlrZToNCj4gLS0tLS0tLS0tLSBwZXJsIC0tLS0t LS0tLS0NCj4NCj4gKHdwZXJsLmV4ZTozMjY0KTogbGliZ2xhZGUtV0FSTklORyAqKjogY291bGQg bm90IGZpbmQgZ2xhZGUgZmlsZQ0KPiAnaGVsbG8uZ2xhZGUnDQo+IENhbid0IGNhbGwgbWV0aG9k ICJzaWduYWxfYXV0b2Nvbm5lY3RfZnJvbV9wYWNrYWdlIiBvbiBhbiB1bmRlZmluZWQgdmFsdWUg YXQNCj4gRDpcd29ya19zdGF0aW9uXG5ld19ndGtcaGVsbG8xLnBsIGxpbmUgMTAuDQoNCldlaXJk Li4uIHdvcmtzIGZpbmUgZm9yIG1lLg0KT2YgY291cnNlLCBoZWxsby5nbGFkZSBpcyBpbiB0aGUg c2FtZSBkaXJlY3RvcnkgYXMgaGVsbG8ucGwuDQoNCkkgaGFkIHRvIGFkZCAkZ2xhZGV4bWwtID5n ZXRfd2lkZ2V0KCd3aW5kb3cxJyktID5zaG93KCk7IGluIG9yZGVyIHRvDQp2aWV3IHRoZSBhY3R1 YWwgaW50ZXJmYWNlLg0KDQotUGFzY2FsDQotLSANCkhvbWVwYWdlIChodHRwOi8vb3JnYW5hY3Qu bWluZS5udSkNCkRlYmlhbiBHTlUvTGludXggKGh0dHA6Ly93d3cuZGViaWFuLm9yZykNCkxBQ0lN RTogyWNvbGUgZGUgdGVjaG5vbG9naWUgc3Vw6XJpZXVyZSAoaHR0cDovL2xhY2ltZS5ldHNtdGwu Y2EpDQo= --=====003_Dragon477547574777_===== Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w MC42MDAwLjE2Njc0IiBuYW1lPUdFTkVSQVRPUj4NCjxTVFlMRT5AZm9udC1mYWNl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mx.de Sun Jun 29 14:25:52 2008 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 0C7887502BE for ; Sun, 29 Jun 2008 14:25:52 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.001 X-Spam-Level: X-Spam-Status: No, score=0.001 tagged_above=-999 required=2 tests=[BAYES_50=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 3) (up: 4744 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 WAtgdJYPfS-3 for ; Sun, 29 Jun 2008 14:25:44 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 6D62F750312 for ; Sun, 29 Jun 2008 14:20:53 +0000 (GMT) Received: (qmail invoked by alias); 29 Jun 2008 14:20:51 -0000 Received: from port-212-202-169-199.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.199] by mail.gmx.net (mp005) with SMTP; 29 Jun 2008 16:20:51 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX19EMPZ+Pm1EwPnuagzyiVIYnDOerpe+ZAFFCi2WpV hOtXnp5w4Mr77c Message-ID: <48679A44.80508@gmx.de> Date: Sun, 29 Jun 2008 16:20:52 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Standalone Pango X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 14:25:52 -0000 Aloha, I started working on creating a standalone version of our pango bindings. I think it's nearly complete by now, but there's at least one remaining issue. I use Chia-liang Kao's suggestion for aliasing the old Gtk2::Pango::* names to their new Pango::* counterparts: { no strict 'refs'; foreach my $key (keys %Pango::) { *{"Gtk2::Pango::" . $key} = *{"Pango::" . $key}; } } This doesn't cover Glib::Object's package-name-to-type registry, though. That means that things like Glib::Object::new ('Gtk2::Pango::Layout') or Gtk2::TreeStore->new ('Gtk2::Pango::Weight') stop working because those names are not registered with Glib anymore. As far as I can tell, simply continuing to call gperl_register_* for the old names will not work: the type registry in Glib::Object is not set up to handle anything but a one-to-one relationship between package names and types. Does anyone have any suggestion for how to solve this? -- Bye, -Torsten From kaffeetisch@gmx.de Sun Jun 29 17:21:39 2008 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 EEC0D750189 for ; Sun, 29 Jun 2008 17:21:38 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.663 X-Spam-Level: X-Spam-Status: No, score=-0.663 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, TW_VF=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1109 hrs), (distance 25, link: ethernet/modem), [213.165.64.20] 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 5PADx+R7NFRW for ; Sun, 29 Jun 2008 17:21:30 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id E2F3C7502CB for ; Sun, 29 Jun 2008 17:20:06 +0000 (GMT) Received: (qmail invoked by alias); 29 Jun 2008 17:20:04 -0000 Received: from port-212-202-169-199.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.199] by mail.gmx.net (mp031) with SMTP; 29 Jun 2008 19:20:04 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX1+3ETYp89u34by3UjAJkUpQ+iqJ0ubPMEI4bjlKcw pNCxJ0MzzGLb0x Message-ID: <4867C446.4020204@gmx.de> Date: Sun, 29 Jun 2008 19:20:06 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: cellrenderer GET_SIZE super method References: <87ej6lkt1v.fsf@blah.blah> In-Reply-To: <87ej6lkt1v.fsf@blah.blah> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------010101070302040206090309" X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 17:21:39 -0000 This is a multi-part message in MIME format. --------------010101070302040206090309 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Kevin Ryde wrote: > I struck a bit of trouble with Gtk2::Ex::Datasheet::DBI not having a > GET_SIZE method in its Gtk2::Ex::Datasheet::DBI::CellRendererText > package. (RT 36996) > > Nosing around the GtkCellRenderer.xs fallback GET_SIZE, I wondered if it > could look up through the classes of the given object instead of using > "caller". The first superclass which had class->get_size func not equal > to gtk2perl_cell_renderer_get_size would be the one to call, would it? This is actually a very long-standing problem. And your suggestion of looking for the first non-Perl class in the ancestry might very well solve most of the issues! The attached caller-v1.patch was my first attempt at this from four years (!) ago. It did seem to fix most of the problems I saw, but it fails in one important case, as muppet explained back then: you get endless loops when you have a hierarchy where a Perl class inherits from a Perl class. Something like this: ... +- GtkCellRenderer +- Foo::RendererOne +- Foo::RendererTwo When something calls the get_size vfunc on a Foo::RendererTwo, Foo::RendererTwo::GET_SIZE is invoked if present. If it's not present, or if it chains up, then Foo::RendererOne::GET_SIZE is called. If this one is not present, or if it chains up, our fallback Gtk2::CellRenderer::GET_SIZE kicks in. The fallback uses G_OBJECT_TYPE() on the object, and since G_OBJECT_TYPE() always returns the bottommost type, this yields the type of Foo::RendererTwo. The fallback then finds out that Foo::RendererOne is the parent of Foo::RendererTwo and goes on to call Foo::RendererOne::GET_SIZE which eventually gets us into Gtk2::CellRenderer::GET_SIZE again. Endless loop. So, if both subclasses either don't provide GET_SIZE or if they both chain up so that Gtk2::CellRenderer::GET_SIZE is reached, we get an endless loop with caller-v1.patch due to G_OBJECT_TYPE() always returning the bottommost type. This was the original reason of using caller() instead of simply G_OBJECT_TYPE(). But as far as I can tell, your suggestion of chaining up to the first parent that is not a Perl subclass does indeed fix this. It's implemented and tested in caller-v2.patch. The patch contains some more rationale of why I think this works. The patch also contains a FIXME comment detailing a scenario where this approach still results in an endless loop: a Perl class that inherits from a C class that inherits from a Perl class. But since this scenario is rather contrived, and since the current caller()-using code will fail in this case just as well, and since your new suggestion does fix another problem, I think we should commit caller-v2.patch. Daniel, Kevin: can you verify that caller-v2.patch fixes the Gtk2::Ex::Datasheet::DBI::CellRendererText issue even when you revert the GET_SIZE "no-op" fix you applied already? muppet: what do you think? -- Bye, -Torsten --------------010101070302040206090309 Content-Type: text/x-diff; name="caller-v1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="caller-v1.patch" Index: xs/GtkCellRenderer.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkCellRenderer.xs,v retrieving revision 1.32 diff -u -d -p -r1.32 GtkCellRenderer.xs --- xs/GtkCellRenderer.xs 7 Jan 2008 19:54:49 -0000 1.32 +++ xs/GtkCellRenderer.xs 29 Jun 2008 14:41:10 -0000 @@ -653,23 +653,16 @@ GET_SIZE (GtkCellRenderer * cell, ...) Gtk2::CellRenderer::parent_start_editing = 7 PREINIT: GtkCellRendererClass * class; - GType thisclass, parent_class; - SV * saveddefsv; + GType this, parent; PPCODE: - /* may i ask who's calling? */ - saveddefsv = newSVsv (DEFSV); - eval_pv ("$_ = caller;", 0); - thisclass = gperl_type_from_package (SvPV_nolen (DEFSV)); - SvSetSV (DEFSV, saveddefsv); - if (!thisclass) - thisclass = G_OBJECT_TYPE (cell); /* look up his parent */ - parent_class = g_type_parent (thisclass); - if (! g_type_is_a (parent_class, GTK_TYPE_CELL_RENDERER)) + this = G_OBJECT_TYPE (cell); + parent = g_type_parent (this); + if (! g_type_is_a (parent, GTK_TYPE_CELL_RENDERER)) croak ("parent of %s is not a GtkCellRenderer", - g_type_name (thisclass)); + g_type_name (this)); /* that's our boy. call one of his functions. */ - class = g_type_class_peek (parent_class); + class = g_type_class_peek (parent); switch (ix) { case 4: /* deprecated parent_get_size */ case 0: /* GET_SIZE */ --------------010101070302040206090309 Content-Type: text/x-diff; name="caller-v2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="caller-v2.patch" ? t/GtkCellRendererIface-Chaining.t Index: xs/GtkCellRenderer.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkCellRenderer.xs,v retrieving revision 1.32 diff -u -d -p -r1.32 GtkCellRenderer.xs --- xs/GtkCellRenderer.xs 7 Jan 2008 19:54:49 -0000 1.32 +++ xs/GtkCellRenderer.xs 29 Jun 2008 16:52:00 -0000 @@ -652,36 +652,63 @@ GET_SIZE (GtkCellRenderer * cell, ...) Gtk2::CellRenderer::parent_activate = 6 Gtk2::CellRenderer::parent_start_editing = 7 PREINIT: - GtkCellRendererClass * class; - GType thisclass, parent_class; - SV * saveddefsv; + GtkCellRendererClass *parent_class = NULL; + GType this, parent; PPCODE: - /* may i ask who's calling? */ - saveddefsv = newSVsv (DEFSV); - eval_pv ("$_ = caller;", 0); - thisclass = gperl_type_from_package (SvPV_nolen (DEFSV)); - SvSetSV (DEFSV, saveddefsv); - if (!thisclass) - thisclass = G_OBJECT_TYPE (cell); - /* look up his parent */ - parent_class = g_type_parent (thisclass); - if (! g_type_is_a (parent_class, GTK_TYPE_CELL_RENDERER)) - croak ("parent of %s is not a GtkCellRenderer", - g_type_name (thisclass)); - /* that's our boy. call one of his functions. */ - class = g_type_class_peek (parent_class); + /* look up the parent. + * + * FIXME: this approach runs into an endless loop with a hierarchy + * where a Perl class inherits from a C class which inherits from a + * Perl class. Like this: + * + * ... + * +- GtkCellRenderer + * +- Foo::RendererOne (Perl subclass) + * +- FooRendererTwo (C subclass) + * +- Foo::RendererThree (Perl subclass) + * + * yes, this is contrived. But possible! + */ + this = G_OBJECT_TYPE (cell); + while ((parent = g_type_parent (this))) { + if (! g_type_is_a (parent, GTK_TYPE_CELL_RENDERER)) + croak ("parent of %s is not a GtkCellRenderer", + g_type_name (this)); + + parent_class = g_type_class_peek (parent); + + /* check if this class isn't actually one of ours. if it is a + * Perl class, then we must not chain up to it: if it had a sub + * defined for the current vfunc, we wouldn't be in this + * fallback one here; so chaining up would result in the + * fallback being called again. this will lead to an endless + * loop. + * + * so, if it's not a Perl class, we're done. if it is, + * continue in the while loop to the next parent. */ + if (parent_class->get_size != gtk2perl_cell_renderer_get_size) { + break; + } + + this = parent; + } + + /* the ancestry will always contain GtkCellRenderer, so parent and + * parent_class should never be NULL. */ + assert (parent != NULL && parent_class != NULL); + switch (ix) { case 4: /* deprecated parent_get_size */ case 0: /* GET_SIZE */ - if (class->get_size) { + if (parent_class->get_size) { gint x_offset, y_offset, width, height; - class->get_size (cell, - SvGtkWidget (ST (1)), - SvGdkRectangle_ornull (ST (2)), - &x_offset, - &y_offset, - &width, - &height); + parent_class->get_size (cell, + SvGtkWidget (ST (1)), + SvGdkRectangle_ornull (ST (2)), + &x_offset, + &y_offset, + &width, + &height); EXTEND (SP, 4); PUSHs (sv_2mortal (newSViv (x_offset))); PUSHs (sv_2mortal (newSViv (y_offset))); @@ -691,41 +718,41 @@ GET_SIZE (GtkCellRenderer * cell, ...) break; case 5: /* deprecated parent_render */ case 1: /* RENDER */ - if (class->render) - class->render (cell, - SvGdkDrawable_ornull (ST (1)), /* drawable */ - SvGtkWidget_ornull (ST (2)), /* widget */ - SvGdkRectangle_ornull (ST (3)), /* background_area */ - SvGdkRectangle_ornull (ST (4)), /* cell_area */ - SvGdkRectangle_ornull (ST (5)), /* expose_area */ - SvGtkCellRendererState (ST (6))); /* flags */ + if (parent_class->render) + parent_class->render (cell, + SvGdkDrawable_ornull (ST (1)), /* drawable */ + SvGtkWidget_ornull (ST (2)), /* widget */ + SvGdkRectangle_ornull (ST (3)), /* background_area */ + SvGdkRectangle_ornull (ST (4)), /* cell_area */ + SvGdkRectangle_ornull (ST (5)), /* expose_area */ + SvGtkCellRendererState (ST (6))); /* flags */ break; case 6: /* deprecated parent_activate */ case 2: /* ACTIVATE */ - if (class->activate) { + if (parent_class->activate) { gboolean ret; - ret = class->activate (cell, - SvGdkEvent (ST (1)), - SvGtkWidget (ST (2)), - SvGChar (ST (3)), - SvGdkRectangle_ornull (ST (4)), - SvGdkRectangle_ornull (ST (5)), - SvGtkCellRendererState (ST (6))); + ret = parent_class->activate (cell, + SvGdkEvent (ST (1)), + SvGtkWidget (ST (2)), + SvGChar (ST (3)), + SvGdkRectangle_ornull (ST (4)), + SvGdkRectangle_ornull (ST (5)), + SvGtkCellRendererState (ST (6))); EXTEND (SP, 1); PUSHs (sv_2mortal (newSViv (ret))); } break; case 7: /* deprecated parent_start_editing */ case 3: /* START_EDITING */ - if (class->start_editing) { + if (parent_class->start_editing) { GtkCellEditable * editable; - editable = class->start_editing (cell, - SvGdkEvent_ornull (ST (1)), - SvGtkWidget (ST (2)), - SvGChar (ST (3)), - SvGdkRectangle_ornull (ST (4)), - SvGdkRectangle_ornull (ST (5)), - SvGtkCellRendererState (ST (6))); + editable = parent_class->start_editing (cell, + SvGdkEvent_ornull (ST (1)), + SvGtkWidget (ST (2)), + SvGChar (ST (3)), + SvGdkRectangle_ornull (ST (4)), + SvGdkRectangle_ornull (ST (5)), + SvGtkCellRendererState (ST (6))); EXTEND (SP, 1); PUSHs (sv_2mortal (newSVGtkCellEditable_ornull (editable))); } --- /dev/null 2008-04-13 20:57:27.000000000 +0200 +++ t/GtkCellRendererIface-Chaining.t 2008-06-29 18:10:19.000000000 +0200 @@ -0,0 +1,58 @@ +#!/usr/bin/perl + +# $Id$ + +use Gtk2::TestHelper tests => 2; + +package CellRendererFoo; + +use Glib::Object::Subclass + Gtk2::CellRendererText::, + ; + +our $hits = 0; + +sub GET_SIZE { + #warn __PACKAGE__; + $hits++; + if ($hits > 50) { + die 'Overflow'; + } + shift->SUPER::GET_SIZE (@_); +} + +package CellRendererBar; + +use Glib::Object::Subclass + CellRendererFoo::, + ; + +our $hits = 0; + +sub GET_SIZE { + #warn __PACKAGE__; + $hits++; + shift->SUPER::GET_SIZE (@_); +} + +package main; + +my $model = Gtk2::ListStore->new ('Glib::String'); +foreach (qw/foo fluffy flurble frob frobnitz ftang fire/) { + my $iter = $model->append; + $model->set ($iter, 0 => $_); +} + +my $view = Gtk2::TreeView->new ($model); + +my $renderer = CellRendererBar->new; +my $column = Gtk2::TreeViewColumn->new_with_attributes ('F-Words', $renderer, + text => 0); +$view->append_column ($column); + +my $window = Gtk2::Window->new; +$window->add ($view); + +ok (eval { $window->show_all; 1; }, 'no overflow'); +ok ($CellRendererFoo::hits == $CellRendererBar::hits, + 'both classes were hit just as often'); --------------010101070302040206090309-- From scott@asofyet.org Sun Jun 29 17:36:34 2008 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 7D1E07501BA for ; Sun, 29 Jun 2008 17:36:34 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 342 hrs), (distance 18, link: ethernet/modem), [208.113.200.5] 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 CK7mnDE5+RCD for ; Sun, 29 Jun 2008 17:36:27 +0000 (GMT) Received: from looneymail-a3.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 8E16F750115 for ; Sun, 29 Jun 2008 17:36:22 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id C8BE227E1F for ; Sun, 29 Jun 2008 10:36:20 -0700 (PDT) Message-Id: <1DCEA587-6AD1-400B-B339-98A821C34D56@asofyet.org> From: muppet To: gtk2-perl List In-Reply-To: <48679A44.80508@gmx.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: Standalone Pango Date: Sun, 29 Jun 2008 13:36:20 -0400 References: <48679A44.80508@gmx.de> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 17:36:34 -0000 On Jun 29, 2008, at 10:20 AM, Torsten Schoenfeld wrote: > As far as I can tell, simply continuing to call gperl_register_* for > the old > names will not work: the type registry in Glib::Object is not set up > to handle > anything but a one-to-one relationship between package names and > types. True. But we've run into this before. Here's the last bit of the BOOT section in GType.xs: /* i love nasty ugly hacks for backwards compat... Glib::UInt used * to be misspelled as Glib::Uint. by registering both names to the * same gtype, we get the mappings for two packages to one gtype, but * only one mapping (the last and correct one) from type to package. */ G_LOCK (types_by_package); g_hash_table_insert (types_by_package, "Glib::Uint", (gpointer) G_TYPE_UINT); G_UNLOCK (types_by_package); (Please note the sarcasm in the comment.) We can't use gperl_register_fundamental() here, because that would create the second backwards mapping, which screws up the one-to-one relationship from C to perl types. Instead, it assumes that the C code will always return exactly one name (the new name), and fixes up all references to the old name on the way from perl to C. We can do this in GType.xs because we're inside the Glib module and have access to those private data structures. To allow Pango to do this, we'd need to create a new set of registration APIs. For example (just spewing from the top of my head): /** * Set up package_name as a perl-level alias for gtype. */ void gperl_register_flags_alias (GType gtype, const char * package_name); or even get paranoid: /** * Set up package_name as a perl-level alias for gtype. * Verifies that preferred_name is already registered as the real package mapping for gtype. */ void gperl_register_flags_alias (GType gtype, const char * preferred_name, const char * package_name); Each of the register foo alias functions would simply to an unpaired insertion into types_by_package for foo. So, this means that code that does Glib::Object::new ('Gtk2::Pango::Layout') will create a Pango::Layout, and Gtk2::TreeStore->new ('Gtk2::Pango::Weight') will create a Pango::Weight column. When perl code asks the bindings "what type is this", the bindings will respond with the non-Gtk2 names. It should be rare, but somebody, somewhere, will be checking for exact package names, so we'll have to do extensive beta testing. We could add some @ISAs at the perl level to try to counteract this (e.g., Gtk2::Pango::Layout isa Pango::Layout), but i'm not sure how much it will help. -- Sallah! I said no camels! That's five camels! Can't you count? -- Indiana Jones From kaffeetisch@gmx.de Sun Jun 29 17:55:52 2008 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 033747502D5 for ; Sun, 29 Jun 2008 17:55:52 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_VF=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 1110 hrs), (distance 21, link: ethernet/modem), [213.165.64.20] 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 ZuZ6j+QbULLz for ; Sun, 29 Jun 2008 17:55:42 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 1CD0A7500FC for ; Sun, 29 Jun 2008 17:55:11 +0000 (GMT) Received: (qmail invoked by alias); 29 Jun 2008 17:55:10 -0000 Received: from port-212-202-169-199.dynamic.qsc.de (EHLO home.hcsiteeffak.de) [212.202.169.199] by mail.gmx.net (mp033) with SMTP; 29 Jun 2008 19:55:10 +0200 X-Authenticated: #2092818 X-Provags-ID: V01U2FsdGVkX18auEw/9UQa7CiEqbCcqtO8Y+4HiB/FwuEzWZ3p4a KZlAlzcMdiIOir Message-ID: <4867CC7F.6010402@gmx.de> Date: Sun, 29 Jun 2008 19:55:11 +0200 From: Torsten Schoenfeld User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: cellrenderer GET_SIZE super method References: <87ej6lkt1v.fsf@blah.blah> <4867C446.4020204@gmx.de> In-Reply-To: <4867C446.4020204@gmx.de> X-Enigmail-Version: 0.95.0 Content-Type: multipart/mixed; boundary="------------010207000201020904090802" X-Y-GMX-Trusted: 0 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 17:55:52 -0000 This is a multi-part message in MIME format. --------------010207000201020904090802 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Torsten Schoenfeld wrote: > But since this scenario is rather contrived, and since the current > caller()-using code will fail in this case just as well, and since your new > suggestion does fix another problem, I think we should commit caller-v2.patch. Here's caller-v3.patch which adds a test case that fails with the current caller()-using code and succeeds with the new stuff. The test is derived from the code Kevin posted on the RT issue. -- Bye, -Torsten --------------010207000201020904090802 Content-Type: text/x-diff; name="caller-v3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="caller-v3.patch" ? t/GtkCellRendererIface-Chaining.t Index: xs/GtkCellRenderer.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkCellRenderer.xs,v retrieving revision 1.32 diff -u -d -p -r1.32 GtkCellRenderer.xs --- xs/GtkCellRenderer.xs 7 Jan 2008 19:54:49 -0000 1.32 +++ xs/GtkCellRenderer.xs 29 Jun 2008 17:52:08 -0000 @@ -652,36 +652,63 @@ GET_SIZE (GtkCellRenderer * cell, ...) Gtk2::CellRenderer::parent_activate = 6 Gtk2::CellRenderer::parent_start_editing = 7 PREINIT: - GtkCellRendererClass * class; - GType thisclass, parent_class; - SV * saveddefsv; + GtkCellRendererClass *parent_class = NULL; + GType this, parent; PPCODE: - /* may i ask who's calling? */ - saveddefsv = newSVsv (DEFSV); - eval_pv ("$_ = caller;", 0); - thisclass = gperl_type_from_package (SvPV_nolen (DEFSV)); - SvSetSV (DEFSV, saveddefsv); - if (!thisclass) - thisclass = G_OBJECT_TYPE (cell); - /* look up his parent */ - parent_class = g_type_parent (thisclass); - if (! g_type_is_a (parent_class, GTK_TYPE_CELL_RENDERER)) - croak ("parent of %s is not a GtkCellRenderer", - g_type_name (thisclass)); - /* that's our boy. call one of his functions. */ - class = g_type_class_peek (parent_class); + /* look up the parent. + * + * FIXME: this approach runs into an endless loop with a hierarchy + * where a Perl class inherits from a C class which inherits from a + * Perl class. Like this: + * + * ... + * +- GtkCellRenderer + * +- Foo::RendererOne (Perl subclass) + * +- FooRendererTwo (C subclass) + * +- Foo::RendererThree (Perl subclass) + * + * yes, this is contrived. But possible! + */ + this = G_OBJECT_TYPE (cell); + while ((parent = g_type_parent (this))) { + if (! g_type_is_a (parent, GTK_TYPE_CELL_RENDERER)) + croak ("parent of %s is not a GtkCellRenderer", + g_type_name (this)); + + parent_class = g_type_class_peek (parent); + + /* check if this class isn't actually one of ours. if it is a + * Perl class, then we must not chain up to it: if it had a sub + * defined for the current vfunc, we wouldn't be in this + * fallback one here; so chaining up would result in the + * fallback being called again. this will lead to an endless + * loop. + * + * so, if it's not a Perl class, we're done. if it is, + * continue in the while loop to the next parent. */ + if (parent_class->get_size != gtk2perl_cell_renderer_get_size) { + break; + } + + this = parent; + } + + /* the ancestry will always contain GtkCellRenderer, so parent and + * parent_class should never be NULL. */ + assert (parent != NULL && parent_class != NULL); + switch (ix) { case 4: /* deprecated parent_get_size */ case 0: /* GET_SIZE */ - if (class->get_size) { + if (parent_class->get_size) { gint x_offset, y_offset, width, height; - class->get_size (cell, - SvGtkWidget (ST (1)), - SvGdkRectangle_ornull (ST (2)), - &x_offset, - &y_offset, - &width, - &height); + parent_class->get_size (cell, + SvGtkWidget (ST (1)), + SvGdkRectangle_ornull (ST (2)), + &x_offset, + &y_offset, + &width, + &height); EXTEND (SP, 4); PUSHs (sv_2mortal (newSViv (x_offset))); PUSHs (sv_2mortal (newSViv (y_offset))); @@ -691,41 +718,41 @@ GET_SIZE (GtkCellRenderer * cell, ...) break; case 5: /* deprecated parent_render */ case 1: /* RENDER */ - if (class->render) - class->render (cell, - SvGdkDrawable_ornull (ST (1)), /* drawable */ - SvGtkWidget_ornull (ST (2)), /* widget */ - SvGdkRectangle_ornull (ST (3)), /* background_area */ - SvGdkRectangle_ornull (ST (4)), /* cell_area */ - SvGdkRectangle_ornull (ST (5)), /* expose_area */ - SvGtkCellRendererState (ST (6))); /* flags */ + if (parent_class->render) + parent_class->render (cell, + SvGdkDrawable_ornull (ST (1)), /* drawable */ + SvGtkWidget_ornull (ST (2)), /* widget */ + SvGdkRectangle_ornull (ST (3)), /* background_area */ + SvGdkRectangle_ornull (ST (4)), /* cell_area */ + SvGdkRectangle_ornull (ST (5)), /* expose_area */ + SvGtkCellRendererState (ST (6))); /* flags */ break; case 6: /* deprecated parent_activate */ case 2: /* ACTIVATE */ - if (class->activate) { + if (parent_class->activate) { gboolean ret; - ret = class->activate (cell, - SvGdkEvent (ST (1)), - SvGtkWidget (ST (2)), - SvGChar (ST (3)), - SvGdkRectangle_ornull (ST (4)), - SvGdkRectangle_ornull (ST (5)), - SvGtkCellRendererState (ST (6))); + ret = parent_class->activate (cell, + SvGdkEvent (ST (1)), + SvGtkWidget (ST (2)), + SvGChar (ST (3)), + SvGdkRectangle_ornull (ST (4)), + SvGdkRectangle_ornull (ST (5)), + SvGtkCellRendererState (ST (6))); EXTEND (SP, 1); PUSHs (sv_2mortal (newSViv (ret))); } break; case 7: /* deprecated parent_start_editing */ case 3: /* START_EDITING */ - if (class->start_editing) { + if (parent_class->start_editing) { GtkCellEditable * editable; - editable = class->start_editing (cell, - SvGdkEvent_ornull (ST (1)), - SvGtkWidget (ST (2)), - SvGChar (ST (3)), - SvGdkRectangle_ornull (ST (4)), - SvGdkRectangle_ornull (ST (5)), - SvGtkCellRendererState (ST (6))); + editable = parent_class->start_editing (cell, + SvGdkEvent_ornull (ST (1)), + SvGtkWidget (ST (2)), + SvGChar (ST (3)), + SvGdkRectangle_ornull (ST (4)), + SvGdkRectangle_ornull (ST (5)), + SvGtkCellRendererState (ST (6))); EXTEND (SP, 1); PUSHs (sv_2mortal (newSVGtkCellEditable_ornull (editable))); } --- /dev/null 2008-04-13 20:57:27.000000000 +0200 +++ t/GtkCellRendererIface-Chaining.t 2008-06-29 19:49:08.000000000 +0200 @@ -0,0 +1,110 @@ +#!/usr/bin/perl + +# $Id$ + +use Gtk2::TestHelper tests => 3; + +# --------------------------------------------------------------------------- # + +package CellRendererFoo; + +use Glib::Object::Subclass + Gtk2::CellRendererText::, + ; + +our $hits = 0; + +sub GET_SIZE { + #warn __PACKAGE__; + $hits++; + if ($hits > 50) { + die 'Overflow'; + } + shift->SUPER::GET_SIZE (@_); +} + +package CellRendererBar; + +use Glib::Object::Subclass + CellRendererFoo::, + ; + +our $hits = 0; + +sub GET_SIZE { + #warn __PACKAGE__; + $hits++; + shift->SUPER::GET_SIZE (@_); +} + +# --------------------------------------------------------------------------- # + +package CellRendererEmpty; + +use Glib::Object::Subclass + Gtk2::CellRendererText::, + ; + +package ProxyDialog; + +use Glib::Object::Subclass + Gtk2::Dialog:: + ; + +sub INIT_INSTANCE { + my ($self) = @_; + + my $vbox = $self->vbox; + + my $model = Gtk2::ListStore->new ('Glib::String'); + foreach (qw/foo fluffy flurble frob frobnitz ftang fire/) { + my $iter = $model->append; + $model->set ($iter, 0 => $_); + } + + my $view = Gtk2::TreeView->new ($model); + $vbox->add ($view); + + my $renderer = CellRendererEmpty->new; + my $column = Gtk2::TreeViewColumn->new_with_attributes ('F-Words', $renderer, + text => 0); + $view->append_column ($column); + + # This eventually results in a call to CellRendererEmpty::GET_SIZE. + $self->show_all; +} + +# --------------------------------------------------------------------------- # + +package main; + +# Test that Perl renderers can chain up without endless loops ensuing. Even if +# a Perl renderer inherits from a Perl renderer. +{ + my $model = Gtk2::ListStore->new ('Glib::String'); + foreach (qw/foo fluffy flurble frob frobnitz ftang fire/) { + my $iter = $model->append; + $model->set ($iter, 0 => $_); + } + + my $view = Gtk2::TreeView->new ($model); + + my $renderer = CellRendererBar->new; + my $column = Gtk2::TreeViewColumn->new_with_attributes ('F-Words', $renderer, + text => 0); + $view->append_column ($column); + + my $window = Gtk2::Window->new; + $window->add ($view); + + ok (eval { $window->show_all; 1; }, 'no overflow'); + ok ($CellRendererFoo::hits == $CellRendererBar::hits, + 'both classes were hit just as often'); +} + +# Test that calls to vfuncs from strange places (like +# ProxyDialog::INIT_INSTANCE) don't confuse the fallback functions in +# Gtk2::CellRenderer. +{ + ok (eval { my $dialog = ProxyDialog->new; 1; }, 'no exception'); +} --------------010207000201020904090802-- From scott@asofyet.org Sun Jun 29 18:10:16 2008 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 12D3F750116 for ; Sun, 29 Jun 2008 18:10:16 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: 0.232 X-Spam-Level: X-Spam-Status: No, score=0.232 tagged_above=-999 required=2 tests=[BAYES_50=0.001, TW_GT=0.077, TW_VF=0.077, TW_YG=0.077] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 1) (up: 342 hrs), (distance 16, link: ethernet/modem), [208.113.200.5] 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 d0NdDD4fqw-j for ; Sun, 29 Jun 2008 18:10:08 +0000 (GMT) Received: from looneymail-a2.g.dreamhost.com (lax-green-bigip-5.dreamhost.com [208.113.200.5]) by menubar.gnome.org (Postfix) with ESMTP id 20B30750115 for ; Sun, 29 Jun 2008 18:10:07 +0000 (GMT) Received: from [192.168.1.101] (74-140-164-103.dhcp.insightbb.com [74.140.164.103]) by looneymail-a2.g.dreamhost.com (Postfix) with ESMTP id 5E21516EF73 for ; Sun, 29 Jun 2008 11:10:05 -0700 (PDT) Message-Id: From: muppet To: gtk2-perl List In-Reply-To: <4867C446.4020204@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: cellrenderer GET_SIZE super method Date: Sun, 29 Jun 2008 14:10:04 -0400 References: <87ej6lkt1v.fsf@blah.blah> <4867C446.4020204@gmx.de> X-Mailer: Apple Mail (2.924) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 18:10:16 -0000 On Jun 29, 2008, at 1:20 PM, Torsten Schoenfeld wrote: > But as far as I can tell, your suggestion of chaining up to the =20 > first parent > that is not a Perl subclass does indeed fix this. It's implemented =20= > and tested > in caller-v2.patch. The patch contains some more rationale of why I =20= > think > this works. The patch also contains a FIXME comment detailing a =20 > scenario > where this approach still results in an endless loop: a Perl class =20 > that > inherits from a C class that inherits from a Perl class. In case you're wondering, this sort of thing would come up when using =20= specialty embedded environments. It would be awesome if we could =20 actually take advantage of code in various languages, e.g. pygtk class =20= inheriting from a gtk2-perl class inheriting from a mono class =20 inheriting from a C class... but i don't know if anybody actually =20 *does* this in the wild. There's a solution for this sort of situation in the base_init =20 handling in GType.xs, which we needed for GStreamer to work =20 correctly. At the beginning of the call chain, create a list of =20 classes in the ancestry, and walk it on each successive call. Doing =20 that sort of thing here for cell renderer vfunc chaining would be a =20 bit painful, but might get the job done. The pedantic approach to the solutions here in CellRenderer was not =20 intended to be =FCber perfect for CellRenderers, which admittedly don't =20= really need to worry about the perl-C-perl-C problem. This was the =20 easiest practical place to hit non-signal vfunc chaining, and the =20 first place we needed to solve the problem. The approach used here =20 would be generalized into Glib to solve vfunc chaining for everybody. =20= (See also the Buildable chaining issue.) > muppet: what do you think? In the words of Dr Frederick Frankenstein, It... could... work! [1] It's very useful to write your own cell renderer, but also very =20 painful. This makes that less so, so it's good. > + /* check if this class isn't actually one of ours. if = it is a > + * Perl class, then we must not chain up to it: if it = had a sub > + * defined for the current vfunc, we wouldn't be in this > + * fallback one here; so chaining up would result in the > + * fallback being called again. this will lead to an = endless > + * loop. You might want to mention that we won't get in here for a perl class =20 because of SUPER:: in the main perl interpreter. It took me a few =20 times reading the comments and code and reacquainting myself with the =20= problem to remember that. [1] http://www.imdb.com/title/tt0072431/ -- Me: What's that in your mouth? Zella: *swallows laboriously* Nothing. Me: What did you just swallow? Zella: A booger. Me: Baby girl, don't eat boogers. That's gross. Zella: But it was in my nose. From gg@zip.com.au Sun Jun 29 23:34:15 2008 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 70B497500A3 for ; Sun, 29 Jun 2008 23:34:15 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.74 X-Spam-Level: X-Spam-Status: No, score=-0.74 tagged_above=-999 required=2 tests=[BAYES_20=-0.74] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2122 hrs), (distance 16, link: ethernet/modem), [125.255.80.128] 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 BrRtFOQ+d4eg for ; Sun, 29 Jun 2008 23:34:09 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1-9.pacific.net.au [125.255.80.128]) by menubar.gnome.org (Postfix) with ESMTP id 1B98675006C for ; Sun, 29 Jun 2008 23:34:08 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id B0A4339E91C for ; Mon, 30 Jun 2008 09:34:06 +1000 (EST) Received: from blah.blah (ppp236D.dyn.pacific.net.au [61.8.35.109]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 410E42741C for ; Mon, 30 Jun 2008 09:34:06 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KD6P8-0001fd-1G for gtk-perl-list@gnome.org; Mon, 30 Jun 2008 09:33:58 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: cellrenderer GET_SIZE super method References: <87ej6lkt1v.fsf@blah.blah> <4867C446.4020204@gmx.de> Mail-Copies-To: never Date: Mon, 30 Jun 2008 09:33:57 +1000 In-Reply-To: <4867C446.4020204@gmx.de> (Torsten Schoenfeld's message of "Sun, 29 Jun 2008 19:20:06 +0200") Message-ID: <87myl3stne.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 23:34:15 -0000 Torsten Schoenfeld writes: > > a Perl class that inherits from a C class that inherits from a Perl > class. What about a completely different attack. When creating a perl subclass, look at the superclass and see if it's perl too. If not then stick in GET_SIZE / EDITABLE / etc funcs in that superclass calling the corresponding class funcs (in that superclass). If the XSANY.any_dptr thingie pointed to the class struct then a single GET_SIZE xsub could be re-used for any class. From gg@zip.com.au Sun Jun 29 23:39:28 2008 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 035E97500C3 for ; Sun, 29 Jun 2008 23:39:28 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.522 X-Spam-Level: X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Amavis-OS-Fingerprint: Linux 2.6, seldom 2.4 (older, 4) (up: 2147 hrs), (distance 16, link: ethernet/modem), [61.8.2.230] 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 p8MmcvkJawlo for ; Sun, 29 Jun 2008 23:39:21 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2-7.pacific.net.au [61.8.2.230]) by menubar.gnome.org (Postfix) with ESMTP id D5E7A7500DC for ; Sun, 29 Jun 2008 23:39:15 +0000 (GMT) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 579DCC6420 for ; Mon, 30 Jun 2008 09:39:13 +1000 (EST) Received: from blah.blah (ppp236D.dyn.pacific.net.au [61.8.35.109]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id EA63D27408 for ; Mon, 30 Jun 2008 09:39:12 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KD6U5-0001fh-7c for gtk-perl-list@gnome.org; Mon, 30 Jun 2008 09:39:05 +1000 From: Kevin Ryde To: gtk-perl-list@gnome.org Subject: Re: Standalone Pango References: <48679A44.80508@gmx.de> Mail-Copies-To: never Date: Mon, 30 Jun 2008 09:39:05 +1000 In-Reply-To: <48679A44.80508@gmx.de> (Torsten Schoenfeld's message of "Sun, 29 Jun 2008 16:20:52 +0200") Message-ID: <87iqvrsteu.fsf@blah.blah> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.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.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2008 23:39:28 -0000 Torsten Schoenfeld writes: > > Does anyone have any suggestion for how to solve this? The "do less" approach :-). Make it initializable/runnable/etc standalone, but leave the names for now. If use standalone outside gtk is rare, as yet, then it doesn't matter much (and can always have a renaming later if/when outside uses become the majority). From anguila@gmail.com Mon Jun 30 20:01:18 2008 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 6FB027500C5 for ; Mon, 30 Jun 2008 20:01:18 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2.598 X-Spam-Level: X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001] X-Amavis-OS-Fingerprint: Linux 2.6 (newer, 2) (firewall!) (up: 9056 hrs), (distance 13, link: (Google 2)), [209.85.198.239] 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 Gap+jMxhD72H for ; Mon, 30 Jun 2008 20:01:13 +0000 (GMT) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.239]) by menubar.gnome.org (Postfix) with ESMTP id 3003475008C for ; Mon, 30 Jun 2008 20:01:13 +0000 (GMT) Received: by rv-out-0506.google.com with SMTP id f6so1386728rvb.3 for ; Mon, 30 Jun 2008 13:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=QlhshWvEIKg7hnR7Ogp3nf7KjHh+WqN+yXxQvi4d3wM=; b=HaVNyWiUJq+vbl/yoaupFFAewRYcA29HeNm7rNufE2nAeSSkDN6Hxp5M5lPipCfQaF P7ceZnXNAftuuLUoB1OA6RW5RRvZMFRS8LQCjHnUhtkgxZdIOcz0xpUFJEZZyaKPYN5m XBwYnS/2GAcv6xugws+IzJ2sxB0dRAnq2Lgi0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=oPHBch8wYh0xbbPyvWvFwhaKEvEvV8FKFtYASed/QkkTl9gcyGNU5AaEmojBl4cZSO m32SHVv9iI5Tcd/3Sz5X+Uy5G30v8SF6KDsjAP8mUcXQVFJfosGebiV2k2TwraCOsRkl ER+Z6+x2ZEXBylnrsKzRtJ38VYxLwPlMhc+f8= Received: by 10.141.4.3 with SMTP id g3mr2945841rvi.116.1214856071882; Mon, 30 Jun 2008 13:01:11 -0700 (PDT) Received: by 10.141.77.10 with HTTP; Mon, 30 Jun 2008 13:01:11 -0700 (PDT) Message-ID: <153d32140806301301p312a7d39jf5a2d3180394458f@mail.gmail.com> Date: Mon, 30 Jun 2008 22:01:11 +0200 From: anguila To: "gtk2-perl List" Subject: treeview selected row signal MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13811_5652423.1214856071871" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 20:01:18 -0000 ------=_Part_13811_5652423.1214856071871 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a treeview and when I click to one of those rows with the signal cursor-changed I can change the name of a label. Also I have 2 buttons, the first one to add a new row to the treeview and the other to remove rows. When I remove a selected row I select the row before (widget->select). When I click to the row it works, it changes the label, but when i click to the remove button, only select the row before and doesn't change the label. How can I activate the cursor changed signal when I select a row with ->select? Or is a selected row signal or atleast something like that? Thanks again. David :) ------=_Part_13811_5652423.1214856071871 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a treeview and when I click to one of those rows with the signal cursor-changed I can change the name of a label. Also I have 2 buttons, the first one to add a new row to the treeview and the other to remove rows. When I remove a selected row I select the row before (widget->select).
When I click to the row it works, it changes the label, but when i click to the remove button, only select the row before and doesn't change the label.
How can I activate the cursor changed signal when I select a row with ->select? Or is a selected row signal or atleast something like that?

Thanks again.

David :)
------=_Part_13811_5652423.1214856071871-- From sergstesh@yahoo.com Mon Jun 30 21:32:44 2008 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 B6E2F7501B9 for ; Mon, 30 Jun 2008 21:32:44 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.663 X-Spam-Level: X-Spam-Status: No, score=-1.663 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, L_P0F_Unix=-1, TW_GT=0.077] X-Amavis-OS-Fingerprint: FreeBSD 6.x (1) (up: 3356 hrs), (distance 17, link: ethernet/modem), [66.163.179.86] 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 MBDaQUjLWskY for ; Mon, 30 Jun 2008 21:32:36 +0000 (GMT) Received: from web35207.mail.mud.yahoo.com (web35207.mail.mud.yahoo.com [66.163.179.86]) by menubar.gnome.org (Postfix) with SMTP id 5AC3B7500F4 for ; Mon, 30 Jun 2008 21:32:36 +0000 (GMT) Received: (qmail 62238 invoked by uid 60001); 30 Jun 2008 21:32:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=PyAMMLVTmEMxEOpxGsd86H+x7xni9zWkTGiUgDNcPM/P9s2jh4jfbh+IOsld5rZLp66N485ILlSuTzt9R/uwB8+ZONpBrgAShN3FFAAtJFtLLBKbnHJGcUsyfP5OACbtYHEKD5W3U4XAuZXPSo8nGtH941TBwnUvfiPV0D6bZE0=; Received: from [87.69.49.127] by web35207.mail.mud.yahoo.com via HTTP; Mon, 30 Jun 2008 14:32:34 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Mon, 30 Jun 2008 14:32:34 -0700 (PDT) From: Sergei Steshenko Subject: Re: Standalone Pango To: gtk2-perl List , muppet In-Reply-To: <1DCEA587-6AD1-400B-B339-98A821C34D56@asofyet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <485541.61671.qm@web35207.mail.mud.yahoo.com> X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list Reply-To: sergstesh@yahoo.com List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 21:32:45 -0000 Applications From Scratch: http://appsfromscratch.berlios.de/ --- On Sun, 6/29/08, muppet wrote: > From: muppet > Subject: Re: Standalone Pango > To: "gtk2-perl List" > Date: Sunday, June 29, 2008, 10:36 AM > On Jun 29, 2008, at 10:20 AM, Torsten Schoenfeld wrote: > > > /* i love nasty ugly hacks for backwards compat... > Glib::UInt used > * to be misspelled as Glib::Uint. by registering both > names to the > * same gtype, we get the mappings for two packages to one > gtype, but > * only one mapping (the last and correct one) from type > to package. > */ > G_LOCK (types_by_package); > g_hash_table_insert (types_by_package, > "Glib::Uint", > (gpointer) G_TYPE_UINT); > G_UNLOCK (types_by_package); > > (Please note the sarcasm in the comment.) Is GNOME/gtk+/gtk-perl all like that ? I mean, is it the accepted practice to write ugly backward compatibility hacks instead of fixing the root cause ? Thanks, Sergei. From zentara1@sbcglobal.net Mon Jun 30 21:59:23 2008 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 E95AF75014B for ; Mon, 30 Jun 2008 21:59:23 +0000 (GMT) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -0.094 X-Spam-Level: X-Spam-Status: No, score=-0.094 tagged_above=-999 required=2 tests=[AWL=-1.203, BAYES_50=0.001, L_P0F_UNKN=0.8, TW_BW=0.077, TW_GB=0.077, TW_ZR=0.077, TW_ZZ=0.077] X-Amavis-OS-Fingerprint: UNKNOWN [65535:49:1:68:M1460, N, W1, N, N, T, N, N, ?12:.:?:?] (up: 11740 hrs), (link: ethernet/modem), [68.142.229.95] 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 Ga-h+VgX0O2Y for ; Mon, 30 Jun 2008 21:59:17 +0000 (GMT) Received: from smtp110.sbc.mail.re2.yahoo.com (smtp110.sbc.mail.re2.yahoo.com [68.142.229.95]) by menubar.gnome.org (Postfix) with SMTP id D92287500C4 for ; Mon, 30 Jun 2008 21:59:16 +0000 (GMT) Received: (qmail 72368 invoked from network); 30 Jun 2008 21:59:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:X-Mailer:Mime-Version:Content-Type; b=q+qs/2OWQ2FnmHjOH9xJHh4nKPjitpj6yGuFcVfXNQ/Q9Jlbqe9FRfCSDsRCviFXArBJZsOSO5dOpVTA7kOCOSOI+B2Gb8PfG4WdVpFAA+BKQWoL43nLenF0ZA7xvaMUiq6PNTRVaB+ZdgbMAFmV6Ja6BQkERJoUK0xaeY5TvWQ= ; Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.249.44.14 with login) by smtp110.sbc.mail.re2.yahoo.com with SMTP; 30 Jun 2008 21:59:13 -0000 X-YMail-OSG: pL0OuroVM1k_VWzOmNNbomNvi5Noqm6.qu3FaRzY4LczzZ87UvFYY0GWx24glYU7pLBIp55FVFim37F9PvoURgZVMew88nDMrTdrM9ZVkAeECE0M55r01XIj48LHZRXNSWaLjUf.Gjps_18yGgkmANXV X-Yahoo-Newman-Property: ymail-3 Date: Mon, 30 Jun 2008 17:52:30 -0400 From: zentara To: gtk-perl-list@gnome.org Subject: setting a transparent color on a pixbuf for Canvas layering Message-ID: <20080630175230.234e9fa2@zentara.zentara.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/gwhnjX2vdjOvAx3=suBLwbS" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.10 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 21:59:24 -0000 --MP_/gwhnjX2vdjOvAx3=suBLwbS Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, This question came up today on perlmonks, and it sort of piqued my interest. It concerned laying a radar weather map over a ground map. The idea was to layer the radar map over the ground map, setting a background transparency on the radar map. Well, I could do this with GD, as shown in the attached script GD-transparency-add. It has a simple $gd->transparent($green); to set green as transparent. So I used this script to change the green section of zzrgbwb.png to transparent, as zzrgbwb-gt.png. Then I load that transparent overlay over a basefile of your choice in the script transparent2, Now the REAL question is "How to do this with Gtk2's pixbuf and Image methods?" How do I take the non-transparent zzrgbwb.png , load it with Gtk2, and make green transparent without resorting to GD? Thanks, zentara -- I'm not really a human, but I play one on earth. http://zentara.net/CandyGram_for_Mongo.html --MP_/gwhnjX2vdjOvAx3=suBLwbS Content-Type: application/octet-stream; name=GD-transparency-add Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=GD-transparency-add IyEvdXNyL2Jpbi9wZXJsCnVzZSB3YXJuaW5nczsKdXNlIHN0cmljdDsKdXNlIEdEOwoKR0Q6Oklt YWdlLT50cnVlQ29sb3IoMSk7CgpteSAkaW1nX2ZpbGUgPSAnenpyZ2J3Yi5wbmcnOwoKbXkgJGdk ID0gR0Q6OkltYWdlLT5uZXcoJGltZ19maWxlKSBvciBkaWU7Cm15ICgkdywgJGgpID0gJGdkLT5n ZXRCb3VuZHMoKTsKcHJpbnQgIiR3ICRoXG4iOwoKIyBhbGxvY2F0ZSBzb21lIGNvbG9ycwpteSAk d2hpdGUgPSAkZ2QtPmNvbG9yQWxsb2NhdGUoMjU1LDI1NSwyNTUpOwpteSAkYmxhY2sgPSAkZ2Qt PmNvbG9yQWxsb2NhdGUoMCwwLDApOwpteSAkcmVkID0gJGdkLT5jb2xvckFsbG9jYXRlKDI1NSww LDApOwpteSAkZ3JlZW4gPSAkZ2QtPmNvbG9yQWxsb2NhdGUoMCwyNTUsMCk7Cm15ICRibHVlID0g JGdkLT5jb2xvckFsbG9jYXRlKDAsMCwyNTUpOwoKIyBtYWtlIHRoZSBiYWNrZ3JvdW5kIHRyYW5z cGFyZW50IGFuZCBpbnRlcmxhY2VkCiRnZC0+dHJhbnNwYXJlbnQoJGdyZWVuKTsKIyRnZC0+aW50 ZXJsYWNlZCgndHJ1ZScpOwoKCm9wZW4oR0QsICI+enpyZ2J3Yi1ndC5wbmciKSBvciBkaWU7CmJp bm1vZGUgR0Q7CnByaW50IEdEICRnZC0+cG5nOwpjbG9zZSBHRDsKCg== --MP_/gwhnjX2vdjOvAx3=suBLwbS Content-Type: image/png; name=zzrgbwb.png Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=zzrgbwb.png iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAIAAABEtEjdAAAACXBIWXMAAAsTAAALEwEAmpwYAAAg AElEQVR42u3daYwc533n8V9d3dPTM91zDykOpRlSB6nIpBYx17I3XsrHQk6ABXaDXQebF1IOrF8E m0XsbGAYQZDjRZIXBpwNNoCykQOsAiTA2oFjJHBiKJItrA+t5ZUlmrJGlsURySE5V0/P3Ud1V+2L ajZ7hj3Da4bs55nvBwJdnukiq6u6f/XUv556HifWHuju1vvep4cfluOoUlGlotVVXbmi8+e1sdF4 Tbwn/zLs4Th8SG5hXyXfKcdp7Lc4luvKcRRFchyl08rnNTioI0f0wQ/qiSd04oQGBxurnz2rT35S k5P7cYe7rnI5HTumj39czzyj8XH5viUfCr49wP46DaRSGhzU2JhOnNCHPqR6XX/xF3r11f1+Ku3p 0Wc+o898Rvk84Q7A8KD3fcWxajV2hh59VL/7u/rkJ615Qz7HFNin4lhhyG5oOHZMP/VTNr0hl2MK ABob09gY4Q4Adsnl1NNDuAOAdZJOR4Q7ANhjZUWVCuEOAHaZntbKCuEOAHaZnNTly4Q7ANhlakqv vaZ6nXAHAIuUSvryl7W8TLgDgF1eflk/+hHhDgDWNd5ffNGap3YJdwC46pVXVCwS7gBgl7NntbBA uAOAXWZmCHcAsE6tpitX7BjannAHgBbr67TcAcA69JYBAAsFAWUZALAR4Q4Atllfl2tDMBLuANCC h5gAA7TOrdNcdpxtl29+RdiqUFC5TLgDnS0pniah3Fxu/Xkcb1puhvj1KyZrWVGNxU6mp+0YG5Jw x/6I+LYB3ZrUbZdJ831octKOKZkIdwBoMTVlR9m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4ifnuffSjH3333Xc5 kACwxdzc3Pnz5x3Huf/++7PZrGHh/uyzz77wwgtra2scSABoVa/Xp6en33777StXrsRx3NPT09XV 5bpuc+69pKbtOE5zttXOmZbPieP4ueee+/SnP33n+Z68Q8dxmm91u+Vk0IbWfRFFESvuxYp8P3GP I8Zxko/lls+t67pRFMVx7Hme67r1et1xnFwuV6vVOrCDeXd39/j4+MmTJ9/3vveNj4/n83nf9x3H KZfLq6urGxsbvu8nPzl8+PDjjz/e29t7z1P+/wNV/psf3Tt5OQAAAABJRU5ErkJggg== --MP_/gwhnjX2vdjOvAx3=suBLwbS Content-Type: image/png; name=zzrgbwb-gt.png Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=zzrgbwb-gt.png iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAIAAABEtEjdAAAABnRSTlMAAAD/AADQPjN8AAAgAElE QVR4nO3da2xcZ37f8d+5zXA45PAqUrIom5R8kRyv7CJR491ma++l8CZAgTZoN2he2Lmg+yJoimTT IFgEQS4vkrxYYNOgAZzGW6AOkALdDZJFgk0Wjr1rdC9uvPXair2m12vRkiiLpDSkeB3O7Zy+OMPR kBpS4syQz5xH3w8E43g0h/zPiPzNc57nOc/jRDoAvb360If04INyHBWLKha1uqqrV3XxojY2as+J DuQ7wx6Oww/JnXIcSYoiOU7tfYsiua4cR2Eox1E6rYEBjYzo5El9+MN6/HGdPauRkdrpb76pT39a 09N34xvuusrldPq0PvlJPfOMJifl+6Zr6gzn7vvHBO5ijqNUSiMjmpjQ2bP6yEdUrerP/kyvvno3 Jnujvj599rP67Gc1MGC6lM4g3IG7lePI9xVFqlRMl9IFHn5Yv/3b+vSnTdfRMZZcgADYtyhSuWy6 iK5x+rR+5EdMF9FJrukCAKALTExoYsJ0EZ1EuAOAlMupr890EZ1EuAOApK1JR7Yg3AFAWllRsWi6 iE4i3AFAmp3VyorpIjqJcAcAaXpaH3xguohOItwBQJqZ0WuvqVo1XUfHEO4AIBUK+vKXtbxsuo6O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rOwsHDx4kXHce69995sNmu6nP3xnn322RdeeGFtbc10JQDQXarV 6uzs7DvvvHP16tUoivr6+np6elzXre+9F/dpO45T3221e7blc6Ioeu655371V3+1/XyPX6HjOPWX uttxvGhD43sRhiEnHsSJbf6bAm2KfxRv/bl1XTcMwyiKPM9zXbdarTqOk8vlKpVKF04w7+3tnZyc fPTRRz/0oQ9NTk4ODAz4vu84zubm5urq6sbGhu/78SMnTpx47LHH+vv7jaf8/wdV/psfuPxf1QAA AABJRU5ErkJggg== --MP_/gwhnjX2vdjOvAx3=suBLwbS Content-Type: application/octet-stream; name=transparent2 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=transparent2 IyEvdXNyL2Jpbi9wZXJsIC13CnVzZSBzdHJpY3Q7CnVzZSB3YXJuaW5nczsKdXNlIEdvbzo6Q2Fu dmFzOwp1c2UgR3RrMiAnLWluaXQnOwp1c2UgR2xpYiBxdyhUUlVFIEZBTFNFKTsKCm15ICR3aW5k b3cgPSBHdGsyOjpXaW5kb3ctPm5ldygndG9wbGV2ZWwnKTsKJHdpbmRvdy0+c2lnbmFsX2Nvbm5l Y3QoJ2RlbGV0ZV9ldmVudCcgPT4gc3ViIHsgR3RrMi0+bWFpbl9xdWl0OyB9KTsKJHdpbmRvdy0+ c2V0X2RlZmF1bHRfc2l6ZSg2NDAsIDYwMCk7CgpteSAkc3dpbiA9IEd0azI6OlNjcm9sbGVkV2lu ZG93LT5uZXc7CiRzd2luLT5zZXRfc2hhZG93X3R5cGUoJ2luJyk7CiR3aW5kb3ctPmFkZCgkc3dp bik7CgpteSAkY2FudmFzID0gR29vOjpDYW52YXMtPm5ldygpOwokY2FudmFzLT5zZXRfc2l6ZV9y ZXF1ZXN0KDYwMCwgNDUwKTsKJGNhbnZhcy0+c2V0X2JvdW5kcygwLCAwLCAxMDAwLCAxMDAwKTsK JHN3aW4tPmFkZCgkY2FudmFzKTsKCm15ICRyb290ID0gJGNhbnZhcy0+Z2V0X3Jvb3RfaXRlbSgp O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