From dirkvanderwalt@gmail.com Fri Dec 1 02:31:18 2006 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 67EC43B00D2 for ; Fri, 1 Dec 2006 02:31:18 -0500 (EST) 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 21630-07 for ; Fri, 1 Dec 2006 02:31:15 -0500 (EST) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.238]) by menubar.gnome.org (Postfix) with ESMTP id 3D6BB3B00A0 for ; Fri, 1 Dec 2006 02:31:14 -0500 (EST) Received: by hu-out-0506.google.com with SMTP id 27so4037226hub for ; Thu, 30 Nov 2006 23:31:13 -0800 (PST) Received: by 10.82.139.17 with SMTP id m17mr993220bud.1164958273087; Thu, 30 Nov 2006 23:31:13 -0800 (PST) Received: by 10.82.150.6 with HTTP; Thu, 30 Nov 2006 23:31:13 -0800 (PST) Message-ID: <856a994f0611302331y14ba0ec8na7acda63a89f0524@mail.gmail.com> Date: Fri, 1 Dec 2006 09:31:13 +0200 From: "Dirk vdw" To: "Vulpes Velox" Subject: Re: shaped windows In-Reply-To: <20061129153254.511f0bea@vixen42> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_569_9736664.1164958273056" References: <20061129153254.511f0bea@vixen42> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.388 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_50_60=0.134, HTML_MESSAGE=0.001, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.388 X-Spam-Level: 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: Fri, 01 Dec 2006 07:31:18 -0000 ------=_Part_569_9736664.1164958273056 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Check out the chapter on Gtk2::Gdk in the study guide also: http://forgeftp.novell.com//gtk2-perl-study/documentation/html/c1917.html You can download the sources (including all the pics ext)here: http://forgeftp.novell.com//gtk2-perl-study/homepage/ On 11/29/06, Vulpes Velox wrote: > > Any one know of a demo or the like for shaped windows under for perl > Gtk2? > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_569_9736664.1164958273056 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Check out the chapter on Gtk2::Gdk in the study guide also:

http://forgeftp.novell.com//gtk2-perl-study/documentation/html/c1917.html

You can download the sources (including all the pics ext)here:

http://forgeftp.novell.com//gtk2-perl-study/homepage/



On 11/29/06, Vulpes Velox <v.velox@vvelox.net> wrote:
Any one know of a demo or the like for shaped windows under for perl
Gtk2?
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

------=_Part_569_9736664.1164958273056-- From klicker-mail@gmx.net Fri Dec 1 09:07:06 2006 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 288DB3B00A5 for ; Fri, 1 Dec 2006 09:07:06 -0500 (EST) 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 11365-04 for ; Fri, 1 Dec 2006 09:07:02 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 0AF0C3B0122 for ; Fri, 1 Dec 2006 09:07:02 -0500 (EST) Received: (qmail invoked by alias); 01 Dec 2006 14:06:59 -0000 Received: from p213.54.159.245.tisdip.tiscali.de (EHLO [192.168.2.100]) [213.54.159.245] by mail.gmx.net (mp041) with SMTP; 01 Dec 2006 15:06:59 +0100 X-Authenticated: #5561458 Message-ID: <457036F3.70508@gmx.net> Date: Fri, 01 Dec 2006 15:06:43 +0100 From: Mario Fischer User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Win32 binaries References: <456F5FEA.6050903@nusconsulting.com.au> In-Reply-To: <456F5FEA.6050903@nusconsulting.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.314 tagged_above=-999 required=2 tests=[AWL=-1.128, BAYES_40=-0.185, SPF_PASS=-0.001] X-Spam-Score: -1.314 X-Spam-Level: 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: Fri, 01 Dec 2006 14:07:06 -0000 > Any word on some fresh Win32 binaries? Sorry for the delay. Last week has proven that studying is not always this easy ;-) However, all my tests were successful. If there are no more interruptions I will put up the page with the downloads this evening. So stay tuned! Thanks, Mario Fischer From SRS0=QnGn9K=FM=vvelox.net=v.velox@yourhostingaccount.com Fri Dec 1 22:52:56 2006 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 422393B0142 for ; Fri, 1 Dec 2006 22:52:56 -0500 (EST) 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 24734-01 for ; Fri, 1 Dec 2006 22:52:53 -0500 (EST) Received: from mailout05.yourhostingaccount.com (mailout05.yourhostingaccount.com [65.254.253.40]) by menubar.gnome.org (Postfix) with ESMTP id E3A503B00F9 for ; Fri, 1 Dec 2006 22:52:52 -0500 (EST) Received: from scan01.yourhostingaccount.com ([10.1.1.231] helo=scan01.yourhostingaccount.com) by mailout05.yourhostingaccount.com with esmtp (Exim) id 1GqLvo-0002Ub-92 for gtk-perl-list@gnome.org; Fri, 01 Dec 2006 22:52:52 -0500 Received: from authsmtp11.yourhostingaccount.com ([10.1.18.11] ident=exim) by scan01.yourhostingaccount.com with spamscanlookuphost (Exim) id 1GqLvo-0002V6-4w for gtk-perl-list@gnome.org; Fri, 01 Dec 2006 22:52:52 -0500 Received: from authsmtp11.yourhostingaccount.com ([10.1.18.11] helo=authsmtp11.yourhostingaccount.com) by scan01.yourhostingaccount.com with esmtp (Exim) id 1GqLvn-0002V3-GV for gtk-perl-list@gnome.org; Fri, 01 Dec 2006 22:52:51 -0500 Received: from [69.92.217.33] (helo=vixen42) by authsmtp11.yourhostingaccount.com with esmtpa (Exim) id 1GqLvl-0000aO-90; Fri, 01 Dec 2006 22:52:49 -0500 Date: Fri, 1 Dec 2006 21:54:29 -0600 From: Vulpes Velox To: "Dirk vdw" Subject: Re: shaped windows Message-ID: <20061201215429.594dbb66@vixen42> In-Reply-To: <856a994f0611302331y14ba0ec8na7acda63a89f0524@mail.gmail.com> References: <20061129153254.511f0bea@vixen42> <856a994f0611302331y14ba0ec8na7acda63a89f0524@mail.gmail.com> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: Vulpes Velox X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.892 tagged_above=-999 required=2 tests=[AWL=0.261, BAYES_00=-2.599, DNS_FROM_RFC_WHOIS=1.447, SPF_PASS=-0.001] X-Spam-Score: -0.892 X-Spam-Level: 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: Sat, 02 Dec 2006 03:52:56 -0000 On Fri, 1 Dec 2006 09:31:13 +0200 "Dirk vdw" wrote: > Check out the chapter on Gtk2::Gdk in the study guide also: > > http://forgeftp.novell.com//gtk2-perl-study/documentation/html/c1917.html > > You can download the sources (including all the pics ext)here: > > http://forgeftp.novell.com//gtk2-perl-study/homepage/ Cool. Much thanks. From beast@ldap.or.id Sat Dec 2 00:07:05 2006 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 790403B0075 for ; Sat, 2 Dec 2006 00:07:05 -0500 (EST) 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 27028-02 for ; Sat, 2 Dec 2006 00:07:03 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 54A473B0077 for ; Sat, 2 Dec 2006 00:07:02 -0500 (EST) Message-ID: <45710A19.3010402@ldap.or.id> Date: Sat, 02 Dec 2006 12:07:37 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: OT: building rpm file Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.82 tagged_above=-999 required=2 tests=[AWL=-1.446, BAYES_05=-1.11, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135, TW_GT=0.077, TW_PM=0.077] X-Spam-Score: -0.82 X-Spam-Level: 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, 02 Dec 2006 05:07:05 -0000 I've just got the perl-gtk tarbal, how do I make the rpm package? do I need to change something on the source? TIA. [root@devil tmp]# rpmbuild -ta Glib-1.141.tar.gz error: Name field must be present in package: (main package) error: Version field must be present in package: (main package) error: Release field must be present in package: (main package) error: Summary field must be present in package: (main package) error: Group field must be present in package: (main package) error: License field must be present in package: (main package) --beast From scott@asofyet.org Sat Dec 2 01:20:07 2006 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 ECA1F3B007A for ; Sat, 2 Dec 2006 01:20:06 -0500 (EST) 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 29428-01 for ; Sat, 2 Dec 2006 01:20:03 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-83.dreamhost.com [208.97.132.83]) by menubar.gnome.org (Postfix) with ESMTP id 8EDA13B0070 for ; Sat, 2 Dec 2006 01:20:01 -0500 (EST) Received: from [192.168.0.103] (unknown [74.140.166.209]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id DED4211328A; Fri, 1 Dec 2006 22:19:58 -0800 (PST) In-Reply-To: <45710A19.3010402@ldap.or.id> References: <45710A19.3010402@ldap.or.id> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3B7862A7-ECF2-4863-8D04-315EE3E2DACF@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: OT: building rpm file Date: Sat, 2 Dec 2006 01:20:33 -0500 To: beast X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.291 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077, TW_PM=0.077, TW_XV=0.077, TW_ZX=0.077] X-Spam-Score: -2.291 X-Spam-Level: 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: Sat, 02 Dec 2006 06:20:07 -0000 On Dec 2, 2006, at 12:07 AM, beast wrote: > I've just got the perl-gtk tarbal, how do I make the rpm package? do I > need to change something on the source? > TIA. > > [root@devil tmp]# rpmbuild -ta Glib-1.141.tar.gz > error: Name field must be present in package: (main package) > error: Version field must be present in package: (main package) > error: Release field must be present in package: (main package) > error: Summary field must be present in package: (main package) > error: Group field must be present in package: (main package) > error: License field must be present in package: (main package) In CVS there is only perl-Glib.spec.in. In Makefile.PL, a call to Glib::MakeHelper's postamble_rpm() creates a real spec file, as well as the dist-rpms and dist-srpms make targets. Pretty much all of the modules in the gtk2-perl project use this technique. So, $ tar zxvf Glib-1.141.tar.gz $ cd Glib-1.141 $ perl Makefile.PL $ make dist-rpms $ make dist-srpms will drop the rpm and srpm under $(HOME)/rpms. From scott@asofyet.org Sun Dec 3 02:36:32 2006 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 21B853B00BC; Sun, 3 Dec 2006 02:36:32 -0500 (EST) 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 30599-02; Sun, 3 Dec 2006 02:36:28 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-62.dreamhost.com [208.97.132.62]) by menubar.gnome.org (Postfix) with ESMTP id B507B3B0083; Sun, 3 Dec 2006 02:36:27 -0500 (EST) Received: from [192.168.0.103] (unknown [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id 0DCD91132C3; Sat, 2 Dec 2006 23:36:19 -0800 (PST) In-Reply-To: <1164745971.23267.3.camel@lort> References: <1164745971.23267.3.camel@lort> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/mixed; boundary=Apple-Mail-9--6862262 Message-Id: <7A1CA108-0CF2-4474-BFA5-056D96667922@asofyet.org> From: muppet Subject: Re: Perl bindings for tinymail, the first pieces Date: Sun, 3 Dec 2006 02:36:55 -0500 To: Philip Van Hoof X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.522 X-Spam-Level: Cc: gtk-perl-list@gnome.org, tinymail-devel-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, 03 Dec 2006 07:36:32 -0000 --Apple-Mail-9--6862262 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed [Cross-posted to gtk-perl-list in case anyone over there is interested in a binding project.] On Nov 28, 2006, at 3:32 PM, Philip Van Hoof wrote: > In an attempt to get people interested in Perl bindings for tinymail, > I've created the maps files of libtinymail, libtinymailui, > libtinymail-camel and libtinymailui-gtk. > > There should also be a generated maps file for the selected platform > specific library (for example for libtinymail-gnome-desktop, > libtinymail-olpc, libtinymail-maemo or libtinymail-gpe) > > I have no idea what more I should do. I have not in-depth looked at > its > documentation. I can't put a high priority on this for myself. I will > assist anybody who tries, or plans to spend some time on it. I have neither the requirements for building tinymail nor the time to devote to doing the bindings (thanks to $dayjob and family), but I'd be happy to consult anyone who wishes to. To kick things off, i have created a completely untested (not even compiled) XS implementation of TnyFolder and TnyFolderIface. I did this by copying tny-folder.h to TnyFolder.xs and hacking away. Functions that require no special work are as simple as C prototypes. The ones that gave me trouble were tny_folder_refresh_async(), which requires two callbacks but only one user data parameter, and its brother, TnyFolderIface::refresh_async_func, which must give to a perl developer an invokable handle to a C function, with user data destruction. The code is nontrivial, but mostly bog-standard XS with gtk2-perl conventions, and i've commented the truly scary parts. > Some documentation (the author in in CC of this E-mail) > > http://search.cpan.org/~tsch/Gtk2-1.141/devel.pod > http://search.cpan.org/~tsch/Gtk2-1.141/CodeGen.pm I knew that putting my name on that stuff would get me into trouble. ;-) Unfortunately, the special techniques for wrapping GInterfaces are not described in those documents, because it is, ahem, a rather manual process. I'll try to give some good info here, so pardon the length. First, a little background: The GType system has a limited reflection capability intended to support signals and properties. Some work has been done towards providing full API introspection capability, through API metadata generated at compile time and stored in an ELF section of the library; however, this work has yet to reach a usable state of completeness. Also, at the time that we created Gtk2-Perl, this work hadn't even been conceived. We chose to write the binding in plain old XS. XS is perl's eXternal Subroutine language, a mixture of C and a minilanguage that gets expanded into C code by the xsubpp program as part of perl's extension building machinery. With these tools, writing bindings for most of the GNOME stack has been quite easy. Some corner cases of the GNOME / GTK+ API style cause the amount of hand-written code to go up, but for most APIs, made of getter and setter functions with simple semantics, the bindings are rather rote. But, from a quick look at the tinymail headers, I'm afraid to say that the tinymail API leans heavily on those parts of the API style that cause the amount of hand-written code to go up: GInterfaces and GErrors. The use of GError in a function requires that you trap that value and turn it into a perl exception. There's not a good hook built into xsubpp for this, so you write the methods out by hand. It gets even messier when dealing with GErrors passed through callbacks. GInterfaces are one area of the binding that we were never able to automate satisfactorily. The basic problem is that you have to hand- roll a marshaler for every one of the members of the vtable, because there is no introspection information for them. On the other hand, this works out nicely for users, because implementing GInterfaces is actually easier and more perlish than some of the other aspects of implementing a GObject in perl. (In perl, a function that is invoked indirectly is typically given an ALLCAPSNAME. We couldn't do this for signal overrides, because these names can be anything, and have potential to collide with reserved names, such as DESTROY. But, since binding an interface is manual, the binding implementor gets a chance to fix any such name clashes.) But, now that i've said all that scary stuff, i'll also say that it's not really that hard. It'll be a fair amount of work, but there's an IRC channel (#gtk-perl on irc.gnome.org) and mailing list (gtk-perl- list@gnome.org) and lots of example code to go by, so help isn't far away. --Apple-Mail-9--6862262 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=TnyFolder.xs Content-Disposition: attachment; filename=TnyFolder.xs /* libtinymail - The Tiny Mail base library * Copyright (C) 2006-2007 Philip Van Hoof * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with self library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* This should be a master header that includes all the tinymail headers as well as gperl.h and whatever headers were generated my Makefile.PL. */ #include "tnyperl.h" /* There are a LOT of macros and bizarre-looking API constructs in here. I won't bother trying to explain them; they are documented in the perl online reference pages. See the perlxs, perlxstut, perlapi, and perlguts manpages, as well as the Glib::xsapi and Glib::devel manpages. */ /* * We must implement a GTypeInterface vtable which proxies all of the methods * up to perl code. This this will be very repetitive, but must be tuned to * this particular module, so there aren't a lot of universally useful * helper functions we can use. Perl tradition is to use C preprocessor goo. * (We have to use macros rather than inline functions everything must * manipulate a large set of stack variables defined by perl's own macro-heavy * API.) However, i've just written everything out here in the interest of * full disclosure. */ static void gerror_from_sv (SV * sv, GError **error) { /* * gperl_error_from_sv() only knows how to handle error objects, not * plain strings; but the $@ you can get from arbitrary perl code can * be just a string. So, this is a little bit annoying. */ if (SvROK (sv) && sv_derived_from (sv, "Glib::Error")) gperl_error_from_sv (sv, error); else /* g_error_new_literal() won't let us pass 0 for the domain */ g_set_error (error, 0, 0, "%s", SvPV_nolen (sv)); } static void tnyperl_folder_remove_msg (TnyFolder *self, TnyHeader *header, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVTnyHeader (header))); PUTBACK; call_method ("REMOVE_MSG", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static void tnyperl_folder_add_msg (TnyFolder *self, TnyMsg *msg, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVTnyMsg (msg))); PUTBACK; call_method ("ADD_MSG", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static void tnyperl_folder_expunge (TnyFolder *self, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("EXPUNGE", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static TnyMsgRemoveStrategy* tnyperl_folder_get_msg_remove_strategy (TnyFolder *self) { TnyMsgRemoveStrategy * retval; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("GET_MSG_REMOVE_STRATEGY", G_SCALAR); SPAGAIN; { /* The macro may evaluate its arg more than once, and we must * not call POPs more than once; use a temp. */ SV * retsv = POPs; retval = SvTnyMsgRemoveStrategy (retsv); } PUTBACK; FREETMPS; LEAVE; return retval; } static void tnyperl_folder_set_msg_remove_strategy (TnyFolder *self, TnyMsgRemoveStrategy *st) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVTnyMsgRemoveStrategy (st))); PUTBACK; call_method ("SET_MSG_REMOVE_STRATEGY", G_VOID); FREETMPS; LEAVE; } static TnyMsg* tnyperl_folder_get_msg (TnyFolder *self, TnyHeader *header, GError **err) { TnyMsg * retval; dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVTnyHeader (header))); PUTBACK; call_method ("GET_MESSAGE", G_EVAL | G_SCALAR); SPAGAIN; if (SvTRUE (ERRSV)) { gerror_from_sv (ERRSV, err); retval = NULL; } else { /* There is potential for nastiness here if the called * function returned undef without throwing a GError. * SvTnyMsg() will croak() on a bad object, and the croak * will longjmp() us out of here. Experience shows that * this tends to cause bizarre crashes by skipping stack * frames that need cleanup. However, this situation is * really a programmer error, so we'll live with it, unless * somebody wants to figure out how best to handle it here. * (I.e., if there was no exception and the value returned * is not a reference to a TnyMsg, then do you create a * GError? If so, what do you put in it?) */ SV * ret_sv = POPs; retval = SvTnyMsg (ret_sv); /* If the object returned here was newly created by the called * code, the the wrapper (pointed to by ret_sv) is the owner * of the object. In this case, there are no references to * the wrapper other than on the perl stack, and that one will * be released by the FREETMPS call, below. This is bad, as * it means the FREETMPS call will finalize the wrapper, which * will finalize the object, and we will return a dead pointer * to the caller. To avoid this highly undesirable situation, * we'll add a reference to the SV to keep it alive across * the FREETMPS call. */ if (G_OBJECT (retval)->ref_count == 1 && SvREFCNT (SvRV (ret_sv)) == 1) SvREFCNT_inc (SvRV (sv)); PUTBACK; } FREETMPS; LEAVE; return retval; } static void tnyperl_folder_get_headers (TnyFolder *self, TnyList *headers, gboolean refresh, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVTnyList (headers))); PUSHs (sv_2mortal (newSVGObject (refresh))); PUTBACK; call_method ("GET_HEADERS", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static const gchar* method_const_gchar__void (TnyFolder * self, const char * method_name) { SV * ret_sv; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method (method_name, G_SCALAR); SPAGAIN; ret_sv = POPs; /* * Watch for falling magic! As with tnyperl_folder_get_msg(), we * have an interesting lifetime management issue for the returned * value. We're supposed to return a const string, which means * that the caller will not free it. However, any string that we * return is liable to be a perl temporary. * * gperl.h defines gperl_alloc_temp(), which uses a technique from * the perl docs to allocate a mortal scalar and give back its buffer. * This gives you something that will be valid until the next garbage * collection point. Much of gtk2-perl uses this for returning * things like filenames, but it won't help much here, because * FREETMPs is a garbage collection point. * * Instead, we'll ref the scalar to ensure that it stays alive across * FREETMPs, then take back that reference. This way, if it was a * mortal scalar, it will become one again when we leave here, and * we can return a string that will be valid until the next perl * call. */ SvREFCNT_inc (ret_sv); PUTBACK; FREETMPS; LEAVE; sv_2mortal (ret_sv); return SvGChar (ret_sv); } static const gchar* tnyperl_folder_get_name (TnyFolder *self) { return method_const_gchar__void (self, "GET_NAME"); } static const gchar* tnyperl_folder_get_id (TnyFolder *self) { return method_const_gchar__void (self, "GET_ID"); } static TnyAccount* tnyperl_folder_get_account (TnyFolder *self) { TnyAccount * retval; SV * ret_sv; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("GET_ACCOUNT", G_SCALAR); SPAGAIN; /* See the comments in tnyperl_folder_get_msg() */ ret_sv = POPs; retval = SvTnyAccount (ret_sv); if (G_OBJECT (retval)->ref_count == 1 && SvREFCNT (SvRV (ret_sv)) == 1) SvREFCNT_inc (SvRV (ret_sv)); PUTBACK; FREETMPS; LEAVE; return retval; } static void tnyperl_folder_set_name (TnyFolder *self, const gchar *name, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVGChar (name))); PUTBACK; call_method ("SET_NAME", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static TnyFolderType tnyperl_folder_get_folder_type (TnyFolder *self) { TnyFolderType retval; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("GET_FOLDER_TYPE", G_SCALAR); SPAGAIN; retval = SvTnyFolderType (POPs); PUTBACK; FREETMPS; LEAVE; } static guint tnyperl_folder_get_all_count (TnyFolder *self) { guint retval; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("GET_ALL_COUNT"); SPAGAIN; retval = POPi; PUTBACK; FREETMPS; LEAVE; return retval; } static guint tnyperl_folder_get_unread_count (TnyFolder *self) { guint retval; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("GET_UNREAD_COUNT"); SPAGAIN; retval = POPi; PUTBACK; FREETMPS; LEAVE; return retval; } static gboolean tnyperl_folder_is_subscribed (TnyFolder *self) { gboolean retval; dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("IS_SUBSCRIBED"); SPAGAIN; { SV * sv_ret = POPs; retval = SvTRUE (sv_ret); } PUTBACK; FREETMPS; LEAVE; return retval; } /* For TnyFolderIface::refresh_async_func, we have some special work to do. The fact that we're getting in here means that we are marshaling to perl code that implements the interface, so we want the perl developer to be able to do stuff he understands, such as treating the callbacks as plain old perl code references. For example: sub REFRESH_ASYNC { my ($self, $callback, $status_callback, $user_data) = @_; Glib::Idle->add (sub { if ($self->_do_stuff ()) { $status_callback->($self, $self->_get_status_string, $self->_get_status, $user_data); return TRUE; # stay installed } else { $callback->($self, $self->_get_cancelled, $user_data); return FALSE; # uninstall } }); } The trouble is that the callback we're given will be a real C function, which may have been sent in by any arbitrary caller, not necessarily the tny_folder_refresh_async() binding we have below. So, we have to wrap up the callbacks in closures that will behave like real perl code references. A wrinkle is that we only have one user data parameter, which is passed to both callbacks. To do this, we'll have one environment object that contains both callback addresses and the user data pointer. We'll wrap that up in a blessed object (reference to a scalar containing the pointer address), so that we can use the object's DESTROY method to free the data. Then, we'll use references to a pair of XSUBs as the callbacks. These XSUBs will know the call signature, but will get the actual callback address and user data from the blessed user data object we created (kindof like a method call, but with the instance in the last instead of first argument. */ typedef struct { TnyRefreshFolderCallback callback; TnyRefreshFolderStatusCallback status_callback; gpointer user_data; } TnyPerlFolderIfaceRefreshCallback; static void tnyperl_folder_refresh_async (TnyFolder *self, TnyRefreshFolderCallback callback, TnyRefreshFolderStatusCallback status_callback, gpointer user_data) { dSP; HV * stash; GV * gv; SV * callback_sv; SV * status_callback_sv; SV * data_sv; TnyPerlFolderIfaceRefreshCallback * callback_data; stash = gv_stashpv ("Email::Tny::Folder::RefreshCallback", TRUE); gv = gv_fetchmeth (stash, "invoke_callback", 15, 0); callback_sv = newRV_noinc ((SV*) GvCV (gv)); gv = gv_fetchmeth (stash, "invoke_status_callback", 22, 0); status_callback_sv = newRV_noinc ((SV*) GvCV (gv)); callback_data = g_new (TnyPerlFolderIfaceRefreshCallback, 1); callback_data->callback = callback; callback_data->status_callback = status_callback; callback_data->user_data = user_data; data_sv = sv_setref_pv (newSV (), "Email::Tny::Folder::RefreshCallback", callback_data); /* This will be freed by Email::Tny::Folder::RefreshCallback::DESTROY */ ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 4); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (callback_sv)); PUSHs (sv_2mortal (status_callback_sv)); PUSHs (sv_2mortal (data_sv)); PUTBACK; call_method ("REFRESH_ASYNC", G_EVAL | G_VOID | G_DISCARD); FREETMPS; LEAVE; } static void tnyperl_folder_refresh (TnyFolder *self, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); PUSHs (sv_2mortal (newSVGObject (self))); PUTBACK; call_method ("REFRESH", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static void tnyperl_folder_transfer_msgs (TnyFolder *self, TnyList *header_list, TnyFolder *folder_dst, gboolean delete_originals, GError **err) { dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 4); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVTnyList (header_list))); PUSHs (sv_2mortal (newSVTnyFolder (folder_dst))); PUSHs (sv_2mortal (newSVbool (delete_originals))); PUTBACK; call_method ("TRANSFER_MSGS", G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } static void tnyperl_folder_iface_init (TnyFolderIface * iface) { iface->remove_msg_func = tnyperl_folder_remove_msg; iface->add_msg_func = tnyperl_folder_add_msg; iface->expunge_func = tnyperl_folder_expunge; iface->get_msg_remove_strategy_func = tnyperl_folder_get_msg_remove_strategy; iface->set_msg_remove_strategy_func = tnyperl_folder_set_msg_remove_strategy; iface->get_msg_func = tnyperl_folder_get_msg; iface->get_headers_func = tnyperl_folder_get_headers; iface->get_name_func = tnyperl_folder_get_name; iface->get_id_func = tnyperl_folder_get_id; iface->get_account_func = tnyperl_folder_get_account; iface->set_name_func = tnyperl_folder_set_name; iface->get_folder_type_func = tnyperl_folder_get_folder_type; iface->get_all_count_func = tnyperl_folder_get_all_count; iface->get_unread_count_func = tnyperl_folder_get_unread_count; iface->is_subscribed_func = tnyperl_folder_is_subscribed; iface->refresh_async_func = tnyperl_folder_refresh_async; iface->refresh_func = tnyperl_folder_refresh; iface->transfer_msgs_func = tnyperl_folder_transfer_msgs; }; /* * GPerlCallback's gperl_callback_invoke() doesn't pass G_EVAL to call_sv(), * so any exceptions would jump right past us. So, in order to work with the * GErrors on these callbacks, we can't use the built-in GPerlCallback stuff. * The only special thing about GPerlCallback is that it collects all that * (error-prone) perlapi code, so it's not as though we'll be reinventing any * heavy wizardry. */ typedef struct { SV * callback; SV * status_callback; SV * user_data; pTHX context; } RefreshAsyncMarshalData; static RefreshAsyncMarshalData * refresh_async_marshal_data_new (pTHX_ SV * callback, SV * status_callback, SV * user_data) { RefreshAsyncMarshalData * marshal_data; marshal_data = /* FIXME allocate with glib's or perl's heap? */; if (callback) marshal_data->callback = newSVsv (callback); if (status_callback) marshal_data->status_callback = newSVsv (status_callback); if (user_data) marshal_data->user_data = newSVsv (user_data); #ifdef PERL_IMPLICIT_CONTEXT /* We must ensure that no matter what thread calls, we use the perl interpreter that created the callback. */ marshal_data->context = aTHX; #endif return marshal_data; } static void tnyperl_refresh_folder_callback (TnyFolder *self, gboolean cancelled, GError **err, gpointer user_data) { RefreshAsyncMarshalData * marshal_data = user_data; if (marshal_data->callback) { dSP; #ifdef PERL_IMPLICIT_CONTEXT /* Make sure we execute on the correct interpreter! */ PERL_SET_CONTEXT (callback->context); /* If the interpreter changed, we must update the stack info */ SPAGAIN; #endif ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 2); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVbool (cancelled))); if (marshal_data->user_data) /* Note the lack of reference count mangling here; * in gperl_callback_invoke(), this same pattern * occurs. If the invoked perl code touches the * sv, it will ref and unref it correctly. */ XPUSHs (marshal_data->user_data); PUTBACK; call_sv (marshal_data->callback, G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } } static void tnyperl_refresh_folder_status_callback (TnyFolder *self, const gchar *what, gint status, gpointer user_data) { RefreshAsyncMarshalData * marshal_data = user_data; if (marshal_data->status_callback) { dSP; #ifdef PERL_IMPLICIT_CONTEXT PERL_SET_CONTEXT (callback->context); SPAGAIN; #endif ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, 3); PUSHs (sv_2mortal (newSVGObject (self))); PUSHs (sv_2mortal (newSVGChar (what))); PUSHs (sv_2mortal (newSViv (status))); if (marshal_data->user_data) /* Note the lack of reference count mangling here; * in gperl_callback_invoke(), this same pattern * occurs. If the invoked perl code touches the * sv, it will ref and unref it correctly. */ XPUSHs (marshal_data->user_data); PUTBACK; call_sv (marshal_data->callback, G_EVAL | G_VOID | G_DISCARD); if (SvTRUE (ERRSV)) gerror_from_sv (ERRSV, err); FREETMPS; LEAVE; } } MODULE = Email::Tny::Folder PACKAGE = Email::Tny::Folder PREFIX = tny_folder_ =for apidoc __hide__ When a perl-derived object declares that it wants to implement our interface, Glib::Type::register() will invoke this XSUB to add the interface to the new GTypeClass. At this point, we add the interface with a vtable that marshals all of the calls up to perl code. We specifically hide this method from the docs, because it is part of the type machinery and should never be called directly by user code. =cut void _ADD_INTERFACE (class, const char * target_class) CODE: { static const GInterfaceInfo iface_info = { (GInterfaceInitFunc) tnyperl_folder_iface_init, (GInterfaceFinalizeFunc) NULL, (gpointer) NULL }; GType gtype = gperl_object_type_from_package (target_class); g_type_add_interface_static (gtype, TNY_TYPE_FOLDER, &iface_info); } ### ### In Gtk2-Perl, the _get_type functions are handled by the type system ### glue, so we don't bind them. A GType is represented in perl by a perl ### package name. ### ## GType tny_folder_get_type (void); ## GType tny_folder_type_get_type (void); TnyMsgRemoveStrategy* tny_folder_get_msg_remove_strategy (TnyFolder *self); void tny_folder_set_msg_remove_strategy (TnyFolder *self, TnyMsgRemoveStrategy *st); =for apidoc __gerror__ =cut void tny_folder_remove_msg (TnyFolder *self, TnyHeader *header) PREINIT: GError * error = NULL; CODE: tny_folder_remove_msg (self, header, &error); if (err) gperl_croak_gerror (NULL, error); =for apidoc __gerror__ =cut void tny_folder_add_msg (TnyFolder *self, TnyMsg *msg) PREINIT: GError * error = NULL; CODE: tny_folder_add_msg (self, msg, &error); if (err) gperl_croak_gerror (NULL, error); =for apidoc __gerror__ =cut void tny_folder_expunge (TnyFolder *self, GError **err) PREINIT: GError * error = NULL; CODE: tny_folder_expunge (self, &error); if (error) gperl_croak_gerror (NULL, error); =for apidoc __gerror__ =cut TnyMsg* tny_folder_get_msg (TnyFolder *self, TnyHeader *header) PREINIT: GError * error = NULL; CODE: RETVAL = tny_folder_get_msg (self, header, &error); if (!RETVAL) gperl_croak_gerror (NULL, &error); OUTPUT: RETVAL =for apidoc __gerror__ =cut void tny_folder_get_headers (TnyFolder *self, TnyList *headers, gboolean refresh) PREINIT: GError * error = NULL; CODE: tny_folder_get_headers (self, headers, refresh, &error); if (error) gperl_croak_gerror (NULL, &error); TnyAccount* tny_folder_get_account (TnyFolder *self); const gchar* tny_folder_get_id (TnyFolder *self); const gchar* tny_folder_get_name (TnyFolder *self); =for apidoc __gerror__ =cut void tny_folder_set_name (TnyFolder *self, const gchar *name, GError **err); PREINIT: GError * error = NULL; CODE: tny_folder_set_name (self, name, &error); if (error) gperl_croak_gerror (NULL, error); TnyFolderType tny_folder_get_folder_type (TnyFolder *self); guint tny_folder_get_all_count (TnyFolder *self); guint tny_folder_get_unread_count (TnyFolder *self); gboolean tny_folder_is_subscribed (TnyFolder *self); =for apidoc =for arg callback (subroutine) =for arg status_callback (subroutine) =cut void tny_folder_refresh_async (TnyFolder *self, SV * callback, SV * status_callback, SV * user_data=NULL); PREINIT: RefreshAsyncMarshalData * marshal_data; CODE: marshal_data = refresh_async_marshal_data_new (callback, status_callback, user_data); tny_folder_refresh_async (self, tnyperl_refresh_folder_callback, tnyperl_refresh_folder_status_callback, marshal_data); /* FIXME How do we arrange the destruction of the user data? */ =for apidoc __gerror__ =cut void tny_folder_refresh (TnyFolder *self, GError **err); PREINIT: GError * error = NULL; CODE: tny_folder_refresh (self, &error); if (error) gperl_croak_gerror (NULL, error); =for apidoc __gerror__ =cut void tny_folder_transfer_msgs (TnyFolder *folder_src, TnyList *header_list, TnyFolder *folder_dst, gboolean delete_originals, GError **err); PREINIT: GError * error = NULL; CODE: tny_folder_transfer_msgs (folder_src, header_list, folder_dst, delete_originals, &error); if (error) gperl_croak_gerror (NULL, error); MODULE = Email::Tny::Folder PACKAGE = Email::Tny::Folder::RefreshCallback ## ## This package is just used as glue for TnyFolderIface::refresh_async_func. ## User code should not need to use this stuff directly. ## void invoke_callback (TnyFolder * folder, gboolean cancelled, SV * data) PREINIT: TnyPerlFolderRefreshCallback * callback; CODE: callback = INT2PTR (TnyPerlFolderRefreshCallback*, SvIV (SvRV (data))); if (!callback) croak ("Invalid data passed to the refresh callback"); callback->callback (folder, cancelled, callback->data); void invoke_status_callback (TnyFolder * folder, const char * what, gint status, SV * data) PREINIT: TnyPerlFolderRefreshCallback * callback; CODE: callback = INT2PTR (TnyPerlFolderRefreshCallback*, SvIV (SvRV (data))); if (!callback) croak ("Invalid data passed to the refresh status callback"); callback->status_callback (folder, what, status, callback->data); void DESTROY (SV * sv) PREINIT: TnyPerlFolderRefreshCallback * callback; CODE: if (!sv || !SvOK (sv) || !SvROK (sv)) return; callback = INT2PTR (TnyPerlFolderRefreshCallback*, SvIV (SvRV (sv))); g_free (callback); --Apple-Mail-9--6862262-- From kaffeetisch@gmx.de Sun Dec 3 16:50:13 2006 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 452453B0100 for ; Sun, 3 Dec 2006 16:50:13 -0500 (EST) 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 31973-06 for ; Sun, 3 Dec 2006 16:50:10 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id F2B453B0090 for ; Sun, 3 Dec 2006 16:50:08 -0500 (EST) Received: (qmail invoked by alias); 03 Dec 2006 21:50:07 -0000 Received: from port-212-202-201-229.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.229] by mail.gmx.net (mp010) with SMTP; 03 Dec 2006 22:50:07 +0100 X-Authenticated: #2092818 Subject: Re: Gtk2->show_about_dialog() bug From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: References: <2c3e73fa0611150648x1704c839y1ab47b89a2679f98@mail.gmail.com> <1163858210.4316.23.camel@localhost.localdomain> Content-Type: multipart/mixed; boundary="=-ArrBSxxx1VpDU6VMICX8" Date: Sun, 03 Dec 2006 22:50:09 +0100 Message-Id: <1165182609.4318.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.495 tagged_above=-999 required=2 tests=[AWL=0.028, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.495 X-Spam-Level: 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, 03 Dec 2006 21:50:13 -0000 --=-ArrBSxxx1VpDU6VMICX8 Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sat, 2006-11-18 at 10:23 -0500, muppet wrote: > > Any suggestions for improvements? > > I don't know if this would be an improvement, but we could move the > implementation to perl to emphasize the fact that it's just a > convenience function. > > Provided that the license and credits dialogs are made transient to > their About parent, you should be able to do something like this: OK, here's a patch that moves the implementation over to Perl and uses muppet's approach. It seemed to work in my limited testing. Please try it. If it works it might make it into tomorrow's unstable release. -- Bye, -Torsten --=-ArrBSxxx1VpDU6VMICX8 Content-Disposition: attachment; filename=about.patch Content-Type: text/x-patch; name=about.patch; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Index: Gtk2.pm =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/Gtk2.pm,v retrieving revision 1.100 diff -u -d -p -r1.100 Gtk2.pm --- Gtk2.pm 4 Sep 2006 18:37:04 -0000 1.100 +++ Gtk2.pm 3 Dec 2006 21:46:27 -0000 @@ -27,7 +27,7 @@ use 5.008; use strict; use warnings; -use Glib; +use Glib qw(TRUE FALSE); # if the gtk+ we've been compiled against is at least as new as 2.8.0, we need # to import the Cairo module for the cairo glue in gtk+ and pango. @@ -63,6 +63,60 @@ sub import { Gtk2->init if ($init); } +{ + my $global_about_dialog = undef; + my $parent_key = '_gtk2perl_about_dialog'; + + # this is implemented here rather than in xs because it's easier to + # pull off in Perl. + sub show_about_dialog { + my ($class, $parent, %props) = @_; + + my $dialog = defined $parent + ? $parent->{$parent_key} : + $global_about_dialog; + + if (!$dialog) { + $dialog = Gtk2::AboutDialog->new; + + $dialog->signal_connect(delete_event => sub { + my ($dialog) = @_; + return $dialog->hide_on_delete; + }); + + $dialog->signal_connect(response => sub { + my ($dialog) = @_; + + # we need to destroy the credits and license + # dialogs, but have no way to access them + # directly. so destroy all windows transient + # to this one. + foreach my $window (Gtk2::Window->list_toplevels) { + next if $window == $dialog; + my $parent = $window->get_transient_for; + $window->destroy if $parent && $parent == $dialog; + } + + $dialog->hide; + }); + + foreach my $name (keys %props) { + $dialog->set ($name, $props{$name}); + } + + if ($parent) { + $dialog->set_transient_for ($parent); + $dialog->set_destroy_with_parent (TRUE); + $parent->{$parent_key} = $dialog; + } + } else { + $global_about_dialog = $dialog; + } + + $dialog->present; + } +} + # this is critical -- tell dynaloader to load the module so that its # symbols are available to all other modules. without this, nobody # else can use important functions like gtk2perl_new_object! Index: t/GtkAboutDialog.t =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GtkAboutDialog.t,v retrieving revision 1.8 diff -u -d -p -r1.8 GtkAboutDialog.t --- t/GtkAboutDialog.t 29 Sep 2005 22:49:35 -0000 1.8 +++ t/GtkAboutDialog.t 3 Dec 2006 21:46:27 -0000 @@ -140,4 +140,6 @@ Gtk2->show_about_dialog (undef, name => 'Foo', version => '42', authors => [qw/me myself i/], + license => qq/Bla bla bla!/, ); +Gtk2->show_about_dialog ($dialog); Index: xs/GtkAboutDialog.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkAboutDialog.xs,v retrieving revision 1.10 diff -u -d -p -r1.10 GtkAboutDialog.xs --- xs/GtkAboutDialog.xs 29 Sep 2005 22:49:35 -0000 1.10 +++ xs/GtkAboutDialog.xs 3 Dec 2006 21:46:27 -0000 @@ -26,71 +26,6 @@ gtk2perl_about_dialog_activate_link_func gperl_callback_invoke ((GPerlCallback*)data, NULL, about, link); } -MODULE = Gtk2::AboutDialog PACKAGE = Gtk2 PREFIX = gtk_ - -=for object Gtk2::AboutDialog -=cut - -=for apidoc -=for arg first_property_name (string) -=for arg ... the rest of a list of name=>property value pairs. -This is a convenience function for showing an application's about box. The -constructed dialog is associated with the parent window and reused for -future invocations of this function. -=cut -void gtk_show_about_dialog (class, GtkWindow_ornull * parent, first_property_name, ...); - PREINIT: - static GtkWidget * global_about_dialog = NULL; - GtkWidget * dialog = NULL; - CODE: - if (parent) - dialog = g_object_get_data (G_OBJECT (parent), "gtk-about-dialog"); - else - dialog = global_about_dialog; - if (!dialog) { - int i; - - dialog = gtk_about_dialog_new (); - - g_object_ref (dialog); - gtk_object_sink (GTK_OBJECT (dialog)); - - g_signal_connect (dialog, "delete_event", - G_CALLBACK (gtk_widget_hide_on_delete), NULL); - - for (i = 2; i < items ; i+=2) { - GParamSpec * pspec; - char * name = SvPV_nolen (ST (i)); - SV * sv = ST (i + 1); - - pspec = g_object_class_find_property - (G_OBJECT_GET_CLASS (dialog), name); - if (! pspec) { - const char * classname = - gperl_object_package_from_type - (G_OBJECT_TYPE (dialog)); - croak ("type %s does not support property '%s'", - classname, name); - } else { - GValue value = {0, }; - g_value_init (&value, - G_PARAM_SPEC_VALUE_TYPE (pspec)); - gperl_value_from_sv (&value, sv); - g_object_set_property (G_OBJECT (dialog), - name, &value); - g_value_unset (&value); - } - } - if (parent) - g_object_set_data_full (G_OBJECT (parent), - "gtk-about-dialog", - dialog, g_object_unref); - else - global_about_dialog = dialog; - } - gtk_window_present (GTK_WINDOW (dialog)); - - MODULE = Gtk2::AboutDialog PACKAGE = Gtk2::AboutDialog PREFIX = gtk_about_dialog_ GtkWidget * gtk_about_dialog_new (class) @@ -265,3 +200,13 @@ gtk_about_dialog_set_url_hook (class, fu gtk2perl_about_dialog_activate_link_func, callback, (GDestroyNotify) gperl_callback_destroy); + +# Gtk2::show_about_dialog is implemented in Gtk2.pm. +=for apidoc Gtk2::show_about_dialog +=for signature Gtk2->show_about_dialog ($parent, $first_property_name, ...) +=for arg first_property_name (string) +=for arg ... the rest of a list of name=>property value pairs. +This is a convenience function for showing an application's about box. The +constructed dialog is associated with the parent window and reused for +future invocations of this function. +=cut --=-ArrBSxxx1VpDU6VMICX8-- From phil@uni-koblenz.de Mon Dec 4 10:13:02 2006 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 D8CD13B02CB for ; Mon, 4 Dec 2006 10:13:02 -0500 (EST) 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 18883-06 for ; Mon, 4 Dec 2006 10:12:58 -0500 (EST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by menubar.gnome.org (Postfix) with ESMTP id 353CB3B0293 for ; Mon, 4 Dec 2006 10:12:58 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 663EEB9176D for ; Mon, 4 Dec 2006 16:12:57 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23953-02 for ; Mon, 4 Dec 2006 16:12:55 +0100 (CET) Received: from penguin2.uni-koblenz.de (penguin2.uni-koblenz.de [141.26.64.104]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 6DB6FB8FE59 for ; Mon, 4 Dec 2006 16:12:55 +0100 (CET) Received: by penguin2.uni-koblenz.de (Postfix, from userid 5827) id 9B54D12258; Mon, 4 Dec 2006 16:12:55 +0100 (CET) Date: Mon, 4 Dec 2006 16:12:55 +0100 From: "Philipp E. Letschert" To: gtk-perl-list@gnome.org Subject: Gtk2::TreeView performance Message-ID: <20061204151255.GA14283@penguin2.uni-koblenz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Useless-Comment: "Why use Windows, since there are Doors ?" X-Operating-System: Linux penguin2 2.6.5-7.282-pseries64 User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at uni-koblenz.de X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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, 04 Dec 2006 15:13:03 -0000 Hi, I've run into some performance troubles with Gtk2::TreeView. What I do is: Read a file with a couple of ten-thousand of lines (or more), about 50 fields per line and build a hash from it. This is the data I put into a Gtk2::Liststore for the TreeView. Each row can be displayed colored, depending on a certain column value. The user can select which of the 50 columns he would like to see, after changes of this selection the whole TreeView is rebuild. To make things more complicated each column should be sortable and reorderable, and the user should be able to perform actions on selected rows. All these things work, but it is amazingly slow, once the number of rows exceeds 10000. I've done lots of experimenting and some research and found these hints: - set fixed with and fixed height did this, but no real performance gain - disable sorting while building the treeview did this via $colum->set_sortable(FALSE), but no real performance gain - write a custom cellrenderer don't really know how to do this with performance in mind, just found the cellrenderer_* examples in the docs - only load the rows into the treeview that actually fit into the window no clue how to do this It would be great if someone with a real clue could shed some light, if such a high-performance TreeView is possible with perl-gtk, and how an approach could look like. I'm afraid a possible answer could be: "No! use C++ instead". Since a solution to this problem is interesting to me I would also like to help in developing some demo code for the examples section. Thanks, Philipp From jeffrey.ratcliffe@gmail.com Mon Dec 4 10:32:31 2006 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 0B1E13B02FF for ; Mon, 4 Dec 2006 10:32:31 -0500 (EST) 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 20173-03 for ; Mon, 4 Dec 2006 10:32:28 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by menubar.gnome.org (Postfix) with ESMTP id 611003B000A for ; Mon, 4 Dec 2006 10:32:27 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so3081490ugb for ; Mon, 04 Dec 2006 07:32:26 -0800 (PST) Received: by 10.78.183.15 with SMTP id g15mr7723147huf.1165246345717; Mon, 04 Dec 2006 07:32:25 -0800 (PST) Received: by 10.78.162.17 with HTTP; Mon, 4 Dec 2006 07:32:25 -0800 (PST) Message-ID: <30e395780612040732s32f3aabepe2733459454971c0@mail.gmail.com> Date: Mon, 4 Dec 2006 16:32:25 +0100 From: "Jeffrey Ratcliffe" To: gtk-perl-list@gnome.org Subject: filechooser default button MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.6 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.6 X-Spam-Level: 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, 04 Dec 2006 15:32:31 -0000 Hi all, How do I set a filechooser up such that when I press the return key, the save button is automatically pressed? I've done a bit of googling, but found nothing relevant. Regards Jeff From squentin@free.fr Mon Dec 4 12:41:34 2006 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 2C3DB3B02DC for ; Mon, 4 Dec 2006 12:41:34 -0500 (EST) 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 28889-02 for ; Mon, 4 Dec 2006 12:41:29 -0500 (EST) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by menubar.gnome.org (Postfix) with ESMTP id 7251E3B02CF for ; Mon, 4 Dec 2006 12:41:28 -0500 (EST) Received: from [82.66.64.87] (dau94-2-82-66-64-87.fbx.proxad.net [82.66.64.87]) by smtp6-g19.free.fr (Postfix) with ESMTP id 47191438AA; Mon, 4 Dec 2006 18:41:27 +0100 (CET) Subject: Re: Gtk2::TreeView performance From: Quentin To: "Philipp E. Letschert" In-Reply-To: <20061204151255.GA14283@penguin2.uni-koblenz.de> References: <20061204151255.GA14283@penguin2.uni-koblenz.de> Content-Type: text/plain Date: Mon, 04 Dec 2006 18:41:21 +0100 Message-Id: <1165254081.4358.57.camel@squentin.homeip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.8.0-1mdv2007.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.518 tagged_above=-999 required=2 tests=[AWL=0.004, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.518 X-Spam-Level: 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, 04 Dec 2006 17:41:34 -0000 On Mon, 2006-12-04 at 16:12 +0100, Philipp E. Letschert wrote: > Hi, > > I've run into some performance troubles with Gtk2::TreeView. > > What I do is: Read a file with a couple of ten-thousand of lines (or more), > about 50 fields per line and build a hash from it. This is the data I put into a > Gtk2::Liststore for the TreeView. Each row can be displayed colored, depending > on a certain column value. The user can select which of the 50 columns he would > like to see, after changes of this selection the whole TreeView is rebuild. > > To make things more complicated each column should be sortable and reorderable, > and the user should be able to perform actions on selected rows. All these > things work, but it is amazingly slow, once the number of rows exceeds 10000. > > > I've done lots of experimenting and some research and found these hints: > > - set fixed with and fixed height > did this, but no real performance gain > - disable sorting while building the treeview > did this via $colum->set_sortable(FALSE), but no real performance gain > - write a custom cellrenderer > don't really know how to do this with performance in mind, just found the > cellrenderer_* examples in the docs > - only load the rows into the treeview that actually fit into the window > no clue how to do this > > It would be great if someone with a real clue could shed some light, if such a > high-performance TreeView is possible with perl-gtk, and how an approach could > look like. > I'm afraid a possible answer could be: "No! use C++ instead". > > Since a solution to this problem is interesting to me I would also like to help > in developing some demo code for the examples section. > I experimented quite a bit with treeview performance (with some help by muppet) for my program (gmusicbrowser). You don't need to use C/C++ to have good performance, the speed of the song list in my program doesn't depends only on the number of displayed rows. I did it some time ago, so I may have forgotten/confused some things. There is 2 distinct source of slowness: The simpler problem is caused by the auto-sizing : (it seems you got that bit) - if the column is set to auto-width, gtk2 has to compute the width of every row, which of course will be slow for a big treeview, so you have to set every column to fixed-width - Gtk2 also have to compute the height of every row (to correctly set the scrollbar), that can be prevented by setting $treeview->set('fixed-height-mode' => TRUE) The harder-to-fix problem is the filling of the ListStore. The only way to completely avoid that is to make your own ListStore, in my case all the data were already in a perl array of array. So I made a ListStore that just use the already existing perl array for storage. No filling. The only drawback is I have to tell gtk2 when the perl array has changed by calling ListStore's row_inserted/row_deleted/row_changed methods or unsetting/resetting the treeview model for a full update (but loose the treeview state). I'm sure it could be made cleaner with some Tied perl magic, but I fear it could degrade performance. A much simpler way, but that doesn't eliminate all the filling, is using a one-column ListStore that just contains the index/key for each row. Then you create columns with $treeview->insert_column_with_data_func(), which use the index/key of the row to retrieve the data from your perl arrary/hash, and set the cell properties accordingly. Using a custom CellRenderer would work the same way, but it's more suited when you want to draw things differently than with the existing CellRenderers. Both ways (custom ListStore and insert_column_with_data_func) have the advantage, that you can easily add/remove columns, without rebuilding the list. You can check my program for an axample of custom ListStore (http://squentin.free.fr/gmusicbrowser/download.html), in the gmusicbrowser_list.pm file. But be warned there is very few comments in the code, and it could use some cleanups. Feel free to ask me for more explanations. For sorting the list, I do it myself in perl, gtk2 can only sort the list on one criteria, which has to be in the ListStore. Quentin From kaffeetisch@gmx.de Mon Dec 4 15:05:29 2006 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 6798D3B00A9 for ; Mon, 4 Dec 2006 15:05:29 -0500 (EST) 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 05853-07 for ; Mon, 4 Dec 2006 15:05:23 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 627B93B00D6 for ; Mon, 4 Dec 2006 15:05:20 -0500 (EST) Received: (qmail invoked by alias); 04 Dec 2006 20:05:15 -0000 Received: from port-212-202-201-6.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.6] by mail.gmx.net (mp027) with SMTP; 04 Dec 2006 21:05:15 +0100 X-Authenticated: #2092818 Subject: Glib 1.142 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Mon, 04 Dec 2006 21:05:15 +0100 Message-Id: <1165262715.4625.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.495 tagged_above=-999 required=2 tests=[AWL=0.028, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.495 X-Spam-Level: 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, 04 Dec 2006 20:05:29 -0000 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. The source code is available from the gtk2-perl project page on sourceforge: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=91217&release_id=468681 ...and via anonymous cvs, tagged "rel-1-14-2" 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.200 ExtUtils::PkgConfig >= 1.000 Overview of changes in Glib 1.142 ================================= * Switch back to WIN32 instead of G_OS_WIN32 to avoid compilation problems. [Torsten] * Use _strtoi64 and _strtoui64 on Win32 for large integer conversion. [Serguei Trouchelle] From kaffeetisch@gmx.de Mon Dec 4 15:07:28 2006 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 AC5F03B007E for ; Mon, 4 Dec 2006 15:07:28 -0500 (EST) 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 05905-09 for ; Mon, 4 Dec 2006 15:07:24 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 10EC93B0091 for ; Mon, 4 Dec 2006 15:07:24 -0500 (EST) Received: (qmail invoked by alias); 04 Dec 2006 20:07:19 -0000 Received: from port-212-202-201-6.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.6] by mail.gmx.net (mp030) with SMTP; 04 Dec 2006 21:07:19 +0100 X-Authenticated: #2092818 Subject: Gtk2 1.150 (unstable) From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Mon, 04 Dec 2006 21:07:18 +0100 Message-Id: <1165262838.4625.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.495 tagged_above=-999 required=2 tests=[AWL=0.028, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.495 X-Spam-Level: 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, 04 Dec 2006 20:07:28 -0000 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 http://www.gtk.org , and about Gtk2-Perl at http://gtk2-perl.sourceforge.net/ . This is an unstable development release of Gtk2, containing new features and other cool stuff that have been added since the 1.14x stable series. Report any bugs to gtk-perl-list AT gnome DOT org as soon as possible. Please use the stable 1.14x series for important work. The source code is available from the gtk2-perl project page on sourceforge: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=91218&release_id=468682 ...and from anonymous cvs, tagged "rel-1-15-0" in the directory /gtk2-perl-xs/Gtk2 . This module requires these other modules and libraries: perl >= 5.8.0 Glib >= 1.140 (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.2 ExtUtils::PkgConfig >= 1.03 development headers for gtk+ and friends Overview of changes in Gtk2 1.150 ================================= * Add support for pango attributes. [Torsten] * Add support for PangoLayoutLine. [Torsten] * Add support for GdkPangoAttrEmbossColor. [Torsten] * Wrap new API: [Torsten] - gdk_window_beep - gtk_range_set_show_fill_level, gtk_range_get_show_fill_level, gtk_range_set_restrict_to_fill_level, gtk_range_get_restrict_to_fill_level, gtk_range_set_fill_level, gtk_range_get_fill_level - gtk_tree_view_set_show_expanders, gtk_tree_view_get_show_expanders, gtk_tree_view_set_level_indentation, gtk_tree_view_get_level_indentation - pango_context_set_base_gravity, pango_context_get_base_gravity, pango_context_get_gravity, pango_font_description_set_gravity, pango_font_description_get_gravity * Allow passing undef to Gtk2::Entry::set_completion. [Torsten] * Add Gtk2::Layout::bin_window. [Philipp Rumpf] * When building on Win32, also look for Cairo.lib to make linking work. [Torsten] * Fix a few test suite issues. [Torsten] From grant@mclean.net.nz Mon Dec 4 16:49:20 2006 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 CC0FF3B00B2 for ; Mon, 4 Dec 2006 16:49:20 -0500 (EST) 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 12581-07 for ; Mon, 4 Dec 2006 16:49:16 -0500 (EST) Received: from mail1.catalyst.net.nz (godel.catalyst.net.nz [202.78.240.40]) by menubar.gnome.org (Postfix) with ESMTP id BD0A63B000D for ; Mon, 4 Dec 2006 16:49:14 -0500 (EST) 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.50) id 1GrLgV-00070N-IN; Tue, 05 Dec 2006 10:49:11 +1300 Subject: Re: filechooser default button From: Grant McLean To: Jeffrey Ratcliffe In-Reply-To: <30e395780612040732s32f3aabepe2733459454971c0@mail.gmail.com> References: <30e395780612040732s32f3aabepe2733459454971c0@mail.gmail.com> Content-Type: text/plain Date: Tue, 05 Dec 2006 10:49:10 +1300 Message-Id: <1165268950.18212.1.camel@putnam.wgtn.cat-it.co.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.428 tagged_above=-999 required=2 tests=[AWL=0.036, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.428 X-Spam-Level: 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, 04 Dec 2006 21:49:21 -0000 On Mon, 2006-12-04 at 16:32 +0100, Jeffrey Ratcliffe wrote: > Hi all, > > How do I set a filechooser up such that when I press the return key, > the save button is automatically pressed? > > I've done a bit of googling, but found nothing relevant. I think what you're after is set_default_response. E.g.: my $file_chooser = Gtk2::FileChooserDialog->new( 'Open', undef, 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok' ); $file_chooser->set_default_response('ok'); Cheers Grant From jeffrey.ratcliffe@gmail.com Tue Dec 5 01:05:11 2006 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 A57B53B0003 for ; Tue, 5 Dec 2006 01:05:11 -0500 (EST) 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 04950-05 for ; Tue, 5 Dec 2006 01:05:09 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by menubar.gnome.org (Postfix) with ESMTP id A94A33B0004 for ; Tue, 5 Dec 2006 01:05:08 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so3289089ugb for ; Mon, 04 Dec 2006 22:05:08 -0800 (PST) Received: by 10.78.158.11 with SMTP id g11mr8573223hue.1165298707322; Mon, 04 Dec 2006 22:05:07 -0800 (PST) Received: by 10.78.162.17 with HTTP; Mon, 4 Dec 2006 22:05:07 -0800 (PST) Message-ID: <30e395780612042205y1dff41dco86537bdcd249cc19@mail.gmail.com> Date: Tue, 5 Dec 2006 07:05:07 +0100 From: "Jeffrey Ratcliffe" To: "Grant McLean" , gtk-perl-list@gnome.org Subject: Re: filechooser default button In-Reply-To: <1165268950.18212.1.camel@putnam.wgtn.cat-it.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <30e395780612040732s32f3aabepe2733459454971c0@mail.gmail.com> <1165268950.18212.1.camel@putnam.wgtn.cat-it.co.nz> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.042 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558, SPF_PASS=-0.001] X-Spam-Score: -1.042 X-Spam-Level: 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, 05 Dec 2006 06:05:11 -0000 On 12/4/06, Grant McLean wrote: > I think what you're after is set_default_response. E.g.: Excellent. Thanks! Jeff From phil@uni-koblenz.de Tue Dec 5 20:16:26 2006 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 A3FD23B0074 for ; Tue, 5 Dec 2006 20:16:26 -0500 (EST) 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 05148-01 for ; Tue, 5 Dec 2006 20:16:21 -0500 (EST) Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by menubar.gnome.org (Postfix) with ESMTP id E250F3B006C for ; Tue, 5 Dec 2006 20:16:20 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 2968EB9108C; Wed, 6 Dec 2006 02:16:20 +0100 (CET) Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12738-05; Wed, 6 Dec 2006 02:16:17 +0100 (CET) Received: from penguin2.uni-koblenz.de (penguin2.uni-koblenz.de [141.26.64.104]) by deliver.uni-koblenz.de (Postfix) with ESMTP id E74D2B8F5DF; Wed, 6 Dec 2006 02:16:17 +0100 (CET) Received: by penguin2.uni-koblenz.de (Postfix, from userid 5827) id 3586A12243; Wed, 6 Dec 2006 02:16:18 +0100 (CET) Date: Wed, 6 Dec 2006 02:16:17 +0100 From: "Philipp E. Letschert" To: Quentin Subject: Re: Gtk2::TreeView performance Message-ID: <20061206011617.GA18953@penguin2.uni-koblenz.de> References: <20061204151255.GA14283@penguin2.uni-koblenz.de> <1165254081.4358.57.camel@squentin.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1165254081.4358.57.camel@squentin.homeip.net> X-Useless-Comment: "Why use Windows, since there are Doors ?" X-Operating-System: Linux penguin2 2.6.5-7.282-pseries64 User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at uni-koblenz.de X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.522 X-Spam-Level: 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: Wed, 06 Dec 2006 01:16:26 -0000 On Mon, Dec 04, 2006 at 06:41:21PM +0100, Quentin wrote: > On Mon, 2006-12-04 at 16:12 +0100, Philipp E. Letschert wrote: > > Hi, > > > > I've run into some performance troubles with Gtk2::TreeView. > > > > What I do is: Read a file with a couple of ten-thousand of lines (or more), > > about 50 fields per line and build a hash from it. This is the data I put into a > > Gtk2::Liststore for the TreeView. Each row can be displayed colored, depending > > on a certain column value. The user can select which of the 50 columns he would > > like to see, after changes of this selection the whole TreeView is rebuild. > > > > To make things more complicated each column should be sortable and reorderable, > > and the user should be able to perform actions on selected rows. All these > > things work, but it is amazingly slow, once the number of rows exceeds 10000. > > > > > > I've done lots of experimenting and some research and found these hints: > > > > - set fixed with and fixed height > > did this, but no real performance gain > > - disable sorting while building the treeview > > did this via $colum->set_sortable(FALSE), but no real performance gain > > - write a custom cellrenderer > > don't really know how to do this with performance in mind, just found the > > cellrenderer_* examples in the docs > > - only load the rows into the treeview that actually fit into the window > > no clue how to do this > > > > It would be great if someone with a real clue could shed some light, if such a > > high-performance TreeView is possible with perl-gtk, and how an approach could > > look like. > > I'm afraid a possible answer could be: "No! use C++ instead". > > > > Since a solution to this problem is interesting to me I would also like to help > > in developing some demo code for the examples section. > > > > I experimented quite a bit with treeview performance (with some help by > muppet) for my program (gmusicbrowser). You don't need to use C/C++ to > have good performance, the speed of the song list in my program doesn't > depends only on the number of displayed rows. > I did it some time ago, so I may have forgotten/confused some things. > There is 2 distinct source of slowness: > > The simpler problem is caused by the auto-sizing : (it seems you got > that bit) > - if the column is set to auto-width, gtk2 has to compute the width of > every row, which of course will be slow for a big treeview, so you have > to set every column to fixed-width > - Gtk2 also have to compute the height of every row (to correctly set > the scrollbar), that can be prevented by setting > $treeview->set('fixed-height-mode' => TRUE) > > > The harder-to-fix problem is the filling of the ListStore. > > The only way to completely avoid that is to make your own ListStore, in > my case all the data were already in a perl array of array. So I made a > ListStore that just use the already existing perl array for storage. No > filling. > The only drawback is I have to tell gtk2 when the perl array has changed > by calling ListStore's row_inserted/row_deleted/row_changed methods or > unsetting/resetting the treeview model for a full update (but loose the > treeview state). > I'm sure it could be made cleaner with some Tied perl magic, but I fear > it could degrade performance. > > A much simpler way, but that doesn't eliminate all the filling, is using > a one-column ListStore that just contains the index/key for each row. > Then you create columns with $treeview->insert_column_with_data_func(), > which use the index/key of the row to retrieve the data from your perl > arrary/hash, and set the cell properties accordingly. > Using a custom CellRenderer would work the same way, but it's more > suited when you want to draw things differently than with the existing > CellRenderers. > > Both ways (custom ListStore and insert_column_with_data_func) have the > advantage, that you can easily add/remove columns, without rebuilding > the list. > > You can check my program for an axample of custom ListStore > (http://squentin.free.fr/gmusicbrowser/download.html), in the > gmusicbrowser_list.pm file. > But be warned there is very few comments in the code, and it could use > some cleanups. Feel free to ask me for more explanations. > > For sorting the list, I do it myself in perl, gtk2 can only sort the > list on one criteria, which has to be in the ListStore. > > Quentin Hey Quentin, your response was extremely helpful to me. I've downloaded gmusicbrowser and found the relevant lines, that generate the custom store for the treeview. I think this is exactly the sample code I was looking for. (I've found other things in your code to learn from as well...). I'm going to try get it working and will contact you if I run into troubles. Thx! Philipp From dkasak@nusconsulting.com.au Tue Dec 5 23:37:11 2006 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 038533B009B for ; Tue, 5 Dec 2006 23:37:11 -0500 (EST) 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 13754-05 for ; Tue, 5 Dec 2006 23:37:04 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id 76DC63B00EA for ; Tue, 5 Dec 2006 23:37:03 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.6/8.13.6) with ESMTP id kB64bHeU016770 for ; Wed, 6 Dec 2006 15:37:18 +1100 Message-ID: <457649BE.2000202@nusconsulting.com.au> Date: Wed, 06 Dec 2006 15:40:30 +1100 From: Daniel Kasak User-Agent: Thunderbird 1.5.0.8 (X11/20061127) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Automatically scrolling a ScrolledWindow Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 553286 - c7c338bb1116 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=553286&m=c7c338bb1116 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=553286&m=c7c338bb1116 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=553286&m=c7c338bb1116 X-Scanned-By: CanIt (www . roaringpenguin . com) on 10.146.0.254 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.237 tagged_above=-999 required=2 tests=[AWL=-1.052, BAYES_40=-0.185] X-Spam-Score: -1.237 X-Spam-Level: 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, 06 Dec 2006 04:37:11 -0000 Hi all. I have a big treeview that requires a scrolled window that scrolls in both directions. When editing data in the treeview, the scrolled window doesn't automatically scroll horizontally to follow the current cell, so I have to manually scroll it ( ie horizontally ) with the mouse. How do I make the scrolled window scroll horizontally when appropriate ... ie when the active cell isn't visible because it needs to be scrolled? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au From scott@asofyet.org Wed Dec 6 02:03:00 2006 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 1D2533B00D3 for ; Wed, 6 Dec 2006 02:03:00 -0500 (EST) 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 19272-08 for ; Wed, 6 Dec 2006 02:02:56 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-177.dreamhost.com [208.97.132.177]) by menubar.gnome.org (Postfix) with ESMTP id 01FB13B0009 for ; Wed, 6 Dec 2006 02:02:56 -0500 (EST) Received: from [192.168.0.103] (unknown [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id 343BE11295B; Tue, 5 Dec 2006 23:02:57 -0800 (PST) In-Reply-To: <457649BE.2000202@nusconsulting.com.au> References: <457649BE.2000202@nusconsulting.com.au> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <91FD674F-AD6C-4134-93AE-FCEB1BAA67AA@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: Automatically scrolling a ScrolledWindow Date: Wed, 6 Dec 2006 02:03:33 -0500 To: Daniel Kasak X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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: Wed, 06 Dec 2006 07:03:00 -0000 On Dec 5, 2006, at 11:40 PM, Daniel Kasak wrote: > I have a big treeview that requires a scrolled window that scrolls in > both directions. When editing data in the treeview, the scrolled > window > doesn't automatically scroll horizontally to follow the current > cell, so > I have to manually scroll it ( ie horizontally ) with the mouse. > How do > I make the scrolled window scroll horizontally when appropriate ... ie > when the active cell isn't visible because it needs to be scrolled? gtk_tree_view_scroll_to_cell() for the win! http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree- view-scroll-to-cell Make sure not to pass undef for the column, e.g. # we're already on the row, so just make sure this column is visible $tree_view->scroll_to_cell (undef, $column, FALSE, 0.0, 0.0); Remember that you can get the column, if you don't already have it, by asking for it: $column = $tree_view->get_column ($index); From john@burian.org Wed Dec 6 16:09:28 2006 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 28D693B00CB for ; Wed, 6 Dec 2006 16:09:28 -0500 (EST) 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 05140-04 for ; Wed, 6 Dec 2006 16:09:23 -0500 (EST) Received: from pilgrim.burian.org (burian.org [71.29.125.149]) by menubar.gnome.org (Postfix) with ESMTP id E0C643B0013 for ; Wed, 6 Dec 2006 16:09:22 -0500 (EST) Received: from burian.org (pilgrim.burian.org [192.168.0.1]) by pilgrim.burian.org (Postfix) with ESMTP id AD2AC1BF26 for ; Wed, 6 Dec 2006 16:09:19 -0500 (EST) Message-ID: <4577317F.9040709@burian.org> Date: Wed, 06 Dec 2006 16:09:19 -0500 From: "John M. Burian" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040127 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: gtk-perl-list@gnome.org Subject: SIgnal connect to a object method? References: <457649BE.2000202@nusconsulting.com.au> <91FD674F-AD6C-4134-93AE-FCEB1BAA67AA@asofyet.org> In-Reply-To: <91FD674F-AD6C-4134-93AE-FCEB1BAA67AA@asofyet.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.225 tagged_above=-999 required=2 tests=[AWL=-0.117, BAYES_40=-0.185, TW_GT=0.077] X-Spam-Score: -0.225 X-Spam-Level: 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, 06 Dec 2006 21:09:28 -0000 This is probably more of a syntax question than a gtk-perl question, but: Can I have signal_connect call an object method? Say I've got a class that contains an object method 'bar'; 'foo' is an object of this class, and I've got a combobox 'cbox'. I want to $cbox->signal_connect (changed => $foo->bar); but that doesn't work, because it executes $foo->bar right away, instead of when the signal arrives. I've tried playing with the syntax a bit, and no luck. John From grant@mclean.net.nz Wed Dec 6 16:31:42 2006 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 639693B0094 for ; Wed, 6 Dec 2006 16:31:42 -0500 (EST) 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 06598-02 for ; Wed, 6 Dec 2006 16:31:37 -0500 (EST) Received: from mail1.catalyst.net.nz (godel.catalyst.net.nz [202.78.240.40]) by menubar.gnome.org (Postfix) with ESMTP id 888C13B0009 for ; Wed, 6 Dec 2006 16:31:36 -0500 (EST) 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.50) id 1Gs4MY-0000zk-3R; Thu, 07 Dec 2006 10:31:34 +1300 Subject: Re: SIgnal connect to a object method? From: Grant McLean To: "John M. Burian" In-Reply-To: <4577317F.9040709@burian.org> References: <457649BE.2000202@nusconsulting.com.au> <91FD674F-AD6C-4134-93AE-FCEB1BAA67AA@asofyet.org> <4577317F.9040709@burian.org> Content-Type: text/plain Date: Thu, 07 Dec 2006 10:31:33 +1300 Message-Id: <1165440693.28880.10.camel@putnam.wgtn.cat-it.co.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.646 tagged_above=-999 required=2 tests=[AWL=-0.748, BAYES_05=-1.11, FORGED_RCVD_HELO=0.135, TW_GT=0.077] X-Spam-Score: -1.646 X-Spam-Level: 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: Wed, 06 Dec 2006 21:31:42 -0000 On Wed, 2006-12-06 at 16:09 -0500, John M. Burian wrote: > This is probably more of a syntax question than a gtk-perl question, but: > > Can I have signal_connect call an object method? Say I've got a class > that contains an object method 'bar'; 'foo' is an object of this class, > and I've got a combobox 'cbox'. I want to > > $cbox->signal_connect (changed => $foo->bar); What you want is a 'closure': $cbox->signal_connect (changed => sub { $foo->bar(@_) } ); This creates an anonymous subroutine that retains visibility to lexical variables from the scope in which it was declared. Regards Grant From dkasak@nusconsulting.com.au Wed Dec 6 21:33:42 2006 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 EEE2E3B00CB for ; Wed, 6 Dec 2006 21:33:41 -0500 (EST) 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 23580-01 for ; Wed, 6 Dec 2006 21:33:35 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id 7CA123B018A for ; Wed, 6 Dec 2006 21:33:33 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.6/8.13.6) with ESMTP id kB72XYP5025901; Thu, 7 Dec 2006 13:33:34 +1100 Message-ID: <45777E43.3090008@nusconsulting.com.au> Date: Thu, 07 Dec 2006 13:36:51 +1100 From: Daniel Kasak User-Agent: Thunderbird 1.5.0.8 (X11/20061127) MIME-Version: 1.0 To: muppet Subject: Re: Automatically scrolling a ScrolledWindow References: <457649BE.2000202@nusconsulting.com.au> <91FD674F-AD6C-4134-93AE-FCEB1BAA67AA@asofyet.org> In-Reply-To: <91FD674F-AD6C-4134-93AE-FCEB1BAA67AA@asofyet.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 553737 - 29e022ff006a X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=553737&m=29e022ff006a X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=553737&m=29e022ff006a X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=553737&m=29e022ff006a X-Scanned-By: CanIt (www . roaringpenguin . com) on 10.146.0.254 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.441 tagged_above=-999 required=2 tests=[AWL=0.158, BAYES_00=-2.599] X-Spam-Score: -2.441 X-Spam-Level: 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: Thu, 07 Dec 2006 02:33:42 -0000 muppet wrote: > On Dec 5, 2006, at 11:40 PM, Daniel Kasak wrote: > >> I have a big treeview that requires a scrolled window that scrolls in >> both directions. When editing data in the treeview, the scrolled window >> doesn't automatically scroll horizontally to follow the current cell, so >> I have to manually scroll it ( ie horizontally ) with the mouse. How do >> I make the scrolled window scroll horizontally when appropriate ... ie >> when the active cell isn't visible because it needs to be scrolled? > > > gtk_tree_view_scroll_to_cell() for the win! > > http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-scroll-to-cell > > > > Make sure not to pass undef for the column, e.g. > > # we're already on the row, so just make sure this column is visible > $tree_view->scroll_to_cell (undef, $column, FALSE, 0.0, 0.0); > > > Remember that you can get the column, if you don't already have it, by > asking for it: > > $column = $tree_view->get_column ($index); > Thanks muppet :) -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au From dkasak@nusconsulting.com.au Wed Dec 6 22:55:39 2006 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 C75E83B00DC for ; Wed, 6 Dec 2006 22:55:39 -0500 (EST) 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 27069-04 for ; Wed, 6 Dec 2006 22:55:37 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id 540473B00DB for ; Wed, 6 Dec 2006 22:55:36 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.6/8.13.6) with ESMTP id kB73tr5d028998 for ; Thu, 7 Dec 2006 14:55:53 +1100 Message-ID: <4577918E.2050707@nusconsulting.com.au> Date: Thu, 07 Dec 2006 14:59:10 +1100 From: Daniel Kasak User-Agent: Thunderbird 1.5.0.8 (X11/20061127) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Need some help with GUI design: 2 header rows in a treeview Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 553778 - e84bad192261 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=553778&m=e84bad192261 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=553778&m=e84bad192261 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=553778&m=e84bad192261 X-Scanned-By: CanIt (www . roaringpenguin . com) on 10.146.0.254 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.442 tagged_above=-999 required=2 tests=[AWL=0.157, BAYES_00=-2.599] X-Spam-Score: -2.442 X-Spam-Level: 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, 07 Dec 2006 03:55:39 -0000 Hi all. I'm working on a data entry form that would *really* benefit from having 2 rows of headers for the treeview. I've done this sort of thing before with treeviews where all the columns fit in the treeview without scrolling, by having an hbox filled with buttons immediately above the treeview, and then just resizing the buttons when the treeview is resized so the buttons line up with the columns they're supposed to go above. This actually doesn't look too hacked up :) I've tried to reproduce this method with my current treeview, which scrolls way out to the right, but I've hit a problem. I can't actually put the hbox pull of buttons inside the scrolled window, because if I do, the scrolled window ceases to operate as a scrolled window - the treeview isn't scrollable. I assume you can't do this. What, then, do I do? Here is a screenshot of what I've got so far: http://www.nusconsulting.com.au/internal/energy_datasheet.jpg The 'Invoice' button should extend across the 1st 2 columns, the Energy kWh button should cover the red columns, the Network kWh button should be only partly visible, and the other buttons should be invisible ... until the treeview is scrolled across to the right, and then they also scroll across. Is this possible? Or maybe I can hide the default treeview header and replace it with my own stuff packed in a table or something? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au From dkasak@nusconsulting.com.au Thu Dec 7 00:20:45 2006 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 F38E63B009C for ; Thu, 7 Dec 2006 00:20:44 -0500 (EST) 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 30908-02 for ; Thu, 7 Dec 2006 00:20:42 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id 9EA0E3B0061 for ; Thu, 7 Dec 2006 00:20:41 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.6/8.13.6) with ESMTP id kB75KwoA032441 for ; Thu, 7 Dec 2006 16:20:58 +1100 Message-ID: <4577A57F.2050300@nusconsulting.com.au> Date: Thu, 07 Dec 2006 16:24:15 +1100 From: Daniel Kasak User-Agent: Thunderbird 1.5.0.8 (X11/20061127) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Setting the font size of a CellRendererText's editable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 553819 - d82a9310dc52 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=553819&m=d82a9310dc52 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=553819&m=d82a9310dc52 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=553819&m=d82a9310dc52 X-Scanned-By: CanIt (www . roaringpenguin . com) on 10.146.0.254 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.442 tagged_above=-999 required=2 tests=[AWL=0.157, BAYES_00=-2.599] X-Spam-Score: -2.442 X-Spam-Level: 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, 07 Dec 2006 05:20:45 -0000 On with the questions :) How do I set the font size of the editable that appears when editing stuff in a CellRendererText? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au From ed@catmur.co.uk Thu Dec 7 05:15:52 2006 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 8C9C93B01D6 for ; Thu, 7 Dec 2006 05:15:52 -0500 (EST) 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 13708-06 for ; Thu, 7 Dec 2006 05:15:47 -0500 (EST) Received: from andromeda.catmur.co.uk (catmur.co.uk [64.79.194.180]) by menubar.gnome.org (Postfix) with ESMTP id 890723B0195 for ; Thu, 7 Dec 2006 05:15:20 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) (uid 500) by andromeda.catmur.co.uk with local; Thu, 07 Dec 2006 10:15:14 +0000 id 0089018F.4577E9B2.0000353C References: <4577918E.2050707@nusconsulting.com.au> In-Reply-To: <4577918E.2050707@nusconsulting.com.au> From: "Ed Catmur" To: Daniel Kasak Subject: Re: Need some help with GUI design: 2 header rows in a treeview Date: Thu, 07 Dec 2006 10:15:14 +0000 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_0_7372_1165486514_001" Message-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.695 tagged_above=-999 required=2 tests=[AWL=0.108, BAYES_00=-2.599, HTML_00_10=0.795, HTML_MESSAGE=0.001] X-Spam-Score: -1.695 X-Spam-Level: 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: Thu, 07 Dec 2006 10:15:52 -0000 --=_0_7372_1165486514_001 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Daniel Kasak wrote: > I'm working on a data entry form that would *really* benefit from having > 2 rows of headers for the treeview. > > I've done this sort of thing before with treeviews where all the columns > fit in the treeview without scrolling, by having an hbox filled with > buttons immediately above the treeview, and then just resizing the > buttons when the treeview is resized so the buttons line up with the > columns they're supposed to go above. This actually doesn't look too > hacked up :) > > I've tried to reproduce this method with my current treeview, which > scrolls way out to the right, but I've hit a problem. I can't actually > put the hbox pull of buttons inside the scrolled window, because if I > do, the scrolled window ceases to operate as a scrolled window - the > treeview isn't scrollable. I assume you can't do this. What, then, do I do? Keep the button bar outside the GtkScrolledWindow; put the GtkTreeView in the GtkScrolledWindow as before. Instead, stick the button bar in a GtkViewport with its hadjustment set to the hadjustment of the GtkScrolledWindow. You'll need to mess around with size-request and size-allocate signals to ensure the GtkViewport gets the correct width and height. I thought the docs explained this fairly well, but maybe that's just me :) From an aesthetic POV, the buttons might look better with relief set at half or none, btw. --=_0_7372_1165486514_001 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit Daniel Kasak wrote:
I'm working on a data entry form that would *really* benefit from having 2 rows of headers for the treeview.

I've done this sort of thing before with treeviews where all the columns fit in the treeview without scrolling, by having an hbox filled with buttons immediately above the treeview, and then just resizing the buttons when the treeview is resized so the buttons line up with the columns they're supposed to go above. This actually doesn't look too hacked up :)

I've tried to reproduce this method with my current treeview, which scrolls way out to the right, but I've hit a problem. I can't actually put the hbox pull of buttons inside the scrolled window, because if I do, the scrolled window ceases to operate as a scrolled window - the treeview isn't scrollable. I assume you can't do this. What, then, do I do?

Keep the button bar outside the GtkScrolledWindow; put the GtkTreeView in the GtkScrolledWindow as before.  Instead, stick the button bar in a GtkViewport with its hadjustment set to the hadjustment of the GtkScrolledWindow.  You'll need to mess around with size-request and size-allocate signals to ensure the GtkViewport gets the correct width and height.

I thought the docs explained this fairly well, but maybe that's just me :)

From an aesthetic POV, the buttons might look better with relief set at half or none, btw. --=_0_7372_1165486514_001-- From rashwin28@gmail.com Thu Dec 7 05:36:01 2006 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 A69583B0090 for ; Thu, 7 Dec 2006 05:36:01 -0500 (EST) 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 15199-10 for ; Thu, 7 Dec 2006 05:35:59 -0500 (EST) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.229]) by menubar.gnome.org (Postfix) with ESMTP id 11B923B0095 for ; Thu, 7 Dec 2006 05:35:59 -0500 (EST) Received: by nz-out-0102.google.com with SMTP id k1so355975nzf for ; Thu, 07 Dec 2006 02:35:58 -0800 (PST) Received: by 10.64.210.3 with SMTP id i3mr3200325qbg.1165487758196; Thu, 07 Dec 2006 02:35:58 -0800 (PST) Received: by 10.64.209.20 with HTTP; Thu, 7 Dec 2006 02:35:58 -0800 (PST) Message-ID: Date: Thu, 7 Dec 2006 16:05:58 +0530 From: "Ashwin Ramachandran" To: gtk-perl-list@gnome.org Subject: Warnings observed with Gtk2::Spell MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_43900_33433022.1165487758156" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.012 tagged_above=-999 required=2 tests=[AWL=0.159, BAYES_00=-2.599, HTML_10_20=1.351, HTML_MESSAGE=0.001, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -1.012 X-Spam-Level: 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, 07 Dec 2006 10:36:01 -0000 ------=_Part_43900_33433022.1165487758156 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, In my application, I am using GtkTextView and GtkSpell. However, I am facing issues, when they are used in the following way, in my application: My application has a Left Screen[which has a Gtk TreeView] and a Right Screen, which has some widges. One of the widgets on the right screen is the TextView. As I move across different selections in the TreeView, different display functions are called to display the widgets on the right screen. There are a couple of display functions, which use the TextView and I have attached the Spell Checker to it. for eg: sub display_info1 { my $help_textview_1 = ... my $spell = Gtk2::Spell->new_attach($help_textview_1); my $help_text_buffer = $help_text_view_1->get_buffer(); $help_text_buffer->signal_connect("changed", \&edit_changed); .. .... Add other widgets here } sub display_info2 { my $help_textview_2 = ... my $spell = Gtk2::Spell->new_attach($help_textview_2); my $help_text_buffer = $help_text_view_2->get_buffer(); $help_text_buffer->signal_connect("changed", \&edit_changed); .... Add other widgets here } Whenever, I move across the tree selections, which calls different display functions in turn, I am observing the following error: gtkspell-ERROR **: file gtkspell.c: line 626 (gtkspell_new_attach): assertion failed: (spell == NULL) aborting... Aborted And after the above error, my application crashes. Sometimes, I observe the below error as well: GLib-GObject-CRITICAL **: g_object_set_data: assertion `G_IS_OBJECT (object)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_view_get_buffer: assertion `GTK_IS_TEXT_VIEW (text_view)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_buffer_get_tag_table: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_buffer_get_bounds: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_buffer_remove_tag: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_tag_table_remove: assertion `GTK_IS_TEXT_TAG_TABLE (table)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_buffer_delete_mark: assertion `GTK_IS_TEXT_MARK (mark)' failed at /usr/share/osfr/tools/ddore.pl line 6278. Gtk-CRITICAL **: gtk_text_buffer_delete_mark: assertion `GTK_IS_TEXT_MARK (mark)' failed at /usr/share/osfr/tools/dore.pl line 6278. Segmentation fault And my application crashes. Am I missing something here? Any help in this regard will be appreciated. Many users of this application are asking for spell checker. Thanks Ashwin ------=_Part_43900_33433022.1165487758156 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All,
In my application, I am using GtkTextView and GtkSpell. However, I am facing issues, when they are used in the following way, in my
application:

My application has a Left Screen[which has  a Gtk TreeView] and a
Right Screen, which has some widges. One of the widgets on the right screen is
the TextView. As I move across different selections in the TreeView, different display
functions are called to display the widgets on the right screen.

There are a couple of display functions, which use the TextView and I have attached the
Spell Checker to it.

for eg:
sub display_info1
{
  my $help_textview_1 = ...
  my $spell = Gtk2::Spell->new_attach($help_textview_1);
  my $help_text_buffer = $help_text_view_1->get_buffer();
  $help_text_buffer->signal_connect("changed", \&edit_changed);

 ..  .... Add other widgets here

}

sub display_info2
{
  my $help_textview_2 = ...
  my $spell = Gtk2::Spell->new_attach($help_textview_2);
  my $help_text_buffer = $help_text_view_2->get_buffer();
   $help_text_buffer->signal_connect("changed", \&edit_changed);

  .... Add other widgets here
}

Whenever, I move across the tree selections, which calls different display functions in turn,
 I am observing the following error:
gtkspell-ERROR **: file gtkspell.c: line 626 (gtkspell_new_attach): assertion failed: (spell == NULL)
aborting...
Aborted

And after the above error, my application crashes.

Sometimes, I observe the below error as well:
GLib-GObject-CRITICAL **: g_object_set_data: assertion `G_IS_OBJECT
(object)' failed at /usr/share/osfr/tools/ddore.pl line 6278.
Gtk-CRITICAL **: gtk_text_view_get_buffer: assertion `GTK_IS_TEXT_VIEW
(text_view)' failed at /usr/share/osfr/tools/ddore.pl line
6278.
Gtk-CRITICAL **: gtk_text_buffer_get_tag_table: assertion
`GTK_IS_TEXT_BUFFER (buffer)' failed
at /usr/share/osfr/tools/ddore.pl line 6278.
Gtk-CRITICAL **: gtk_text_buffer_get_bounds: assertion
`GTK_IS_TEXT_BUFFER (buffer)' failed
at /usr/share/osfr/tools/ddore.pl line 6278.
Gtk-CRITICAL **: gtk_text_buffer_remove_tag: assertion
`GTK_IS_TEXT_BUFFER (buffer)' failed
at /usr/share/osfr/tools/ddore.pl line 6278.
Gtk-CRITICAL **: gtk_text_tag_table_remove: assertion
`GTK_IS_TEXT_TAG_TABLE (table)' failed
at /usr/share/osfr/tools/ddore.pl line 6278.
Gtk-CRITICAL **: gtk_text_buffer_delete_mark: assertion
`GTK_IS_TEXT_MARK (mark)' failed
at /usr/share/osfr/tools/ddore.pl line 6278.
Gtk-CRITICAL **: gtk_text_buffer_delete_mark: assertion
`GTK_IS_TEXT_MARK (mark)' failed
at /usr/share/osfr/tools/dore.pl line 6278.
Segmentation fault

And my application crashes.

Am  I missing something here?

Any help in this regard will be appreciated. Many users of this application
are asking for spell checker.

Thanks
Ashwin

------=_Part_43900_33433022.1165487758156-- From rashwin28@gmail.com Thu Dec 7 07:56:40 2006 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 690633B01D3 for ; Thu, 7 Dec 2006 07:56:40 -0500 (EST) 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 25735-08 for ; Thu, 7 Dec 2006 07:56:37 -0500 (EST) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.229]) by menubar.gnome.org (Postfix) with ESMTP id 130353B000A for ; Thu, 7 Dec 2006 07:56:37 -0500 (EST) Received: by nz-out-0102.google.com with SMTP id k1so377467nzf for ; Thu, 07 Dec 2006 04:56:36 -0800 (PST) Received: by 10.64.131.4 with SMTP id e4mr3481217qbd.1165496196035; Thu, 07 Dec 2006 04:56:36 -0800 (PST) Received: by 10.64.209.20 with HTTP; Thu, 7 Dec 2006 04:56:35 -0800 (PST) Message-ID: Date: Thu, 7 Dec 2006 18:26:36 +0530 From: "Ashwin Ramachandran" To: gtk-perl-list@gnome.org Subject: Tooltips with labels MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_45474_15247263.1165496196001" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.533 tagged_above=-999 required=2 tests=[AWL=-0.348, BAYES_40=-0.185, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: -0.533 X-Spam-Level: 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, 07 Dec 2006 12:56:40 -0000 ------=_Part_45474_15247263.1165496196001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, I am trying to use tooltips with the label widget. It doesn't seem to work. For eg: my $tooltip = Gtk2::Tooltips->new(); my $res_mes = 'Current Value:'; my $label = Gtk2::Label->new(); $tooltip->set_tip($label, "Tooltip for label"); I am not able to observe the tooltip for the label widget. It however seems to work for other widgets like Button. Just wanted to check if tooltips are supported with label widgets? Thanks Ashwin ------=_Part_45474_15247263.1165496196001 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All,
I am trying to use tooltips with the label widget. It doesn't seem to work.
For eg:
my $tooltip = Gtk2::Tooltips->new();
my $res_mes = 'Current Value:';

my $label = Gtk2::Label->new();
$tooltip->set_tip($label, "Tooltip for label");


I am not able to observe the tooltip for the label widget. It however seems to work for other widgets like
Button.

Just wanted to check if tooltips are supported with label widgets?

Thanks
Ashwin

------=_Part_45474_15247263.1165496196001-- From ebassi@gmail.com Thu Dec 7 08:14:04 2006 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 69DFA3B01A3 for ; Thu, 7 Dec 2006 08:14:04 -0500 (EST) 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 27077-02 for ; Thu, 7 Dec 2006 08:14:01 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by menubar.gnome.org (Postfix) with ESMTP id 4C8613B01D0 for ; Thu, 7 Dec 2006 08:13:58 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so549941nfc for ; Thu, 07 Dec 2006 05:13:57 -0800 (PST) Received: by 10.49.27.17 with SMTP id e17mr3935901nfj.1165497237486; Thu, 07 Dec 2006 05:13:57 -0800 (PST) Received: from ?192.168.1.64? ( [86.133.113.100]) by mx.google.com with ESMTP id d2sm5989503nfe.2006.12.07.05.13.57; Thu, 07 Dec 2006 05:13:57 -0800 (PST) Subject: Re: Tooltips with labels From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: References: Content-Type: text/plain Date: Thu, 07 Dec 2006 13:13:55 +0000 Message-Id: <1165497235.6594.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.799 tagged_above=-999 required=2 tests=[AWL=-0.757, BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558, SPF_PASS=-0.001] X-Spam-Score: -1.799 X-Spam-Level: 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, 07 Dec 2006 13:14:04 -0000 hi; On Thu, 2006-12-07 at 18:26 +0530, Ashwin Ramachandran wrote: > Just wanted to check if tooltips are supported with label widgets? tips are supported by widgets with a GdkWindow; you must pack the Gtk2::Label into an Gtk2::EventBox and set the tip on the event box, not on the label. anyway: adding a tip to a label means that the label is not clear enough, so you should consider clarifying the content of the label. tip are also used on action widgets. ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From zentara1@sbcglobal.net Thu Dec 7 08:18:49 2006 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 3466E3B018D for ; Thu, 7 Dec 2006 08:18:49 -0500 (EST) 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 27305-06 for ; Thu, 7 Dec 2006 08:18:46 -0500 (EST) 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 8DDD63B00A5 for ; Thu, 7 Dec 2006 08:18:45 -0500 (EST) Received: (qmail 80579 invoked from network); 7 Dec 2006 13:18:45 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.12.209 with login) by smtp109.sbc.mail.re2.yahoo.com with SMTP; 7 Dec 2006 13:18:45 -0000 X-YMail-OSG: 95k.feEVM1nY8AyXsT4oBZi1isf5pBaTdVWk_KFopiu_.Zx3OkerW9wdGRzGA_tyQEPhNhXIje7n5iXw5ekArR2HkG.Z8FRM4sUSGj2HRtRGErT5KedO4azRi8RQfeQshkDeVdVtK7_Kag0- Date: Thu, 7 Dec 2006 08:16:12 -0500 From: zentara To: gtk-perl-list@gnome.org Subject: Re: Tooltips with labels Message-ID: <20061207081612.6d748b28@zentara.zentara.net> In-Reply-To: References: X-Mailer: Sylpheed-Claws 2.5.6 (GTK+ 2.10.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.34 tagged_above=-999 required=2 tests=[AWL=-0.649, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.34 X-Spam-Level: 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, 07 Dec 2006 13:18:49 -0000 On Thu, 7 Dec 2006 18:26:36 +0530 "Ashwin Ramachandran" wrote: >Just wanted to check if tooltips are supported with label widgets? Here is a simple example. #!/usr/bin/perl use warnings; use strict; use Glib qw/TRUE FALSE/; use Gtk2 '-init'; my $window = Gtk2::Window->new('toplevel'); $window->set_title('Z'); $window ->signal_connect( 'destroy' => \&delete_event ); $window->set_border_width(10); $window->set_size_request(300,200); my $vbox = Gtk2::VBox->new( FALSE, 6 ); $window->add($vbox); $vbox->set_border_width(2); my $hbox= Gtk2::HBox->new( FALSE, 6 ); $vbox->pack_end($hbox,FALSE,FALSE,0); $hbox->set_border_width(2); my $frame0 = Gtk2::Frame->new('Controls'); $vbox->pack_end( $frame0, FALSE, FALSE, 0 ); $frame0->set_border_width(3); $vbox->pack_end (Gtk2::HSeparator->new, FALSE, FALSE, 0); my $hbox0 = Gtk2::HBox->new( FALSE, 6 ); $frame0->add($hbox0); $hbox0->set_border_width(3); my $button = Gtk2::Button->new_from_stock('gtk-quit'); $hbox0->pack_end( $button, FALSE, FALSE, 0 ); $button->signal_connect( clicked => \&delete_event ); my $frame1 = Gtk2::Frame->new('Some Frame'); $vbox->pack_start( $frame1, FALSE, FALSE, 0 ); $frame1->set_border_width(3); #labels don't respond to tooltips, since they have no #underlying window, so we must put the label in an event box. my $label = Gtk2::Label->new( "This label is just for you\n" ); $label->set_justify('left'); my $eventb1 = Gtk2::EventBox->new(); $eventb1->set_border_width(3); $eventb1->add($label); $frame1->add($eventb1); my $tooltip0 = Gtk2::Tooltips->new; my $tip_text = 'Just for you'; $tooltip0->set_tip($eventb1, $tip_text, undef); my $tooltip1 = Gtk2::Tooltips->new; my $tip_text1 = 'Just Another Exit Button'; $tooltip1->set_tip($button, $tip_text1, undef); $window->show_all(); Gtk2->main; ##################################### sub delete_event { Gtk2->main_quit; return FALSE; } -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From sergstesh@yahoo.com Thu Dec 7 08:48:50 2006 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 295193B012D for ; Thu, 7 Dec 2006 08:48:50 -0500 (EST) 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 28982-01 for ; Thu, 7 Dec 2006 08:48:46 -0500 (EST) Received: from web35201.mail.mud.yahoo.com (web35201.mail.mud.yahoo.com [66.163.179.80]) by menubar.gnome.org (Postfix) with SMTP id 227243B00A1 for ; Thu, 7 Dec 2006 08:48:46 -0500 (EST) Received: (qmail 4940 invoked by uid 60001); 7 Dec 2006 13:48:45 -0000 Message-ID: <20061207134845.4938.qmail@web35201.mail.mud.yahoo.com> X-YMail-OSG: 04qltDEVM1nIrXFgYwFkvaL1zmX3X7sqYcRZBZ.ifHY8Q_GzCzFCaXjnfeYGHdYWH1NpQXCJrIQL5PDhj7eH4ZJV5ruIrrTBIC5KpClHR346efsqv0s6hX4VNgI8LnCGkATck6cmBoncVHo- Received: from [84.94.210.141] by web35201.mail.mud.yahoo.com via HTTP; Thu, 07 Dec 2006 05:48:45 PST Date: Thu, 7 Dec 2006 05:48:45 -0800 (PST) From: Sergei Steshenko Subject: Re: Tooltips with labels To: Emmanuele Bassi , gtk-perl-list@gnome.org In-Reply-To: <1165497235.6594.3.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=1.827 tagged_above=-999 required=2 tests=[AWL=-0.865, BAYES_20=-0.74, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447, TW_GT=0.077] X-Spam-Score: 1.827 X-Spam-Level: * 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, 07 Dec 2006 13:48:50 -0000 --- Emmanuele Bassi wrote: > hi; > > On Thu, 2006-12-07 at 18:26 +0530, Ashwin Ramachandran wrote: > > > Just wanted to check if tooltips are supported with label widgets? > > tips are supported by widgets with a GdkWindow; you must pack the > Gtk2::Label into an Gtk2::EventBox and set the tip on the event box, not > on the label. > > anyway: adding a tip to a label means that the label is not clear > enough, so you should consider clarifying the content of the label. tip > are also used on action widgets. > > ciao, > Emmanuele. > > -- > Emmanuele Bassi, E: ebassi@gmail.com > W: http://www.emmanuelebassi.net > B: http://log.emmanuelebassi.net > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > Regarding "adding a tip to a label means that the label is not clear enough" - no necessarily, that it, short label may be used to save precious GUI space, so I see the question as quite legitimate and in Perl paradigm as label => 'Quite detailed explanation of the label through tooltip' key => value relationship. --Sergei. Applications From Scratch: http://appsfromscratch.berlios.de/ ____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index From scott@asofyet.org Thu Dec 7 09:57:31 2006 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 8FF493B01D0 for ; Thu, 7 Dec 2006 09:57:31 -0500 (EST) 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 00578-03 for ; Thu, 7 Dec 2006 09:57:28 -0500 (EST) Received: from webmail3.sd.dreamhost.com (webmail3.sd.dreamhost.com [64.111.100.15]) by menubar.gnome.org (Postfix) with ESMTP id 0CFC13B0134 for ; Thu, 7 Dec 2006 09:57:28 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail3.sd.dreamhost.com (Postfix) with ESMTP id 4D914141BD for ; Thu, 7 Dec 2006 06:57:27 -0800 (PST) Received: from 192.146.101.24 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Thu, 7 Dec 2006 09:57:27 -0500 (EST) Message-ID: <9666.192.146.101.24.1165503447.squirrel@webmail.asofyet.org> In-Reply-To: References: Date: Thu, 7 Dec 2006 09:57:27 -0500 (EST) Subject: Re: Warnings observed with Gtk2::Spell From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.631 tagged_above=-999 required=2 tests=[AWL=-0.891, BAYES_20=-0.74] X-Spam-Score: -1.631 X-Spam-Level: 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, 07 Dec 2006 14:57:31 -0000 Ashwin Ramachandran wrote: > sub display_info1 > { > my $help_textview_1 = ... > my $spell = Gtk2::Spell->new_attach($help_textview_1); > my $help_text_buffer = $help_text_view_1->get_buffer(); > $help_text_buffer->signal_connect("changed", \&edit_changed); > > .. .... Add other widgets here > > } Are you keeping the $spell reference anywhere? The error messages make it sound as if your Gtk2::Spell object and its pieces are disappearing out from under you. (Unless it's supposed to be referenced by the textview; i am speculating, as i haven't used Gtk2::Spell before.) -- muppet From kaffeetisch@gmx.de Thu Dec 7 12:58:21 2006 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 0BDCB3B00F9 for ; Thu, 7 Dec 2006 12:58:21 -0500 (EST) 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 12985-04 for ; Thu, 7 Dec 2006 12:58:18 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id B19593B00A4 for ; Thu, 7 Dec 2006 12:58:16 -0500 (EST) Received: (qmail invoked by alias); 07 Dec 2006 17:58:15 -0000 Received: from port-212-202-0-233.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.233] by mail.gmx.net (mp038) with SMTP; 07 Dec 2006 18:58:15 +0100 X-Authenticated: #2092818 Subject: Re: Setting the font size of a CellRendererText's editable From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: <4577A57F.2050300@nusconsulting.com.au> References: <4577A57F.2050300@nusconsulting.com.au> Content-Type: text/plain Date: Thu, 07 Dec 2006 18:58:14 +0100 Message-Id: <1165514294.4319.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.533 tagged_above=-999 required=2 tests=[AWL=0.067, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.533 X-Spam-Level: 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, 07 Dec 2006 17:58:21 -0000 On Thu, 2006-12-07 at 16:24 +1100, Daniel Kasak wrote: > How do I set the font size of the editable that appears when editing > stuff in a CellRendererText? I haven't tried it, but I think this should work: Connect to the renderer's editing-started signal and invoke modify_font on the editable in the callback. -- Bye, -Torsten From rashwin28@gmail.com Thu Dec 7 13:10:39 2006 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 A22673B018F for ; Thu, 7 Dec 2006 13:10:39 -0500 (EST) 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 13578-07 for ; Thu, 7 Dec 2006 13:10:36 -0500 (EST) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.227]) by menubar.gnome.org (Postfix) with ESMTP id 654893B0094 for ; Thu, 7 Dec 2006 13:10:36 -0500 (EST) Received: by nz-out-0102.google.com with SMTP id k1so442591nzf for ; Thu, 07 Dec 2006 10:10:35 -0800 (PST) Received: by 10.65.180.7 with SMTP id h7mr4002732qbp.1165515035330; Thu, 07 Dec 2006 10:10:35 -0800 (PST) Received: by 10.64.209.20 with HTTP; Thu, 7 Dec 2006 10:10:35 -0800 (PST) Message-ID: Date: Thu, 7 Dec 2006 23:40:35 +0530 From: "Ashwin Ramachandran" To: gtk-perl-list@gnome.org Subject: Re: Warnings observed with Gtk2::Spell In-Reply-To: <9666.192.146.101.24.1165503447.squirrel@webmail.asofyet.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_50532_29077292.1165515035277" References: <9666.192.146.101.24.1165503447.squirrel@webmail.asofyet.org> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.487 tagged_above=-999 required=2 tests=[AWL=0.661, BAYES_00=-2.599, HTML_30_40=0.374, HTML_MESSAGE=0.001, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -1.487 X-Spam-Level: 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, 07 Dec 2006 18:10:39 -0000 ------=_Part_50532_29077292.1165515035277 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Muppet, No, I am not having any references outside the given functions for the spell object. In fact, due to the errors, I tried detaching the spell from the text view everytime, I came out of those functions. But still observed the crash. Thanks Ashwin On 12/7/06, muppet wrote: > > > Ashwin Ramachandran wrote: > > > sub display_info1 > > { > > my $help_textview_1 = ... > > my $spell = Gtk2::Spell->new_attach($help_textview_1); > > my $help_text_buffer = $help_text_view_1->get_buffer(); > > $help_text_buffer->signal_connect("changed", \&edit_changed); > > > > .. .... Add other widgets here > > > > } > > Are you keeping the $spell reference anywhere? The error messages make it > sound as if your Gtk2::Spell object and its pieces are disappearing out > from > under you. (Unless it's supposed to be referenced by the textview; i am > speculating, as i haven't used Gtk2::Spell before.) > > > -- > muppet > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_50532_29077292.1165515035277 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Muppet,
No, I am not having any references outside the given functions for the spell object.

In fact, due to the errors, I tried detaching the spell from the text view everytime, I came out of those functions. But still observed the crash.

Thanks
Ashwin



On 12/7/06, muppet <scott@asofyet.org> wrote:

Ashwin Ramachandran wrote:

> sub display_info1
> {
>   my $help_textview_1 = ...
>   my $spell = Gtk2::Spell->new_attach($help_textview_1);
>   my $help_text_buffer = $help_text_view_1->get_buffer();
>   $help_text_buffer->signal_connect("changed", \&edit_changed);
>
>  ..  .... Add other widgets here
>
> }

Are you keeping the $spell reference anywhere?  The error messages make it
sound  as if your Gtk2::Spell object and its pieces are disappearing out from
under you.  (Unless it's supposed to be referenced by the textview; i am
speculating, as i haven't used Gtk2::Spell before.)


--
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_50532_29077292.1165515035277-- From dkasak@nusconsulting.com.au Thu Dec 7 18:22:34 2006 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 3F27B3B007C for ; Thu, 7 Dec 2006 18:22:34 -0500 (EST) 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 00726-05 for ; Thu, 7 Dec 2006 18:22:31 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id B78C73B0073 for ; Thu, 7 Dec 2006 18:22:30 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.6/8.13.6) with ESMTP id kB7NKrQ5024122; Fri, 8 Dec 2006 10:20:55 +1100 Message-ID: <4578A29E.3060309@nusconsulting.com.au> Date: Fri, 08 Dec 2006 10:24:14 +1100 From: Daniel Kasak User-Agent: Thunderbird 1.5.0.8 (X11/20061127) MIME-Version: 1.0 To: Ed Catmur Subject: Re: Need some help with GUI design: 2 header rows in a treeview References: <4577918E.2050707@nusconsulting.com.au> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 554139 - fd857c58f9eb X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=554139&m=fd857c58f9eb X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=554139&m=fd857c58f9eb X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=554139&m=fd857c58f9eb X-Scanned-By: CanIt (www . roaringpenguin . com) on 10.146.0.254 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.442 tagged_above=-999 required=2 tests=[AWL=0.157, BAYES_00=-2.599] X-Spam-Score: -2.442 X-Spam-Level: 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: Thu, 07 Dec 2006 23:22:34 -0000 Ed Catmur wrote: > Keep the button bar outside the GtkScrolledWindow; put the GtkTreeView > in the GtkScrolledWindow as before. Instead, stick the button bar in > a GtkViewport with its hadjustment set to the hadjustment of the > GtkScrolledWindow. You'll need to mess around with size-request and > size-allocate signals to ensure the GtkViewport gets the correct width > and height. > > I thought the docs explained this fairly well, but maybe that's just > me :) > AHA! I haven't used GtkViewports before. Thanks. Yeah the docs give good technical information, but assume a certain level of background knowledge about how all the parts fit together, etc. I've had a little trouble figuring out which signal to use to synchronise the 2 hadjustments. The only thing that works for me at the moment is the ScrolledWindow's 'event' signal, but as you can imagine, this is a pretty noise one to connect to. The ScrolledWindow's 'scroll-child' signal doesn't seem to fire for me. Am I missing something here? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au From ed@catmur.co.uk Fri Dec 8 08:35:59 2006 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 122503B0083 for ; Fri, 8 Dec 2006 08:35:59 -0500 (EST) 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 12536-06 for ; Fri, 8 Dec 2006 08:35:56 -0500 (EST) Received: from andromeda.catmur.co.uk (catmur.co.uk [64.79.194.180]) by menubar.gnome.org (Postfix) with ESMTP id 114973B00C3 for ; Fri, 8 Dec 2006 08:35:56 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) (uid 500) by andromeda.catmur.co.uk with local; Fri, 08 Dec 2006 13:35:50 +0000 id 007409C1.45796A36.0000169C References: <4577918E.2050707@nusconsulting.com.au> <4578A29E.3060309@nusconsulting.com.au> In-Reply-To: <4578A29E.3060309@nusconsulting.com.au> From: "Ed Catmur" To: Daniel Kasak Subject: Re: Need some help with GUI design: 2 header rows in a treeview Date: Fri, 08 Dec 2006 13:35:50 +0000 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_0_32648_1165584950_001" Message-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.427 tagged_above=-999 required=2 tests=[AWL=-0.180, BAYES_00=-2.599, HTML_10_20=1.351, HTML_MESSAGE=0.001] X-Spam-Score: -1.427 X-Spam-Level: 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: Fri, 08 Dec 2006 13:35:59 -0000 --=_0_32648_1165584950_001 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Daniel Kasak wrote: > Ed Catmur wrote: >> Keep the button bar outside the GtkScrolledWindow; put the GtkTreeView in >> the GtkScrolledWindow as before. Instead, stick the button bar in a >> GtkViewport with its hadjustment set to the hadjustment of the >> GtkScrolledWindow. You'll need to mess around with size-request and >> size-allocate signals to ensure the GtkViewport gets the correct width >> and height. > ... > I've had a little trouble figuring out which signal to use to synchronise > the 2 hadjustments. The only thing that works for me at the moment is the > ScrolledWindow's 'event' signal, but as you can imagine, this is a pretty > noise one to connect to. The ScrolledWindow's 'scroll-child' signal > doesn't seem to fire for me. Am I missing something here? Don't use a signal; have the GtkViewport and the GtkScrolledWindow use the _same_ hadjustment. i.e.: $viewport->set_hadjustment($scrolled_window->get_hadjustment) Magic! --=_0_32648_1165584950_001 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit Daniel Kasak wrote:
Ed Catmur wrote:
Keep the button bar outside the GtkScrolledWindow; put the GtkTreeView in the GtkScrolledWindow as before.  Instead, stick the button bar in a GtkViewport with its hadjustment set to the hadjustment of the GtkScrolledWindow.  You'll need to mess around with size-request and size-allocate signals to ensure the GtkViewport gets the correct width and height.
...
I've had a little trouble figuring out which signal to use to synchronise the 2 hadjustments. The only thing that works for me at the moment is the ScrolledWindow's 'event' signal, but as you can imagine, this is a pretty noise one to connect to. The ScrolledWindow's 'scroll-child' signal doesn't seem to fire for me. Am I missing something here?

Don't use a signal; have the GtkViewport and the GtkScrolledWindow use the _same_ hadjustment.

i.e.:

$viewport->set_hadjustment($scrolled_window->get_hadjustment)

Magic! --=_0_32648_1165584950_001-- From rashwin28@gmail.com Fri Dec 8 13:42:36 2006 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 AA3C43B0002 for ; Fri, 8 Dec 2006 13:42:36 -0500 (EST) 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 31133-03 for ; Fri, 8 Dec 2006 13:42:33 -0500 (EST) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.224]) by menubar.gnome.org (Postfix) with ESMTP id 161203B000C for ; Fri, 8 Dec 2006 13:42:33 -0500 (EST) Received: by nz-out-0102.google.com with SMTP id k1so660810nzf for ; Fri, 08 Dec 2006 10:42:32 -0800 (PST) Received: by 10.64.250.3 with SMTP id x3mr6211758qbh.1165603352350; Fri, 08 Dec 2006 10:42:32 -0800 (PST) Received: by 10.64.208.3 with HTTP; Fri, 8 Dec 2006 10:42:32 -0800 (PST) Message-ID: Date: Sat, 9 Dec 2006 00:12:32 +0530 From: "Ashwin Ramachandran" To: gtk-perl-list@gnome.org Subject: Hiding Popup Menus based on right clicks MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_62783_11183400.1165603352303" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.618 tagged_above=-999 required=2 tests=[AWL=-0.303, BAYES_05=-1.11, HTML_00_10=0.795, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: -0.618 X-Spam-Level: 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: Fri, 08 Dec 2006 18:42:36 -0000 ------=_Part_62783_11183400.1165603352303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, In my application I am using a Treeview. I also display a Popup Menu, whenever, the user selects a given row and right clicks. However, the Popup menu also appears, whenever, the user selects a row, but right clicks on any other row[ie apart from the selected row] as well. At these points, I need to hide the Popup Menu. To do this, I need to differentiate between the selected row and the right click on any other row in the treeview, and based on this, decide whether to display the Popup Menu or not. How do I get this information? I am not sure, if I need to use this API: $treeview->get_path_at_pos($event->x, $event->y). This gives me the x and y coordinates of the right clicked row. How do I use this info and compare it to the selected row? Any help will be greatly appreciated. Thanks Ashwin ------=_Part_62783_11183400.1165603352303 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All,

In my application I am using a Treeview. I also display a Popup Menu, whenever, the user
selects a given row and right clicks.

However, the Popup menu also appears, whenever, the user selects a row, but right clicks
on any other row[ie apart from the selected row] as well. At these points, I need to hide
the Popup Menu.

To do this, I need to differentiate between the selected row and the right click on any other row
in the treeview, and based on this, decide whether to display the Popup Menu or not. How do I get this information?

I am not sure, if I need to use this API: $treeview->get_path_at_pos($event->x, $event->y). This
 gives me the x and y coordinates of the right clicked row. How do I use this info and compare it
to the selected row?

Any help will be greatly appreciated.

Thanks
Ashwin

------=_Part_62783_11183400.1165603352303-- From scott@asofyet.org Fri Dec 8 21:48:42 2006 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 444E43B0075 for ; Fri, 8 Dec 2006 21:48:42 -0500 (EST) 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 21869-04 for ; Fri, 8 Dec 2006 21:48:38 -0500 (EST) Received: from looneymail-a1.dreamhost.com (sd-green-bigip-177.dreamhost.com [208.97.132.177]) by menubar.gnome.org (Postfix) with ESMTP id EB1233B0071 for ; Fri, 8 Dec 2006 21:48:37 -0500 (EST) Received: from [192.168.0.103] (unknown [74.140.167.162]) by looneymail-a1.dreamhost.com (Postfix) with ESMTP id 264DB15F21F; Fri, 8 Dec 2006 18:48:37 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8F2215AF-0FC5-43C2-9DC0-7319EA84A187@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: Hiding Popup Menus based on right clicks Date: Fri, 8 Dec 2006 21:49:12 -0500 To: Ashwin Ramachandran X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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: Sat, 09 Dec 2006 02:48:42 -0000 On Dec 8, 2006, at 1:42 PM, Ashwin Ramachandran wrote: > I am not sure, if I need to use this API: $treeview->get_path_at_pos > ($event->x, $event->y). This > gives me the x and y coordinates of the right clicked row. How do > I use this info and compare it > to the selected row? Actually, it's exactly the other way around -- get_path_at_pos() takes the click's coordinates and gives you back the path of the row that at that x,y position (and possibly the column and coordinates within the cell). You can then ask the treeview's selection if that path is selected. Warning: this code is completely untested: $treeview->signal_connect (button_press_event => sub { my ($treeview, $event) = @_; if ($event->button == 3 # right click && $event->window = $treeview->get_bin_window) { my $path = $treeview->get_path_at_pos ($event->x, $event->y); if ($treeview->get_selection->path_is_selected ($path)) { show_my_context_menu (...); } } return FALSE; }); Now, the code there connects to button-press-event, but you can also connect to button-release-event, which gives you the opportunity to let the click change the selection before attempting to pop up the context menu. Then you don't have to pull these tricks. From klicker-mail@gmx.net Sun Dec 10 05:20:08 2006 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 F0AB43B00E6 for ; Sun, 10 Dec 2006 05:20:07 -0500 (EST) 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 24997-06 for ; Sun, 10 Dec 2006 05:20:05 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 6286C3B009A for ; Sun, 10 Dec 2006 05:20:04 -0500 (EST) Received: (qmail invoked by alias); 10 Dec 2006 10:20:03 -0000 Received: from p54BA128A.dip0.t-ipconnect.de (EHLO [192.168.178.29]) [84.186.18.138] by mail.gmx.net (mp048) with SMTP; 10 Dec 2006 11:20:03 +0100 X-Authenticated: #5561458 Message-ID: <457BDF4D.9090705@gmx.net> Date: Sun, 10 Dec 2006 11:19:57 +0100 From: Mario Fischer User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Win32 binaries ready Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.651 tagged_above=-999 required=2 tests=[AWL=-0.617, BAYES_05=-1.11, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -1.651 X-Spam-Level: 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, 10 Dec 2006 10:20:08 -0000 Hi. My estimation last week was a bit too optimistic. I had some trouble with PPM. Now the binaries are up at this place: http://www.lostmind.de/gtk2-perl/ (traffic desired ;-)) Hopefully Torsten and muppet allow me to provide you with these binaries. Please consider them as a first testing release which has been tested with the examples and the gtk-demos. I have also tested the glade extension because I prefer glade to create the forms, so it is up to you to test the rest. Have fun! Thanks, Mario Fischer From kaffeetisch@gmx.de Sun Dec 10 13:30:29 2006 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 111EA3B00A1 for ; Sun, 10 Dec 2006 13:30:29 -0500 (EST) 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 21142-02 for ; Sun, 10 Dec 2006 13:30:25 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 14C7E3B0225 for ; Sun, 10 Dec 2006 13:30:23 -0500 (EST) Received: (qmail invoked by alias); 10 Dec 2006 18:30:22 -0000 Received: from port-212-202-0-105.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.105] by mail.gmx.net (mp044) with SMTP; 10 Dec 2006 19:30:22 +0100 X-Authenticated: #2092818 Subject: Re: Win32 binaries ready From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: <457BDF4D.9090705@gmx.net> References: <457BDF4D.9090705@gmx.net> Content-Type: text/plain Date: Sun, 10 Dec 2006 19:30:22 +0100 Message-Id: <1165775423.4369.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.495 tagged_above=-999 required=2 tests=[AWL=0.028, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.495 X-Spam-Level: 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, 10 Dec 2006 18:30:29 -0000 On Sun, 2006-12-10 at 11:19 +0100, Mario Fischer wrote: > Now the binaries are up at this place: > > http://www.lostmind.de/gtk2-perl/ Thanks a lot for doing this! > Hopefully Torsten and muppet allow me to provide you with these > binaries. Please consider them as a first testing release which has been > tested with the examples and the gtk-demos. I have also tested the > glade extension because I prefer glade to create the forms, so it is up > to you to test the rest. Your binaries seem to work great for me. I'd say let's wait some more days to allow testing by other people. If everything's fine (which silence would be an indicator of), let's upload them to the official place. I've only one question: Why do you host glade-2.12.1.zip on your server? Is this package not available from the gladewin32 site? -- Bye, -Torsten From klicker-mail@gmx.net Sun Dec 10 18:33:28 2006 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 1788C3B00C4 for ; Sun, 10 Dec 2006 18:33:28 -0500 (EST) 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 10740-04 for ; Sun, 10 Dec 2006 18:33:25 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 868483B0086 for ; Sun, 10 Dec 2006 18:33:24 -0500 (EST) Received: (qmail invoked by alias); 10 Dec 2006 23:33:23 -0000 Received: from p54BA128A.dip0.t-ipconnect.de (EHLO [192.168.178.29]) [84.186.18.138] by mail.gmx.net (mp035) with SMTP; 11 Dec 2006 00:33:23 +0100 X-Authenticated: #5561458 Message-ID: <457C9941.30806@gmx.net> Date: Mon, 11 Dec 2006 00:33:21 +0100 From: Mario Fischer User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: Win32 binaries ready References: <457BDF4D.9090705@gmx.net> <1165775423.4369.5.camel@localhost.localdomain> In-Reply-To: <1165775423.4369.5.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.352 tagged_above=-999 required=2 tests=[AWL=0.171, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.352 X-Spam-Level: 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, 10 Dec 2006 23:33:28 -0000 > Thanks a lot for doing this! Thanks for providing the community with such a great extension for perl! > Your binaries seem to work great for me. I'd say let's wait some more > days to allow testing by other people. If everything's fine (which > silence would be an indicator of), let's upload them to the official > place. It would be great if you allowed me to continue hosting them at my site because I have got 50 GB of traffic and nothing to do with it. In return I will instantly update the win32 packages when new (stable) releases are available. > I've only one question: Why do you host glade-2.12.1.zip on your server? > Is this package not available from the gladewin32 site? Heh. That is because glade is not included in the Runtime Installer available at gladewin32.sf.net. So people that are choosing to download the smaller package (you only need the Development Environment if you are actually going to compile gtk2-perl packages) could miss glade and I am offering this file to add glade to the small package. That is all :-) Thanks, Mario Fischer From john@burian.org Tue Dec 12 09:22:41 2006 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 259EE3B00D6 for ; Tue, 12 Dec 2006 09:22:41 -0500 (EST) 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 08790-03 for ; Tue, 12 Dec 2006 09:22:38 -0500 (EST) Received: from pilgrim.burian.org (burian.org [71.29.125.149]) by menubar.gnome.org (Postfix) with ESMTP id 810783B0004 for ; Tue, 12 Dec 2006 09:22:36 -0500 (EST) Received: from burian.org (pilgrim.burian.org [192.168.0.1]) by pilgrim.burian.org (Postfix) with ESMTP id 66BA01BF26 for ; Tue, 12 Dec 2006 09:22:35 -0500 (EST) Message-ID: <457EBB2B.20907@burian.org> Date: Tue, 12 Dec 2006 09:22:35 -0500 From: "John M. Burian" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040127 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: gtk-perl-list@gnome.org Subject: Getting rid of ListStores References: <20060602084450.3b34d788.lacravate@mongueurs.net> <18B19E8C-91F7-4B8E-AFF5-2C3B6A5A392A@asofyet.org> In-Reply-To: <18B19E8C-91F7-4B8E-AFF5-2C3B6A5A392A@asofyet.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.112 tagged_above=-999 required=2 tests=[AWL=-0.113, BAYES_50=0.001] X-Spam-Score: -0.112 X-Spam-Level: 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, 12 Dec 2006 14:22:41 -0000 I have an application that creates and destroys a fair number of ComboBoxes, each of which requires a TreeModel (I'm using ListStores). I understand that I can use the same model for multiple ComboBoxes. The question is, ListStores aren't widgets, they don't have a destroy() method, so do they behave like plain ol' Perl data structures? That is, they persist so long as a reference is being held somewhere, but then get automatically garbage collected? Is Gtk okay with that? John From scott@asofyet.org Tue Dec 12 12:09:12 2006 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 E948E3B0236 for ; Tue, 12 Dec 2006 12:09:11 -0500 (EST) 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 20130-02 for ; Tue, 12 Dec 2006 12:09:01 -0500 (EST) Received: from webmail3.sd.dreamhost.com (webmail3.sd.dreamhost.com [64.111.100.15]) by menubar.gnome.org (Postfix) with ESMTP id A626B3B022E for ; Tue, 12 Dec 2006 12:09:00 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail3.sd.dreamhost.com (Postfix) with ESMTP id 094C214101 for ; Tue, 12 Dec 2006 09:08:53 -0800 (PST) Received: from 192.146.101.24 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Tue, 12 Dec 2006 12:08:53 -0500 (EST) Message-ID: <43969.192.146.101.24.1165943333.squirrel@webmail.asofyet.org> In-Reply-To: <457EBB2B.20907@burian.org> References: <20060602084450.3b34d788.lacravate@mongueurs.net> <18B19E8C-91F7-4B8E-AFF5-2C3B6A5A392A@asofyet.org> <457EBB2B.20907@burian.org> Date: Tue, 12 Dec 2006 12:08:53 -0500 (EST) Subject: Re: Getting rid of ListStores From: "muppet" To: gtk-perl-list@gnome.org User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.772 tagged_above=-999 required=2 tests=[AWL=-0.739, BAYES_05=-1.11, TW_GT=0.077] X-Spam-Score: -1.772 X-Spam-Level: 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, 12 Dec 2006 17:09:12 -0000 John M. Burian wrote: > I have an application that creates and destroys a fair number of > ComboBoxes, each of which requires a TreeModel (I'm using ListStores). I > understand that I can use the same model for multiple ComboBoxes. The > question is, ListStores aren't widgets, they don't have a destroy() > method, so do they behave like plain ol' Perl data structures? That is, > they persist so long as a reference is being held somewhere, but then > get automatically garbage collected? Is Gtk okay with that? Yes, they are supposed to behave like normal perl objects, which die when the last reference goes away. A wrinkle is that references held by gtk objects count, so you can have no perl references to object, but it will still live because a C object has a reference to it. (This is A Very Good Thing.) Be warned, however, that closures connected to signals, as well as user data parameters, take references on these objects, so it is very easy to create reference leaks by sloppy coding. -- muppet From beast@ldap.or.id Wed Dec 13 05:42:54 2006 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 5FE393B00AB for ; Wed, 13 Dec 2006 05:42:54 -0500 (EST) 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 10088-10 for ; Wed, 13 Dec 2006 05:42:52 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 839A63B0104 for ; Wed, 13 Dec 2006 05:42:51 -0500 (EST) Message-ID: <457FD94C.7080408@ldap.or.id> Date: Wed, 13 Dec 2006 17:43:24 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: 3d image border Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.668 tagged_above=-999 required=2 tests=[AWL=-2.914, BAYES_80=2, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: 0.668 X-Spam-Level: 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, 13 Dec 2006 10:42:54 -0000 I have an image and I would like it to have 3D border ( etched-in?). Which widget suitable for this purpose? Thanks. --beast From ebassi@gmail.com Wed Dec 13 05:51:45 2006 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 BFEE83B008D for ; Wed, 13 Dec 2006 05:51:45 -0500 (EST) 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 11283-03 for ; Wed, 13 Dec 2006 05:51:41 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by menubar.gnome.org (Postfix) with ESMTP id 0E6863B000A for ; Wed, 13 Dec 2006 05:51:41 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so464608nfc for ; Wed, 13 Dec 2006 02:51:40 -0800 (PST) Received: by 10.49.13.14 with SMTP id q14mr2731468nfi.1166007099884; Wed, 13 Dec 2006 02:51:39 -0800 (PST) Received: from ?192.168.1.65? ( [86.133.113.100]) by mx.google.com with ESMTP id p43sm6483312nfa.2006.12.13.02.51.38; Wed, 13 Dec 2006 02:51:39 -0800 (PST) Subject: Re: 3d image border From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <457FD94C.7080408@ldap.or.id> References: <457FD94C.7080408@ldap.or.id> Content-Type: text/plain Date: Wed, 13 Dec 2006 10:51:37 +0000 Message-Id: <1166007097.8578.7.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.547 tagged_above=-999 required=2 tests=[AWL=0.053, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.547 X-Spam-Level: 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, 13 Dec 2006 10:51:45 -0000 On Wed, 2006-12-13 at 17:43 +0700, beast wrote: > I have an image and I would like it to have 3D border ( etched-in?). > Which widget suitable for this purpose? Gtk2::Frame with a Gtk2::Image embedded in? ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From beast@ldap.or.id Wed Dec 13 06:17:16 2006 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 500A93B000E for ; Wed, 13 Dec 2006 06:17:16 -0500 (EST) 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 12166-07 for ; Wed, 13 Dec 2006 06:17:13 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 551643B0017 for ; Wed, 13 Dec 2006 06:17:13 -0500 (EST) Message-ID: <457FE14B.5080802@ldap.or.id> Date: Wed, 13 Dec 2006 18:17:31 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Cc: gtk-perl-list@gnome.org Subject: Re: 3d image border References: <457FD94C.7080408@ldap.or.id> <1166007097.8578.7.camel@localhost> In-Reply-To: <1166007097.8578.7.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.402 tagged_above=-999 required=2 tests=[AWL=-1.799, BAYES_40=-0.185, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.402 X-Spam-Level: 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, 13 Dec 2006 11:17:16 -0000 Emmanuele Bassi wrote: > On Wed, 2006-12-13 at 17:43 +0700, beast wrote: > >> I have an image and I would like it to have 3D border ( etched-in?). >> Which widget suitable for this purpose? >> > > Gtk2::Frame with a Gtk2::Image embedded in? > > Not quite. The image should not be embossed, but much like button when pressed in. Sorry for the poor description. --beast From ebassi@gmail.com Wed Dec 13 06:38:57 2006 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 C146B3B0077 for ; Wed, 13 Dec 2006 06:38:57 -0500 (EST) 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 13335-10 for ; Wed, 13 Dec 2006 06:38:54 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by menubar.gnome.org (Postfix) with ESMTP id 14E343B000E for ; Wed, 13 Dec 2006 06:38:54 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so473655nfc for ; Wed, 13 Dec 2006 03:38:53 -0800 (PST) Received: by 10.48.202.14 with SMTP id z14mr2782284nff.1166009933273; Wed, 13 Dec 2006 03:38:53 -0800 (PST) Received: from ?192.168.1.65? ( [86.133.113.100]) by mx.google.com with ESMTP id c1sm6620422nfe.2006.12.13.03.38.52; Wed, 13 Dec 2006 03:38:53 -0800 (PST) Subject: Re: 3d image border From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <457FE14B.5080802@ldap.or.id> References: <457FD94C.7080408@ldap.or.id> <1166007097.8578.7.camel@localhost> <457FE14B.5080802@ldap.or.id> Content-Type: text/plain Date: Wed, 13 Dec 2006 11:38:51 +0000 Message-Id: <1166009931.8578.11.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.549 tagged_above=-999 required=2 tests=[AWL=0.051, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.549 X-Spam-Level: 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, 13 Dec 2006 11:38:58 -0000 hi; On Wed, 2006-12-13 at 18:17 +0700, beast wrote: > Emmanuele Bassi wrote: > > On Wed, 2006-12-13 at 17:43 +0700, beast wrote: > > > >> I have an image and I would like it to have 3D border ( etched-in?). > >> Which widget suitable for this purpose? > >> > > > > Gtk2::Frame with a Gtk2::Image embedded in? > > > > > Not quite. The image should not be embossed, but much like button when > pressed in. then a Gtk2::ToggleButton with a Gtk2::Image embedded in, and set the "toggled" property to TRUE (and disable the untoggling). :-) if you want *the image itself* to be embossed, you should get the Gtk2::Gdk::Pixbuf, extract the raw data and filter it using an embossing graphic filter routine - I think it's quite easy to find on google. ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From beast@ldap.or.id Wed Dec 13 07:07:15 2006 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 E00073B00B5 for ; Wed, 13 Dec 2006 07:07:15 -0500 (EST) 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 14762-06 for ; Wed, 13 Dec 2006 07:07:13 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id A9B923B0004 for ; Wed, 13 Dec 2006 07:07:12 -0500 (EST) Message-ID: <457FED03.6030409@ldap.or.id> Date: Wed, 13 Dec 2006 19:07:31 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: 3d image border References: <457FD94C.7080408@ldap.or.id> <1166007097.8578.7.camel@localhost> <457FE14B.5080802@ldap.or.id> <1166009931.8578.11.camel@localhost> In-Reply-To: <1166009931.8578.11.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.851 tagged_above=-999 required=2 tests=[AWL=-1.323, BAYES_05=-1.11, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.851 X-Spam-Level: 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, 13 Dec 2006 12:07:16 -0000 Emmanuele Bassi wrote: > hi; > > On Wed, 2006-12-13 at 18:17 +0700, beast wrote: > >> Emmanuele Bassi wrote: >> >>> On Wed, 2006-12-13 at 17:43 +0700, beast wrote: >>> >>> >>>> I have an image and I would like it to have 3D border ( etched-in?). >>>> Which widget suitable for this purpose? >>>> >>>> >>> Gtk2::Frame with a Gtk2::Image embedded in? >>> >>> >>> >> Not quite. The image should not be embossed, but much like button when >> pressed in. >> > > then a Gtk2::ToggleButton with a Gtk2::Image embedded in, and set the > "toggled" property to TRUE (and disable the untoggling). :-) > > I'll give it a try, not so important though :) Thanks. --beast From beast@ldap.or.id Wed Dec 13 07:11:13 2006 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 907A53B006D for ; Wed, 13 Dec 2006 07:11:13 -0500 (EST) 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 14886-10 for ; Wed, 13 Dec 2006 07:11:11 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id A32663B008A for ; Wed, 13 Dec 2006 07:11:09 -0500 (EST) Message-ID: <457FEDED.90004@ldap.or.id> Date: Wed, 13 Dec 2006 19:11:25 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: need spacer Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.285 tagged_above=-999 required=2 tests=[AWL=-1.868, BAYES_50=0.001, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.285 X-Spam-Level: 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, 13 Dec 2006 12:11:13 -0000 I would like to have 10px space between next and cancel. [ back ] [ next ] [cancel] however, this following code gives more spaces than what I need. I think its due to homogeneous settings. my $hbbox = Gtk2::HButtonBox->new(); $hbbox->set_layout("end"); $hbbox->set_spacing(2); $hbbox->set_homogeneous(FALSE); my $spacer = Gtk2::Label->new(); $spacer->set_size_request(0,8); $hbbox->add($back); $hbbox->add($next); $hbbox->add($spacer); $hbbox->add($cancel); --beast From ebassi@gmail.com Wed Dec 13 07:15:20 2006 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 2EF933B014A for ; Wed, 13 Dec 2006 07:15:20 -0500 (EST) 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 15318-01 for ; Wed, 13 Dec 2006 07:15:15 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by menubar.gnome.org (Postfix) with ESMTP id 1EE513B0109 for ; Wed, 13 Dec 2006 07:15:15 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so480486nfc for ; Wed, 13 Dec 2006 04:15:14 -0800 (PST) Received: by 10.49.10.3 with SMTP id n3mr2873375nfi.1166012114018; Wed, 13 Dec 2006 04:15:14 -0800 (PST) Received: from ?192.168.1.65? ( [86.133.113.100]) by mx.google.com with ESMTP id k23sm6729057nfc.2006.12.13.04.15.13; Wed, 13 Dec 2006 04:15:13 -0800 (PST) Subject: Re: need spacer From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <457FEDED.90004@ldap.or.id> References: <457FEDED.90004@ldap.or.id> Content-Type: text/plain Date: Wed, 13 Dec 2006 12:15:11 +0000 Message-Id: <1166012111.8578.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.551 tagged_above=-999 required=2 tests=[AWL=0.049, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.551 X-Spam-Level: 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, 13 Dec 2006 12:15:20 -0000 hi; On Wed, 2006-12-13 at 19:11 +0700, beast wrote: > I would like to have 10px space between next and cancel. > > [ back ] [ next ] [cancel] > > however, this following code gives more spaces than what I need. I think > its due to homogeneous settings. > > my $hbbox = Gtk2::HButtonBox->new(); > $hbbox->set_layout("end"); > $hbbox->set_spacing(2); > $hbbox->set_homogeneous(FALSE); > > my $spacer = Gtk2::Label->new(); > $spacer->set_size_request(0,8); > > $hbbox->add($back); > $hbbox->add($next); > $hbbox->add($spacer); > $hbbox->add($cancel); drop the button box and use a Gtk2::Alignment: Gtk2::HBox +---- Gtk2::Button [back] +---- Gtk2::Button [next] +---- Gtk2::Alignment +---- Gtk2::Button [cancel] set the alignment to full right and add a padding of 10 px on the left; this should solve your problem. ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From zentara1@sbcglobal.net Wed Dec 13 12:36:41 2006 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 6E9283B00D1 for ; Wed, 13 Dec 2006 12:36:41 -0500 (EST) 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 03078-09 for ; Wed, 13 Dec 2006 12:36:38 -0500 (EST) Received: from smtp108.sbc.mail.re2.yahoo.com (smtp108.sbc.mail.re2.yahoo.com [68.142.229.97]) by menubar.gnome.org (Postfix) with SMTP id 188D33B0088 for ; Wed, 13 Dec 2006 12:36:38 -0500 (EST) Received: (qmail 99905 invoked from network); 13 Dec 2006 17:36:37 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.251.24.114 with login) by smtp108.sbc.mail.re2.yahoo.com with SMTP; 13 Dec 2006 17:36:37 -0000 X-YMail-OSG: GYhxMeoVM1ne087MsyrFKeE7g4SAM5dlp_szxrKD74tiEY_TT_dIGbo0wm6hxobDsjj7dM_HIgj8z1QIJfeVzw.G91IXOylLBbXnMrGApp58_pn12eyF2uCU__G8M0aKof08JLyLTSTMjUuczFHJiKjaIBZkNz5zviHVxhoWqk5mze9NbooFfgLXmkLe Date: Wed, 13 Dec 2006 12:33:16 -0500 From: zentara To: gtk-perl-list@gnome.org Subject: Re: 3d image border Message-ID: <20061213123316.6b666782@zentara.zentara.net> In-Reply-To: <457FD94C.7080408@ldap.or.id> References: <457FD94C.7080408@ldap.or.id> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.042 tagged_above=-999 required=2 tests=[AWL=-0.351, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.042 X-Spam-Level: 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, 13 Dec 2006 17:36:41 -0000 On Wed, 13 Dec 2006 17:43:24 +0700 beast wrote: > >I have an image and I would like it to have 3D border ( etched-in?). >Which widget suitable for this purpose? >Thanks. >--beast Does this give you ideas? #!/usr/bin/perl use warnings; use strict; ################################################# # An example illustrating images and markup. ################################################# use Gtk2 '-init'; my $window = Gtk2::Window->new; my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file("bridget-1.jpg"); my $image = Gtk2::Image->new_from_pixbuf($pixbuf); my $button = Gtk2::Button->new(); my $vbox = Gtk2::VBox->new(); my $label = Gtk2::Label->new("Press this button!"); $vbox->pack_start( $label, 0, 0, 0 ); $vbox->pack_start( $image, 0, 0, 0 ); $window->set( border_width => 15 ); $button->add($vbox); # <- You can pack any widget inside a button! $window->add($button); $button->signal_connect( clicked => sub { $label->set_markup( "Thank " . "" . "you!" ); } ); $window->signal_connect('destroy', sub { Gtk2->main_quit }); $window->show_all(); Gtk2->main; __END__ -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From beast@ldap.or.id Thu Dec 14 03:42:19 2006 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 369BC3B017D for ; Thu, 14 Dec 2006 03:42:19 -0500 (EST) 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 20268-04 for ; Thu, 14 Dec 2006 03:42:16 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 655393B0168 for ; Thu, 14 Dec 2006 03:42:16 -0500 (EST) Message-ID: <45810E86.5080907@ldap.or.id> Date: Thu, 14 Dec 2006 15:42:46 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: wizard style program Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.271 tagged_above=-999 required=2 tests=[AWL=-1.854, BAYES_50=0.001, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.271 X-Spam-Level: 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, 14 Dec 2006 08:42:19 -0000 I create wizard style program, and this give me headache of keeping the state of previous page as well as repetitives UI. With web applications, this can be implemented using "session", any idea how this can be implemented using desktop apps since there is no main window? Is there any simple example? Many thanks. --beast From beast@ldap.or.id Thu Dec 14 04:45:47 2006 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 D83463B01A2 for ; Thu, 14 Dec 2006 04:45:47 -0500 (EST) 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 24085-05 for ; Thu, 14 Dec 2006 04:45:45 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id C08EB3B01B2 for ; Thu, 14 Dec 2006 04:45:44 -0500 (EST) Message-ID: <45811D67.3080804@ldap.or.id> Date: Thu, 14 Dec 2006 16:46:15 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: combo box Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.258 tagged_above=-999 required=2 tests=[AWL=-1.841, BAYES_50=0.001, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.258 X-Spam-Level: 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, 14 Dec 2006 09:45:48 -0000 Is it required to use set_active($index) after creating a ComboBox? Isn't that index=0 is the default? Without activated, it drop down will be displayed but no text was printed. my $combo = Gtk2::ComboBox->new_text; $combo->append_text("No"); $combo->append_text("Yes"); #$combo->set_active(0); --beast From scott@asofyet.org Thu Dec 14 07:52:47 2006 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 B942A3B0004 for ; Thu, 14 Dec 2006 07:52:47 -0500 (EST) 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 03418-04 for ; Thu, 14 Dec 2006 07:52:43 -0500 (EST) Received: from looneymail-a5.dreamhost.com (sd-green-bigip-74.dreamhost.com [208.97.132.74]) by menubar.gnome.org (Postfix) with ESMTP id 65D4E3B000A for ; Thu, 14 Dec 2006 07:52:43 -0500 (EST) Received: from [192.168.0.103] (unknown [74.140.167.162]) by looneymail-a5.dreamhost.com (Postfix) with ESMTP id 83D3312256D; Thu, 14 Dec 2006 04:52:36 -0800 (PST) In-Reply-To: <45811D67.3080804@ldap.or.id> References: <45811D67.3080804@ldap.or.id> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <26AA458C-AF5A-4BE8-9777-E0E108BB9051@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: combo box Date: Thu, 14 Dec 2006 07:53:24 -0500 To: beast X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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: Thu, 14 Dec 2006 12:52:47 -0000 On Dec 14, 2006, at 4:46 AM, beast wrote: > Is it required to use set_active($index) after creating a ComboBox? > Isn't that index=0 is the default? > Without activated, it drop down will be displayed but no text was > printed. The ComboBox can be used with an editable entry to allow the user to enter something not in the dropdown list. With that in mind, not defaulting to index=0 seems to make more sense. As for why it doesn't attempt to use more intelligence to figure out that the box is not editable and should default to a list item --- that's a question for the gtk+ developers. From scott@asofyet.org Thu Dec 14 07:56:36 2006 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 167FE3B010A for ; Thu, 14 Dec 2006 07:56:36 -0500 (EST) 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 03754-01 for ; Thu, 14 Dec 2006 07:56:32 -0500 (EST) Received: from looneymail-a5.dreamhost.com (sd-green-bigip-74.dreamhost.com [208.97.132.74]) by menubar.gnome.org (Postfix) with ESMTP id C5CBE3B013B for ; Thu, 14 Dec 2006 07:56:26 -0500 (EST) Received: from [192.168.0.103] (unknown [74.140.167.162]) by looneymail-a5.dreamhost.com (Postfix) with ESMTP id 3026A1222E0; Thu, 14 Dec 2006 04:56:26 -0800 (PST) In-Reply-To: <45810E86.5080907@ldap.or.id> References: <45810E86.5080907@ldap.or.id> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1F631D8C-DFD7-4F47-9A32-6426892F3DBC@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: wizard style program Date: Thu, 14 Dec 2006 07:57:14 -0500 To: beast X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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: Thu, 14 Dec 2006 12:56:36 -0000 On Dec 14, 2006, at 3:42 AM, beast wrote: > I create wizard style program, and this give me headache of keeping > the > state of previous page as well as repetitives UI. > With web applications, this can be implemented using "session", any > idea > how this can be implemented using desktop apps since there is no main > window? Is there any simple example? Are you using Gnome2::Druid, or its gtk+ 2.10 replacement, Gtk2::Assistant? Or are you writing all of the wizard behavior yourself? I don't understand why you say there's no main window in which to store the state. Can you not attach your state to the window containing the wizard pages (regardless of with which widget it's implemented)? From beast@ldap.or.id Thu Dec 14 08:25:53 2006 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 F23533B00F8 for ; Thu, 14 Dec 2006 08:25:52 -0500 (EST) 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 05865-04 for ; Thu, 14 Dec 2006 08:25:50 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id BAF083B0070 for ; Thu, 14 Dec 2006 08:25:47 -0500 (EST) Message-ID: <458150F9.1010904@ldap.or.id> Date: Thu, 14 Dec 2006 20:26:17 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Re: wizard style program References: <45810E86.5080907@ldap.or.id> <1F631D8C-DFD7-4F47-9A32-6426892F3DBC@asofyet.org> In-Reply-To: <1F631D8C-DFD7-4F47-9A32-6426892F3DBC@asofyet.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.8 tagged_above=-999 required=2 tests=[AWL=-1.272, BAYES_05=-1.11, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.8 X-Spam-Level: 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, 14 Dec 2006 13:25:53 -0000 muppet wrote: > > On Dec 14, 2006, at 3:42 AM, beast wrote: > >> I create wizard style program, and this give me headache of keeping the >> state of previous page as well as repetitives UI. >> With web applications, this can be implemented using "session", any idea >> how this can be implemented using desktop apps since there is no main >> window? Is there any simple example? > > > Are you using Gnome2::Druid, or its gtk+ 2.10 replacement, > Gtk2::Assistant? Or are you writing all of the wizard behavior yourself? > > I don't understand why you say there's no main window in which to > store the state. Can you not attach your state to the window > containing the wizard pages (regardless of with which widget it's > implemented)? > I'm not using any modules right now as its only 5 pages long, but I'll give it a try. Thanks. Right now its 5 on separate file and i'm still figure out how to remove the duplicate window and only construct the changes (small part of window), not building the whole new window. --beast From beast@ldap.or.id Fri Dec 15 04:16:10 2006 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 78ABC3B00A8 for ; Fri, 15 Dec 2006 04:16:10 -0500 (EST) 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 02546-02 for ; Fri, 15 Dec 2006 04:16:08 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 43B5F3B00D6 for ; Fri, 15 Dec 2006 04:16:07 -0500 (EST) Message-ID: <458267F2.4080007@ldap.or.id> Date: Fri, 15 Dec 2006 16:16:34 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: Gtk2::Assistant [was Re: wizard style program References: <45810E86.5080907@ldap.or.id> <1F631D8C-DFD7-4F47-9A32-6426892F3DBC@asofyet.org> In-Reply-To: <1F631D8C-DFD7-4F47-9A32-6426892F3DBC@asofyet.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.328 tagged_above=-999 required=2 tests=[AWL=-1.725, BAYES_40=-0.185, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.328 X-Spam-Level: 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: Fri, 15 Dec 2006 09:16:10 -0000 muppet wrote: > > > Are you using Gnome2::Druid, or its gtk+ 2.10 replacement, > Gtk2::Assistant? Or are you writing all of the wizard behavior yourself? > I found Gtk2::Assistant in example directory, however it can not be run. Did I need to install it manually? Currently I only have perl-Glib and perl-Gtk2 installed. --beast From ebassi@gmail.com Fri Dec 15 04:24:53 2006 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 4A43F3B0119 for ; Fri, 15 Dec 2006 04:24:53 -0500 (EST) 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 03080-10 for ; Fri, 15 Dec 2006 04:24:42 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by menubar.gnome.org (Postfix) with ESMTP id C62173B0107 for ; Fri, 15 Dec 2006 04:24:38 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so1077992nfc for ; Fri, 15 Dec 2006 01:24:38 -0800 (PST) Received: by 10.49.41.18 with SMTP id t18mr2191259nfj.1166174677689; Fri, 15 Dec 2006 01:24:37 -0800 (PST) Received: from ?192.168.1.65? ( [86.133.113.100]) by mx.google.com with ESMTP id q27sm14390425nfc.2006.12.15.01.24.37; Fri, 15 Dec 2006 01:24:37 -0800 (PST) Subject: Re: Gtk2::Assistant [was Re: wizard style program From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <458267F2.4080007@ldap.or.id> References: <45810E86.5080907@ldap.or.id> <1F631D8C-DFD7-4F47-9A32-6426892F3DBC@asofyet.org> <458267F2.4080007@ldap.or.id> Content-Type: text/plain Date: Fri, 15 Dec 2006 09:24:35 +0000 Message-Id: <1166174675.6455.2.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.514 tagged_above=-999 required=2 tests=[AWL=0.009, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.514 X-Spam-Level: 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: Fri, 15 Dec 2006 09:24:53 -0000 On Fri, 2006-12-15 at 16:16 +0700, beast wrote: > muppet wrote: > > > > > > Are you using Gnome2::Druid, or its gtk+ 2.10 replacement, > > Gtk2::Assistant? Or are you writing all of the wizard behavior yourself? > > > I found Gtk2::Assistant in example directory, however it can not be > run. Did I need to install it manually? > Currently I only have perl-Glib and perl-Gtk2 installed. Gtk2::Assistant is a new widget added to gtk+ 2.10. You'll have to update your version of the gtk+ C library to the latest stable release (2.10.6) and recompile the gtk2-perl bindings against that. most distributions already have both gtk+ and the perl bindings up to date if you don't want to compile stuff yourself. ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From jeffrey.ratcliffe@gmail.com Fri Dec 15 09:09:50 2006 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 5C62A3B01BD for ; Fri, 15 Dec 2006 09:09:50 -0500 (EST) 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 18301-06 for ; Fri, 15 Dec 2006 09:09:47 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by menubar.gnome.org (Postfix) with ESMTP id C64D43B01BB for ; Fri, 15 Dec 2006 09:09:46 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so830482ugb for ; Fri, 15 Dec 2006 06:09:46 -0800 (PST) Received: by 10.49.21.8 with SMTP id y8mr2604452nfi.1166191785765; Fri, 15 Dec 2006 06:09:45 -0800 (PST) Received: by 10.78.162.17 with HTTP; Fri, 15 Dec 2006 06:09:45 -0800 (PST) Message-ID: <30e395780612150609w32bfe41ar65c0379e521808@mail.gmail.com> Date: Fri, 15 Dec 2006 15:09:45 +0100 From: "Jeffrey Ratcliffe" To: gtk-perl-list@gnome.org Subject: OT: Default email client MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.6 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.6 X-Spam-Level: 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: Fri, 15 Dec 2006 14:09:50 -0000 Hi all, Apologies for the fact that this is some way off topic, but I can't find the answer via Google: A user has requested the option to send the PDF output produced by my Gtk2-Perl application using the default email client. Is there any way of digging out, firstly which desktop is being used, and then which is the default email client? Then presumably each client has its own (if at all) command line options for composing a blank email with an attachment. Or is it all much easier? Regards Jeff From j.g.karssenberg@student.utwente.nl Fri Dec 15 10:03:14 2006 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 99AC13B0077 for ; Fri, 15 Dec 2006 10:03:14 -0500 (EST) 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 21223-09 for ; Fri, 15 Dec 2006 10:03:08 -0500 (EST) Received: from zoidberg.student.utwente.nl (pardus-larus.student.utwente.nl [130.89.162.38]) by menubar.gnome.org (Postfix) with ESMTP id 34A203B00A4 for ; Fri, 15 Dec 2006 10:03:08 -0500 (EST) Received: from [192.168.41.71] (unknown [192.168.41.71]) by zoidberg.student.utwente.nl (Postfix) with ESMTP id 8D7108274D; Fri, 15 Dec 2006 16:03:03 +0100 (CET) Message-ID: <4582B92C.8060704@student.utwente.nl> Date: Fri, 15 Dec 2006 16:03:08 +0100 From: Jaap Karssenberg User-Agent: Thunderbird 1.5.0.5 (X11/20060729) MIME-Version: 1.0 To: Jeffrey Ratcliffe Subject: Re: OT: Default email client References: <30e395780612150609w32bfe41ar65c0379e521808@mail.gmail.com> In-Reply-To: <30e395780612150609w32bfe41ar65c0379e521808@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.526 tagged_above=-999 required=2 tests=[AWL=0.073, BAYES_00=-2.599] X-Spam-Score: -2.526 X-Spam-Level: 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: Fri, 15 Dec 2006 15:03:14 -0000 Jeffrey Ratcliffe wrote: > Apologies for the fact that this is some way off topic, but I can't > find the answer via Google: > > A user has requested the option to send the PDF output produced by my > Gtk2-Perl application using the default email client. > > Is there any way of digging out, firstly which desktop is being used, > and then which is the default email client? Then presumably each > client has its own (if at all) command line options for composing a > blank email with an attachment. > > Or is it all much easier? There is ongoing discussion in the freedesktop.org mailing list on configuring standard applications, like the email client. However there is no standard for this yet. The easiest to do is to have the user specify the command. Prompt for the command the first time the user uses the feature and put it somewhere in your program settings. Most email clients can "open" a mailto: url. Attaching a file to this is quite difficult to do in a general way. You might need to resort to doing the multipart-mime encoding yourself and supply the whole base64 encoded content as mailto: url. This is not something you want to do if you can avoid it. Regards, -- Jaap From ebassi@gmail.com Fri Dec 15 10:14:43 2006 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 2426B3B0012 for ; Fri, 15 Dec 2006 10:14:43 -0500 (EST) 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 21551-10 for ; Fri, 15 Dec 2006 10:14:37 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by menubar.gnome.org (Postfix) with ESMTP id 43BE73B0157 for ; Fri, 15 Dec 2006 10:14:36 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so1146986nfc for ; Fri, 15 Dec 2006 07:14:35 -0800 (PST) Received: by 10.49.19.5 with SMTP id w5mr2674722nfi.1166195675138; Fri, 15 Dec 2006 07:14:35 -0800 (PST) Received: from ?192.168.1.65? ( [86.133.113.100]) by mx.google.com with ESMTP id g1sm11954598nfe.2006.12.15.07.14.33; Fri, 15 Dec 2006 07:14:33 -0800 (PST) Subject: Re: OT: Default email client From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <30e395780612150609w32bfe41ar65c0379e521808@mail.gmail.com> References: <30e395780612150609w32bfe41ar65c0379e521808@mail.gmail.com> Content-Type: text/plain Date: Fri, 15 Dec 2006 15:14:26 +0000 Message-Id: <1166195666.6455.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.514 tagged_above=-999 required=2 tests=[AWL=0.009, BAYES_00=-2.599, SPF_PASS=-0.001, TW_XD=0.077] X-Spam-Score: -2.514 X-Spam-Level: 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: Fri, 15 Dec 2006 15:14:43 -0000 On Fri, 2006-12-15 at 15:09 +0100, Jeffrey Ratcliffe wrote: > Hi all, > > Apologies for the fact that this is some way off topic, but I can't > find the answer via Google: > > A user has requested the option to send the PDF output produced by my > Gtk2-Perl application using the default email client. > > Is there any way of digging out, firstly which desktop is being used, > and then which is the default email client? Then presumably each > client has its own (if at all) command line options for composing a > blank email with an attachment. most desktop environments support an "open" command, followed by a mailto: URI; this will automatically call the user-defined mail user agent. For instance, under GNOME, the command: gnome-open mailto:foo@bar.baz will automatically open evolution, on the default installation. under the desktop environments supported by the XDG/Project Portland initiative, you can use xdg-email instead of gnome-open, which even allows you to specify the components of the email; make sure to check which DE are supported on: http://portland.freedesktop.org/wiki/ obviously this is not completely platform independent. if you are targeting another operating system, win32 and osx have their own API for calling email clients; you should check whether there's a Perl module covering those APIs. ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From rashwin28@gmail.com Sat Dec 16 15:21:04 2006 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 3298B3B00AE for ; Sat, 16 Dec 2006 15:21:04 -0500 (EST) 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 08799-05 for ; Sat, 16 Dec 2006 15:20:59 -0500 (EST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by menubar.gnome.org (Postfix) with ESMTP id 5D40C3B006A for ; Sat, 16 Dec 2006 15:20:59 -0500 (EST) Received: by py-out-1112.google.com with SMTP id a73so634089pye for ; Sat, 16 Dec 2006 12:20:59 -0800 (PST) Received: by 10.65.219.13 with SMTP id w13mr2569682qbq.1166300458595; Sat, 16 Dec 2006 12:20:58 -0800 (PST) Received: by 10.64.209.20 with HTTP; Sat, 16 Dec 2006 12:20:58 -0800 (PST) Message-ID: Date: Sun, 17 Dec 2006 01:50:58 +0530 From: "Ashwin Ramachandran" To: gtk-perl-list@gnome.org Subject: Control on Tree Row collapsing MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16832_22784666.1166300458559" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.413 tagged_above=-999 required=2 tests=[AWL=-0.468, BAYES_20=-0.74, HTML_00_10=0.795, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: -0.413 X-Spam-Level: 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, 16 Dec 2006 20:21:04 -0000 ------=_Part_16832_22784666.1166300458559 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, I need to have a mechanism in which I can control the collapsing of tree rows in my application. To elaborate a bit more for the given parent, child relationship: + ABC -- DEF -- MNP <-- Row selected. When the row MNP is selected, and its parent ABC is collapsed, then I want to popout a dialog box, mentioning that the row MNP is going to be un-selected and whether the user wants it or not. If the user is fine with it, then the collapsing goes through or if the user does not want it, then I need to cancel the collapse signal. [This behaviour is required for my application needs, where some extra information is required for a given tree row to be taken as inputs from the user]. The TreeSelection is connected to 'changed' signal and the TreeView to row-activated and collapsed signals, When the row MNP is selected and ABC is collapsed, I got the following signal events, a. first changed signal ['unselection ']of row MNP [In fact, I even have a set_filter_function set for my Treeselection, which is not called in such a case. Am not sure why] b. collapse of ABC I tried a blocking dialog box at signal a.[which muppet had suggested for a similar query in this list] and tried returning based on the dialog's return to stop the signal b. But somehow it does not work. The collapse[signal b.] always goes through irrespective of the blocking dialog box's return. Am I missing something here? Any help in this regard will be highly appreciated. Thanks Ashwin ------=_Part_16832_22784666.1166300458559 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All,
I need to have  a mechanism in which I can control the collapsing of tree rows in my application.
To elaborate a bit more for the given parent, child relationship:

+ ABC
  -- DEF
  -- MNP <-- Row selected.

When the row MNP is selected, and its parent ABC is collapsed, then I want to popout a dialog box, mentioning that
the row MNP is going to be un-selected and whether the user wants it or not. If the user is fine with it, then the collapsing
goes through or if the user does not want it, then I need to cancel the collapse signal.
[This behaviour is required for my application needs, where some extra information is required for a given tree row to be taken as inputs
from the user].

The TreeSelection is connected to 'changed' signal and the TreeView to row-activated and collapsed signals,
When the row MNP is selected and ABC is collapsed, I got the following signal events,
a. first changed signal ['unselection ']of row MNP [In fact, I even have a set_filter_function set for my Treeselection, which is not called in such a case. Am not sure why]
b. collapse of ABC

I tried a blocking dialog box at  signal a.[which muppet had suggested for a similar query in this list]
and tried returning based on the dialog's return to stop the signal b. But somehow it does not work.
The collapse[signal b.] always goes through irrespective of the blocking dialog box's return.

Am I missing something here? Any help in this regard will be highly appreciated.

Thanks
Ashwin




------=_Part_16832_22784666.1166300458559-- From kaffeetisch@gmx.de Sun Dec 17 09:10:52 2006 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 CD0B13B007C for ; Sun, 17 Dec 2006 09:10:52 -0500 (EST) 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 13152-08 for ; Sun, 17 Dec 2006 09:10:50 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 3F9833B00AD for ; Sun, 17 Dec 2006 09:10:49 -0500 (EST) Received: (qmail invoked by alias); 17 Dec 2006 14:10:48 -0000 Received: from port-212-202-210-216.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.210.216] by mail.gmx.net (mp019) with SMTP; 17 Dec 2006 15:10:48 +0100 X-Authenticated: #2092818 Subject: Re: Control on Tree Row collapsing From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: References: Content-Type: text/plain Date: Sun, 17 Dec 2006 15:10:47 +0100 Message-Id: <1166364647.4375.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 17 Dec 2006 14:10:53 -0000 On Sun, 2006-12-17 at 01:50 +0530, Ashwin Ramachandran wrote: > When the row MNP is selected, and its parent ABC is collapsed, then I > want to popout a dialog box, mentioning that > the row MNP is going to be un-selected and whether the user wants it > or not. If the user is fine with it, then the collapsing > goes through or if the user does not want it, then I need to cancel > the collapse signal. > [This behaviour is required for my application needs, where some extra > information is required for a given tree row to be taken as inputs > from the user]. Sounds like you want the "test-collapse-row" signal on the Gtk2::TreeView: -- Bye, -Torsten From rashwin28@gmail.com Sun Dec 17 13:40:05 2006 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 517FF3B0086 for ; Sun, 17 Dec 2006 13:40:05 -0500 (EST) 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 31539-05 for ; Sun, 17 Dec 2006 13:40:02 -0500 (EST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by menubar.gnome.org (Postfix) with ESMTP id E00CE3B021B for ; Sun, 17 Dec 2006 13:39:47 -0500 (EST) Received: by nz-out-0506.google.com with SMTP id r28so509396nza for ; Sun, 17 Dec 2006 10:39:47 -0800 (PST) Received: by 10.64.181.12 with SMTP id d12mr3543810qbf.1166380787393; Sun, 17 Dec 2006 10:39:47 -0800 (PST) Received: by 10.64.209.20 with HTTP; Sun, 17 Dec 2006 10:39:47 -0800 (PST) Message-ID: Date: Mon, 18 Dec 2006 00:09:47 +0530 From: "Ashwin Ramachandran" To: "Torsten Schoenfeld" Subject: Re: Control on Tree Row collapsing In-Reply-To: <1166364647.4375.6.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3719_10468683.1166380787358" References: <1166364647.4375.6.camel@localhost.localdomain> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.672 tagged_above=-999 required=2 tests=[AWL=0.850, BAYES_00=-2.599, HTML_MESSAGE=0.001, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -1.672 X-Spam-Level: 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, 17 Dec 2006 18:40:05 -0000 ------=_Part_3719_10468683.1166380787358 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Torsten. That was the signal that I was looking for. Moreover, in such a case, I also want to know, whether the collapse of a row, has happened on the parent which holds the selected tree item. Foreg: + ABC - 123 + DEF -456. < --- selected. When 456 is selected and ABC is collapsed, I do not want to throw any confirmation dialog. When 456 is selected and only in case DEF [or its parent] is collapsed, I want to throw the confirmation. With the signal for tree-collapse-row, I can now get the path and iter of the row collapsed. but how do I use that information to get information on whether that path[ie DEF] is the parent or parent's parent for 456[Assuming I have information pertaining to the iter and path of 456]. Is there any direct API to verify that? I checked ancestor and descendant, but both do not seem to work. [i can always manipulate the path string to verify my requirement on whether it is a parent or not, but I just wanted to check if there is already an API available to do that]. Thanks Ashwin On 12/17/06, Torsten Schoenfeld wrote: > > On Sun, 2006-12-17 at 01:50 +0530, Ashwin Ramachandran wrote: > > > When the row MNP is selected, and its parent ABC is collapsed, then I > > want to popout a dialog box, mentioning that > > the row MNP is going to be un-selected and whether the user wants it > > or not. If the user is fine with it, then the collapsing > > goes through or if the user does not want it, then I need to cancel > > the collapse signal. > > [This behaviour is required for my application needs, where some extra > > information is required for a given tree row to be taken as inputs > > from the user]. > > Sounds like you want the "test-collapse-row" signal on the > Gtk2::TreeView: > > < > http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#GtkTreeView-test-collapse-row > > > > -- > Bye, > -Torsten > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > ------=_Part_3719_10468683.1166380787358 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Torsten. That was the signal that I was looking for.

Moreover, in such a case, I also want to know, whether the collapse of a row, has happened
on the parent which holds the selected tree item. Foreg:
+ ABC
 - 123
+ DEF
 -456. < --- selected.

When 456 is selected and ABC is collapsed, I do not want to throw any confirmation dialog.
When 456 is selected and only in case DEF [or its parent] is collapsed, I want to throw the confirmation.

With the signal for tree-collapse-row, I can now get the path and iter of the row collapsed.
but how do I use that information to get information on whether that path[ie DEF] is the parent
or parent's parent for 456[Assuming I have information pertaining to the iter and path of 456].

Is there any direct API to verify that?

I checked ancestor and descendant, but both do not seem to work.
[i can always manipulate the path string to verify my requirement on whether it is a parent
or not, but I just wanted to check if there is already an API available to do that].

Thanks
Ashwin



On 12/17/06, Torsten Schoenfeld <kaffeetisch@gmx.de> wrote:
On Sun, 2006-12-17 at 01:50 +0530, Ashwin Ramachandran wrote:

> When the row MNP is selected, and its parent ABC is collapsed, then I
> want to popout a dialog box, mentioning that
> the row MNP is going to be un-selected and whether the user wants it
> or not. If the user is fine with it, then the collapsing
> goes through or if the user does not want it, then I need to cancel
> the collapse signal.
> [This behaviour is required for my application needs, where some extra
> information is required for a given tree row to be taken as inputs
> from the user].

Sounds like you want the "test-collapse-row" signal on the
Gtk2::TreeView:

< http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#GtkTreeView-test-collapse-row>

--
Bye,
-Torsten

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

------=_Part_3719_10468683.1166380787358-- From kaffeetisch@gmx.de Sun Dec 17 14:04:21 2006 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 CF6303B0099 for ; Sun, 17 Dec 2006 14:04:21 -0500 (EST) 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 00486-07 for ; Sun, 17 Dec 2006 14:04:18 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id D38213B0227 for ; Sun, 17 Dec 2006 14:04:15 -0500 (EST) Received: (qmail invoked by alias); 17 Dec 2006 19:04:14 -0000 Received: from port-212-202-210-216.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.210.216] by mail.gmx.net (mp045) with SMTP; 17 Dec 2006 20:04:14 +0100 X-Authenticated: #2092818 Subject: Re: Control on Tree Row collapsing From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: References: <1166364647.4375.6.camel@localhost.localdomain> Content-Type: text/plain Date: Sun, 17 Dec 2006 20:04:16 +0100 Message-Id: <1166382256.4375.15.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 17 Dec 2006 19:04:22 -0000 On Mon, 2006-12-18 at 00:09 +0530, Ashwin Ramachandran wrote: > With the signal for tree-collapse-row, I can now get the path and iter > of the row collapsed. > but how do I use that information to get information on whether that > path[ie DEF] is the parent > or parent's parent for 456[Assuming I have information pertaining to > the iter and path of 456]. > > Is there any direct API to verify that? > > I checked ancestor and descendant, but both do not seem to work. I think Gtk2::TreePath::is_ancestor or Gtk2::TreePath::is_descendant should work. Are you sure they don't do what you want? Untested code: $view->signal_connect(test_collapse_row => sub { my ($view, $iter, $path) = @_; my $selected_iter = $view->get_selection->get_selected; my $selected_path = $view->get_model->get_path ($selected_iter); if ($path->is_ancestor($selected_path)) { # ask the user and return TRUE or FALSE accordingly } return TRUE; # allow collapsing }); (For the record: displaying a modal dialog simply because the user collapsed a row seems rather strange. There's no potential for data loss and nothing happened that can't be reversed easily. So I don't see the need to get in the way of the user.) -- Bye, -Torsten From kaffeetisch@gmx.de Sun Dec 17 14:28:17 2006 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 4C8C23B0274 for ; Sun, 17 Dec 2006 14:28:17 -0500 (EST) 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 02197-04 for ; Sun, 17 Dec 2006 14:28:12 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id F1B7F3B023F for ; Sun, 17 Dec 2006 14:28:11 -0500 (EST) Received: (qmail invoked by alias); 17 Dec 2006 19:28:10 -0000 Received: from port-212-202-210-216.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.210.216] by mail.gmx.net (mp001) with SMTP; 17 Dec 2006 20:28:10 +0100 X-Authenticated: #2092818 Subject: Re: Win32 binaries ready From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: <457C9941.30806@gmx.net> References: <457BDF4D.9090705@gmx.net> <1165775423.4369.5.camel@localhost.localdomain> <457C9941.30806@gmx.net> Content-Type: text/plain Date: Sun, 17 Dec 2006 20:28:11 +0100 Message-Id: <1166383692.4375.27.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 17 Dec 2006 19:28:17 -0000 OK, no reply yet. No cookies for the win32 guys. But let's continue anyway. On Mon, 2006-12-11 at 00:33 +0100, Mario Fischer wrote: > > Your binaries seem to work great for me. I'd say let's wait some more > > days to allow testing by other people. If everything's fine (which > > silence would be an indicator of), let's upload them to the official > > place. > > It would be great if you allowed me to continue hosting them at my site > because I have got 50 GB of traffic and nothing to do with it. In return > I will instantly update the win32 packages when new (stable) releases > are available. My only objection to letting you do the hosting would be that nobody but you would then be able to release new PPMs. But since you're actually the only one capable of producing PPMs anyway, I don't think this matters that much. Is anyone seeing any problem with this? I changed our win32 site at to direct users at your site now. -- Bye, -Torsten From beast@ldap.or.id Tue Dec 19 07:06:50 2006 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 13F673B00FC for ; Tue, 19 Dec 2006 07:06:50 -0500 (EST) 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 31955-01 for ; Tue, 19 Dec 2006 07:06:46 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 8D3523B0018 for ; Tue, 19 Dec 2006 07:06:43 -0500 (EST) Message-ID: <4587D5EC.5000403@ldap.or.id> Date: Tue, 19 Dec 2006 19:07:08 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: default button Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.593 tagged_above=-999 required=2 tests=[AWL=-1.435, BAYES_20=-0.74, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.593 X-Spam-Level: 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, 19 Dec 2006 12:06:50 -0000 Hi All, I have this following error, what could be the problem? Gtk-WARNING **: gtkwidget.c:4007: widget not within a GtkWindow at ./setup.pl line 255. -- $next->set_flags('can-default'); $next->grab_default(); -- I want the next button to be the default action (having the keyboard focus). What is the correct flag, grab_focus or grab_default? Thanks. --beast From rashwin28@gmail.com Tue Dec 19 08:17:47 2006 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 4F0653B000E for ; Tue, 19 Dec 2006 08:17:47 -0500 (EST) 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 03773-04 for ; Tue, 19 Dec 2006 08:17:45 -0500 (EST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by menubar.gnome.org (Postfix) with ESMTP id C120F3B011C for ; Tue, 19 Dec 2006 08:17:43 -0500 (EST) Received: by py-out-1112.google.com with SMTP id f47so354708pye for ; Tue, 19 Dec 2006 05:17:43 -0800 (PST) Received: by 10.64.148.8 with SMTP id v8mr7204180qbd.1166534263271; Tue, 19 Dec 2006 05:17:43 -0800 (PST) Received: by 10.64.209.20 with HTTP; Tue, 19 Dec 2006 05:17:42 -0800 (PST) Message-ID: Date: Tue, 19 Dec 2006 18:47:42 +0530 From: "Ashwin Ramachandran" To: gtk-perl-list@gnome.org Subject: Changing the foreground color of a Combo/Text Entry widget MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3510_26757137.1166534262484" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.156 tagged_above=-999 required=2 tests=[AWL=-0.767, BAYES_20=-0.74, HTML_10_20=1.351, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: -0.156 X-Spam-Level: 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, 19 Dec 2006 13:17:47 -0000 ------=_Part_3510_26757137.1166534262484 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, I need to change the foreground color in a combo/text entry widget, which has its state set to insensitive. The foreground is to be changed, since the users have problem reading the text[default foreground] in these widgets, when the widget is insensitive. [I need to make the text in the insensitive widget a bit darker]. I tried using the 'modify_fg' API for a widget, but it does not seem to change the foreground color. For eg: my $color = Gtk2::Gdk::Color->new(x,x,x); $combo_box->modify_fg('insensitive', $color); I also tried the $style property[Gtk2::Style], but it seems to affect only a Gtk2::Window and not a widget. Am I missing something here? Or do I need to use any other API? Thanks In Advance, Ashwin Do I need to use any other API or a ------=_Part_3510_26757137.1166534262484 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All,
I need to change the foreground color in a combo/text entry widget, which has its state
set to insensitive. The foreground is to be changed, since the users have problem
reading the text[default foreground] in these widgets, when the widget is insensitive.
[I need to make the text in the insensitive widget a bit darker].

I tried using the 'modify_fg' API for a widget, but it does not seem to change the foreground
color.
For eg:
my $color = Gtk2::Gdk::Color->new(x,x,x);
$combo_box->modify_fg('insensitive', $color);

I also tried the $style property[Gtk2::Style], but it seems to affect only a Gtk2::Window
and not a widget.

Am I missing something here? Or do I need to use any other API?

Thanks In Advance,
Ashwin



Do I need to use any other API or a
------=_Part_3510_26757137.1166534262484-- From evilynux@gmail.com Tue Dec 19 13:54:03 2006 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 66E973B0083 for ; Tue, 19 Dec 2006 13:54:03 -0500 (EST) 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 22981-09 for ; Tue, 19 Dec 2006 13:54:00 -0500 (EST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.237]) by menubar.gnome.org (Postfix) with ESMTP id 6124A3B0004 for ; Tue, 19 Dec 2006 13:54:00 -0500 (EST) Received: by wr-out-0506.google.com with SMTP id i7so1336461wra for ; Tue, 19 Dec 2006 10:53:59 -0800 (PST) Received: by 10.90.29.2 with SMTP id c2mr5843092agc.1166554439736; Tue, 19 Dec 2006 10:53:59 -0800 (PST) Received: by 10.90.31.11 with HTTP; Tue, 19 Dec 2006 10:53:59 -0800 (PST) Message-ID: <6ffb82fd0612191053k6291d890o3bc5693401a8d5ab@mail.gmail.com> Date: Tue, 19 Dec 2006 13:53:59 -0500 From: "Pascal Giard" To: beast Subject: Re: default button In-Reply-To: <4587D5EC.5000403@ldap.or.id> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4587D5EC.5000403@ldap.or.id> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.523 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.523 X-Spam-Level: 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, 19 Dec 2006 18:54:03 -0000 Hi, your warning message is unrelated to your question... The warning tells you that you most likely forgot to attach your button to the window. -Pascal On 12/19/06, beast wrote: > Hi All, > > I have this following error, what could be the problem? > > Gtk-WARNING **: gtkwidget.c:4007: widget not within a GtkWindow at > ./setup.pl line 255. > > -- > $next->set_flags('can-default'); > $next->grab_default(); > -- > > I want the next button to be the default action (having the keyboard > focus). What is the correct flag, grab_focus or grab_default? > Thanks. > > > --beast > > > > > > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > --=20 Homepage (http://organact.mine.nu) Debian GNU/Linux (http://www.debian.org) =C9cole de technologie sup=E9rieure (http://www.etsmtl.ca) From scott@asofyet.org Tue Dec 19 14:21:37 2006 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 C63A93B0073 for ; Tue, 19 Dec 2006 14:21:37 -0500 (EST) 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 24774-04 for ; Tue, 19 Dec 2006 14:21:32 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-74.dreamhost.com [208.97.132.74]) by menubar.gnome.org (Postfix) with ESMTP id 9EFB73B006B for ; Tue, 19 Dec 2006 14:21:32 -0500 (EST) Received: from [192.168.0.100] (unknown [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id B727A11330C; Tue, 19 Dec 2006 11:21:26 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Subject: Re: Changing the foreground color of a Combo/Text Entry widget Date: Tue, 19 Dec 2006 14:21:25 -0500 To: "Ashwin Ramachandran" X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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, 19 Dec 2006 19:21:37 -0000 On Dec 19, 2006, at 8:17 AM, Ashwin Ramachandran wrote: > I tried using the 'modify_fg' API for a widget, but it does not > seem to change the foreground > color. "fg" is the foreground color for "normal" widgets, such as labels, and "bg" is the background color. "text" is the text color in editable widget, and "base" is the editable's background color. gtk_widget_modify_text() http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#id3689173 Gtk2::Widget::modify_text() Somewhere in the API reference manual there is an explanation of which colors are used where, but i can't remember where it was. From scott@asofyet.org Tue Dec 19 14:28:10 2006 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 308093B0002 for ; Tue, 19 Dec 2006 14:28:10 -0500 (EST) 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 24995-10 for ; Tue, 19 Dec 2006 14:28:06 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-81.dreamhost.com [208.97.132.81]) by menubar.gnome.org (Postfix) with ESMTP id 1DFEE3B007B for ; Tue, 19 Dec 2006 14:28:04 -0500 (EST) Received: from [192.168.0.100] (unknown [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id 8C5FE11330C; Tue, 19 Dec 2006 11:27:59 -0800 (PST) In-Reply-To: <4587D5EC.5000403@ldap.or.id> References: <4587D5EC.5000403@ldap.or.id> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <50EB6896-8A28-48CE-836D-4E8400477CED@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: default button Date: Tue, 19 Dec 2006 14:27:58 -0500 To: beast X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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, 19 Dec 2006 19:28:10 -0000 On Dec 19, 2006, at 7:07 AM, beast wrote: > I have this following error, what could be the problem? > > Gtk-WARNING **: gtkwidget.c:4007: widget not within a GtkWindow at > ./setup.pl line 255. > > -- > $next->set_flags('can-default'); > $next->grab_default(); > -- You're calling grab_default() on $next before $next has been packed into the widget tree. > I want the next button to be the default action (having the keyboard > focus). What is the correct flag, grab_focus or grab_default? > Thanks. grab_default() is fine, but the widget must first be packed into a container such that it has a toplevel window. The implementation of gtk_widget_grab_default() is essentially $widget->get_toplevel()->set_default ($widget); This is because all key events actually get handled by the toplevel window, and the toplevel window has to know which child widget to activate when the user activates the default. From canderson@minotstateu.edu Tue Dec 19 17:04:12 2006 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 1FF763B010A for ; Tue, 19 Dec 2006 17:04:12 -0500 (EST) 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 02817-09 for ; Tue, 19 Dec 2006 17:04:03 -0500 (EST) Received: from exchange2.poste.ad.misu.nodak.edu (exchange2.poste.ad.misu.nodak.edu [165.234.215.12]) by menubar.gnome.org (Postfix) with ESMTP id 3D4423B0139 for ; Tue, 19 Dec 2006 17:04:03 -0500 (EST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C723B9.97A542A9" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: display/update a jpeg image? Date: Tue, 19 Dec 2006 16:04:02 -0600 Message-ID: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: display/update a jpeg image? Thread-Index: AccjuZeeQRCA8L6UR1CuKW/mGdHtDw== From: "Colin Anderson" To: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.376 tagged_above=-999 required=2 tests=[BAYES_50=0.001, HTML_30_40=0.374, HTML_MESSAGE=0.001] X-Spam-Score: 0.376 X-Spam-Level: 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, 19 Dec 2006 22:04:12 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C723B9.97A542A9 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am trying to make a simple image viewer application. My script reads = in the file names from a directory of .jpg images and uses these names = to fill a List widget. I would like to display the first image in the = list by default and have that image updated/replaced every time another = image is selected from the List widget. How do I go about doing this? Is = there some sample code I could reference? I have done some searching in = the tutorials and docs, but can only find very basic pixmap examples. TIA ------_=_NextPart_001_01C723B9.97A542A9 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable display/update a jpeg image?

I am trying to make a simple image viewer application. = My script reads in the file names from a directory of .jpg images and = uses these names to fill a List widget. I would like to display the = first image in the list by default and have that image updated/replaced = every time another image is selected from the List widget. How do I go = about doing this? Is there some sample code I could reference? I have = done some searching in the tutorials and docs, but can only find very = basic pixmap examples.
TIA

------_=_NextPart_001_01C723B9.97A542A9-- From scott@asofyet.org Tue Dec 19 18:50:45 2006 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 1F9053B002A for ; Tue, 19 Dec 2006 18:50:45 -0500 (EST) 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 09967-08 for ; Tue, 19 Dec 2006 18:50:40 -0500 (EST) Received: from looneymail-a2.dreamhost.com (sd-green-bigip-202.dreamhost.com [208.97.132.202]) by menubar.gnome.org (Postfix) with ESMTP id 8DB913B006C for ; Tue, 19 Dec 2006 18:50:40 -0500 (EST) Received: from [192.168.0.100] (unknown [74.140.167.162]) by looneymail-a2.dreamhost.com (Postfix) with ESMTP id CE1BB16EE23; Tue, 19 Dec 2006 15:50:39 -0800 (PST) In-Reply-To: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> References: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <82241126-CFD3-442D-815F-B46DBCBD004D@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: display/update a jpeg image? Date: Tue, 19 Dec 2006 18:50:38 -0500 To: Colin Anderson X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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, 19 Dec 2006 23:50:45 -0000 On Dec 19, 2006, at 5:04 PM, Colin Anderson wrote: > I am trying to make a simple image viewer application. My script > reads in the file names from a directory of .jpg images and uses > these names to fill a List widget. I would like to display the > first image in the list by default and have that image updated/ > replaced every time another image is selected from the List widget. > How do I go about doing this? Is there some sample code I could > reference? I have done some searching in the tutorials and docs, > but can only find very basic pixmap examples. If your needs are simple, then Gtk2::Image does this nicely, as in the code below. Also illustrates how to convert filenames to and from unicode (i hope i did that right, works for me), respond to a tree selection, and make one side of a paned widget sticky. Please be gentle, i only spent about ten minutes on it. If you need scaling or any sort of effects, you'll have work to do. #!/usr/bin/perl -w use strict; use Gtk2 -init; use Glib qw(TRUE FALSE); use File::Spec; use File::Basename; my $directory = shift @ARGV || '.'; my $liststore = Gtk2::ListStore->new ('Glib::String'); foreach my $file (<$directory/*.jpg>) { $file = Glib::filename_to_unicode (basename $file); $liststore->set ($liststore->append, 0, $file); } my $window = Gtk2::Window->new; $window->signal_connect (destroy => sub { Gtk2->main_quit }); my $hpaned = Gtk2::HPaned->new; my $image = Gtk2::Image->new; my $treeview = Gtk2::TreeView->new ($liststore); $treeview->insert_column_with_attributes (-1, 'File name', Gtk2::CellRendererText->new, text => 0); $treeview->get_selection->signal_connect (changed => sub { my $selection = shift; my ($model, $iter) = $selection->get_selected; my $file = $model->get ($iter, 0); $file = Glib::filename_from_unicode ($file); $file = File::Spec->catfile ($directory, $file); $image->set_from_file ($file); }); $window->add ($hpaned); $hpaned->pack1 (scrolled ($treeview, FALSE), FALSE, FALSE); $hpaned->pack2 (scrolled ($image, TRUE), TRUE, TRUE); $window->show_all; Gtk2->main; sub scrolled { my $widget = shift; my $use_viewport = shift; my $scroller = Gtk2::ScrolledWindow->new; $scroller->set_policy ('automatic', 'automatic'); # There should be a way to figure out from perl whether this is # necessary, but i don't feel like poking at the docs that much. :-P if ($use_viewport) { $scroller->add_with_viewport ($widget); } else { $scroller->add ($widget); } return $scroller; } From chas.owens@gmail.com Tue Dec 19 18:57:01 2006 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 A36D63B0083 for ; Tue, 19 Dec 2006 18:57:01 -0500 (EST) 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 10260-08 for ; Tue, 19 Dec 2006 18:56:59 -0500 (EST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.236]) by menubar.gnome.org (Postfix) with ESMTP id 41ED53B006C for ; Tue, 19 Dec 2006 18:56:59 -0500 (EST) Received: by wr-out-0506.google.com with SMTP id i7so1408264wra for ; Tue, 19 Dec 2006 15:56:58 -0800 (PST) Received: by 10.78.185.15 with SMTP id i15mr4607805huf.1166572618029; Tue, 19 Dec 2006 15:56:58 -0800 (PST) Received: by 10.78.188.19 with HTTP; Tue, 19 Dec 2006 15:56:57 -0800 (PST) Message-ID: <58ce48dc0612191556l4cb0992chce4030ce94a441c6@mail.gmail.com> Date: Tue, 19 Dec 2006 18:56:57 -0500 From: "Chas Owens" To: gtk-perl-list@gnome.org Subject: re: display/update a jpeg image? In-Reply-To: <58ce48dc0612191556p357b9976yb57b5af415a3f5e8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> <58ce48dc0612191556p357b9976yb57b5af415a3f5e8@mail.gmail.com> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.207 tagged_above=-999 required=2 tests=[AWL=0.393, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.207 X-Spam-Level: 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, 19 Dec 2006 23:57:01 -0000 ---------- Forwarded message ---------- From: Chas Owens Date: Dec 19, 2006 6:56 PM Subject: Re: display/update a jpeg image? To: Colin Anderson > I am trying to make a simple image viewer application. My script reads in the file names > from a directory of .jpg images and uses these names to fill a List widget. > I would like to display the first image in the list by default and have that image > updated/replaced every time another image is selected from the List widget. How do I go > about doing this? Is there some sample code I could reference? I have done some > searching in the tutorials and docs, but can only find very basic pixmap examples. > TIA #!/usr/bin/perl use strict; use warnings; use Gtk2; use Gtk2::Ex::Simple::List; Gtk2->init; my $w = Gtk2::Window->new; my $hpaned = Gtk2::HPaned->new; my $sw = Gtk2::ScrolledWindow->new; my $list = Gtk2::Ex::Simple::List->new('filename' => 'text'); my $img = Gtk2::Image->new_from_file($ARGV[0]); $w->add($hpaned); $hpaned->add1($sw); $sw->add($list); $hpaned->add2($img); @{$list->{data}} = @ARGV; $list->signal_connect('cursor_changed' => sub { my $list = shift; my ($model, $iter) = $list->get_selection->get_selected; $img->set_from_file($model->get_value($iter, 0)); }); $sw->set_policy('automatic', 'automatic'); $hpaned->set_position(200); $w->signal_connect('destroy', sub { Gtk2->main_quit }); $w->set_default_size(640, 480); $w->show_all; Gtk2->main; From chas.owens@gmail.com Tue Dec 19 19:21:24 2006 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 5F9703B007B for ; Tue, 19 Dec 2006 19:21:24 -0500 (EST) 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 11212-06 for ; Tue, 19 Dec 2006 19:21:21 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by menubar.gnome.org (Postfix) with ESMTP id C91893B0083 for ; Tue, 19 Dec 2006 19:21:20 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so1989291ugb for ; Tue, 19 Dec 2006 16:21:20 -0800 (PST) Received: by 10.78.138.6 with SMTP id l6mr4586149hud.1166574079928; Tue, 19 Dec 2006 16:21:19 -0800 (PST) Received: by 10.78.188.19 with HTTP; Tue, 19 Dec 2006 16:21:14 -0800 (PST) Message-ID: <58ce48dc0612191621nab951b1qaecd95b7d8c55432@mail.gmail.com> Date: Tue, 19 Dec 2006 19:21:14 -0500 From: "Chas Owens" To: gtk-perl-list@gnome.org Subject: Re: display/update a jpeg image? In-Reply-To: <82241126-CFD3-442D-815F-B46DBCBD004D@asofyet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> <82241126-CFD3-442D-815F-B46DBCBD004D@asofyet.org> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.561 tagged_above=-999 required=2 tests=[AWL=-0.038, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GD=0.077] X-Spam-Score: -2.561 X-Spam-Level: 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, 20 Dec 2006 00:21:24 -0000 On 12/19/06, muppet wrote: snip > # There should be a way to figure out from perl whether this is > # necessary, but i don't feel like poking at the docs that much. :-P > if ($use_viewport) { > $scroller->add_with_viewport ($widget); > } else { > $scroller->add ($widget); > } snip IIRC, the reason you need a viewport is the lack of a gdk window on some widgets. If so then if ($widget->no_window) { $scroller->add_with_viewport ($widget); } else { $scroller->add ($widget); } should work. From chas.owens@gmail.com Tue Dec 19 19:38:31 2006 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 2446C3B0004 for ; Tue, 19 Dec 2006 19:38:31 -0500 (EST) 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 11947-10 for ; Tue, 19 Dec 2006 19:38:28 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by menubar.gnome.org (Postfix) with ESMTP id 838E83B0017 for ; Tue, 19 Dec 2006 19:38:27 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so1994064ugb for ; Tue, 19 Dec 2006 16:38:26 -0800 (PST) Received: by 10.78.47.15 with SMTP id u15mr4498523huu.1166575106740; Tue, 19 Dec 2006 16:38:26 -0800 (PST) Received: by 10.78.188.19 with HTTP; Tue, 19 Dec 2006 16:38:26 -0800 (PST) Message-ID: <58ce48dc0612191638q61335ebie5c7ecab77da4b2a@mail.gmail.com> Date: Tue, 19 Dec 2006 19:38:26 -0500 From: "Chas Owens" To: gtk-perl-list@gnome.org Subject: Re: display/update a jpeg image? In-Reply-To: <58ce48dc0612191621nab951b1qaecd95b7d8c55432@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> <82241126-CFD3-442D-815F-B46DBCBD004D@asofyet.org> <58ce48dc0612191621nab951b1qaecd95b7d8c55432@mail.gmail.com> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.542 tagged_above=-999 required=2 tests=[AWL=-0.019, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GD=0.077] X-Spam-Score: -2.542 X-Spam-Level: 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, 20 Dec 2006 00:38:31 -0000 On 12/19/06, Chas Owens wrote: snip > IIRC, the reason you need a viewport is the lack of a gdk window on > some widgets. If so then snip Nope, I am an idiot. A widget is scrollable (without a viewport) if GtkWidgetClass::set_scroll_adjustments_signal is non-zero, but I don't know how to get to it. From beast@ldap.or.id Wed Dec 20 04:10:46 2006 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 282683B00A0 for ; Wed, 20 Dec 2006 04:10:46 -0500 (EST) 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 02323-06 for ; Wed, 20 Dec 2006 04:10:43 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 10FC43B0137 for ; Wed, 20 Dec 2006 04:10:41 -0500 (EST) Message-ID: <4588FE29.20104@ldap.or.id> Date: Wed, 20 Dec 2006 16:11:05 +0700 From: beast User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Subject: IP address input Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.788 tagged_above=-999 required=2 tests=[AWL=-2.794, BAYES_80=2, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: 0.788 X-Spam-Level: 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, 20 Dec 2006 09:10:46 -0000 I have a text entry which was require user to type an IP address. Ideally it should have this following format: IP Address: [ . . . ] Please note that "." is not user editable. Is it possible? of course, using 4 text entry is possible but thats ugly :) IP Address: [ ] . [ ] . [ ] . [ ] --beast From ed@catmur.co.uk Wed Dec 20 05:09:13 2006 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 F38323B0004 for ; Wed, 20 Dec 2006 05:09:12 -0500 (EST) 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 05220-05 for ; Wed, 20 Dec 2006 05:09:10 -0500 (EST) Received: from andromeda.catmur.co.uk (catmur.co.uk [64.79.194.180]) by menubar.gnome.org (Postfix) with ESMTP id C05373B000E for ; Wed, 20 Dec 2006 05:09:09 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) (uid 500) by andromeda.catmur.co.uk with local; Wed, 20 Dec 2006 10:09:04 +0000 id 00C282EC.45890BC0.00001580 References: <4588FE29.20104@ldap.or.id> In-Reply-To: <4588FE29.20104@ldap.or.id> From: "Ed Catmur" To: beast Subject: Re: IP address input Date: Wed, 20 Dec 2006 10:09:04 +0000 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_0_28255_1166609344_001" Message-ID: X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.54 tagged_above=-999 required=2 tests=[AWL=-0.993, BAYES_50=0.001, HTML_30_40=0.374, HTML_MESSAGE=0.001, TW_GT=0.077] X-Spam-Score: -0.54 X-Spam-Level: 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: Wed, 20 Dec 2006 10:09:13 -0000 --=_0_28255_1166609344_001 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit beast wrote: > I have a text entry which was require user to type an IP address. > Ideally it should have this following format: > > IP Address: [ . . . ] > > Please note that "." is not user editable. Is it possible? > > of course, using 4 text entry is possible but thats ugly :) > > IP Address: [ ] . [ ] . [ ] . [ ] You want IPEntry in libview: http://view.sourceforge.net/classes.php#ipentry Getting it to work in gtk-perl may be difficult, because libview is written in C++, but if you can't find or write bindings the widgets are reasonably well written and easy to port. Ed --=_0_28255_1166609344_001 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit beast wrote:
I have a text entry which was require user to type an IP address. Ideally it should have this following format:

IP Address:   [     .       .      .     ]

Please note that "." is not user editable. Is it possible?

of course, using 4 text entry is possible but thats ugly :)

IP Address:  [  ] . [   ] . [  ] . [   ]

You want IPEntry in libview: http://view.sourceforge.net/classes.php#ipentry

Getting it to work in gtk-perl may be difficult, because libview is written in C++, but if you can't find or write bindings the widgets are reasonably well written and easy to port.

Ed --=_0_28255_1166609344_001-- From zentara1@sbcglobal.net Wed Dec 20 08:27:09 2006 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 B990C3B0017 for ; Wed, 20 Dec 2006 08:27:09 -0500 (EST) 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 16809-03 for ; Wed, 20 Dec 2006 08:27:06 -0500 (EST) 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 3F07F3B0009 for ; Wed, 20 Dec 2006 08:27:06 -0500 (EST) Received: (qmail 3966 invoked from network); 20 Dec 2006 13:27:05 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.8.71 with login) by smtp110.sbc.mail.re2.yahoo.com with SMTP; 20 Dec 2006 13:27:05 -0000 X-YMail-OSG: Nlxebl8VM1kA4h2sw5hgEQl42_jmHasCPT2vAnkp4T.S51.uzX8QXIZaPBSg3imN95Qw1ef1FBgsSm3jaTCOZ_9yfRl2SzdokaOc2CARJYM_l7mOmQZ1OOL6ERLMdVf0nEud9OzNOrasctlNeH6o2S9uJkNHnJXV2Ey5I65A68bX.UmspYHC07kCNdcD Date: Wed, 20 Dec 2006 08:23:17 -0500 From: zentara To: gtk-perl-list@gnome.org Subject: Re: display/update a jpeg image? Message-ID: <20061220082317.1776c834@zentara.zentara.net> In-Reply-To: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> References: <2F8C81B56DDAE64F815A613A81576FFDB33C97@exchange2.poste.ad.misu.nodak.edu> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.321 tagged_above=-999 required=2 tests=[AWL=-0.630, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.321 X-Spam-Level: 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, 20 Dec 2006 13:27:09 -0000 On Tue, 19 Dec 2006 16:04:02 -0600 "Colin Anderson" wrote: >I am trying to make a simple image viewer application. My script reads in the file names from a directory of .jpg images and uses these names to fill a List widget. I would like to display the first image in the list by default and have that image updated/replaced every time another image is selected from the List widget. How do I go about doing this? Is there some sample code I could reference? I have done some searching in the tutorials and docs, but can only find very basic pixmap examples. >TIA Hi, this dosn't use a list widget, I just create a circular list and let you cycle thru them with the left/right arrow keys. The filenames are displayed in the title. http://perlmonks.org?node_id=521278 -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From zentara1@sbcglobal.net Wed Dec 20 10:03:39 2006 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 F356B3B0083 for ; Wed, 20 Dec 2006 10:03:38 -0500 (EST) 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 22955-07 for ; Wed, 20 Dec 2006 10:03:35 -0500 (EST) 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 87FD63B0007 for ; Wed, 20 Dec 2006 10:03:34 -0500 (EST) Received: (qmail 23034 invoked from network); 20 Dec 2006 15:03:33 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.250.41.234 with login) by smtp110.sbc.mail.re2.yahoo.com with SMTP; 20 Dec 2006 15:03:33 -0000 X-YMail-OSG: kQhRncgVM1k5WVoQDWbyLzvbhsID_y6C6WeZ.lxWsmFXxMf_1L77YcnSfW_C0NbbJFqR4C0deYHqauwKrhlW0D65oCKs.uRMnfBX8OoaCKK1iGMyxzzHynFfcOVT1Wo.P9OvCWSbXarcddOlLx5MXTGVm7mijp6gFbfX99wQPRujDKjmd8XKX66U.WDV Date: Wed, 20 Dec 2006 09:34:39 -0500 From: zentara To: gtk-perl-list@gnome.org Subject: Re: IP address input Message-ID: <20061220093439.667d3943@zentara.zentara.net> In-Reply-To: <4588FE29.20104@ldap.or.id> References: <4588FE29.20104@ldap.or.id> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.251 tagged_above=-999 required=2 tests=[AWL=-0.560, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.251 X-Spam-Level: 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, 20 Dec 2006 15:03:39 -0000 On Wed, 20 Dec 2006 16:11:05 +0700 beast wrote: > >I have a text entry which was require user to type an IP address. >Ideally it should have this following format: > >IP Address: [ . . . ] > >Please note that "." is not user editable. Is it possible? I got this idea from the ActiveState-Gtk2-cookbook. This has only been moderately tested, and probably needs a bit more tuning, but it's a start. #!/usr/bin/perl use warnings; use strict; use Gtk2 -init; my $window = new Gtk2::Window; $window->signal_connect (delete_event => sub { Gtk2->main_quit }); my $entry = Gtk2::Entry->new_with_max_length (15); # we store the signal connection id in the entry for later $entry->{signalid} = $entry->signal_connect( insert_text => \&validate ); $window->add($entry); $window->set_focus_child($entry); # works $window->show_all; Gtk2->main; sub validate { my ( $entry, $text, $len, $pos ) = @_; print "@_\n"; if ( $text =~ /\d/ ) { if(($pos == 3)||($pos == 7)||($pos == 11)){ $text = '.' } # we temporarily block this handler to avoid recursion $entry->signal_handler_block( $entry->{signalid} ); $pos = $entry->insert_text( $text, $pos ); $entry->signal_handler_unblock( $entry->{signalid} ); } # we already inserted the text if it was valid: no need # for the entry to process this signal emission $entry->signal_stop_emission_by_name('insert-text'); return '',$pos; # } __END__ -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From zentara1@sbcglobal.net Wed Dec 20 10:03:40 2006 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 899543B0080 for ; Wed, 20 Dec 2006 10:03:40 -0500 (EST) 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 23062-06 for ; Wed, 20 Dec 2006 10:03:35 -0500 (EST) 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 8FC2B3B0017 for ; Wed, 20 Dec 2006 10:03:34 -0500 (EST) Received: (qmail 23046 invoked from network); 20 Dec 2006 15:03:34 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.250.41.234 with login) by smtp110.sbc.mail.re2.yahoo.com with SMTP; 20 Dec 2006 15:03:34 -0000 X-YMail-OSG: H2XVhjsVM1nRxtfen8Q1oJVhyS51_3QlOR1ThWDFt8nhEj6wi5DPeolSPe6wDM_FQhHvVc_tAkYuKTLPk9Y4kdRuLo_i7ou.EqAut5q0FqYhYULD3O7l0HTYjkEDwKBOTBo0eMzdB3xW9wgwnHHR2ityHaqEz_Uao7Gh8hOQWGDFwafRhzruOyTg.Vz5 Date: Wed, 20 Dec 2006 09:59:04 -0500 From: zentara To: gtk-perl-list@gnome.org Subject: clearing the entry selected color Message-ID: <20061220095904.07375ca1@zentara.zentara.net> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.231 tagged_above=-999 required=2 tests=[AWL=-0.540, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.231 X-Spam-Level: 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, 20 Dec 2006 15:03:40 -0000 Hi, The recent question about validating an entry text to a pattern, got me hung up on this. When you enter text from the program, the entry text is highlighted like a selection. I can't seem to find a way to clear it. I tried all sorts of combinations, set_text, prepend_text, etc. They all highlight the inserted text. Also, is it possible to set the cursor position to 1? Instead of where the mouse is clicked? Thanks, zentara #!/usr/bin/perl use warnings; use strict; use Gtk2 -init; my $window = new Gtk2::Window; $window->signal_connect (delete_event => sub { Gtk2->main_quit }); my $entry = Gtk2::Entry->new(); $entry->set_text('[ ].[ ].[ ].[ ]'); $entry->set_state('normal'); #$entry->set_state('insensitive'); #Gtk2->main_iteration while Gtk2->events_pending; $entry->set_position(1); $window->add($entry); $window->set_focus_child($entry); print $entry->get_text,"\n"; $window->show_all; Gtk2->main; -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From scott@asofyet.org Wed Dec 20 21:05:19 2006 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 599EE3B000A for ; Wed, 20 Dec 2006 21:05:19 -0500 (EST) 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 27929-04 for ; Wed, 20 Dec 2006 21:05:15 -0500 (EST) Received: from looneymail-a1.dreamhost.com (sd-green-bigip-83.dreamhost.com [208.97.132.83]) by menubar.gnome.org (Postfix) with ESMTP id 484A13B009A for ; Wed, 20 Dec 2006 21:05:15 -0500 (EST) Received: from [192.168.0.101] (unknown [74.140.167.162]) by looneymail-a1.dreamhost.com (Postfix) with ESMTP id 8810D15E404; Wed, 20 Dec 2006 18:05:14 -0800 (PST) In-Reply-To: <44C51996.2010802@student.utwente.nl> References: <44C51996.2010802@student.utwente.nl> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6C58450E-4230-4297-82E5-9A3ADA960CCC@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: bug with Gtk2::ActionGroup->add_radio_actions() ? Date: Wed, 20 Dec 2006 21:05:15 -0500 To: Jaap Karssenberg X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: Cc: GTK2-Perl List 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, 21 Dec 2006 02:05:19 -0000 On Jul 24, 2006, at 3:03 PM, Jaap Karssenberg wrote: > I try to add a number of radio actions to a menu without setting > one of > them active yet. (The reason for this is that I want the "on_change" > callback to be called when I later set the default value from the > applications config file). > > The C api reference say about the "value" argument to > "add_radio_actions()" > > the value of the action to activate initially, or -1 if no > action should be activated > > I tried setting this value to -1 and to undef, but somehow the first > radio action is always set active. > > Could this be a bug in the perl bindings or do I need to look > elsewhere ? The implementation of add_radio_actions() in the bindings is very similar to the implementation of gtk_action_group_add_radio_actions_full() in gtk+; it had to be reimplemented to handle marshaling parameters from the perl stack. The logic is basically: pull fixed arguments from the stack create a temp array big enough to hold all the entries parse the entries from the rest of the stack for each action create the action add to group if (value == entries[i].value) gtk_toggle_action_set_active (action, TRUE); more setup The "value" argument appears only in two places --- where it is pulled from the stack, and where it is compared with entries [i].value. The entries are parsed by a local function which will coerce undef to 0, but should leave -1 unchanged. Of course, some time has passed (*cough*) since you posted this, and maybe the bug has already been fixed. Are you still seeing this behavior? From zentara1@sbcglobal.net Thu Dec 21 16:36:42 2006 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 09AB23B010B for ; Thu, 21 Dec 2006 16:36:42 -0500 (EST) 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 24104-03 for ; Thu, 21 Dec 2006 16:36:41 -0500 (EST) Received: from smtp111.sbc.mail.re2.yahoo.com (smtp111.sbc.mail.re2.yahoo.com [68.142.229.94]) by menubar.gnome.org (Postfix) with SMTP id AB62D3B0159 for ; Thu, 21 Dec 2006 16:36:40 -0500 (EST) Received: (qmail 43529 invoked from network); 21 Dec 2006 21:36:37 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.250.97.117 with login) by smtp111.sbc.mail.re2.yahoo.com with SMTP; 21 Dec 2006 21:36:37 -0000 X-YMail-OSG: 1N5FxzAVM1kPmWJKBR9v214o6i9A17hDHwS0xoBcuqlRPD6b0IAjNOniz78zWXkCbVqRmMezsiE6fcXg4N6cQ0OZKSQI3_0BJq5iCuP64qEojcdSLJHtW317esNEdaS7WzklKO85gz_aES8- Date: Thu, 21 Dec 2006 16:32:30 -0500 From: zentara To: gtk-perl-list@gnome.org Subject: Re: clearing the entry selected color [SOLVED] Message-ID: <20061221163230.1c48e8f9@zentara.zentara.net> In-Reply-To: <20061220095904.07375ca1@zentara.zentara.net> References: <20061220095904.07375ca1@zentara.zentara.net> X-Mailer: Claws Mail 2.6.1 (GTK+ 2.10.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.211 tagged_above=-999 required=2 tests=[AWL=-0.520, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.211 X-Spam-Level: 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, 21 Dec 2006 21:36:42 -0000 On Wed, 20 Dec 2006 09:59:04 -0500 zentara wrote: Well, I found that the entry text will NOT get highllighted as long as you add it after the entry has visibility. #!/usr/bin/perl use warnings; use strict; use Gtk2 -init; my $window = new Gtk2::Window; $window->signal_connect (delete_event => sub { Gtk2->main_quit }); my $entry = Gtk2::Entry->new(); # bad # $entry->set_text('[ ].[ ].[ ].[ ]'); # $entry->set_position(1); $window->add($entry); $window->set_focus_child($entry); $window->show_all; #good $entry->set_text('[ ].[ ].[ ].[ ]'); $entry->set_position(1); Gtk2->main; -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From jens.luedicke@gmail.com Wed Dec 27 08:43:30 2006 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 481D73B00EE for ; Wed, 27 Dec 2006 08:43:30 -0500 (EST) 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 05810-08 for ; Wed, 27 Dec 2006 08:43:26 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by menubar.gnome.org (Postfix) with ESMTP id 22F4B3B00B7 for ; Wed, 27 Dec 2006 08:43:26 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so3793194ugb for ; Wed, 27 Dec 2006 05:43:25 -0800 (PST) Received: by 10.82.120.14 with SMTP id s14mr642136buc.1167227004953; Wed, 27 Dec 2006 05:43:24 -0800 (PST) Received: by 10.82.113.4 with HTTP; Wed, 27 Dec 2006 05:43:24 -0800 (PST) Message-ID: Date: Wed, 27 Dec 2006 14:43:24 +0100 From: "Jens Luedicke" To: "Gtk2-Perl List" Subject: missing method in Gtk2::Ex::Simple::List MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.6 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.6 X-Spam-Level: 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, 27 Dec 2006 13:43:30 -0000 Hey, I tried to use my $row_ref = $sl->get_row_data_from_path ($path); but I get an error that the method of that name is missing: Can't locate object method "get_row_data_from_path" via package "Gtk2::Ex::Simple::List" Jens -- Jens Luedicke web: http://perldude.de/ From scott@asofyet.org Wed Dec 27 11:57:47 2006 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 1175B3B00A6 for ; Wed, 27 Dec 2006 11:57:47 -0500 (EST) 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 17266-07 for ; Wed, 27 Dec 2006 11:57:42 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-83.dreamhost.com [208.97.132.83]) by menubar.gnome.org (Postfix) with ESMTP id 2D1563B006C for ; Wed, 27 Dec 2006 11:57:42 -0500 (EST) Received: from [192.168.0.101] (74-140-167-162.dhcp.insightbb.com [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id 9C75E1131D0; Wed, 27 Dec 2006 08:57:39 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <75D0ADC4-D32F-4A5F-B5E0-327CABAC4E5E@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: missing method in Gtk2::Ex::Simple::List Date: Wed, 27 Dec 2006 11:57:43 -0500 To: Jens Luedicke X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: Cc: Gtk2-Perl List 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, 27 Dec 2006 16:57:47 -0000 On Dec 27, 2006, at 8:43 AM, Jens Luedicke wrote: > I tried to use > > my $row_ref = $sl->get_row_data_from_path ($path); > > but I get an error that the method of that name > is missing: > > Can't locate object method "get_row_data_from_path" via package > "Gtk2::Ex::Simple::List" Ouch. That method is adjacent to code that was moved to another module when it was split, so that may just have been collateral damage. Also looks like the changes that have happened to Gtk2::SimpleList since the branch did not make it into Gtk2::Ex::Simple::List. Applied those diffs to HEAD just now. http://gtk2-perl-ex.cvs.sourceforge.net/gtk2-perl-ex/Gtk2-Ex/Simple/ List/lib/Gtk2/Ex/Simple/List.pm?view=log ... and updated the Browse CVS link on the website. It will be a short while, however, before i can get a new release out. From jens.luedicke@gmail.com Wed Dec 27 12:24:59 2006 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 B6B603B008E for ; Wed, 27 Dec 2006 12:24:59 -0500 (EST) 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 18862-10 for ; Wed, 27 Dec 2006 12:24:56 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by menubar.gnome.org (Postfix) with ESMTP id 461023B00A7 for ; Wed, 27 Dec 2006 12:24:56 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so3841735ugb for ; Wed, 27 Dec 2006 09:24:55 -0800 (PST) Received: by 10.82.152.16 with SMTP id z16mr722439bud.1167240295397; Wed, 27 Dec 2006 09:24:55 -0800 (PST) Received: by 10.82.113.4 with HTTP; Wed, 27 Dec 2006 09:24:55 -0800 (PST) Message-ID: Date: Wed, 27 Dec 2006 18:24:55 +0100 From: "Jens Luedicke" To: "Gtk2-Perl List" Subject: GET_SORT_COLUMN_ID segfault MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.6 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.6 X-Spam-Level: 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, 27 Dec 2006 17:24:59 -0000 Hey, I get a segfault after returning in my GET_SORT_COLUMN_ID method: sub GET_SORT_COLUMN_ID { my ($self) = @_; return (TRUE, $self->{sort_column_id}, "$self->{sort_order}"); } BT: #0 0x40958687 in gtk2perl_tree_sortable_get_sort_column_id (sortable=0x888c3d0, sort_column_id=0x0, order=0x0) at GtkTreeSortable.xs:68 #1 0x40cb7596 in IA__gtk_tree_sortable_get_sort_column_id (sortable=0x888c3d0, sort_column_id=0x0, order=0x0) at gtktreesortable.c:119 #2 0x40cd8607 in gtk_tree_view_column_update_button (tree_column=0x8884140) at gtktreeviewcolumn.c:908 #3 0x40cd9951 in _gtk_tree_view_column_set_tree_view (column=0x8884140, tree_view=0x887e1c8) at gtktreeviewcolumn.c:1294 #4 0x40cca420 in IA__gtk_tree_view_insert_column (tree_view=0x887e1c8, column=0x8884140, position=0) at gtktreeview.c:10979 #5 0x40cca624 in IA__gtk_tree_view_append_column (tree_view=0x887e1c8, column=0x8884140) at gtktreeview.c:10869 #6 0x4096168b in XS_Gtk2__TreeView_append_column (my_perl=0x804c098, cv=0x8271f74) at GtkTreeView.c:489 #7 0x400ad963 in Perl_pp_entersub (my_perl=0x804c098) at pp_hot.c:2877 #8 0x4009103c in Perl_runops_debug (my_perl=0x804c098) at dump.c:1459 #9 0x40042364 in perl_run (my_perl=0x804c098) at perl.c:2366 #10 0x08049426 in main () any ideas? Jens -- Jens Luedicke web: http://perldude.de/ From scott@asofyet.org Wed Dec 27 14:52:38 2006 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 E4E863B009B for ; Wed, 27 Dec 2006 14:52:37 -0500 (EST) 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 27454-10 for ; Wed, 27 Dec 2006 14:52:37 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-177.dreamhost.com [208.97.132.177]) by menubar.gnome.org (Postfix) with ESMTP id C4D7D3B00D5 for ; Wed, 27 Dec 2006 14:52:36 -0500 (EST) Received: from [192.168.0.101] (74-140-167-162.dhcp.insightbb.com [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id 34FC51131D0; Wed, 27 Dec 2006 11:52:35 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Subject: Re: GET_SORT_COLUMN_ID segfault Date: Wed, 27 Dec 2006 14:52:38 -0500 To: Jens Luedicke X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: Cc: Gtk2-Perl List 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, 27 Dec 2006 19:52:38 -0000 On Dec 27, 2006, at 12:24 PM, Jens Luedicke wrote: > I get a segfault after returning in my > GET_SORT_COLUMN_ID method: > > sub GET_SORT_COLUMN_ID { > my ($self) = @_; > return (TRUE, $self->{sort_column_id}, "$self->{sort_order}"); > } > > BT: > > #0 0x40958687 in gtk2perl_tree_sortable_get_sort_column_id > (sortable=0x888c3d0, sort_column_id=0x0, order=0x0) at > GtkTreeSortable.xs:68 sort_column_id and order are return parameters, pointers to the location at which the values should be stored. The code in gtk2perl_tree_sortable_get_sort_column_id() expects them never to be NULL (because it doesn't make sense to call the function if you aren't going to get them), and is segfaulting when trying to dereference a null pointer. However, we should be more robust than that... In gtk+ HEAD, the code in gtk_tree_view_column_update_button () (frame #2 in your trace) looks like this: if (GTK_IS_TREE_SORTABLE (model)) gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (model), &sort_column_id, NULL); In other words, "give me the id, i don't care about the order." I can see the fix in the code, but my sandbox is broken and i can't compile or test. Please try the patch below; if that works, i'll commit it. Index: xs/GtkTreeSortable.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkTreeSortable.xs,v retrieving revision 1.11 diff -u -r1.11 GtkTreeSortable.xs --- xs/GtkTreeSortable.xs 28 Jun 2005 19:42:58 -0000 1.11 +++ xs/GtkTreeSortable.xs 27 Dec 2006 19:48:48 -0000 @@ -52,6 +52,8 @@ GtkSortType *order) { gboolean retval = FALSE; + gint real_sort_column_id; + GtkSortType real_order; GET_METHOD ("GET_SORT_COLUMN_ID"); if (METHOD_EXISTS) { @@ -65,12 +67,17 @@ SPAGAIN; - *order = SvGtkSortType (POPs); - *sort_column_id = POPi; + real_order = SvGtkSortType (POPs); + real_sort_column_id = POPi; retval = POPu; PUTBACK; FINISH; + + if (sort_column_id) + *sort_column_id = real_sort_column_id; + if (order) + *order = real_order; } return retval; From jens.luedicke@gmail.com Wed Dec 27 18:19:35 2006 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 AD9553B00A6 for ; Wed, 27 Dec 2006 18:19:35 -0500 (EST) 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 05733-03 for ; Wed, 27 Dec 2006 18:19:34 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by menubar.gnome.org (Postfix) with ESMTP id C77B33B009C for ; Wed, 27 Dec 2006 18:19:33 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so5933122nfc for ; Wed, 27 Dec 2006 15:19:33 -0800 (PST) Received: by 10.82.183.19 with SMTP id g19mr525957buf.1167261572722; Wed, 27 Dec 2006 15:19:32 -0800 (PST) Received: by 10.82.113.4 with HTTP; Wed, 27 Dec 2006 15:19:32 -0800 (PST) Message-ID: Date: Thu, 28 Dec 2006 00:19:32 +0100 From: "Jens Luedicke" To: muppet Subject: Re: GET_SORT_COLUMN_ID segfault In-Reply-To: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.542 tagged_above=-999 required=2 tests=[AWL=0.058, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.542 X-Spam-Level: Cc: Gtk2-Perl List 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, 27 Dec 2006 23:19:35 -0000 On 12/27/06, muppet wrote: > sort_column_id and order are return parameters, pointers to the > location at which the values should be stored. The code in > gtk2perl_tree_sortable_get_sort_column_id() expects them never to be > NULL (because it doesn't make sense to call the function if you > aren't going to get them), and is segfaulting when trying to > dereference a null pointer. However, we should be more robust than > that... In gtk+ HEAD, the code in gtk_tree_view_column_update_button I understand the C part of your explanation, but the column and order are predefined in my custom ListStore and not undefined. Jens -- Jens Luedicke web: http://perldude.de/ From scott@asofyet.org Wed Dec 27 21:53:14 2006 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 A1DF43B000A for ; Wed, 27 Dec 2006 21:53:14 -0500 (EST) 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 13901-01 for ; Wed, 27 Dec 2006 21:53:13 -0500 (EST) Received: from looneymail-a2.dreamhost.com (sd-green-bigip-62.dreamhost.com [208.97.132.62]) by menubar.gnome.org (Postfix) with ESMTP id 8E6A63B008A for ; Wed, 27 Dec 2006 21:53:13 -0500 (EST) Received: from [192.168.0.101] (74-140-167-162.dhcp.insightbb.com [74.140.167.162]) by looneymail-a2.dreamhost.com (Postfix) with ESMTP id 9E8AF16E082; Wed, 27 Dec 2006 18:53:12 -0800 (PST) In-Reply-To: References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Subject: Re: GET_SORT_COLUMN_ID segfault Date: Wed, 27 Dec 2006 21:53:18 -0500 To: Jens Luedicke X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.522 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, TW_VF=0.077] X-Spam-Score: -2.522 X-Spam-Level: Cc: Gtk2-Perl List 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, 28 Dec 2006 02:53:14 -0000 On Dec 27, 2006, at 6:19 PM, Jens Luedicke wrote: > On 12/27/06, muppet wrote: > >> sort_column_id and order are return parameters, pointers to the >> location at which the values should be stored. The code in >> gtk2perl_tree_sortable_get_sort_column_id() expects them never to be >> NULL (because it doesn't make sense to call the function if you >> aren't going to get them), and is segfaulting when trying to >> dereference a null pointer. However, we should be more robust than >> that... In gtk+ HEAD, the code in gtk_tree_view_column_update_button > > I understand the C part of your explanation, but the column and order > are predefined in my custom ListStore and not undefined. Whether they are defined in your custom store is irrelevant; gtk_tree_view_column_update_button() (a private function inside GtkTreeViewColumn) is calling the iface's vfunc with a NULL because it doesn't care about the order value. So, you're returning it properly, but when the binding goes to store the value you returned, it's attempting to dereference an invalid pointer, passed in by other C code (not your perl code). So, basically, just a binding bug. From jens.luedicke@gmail.com Thu Dec 28 05:48:33 2006 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 9850D3B00A2 for ; Thu, 28 Dec 2006 05:48:33 -0500 (EST) 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 02305-02 for ; Thu, 28 Dec 2006 05:48:32 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by menubar.gnome.org (Postfix) with ESMTP id 84B143B010C for ; Thu, 28 Dec 2006 05:48:31 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so6147268nfc for ; Thu, 28 Dec 2006 02:48:30 -0800 (PST) Received: by 10.82.153.5 with SMTP id a5mr2908962bue.1167302910743; Thu, 28 Dec 2006 02:48:30 -0800 (PST) Received: by 10.82.115.14 with HTTP; Thu, 28 Dec 2006 02:48:30 -0800 (PST) Message-ID: Date: Thu, 28 Dec 2006 11:48:30 +0100 From: "Jens Luedicke" To: muppet Subject: Re: GET_SORT_COLUMN_ID segfault In-Reply-To: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.546 tagged_above=-999 required=2 tests=[AWL=0.054, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.546 X-Spam-Level: Cc: Gtk2-Perl List 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, 28 Dec 2006 10:48:33 -0000 On 12/27/06, muppet wrote: > I can see the fix in the code, but my sandbox is broken and i can't > compile or test. Please try the patch below; if that works, i'll > commit it. > I just tried to apply the patch and I get an error message: jens@gattaca ~/devel/Gtk2-1.141 $ patch -p0 < ../../GtkTreeSortable.xs.diff patching file xs/GtkTreeSortable.xs patch: **** malformed patch at line 10: { Jens -- Jens Luedicke web: http://perldude.de/ From scott@asofyet.org Thu Dec 28 12:11:40 2006 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 5D6FD3B00BE for ; Thu, 28 Dec 2006 12:11:40 -0500 (EST) 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 24332-06 for ; Thu, 28 Dec 2006 12:11:39 -0500 (EST) Received: from looneymail-a3.dreamhost.com (sd-green-bigip-119.dreamhost.com [208.97.132.119]) by menubar.gnome.org (Postfix) with ESMTP id 2618E3B00A7 for ; Thu, 28 Dec 2006 12:11:39 -0500 (EST) Received: from [192.168.0.101] (74-140-167-162.dhcp.insightbb.com [74.140.167.162]) by looneymail-a3.dreamhost.com (Postfix) with ESMTP id 4304E27C14; Thu, 28 Dec 2006 09:11:18 -0800 (PST) In-Reply-To: References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/mixed; boundary=Apple-Mail-2-40121521 Message-Id: From: muppet Subject: Re: GET_SORT_COLUMN_ID segfault Date: Thu, 28 Dec 2006 12:11:22 -0500 To: "Jens Luedicke" X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: Cc: Gtk2-Perl List 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, 28 Dec 2006 17:11:40 -0000 --Apple-Mail-2-40121521 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Dec 28, 2006, at 5:48 AM, Jens Luedicke wrote: > On 12/27/06, muppet wrote: > >> I can see the fix in the code, but my sandbox is broken and i can't >> compile or test. Please try the patch below; if that works, i'll >> commit it. >> > I just tried to apply the patch and I get an error message: > > jens@gattaca ~/devel/Gtk2-1.141 $ patch -p0 < ../../ > GtkTreeSortable.xs.diff > patching file xs/GtkTreeSortable.xs > patch: **** malformed patch at line 10: { Harumph.... stupid text mangling in mail clients... There's supposed to be a space at the beginning of each line, creating an extra column in which diff places the difference markers. Here's the patch as an attachment, in hopes that it is less mangled. --Apple-Mail-2-40121521 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=gtk-tree-sortable-crash.patch Content-Disposition: attachment; filename=gtk-tree-sortable-crash.patch Index: xs/GtkTreeSortable.xs =================================================================== RCS file: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/xs/GtkTreeSortable.xs,v retrieving revision 1.11 diff -u -r1.11 GtkTreeSortable.xs --- xs/GtkTreeSortable.xs 28 Jun 2005 19:42:58 -0000 1.11 +++ xs/GtkTreeSortable.xs 27 Dec 2006 19:48:48 -0000 @@ -52,6 +52,8 @@ GtkSortType *order) { gboolean retval = FALSE; + gint real_sort_column_id; + GtkSortType real_order; GET_METHOD ("GET_SORT_COLUMN_ID"); if (METHOD_EXISTS) { @@ -65,12 +67,17 @@ SPAGAIN; - *order = SvGtkSortType (POPs); - *sort_column_id = POPi; + real_order = SvGtkSortType (POPs); + real_sort_column_id = POPi; retval = POPu; PUTBACK; FINISH; + + if (sort_column_id) + *sort_column_id = real_sort_column_id; + if (order) + *order = real_order; } return retval; --Apple-Mail-2-40121521-- From jens.luedicke@gmail.com Thu Dec 28 13:42:05 2006 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 97E783B00F4 for ; Thu, 28 Dec 2006 13:42:05 -0500 (EST) 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 29315-05 for ; Thu, 28 Dec 2006 13:42:04 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by menubar.gnome.org (Postfix) with ESMTP id B582D3B016D for ; Thu, 28 Dec 2006 13:42:03 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so6274660nfc for ; Thu, 28 Dec 2006 10:42:03 -0800 (PST) Received: by 10.82.113.6 with SMTP id l6mr2986620buc.1167331323015; Thu, 28 Dec 2006 10:42:03 -0800 (PST) Received: by 10.82.115.14 with HTTP; Thu, 28 Dec 2006 10:42:02 -0800 (PST) Message-ID: Date: Thu, 28 Dec 2006 19:42:02 +0100 From: "Jens Luedicke" To: muppet Subject: Re: GET_SORT_COLUMN_ID segfault In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.55 tagged_above=-999 required=2 tests=[AWL=0.050, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.55 X-Spam-Level: Cc: Gtk2-Perl List 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, 28 Dec 2006 18:42:05 -0000 On 12/28/06, muppet wrote: > Harumph.... stupid text mangling in mail clients... There's supposed > to be a space at the beginning of each line, creating an extra column > in which diff places the difference markers. Here's the patch as an > attachment, in hopes that it is less mangled. Great! This patch fixes my problem. Jens -- Jens Luedicke web: http://perldude.de/ From kaffeetisch@gmx.de Thu Dec 28 14:24:06 2006 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 570CB3B008F for ; Thu, 28 Dec 2006 14:24:06 -0500 (EST) 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 31539-02 for ; Thu, 28 Dec 2006 14:24:04 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id A2F483B0009 for ; Thu, 28 Dec 2006 14:24:03 -0500 (EST) Received: (qmail invoked by alias); 28 Dec 2006 19:24:02 -0000 Received: from port-212-202-210-222.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.210.222] by mail.gmx.net (mp046) with SMTP; 28 Dec 2006 20:24:02 +0100 X-Authenticated: #2092818 Subject: Cairo 1.030 (unstable) From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Thu, 28 Dec 2006 20:24:02 +0100 Message-Id: <1167333842.4391.5.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 28 Dec 2006 19:24:06 -0000 Cairo provides Perl bindings for the vector graphics library cairo. It supports multiple output targets, including PDF, PNG and SVG. Cairo produces identical output on all those targets. The package is available from: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=160888&release_id=474306 Or from cvs.freedesktop.org:/cvs/cairo in the module "cairo-perl", tagged as "rel-1-030". Overview of changes in Cairo 1.030 ================================== * Add support for new API: - cairo_get_dash, cairo_copy_clip_rectangles, and cairo_clip_extents. - cairo_pattern_get_rgba, cairo_pattern_get_surface, cairo_pattern_get_color_stop_rgba, cairo_pattern_get_points, and cairo_pattern_get_circles. * Make Cairo::ImageSurface::get_data usable. From SRS0=dSYW0v=GH=vvelox.net=v.velox@yourhostingaccount.com Fri Dec 29 02:37:29 2006 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 27F293B007A for ; Fri, 29 Dec 2006 02:37:29 -0500 (EST) 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 31097-04 for ; Fri, 29 Dec 2006 02:37:27 -0500 (EST) Received: from mailout16.yourhostingaccount.com (mailout16.yourhostingaccount.com [65.254.253.133]) by menubar.gnome.org (Postfix) with ESMTP id 612D43B009B for ; Fri, 29 Dec 2006 02:37:27 -0500 (EST) Received: from scan10.yourhostingaccount.com ([10.1.1.240] helo=scan10.yourhostingaccount.com) by mailout16.yourhostingaccount.com with esmtp (Exim) id 1H0CIw-0004HI-5s for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 02:37:26 -0500 Received: from authsmtp10.yourhostingaccount.com ([10.1.18.10] ident=exim) by scan10.yourhostingaccount.com with spamscanlookuphost (Exim) id 1H0CIw-00014z-2i for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 02:37:26 -0500 Received: from authsmtp10.yourhostingaccount.com ([10.1.18.10] helo=authsmtp10.yourhostingaccount.com) by scan10.yourhostingaccount.com with esmtp (Exim) id 1H0CIv-00014t-PG for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 02:37:25 -0500 Received: from [69.92.217.33] (helo=vixen42) by authsmtp10.yourhostingaccount.com with esmtpa (Exim) id 1H0CIu-0005wW-Mv for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 02:37:25 -0500 Date: Fri, 29 Dec 2006 01:37:50 -0600 From: Vulpes Velox To: gtk-perl-list@gnome.org Subject: mouse position question Message-ID: <20061229013750.2a07a63f@vixen42> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: Vulpes Velox X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.139 tagged_above=-999 required=2 tests=[AWL=-1.400, BAYES_40=-0.185, DNS_FROM_RFC_WHOIS=1.447, SPF_PASS=-0.001] X-Spam-Score: -0.139 X-Spam-Level: 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: Fri, 29 Dec 2006 07:37:29 -0000 Just been looking through the pods that come with it. I am not seeing any that truely stand out as containing what I am looking for and the ones I have checked did not. Is there any way to get the position of the pointer and change it? If not any suggestions for other perl modules for this? From chas.owens@gmail.com Fri Dec 29 05:49:19 2006 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 15C083B007A for ; Fri, 29 Dec 2006 05:49:19 -0500 (EST) 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 07894-06 for ; Fri, 29 Dec 2006 05:49:17 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by menubar.gnome.org (Postfix) with ESMTP id 4908A3B0111 for ; Fri, 29 Dec 2006 05:49:15 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so4242326ugb for ; Fri, 29 Dec 2006 02:49:14 -0800 (PST) Received: by 10.78.57.11 with SMTP id f11mr827286hua.1167389354547; Fri, 29 Dec 2006 02:49:14 -0800 (PST) Received: by 10.78.147.13 with HTTP; Fri, 29 Dec 2006 02:49:14 -0800 (PST) Message-ID: <58ce48dc0612290249t174ad6afh9e32ee19dc16fd2d@mail.gmail.com> Date: Fri, 29 Dec 2006 05:49:14 -0500 From: "Chas Owens" To: gtk-perl-list@gnome.org Subject: Re: mouse position question In-Reply-To: <20061229013750.2a07a63f@vixen42> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061229013750.2a07a63f@vixen42> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.574 tagged_above=-999 required=2 tests=[AWL=0.026, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.574 X-Spam-Level: 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: Fri, 29 Dec 2006 10:49:19 -0000 On 12/29/06, Vulpes Velox wrote: > Just been looking through the pods that come with it. I am not seeing > any that truely stand out as containing what I am looking for and the > ones I have checked did not. > > Is there any way to get the position of the pointer and change it? > > If not any suggestions for other perl modules for this? It seems as if it is a bad idea. What specific effect are you trying to achieve? Can I move the mouse pointer myself? There is an Xlib routine called XWarpPointer() that does this, but GDK does not wrap it. It is almost certainly a bad idea to use this feature (in fact it is intended for window managers only); you might consider writing to one of the GTK+ or Gnome mailing lists to ask for another way to achieve whatever you are trying to achieve. However, you can always use Xlib routines (such as XWarpPointer()) by including gdk/gdkx.h and gdk/gdkprivate.h, then manipulating the private parts of the GDK data structures. If that sounds unsavory, it probably should. From chorgheavyinc@gmail.com Fri Dec 29 10:11:57 2006 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 2D0E63B00E8 for ; Fri, 29 Dec 2006 10:11:57 -0500 (EST) 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 21403-07 for ; Fri, 29 Dec 2006 10:11:55 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by menubar.gnome.org (Postfix) with ESMTP id 09FA03B0011 for ; Fri, 29 Dec 2006 10:11:55 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so4298219ugb for ; Fri, 29 Dec 2006 07:11:54 -0800 (PST) Received: by 10.78.136.9 with SMTP id j9mr2380149hud.1167405114099; Fri, 29 Dec 2006 07:11:54 -0800 (PST) Received: by 10.78.48.8 with HTTP; Fri, 29 Dec 2006 07:11:53 -0800 (PST) Message-ID: <76b2a5870612290711o9a63437le4639e350617cdaf@mail.gmail.com> Date: Fri, 29 Dec 2006 10:11:53 -0500 From: "Chorg Heavy Industries" To: gtk-perl-list@gnome.org Subject: Re: mouse position question In-Reply-To: <58ce48dc0612290249t174ad6afh9e32ee19dc16fd2d@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_88565_10714879.1167405113785" References: <20061229013750.2a07a63f@vixen42> <58ce48dc0612290249t174ad6afh9e32ee19dc16fd2d@mail.gmail.com> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.611 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, HTML_10_20=1.351, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: 0.611 X-Spam-Level: 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: Fri, 29 Dec 2006 15:11:57 -0000 ------=_Part_88565_10714879.1167405113785 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all, I'm trying to use Glib to access libgaim's functions on OS X. Has anyone worked on something like this? or is there a general cookbook on how to properly bind libgaim to perl using Glib? I did in fact read the man pages and pod, but I am unsure of a few things... Pls advise TIA ------=_Part_88565_10714879.1167405113785 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello all,
I'm trying to use Glib to access libgaim's functions on OS X.  Has anyone worked on something like this? or is there a general cookbook on how to properly bind libgaim to perl using Glib?  I did in fact read the man pages and pod, but I am unsure of a few things...

Pls advise

TIA
------=_Part_88565_10714879.1167405113785-- From chorgheavyinc@gmail.com Fri Dec 29 10:13:09 2006 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 9BFCE3B0109 for ; Fri, 29 Dec 2006 10:13:09 -0500 (EST) 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 21656-01 for ; Fri, 29 Dec 2006 10:13:08 -0500 (EST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by menubar.gnome.org (Postfix) with ESMTP id 427623B000C for ; Fri, 29 Dec 2006 10:13:08 -0500 (EST) Received: by ug-out-1314.google.com with SMTP id 74so4298486ugb for ; Fri, 29 Dec 2006 07:13:07 -0800 (PST) Received: by 10.78.170.17 with SMTP id s17mr2381533hue.1167405187199; Fri, 29 Dec 2006 07:13:07 -0800 (PST) Received: by 10.78.48.8 with HTTP; Fri, 29 Dec 2006 07:13:06 -0800 (PST) Message-ID: <76b2a5870612290713n48c3dd99q406491acd0398c47@mail.gmail.com> Date: Fri, 29 Dec 2006 10:13:06 -0500 From: "Chorg Heavy Industries" To: gtk-perl-list@gnome.org Subject: Glib and libgaim MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_88573_2171526.1167405186991" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.375 tagged_above=-999 required=2 tests=[BAYES_50=0.001, HTML_30_40=0.374, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: 0.375 X-Spam-Level: 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: Fri, 29 Dec 2006 15:13:09 -0000 ------=_Part_88573_2171526.1167405186991 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline errm sorry about last post, I need to start a new thread here: On 12/29/06, Chorg Heavy Industries wrote: > > Hello all, > I'm trying to use Glib to access libgaim's functions on OS X. Has anyone > worked on something like this? or is there a general cookbook on how to > properly bind libgaim to perl using Glib? I did in fact read the man pages > and pod, but I am unsure of a few things... > > Pls advise > > TIA > -- ---------------------------- As folk wisdom says: a clever person is one that gets out of a trap that a wise one would not have got into in the first place. ------=_Part_88573_2171526.1167405186991 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline errm sorry about last post, I need to start a new thread here:

On 12/29/06, Chorg Heavy Industries <chorgheavyinc@gmail.com > wrote:
Hello all,
I'm trying to use Glib to access libgaim's functions on OS X.  Has anyone worked on something like this? or is there a general cookbook on how to properly bind libgaim to perl using Glib?  I did in fact read the man pages and pod, but I am unsure of a few things...

Pls advise

TIA



--
----------------------------
As folk wisdom says: a clever person is one that gets out of a trap that a wise one would not have got into in the first place. ------=_Part_88573_2171526.1167405186991-- From ebassi@gmail.com Fri Dec 29 10:38:10 2006 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 7B8033B009F for ; Fri, 29 Dec 2006 10:38:10 -0500 (EST) 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 22877-05 for ; Fri, 29 Dec 2006 10:38:08 -0500 (EST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by menubar.gnome.org (Postfix) with ESMTP id 36F1C3B012E for ; Fri, 29 Dec 2006 10:38:07 -0500 (EST) Received: by nf-out-0910.google.com with SMTP id k26so6641735nfc for ; Fri, 29 Dec 2006 07:38:06 -0800 (PST) Received: by 10.49.41.18 with SMTP id t18mr323803nfj.1167406686077; Fri, 29 Dec 2006 07:38:06 -0800 (PST) Received: from ?192.168.1.66? ( [86.149.197.190]) by mx.google.com with ESMTP id o53sm70567497nfa.2006.12.29.07.38.05; Fri, 29 Dec 2006 07:38:05 -0800 (PST) Subject: Re: Glib and libgaim From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <76b2a5870612290713n48c3dd99q406491acd0398c47@mail.gmail.com> References: <76b2a5870612290713n48c3dd99q406491acd0398c47@mail.gmail.com> Content-Type: text/plain Date: Fri, 29 Dec 2006 15:38:03 +0000 Message-Id: <1167406683.32114.0.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.6 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.6 X-Spam-Level: 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: Fri, 29 Dec 2006 15:38:10 -0000 On Fri, 2006-12-29 at 10:13 -0500, Chorg Heavy Industries wrote: > errm sorry about last post, I need to start a new thread here: > > On 12/29/06, Chorg Heavy Industries wrote: > I'm trying to use Glib to access libgaim's functions on OS X. > Has anyone worked on something like this? or is there a > general cookbook on how to properly bind libgaim to perl using > Glib? There's the binding how to: http://gtk2-perl.sourceforge.net/doc/binding_howto.pod.html > I did in fact read the man pages and pod, but I am unsure of > a few things... if you have specific questions, just ask them here or on the IRC channel #gtk-perl on irc.gnome.org ciao, Emmanuele. -- Emmanuele Bassi, E: ebassi@gmail.com W: http://www.emmanuelebassi.net B: http://log.emmanuelebassi.net From SRS0=dSYW0v=GH=vvelox.net=v.velox@yourhostingaccount.com Fri Dec 29 14:15:15 2006 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 085343B0142 for ; Fri, 29 Dec 2006 14:15:15 -0500 (EST) 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 05056-02 for ; Fri, 29 Dec 2006 14:15:14 -0500 (EST) Received: from mailout18.yourhostingaccount.com (mailout18.yourhostingaccount.com [65.254.253.148]) by menubar.gnome.org (Postfix) with ESMTP id C37563B0110 for ; Fri, 29 Dec 2006 14:15:11 -0500 (EST) Received: from scan04.yourhostingaccount.com ([10.1.1.234] helo=scan04.yourhostingaccount.com) by mailout18.yourhostingaccount.com with esmtp (Exim) id 1H0NCA-0001gj-IQ for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 14:15:10 -0500 Received: from authsmtp10.yourhostingaccount.com ([10.1.18.10] helo=authsmtp10.yourhostingaccount.com) by scan04.yourhostingaccount.com with esmtp (Exim) id 1H0NCA-00086y-4H for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 14:15:10 -0500 Received: from [69.92.217.33] (helo=vixen42) by authsmtp10.yourhostingaccount.com with esmtpa (Exim) id 1H0NBS-0004l4-7R for gtk-perl-list@gnome.org; Fri, 29 Dec 2006 14:14:26 -0500 Date: Fri, 29 Dec 2006 13:14:56 -0600 From: Vulpes Velox Cc: gtk-perl-list@gnome.org Subject: Re: mouse position question Message-ID: <20061229131456.5b0fe25d@vixen42> In-Reply-To: <58ce48dc0612290249t174ad6afh9e32ee19dc16fd2d@mail.gmail.com> References: <20061229013750.2a07a63f@vixen42> <58ce48dc0612290249t174ad6afh9e32ee19dc16fd2d@mail.gmail.com> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: Vulpes Velox X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.346 tagged_above=-999 required=2 tests=[AWL=-0.193, BAYES_00=-2.599, DNS_FROM_RFC_WHOIS=1.447, SPF_PASS=-0.001] X-Spam-Score: -1.346 X-Spam-Level: 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: Fri, 29 Dec 2006 19:15:15 -0000 On Fri, 29 Dec 2006 05:49:14 -0500 "Chas Owens" wrote: > On 12/29/06, Vulpes Velox wrote: > > Just been looking through the pods that come with it. I am not > > seeing any that truely stand out as containing what I am looking > > for and the ones I have checked did not. > > > > Is there any way to get the position of the pointer and change it? > > > > If not any suggestions for other perl modules for this? > > It seems as if it is a bad idea. What specific effect are you > trying to achieve? > > > Can I move the mouse pointer myself? > > There is an Xlib routine called XWarpPointer() that does this, but > GDK does not wrap it. It is almost certainly a bad idea to use this > feature (in fact it is intended for window managers only); you might > consider writing to one of the GTK+ or Gnome mailing lists to ask > for another way to achieve whatever you are trying to achieve. > However, you can always use Xlib routines (such as XWarpPointer()) > by including gdk/gdkx.h and gdk/gdkprivate.h, then manipulating the > private parts of the GDK data structures. If that sounds unsavory, > it probably should. > I want to be able to hotkey going between :0.0 and :0.1. I found away to do this. Get the current mouse position, set the $DISPLAY enviromental to the screen I wish to move to, and then move the cursor to that point. Just need to write a little program for getting and setting the mouse position. From kaffeetisch@gmx.de Sat Dec 30 10:18:38 2006 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 5F79D3B0083 for ; Sat, 30 Dec 2006 10:18:38 -0500 (EST) 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 18796-03 for ; Sat, 30 Dec 2006 10:18:35 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id C07173B007D for ; Sat, 30 Dec 2006 10:18:34 -0500 (EST) Received: (qmail invoked by alias); 30 Dec 2006 15:18:34 -0000 Received: from port-212-202-0-201.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.201] by mail.gmx.net (mp033) with SMTP; 30 Dec 2006 16:18:34 +0100 X-Authenticated: #2092818 Subject: Gnome2 1.041 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sat, 30 Dec 2006 16:18:34 +0100 Message-Id: <1167491914.4364.11.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.495 tagged_above=-999 required=2 tests=[AWL=0.028, BAYES_00=-2.599, SPF_PASS=-0.001, TW_BG=0.077] X-Spam-Score: -2.495 X-Spam-Level: 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, 30 Dec 2006 15:18:38 -0000 Gnome2 - Perl bindings to the 2.x series of the GNOME libraries. This module allows you to interface with the libgnome and libgnomeui libraries to create GNOME applications. The package is available from: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=91219&release_id=474643 Overview of changes in Gnome2 1.041 =================================== * Fix a test failure. * Fix a POD error. From kaffeetisch@gmx.de Sat Dec 30 10:42:25 2006 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 3E7B13B00DE for ; Sat, 30 Dec 2006 10:42:25 -0500 (EST) 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 20229-02 for ; Sat, 30 Dec 2006 10:42:22 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 832E13B0123 for ; Sat, 30 Dec 2006 10:42:21 -0500 (EST) Received: (qmail invoked by alias); 30 Dec 2006 15:42:20 -0000 Received: from port-212-202-0-201.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.201] by mail.gmx.net (mp002) with SMTP; 30 Dec 2006 16:42:20 +0100 X-Authenticated: #2092818 Subject: Re: GET_SORT_COLUMN_ID segfault From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> Content-Type: text/plain Date: Sat, 30 Dec 2006 16:42:21 +0100 Message-Id: <1167493341.4364.16.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 30 Dec 2006 15:42:25 -0000 On Thu, 2006-12-28 at 19:42 +0100, Jens Luedicke wrote: > Great! This patch fixes my problem. Committed to stable-1-14 and HEAD. -- Bye, -Torsten From scott@asofyet.org Sat Dec 30 10:46:34 2006 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 962333B0141 for ; Sat, 30 Dec 2006 10:46:34 -0500 (EST) 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 20385-03 for ; Sat, 30 Dec 2006 10:46:29 -0500 (EST) Received: from looneymail-a4.dreamhost.com (sd-green-bigip-119.dreamhost.com [208.97.132.119]) by menubar.gnome.org (Postfix) with ESMTP id 7DD9F3B013D for ; Sat, 30 Dec 2006 10:46:29 -0500 (EST) Received: from [192.168.0.101] (74-140-167-162.dhcp.insightbb.com [74.140.167.162]) by looneymail-a4.dreamhost.com (Postfix) with ESMTP id CBB13112D98; Sat, 30 Dec 2006 07:46:26 -0800 (PST) In-Reply-To: <1167493341.4364.16.camel@localhost.localdomain> References: <1B016EC3-5C1D-497A-A0F5-D9EB6662B55A@asofyet.org> <1167493341.4364.16.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Subject: Re: GET_SORT_COLUMN_ID segfault Date: Sat, 30 Dec 2006 10:46:25 -0500 To: Torsten Schoenfeld X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: 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: Sat, 30 Dec 2006 15:46:34 -0000 On Dec 30, 2006, at 10:42 AM, Torsten Schoenfeld wrote: > On Thu, 2006-12-28 at 19:42 +0100, Jens Luedicke wrote: > >> Great! This patch fixes my problem. > > Committed to stable-1-14 and HEAD. Thanks. I owe you even more beer. From kaffeetisch@gmx.de Sat Dec 30 14:12:44 2006 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 BA86B3B002B for ; Sat, 30 Dec 2006 14:12:44 -0500 (EST) 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 30713-03 for ; Sat, 30 Dec 2006 14:12:42 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id C159B3B00F0 for ; Sat, 30 Dec 2006 14:12:41 -0500 (EST) Received: (qmail invoked by alias); 30 Dec 2006 19:12:41 -0000 Received: from port-212-202-0-201.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.201] by mail.gmx.net (mp017) with SMTP; 30 Dec 2006 20:12:41 +0100 X-Authenticated: #2092818 Subject: Gnome2::Rsvg 0.10 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sat, 30 Dec 2006 20:12:43 +0100 Message-Id: <1167505963.4364.20.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 30 Dec 2006 19:12:44 -0000 Gnome2::Rsvg allows you to use the Scalable Vector Graphics library (librsvg for short) from Perl. The package is available from: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=105595&release_id=474685 Overview of changes in Gnome2::Rsvg 0.10 ======================================== * Add support for rsvg_handle_render_cairo and rsvg_handle_render_cairo_sub. From kaffeetisch@gmx.de Sat Dec 30 14:23:22 2006 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 3F1523B00FA for ; Sat, 30 Dec 2006 14:23:22 -0500 (EST) 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 31346-02 for ; Sat, 30 Dec 2006 14:23:17 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 7DE2E3B01AC for ; Sat, 30 Dec 2006 14:23:15 -0500 (EST) Received: (qmail invoked by alias); 30 Dec 2006 19:23:14 -0000 Received: from port-212-202-0-201.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.201] by mail.gmx.net (mp053) with SMTP; 30 Dec 2006 20:23:14 +0100 X-Authenticated: #2092818 Subject: Cairo 1.022 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sat, 30 Dec 2006 20:23:17 +0100 Message-Id: <1167506597.4364.22.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.534 tagged_above=-999 required=2 tests=[AWL=0.066, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.534 X-Spam-Level: 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, 30 Dec 2006 19:23:22 -0000 Cairo provides Perl bindings for the vector graphics library cairo. It supports multiple output targets, including PDF, PNG and SVG. Cairo produces identical output on all those targets. The package is available from: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=160888&release_id=474687 Or from cvs.freedesktop.org:/cvs/cairo in the module "cairo-perl", tagged as "rel-1-022". Overview of changes in Cairo 1.022 ================================== * Make Cairo::ImageSurface::get_data usable. * Fix the valid-value lists in enum error messages.