From dwipujono@gmail.com Wed Mar 1 03:01:50 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DB14C3B3C25 for ; Wed, 1 Mar 2006 03:01: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 18171-04 for ; Wed, 1 Mar 2006 03:01:47 -0500 (EST) Received: from jepara.linuxindo.com (unknown [202.78.199.217]) by menubar.gnome.org (Postfix) with SMTP id EA7063B3C29 for ; Wed, 1 Mar 2006 03:01:45 -0500 (EST) Received: (qmail 20697 invoked from network); 1 Mar 2006 07:57:20 -0000 Received: from unknown (HELO ?192.168.0.4?) (202.78.199.215) by 0 with SMTP; 1 Mar 2006 07:57:20 -0000 Message-ID: <44055C26.3010906@gmail.com> Date: Wed, 01 Mar 2006 15:32:38 +0700 From: Dwi Pujono GMail User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Content-Type: multipart/alternative; boundary="------------040804030409050104010009" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.197 tagged_above=-999 required=2 tests=[AWL=-0.256, BAYES_00=-2.599, HTML_30_40=0.374, HTML_MESSAGE=0.001, HTML_TITLE_EMPTY=0.214, SPF_NEUTRAL=1.069] X-Spam-Score: -1.197 X-Spam-Level: Subject: Entri point not found Gtk2-perl under win2k X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2006 08:01:51 -0000 This is a multi-part message in MIME format. --------------040804030409050104010009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, i am a windows 2K user, i try to learn Gtk2-Perl. I've allready install GTK+RE 2.2.4-3, ActiveState ActivePerl 5.8.6 Build 811, then via ppm i install ExtUlitls-Depend, ExtUtils-PkgConfig, Glib and Gtk2 from http://gtk2-perl.sourceforge.net/win32/ppm/. Everything is going well, no error reported. Then i follow the tutorial (http://gtk2-perl.sourceforge.net/doc/gtk2-perl-tut/ch-GettingStarted.html) base.pl here is the code: use Gtk2; Gtk2->init; $window = Gtk2::Window->new('toplevel'); $window->show; Gtk2->main; 0; when i run the program i get a pop up error message: "The procedure entry point g_type_default__interface_unref could not be located in the dynamic link library libgobject-2.0-0.dll" In the command line i get error: Can't load 'C:/..../Perl/site/lib/auto/Glib/Glib.dll' for module Glib:load_file: The specified procedure could not be found at C:/apache/Perl/lib/DynaLoader.pm line 230. at C:/...../Perl/site/lib/Gtk2.pm line 30 Compilation failed in require at C:/..../Perl/site/lib/Gtk2.pm line 30. BEGIN failed--compilation aborted at C:/...../Perl/site/lib/Gtk2.pm line 30. Compilation failed in require at base.pl line 1. BEGIN failed--compilation aborted at base.pl line 1. Can anyone help me? please. Thanks, Pujo --------------040804030409050104010009 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, i am a windows 2K user, i try to learn Gtk2-Perl.

I've allready install GTK+RE 2.2.4-3, ActiveState ActivePerl 5.8.6 Build 811, then via ppm i install ExtUlitls-Depend, ExtUtils-PkgConfig, Glib and Gtk2 from http://gtk2-perl.sourceforge.net/win32/ppm/. Everything is going well, no error reported.

Then i follow the tutorial (http://gtk2-perl.sourceforge.net/doc/gtk2-perl-tut/ch-GettingStarted.html)
base.pl  here is the code:
use Gtk2;
Gtk2->init;

$window = Gtk2::Window->new('toplevel');
$window->show;

Gtk2->main;
0;

when i run the program i get a pop up error message:
"The procedure entry point g_type_default__interface_unref could not be located in the dynamic link library libgobject-2.0-0.dll"

In the command line i get error:

Can't load 'C:/..../Perl/site/lib/auto/Glib/Glib.dll' for module Glib:load_file:
The specified procedure could not be found at C:/apache/Perl/lib/DynaLoader.pm line 230.
at C:/...../Perl/site/lib/Gtk2.pm line 30

Compilation failed in require at C:/..../Perl/site/lib/Gtk2.pm line 30.
BEGIN failed--compilation aborted at C:/...../Perl/site/lib/Gtk2.pm line 30.
Compilation failed in require at base.pl line 1.
BEGIN failed--compilation aborted at base.pl line 1.

Can anyone help me? please.

Thanks,

Pujo
--------------040804030409050104010009-- From scott@asofyet.org Wed Mar 1 08:08:07 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4CB493B12DA for ; Wed, 1 Mar 2006 08:08: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 07708-04 for ; Wed, 1 Mar 2006 08:07:51 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id 08F5A3B2361 for ; Wed, 1 Mar 2006 08:07:23 -0500 (EST) Received: from [192.168.0.102] (adsl-1116.mis.net [12.162.183.102]) by merry.dreamhost.com (Postfix) with ESMTP id EAC151070E0; Wed, 1 Mar 2006 05:07:22 -0800 (PST) In-Reply-To: <44055C26.3010906@gmail.com> References: <44055C26.3010906@gmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Wed, 1 Mar 2006 08:07:20 -0500 To: Dwi Pujono GMail X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.558 tagged_above=-999 required=2 tests=[AWL=0.041, BAYES_00=-2.599] X-Spam-Score: -2.558 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Entri point not found Gtk2-perl under win2k X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2006 13:08:08 -0000 On Mar 1, 2006, at 3:32 AM, Dwi Pujono GMail wrote: > I've allready install GTK+RE 2.2.4-3, ActiveState ActivePerl 5.8.6 > Build 811, then via ppm i install ExtUlitls-Depend, ExtUtils- > PkgConfig, Glib and Gtk2 from http://gtk2-perl.sourceforge.net/ > win32/ppm/. Everything is going well, no error reported. ... > when i run the program i get a pop up error message: > "The procedure entry point g_type_default__interface_unref could > not be located in the dynamic link library libgobject-2.0-0.dll" Are you sure that isn't "g_type_default_interface_unref" -- i.e., no doubled underscores? > In the command line i get error: > > Can't load 'C:/..../Perl/site/lib/auto/Glib/Glib.dll' for module > Glib:load_file: > The specified procedure could not be found at C:/apache/Perl/lib/ > DynaLoader.pm line 230. > at C:/...../Perl/site/lib/Gtk2.pm line 30 That sounds an awful lot as though you are using a GTK+ runtime that is older than that with which the perl extensions were built. Unfortunately, that information is not available in the PPD files. g_type_default_interface_ref, _unref, and _peek were added to libgobject in 2003, before glib 2.4.0. So, they are indeed public symbols. However, there was a change in either 2.6 or 2.8 that involves a bunch of symbol mangling to reduce runtime overhead for dynamic library pointer offsets, which essentially involves declaring two names for each symbol --- g_foo and IA__g_foo. I wonder if maybe you're having a problem with linking because the perl extensions are compiled and linked against the newer libgobject and you're trying to run with an older one. -- "Ears! They help us -- Ears! They help us hear th-- Ea--E--E--E-- Ears!" -- A Sesame Street singing toy, with Yvonne gleefully pressing the button over and over and over and over and... From j.g.karssenberg@student.utwente.nl Fri Mar 3 05:29:38 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F2B3E3B1AB9 for ; Fri, 3 Mar 2006 05:29: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 23420-01 for ; Fri, 3 Mar 2006 05:29:34 -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 0F1DC3B1AB5 for ; Fri, 3 Mar 2006 05:29:33 -0500 (EST) Received: from [192.168.3.8] (unknown [192.168.3.8]) by zoidberg.student.utwente.nl (Postfix) with ESMTP id D489B5707E for ; Fri, 3 Mar 2006 11:29:33 +0100 (CET) Message-ID: <44081A8C.90106@student.utwente.nl> Date: Fri, 03 Mar 2006 11:29:32 +0100 From: Jaap Karssenberg User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-1.33 tagged_above=-999 required=2 tests=[AWL=-1.145, BAYES_40=-0.185] X-Spam-Score: -1.33 X-Spam-Level: Subject: postscript / printing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2006 10:29:38 -0000 Hi, I would like to add postscript output / printing to my application. Is there a class that can convert the contents of a TextBuffer into postscript ? Thanks. -- Jaap From zentara1@sbcglobal.net Sun Mar 5 15:58:28 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 258C23B2709 for ; Sun, 5 Mar 2006 15:58: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 02178-10 for ; Sun, 5 Mar 2006 15:58:25 -0500 (EST) Received: from smtp101.sbc.mail.re2.yahoo.com (smtp101.sbc.mail.re2.yahoo.com [68.142.229.104]) by menubar.gnome.org (Postfix) with SMTP id 32C7F3B0818 for ; Sun, 5 Mar 2006 15:58:24 -0500 (EST) Received: (qmail 36557 invoked from network); 5 Mar 2006 20:58:20 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.79.95.205 with login) by smtp101.sbc.mail.re2.yahoo.com with SMTP; 5 Mar 2006 20:58:20 -0000 Date: Sun, 5 Mar 2006 15:55:09 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060305155509.11228e93@zentara.zentara.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Subject: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2006 20:58:28 -0000 Hi, I've been beating my head against a wall for awhile, so I better ask muppet....where the buck stops. :-) I'm trying to setup a basic example for myself, putting different cellrenderers into a list. I have the text, combos, and toggle setup ok, but the spinbutton is giving me fits. I've used the basic CellRendererSpinButton package which has been mentioned here before. The problem is that I can't seem to get the spin box to update to it's new value in the list. I can spin them up and down, and when I set them, with a click or enter, they revert to 0. If I manually edit the cell, and press enter, the liststore seems to get the value, but it does not appear in the spinbox cell, which remains 0.00. In the interest of simplicity, I put a super simple example below. #!/usr/bin/perl -w use strict; use Gtk2 -init; use Gtk2::Gdk::Keysyms; package Gtk2::CellRendererSpinButton; use POSIX qw(DBL_MAX UINT_MAX); use constant x_padding => 2; use constant y_padding => 3; use Glib::Object::Subclass "Gtk2::CellRenderer", signals => { edited => { flags => [ qw(run-last) ], param_types => [ qw(Glib::String Glib::Double) ], }, }, properties => [ Glib::ParamSpec->double( "xalign", "Horizontal Alignment", "Where am i?", 0.0, 1.0, 1.0, [ qw(readable writable) ] ), Glib::ParamSpec->boolean( "editable", "Editable", "Can I change that?", 0, [ qw(readable writable) ] ), Glib::ParamSpec->uint( "digits", "Digits", "How picky are you?", 0, UINT_MAX, 2, [ qw(readable writable) ] ), map { Glib::ParamSpec->double( $_->[ 0 ], $_->[ 1 ], $_->[ 2 ], 0.0, DBL_MAX, $_->[ 3 ], [ qw(readable writable) ] ) } ( [ "value", "Value", "How much is the fish?", 0.0 ], [ "min", "Min", "No way, I have to live!", 0.0 ], [ "max", "Max", "Ah, you're too generous.", 100.0 ], [ "step", "Step", "Okay.", 5.0 ] ) ]; sub INIT_INSTANCE { my $self = shift; $self->{ editable } = 0; $self->{ digits } = 2; $self->{ value } = 0.0; $self->{ min } = 0.0; $self->{ max } = 100.0; $self->{ step } = 5.0; $self->{ xalign } = 1.0; } sub calc_size { my ( $cell, $layout, $area ) = @_; my ( $width, $height ) = $layout->get_pixel_size(); return ( $area ? $cell->{ xalign } * ( $area->width - ( $width + 3 * x_padding ) ) : 0, 0, $width + x_padding * 2, $height + y_padding * 2 ); } sub format_text { my $cell = shift; my $format = sprintf '%%.%df', $cell->{ digits }; sprintf $format, $cell->{ value }; } sub GET_SIZE { my ( $cell, $widget, $area ) = @_; my $layout = $cell->get_layout( $widget ); $layout->set_text( $cell->format_text ); return $cell->calc_size( $layout, $area ); } sub get_layout { my ( $cell, $widget ) = @_; return $widget->create_pango_layout( "" ); } sub RENDER { my ( $cell, $window, $widget, $background_area, $cell_area, $expose_area, $flags ) = @_; my $state; if ( $flags & 'selected' ) { $state = $widget->has_focus() ? 'selected' : 'active'; } else { $state = $widget->state() eq 'insensitive' ? 'insensitive' : 'normal'; } my $layout = $cell->get_layout( $widget ); $layout->set_text( $cell->format_text ); my ( $x_offset, $y_offset, $width, $height ) = $cell->calc_size( $layout, $cell_area ); $widget->get_style->paint_layout( $window, $state, 1, $cell_area, $widget, "cellrenderertext", $cell_area->x() + $x_offset + x_padding, $cell_area->y() + $y_offset + y_padding, $layout ); } sub START_EDITING { my ( $cell, $event, $view, $path, $background_area, $cell_area, $flags ) = @_; my $spin_button = Gtk2::SpinButton->new_with_range( $cell->get( qw(min max step) ) ); $spin_button->set_value( $cell->get( "value" ) ); $spin_button->set_digits( $cell->get( "digits" ) ); $spin_button->grab_focus(); $spin_button->signal_connect( key_press_event => sub { my ( $event_box, $event ) = @_; if ( $event->keyval == $Gtk2::Gdk::Keysyms{ Return } || $event->keyval == $Gtk2::Gdk::Keysyms{ KP_Enter } ) { $spin_button->update(); $cell->signal_emit( edited => $path, $spin_button->get_value() ); $spin_button->destroy(); return 1; } elsif ( $event->keyval == $Gtk2::Gdk::Keysyms{ Up } ) { $spin_button->spin( 'step-forward', ( $spin_button->get_increments() )[ 0 ] ); return 1; } elsif ( $event->keyval == $Gtk2::Gdk::Keysyms{ Down } ) { $spin_button->spin( 'step-backward', ( $spin_button->get_increments() )[ 0 ] ); return 1; } return 0; } ); $spin_button->show_all(); return $spin_button; } 1; ################################################################ package main; my $window = Gtk2::Window->new( "toplevel" ); $window->set_title( "CellRendererSpinButton" ); $window->signal_connect( delete_event => sub { Gtk2->main_quit(); } ); my $model = Gtk2::ListStore->new( qw(Glib::Double) ); my $view = Gtk2::TreeView->new( $model ); #setup init value $model->set( $model->append(), 0 => 42.42 ); my $renderer = Gtk2::CellRendererSpinButton->new(); $renderer->set( mode => "editable", min => 0, max => 1000, step => 2, digits => 1 ); $renderer->signal_connect( edited => \&cell_edited ); my $column = Gtk2::TreeViewColumn->new_with_attributes( "1 digit", $renderer, value => 0 ); $view->append_column( $column ); my $vbox = Gtk2::VBox->new( 0, 5 ); $vbox->pack_start( $view, 1, 1, 0 ); my $button = Gtk2::Button->new( "Show Values" ); $button->signal_connect( "clicked" => sub { &show_values(@_); } ); $vbox->pack_start( $button, 0, 0, 0 ); $window->add( $vbox ); $window->show_all(); #use Devel::Symdump; #my $obj = Devel::Symdump->new('Gtk2::CellRendererSpinButton'); #print $obj->as_string; Gtk2->main(); #################################################################### sub cell_edited { my ( $cell, $path, $new_value ) = @_; $model->set( $model->get_iter( Gtk2::TreePath->new_from_string( $path ) ), 0 => $new_value ); } #################################################################### sub show_values { my $treeselection = $view->get_selection; my $iter = $treeselection->get_selected; print $model->get( $iter, 0 ),"\n" ; } __END__ -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From dkasak@nusconsulting.com.au Sun Mar 5 16:45:29 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 00A253B2229 for ; Sun, 5 Mar 2006 16:45: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 04819-05 for ; Sun, 5 Mar 2006 16:45:24 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id C53B43B2797 for ; Sun, 5 Mar 2006 16:45:20 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k25LjiQx022550; Mon, 6 Mar 2006 08:45:45 +1100 Message-ID: <440B5C17.8090709@nusconsulting.com.au> Date: Mon, 06 Mar 2006 08:45:59 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060120) MIME-Version: 1.0 To: zentara , gtk-perl-list@gnome.org References: <20060305155509.11228e93@zentara.zentara.net> In-Reply-To: <20060305155509.11228e93@zentara.zentara.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 394644 - 886cb74bfde7 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=394644&m=886cb74bfde7 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=394644&m=886cb74bfde7 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=394644&m=886cb74bfde7 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.358 tagged_above=-999 required=2 tests=[AWL=0.241, BAYES_00=-2.599] X-Spam-Score: -2.358 X-Spam-Level: Cc: Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2006 21:45:30 -0000 zentara wrote: > I've used the basic CellRendererSpinButton package > which has been mentioned here before. The problem is that > I can't seem to get the spin box to update to it's new value > in the list. I can spin them up and down, and when I set them, > with a click or enter, they revert to 0. > > If I manually edit the cell, and press enter, the liststore seems > to get the value, but it does not appear in the spinbox cell, which > remains 0.00. > > This sounds astonishingly similar to a problem I'm having with CellRendererCombo: http://bugzilla.gnome.org/show_bug.cgi?id=317387 ( see above post ) Basically, CellRendererText is set up so that when the focus leaves the editable things, an 'edited' signal is fired. This means that a user can type stuff in a cell, and then immediately click outside the TreeView, and the changes are detected ( ie the edited signal is fired ). Unfortunately, this doesn't happen ( automatically ) in other renderers, for example CellRendererCombo, and your CellRendererSpinButton. In these cases, you have to force an edited signal by pressing the Enter key ... or by clicking somewhere else inside the TreeView ( but outside the current cell ). In your case, since you only have one cell in the TreeView, there's nothing else to click into, so your only way of triggering the 'edited' signal is to use the keyboard. If there is some way to *make* this happen in code, then I'm all ears :) This issue is going to present a large problem for me soon too ... -- 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 bboett@bboett.dyndns.org Sun Mar 5 17:15:55 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9130C3B0FCB for ; Sun, 5 Mar 2006 17:15:55 -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 06505-03 for ; Sun, 5 Mar 2006 17:15:52 -0500 (EST) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by menubar.gnome.org (Postfix) with ESMTP id 6BE6C3B2337 for ; Sun, 5 Mar 2006 17:15:52 -0500 (EST) Received: from localhost.localdomain (neu67-1-82-227-69-82.fbx.proxad.net [82.227.69.82]) by smtp6-g19.free.fr (Postfix) with ESMTP id 351DD1892E for ; Sun, 5 Mar 2006 23:15:51 +0100 (CET) Received: by localhost.localdomain (Postfix, from userid 1000) id ABE0B154001; Sun, 5 Mar 2006 23:17:40 +0100 (CET) Date: Sun, 5 Mar 2006 23:17:40 +0100 From: Bruno Boettcher To: gtk-perl-list@gnome.org Message-ID: <20060305221740.GH7485@adlp.org> References: <20060305155509.11228e93@zentara.zentara.net> <440B5C17.8090709@nusconsulting.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2l43pqSnz0CmKuGJ" Content-Disposition: inline In-Reply-To: <440B5C17.8090709@nusconsulting.com.au> X-Gpg-Key-ID: E0807C30 X-Gpg-Fingerprint: F236 5F20 B0C2 D28E DE70 A322 C7CA CBB5 E080 7C30 User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.464 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.464 X-Spam-Level: Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bboett@adlp.org List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2006 22:15:55 -0000 --2l43pqSnz0CmKuGJ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 06, 2006 at 08:45:59AM +1100, Daniel Kasak wrote: > zentara wrote: > >I've used the basic CellRendererSpinButton package > >which has been mentioned here before. The problem is that > >I can't seem to get the spin box to update to it's new value > >in the list. I can spin them up and down, and when I set them, > >with a click or enter, they revert to 0. > > > >If I manually edit the cell, and press enter, the liststore seems > >to get the value, but it does not appear in the spinbox cell, which > >remains 0.00. =20 saw this problem passing though, checked my own apps, and indeed, same problem here.... --=20 ciao bboett =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D bboett@adlp.org http://inforezo.u-strasbg.fr/~bboett =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --2l43pqSnz0CmKuGJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFEC2OEx8rLteCAfDARAssSAJ4tRmBv7YjRPrdDZs+SYF27Kwf0VQCeOkZn sy48ssyAdV4gJtOdVAnnfKc= =hWsz -----END PGP SIGNATURE----- --2l43pqSnz0CmKuGJ-- From scott@asofyet.org Sun Mar 5 22:36:01 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5F1613B0F41 for ; Sun, 5 Mar 2006 22: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 20740-03 for ; Sun, 5 Mar 2006 22:36:00 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id 21C3B3B0D47 for ; Sun, 5 Mar 2006 22:36:00 -0500 (EST) Received: from [192.168.0.102] (adsl-1116.mis.net [12.162.183.102]) by samwise.dreamhost.com (Postfix) with ESMTP id 5C97FA80B8; Sun, 5 Mar 2006 19:35:57 -0800 (PST) In-Reply-To: <440B5C17.8090709@nusconsulting.com.au> References: <20060305155509.11228e93@zentara.zentara.net> <440B5C17.8090709@nusconsulting.com.au> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Sun, 5 Mar 2006 22:35:54 -0500 To: Daniel Kasak X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.558 tagged_above=-999 required=2 tests=[AWL=0.041, BAYES_00=-2.599] X-Spam-Score: -2.558 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 03:36:01 -0000 On Mar 5, 2006, at 4:45 PM, Daniel Kasak wrote: > Basically, CellRendererText is set up so that when the focus leaves > the editable things, an 'edited' signal is fired. This means that a > user can type stuff in a cell, and then immediately click outside > the TreeView, and the changes are detected ( ie the edited signal > is fired ). > > Unfortunately, this doesn't happen ( automatically ) in other > renderers, for example CellRendererCombo, and your > CellRendererSpinButton. In these cases, you have to force an edited > signal by pressing the Enter key ... or by clicking somewhere else > inside the TreeView ( but outside the current cell ). In your case, > since you only have one cell in the TreeView, there's nothing else > to click into, so your only way of triggering the 'edited' signal > is to use the keyboard. If there is some way to *make* this happen > in code, then I'm all ears :) This issue is going to present a > large problem for me soon too ... You've answered your own question ---- add code to your START_EDITING to hook up a handler to the new editable's "focus-out-event" signal. -- I believe that if music companies are going to set examples they need to do it to appropriate people and not dead people. -- Robin Chianumba From zentara1@sbcglobal.net Mon Mar 6 12:37:18 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 298DB3B3191 for ; Mon, 6 Mar 2006 12:37: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 06257-03 for ; Mon, 6 Mar 2006 12:37:15 -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 AA1B83B29EA for ; Mon, 6 Mar 2006 12:37:14 -0500 (EST) Received: (qmail 85347 invoked from network); 6 Mar 2006 17:37:13 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@70.236.170.177 with login) by smtp108.sbc.mail.re2.yahoo.com with SMTP; 6 Mar 2006 17:37:13 -0000 Date: Mon, 6 Mar 2006 12:34:55 -0500 From: zentara To: muppet Message-ID: <20060306123455.5e716ee6@zentara.zentara.net> In-Reply-To: References: <20060305155509.11228e93@zentara.zentara.net> <440B5C17.8090709@nusconsulting.com.au> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=0.104 tagged_above=-999 required=2 tests=[AWL=0.795, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: 0.104 X-Spam-Level: Cc: gtk-perl-list@gnome.org, Daniel Kasak Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 17:37:18 -0000 On Sun, 5 Mar 2006 22:35:54 -0500 muppet wrote: >You've answered your own question ---- add code to your START_EDITING >to hook up a handler to the new editable's "focus-out-event" signal. Yeah, I'm starting to play around with signals in the SpinCellRenderer and am getting results. But I still cannot alter the text which appears in the column after the Spin Button disaappears. I can get the value which I want to set there, but I can't get it in. Is there a way I can keep the spincell widget displayed constantly? That would be preferable for me anyways, I like seeing that widget sitting there. Thanks. -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From zentara1@sbcglobal.net Mon Mar 6 14:51:17 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D0FED3B109C for ; Mon, 6 Mar 2006 14:51: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 14846-03 for ; Mon, 6 Mar 2006 14:51:16 -0500 (EST) Received: from smtp102.sbc.mail.re2.yahoo.com (smtp102.sbc.mail.re2.yahoo.com [68.142.229.103]) by menubar.gnome.org (Postfix) with SMTP id AED0B3B2A57 for ; Mon, 6 Mar 2006 14:51:16 -0500 (EST) Received: (qmail 5954 invoked from network); 6 Mar 2006 19:51:15 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@70.236.167.103 with login) by smtp102.sbc.mail.re2.yahoo.com with SMTP; 6 Mar 2006 19:51:15 -0000 Date: Mon, 6 Mar 2006 14:48:57 -0500 From: zentara To: zentara Message-ID: <20060306144857.323fde58@zentara.zentara.net> In-Reply-To: <20060306123455.5e716ee6@zentara.zentara.net> References: <20060305155509.11228e93@zentara.zentara.net> <440B5C17.8090709@nusconsulting.com.au> <20060306123455.5e716ee6@zentara.zentara.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=-0.474 tagged_above=-999 required=2 tests=[AWL=0.217, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.474 X-Spam-Level: Cc: muppet , gtk-perl-list@gnome.org, Daniel Kasak Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 19:51:18 -0000 On Mon, 6 Mar 2006 12:34:55 -0500 zentara wrote: >On Sun, 5 Mar 2006 22:35:54 -0500 >muppet wrote: > >>You've answered your own question ---- add code to your START_EDITING >>to hook up a handler to the new editable's "focus-out-event" signal. > >Yeah, I'm starting to play around with signals in the SpinCellRenderer >and am getting results. >But I still cannot alter the text which appears in the column after >the Spin Button disaappears. I can get the value which I want to set there, >but I can't get it in. > >Is there a way I can keep the spincell widget displayed constantly? >That would be preferable for me anyways, I like seeing that widget >sitting there. > Well sorry Muppet, I don't want to waste your time, but I think I found the problem. It's only preliminary, but I'm sure I have a handle on it. The problem seems to be related to the CellRendererSpinButton package needs a section like sub SET_PROPERTY { my ($self, $pspec, $val) = @_; if ($pspec->get_name eq 'value') { $self->{value} = $val; } } That lets the initial value set in the ListStore's cells when you load the list store with initial values. I have to work out the exact details of the SET_PROPERTY sub, to let all the settings thru, but I'm sure the problem is solved. I'll have an example soon. :-) zentara -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From kaffeetisch@gmx.de Mon Mar 6 15:09:18 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 851713B29E8 for ; Mon, 6 Mar 2006 15:09: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 16349-04 for ; Mon, 6 Mar 2006 15:09:17 -0500 (EST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id B05813B324D for ; Mon, 6 Mar 2006 15:09:16 -0500 (EST) Received: (qmail invoked by alias); 06 Mar 2006 20:09:15 -0000 Received: from port-212-202-198-208.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.198.208] by mail.gmx.net (mp038) with SMTP; 06 Mar 2006 21:09:15 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Mon, 06 Mar 2006 21:09:17 +0100 Message-Id: <1141675757.12317.0.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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.427 tagged_above=-999 required=2 tests=[AWL=-0.039, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.427 X-Spam-Level: Subject: Glib 1.118 (unstable) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 20:09:18 -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. This is an unstable development release of Glib, containing new features and other cool stuff that have been added since the 1.10x stable series. The API is frozen in accordance with the GNOME 2.14 schedule. Report any bugs to gtk-perl-list AT gnome DOT org as soon as possible. Please use the stable 1.10x 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=91217&release_id=399185 ...and via anonymous cvs, tagged "rel-1-11-8" 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.118 ================================= * Improve the thread safety of Glib by correctly setting up perl's thread-local storage in a few strategic places. [Torsten] From zentara1@sbcglobal.net Mon Mar 6 16:00:15 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0F3F73B14B9 for ; Mon, 6 Mar 2006 16:00: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 20018-02 for ; Mon, 6 Mar 2006 16:00:13 -0500 (EST) Received: from smtp104.sbc.mail.re2.yahoo.com (smtp104.sbc.mail.re2.yahoo.com [68.142.229.101]) by menubar.gnome.org (Postfix) with SMTP id 70E8B3B2A33 for ; Mon, 6 Mar 2006 16:00:13 -0500 (EST) Received: (qmail 14570 invoked from network); 6 Mar 2006 21:00:12 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@70.233.5.99 with login) by smtp104.sbc.mail.re2.yahoo.com with SMTP; 6 Mar 2006 21:00:12 -0000 Date: Mon, 6 Mar 2006 15:57:30 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060306155730.588ce628@zentara.zentara.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Subject: Gtk2::CellRendererSpinButton-Z X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 21:00:15 -0000 Hi, Here is a working package, for the Gtk2::CellRendererSpinButton. It sets initial value, updates itself, and sets new initial value at each edit. I use a package global to hold the current value, and if anyone knows a better way, my ears are open. :-) #!/usr/bin/perl -w use strict; use Gtk2 -init; # package Gtk2::CellRendererSpinButtonZ; # # with a simple example usage # #this package is based on the Mup::CellRendererSpinButton #by muppet, but added # # 1. SET_PROPERTY sub to load and show initial values # 2. an extra signal handler for the focus-out to set # the spinbox, when going out of focus # 3. a global $cur_val to maintain the initial editing # start point package Gtk2::CellRendererSpinButtonZ; use POSIX qw(DBL_MAX UINT_MAX); use constant x_padding => 2; use constant y_padding => 3; use Gtk2::Gdk::Keysyms; #global to hold current value to load when start editing my $cur_val; use Glib::Object::Subclass "Gtk2::CellRenderer", signals => { edited => { flags => [ qw(run-last) ], param_types => [ qw(Glib::String Glib::Double) ], }, }, properties => [ Glib::ParamSpec->double( "xalign", "Horizontal Alignment", "Where am i?", 0.0, 1.0, 1.0, [ qw(readable writable) ] ), Glib::ParamSpec->boolean( "editable", "Editable", "Can I change that?", 0, [ qw(readable writable) ] ), Glib::ParamSpec->uint( "digits", "Digits", "How picky are you?", 0, UINT_MAX, 2, [ qw(readable writable) ] ), map { Glib::ParamSpec->double( $_->[ 0 ], $_->[ 1 ], $_->[ 2 ], 0.0, DBL_MAX, $_->[ 3 ], [ qw(readable writable) ] ) } ( [ "value", "Value", "How much is the fish?", 0.0 ], [ "min", "Min", "No way, I have to live!", 0.0 ], [ "max", "Max", "Ah, you're too generous.", 100.0 ], [ "step", "Step", "Okay.", 5.0 ] ) ]; sub INIT_INSTANCE { my $self = shift; $self->{ editable } = 0; $self->{ digits } = 2; $self->{ value } = 0.0; $self->{ min } = 0.0; $self->{ max } = 100.0; $self->{ step } = 5.0; $self->{ xalign } = 1.0; } sub SET_PROPERTY { my ($self, $pspec, $val) = @_; $self->{ $pspec->get_name } = $val; # set the initial editing value if ($pspec->get_name eq 'value') { $cur_val = $val; } } sub calc_size { my ( $cell, $layout, $area ) = @_; my ( $width, $height ) = $layout->get_pixel_size(); return ( $area ? $cell->{ xalign } * ( $area->width - ( $width + 3 * x_padding ) ) : 0, 0, $width + x_padding * 2, $height + y_padding * 2 ); } sub format_text { my $cell = shift; my $format = sprintf '%%.%df', $cell->{ digits }; sprintf $format, $cell->{ value }; } sub GET_SIZE { my ( $cell, $widget, $area ) = @_; my $layout = $cell->get_layout( $widget ); $layout->set_text( $cell->format_text ); return $cell->calc_size( $layout, $area ); } sub get_layout { my ( $cell, $widget ) = @_; return $widget->create_pango_layout( "" ); } sub RENDER { my ( $cell, $window, $widget, $background_area, $cell_area, $expose_area, $flags ) = @_; my $state; if ( $flags & 'selected' ) { $state = $widget->has_focus() ? 'selected' : 'active'; } else { $state = $widget->state() eq 'insensitive' ? 'insensitive' : 'normal'; } my $layout = $cell->get_layout( $widget ); $layout->set_text( $cell->format_text ); my ( $x_offset, $y_offset, $width, $height ) = $cell->calc_size( $layout, $cell_area ); $widget->get_style->paint_layout( $window, $state, 1, $cell_area, $widget, "cellrenderertext", $cell_area->x() + $x_offset + x_padding, $cell_area->y() + $y_offset + y_padding, $layout ); } sub START_EDITING { my ( $cell, $event, $view, $path, $background_area, $cell_area, $flags ) = @_; my $spin_button = Gtk2::SpinButton->new_with_range( $cell->get( qw(min max step) ) ); $spin_button->set_value( $cell->get( "value" ) ); $spin_button->set_digits( $cell->get( "digits" ) ); #set initial point for editing $spin_button->set_value( $cur_val ); $spin_button->grab_focus(); $spin_button->signal_connect( key_press_event => sub { my ( $event_box, $event ) = @_; if ( $event->keyval == $Gtk2::Gdk::Keysyms{ Return } || $event->keyval == $Gtk2::Gdk::Keysyms{ KP_Enter } ) { $spin_button->update(); $cell->signal_emit( edited => $path, $spin_button->get_value() ); $spin_button->destroy(); return 1; } elsif ( $event->keyval == $Gtk2::Gdk::Keysyms{ Up } ) { $spin_button->spin( 'step-forward', ( $spin_button->get_increments() )[ 0 ] ); return 1; } elsif ( $event->keyval == $Gtk2::Gdk::Keysyms{ Down } ) { $spin_button->spin( 'step-backward', ( $spin_button->get_increments() )[ 0 ] ); return 1; } return 0; } ); $spin_button->signal_connect( 'focus-out-event' => sub { my ( $event_box, $event ) = @_; $spin_button->update(); $cell->signal_emit( edited => $path, $spin_button->get_value() ); #set the init value for next edit $cur_val = $spin_button->get_value(); return 0; } ); $spin_button->show_all(); return $spin_button; } 1; ################################################################ package main; my $window = Gtk2::Window->new( "toplevel" ); $window->set_title( "CellRendererSpinButtonZ demo" ); $window->signal_connect( delete_event => sub { Gtk2->main_quit(); } ); my $model = Gtk2::ListStore->new( qw(Glib::Double) ); my $view = Gtk2::TreeView->new( $model ); #setup init value $model->set( $model->append(), 0 => 42.42 ); my $renderer = Gtk2::CellRendererSpinButtonZ->new(); $renderer->set( mode => "editable", min => 0, max => 1000, step => 1.0, digits => 2 ); $renderer->signal_connect( edited => \&cell_edited ); my $column = Gtk2::TreeViewColumn->new_with_attributes( "2 digit", $renderer, value => 0 ); $view->append_column( $column ); my $vbox = Gtk2::VBox->new( 0, 5 ); $vbox->pack_start( $view, 1, 1, 0 ); my $button = Gtk2::Button->new( "Show Values" ); $button->signal_connect( "clicked" => sub { &show_values( @_ ); } ); $vbox->pack_start( $button, 0, 0, 0 ); $window->add( $vbox ); $window->show_all(); Gtk2->main(); #################################################################### sub cell_edited { my ( $cell, $path, $new_value ) = @_; $model->set( $model->get_iter( Gtk2::TreePath->new_from_string( $path ) ), 0 => $new_value ); } #################################################################### sub show_values { my $treeselection = $view->get_selection; my $iter = $treeselection->get_selected; print $model->get( $iter, 0 ), "\n"; } __END__ -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From zentara1@sbcglobal.net Mon Mar 6 17:59:17 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5A5AA3B2C30 for ; Mon, 6 Mar 2006 17:59: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 27148-03 for ; Mon, 6 Mar 2006 17:59:16 -0500 (EST) Received: from smtp107.sbc.mail.re2.yahoo.com (smtp107.sbc.mail.re2.yahoo.com [68.142.229.98]) by menubar.gnome.org (Postfix) with SMTP id 2BBCA3B2C0D for ; Mon, 6 Mar 2006 17:59:15 -0500 (EST) Received: (qmail 29114 invoked from network); 6 Mar 2006 22:59:15 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.12.210 with login) by smtp107.sbc.mail.re2.yahoo.com with SMTP; 6 Mar 2006 22:59:14 -0000 Date: Mon, 6 Mar 2006 17:56:55 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060306175655.6b18311b@zentara.zentara.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Subject: another easy fix for Mup::CellRendererProgress; X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 22:59:17 -0000 Hi, After seeing that I needed an SET_PROPERTY in the custom cell renderer for spinboxes, I checked out the Mup::CellRendererProgress; in the examples directory of the Gtk2-1.115 release. The example cellrenderer_progress.pl , never really worked right, but I never looked into it. The text progress would display, but the bar had no motion. Anyways, I looked at the package, and muppet had written # we'll use the default new, GET_PROPERTY and SET_PROPERTY provided by # Glib::Object::Subclass. Apparently that dosn't do the trick for the bar, only the text field worked. So I added sub SET_PROPERTY { my ( $self, $pspec, $val ) = @_; $self->{ $pspec->get_name } = $val; } and voila, the bar worked too. Maybe you could update the example, or figure out why? As always.... you know more than me, :-) zentara -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From scott@asofyet.org Mon Mar 6 22:33:08 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F0FD33B12CA for ; Mon, 6 Mar 2006 22:33: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 07135-08 for ; Mon, 6 Mar 2006 22:33:05 -0500 (EST) Received: from smeagol.dreamhost.com (smeagol.dreamhost.com [66.33.209.5]) by menubar.gnome.org (Postfix) with ESMTP id 502633B11FE for ; Mon, 6 Mar 2006 22:33:01 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by smeagol.dreamhost.com (Postfix) with ESMTP id BA2D7135D18 for ; Mon, 6 Mar 2006 19:33:00 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <20060306155730.588ce628@zentara.zentara.net> References: <20060306155730.588ce628@zentara.zentara.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7106FAAA-8976-47C1-A97D-47D18CAEE734@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Mon, 6 Mar 2006 22:32:57 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.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: Subject: Re: Gtk2::CellRendererSpinButton-Z X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 03:33:08 -0000 On Mar 6, 2006, at 3:57 PM, zentara wrote: > Hi, > Here is a working package, for the > Gtk2::CellRendererSpinButton. > > It sets initial value, updates itself, and sets > new initial value at each edit. > > I use a package global to hold the current value, > and if anyone knows a better way, my ears are open. :-) You don't need the global at all. You pass the new value through the "new value" parameter of the edited signal. The cell renderer should not alter its own value --- that's for client code to do, if desired, in the "edited" callback. (Definitely "if desired" -- imagine a situation in which the SpinButton is used in a TreeView using a custom TreeModel, whose data actually reflects state elsewhere in the system. In this situation, having the CellRenderer set the value directly on the model may be quite bad. This is always left for the client code to perform.) I simply removed from your new code all lines that refer to $cur_val, and it all works as expected. In fact, if you press Enter in the spinbutton after editing, the 'edited' signal gets emitted twice --- once explictly from key-press-event., and again from focus-out-event as the cell editor is being destroyed. The original code required you to press "Enter" to "commit" the value, and allowed you to press "Esc" to cancel changing it. If you don't care about the distinction, then you don't even need to handle "Enter" specially, and can just rely on the focus-out-event. > sub SET_PROPERTY { > my ($self, $pspec, $val) = @_; > $self->{ $pspec->get_name } = $val; > > # set the initial editing value > if ($pspec->get_name eq 'value') { > $cur_val = $val; > } > } After you remove the global, you have a SET_PROPERTY which is merely a perl implementation of what the XS code already does. -- And then mama would throw the live crawdads in the boilin' water. And one day I decided I'd make my own crawdads. So I threw the crawdads in the pot, but without any water. It was just like makin' popcorn. -- Ear-bending cellmate, "Raising Arizona" From scott@asofyet.org Mon Mar 6 22:38:22 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 215573B1164 for ; Mon, 6 Mar 2006 22:38: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 07968-05 for ; Mon, 6 Mar 2006 22:38:21 -0500 (EST) Received: from smeagol.dreamhost.com (smeagol.dreamhost.com [66.33.209.5]) by menubar.gnome.org (Postfix) with ESMTP id E03663B139C for ; Mon, 6 Mar 2006 22:38:20 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by smeagol.dreamhost.com (Postfix) with ESMTP id B74FC135D16; Mon, 6 Mar 2006 19:38:19 -0800 (PST) In-Reply-To: <20060306144857.323fde58@zentara.zentara.net> References: <20060305155509.11228e93@zentara.zentara.net> <440B5C17.8090709@nusconsulting.com.au> <20060306123455.5e716ee6@zentara.zentara.net> <20060306144857.323fde58@zentara.zentara.net> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <76161452-66A2-4BAD-97C6-F2BD4A44739E@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Mon, 6 Mar 2006 22:38:16 -0500 To: zentara X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Cc: gtk-perl-list@gnome.org, Daniel Kasak Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 03:38:22 -0000 On Mar 6, 2006, at 2:48 PM, zentara wrote: > Well sorry Muppet, I don't want to waste your time, but I think I > found the problem. Indeed i talk a lot, but there's more people on this list than just me, you know. ;-) > It's only preliminary, but I'm sure I have a handle on it. > > The problem seems to be related to the CellRendererSpinButton > package needs a section like > > sub SET_PROPERTY { > my ($self, $pspec, $val) = @_; > > if ($pspec->get_name eq 'value') { > $self->{value} = $val; > } > } This is exactly the same as the XS implementation that is used as a fallback if you don't supply a SET_PROPERTY (since 1.02x? i don't remember). I doubt this is actually what fixed your problem. > That lets the initial value set in the ListStore's cells when you > load the list store with initial values. I don't grok that. -- elysse (in labor): is the head the biggest part? midwife: yes. elysse: oh, good. From scott@asofyet.org Mon Mar 6 22:44:39 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 50B4F3B15F3 for ; Mon, 6 Mar 2006 22:44: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 08021-08 for ; Mon, 6 Mar 2006 22:44:38 -0500 (EST) Received: from smeagol.dreamhost.com (smeagol.dreamhost.com [66.33.209.5]) by menubar.gnome.org (Postfix) with ESMTP id 302273B09D2 for ; Mon, 6 Mar 2006 22:44:37 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by smeagol.dreamhost.com (Postfix) with ESMTP id 64245135D17; Mon, 6 Mar 2006 19:44:35 -0800 (PST) In-Reply-To: <20060306123455.5e716ee6@zentara.zentara.net> References: <20060305155509.11228e93@zentara.zentara.net> <440B5C17.8090709@nusconsulting.com.au> <20060306123455.5e716ee6@zentara.zentara.net> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <25E9EB1B-F70D-41B1-AE61-CF0F108699B8@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Mon, 6 Mar 2006 22:44:32 -0500 To: zentara X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Cc: gtk-perl-list@gnome.org, Daniel Kasak Subject: Re: CellRendererSpinButton in a List X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 03:44:39 -0000 On Mar 6, 2006, at 12:34 PM, zentara wrote: > On Sun, 5 Mar 2006 22:35:54 -0500 > muppet wrote: > >> You've answered your own question ---- add code to your START_EDITING >> to hook up a handler to the new editable's "focus-out-event" signal. > > Yeah, I'm starting to play around with signals in the SpinCellRenderer > and am getting results. > But I still cannot alter the text which appears in the column after > the Spin Button disaappears. I can get the value which I want to > set there, > but I can't get it in. After seeing the code you sent out in the CellRendererSpinButtonZ thread, it appears that you were leaving out the model in the model- view-controller setup. You were using a global variable to store the value for editing, and to update it for later. This looks like you were controlling what value shows up in the cell renderer, but not what was actually in the model. The idea of the cell editor is not that it directly manipulates the model. The model holds the data. The view displays the data. The cell renderer does the actual drawing of the data. The cell renderer lets you start editing, but that editing is merely a service to get input, which the aggregating layer (main program, application code, or whatever layer set up the whole treeview) responds to by altering the model. That is, the cell emits the "edited" signal to let other code update the model. The cell should not alter the model. > Is there a way I can keep the spincell widget displayed constantly? > That would be preferable for me anyways, I like seeing that widget > sitting there. I think that's a different beast. From what i understand, the TreeView is set up to expect one cell to be edited at a time. Having a whole bunch of editor widgets up in a treeview would be more like a spreadsheet widget than a treeview. You could write your own RENDER that draws the cell with decorations that look like a SpinButton if you really like the look of it. -- In some newer operating systems, time_t has been widened to 64 bits. In the negative direction, this goes back more than twenty times the age of the universe, and so suffices. In the positive direction, whether this range is sufficient to represent all possible times depends on the ultimate fate of the universe, but it can be expected to postpone overflow long enough for such implementation limits to be abolished. -- Wikipedia, on UNIX time. From zentara1@sbcglobal.net Tue Mar 7 15:55:37 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1E3AE3B382F for ; Tue, 7 Mar 2006 15:55: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 06894-07 for ; Tue, 7 Mar 2006 15:55:36 -0500 (EST) Received: from smtp103.sbc.mail.re2.yahoo.com (smtp103.sbc.mail.re2.yahoo.com [68.142.229.102]) by menubar.gnome.org (Postfix) with SMTP id 033633B301C for ; Tue, 7 Mar 2006 15:55:35 -0500 (EST) Received: (qmail 88936 invoked from network); 7 Mar 2006 20:55:35 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.249.244.34 with login) by smtp103.sbc.mail.re2.yahoo.com with SMTP; 7 Mar 2006 20:55:34 -0000 Date: Tue, 7 Mar 2006 15:52:37 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060307155237.41293992@zentara.zentara.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Subject: Is the cellrenderer_date.pl working for anyone? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 20:55:37 -0000 Hi, I've been looking at the custom cellrenderers in the example subdir of the Gtk-1.115 module. Is the cellrenderer_date.pl working correctly for anyone? I get this weird flicker, of the cell text appearring and disappearing, as I move the mouse over the list; and the columns seem to get values confused and changing. I was wondering if it is due to me using a recent Gtk++ lib, or whether the thing is broken? I'm currently using glib-2.9.5 gtk+-2.8.11 and was wondering if they screw up the cell renderer examples. I recently posted that I needed to add a SET_PROPERTY sub to a couple of the packages, to make them work, and now the date renderer is acting funny. How are they working for others? If they work, what lib levels are you using? Thanks. -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From dkasak@nusconsulting.com.au Tue Mar 7 16:34:39 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 52A9B3B19B3 for ; Tue, 7 Mar 2006 16:34: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 09557-02 for ; Tue, 7 Mar 2006 16:34: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 B72AE3B18F9 for ; Tue, 7 Mar 2006 16:34:36 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k27LZ3HZ002785; Wed, 8 Mar 2006 08:35:03 +1100 Message-ID: <440DFC6E.9020606@nusconsulting.com.au> Date: Wed, 08 Mar 2006 08:34:38 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060120) MIME-Version: 1.0 To: zentara , gtk-perl-list@gnome.org References: <20060307155237.41293992@zentara.zentara.net> In-Reply-To: <20060307155237.41293992@zentara.zentara.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 396288 - 860f7410c15f X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=396288&m=860f7410c15f X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=396288&m=860f7410c15f X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=396288&m=860f7410c15f 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.367 tagged_above=-999 required=2 tests=[AWL=0.232, BAYES_00=-2.599] X-Spam-Score: -2.367 X-Spam-Level: Cc: Subject: Re: Is the cellrenderer_date.pl working for anyone? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 21:34:39 -0000 zentara wrote: > Is the cellrenderer_date.pl working correctly for anyone? > I get this weird flicker, of the cell text appearring and disappearing, > as I move the mouse over the list; and the columns seem to > get values confused and changing. > I posted about this type of issue a couple of days back ( Custom Cell Renderer broken after update ). You need to either downgrade to Perl 5.8.7 or update your Gtk2 Perl bindings to the very latest ( unstable ). -- 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 zentara1@sbcglobal.net Tue Mar 7 17:00:13 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6F9BD3B305E for ; Tue, 7 Mar 2006 17:00: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 10727-07 for ; Tue, 7 Mar 2006 17:00:10 -0500 (EST) Received: from smtp106.sbc.mail.re2.yahoo.com (smtp106.sbc.mail.re2.yahoo.com [68.142.229.99]) by menubar.gnome.org (Postfix) with SMTP id 8F85E3B34D9 for ; Tue, 7 Mar 2006 17:00:10 -0500 (EST) Received: (qmail 65537 invoked from network); 7 Mar 2006 22:00:09 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@70.233.7.53 with login) by smtp106.sbc.mail.re2.yahoo.com with SMTP; 7 Mar 2006 22:00:09 -0000 Date: Tue, 7 Mar 2006 16:57:29 -0500 From: zentara To: Daniel Kasak Message-ID: <20060307165729.5ff5df00@zentara.zentara.net> In-Reply-To: <440DFC6E.9020606@nusconsulting.com.au> References: <20060307155237.41293992@zentara.zentara.net> <440DFC6E.9020606@nusconsulting.com.au> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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.515 tagged_above=-999 required=2 tests=[AWL=-0.824, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -1.515 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Is the cellrenderer_date.pl working for anyone? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 22:00:13 -0000 On Wed, 08 Mar 2006 08:34:38 +1100 Daniel Kasak wrote: >zentara wrote: >> Is the cellrenderer_date.pl working correctly for anyone? >> I get this weird flicker, of the cell text appearring and disappearing, >> as I move the mouse over the list; and the columns seem to >> get values confused and changing. >> >I posted about this type of issue a couple of days back ( Custom Cell >Renderer broken after update ). >You need to either downgrade to Perl 5.8.7 or update your Gtk2 Perl >bindings to the very latest ( unstable ). > >-- >Daniel Kasak Thanks, that did it. Gtk2-1.116 and Glib-1.118 seems to work. Glad I asked :-) otherwise I would have really been messing the renderers up. :-) I must have read your earlier post, but it didn't sink in. But I do see it now. Thanks -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From zentara1@sbcglobal.net Tue Mar 7 17:09:07 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CD29D3B3882 for ; Tue, 7 Mar 2006 17:09: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 11746-02 for ; Tue, 7 Mar 2006 17:09:04 -0500 (EST) Received: from smtp112.sbc.mail.re2.yahoo.com (smtp112.sbc.mail.re2.yahoo.com [68.142.229.93]) by menubar.gnome.org (Postfix) with SMTP id C61DE3B384F for ; Tue, 7 Mar 2006 17:09:03 -0500 (EST) Received: (qmail 4223 invoked from network); 7 Mar 2006 22:09:03 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.250.9.186 with login) by smtp112.sbc.mail.re2.yahoo.com with SMTP; 7 Mar 2006 22:09:02 -0000 Date: Tue, 7 Mar 2006 17:06:06 -0500 From: zentara To: muppet Message-ID: <20060307170606.48292320@zentara.zentara.net> In-Reply-To: <7106FAAA-8976-47C1-A97D-47D18CAEE734@asofyet.org> References: <20060306155730.588ce628@zentara.zentara.net> <7106FAAA-8976-47C1-A97D-47D18CAEE734@asofyet.org> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.11; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Cc: gtk-perl mailing list Subject: Re: Gtk2::CellRendererSpinButton-Z X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 22:09:08 -0000 On Mon, 6 Mar 2006 22:32:57 -0500 muppet wrote: > >On Mar 6, 2006, at 3:57 PM, zentara wrote: > >> Hi, >> Here is a working package, for the >> Gtk2::CellRendererSpinButton. >> >> It sets initial value, updates itself, and sets >> new initial value at each edit. >> >> I use a package global to hold the current value, >> and if anyone knows a better way, my ears are open. :-) > >You don't need the global at all. You pass the new value through >the "new value" parameter of the edited signal. The cell renderer > >> sub SET_PROPERTY { >> my ($self, $pspec, $val) = @_; >> $self->{ $pspec->get_name } = $val; >> >> # set the initial editing value >> if ($pspec->get_name eq 'value') { >> $cur_val = $val; >> } >> } > >After you remove the global, you have a SET_PROPERTY which is merely >a perl implementation of what the XS code already does. Yes, I am humbled. :-) I caused all these problems for myself, by upgrading to Perl 5.8.8 , while not getting the latest Glib and Gtk-1.116 perl modules. I should have read more closely the post by Daniel Kasak a few days ago concerning this. So all of the above module hacking....... is just BS caused by me not noticing the upgrade problems. Sorry I wasted your time, but I sure learned alot. :-) zentara -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From scott@asofyet.org Tue Mar 7 20:15:17 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0FFC83B0714 for ; Tue, 7 Mar 2006 20:15: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 21163-04 for ; Tue, 7 Mar 2006 20:15:16 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id 019853B0809 for ; Tue, 7 Mar 2006 20:15:15 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by merry.dreamhost.com (Postfix) with ESMTP id BC955106540 for ; Tue, 7 Mar 2006 17:15:14 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <20060307170606.48292320@zentara.zentara.net> References: <20060306155730.588ce628@zentara.zentara.net> <7106FAAA-8976-47C1-A97D-47D18CAEE734@asofyet.org> <20060307170606.48292320@zentara.zentara.net> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Tue, 7 Mar 2006 20:15:13 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: Gtk2::CellRendererSpinButton-Z X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 01:15:17 -0000 On Mar 7, 2006, at 5:06 PM, zentara wrote: > Sorry I wasted your time, but I sure learned alot. :-) If something was learned, then the time was not wasted. -- elysse (pregnant): are your hands cold? me: uh, i suppose so. elysse: will you put them on me? From cybernmd@gmail.com Fri Mar 10 21:22:20 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 14D4B3B0D5D for ; Fri, 10 Mar 2006 21:22: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 04898-10 for ; Fri, 10 Mar 2006 21:22:19 -0500 (EST) Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.180]) by menubar.gnome.org (Postfix) with ESMTP id A1C683B0D36 for ; Fri, 10 Mar 2006 21:22:18 -0500 (EST) Received: by pproxy.gmail.com with SMTP id x66so928634pye for ; Fri, 10 Mar 2006 18:22:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:content-type:content-transfer-encoding; b=lcMzrZLzxYf0mYGk7po0uVUjFCfkhtOsKYG4DoXu3oXC/bt0oiYdxnS6PGlHPvCg9RasXw+yP97iAZajmhdTb8AuSEz5NEAvkQseuOEtiym4XYMrhkfcnbxFcilM6Naq7/MDue4BCycBHTXp1M9fMmQfqsTGU4Xze9VJ1ntKCjg= Received: by 10.35.119.11 with SMTP id w11mr1069464pym; Fri, 10 Mar 2006 18:22:17 -0800 (PST) Received: from ?192.168.1.100? ( [69.181.243.182]) by mx.gmail.com with ESMTP id m39sm171881pye.2006.03.10.18.22.17; Fri, 10 Mar 2006 18:22:17 -0800 (PST) Message-ID: <44123471.1070708@gmail.com> Date: Fri, 10 Mar 2006 18:22:41 -0800 From: cybernmd User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-2.446 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077, TW_KR=0.077] X-Spam-Score: -2.446 X-Spam-Level: Subject: Dynamically setting style X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Mar 2006 02:22:20 -0000 I have a problem dynamically setting styles in gtk2 perl application. What I am trying to implement is some kind of theme selection so that users could change the program's style without restarting it. I have a few different themes in different directories each with a gtkrc file unique to that theme. When user selects a style, I call: Gtk2::Rc->parse("$directory/gtkrc"); # to parse selected theme $window->reset_rc_styles; # to reset main window widget style to the new style Unfortunately, if any of the element in the window widget have been clicked, typed in, or otherwise modified upon setting the style those element retain a style from the previous configuration which creates a mix of multiple themes. I found out that you need to reset each and individual "touched" element before it will adapt the new theme which is impossible just because of the number of different elements i have in my program (I mean calling reset_rc_styles on every signle button, toolbar, etc.). So I am wondering if there is a better way to do dynamically apply gtkrc style themes to my application? Thanks for any help. From kaffeetisch@gmx.de Sun Mar 12 17:17:22 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 996C93B1A08 for ; Sun, 12 Mar 2006 17:17: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 07007-10 for ; Sun, 12 Mar 2006 17:17:13 -0500 (EST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id C056D3B2C10 for ; Sun, 12 Mar 2006 17:17:09 -0500 (EST) Received: (qmail invoked by alias); 12 Mar 2006 22:17:08 -0000 Received: from port-212-202-201-154.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.154] by mail.gmx.net (mp018) with SMTP; 12 Mar 2006 23:17:08 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sun, 12 Mar 2006 23:17:11 +0100 Message-Id: <1142201832.10132.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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.426 tagged_above=-999 required=2 tests=[AWL=-0.038, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.426 X-Spam-Level: Subject: Glib 1.120 (stable) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 22:17:22 -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=401057 ...and via anonymous cvs, tagged "rel-1-12-0" in the directory /gtk2-perl-xs/Glib . This release works with all stable releases of glib-2.x. In order to build Glib from source, you must have glib-2.x and its development headers and utilities installed, as well as the pkg-config utility. In addition, the following Perl modules are needed at build time (but not at runtime): ExtUtils::Depends >= 0.200 ExtUtils::PkgConfig >= 1.000 Overview of changes in Glib 1.120 ================================= Since 1.10x (the previous stable series) ---------------------------------------- * Comepletely revamp the way GObject types are mapped to Perl package names. The new algorithm is more robust and correct. * Add custom 64 bit integer handlers. * Add Glib::filename_display_name and Glib::filename_display_basename. * Improve thread safety. * Fix many bugs. Since 1.118 ----------- * Nada. From kaffeetisch@gmx.de Sun Mar 12 17:18:01 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 91A2C3B2C01 for ; Sun, 12 Mar 2006 17:18: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 07120-06 for ; Sun, 12 Mar 2006 17:17:58 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 108553B1A08 for ; Sun, 12 Mar 2006 17:17:58 -0500 (EST) Received: (qmail invoked by alias); 12 Mar 2006 22:17:57 -0000 Received: from port-212-202-201-154.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.154] by mail.gmx.net (mp041) with SMTP; 12 Mar 2006 23:17:57 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sun, 12 Mar 2006 23:18:00 +0100 Message-Id: <1142201880.10132.8.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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.493 tagged_above=-999 required=2 tests=[AWL=0.030, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.493 X-Spam-Level: Subject: Gtk2 1.120 (stable) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 22:18:01 -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/ . 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=401058 ...and from anonymous cvs, tagged "rel-1-12-0" in the directory /gtk2-perl-xs/Gtk2 . This module requires these other modules and libraries: perl >= 5.8.0 Glib >= 1.120 (perl module) GTK+ > 2.x (C library and prerequisites) 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.120 ================================= Since 1.10x (the previous stable series) ---------------------------------------- * Make GDK's and Pango's cairo glue available if the Perl module Cairo is installed. * Add Gtk2::AboutDialog::[gs]et_wrap_license and Gtk2::Dnd::set_icon_name. * Add most of the missing functions of GDK's X11 API. * Add Gtk2::Gdk::Pixbuf::save_to_buffer. * Make it possible to implement natively-scrollable widgets in Perl. Since 1.116 ----------- * Nada. From kaffeetisch@gmx.de Sun Mar 12 17:18:42 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F06DD3B2C14 for ; Sun, 12 Mar 2006 17:18: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 07048-10 for ; Sun, 12 Mar 2006 17:18:37 -0500 (EST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 3308F3B2C2A for ; Sun, 12 Mar 2006 17:18:35 -0500 (EST) Received: (qmail invoked by alias); 12 Mar 2006 22:18:34 -0000 Received: from port-212-202-201-154.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.154] by mail.gmx.net (mp043) with SMTP; 12 Mar 2006 23:18:34 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sun, 12 Mar 2006 23:18:37 +0100 Message-Id: <1142201917.10132.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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.464 tagged_above=-999 required=2 tests=[AWL=0.001, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, SPF_PASS=-0.001] X-Spam-Score: -2.464 X-Spam-Level: Subject: Gnome2::VFS 1.060 (stable) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 22:18:43 -0000 Gnome2::VFS - Perl interface to the 2.x series of the GNOME VFS library. This module allows you to interface with the GNOME Virtual File System library. It provides the means to transparently access files on all kinds of filesystems. The package is available from: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=102457&release_id=401060 Overview of changes in Gnome2-VFS 1.060 ======================================= Since 1.04x (the previous stable series) ---------------------------------------- * Add Gnome2::VFS::Address::equal, Gnome2::VFS::Address::match and Gnome2::VFS::get_slow_mime_type. * Add Gnome2::VFS::get_mime_type_for_name and Gnome2::VFS::get_mime_type_for_name_and_data. Since 1.031 ----------- * Make the Gnome2::VFS::Xfer test more robust. From kaffeetisch@gmx.de Sun Mar 12 17:19:18 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D68803B2C1A for ; Sun, 12 Mar 2006 17:19: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 07339-02 for ; Sun, 12 Mar 2006 17:19:15 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id D5C8E3B2C2D for ; Sun, 12 Mar 2006 17:19:13 -0500 (EST) Received: (qmail invoked by alias); 12 Mar 2006 22:19:12 -0000 Received: from port-212-202-201-154.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.201.154] by mail.gmx.net (mp018) with SMTP; 12 Mar 2006 23:19:12 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Sun, 12 Mar 2006 23:19:16 +0100 Message-Id: <1142201956.10132.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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.493 tagged_above=-999 required=2 tests=[AWL=0.030, BAYES_00=-2.599, SPF_PASS=-0.001, TW_BG=0.077] X-Spam-Score: -2.493 X-Spam-Level: Subject: Gnome2 1.040 (stable) X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 22:19:19 -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=401059 Overview of changes in Gnome2 1.040 =================================== Since 1.02x (the previous stable series) ---------------------------------------- * Fix some test suite issues. Since 1.030 ----------- * Nada. From scott@asofyet.org Sun Mar 12 18:37:17 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4E54C3B1739 for ; Sun, 12 Mar 2006 18:37: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 11337-10 for ; Sun, 12 Mar 2006 18:37:15 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id 5CCF93B16F2 for ; Sun, 12 Mar 2006 18:37:15 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id D1EC8A7D78; Sun, 12 Mar 2006 15:37:13 -0800 (PST) In-Reply-To: <1129236477.8383.17.camel@localhost.localdomain> References: <1129236477.8383.17.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5173D087-467F-4350-BD33-7C0C131F2097@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Sun, 12 Mar 2006 18:37:16 -0500 To: Emmanuele Bassi X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.526 tagged_above=-999 required=2 tests=[AWL=-0.004, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.526 X-Spam-Level: Cc: GTK2-Perl List Subject: Re: Build system X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2006 23:37:17 -0000 Yes, a timely response. Ahem. On Oct 13, 2005, at 4:47 PM, Emmanuele Bassi wrote: > It's been all day I've been trying to add perl bindings to gedit, > and I > must say that our build system sucks when dealing with self-contained > applications: > > 1. we simply ignore the existence of the auto-tools - which is not > bad, > since they are the spawn of evil as we all know but we also ignore the > existence of pkg-config, which is a bad thing(tm) > > 2. perl installation scheme sucks bigtime - come on, three possible > schemes depending on a variable? where the hell I'm supposed to > search for headers, typemaps and whatever if I can't use > ExtUtils::Depends? Would it help to create a different interface for ExtUtils::Depends that works something like pkg-config? > 3. we need code auto-generation a-la-pygtk. I can't constantly > write XS files in applications where the API changes more > frequently than libraries. The main reason that we don't have such code generation is that, for the most part, there's very little difference between maintaining an API defs file and an overrides file, versus just maintaining hand- written XS. XS is basically a combination of the def and overrides, and gets turned into C code by another process, anyway. In the simplest case, XSUBs are just C prototypes. But, admittedly, we use a non-standard dialect of POD, and a lot of our own conventions atop of what XS provides, and a lot of our custom code is handling things that XS doesn't know how to do, such as converting between the perl stack and GList or GSList. If we switched to using a defs file and a generator, we'd have a silly double-generation step, and it would probably make more sense just to have the generator go straight to C code using the perl API. It wouldn't be so bad, really, because we could automate a whole bunch of little things we currently can't. BUT, that would get us away from the standard Perl tools, which would keep us from getting improvements via xsubpp. It would make our stuff a little harder to integrate with other standard perl extensions. So, i'm not opposed, but i'm not champing at the bit, either. You'd have to show me something with hands-down wins for most binding projects before i'd back it enthusiastically. Also, i keep wondering whether gtk+'s introspection stuff will ever materialize. Of course, that may not actually make a difference for the kind of inside-an-application bindings you're talking about... > 4. I don't remember point four, but it'll come to mind eventually. I think it was "... PROFIT!!!!!111!!1one" :-) > Wrapping up libraries is a no-brainer, thanks to the work done by > all the gtk-perl developers; but when it comes to adding a binding > support to applications like Epiphany and Gedit, which do not have > a nice and clean plugin library, everything becomes very, *very* > messy. What's the messiest part? Dealing with application data structures? Integrating with a non-perl build system? Or just the general not- like-everything-else-ness of it? > In order to making life of plugin writers a little bit easier, we > would need at least to address points 1 and 2; adding a pkg-config > file to the binding libraries, pointing to the C headers and Perl > typemaps would increase the ability to actually use the bindings > code outside the library case - and also would make > ExtUtils::Depend go away, now that I think of it. -- Found: Poop Someone's dog lost some poop in front of the Studio Theatre. Unfortunately, this article has been slightly damaged since it was neglectfully left on the sidewalk. It is available to its rightful owner (or its owner's rightful owner) if they so desire to come and scrape it off my shoe. -- someplace on the internet From ebassi@gmail.com Sun Mar 12 19:30:05 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6F0F43B2CFA for ; Sun, 12 Mar 2006 19:30: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 14424-04 for ; Sun, 12 Mar 2006 19:30:04 -0500 (EST) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.199]) by menubar.gnome.org (Postfix) with ESMTP id 1B3403B2CF4 for ; Sun, 12 Mar 2006 19:30:02 -0500 (EST) Received: by nproxy.gmail.com with SMTP id o60so628083nfa for ; Sun, 12 Mar 2006 16:30:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=cuJ6M9RQlgSduDtPDVp28x09PkaUWV2seYeNyr+dvceyYOSWZobM5Ohc7cBQJH5m8S6yigqQbJZj2wcFNRjrv+Uimq5BXnFBJechG4hXZxO+xKwL1DQLTojK7QJ+U5wFdLl3wLtJxM3ZtSvuGBufUmuov/NrS9qpqfutxcjMja8= Received: by 10.49.28.8 with SMTP id f8mr2585484nfj; Sun, 12 Mar 2006 16:30:01 -0800 (PST) Received: from . ( [213.140.6.105]) by mx.gmail.com with ESMTP id v20sm1180919nfc.2006.03.12.16.29.59; Sun, 12 Mar 2006 16:30:00 -0800 (PST) From: Emmanuele Bassi To: muppet In-Reply-To: <5173D087-467F-4350-BD33-7C0C131F2097@asofyet.org> References: <1129236477.8383.17.camel@localhost.localdomain> <5173D087-467F-4350-BD33-7C0C131F2097@asofyet.org> Content-Type: text/plain Date: Mon, 13 Mar 2006 01:29:53 +0100 Message-Id: <1142209794.5578.108.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.5.92 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.813 tagged_above=-999 required=2 tests=[AWL=0.254, BAYES_00=-2.599, RCVD_IN_SORBS_WEB=1.456, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -0.813 X-Spam-Level: Cc: GTK2-Perl List Subject: Re: Build system X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 00:30:05 -0000 Hi muppet, On Sun, 2006-03-12 at 18:37 -0500, muppet wrote: > Yes, a timely response. Ahem. No problem - as you can see, I didn't even began writing (much) code. > > It's been all day I've been trying to add perl bindings to gedit, > > and I > > must say that our build system sucks when dealing with self-contained > > applications: > > > > 1. we simply ignore the existence of the auto-tools - which is not > > bad, > > since they are the spawn of evil as we all know but we also ignore the > > existence of pkg-config, which is a bad thing(tm) > > > > 2. perl installation scheme sucks bigtime - come on, three possible > > schemes depending on a variable? where the hell I'm supposed to > > search for headers, typemaps and whatever if I can't use > > ExtUtils::Depends? > > Would it help to create a different interface for ExtUtils::Depends > that works something like pkg-config? I've always thought, with a bit of shame for this thought, that ExtUtils::Depends was a bit broken, even as a perl-ish solution to dependency issues. Finally, after much tinkering and thinking about the build system, I've come to the enlightened conclusion that ExtUtils::Depends simply sucks, and should be scrapped entirely. I realise that we would be breaking things, and so a parallel installation should be in order; but the blatant disregard of the world outside the Perl bindings for a module shouldn't be condoned or tolerated anymore: the gtk2-perl bindings should be as easy to integrate for a C developer as they are for the Perl developer. We have the technology. [3. auto-generated stuff] > So, i'm not opposed, but i'm not champing at the bit, either. You'd > have to show me something with hands-down wins for most binding > projects before i'd back it enthusiastically. Yep, you are right. That was a knee-jerk reaction of mine, mostly due to the frustration, and after cooling down, I really don't see the need for a code generator for the common case; nevertheless, the "inside-an-application" scenario requires something *like* a code generator, since we wouldn't have access to either all the Perl goodies or the introspection data of a library. So, an hypothetical gperl-codegen would be have just a limited usage and scope, and could really be shipped as a side project. > > 4. I don't remember point four, but it'll come to mind eventually. > > I think it was "... PROFIT!!!!!111!!1one" :-) Yep, something like that. :-D > > Wrapping up libraries is a no-brainer, thanks to the work done by > > all the gtk-perl developers; but when it comes to adding a binding > > support to applications like Epiphany and Gedit, which do not have > > a nice and clean plugin library, everything becomes very, *very* > > messy. > > What's the messiest part? Dealing with application data structures? > Integrating with a non-perl build system? Or just the general not- > like-everything-else-ness of it? The weirdest and messiest parts are: 1. missing bits - I can't find the bindings shared objects or the header files without using ExtUtils::Depends into a script 2. Perl non-inehritance - I can't automagically make a Gedit::Window inherit from Gtk2::Window, even though GeditWindow is a GtkWindow at C level - this is because I can't get the typemaps from the Gtk2 package; so I have to resort to a series of @ISA hacks which really break down maintainability 3. kludginess and non-integration: making everything work inside an auto-tools based project Brings Pain and Misery Upon The Developer There's no "Silver Bullet Solution" to these issues. A viable road map might be creating a build system using on Module::Build, which exports everything inside a pkg-config file, allowing us to integrate all the stuff we are already doing inside MakeHelper and ParseXSDoc; make Glib depend on it, and then use it throughout all the modules. Of course, I'm not sure it's the best option - and anyone is more than welcome to propose an alternative solution and point me in the right direction; but I feel that pkg-config, auto-tools integration in the tool chain and standard locations for the build stuff is probably the right way to go. As soon as I'm able to reclaim some spare time (next month, probably), it'll be at the top of my list. Ciao, Emmanuele. -- Emmanuele Bassi - Log: http://log.emmanuelebassi.net From djdaga@gmail.com Sun Mar 12 21:04:36 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 321F83B0863 for ; Sun, 12 Mar 2006 21:04: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 19117-07 for ; Sun, 12 Mar 2006 21:04:33 -0500 (EST) Received: from rs25s12.datacenter.cha.cantv.net (rs25s12.datacenter.cha.cantv.net [200.44.33.106]) by menubar.gnome.org (Postfix) with ESMTP id ADDCA3B0714 for ; Sun, 12 Mar 2006 21:04:32 -0500 (EST) Received: from [200.44.133.49] (scbras3-049.ras.scb.cantv.net [200.44.133.49]) by rs25s12.datacenter.cha.cantv.net (8.13.4/8.13.0/3.0) with ESMTP id k2D24U93007413 for ; Sun, 12 Mar 2006 22:04:30 -0400 X-Matched-Lists: [] Message-ID: <4414D31B.3040701@gmail.com> Date: Sun, 12 Mar 2006 22:04:11 -0400 From: =?ISO-8859-1?Q?Jos=E9_Luis_Regalado?= User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on rs25s12.datacenter.cha.cantv.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.53 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_NEUTRAL=1.069] X-Spam-Score: -1.53 X-Spam-Level: Subject: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 02:04:36 -0000 Greetings Friends. Sorry by my English this is not very good I have some doubts. I chose to use libraries GTK2 and perl. Everything goes well, but i have to write much code and I not like this. Now, I am using Glade 2 and this is better because I do not work much writing code for packing an others. Glade generate a file called by example: foo.glade. It is possible to happen of foo.glade to foo.pl?, it is to say, XML to perl code? I using this script to execute a XML file generated by glade: use warnings; use strict; use Gtk2 -init; use Gtk2::GladeXML; my $my_window = Gtk2::GladeXML->new("/home/bashman/Proyects/window/window.glade"); my $my_window->signal_autoconnect_from_package('main'); my $title = $my_window->get_widget('window'); my $title->set_title('hello'); # here, i can change the window title and much more. Gtk2->main; It is a good one practices to work on the basis of a XML file? Not if I am mistaken, but I would like to do it thus: use warnings; use strict; use Gtk2 '-init'; use Glib qw/TRUE FALSE/; #creamos una ventana my $ventana = Gtk2::Window-> new ('toplevel'); my $boton = Gtk2::Button-> new ('Click Me'); my $txt = Gtk2::Entry::new ('asdsa'); my $labell= Gtk2::Label->new ('Introduzca su nombre'); my $tabla = Gtk2::Table-> new (2, 2, FALSE); #añadimos el botón a la tabla $tabla->attach_defaults($labell, 0, 2, 0, 1); $tabla->attach_defaults($boton, 0, 1, 1, 2); $tabla->attach_defaults($txt, 1, 2, 1, 2); $ventana->add($tabla); $ventana->show_all; Gtk2->main; I like see all in perl code without much working, passing of XML to perl. -- José Luis Regalado Linux User 280381. San Cristóbal Edo. Táchira - Venezuela 0276-766.72.20 0276-340.01.90 0414-710.48.57 "Donde hay ignorancia hay fanatismo donde hay fanatismo no hay tolerancia, donde no hay tolerancia no hay _paz_" From grant@mclean.net.nz Sun Mar 12 21:24:02 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E46A53B07EC for ; Sun, 12 Mar 2006 21:24: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 19927-01 for ; Sun, 12 Mar 2006 21:24:00 -0500 (EST) Received: from mail1.catalyst.net.nz (godel.catalyst.net.nz [202.78.240.40]) by menubar.gnome.org (Postfix) with ESMTP id C38B73B0781 for ; Sun, 12 Mar 2006 21:23:59 -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 1FIciz-0001sm-8l; Mon, 13 Mar 2006 15:23:57 +1300 From: Grant McLean To: =?ISO-8859-1?Q?Jos=E9?= Luis Regalado In-Reply-To: <4414D31B.3040701@gmail.com> References: <4414D31B.3040701@gmail.com> Content-Type: text/plain; charset=UTF-8 Date: Mon, 13 Mar 2006 15:23:56 +1300 Message-Id: <1142216636.15988.15.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.464 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] X-Spam-Score: -2.464 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 02:24:02 -0000 On Sun, 2006-03-12 at 22:04 -0400, Jos=C3=A9 Luis Regalado wrote:=20 > Glade generate a file called by example: foo.glade. It is possible to=20 > happen of foo.glade to foo.pl?, it is to say, XML to perl code? That would mean that you could not go back to Glade and revise your user interface. If you did, and re-generated foo.pl, you would lose all the changes you'd made. It is better to keep your user interface and your logic separate. A useful technique is to create a Perl class and using Glade, connect signal handlers to method calls against an object of that class. Such a technique is described in this tutorial: http://live.gnome.org/GTK2-Perl/GladeXML/Tutorial You might find it useful to generate the outline of this class using a script that reads the .glade file and generates a .pm file. However, if you later add signal handlers to the glade definition, you'll need to add the methods manually to the .pm file. Marco Antonio Manzo's Gtk2::GladeXML::Simple module includes a script called gpsketcher that can create an initial .pm file for you: http://search.cpan.org/dist/Gtk2-GladeXML-Simple/ Regards Grant From scott@asofyet.org Sun Mar 12 21:39:19 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 581AE3B197F for ; Sun, 12 Mar 2006 21:39: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 20186-09 for ; Sun, 12 Mar 2006 21:39:16 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id C974B3B0D7C for ; Sun, 12 Mar 2006 21:39:16 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id E7E4AA7D78 for ; Sun, 12 Mar 2006 18:39:15 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <4414D31B.3040701@gmail.com> References: <4414D31B.3040701@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: muppet Date: Sun, 12 Mar 2006 21:39:20 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 02:39:19 -0000 On Mar 12, 2006, at 9:04 PM, Jos=E9 Luis Regalado wrote: > Glade generate a file called by example: foo.glade. It is possible =20 > to happen of foo.glade to foo.pl?, it is to say, XML to perl code? There once was a tool that would generate perl code from a glade XML =20 file, but the tool has been unsupported for a few years and doesn't =20 work with Gtk2 since well before 1.0. In the gtk+ world it has =20 generally become the practice to use libglade instead of generating =20 code. > my $my_window =3D Gtk2::GladeXML->new("/home/bashman/Proyects/window/=20= > window.glade"); If dealing with the separate XML file is a problem, you can embed the =20= XML in the perl file with very little effort. I've seen various =20 people use a Makefile rule to concatenate the .glade file onto =20 the .pm or .pl file before installation. -- "Ghostbusters" is the best movie of this decade. -- Neal, circa 1996, referring to a movie released in 1984. From dirkvanderwalt@gmail.com Mon Mar 13 05:29:37 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 14D983B18AF for ; Mon, 13 Mar 2006 05:29: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 14695-09 for ; Mon, 13 Mar 2006 05:29:34 -0500 (EST) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.205]) by menubar.gnome.org (Postfix) with ESMTP id 9E46B3B195E for ; Mon, 13 Mar 2006 05:29:34 -0500 (EST) Received: by xproxy.gmail.com with SMTP id s11so859338wxc for ; Mon, 13 Mar 2006 02:29:33 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qI270HtKRCqCJDWREdpJjKdnsaU4KSvSUIB9hHDi1whs/AAtzKosf+3Sq/FUxAZfSAWwA65dWEemONYHWL31LJm+4Xxc/k0giZvVf3MeSKMrEkTC1/L1mG54q1d5C1ETYt36v/6xUEBwfNDHHzeOgAZ7oQWNkLn/2kJ9LeBZT20= Received: by 10.70.74.16 with SMTP id w16mr2718633wxa; Mon, 13 Mar 2006 02:29:33 -0800 (PST) Received: by 10.70.75.9 with HTTP; Mon, 13 Mar 2006 02:29:33 -0800 (PST) Message-ID: <856a994f0603130229u480117fdh77ff5f6d996648cc@mail.gmail.com> Date: Mon, 13 Mar 2006 12:29:33 +0200 From: "Dirk vdw" To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17261_21100806.1142245773857" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.45 tagged_above=-999 required=2 tests=[AWL=0.139, BAYES_40=-0.185, HTML_40_50=0.496, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: 0.45 X-Spam-Level: Subject: Link 2 LiveCD Druid X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 10:29:37 -0000 ------=_Part_17261_21100806.1142245773857 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, can you pls add a link to my program :) http://forgeftp.novell.com/livecd-druid/homepage/index.html Tx! ------=_Part_17261_21100806.1142245773857 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,

can you pls add a link to my program :)

htt= p://forgeftp.novell.com/livecd-druid/homepage/index.html

Tx!
------=_Part_17261_21100806.1142245773857-- From beast@ldap.or.id Mon Mar 13 05:56:10 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 05F1E3B1282 for ; Mon, 13 Mar 2006 05:56: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 16485-05 for ; Mon, 13 Mar 2006 05:56:09 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id B368A3B132D for ; Mon, 13 Mar 2006 05:56:08 -0500 (EST) Message-ID: <44154FB7.9030409@ldap.or.id> Date: Mon, 13 Mar 2006 17:55:51 +0700 From: Beast User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.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.896 tagged_above=-999 required=2 tests=[AWL=-1.445, BAYES_05=-1.11, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135, TW_GT=0.077] X-Spam-Score: -0.896 X-Spam-Level: Subject: glade is preferred? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 10:56:10 -0000 This might little oot for this list. Is creating UI with glade is now the preferred way to make GUI application using perl-gtk (or any other gtk binding language)? what is the pros and cons? Note: I never been using glade previously. -- --beast From hemlock@vtlink.net Mon Mar 13 12:57:43 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D74833B1BC1 for ; Mon, 13 Mar 2006 12:57: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 11423-09 for ; Mon, 13 Mar 2006 12:57:42 -0500 (EST) Received: from mail2.vtlink.com (mail2.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id 757AF3B1CB3 for ; Mon, 13 Mar 2006 12:57:41 -0500 (EST) Received: (qmail 7766 invoked by uid 5142); 13 Mar 2006 17:57:49 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(130.189.149.161):. Processed in 0.182684 secs); 13 Mar 2006 17:57:49 -0000 Received: from unknown (HELO ?130.189.149.161?) (hemlock@130.189.149.161) by mail.vtlink.net with ESMTPA; 13 Mar 2006 12:57:49 -0500 Message-ID: <4415B323.40702@vtlink.net> Date: Mon, 13 Mar 2006 13:00:03 -0500 From: James Muir User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-2.543 tagged_above=-999 required=2 tests=[AWL=0.057, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.543 X-Spam-Level: Subject: Pango Layout Mystery X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 17:57:44 -0000 Hi Everybody, I'm trying to understand some things about Pango layouts and how they relate to Gnome2::Canvas::Text items. I assume that internal to a Gnome2::Canvas::Text item there is lurking a Gtk2::Pango::Layout that unfortunately I can't get at :-(. Can anyone explain to me why "$layout->get_pixel_size()" returns different values than those I'd get when I get the Gnome2:Canvas::Item 'text-height' and 'text-width' properties? I've looked at several other Layout properties (spacing, indent, justify) and they all return "0". In the example below, I get: text, text: Hello World! font: Ariel Normal 10 text_height: 13 layout_height: 17 text_width: 66 layout_width: 76 Here's the example: use strict; use Gtk2 '-init'; use Gnome2::Canvas; use constant TRUE=>1; use constant FALSE=>0; my $window = Gtk2::Window->new(); my $scroller = Gtk2::ScrolledWindow->new(); my $canvas = Gnome2::Canvas->new_aa(); $canvas->set_scroll_region(0,0,350,325); $scroller->add($canvas); $window->add($scroller); $window->signal_connect('destroy'=>\&_closeapp); $window->set_default_size(450,350); my $root = $canvas->root; my $hello = 'Hello World!'; my $font = "Ariel Normal 10"; my $font_desc = Gtk2::Pango::FontDescription->from_string($font); my $layout = $canvas->create_pango_layout($hello); $layout->set_font_description($font_desc); my $text = Gnome2::Canvas::Item->new($root, 'Gnome2::Canvas::Text', text=>$hello, font_desc=>$font_desc, fill_color=>'black', x=>100, y=>100); my ($layout_width, $layout_height) = $layout->get_pixel_size(); my $text_width = $text->get('text-width'); my $text_height = $text->get('text-height'); print "text, text: $hello font: $font text_height: $text_height layout_height: $layout_height " . "text_width: $text_width layout_width: $layout_width\n"; my $box = Gnome2::Canvas::Item->new($root, 'Gnome2::Canvas::Rect', x1=>0, y1=>0, x2=>350, y2=>300, fill_color=>'white', outline_color=>'black'); $text->raise_to_top(); $box->lower_to_bottom(); $window->show_all(); Gtk2->main(); exit 0; sub _closeapp { Gtk2->main_quit(); return 0; } Thanks for any light you may be able to shed on this mystery. -James From scott@asofyet.org Mon Mar 13 14:09:50 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C5C133B0CB8 for ; Mon, 13 Mar 2006 14: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 16474-02 for ; Mon, 13 Mar 2006 14:09:47 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id A98ED3B1BBD for ; Mon, 13 Mar 2006 14:09:47 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id 3561ADC8AA for ; Mon, 13 Mar 2006 11:09:38 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 13 Mar 2006 14:09:38 -0500 (EST) Message-ID: <53938.192.146.101.26.1142276978.squirrel@webmail.asofyet.org> In-Reply-To: <4415B323.40702@vtlink.net> References: <4415B323.40702@vtlink.net> Date: Mon, 13 Mar 2006 14:09:38 -0500 (EST) 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=-2.566 tagged_above=-999 required=2 tests=[AWL=0.033, BAYES_00=-2.599] X-Spam-Score: -2.566 X-Spam-Level: Subject: Re: Pango Layout Mystery X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 19:09:50 -0000 James Muir wrote: > Can anyone explain to me why "$layout->get_pixel_size()" returns > different values than those I'd get when I get the Gnome2:Canvas::Item > 'text-height' and 'text-width' properties? I've looked at several other > Layout properties (spacing, indent, justify) and they all return "0". In > the example below, I get: > > text, text: Hello World! font: Ariel Normal 10 text_height: 13 > layout_height: 17 text_width: 66 layout_width: 76 When i run it, i get text_height: 17 and layout_height: 17, but text_width: 77 and layout_height: 72. At the end of gnome_canvas_text_set_property() i found this code: if (text->layout) pango_layout_get_pixel_size (text->layout, &text->max_width, &text->height); else { text->max_width = 0; text->height = 0; } which appears to be the only place where the values of ->height and ->max_width are set. Those values are used in gnome_canvas_text_get_property() like so: case PROP_TEXT_WIDTH: g_value_set_double (value, text->max_width / text->item.canvas->pixels_per_unit); break; case PROP_TEXT_HEIGHT: g_value_set_double (value, text->height / text->item.canvas->pixels_per_unit); break; That is, when you do this: > my $text_width = $text->get('text-width'); > my $text_height = $text->get('text-height'); you're essentially doing my ($layout_width, $layout_height) = $layout->get_pixel_size(); $layout_width /= $text->pixels_per_unit; $layout_height /= $text->pixels_per_unit; Granted, this is based on looking for about two minutes at stuff i had lying around. -- muppet From hemlock@vtlink.net Mon Mar 13 16:10:20 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 45B1D3B30CE for ; Mon, 13 Mar 2006 16:10: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 23870-01 for ; Mon, 13 Mar 2006 16:10:13 -0500 (EST) Received: from mail2.vtlink.com (mail2.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id 8B0193B326C for ; Mon, 13 Mar 2006 16:10:12 -0500 (EST) Received: (qmail 9504 invoked by uid 5142); 13 Mar 2006 21:10:18 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(130.189.149.161):. Processed in 0.011788 secs); 13 Mar 2006 21:10:18 -0000 Received: from unknown (HELO ?130.189.149.161?) (hemlock@130.189.149.161) by mail.vtlink.net with ESMTPA; 13 Mar 2006 16:10:18 -0500 Message-ID: <4415E040.4090005@vtlink.net> Date: Mon, 13 Mar 2006 16:12:32 -0500 From: James Muir User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <4415B323.40702@vtlink.net> <53938.192.146.101.26.1142276978.squirrel@webmail.asofyet.org> In-Reply-To: <53938.192.146.101.26.1142276978.squirrel@webmail.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=-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: Subject: Re: Pango Layout Mystery X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Mar 2006 21:10:20 -0000 muppet wrote: >Granted, this is based on looking for about two minutes at stuff i had lying >around. > > > > Thanks for looking. This gives me something to chew on. -James From ari.jolma@tkk.fi Tue Mar 14 15:26:43 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 008053B21FB for ; Tue, 14 Mar 2006 15:26: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 08145-02 for ; Tue, 14 Mar 2006 15:26:38 -0500 (EST) Received: from pne-smtpout4-sn1.fre.skanova.net (pne-smtpout4-sn1.fre.skanova.net [81.228.11.168]) by menubar.gnome.org (Postfix) with ESMTP id 7628D3B220A for ; Tue, 14 Mar 2006 15:26:32 -0500 (EST) Received: from [192.168.3.12] (80.221.66.9) by pne-smtpout4-sn1.fre.skanova.net (7.2.070) id 43CBBB290041F7E0 for gtk-perl-list@gnome.org; Tue, 14 Mar 2006 21:26:29 +0100 Message-ID: <441726BD.8050303@tkk.fi> Date: Tue, 14 Mar 2006 22:25:33 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-2.599 tagged_above=-999 required=2 tests=[BAYES_00=-2.599] X-Spam-Score: -2.599 X-Spam-Level: Subject: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2006 20:26:43 -0000 Hi, This is about the Gtk2::Ex::Geo modules, which are on CPAN. How the code works is, at least partly, explained also on http://map.hut.fi/PerlForGeoinformatics I've got a derivative (subclass in Perl sense) of Gtk2::Gdk::Pixbuf. I create it using gdk_pixbuf_new_from_data. The data is created in C using my own draw routines. From this pixbuf I create a pixmap by calling render_pixmap_and_mask in Gtk-Perl. And in the last step I create an Gtk2::Image by calling set_from_pixmap. The image is used in a subclass of Gtk2::ScrolledWindow. Everything works. But there is somewhere a problem of wasting memory. Creating the initial pixbuf may take a long time (seconds) and it is not possible to draw on a pixbuf, only on a pixmap. In my code I want to be able to re-use once created pixbuf. For example there is a dialog box, where the user may select a graphical object and it is highlighted by drawing it (with Gtk-Perl) on the pixmap. So every time the user selects a new object, this procedure is executed: 1. create pixmap from the initial pixbuf and set the pixmap into the image 2. draw on the pixmap 3. hide the ScrolledWindow 4. show the ScrolledWindow I haven't seen a good documentation on some of the functions I use, so I've ended up to this procedure with some experimentation. I also don't understand well the client/server concept related to this (if the program is running over X, the pixmap is created on the client?). I just played with this and I believe the code is hogging memory when the above procedure is run multiple times. Does anybody have any ideas? About documentation.. I just found the Havoc Pennington's book on developer.gnome.org and I have Warkus' book. Are there other good sources? Thanks, Ari From scott@asofyet.org Tue Mar 14 22:24:09 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 094A03B0B21 for ; Tue, 14 Mar 2006 22:24: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 28867-07 for ; Tue, 14 Mar 2006 22:24:07 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id EED653B0AD1 for ; Tue, 14 Mar 2006 22:24:06 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by merry.dreamhost.com (Postfix) with ESMTP id 5E040107195; Tue, 14 Mar 2006 19:24:05 -0800 (PST) In-Reply-To: <441726BD.8050303@tkk.fi> References: <441726BD.8050303@tkk.fi> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Tue, 14 Mar 2006 22:24:12 -0500 To: Ari Jolma X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.525 tagged_above=-999 required=2 tests=[AWL=-0.003, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.525 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 03:24:09 -0000 On Mar 14, 2006, at 3:25 PM, Ari Jolma wrote: > I've got a derivative (subclass in Perl sense) of > Gtk2::Gdk::Pixbuf. I create it using gdk_pixbuf_new_from_data. The > data is created in C using my own draw routines. From this pixbuf I > create a pixmap by calling render_pixmap_and_mask in Gtk-Perl. And > in the last step I create an Gtk2::Image by calling set_from_pixmap. > > The image is used in a subclass of Gtk2::ScrolledWindow. Everything > works. But there is somewhere a problem of wasting memory. > > Creating the initial pixbuf may take a long time (seconds) and it > is not possible to draw on a pixbuf, only on a pixmap. In my code I > want to be able to re-use once created pixbuf. For example there is > a dialog box, where the user may select a graphical object and it > is highlighted by drawing it (with Gtk-Perl) on the pixmap. So > every time the user selects a new object, this procedure is executed: > > 1. create pixmap from the initial pixbuf and set the pixmap into > the image > 2. draw on the pixmap > 3. hide the ScrolledWindow > 4. show the ScrolledWindow Why the hide and show? > I haven't seen a good documentation on some of the functions I use, > so I've ended up to this procedure with some experimentation. I > also don't understand well the client/server concept related to > this (if the program is running over X, the pixmap is created on > the client?). I just played with this and I believe the code is > hogging memory when the above procedure is run multiple times. Does > anybody have any ideas? First, a little context: The X Window System uses a client/server architecture in which the screen and windows on it are managed by a window server, which deals with the display and input hardware. This server provides windowing services to client applications. (Many people think X's client and server names are backwards, but when seen from the point of view that the server provides windowing services to client applications, it makes sense.) The client and server are not only separate processes, but may be on different physical machines. Because of this, the latency for a round trip to the server can be quite large, and the X model for many operations is designed to minimize this. That's where graphics contexts and pixmaps come from. A graphics context ("GC") is a server-side resource that contains information on how to perform drawing operations. The client has a handle which refers to a particular GC, and passes the handle with drawing operations. This keeps the client from having to transmit all of that information with each drawing command. Similarly, image data can be stored in "bitmaps" (1-bit images, or maps of bits) or "pixmaps" (maps of more-than-one-bit pixels, or pixel maps). These are stored on the server, at device bit resolution and bit depth, and this can be manipulated quite quickly. Operations like $drawable->draw_pixmap() involve copying only the command information from the client to the server, because all of the bits are already on the server. These are stored in the server's memory. So where does a GdkPixbuf fit in? Recall that the pixmap is stored on the server at device resolution and bitdepth. This means that if you want to change just one pixel, you have to do a round trip, which is expensive. Also, you'll have to deal with the image data at the server's bit depth, which could be anything -- 888, 565, indexed pseudocolor, etc, maybe involving dithering. Because this is a royal PITA, the gnome guys came up with GdkPixbuf, which is a simple 24-bit RGB or 32-bit RGBA image buffer stored in the *client*, which can be dithered and transferred to the server as needed. (The RENDER extension includes features to make this more efficient.) GtkImage provides a way for you to set the source data directly from a pixbuf --- $image->set_from_pixbuf($pixbuf) --- so you could avoid the pixmap/mask stage. You can also place a GdkPixbuf into a GnomeCanvas, which gives you more efficient rendering of the changed portions. You could use GnomeCanvasItems for the selected objects text overlays and that sort of stuff, along with scaling and other fun tricks. You'll probably want also check for reference leaks in your code to make sure you're not piling up pixbufs. If using a Canvas is not practical, you can probably drop a few steps by writing some of the more compute-intensive display stuff in C --- if you already have custom C code, then binding your own C widgets to gtk2-perl should be no problem. You could do stuff like render much smaller pieces from the source data and blit them exactly where they need to go in the master pixbuf. > About documentation.. I just found the Havoc Pennington's book on > developer.gnome.org and I have Warkus' book. Are there other good > sources? I find it very helpful to look at the code of applications that do similar things to what i want to do. The gimp is a bit complicated, but has lots of good stuff. -- "that's it! you're a genius!" "yes. that's what i think. do you think i deserve a raise?" - dialogue from 'Godzilla versus Mothra', 1964 From grant@mclean.net.nz Wed Mar 15 03:45:44 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5D1413B068C for ; Wed, 15 Mar 2006 03:45: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 12758-03 for ; Wed, 15 Mar 2006 03:45:42 -0500 (EST) Received: from dbmail-mx3.orcon.co.nz (loadbalancer-VIP.orcon.net.nz [219.88.242.2]) by menubar.gnome.org (Postfix) with ESMTP id 327BF3B0D5C for ; Wed, 15 Mar 2006 03:45:41 -0500 (EST) Received: from [192.168.87.200] (60-234-224-18.bitstream.orcon.net.nz [60.234.224.18]) by dbmail-mx3.orcon.co.nz (8.13.2/8.13.2/Debian-1) with ESMTP id k2F8klBI009207 for ; Wed, 15 Mar 2006 21:46:47 +1300 From: Grant McLean To: gtk-perl-list@gnome.org In-Reply-To: <44154FB7.9030409@ldap.or.id> References: <44154FB7.9030409@ldap.or.id> Content-Type: text/plain Date: Wed, 15 Mar 2006 21:45:36 +1300 Message-Id: <1142412336.13196.19.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/1333/Wed Mar 15 19:57:53 2006 on dbmail-mx3.orcon.co.nz X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.387 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_GT=0.077] X-Spam-Score: -2.387 X-Spam-Level: Subject: Re: glade is preferred? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 08:45:44 -0000 On Mon, 2006-03-13 at 17:55 +0700, Beast wrote: > Is creating UI with glade is now the preferred way to make GUI > application using perl-gtk (or any other gtk binding language)? what is > the pros and cons? It certainly is convenient. It means you don't have to write code to create your GUI. Less code = less bugs. Revising the GUI is easier when you don't have to change code because you can drag things around and tweak the padding, spacing etc and see instantly what it will look like. As an example, I might want to add a 'Run' button to my app. In Glade, I'd add the button in the appropriate place and then in the button properties dialog add a signal handler for the 'clicked' event. The only thing I'd need to do in the .pm file is write a method called 'on_run_clicked'. Glade will arrange for the signal to be connected to that method when the GUI is initialised. I don't use Glade for all my Gtk code, but sometimes I wish I had :-) > Note: I never been using glade previously. All I can suggest is that you give it a try and make up your own mind. If you have any problems, just ask on the list. Cheers Grant From aquilarubra@gmail.com Wed Mar 15 04:34:10 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 86B483B370A for ; Wed, 15 Mar 2006 04:34: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 15543-04 for ; Wed, 15 Mar 2006 04:34:07 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by menubar.gnome.org (Postfix) with ESMTP id EE0823B241D for ; Wed, 15 Mar 2006 04:34:06 -0500 (EST) Received: by zproxy.gmail.com with SMTP id 18so78866nzp for ; Wed, 15 Mar 2006 01:34:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qdyFecrdtFFMXRyzOwN7reJJWPPhLOGfhfpDq8YrslbH1VEwHx/DjVjHvEL+qKF30++n3xcnN9FxM1Syp4fxhAcJ8EV5cfVmkF+DTreNvfrWUvbZZCkHvTi9q7SW1ZRAIBVMdqEt8/aRoRtnHQ2FxL7imzZOJk+2ICiVXqy4mPc= Received: by 10.36.50.11 with SMTP id x11mr453355nzx; Wed, 15 Mar 2006 01:34:05 -0800 (PST) Received: by 10.36.135.17 with HTTP; Wed, 15 Mar 2006 01:34:05 -0800 (PST) Message-ID: <403ccd060603150134u49179800u@mail.gmail.com> Date: Wed, 15 Mar 2006 10:34:05 +0100 From: "Fabrizio Lanza" To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5275_1656040.1142415245864" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.315 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, HTML_00_10=0.795, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: -0.315 X-Spam-Level: Subject: 'fill' justification does nothing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 09:34:10 -0000 ------=_Part_5275_1656040.1142415245864 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, I'm developing an application in GTK2::Perl. I noticed a possible bug. Mayb= e somebody can tell me more. -If I set the justification on the TextView to 'fill', nothing happens (justification appears 'left'). -If I add a tag in a TextBuffer with the 'fill' justification, nothing happens (justification appears 'left'). Other justifications ('center', 'right', ...) work fine. Is there some caveat, or is it a bug? Thank you, Fabrizio Lanza ------=_Part_5275_1656040.1142415245864 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline  Hello,
I'm developing an application in GTK2::Perl. I noticed a po= ssible bug. Maybe somebody can tell me more.

-If I set the justifica= tion on the TextView to 'fill', nothing happens (justification appears 'lef= t').
-If I add a tag in a TextBuffer with the 'fill' justification, nothing = happens (justification appears 'left').

Other justifications ('cente= r', 'right', ...) work fine.

Is there some caveat, or is it a bug?

 Thank you, Fabrizio Lanza
------=_Part_5275_1656040.1142415245864-- From aquilarubra@gmail.com Wed Mar 15 04:44:30 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 863FC3B373A for ; Wed, 15 Mar 2006 04:44: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 16165-02 for ; Wed, 15 Mar 2006 04:44:28 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by menubar.gnome.org (Postfix) with ESMTP id DB49D3B3736 for ; Wed, 15 Mar 2006 04:44:27 -0500 (EST) Received: by zproxy.gmail.com with SMTP id r28so79904nza for ; Wed, 15 Mar 2006 01:44:27 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=iZkL5XzKOTnwi00+7w3byky6pM35bfONkUyebalHnlrj+o7y4oaMzunNDFq3um106zsfT5wKniwIz7hQ4FrU3PGCvZMRa2lOg57v9VMsA+S6TCol7JhAIRxCq9V92hBmZtUThklBu6J1iuJISy7zH/zzF8sWnwhgHXVn3vwSgEI= Received: by 10.36.105.5 with SMTP id d5mr476451nzc; Wed, 15 Mar 2006 01:44:27 -0800 (PST) Received: by 10.36.135.17 with HTTP; Wed, 15 Mar 2006 01:44:27 -0800 (PST) Message-ID: <403ccd060603150144q7388ba39o@mail.gmail.com> Date: Wed, 15 Mar 2006 10:44:27 +0100 From: "Fabrizio Lanza" To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5435_26678910.1142415867211" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.647 tagged_above=-999 required=2 tests=[AWL=0.157, BAYES_00=-2.599, HTML_00_10=0.795, HTML_MESSAGE=0.001, SPF_PASS=-0.001] X-Spam-Score: -1.647 X-Spam-Level: Subject: exporting textbuffer formatting X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 09:44:30 -0000 ------=_Part_5435_26678910.1142415867211 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline A couple of other questions. I'm writing a filter that will load an HTML document in a TextView (this could be useful to the community also; I could not find such a thing yet). A problem I met with the export filter, is when tags overlap. Example: there is a div align=3D"center" which includes a couple of p align=3D"right= " or such. I dinamically built tags for the TextBuffer and applied them. Which tag will have precedence when 2 different styles/justifications/etc. are applied to the same piece of text? I noticed unpredicted behaviours. One time the second applied style had precedence, one time the first applied style had precedence. Now the big question. To apply a tag I just give the tag name, and the start and end position in an iterator. How do I retrieve tag name, start an= d end position from a TextBuffer to build an HTML export filter? My Idea was to iterate through each char of the TextBuffer, and build a table with all the formatting contained in the TextBuffer. Then, I could easily re-build HTML tags. Does it work this way? Which functions should I use? Thanks, Fabrizio Lanza ------=_Part_5435_26678910.1142415867211 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline  A couple of other questions.
 I'm writing a filter that will = load an HTML document in a TextView (this could be useful to the community = also; I could not find such a thing yet).

 A problem I met with= the export filter, is when tags overlap. Example: there is a div align=3D&= quot;center" which includes a couple of p align=3D"right" or= such. I dinamically built tags for the TextBuffer and applied them. Which = tag will have precedence when 2 different styles/justifications/etc. are ap= plied to the same piece of text? I noticed unpredicted behaviours. One time= the second applied style had precedence, one time the first applied style = had precedence.


 Now the big question. To apply a tag I just give the tag = name, and the start and end position in an iterator. How do I retrieve tag = name, start and end position from a TextBuffer to build an HTML export filt= er?
My Idea was to iterate through each char of the TextBuffer, and build a= table with all the formatting contained in the TextBuffer. Then, I could e= asily re-build HTML tags. Does it work this way? Which functions should I u= se?

 Thanks, Fabrizio Lanza
------=_Part_5435_26678910.1142415867211-- From dov.grobgeld@gmail.com Wed Mar 15 04:50:10 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1A9DB3B374E for ; Wed, 15 Mar 2006 04:50: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 16330-07 for ; Wed, 15 Mar 2006 04:50:06 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.198]) by menubar.gnome.org (Postfix) with ESMTP id CE40D3B374B for ; Wed, 15 Mar 2006 04:50:05 -0500 (EST) Received: by zproxy.gmail.com with SMTP id q3so80680nzb for ; Wed, 15 Mar 2006 01:50:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=K1/Ggbz9NCiTCelR4YuJ72CKSQRP+OmPcwPGEpnMrzvoPrPD92peV70BwJ3NWgDKZHz1t4o3g3UpWtHbS71W8EzdYWEacm1iDoYvYOQPQ7t0KgGmIRS2pSUIXV9deGoCX15n197CwxghLlKN+2P2+kMgbQ6xulEqj6jIgls9pow= Received: by 10.36.252.46 with SMTP id z46mr491535nzh; Wed, 15 Mar 2006 01:50:04 -0800 (PST) Received: by 10.37.21.52 with HTTP; Wed, 15 Mar 2006 01:50:04 -0800 (PST) Message-ID: Date: Wed, 15 Mar 2006 11:50:04 +0200 From: "Dov Grobgeld" To: "Fabrizio Lanza" In-Reply-To: <403ccd060603150134u49179800u@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <403ccd060603150134u49179800u@mail.gmail.com> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.515 tagged_above=-999 required=2 tests=[AWL=0.008, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.515 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: 'fill' justification does nothing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 09:50:10 -0000 Yes that behaviour is unfortunately expected. The fill option has never been implemented in the GtkTextView nor in Pango on which it depends. Dov On 3/15/06, Fabrizio Lanza wrote: > Hello, > I'm developing an application in GTK2::Perl. I noticed a possible bug. Ma= ybe > somebody can tell me more. > > -If I set the justification on the TextView to 'fill', nothing happens > (justification appears 'left'). > -If I add a tag in a TextBuffer with the 'fill' justification, nothing > happens (justification appears 'left'). > > Other justifications ('center', 'right', ...) work fine. > > Is there some caveat, or is it a bug? > > Thank you, Fabrizio Lanza > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list From scott@asofyet.org Wed Mar 15 08:15:21 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 346BB3B0927 for ; Wed, 15 Mar 2006 08:15: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 29223-07 for ; Wed, 15 Mar 2006 08:15:19 -0500 (EST) Received: from smeagol.dreamhost.com (smeagol.dreamhost.com [66.33.209.5]) by menubar.gnome.org (Postfix) with ESMTP id 8C2763B0655 for ; Wed, 15 Mar 2006 08:15:19 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by smeagol.dreamhost.com (Postfix) with ESMTP id 16E7E135D3E for ; Wed, 15 Mar 2006 05:15:12 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <403ccd060603150144q7388ba39o@mail.gmail.com> References: <403ccd060603150144q7388ba39o@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Wed, 15 Mar 2006 08:15:19 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.563 tagged_above=-999 required=2 tests=[AWL=0.036, BAYES_00=-2.599] X-Spam-Score: -2.563 X-Spam-Level: Subject: Re: exporting textbuffer formatting X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 13:15:21 -0000 On Mar 15, 2006, at 4:44 AM, Fabrizio Lanza wrote: > A couple of other questions. > I'm writing a filter that will load an HTML document in a TextView > (this could be useful to the community also; I could not find such > a thing yet). > > A problem I met with the export filter, is when tags overlap. > Example: there is a div align="center" which includes a couple of p > align="right" or such. I dinamically built tags for the TextBuffer > and applied them. Which tag will have precedence when 2 different > styles/justifications/etc. are applied to the same piece of text? I > noticed unpredicted behaviours. One time the second applied style > had precedence, one time the first applied style had precedence. > > > Now the big question. To apply a tag I just give the tag name, and > the start and end position in an iterator. How do I retrieve tag > name, start and end position from a TextBuffer to build an HTML > export filter? > My Idea was to iterate through each char of the TextBuffer, and > build a table with all the formatting contained in the TextBuffer. > Then, I could easily re-build HTML tags. Does it work this way? > Which functions should I use? # find out which tags are in use at this location. @list = $iter->get_tags (); Unfortunately it doesn't appear that there's a way to find out the ranges associated with each tag, so you'd have to iterate over the buffer one character at a time fetching the tags, and detect the those tag ranges yourself. here's a quick mockup just because i was curious. i'll leave turning this into html as an exercise for you. :-) use strict; use Gtk2 -init; use Gtk2::Pango; # for constants my $buffer = Gtk2::TextBuffer->new; # create a tag that knows its name, in $tag->{name} sub create_tag { my ($buffer, $name, @args) = @_; my $tag = $buffer->create_tag ($name, @args); $tag->{name} = $name; return $tag; } create_tag ($buffer,'strong', weight => PANGO_WEIGHT_BOLD); create_tag ($buffer, 'emphasis', style => 'italic'); create_tag ($buffer, 'typewriter', family => 'monospace'); # syntactic sugar. sub insert { my $buffer = shift; my $text = shift; $buffer->insert_with_tags_by_name ($buffer->get_end_iter, $text, @_); } insert ($buffer, "Here is some text. "); insert ($buffer, "Some pretty, pretty text.", 'emphasis'); insert ($buffer, "\n\n"); insert ($buffer, "And ", 'emphasis', 'strong'); insert ($buffer, "very pretty", 'strong'); insert ($buffer, " text it is.", 'typewriter'); { my $iter = $buffer->get_start_iter; while (!$iter->is_end) { my $char = $iter->get_char; my @tags = $iter->get_tags; print " $char ".join(",",map { $_->{name} } @tags)."\n"; $iter->forward_char(); } } -- muppet From scott@asofyet.org Wed Mar 15 08:18:43 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6B8C23B24E5 for ; Wed, 15 Mar 2006 08:18: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 29545-10 for ; Wed, 15 Mar 2006 08:18:42 -0500 (EST) Received: from smeagol.dreamhost.com (smeagol.dreamhost.com [66.33.209.5]) by menubar.gnome.org (Postfix) with ESMTP id 3272A3B0B6E for ; Wed, 15 Mar 2006 08:18:42 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by smeagol.dreamhost.com (Postfix) with ESMTP id E3B6A135D41; Wed, 15 Mar 2006 05:18:40 -0800 (PST) In-Reply-To: <403ccd060603150144q7388ba39o@mail.gmail.com> References: <403ccd060603150144q7388ba39o@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <669A8C10-B02E-4C8F-9E7C-38F820EC6EA4@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Wed, 15 Mar 2006 08:18:47 -0500 To: Fabrizio Lanza X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.563 tagged_above=-999 required=2 tests=[AWL=0.036, BAYES_00=-2.599] X-Spam-Score: -2.563 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: exporting textbuffer formatting X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 13:18:43 -0000 On Mar 15, 2006, at 4:44 AM, Fabrizio Lanza wrote: > an HTML export filter? Note that this sort of thing could be very useful with the new serialization API that's being added to TextBuffer in gtk+ 2.10. This stuff will allow you to register your own serialization formats, with perl callbacks to do the serialization and deserialization. (A gtk+-specific RTF is the only built-in, so far as i know.) It's meant to support rich text through X selection (both clipboard and drag'n'drop) but could also be used for load and save if you're pathological. -- Examples really shouldn't include unexploded ordnance. -- Joe Smith, referring to an example program i wrote. From dov.grobgeld@gmail.com Wed Mar 15 01:27:24 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2B2243B22C1 for ; Wed, 15 Mar 2006 01:27: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 05064-03 for ; Wed, 15 Mar 2006 01:27:23 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.206]) by menubar.gnome.org (Postfix) with ESMTP id DB3BD3B2394 for ; Wed, 15 Mar 2006 01:27:22 -0500 (EST) Received: by zproxy.gmail.com with SMTP id l8so51125nzf for ; Tue, 14 Mar 2006 22:27:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hlsDRn+fT+B3HcYMIJk3yAfTlY8SMKQKcbVnAuGAWPIcIhA+XNZSzrUdwP0mps/5MxCEUB+4CBX4a8TsvOOoGmn7OBhXjvZR7nTlvjkqxvBEOwBijFqw3UJnZ+YDBvoL8DzKCimjdzm+a1rwiO2GINAQS78Jo+1kHDEaSLLl7jk= Received: by 10.36.113.12 with SMTP id l12mr298664nzc; Tue, 14 Mar 2006 22:27:21 -0800 (PST) Received: by 10.37.21.52 with HTTP; Tue, 14 Mar 2006 22:27:21 -0800 (PST) Message-ID: Date: Wed, 15 Mar 2006 08:27:21 +0200 From: "Dov Grobgeld" To: muppet In-Reply-To: <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.573 tagged_above=-999 required=2 tests=[AWL=0.027, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.573 X-Spam-Level: X-Mailman-Approved-At: Wed, 15 Mar 2006 13:44:12 -0500 Cc: gtk-perl-list@gnome.org Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 06:27:24 -0000 For a much simpler example than gimp you may want to have a look at my two projects gtk_image_viewer and giv, both which currently are available only through the gnome cvs. They are an example of how to do very efficient pixel display and manipulation. The server holding the perl binding for the GtkImageViewer is currently down, so please let me know if you want the perl binding for it and I'll be happy to send it to you. Regards, Dov From dbree@duo-county.com Wed Mar 15 22:13:46 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id F0C313B0EE9 for ; Wed, 15 Mar 2006 22:13: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 10022-06 for ; Wed, 15 Mar 2006 22:13:44 -0500 (EST) Received: from smtp.duo-county.com (smtp.duo-county.com [66.38.0.221]) by menubar.gnome.org (Postfix) with ESMTP id 920A13B0EE8 for ; Wed, 15 Mar 2006 22:13:44 -0500 (EST) Received: from localhost.localdomain (15-077.mod.duo-county.com [66.38.15.77]) by bn9.blue.net (8.12.10/8.12.10/SMTP) with ESMTP id k2G3DcTm027814 for ; Wed, 15 Mar 2006 21:13:39 -0600 (CST) Received: from dlb by localhost.localdomain with local (Exim 4.50) id 1FJiv7-0000iQ-MM for gtk-perl-list@gnome.org; Wed, 15 Mar 2006 21:13:01 -0600 Date: Wed, 15 Mar 2006 21:13:01 -0600 To: gtk-perl-list@gnome.org Message-ID: <20060316031301.GA2713@localhost.localdomain> Mail-Followup-To: gtk-perl-list@gnome.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i From: David X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.663 tagged_above=-999 required=2 tests=[AWL=0.725, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_GT=0.077] X-Spam-Score: -1.663 X-Spam-Level: Subject: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 03:13:46 -0000 I suppose this is more of a Perl question, but since I'm working with Gtk, maybe it will pass.. :) I'm quite new to Perl programming, and for starters, I have built a gtk-perl interface to my PostGresql business records database. Some of my windows are built with glade using libglade and some are hand-built. Actually, I have three *.glade files - one for the main window, one for a database selection dialog and the other is a form for data entry, edit, or delete. I have others which I built by hand. After reading a recent message regarding using Glade, I may regret this. I first tried to keep my perl source separated into 3 files, all inline code without making any packages, including the other two into the main program by "use" statements, but when I added "use strict", I found that I had to tie the variables to a package, so I just made them all "my variables" - but, at least as far as I could see, they were not recognized across files, so I just merged them all into a single file. For a little perspective, my code now occupies some 1500+ lines. Now, after reading Grant McLean's glade-article.pdf tutorial, I have a bit more insight into classes, I'm wondering if there might be a great advantage in using Classes, or if inline is just as good. What I have is working quite flawlessly, but if Classes are better, now might be a good time to redesign the thing. Also, if I were to adapt some of the routines to Classes, what's normally best - separate files or a single file? In this case, this program is strictly for my own use. I don't plan on distributing it. I'd be happy to, but I seriously doubt if anyone but myself would find it useful - well, it's built for my particular table layout. Also, these routines for the windows are probably not reusable. I mention all this in regard to my question regarding separate files for the classes, etc. Basically, after all the above, what I'm asking is for some pointers as to where Classes are beneficial and where not, and the same for multiple files. Thanks to anyone who might bear with me on this possibly OT query. From dan@entropy.homelinux.org Wed Mar 15 22:49:06 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 51DC83B06C6 for ; Wed, 15 Mar 2006 22:49: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 11618-05 for ; Wed, 15 Mar 2006 22:49:03 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id D4BE93B0D98 for ; Wed, 15 Mar 2006 22:48:58 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k2G3mxiF029686; Thu, 16 Mar 2006 14:49:01 +1100 Message-ID: <4418E00A.5020807@entropy.homelinux.org> Date: Thu, 16 Mar 2006 14:48:26 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060120) MIME-Version: 1.0 To: gtk-perl-list@gnome.org, dbree@duo-county.com References: <20060316031301.GA2713@localhost.localdomain> In-Reply-To: <20060316031301.GA2713@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 402221 - cd95fdfaf486 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=402221&m=cd95fdfaf486 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=402221&m=cd95fdfaf486 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=402221&m=cd95fdfaf486 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.528 tagged_above=-999 required=2 tests=[AWL=-0.006, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.528 X-Spam-Level: Cc: Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 03:49:06 -0000 David wrote: > I suppose this is more of a Perl question, but since I'm working with > Gtk, maybe it will pass.. :) > > I'm quite new to Perl programming, and for starters, I have built a > gtk-perl interface to my PostGresql business records database. Cool. That's almost what I'm doing, but with MySQL & SQL Server :) > Some of > my windows are built with glade using libglade and some are hand-built. > Actually, I have three *.glade files - one for the main window, one for > a database selection dialog and the other is a form for data entry, > edit, or delete. I have others which I built by hand. After reading a > recent message regarding using Glade, I may regret this. > > I first tried to keep my perl source separated into 3 files, all inline > code without making any packages, including the other two into the main > program by "use" statements, but when I added "use strict", I found that > I had to tie the variables to a package, so I just made them all "my > variables" - but, at least as far as I could see, they were not > recognized across files, so I just merged them all into a single file. > > For a little perspective, my code now occupies some 1500+ lines. Once I got to that point ( ie things got very messy ), I split things up like this: main.pl A script in the top-level application folder. Contains all global variables, like DBI handles, etc. forms/ A folder to handle all code related to individual forms, eg: forms/setup_user.pm ( ie package forms::setup_user ) forms/logon.pm reports/ A folder to handle report definitions ( more on this later ) glade/ Each window has a separate glade file in here On startup, I do something like: my $globals = { # Paths appdir => $appdir, currentdir => $currentdir, gladefiles => $gladefiles, reports => $appdir . "/reports", report_base => $report_base, browser => $browser, pdf_viewer => $pdf_viewer, # Behaviour Flags userid => $userid, no_maximize => $no_maximize, # Database handles dbh => $dbh, ms_dbh => $ms_dbh, admin_dbh => $admin_dbh, # Gtk2::Ex::DBI objects forms => \$forms # This MUST be a reference }; Instead of Gtk2::Ex::DBI objects ( directly above ), you can have Gtk2::GladeXML objects. Then when someone goes to open a window, I go: sub on_Prospects_btn_Search_clicked { if ( $forms->{company_search}->{form} ) { $forms->{company_search}->{form}->get_widget("CompanySearch")->present; } else { $forms->{company_search} = forms::company_search->new( $globals ); } } This way, I don't get duplicate copies of forms if people try to open a form again. You of course have to destroy the {form} object when you close the window ... elsewhere. > Also, if I were to adapt some of the routines to Classes, what's > normally best - separate files or a single file? Separate files are good for me. It means you can effortlessly move windows between applications just by copying the entire file. When you make changes, you just copy the altered file around. If you're doing database stuff, you should check out my website: http://entropy.homelinux.org/axis_not_evil I've automated a LOT of the mundane stuff required for dealing with databases. Everything is extremely well tested on MySQL ( and kinda tested with SQL Server ). I'd love to have some feedback from Postgres users ... as long as they don't start flaming me for using MySQL :) I've got Gtk2::Ex::DBI for dealing with 'normal' forms ( ie Access forms ), and Gtk2::Ex::Datasheet::DBI for dealing with ... datasheet ... type things. I've also got PDF::ReportWriter for doing printable reports. I'm on the verge of a 1.1 release of this, which will have full XML report definition support :) Stay tuned for this 'real soon now'. Dan From grant@mclean.net.nz Thu Mar 16 03:52:28 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D6ECC3B3B8A for ; Thu, 16 Mar 2006 03:52: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 23773-08 for ; Thu, 16 Mar 2006 03:52:26 -0500 (EST) Received: from dbmail-mx2.orcon.net.nz (loadbalancer-VIP.orcon.net.nz [219.88.242.2]) by menubar.gnome.org (Postfix) with ESMTP id B51F53B3B8D for ; Thu, 16 Mar 2006 03:52:24 -0500 (EST) Received: from [192.168.87.200] (60-234-224-18.bitstream.orcon.net.nz [60.234.224.18]) by dbmail-mx2.orcon.net.nz (8.13.2/8.13.2/Debian-1) with ESMTP id k2G8tHWL013970 for ; Thu, 16 Mar 2006 21:55:18 +1300 From: Grant McLean To: gtk-perl-list@gnome.org In-Reply-To: <20060316031301.GA2713@localhost.localdomain> References: <20060316031301.GA2713@localhost.localdomain> Content-Type: text/plain Date: Thu, 16 Mar 2006 21:52:20 +1300 Message-Id: <1142499140.8520.20.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88/1335/Thu Mar 16 17:58:43 2006 on dbmail-mx2.orcon.net.nz X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.714 tagged_above=-999 required=2 tests=[AWL=-0.673, BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558] X-Spam-Score: -1.714 X-Spam-Level: Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 08:52:29 -0000 On Wed, 2006-03-15 at 21:13 -0600, David wrote: > I first tried to keep my perl source separated into 3 files, all inline > code without making any packages, including the other two into the main > program by "use" statements, but when I added "use strict", I found that > I had to tie the variables to a package, so I just made them all "my > variables" - but, at least as far as I could see, they were not > recognized across files, so I just merged them all into a single file. No, that's right, before you added 'use strict' all your variables were global variables. When you declared the variables with 'my', you restricted their scope to the block they appeared in (eg: a subroutine) or to the file if they weren't in a block. Global variables are OK for quick hack scripts but as you code grows it can become hard to keep track of all the places which might rely on or alter the value of a global variable. > For a little perspective, my code now occupies some 1500+ lines. That would benefit from being organised into subroutines at the very least. > if I were to adapt some of the routines to Classes, what's > normally best - separate files or a single file? You can do either. It's perfectly reasonable to declare multiple classes in a single file. If you get to the point that you want to share a class between two or more programs then splitting it out into a separate file would be a good idea. > Basically, after all the above, what I'm asking is for some pointers as > to where Classes are beneficial and where not, and the same for multiple > files. The main benefit is organising your code into manageable chunks to make code maintenance easier. I'm sure it all makes sense to you now, but if you come back to it after three months things might not be so clear. Organising things into subroutines is a good start because you have to give the subroutines names to describe what they do and you have to think about what inputs they require and what outputs they return. By going a step further and making classes and methods, you can store your program state inside the classes rather than in global variables. Another advantage to making your code more modular, is that it make it easier to write tests, but I suspect you're not looking to do that with you project just yet. It sounds like you're in the ideal situation of being able to play around with the code and try different styles without being under pressure - and what you have already works. So explore a bit. The perlmonks.org web site is a good place for questions and quick feedback too. Good luck Grant From beast@ldap.or.id Thu Mar 16 06:55:27 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6FCC23B0A45 for ; Thu, 16 Mar 2006 06:55:27 -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 02658-02 for ; Thu, 16 Mar 2006 06:55:25 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 65DB73B098B for ; Thu, 16 Mar 2006 06:55:24 -0500 (EST) Message-ID: <4419521A.7000404@ldap.or.id> Date: Thu, 16 Mar 2006 18:55:06 +0700 From: Beast User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: "gtk-perl-list@gnome.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.446 tagged_above=-999 required=2 tests=[AWL=-1.843, BAYES_40=-0.185, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -0.446 X-Spam-Level: Subject: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 11:55:27 -0000 I have these following code: ... sub cb_ok { my $self = shift; ... my $dialog = Gtk2::MessageDialog->new($self, 'modal', 'error', 'ok', $message); $dialog->set_position('center-on-parent'); } But it behave like I wanted. 1. The error pop-up did not center in their parrent, but seems on top-left of screen. 2. How to make the "OK" button centered (presently it right alignment)? 3. How to remove the icon on the "OK" button? -- --beast From mid@gtmp.org Thu Mar 16 07:07:45 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7E0E03B0DDB for ; Thu, 16 Mar 2006 07:07: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 03359-09 for ; Thu, 16 Mar 2006 07:07:42 -0500 (EST) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by menubar.gnome.org (Postfix) with ESMTP id 586193B0D50 for ; Thu, 16 Mar 2006 07:07:42 -0500 (EST) Received: from [213.228.1.108] (moulin.proxad.net [213.228.1.108]) by smtp3-g19.free.fr (Postfix) with ESMTP id 3EAD548C3F; Thu, 16 Mar 2006 13:07:40 +0100 (CET) Message-ID: <4419550C.3080701@gtmp.org> Date: Thu, 16 Mar 2006 13:07:40 +0100 From: Alexandre Jousset Organization: GTMP User-Agent: Mail/News 1.5 (X11/20060309) MIME-Version: 1.0 To: Beast References: <4419521A.7000404@ldap.or.id> In-Reply-To: <4419521A.7000404@ldap.or.id> 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.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" Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 12:07:45 -0000 Hi, Beast wrote: > > I have these following code: > > ... > > sub cb_ok { > my $self = shift; > ... > my $dialog = Gtk2::MessageDialog->new($self, 'modal', 'error', 'ok', > $message); See : http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/MessageDialog.html The first arg should be a Gtk2::Window. So you should use $self->window (if I remember correctly). > $dialog->set_position('center-on-parent'); > } > > But it behave like I wanted. > > 1. The error pop-up did not center in their parrent, but seems on > top-left of screen. See above. > 2. How to make the "OK" button centered (presently it right alignment)? > 3. How to remove the icon on the "OK" button? This is not good practice. This should be done by the theme choosen by the user. HTH, -- -- \^/ -- -- -/ O \--------------------------------------- -- -- | |/ \| Alexandre (Midnite) Jousset | -- -- -|___|--------------------------------------- -- From ari.jolma@tkk.fi Thu Mar 16 12:12:02 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7E5613B3E0C for ; Thu, 16 Mar 2006 12:12: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 22451-01 for ; Thu, 16 Mar 2006 12:12:01 -0500 (EST) Received: from pne-smtpout3-sn2.hy.skanova.net (pne-smtpout3-sn2.hy.skanova.net [81.228.8.111]) by menubar.gnome.org (Postfix) with ESMTP id E11B13B3DFB for ; Thu, 16 Mar 2006 12:12:00 -0500 (EST) Received: from [192.168.3.12] (80.221.66.9) by pne-smtpout3-sn2.hy.skanova.net (7.2.070) id 43CE14DF002B6027; Thu, 16 Mar 2006 18:11:56 +0100 Message-ID: <44199C24.9060004@tkk.fi> Date: Thu, 16 Mar 2006 19:11:00 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: muppet References: <4414D31B.3040701@gmail.com> In-Reply-To: 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.004, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.526 X-Spam-Level: Cc: gtk-perl mailing list Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 17:12:02 -0000 muppet wrote: > If dealing with the separate XML file is a problem, you can embed the > XML in the perl file with very little effort. I've seen various > people use a Makefile rule to concatenate the .glade file onto the > .pm or .pl file before installation. This is a very good idea (I've done that too many times by hand :). I got this far: find . | grep "\.glade$" | perl -MFile::Basename -ane 'chomp;@a=fileparse($_,".glade");system "cat $_ >>blib/$a[1]$a[0].pm\n"' how do I put this into Makefile.PL? Ari > > -- > "Ghostbusters" is the best movie of this decade. > -- Neal, circa 1996, referring to a movie released in 1984. > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list From ari.jolma@tkk.fi Thu Mar 16 12:49:09 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 951213B0DBB for ; Thu, 16 Mar 2006 12:49: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 24653-10 for ; Thu, 16 Mar 2006 12:49:08 -0500 (EST) Received: from pne-smtpout3-sn2.hy.skanova.net (pne-smtpout3-sn2.hy.skanova.net [81.228.8.111]) by menubar.gnome.org (Postfix) with ESMTP id 435B83B123B for ; Thu, 16 Mar 2006 12:49:08 -0500 (EST) Received: from [192.168.3.12] (80.221.66.9) by pne-smtpout3-sn2.hy.skanova.net (7.2.070) id 43CE14DF002B66AF for gtk-perl-list@gnome.org; Thu, 16 Mar 2006 18:49:07 +0100 Message-ID: <4419A4DB.4080709@tkk.fi> Date: Thu, 16 Mar 2006 19:48:11 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> In-Reply-To: <90BE6960-B8C4-41CA-9714-8DDF902E109D@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=-2.524 tagged_above=-999 required=2 tests=[AWL=-0.002, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.524 X-Spam-Level: Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 17:49:09 -0000 muppet wrote: >> >> 1. create pixmap from the initial pixbuf and set the pixmap into the >> image >> 2. draw on the pixmap >> 3. hide the ScrolledWindow >> 4. show the ScrolledWindow > > > Why the hide and show? ok, that _was_ unnecessary, but did not solve the problem > > Similarly, image data can be stored in "bitmaps" (1-bit images, or > maps of bits) or "pixmaps" (maps of more-than-one-bit pixels, or > pixel maps). These are stored on the server, at device bit > resolution and bit depth, and this can be manipulated quite quickly. looking at process info, it seems that X is piling up memory, the code creates a new pixmap every time a new object it selected (a crude way of getting rid of the old selection), but pixmaps should be automatically unref'd since the new pixmap is put into the same place as the old, the code is effectively: create $self->{pixbuf} loop: { $self->{pixmap} = $self->{pixbuf}->render_pixmap_and_mask; $self->{image}->set_from_pixmap($self->{pixmap}); $self->{pixmap}->draw_line etc. } > > > GtkImage provides a way for you to set the source data directly from > a pixbuf --- $image->set_from_pixbuf($pixbuf) --- so you could avoid > the pixmap/mask stage. but I can't draw on an image? I need the pixmap for that, I believe. > > You can also place a GdkPixbuf into a GnomeCanvas, which gives you > more efficient rendering of the changed portions. You could use > GnomeCanvasItems for the selected objects text overlays and that sort > of stuff, along with scaling and other fun tricks. hm, .. there's already a lot of scaling going on, I use image->set_size_request image->set_alignment after set_from_pixmap to make the ScrollableWindow show scrollbars appropriately > > You'll probably want also check for reference leaks in your code to > make sure you're not piling up pixbufs. should not happen because pixbuf is not touched, and it would show that the memory is used by the app, not X, I think > > > If using a Canvas is not practical, you can probably drop a few steps > by writing some of the more compute-intensive display stuff in C --- > if you already have custom C code, then binding your own C widgets to > gtk2-perl should be no problem. You could do stuff like render much > smaller pieces from the source data and blit them exactly where they > need to go in the master pixbuf. One thing I'm missing is to be able to use gtk's drawing primitives, which are not available for me in C because I'm using only pixbuf there. Thanks for the info so far. Ari From scott@asofyet.org Thu Mar 16 15:25:56 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6D8503B148B for ; Thu, 16 Mar 2006 15:25: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 32694-07 for ; Thu, 16 Mar 2006 15:25:55 -0500 (EST) Received: from webmail1.sd.dreamhost.com (webmail1.sd.dreamhost.com [66.33.201.159]) by menubar.gnome.org (Postfix) with ESMTP id DDEF63B1438 for ; Thu, 16 Mar 2006 15:25:54 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail1.sd.dreamhost.com (Postfix) with ESMTP id AB2282C208 for ; Thu, 16 Mar 2006 12:25:53 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Thu, 16 Mar 2006 15:25:53 -0500 (EST) Message-ID: <8841.192.146.101.26.1142540753.squirrel@webmail.asofyet.org> In-Reply-To: <4419A4DB.4080709@tkk.fi> References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> <4419A4DB.4080709@tkk.fi> Date: Thu, 16 Mar 2006 15:25:53 -0500 (EST) 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=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 20:25:56 -0000 Ari Jolma wrote: > muppet wrote: > >> Similarly, image data can be stored in "bitmaps" (1-bit images, or >> maps of bits) or "pixmaps" (maps of more-than-one-bit pixels, or >> pixel maps). These are stored on the server, at device bit >> resolution and bit depth, and this can be manipulated quite quickly. > > > looking at process info, it seems that X is piling up memory, the code > creates a new pixmap every time a new object it selected (a crude way of > getting rid of the old selection), but pixmaps should be automatically > unref'd since the new pixmap is put into the same place as the old, the > code is effectively: > > create $self->{pixbuf} > loop: { > $self->{pixmap} = $self->{pixbuf}->render_pixmap_and_mask; > $self->{image}->set_from_pixmap($self->{pixmap}); > > $self->{pixmap}->draw_line etc. > > } I'm not sure why that would pile up pixmaps without seeing more of your code. You may wish to take a different approach. Render the pixbuf once, turn it into a pixmap once, and then keep that as an untouched server-side resource. Copy the necessary portions from the source pixmap to the onscreen window on demand, and draw on the onscreen window. Alternatively, use a single offscreen pixmap for the source buffer, and another for the annotate image; to "undraw" previous annotations, copy from the clean one. This avoids the whole re-render stage. >> GtkImage provides a way for you to set the source data directly from >> a pixbuf --- $image->set_from_pixbuf($pixbuf) --- so you could avoid >> the pixmap/mask stage. > > but I can't draw on an image? I need the pixmap for that, I believe. You need the pixmap only for X's drawing primitives. You can use gd, libart, cairo, imagemagick, and even direct pixel manipulation to deal with the 24-bit image data in the pixbuf. -- muppet From dbree@duo-county.com Thu Mar 16 16:00:18 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B59403B2433 for ; Thu, 16 Mar 2006 16:00: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 02104-07 for ; Thu, 16 Mar 2006 16:00:17 -0500 (EST) Received: from smtp.duo-county.com (smtp.duo-county.com [66.38.0.221]) by menubar.gnome.org (Postfix) with ESMTP id 435983B244E for ; Thu, 16 Mar 2006 16:00:17 -0500 (EST) Received: from localhost.localdomain (12-066.mod.duo-county.com [66.38.12.66]) by bn9.blue.net (8.12.10/8.12.10/SMTP) with ESMTP id k2GL0A7x016751 for ; Thu, 16 Mar 2006 15:00:10 -0600 (CST) Received: from dlb by localhost.localdomain with local (Exim 4.50) id 1FJyBH-0000Zl-T3 for gtk-perl-list@gnome.org; Thu, 16 Mar 2006 13:30:43 -0600 Date: Thu, 16 Mar 2006 13:30:43 -0600 To: gtk-perl-list@gnome.org Message-ID: <20060316193043.GA1544@localhost.localdomain> Mail-Followup-To: gtk-perl-list@gnome.org References: <20060316031301.GA2713@localhost.localdomain> <1142499140.8520.20.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1142499140.8520.20.camel@localhost.localdomain> User-Agent: Mutt/1.5.9i From: David X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.318 tagged_above=-999 required=2 tests=[AWL=-0.310, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, RCVD_IN_SORBS_WEB=1.456] X-Spam-Score: -1.318 X-Spam-Level: Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 21:00:18 -0000 On Thu, Mar 16, 2006 at 09:52:20PM +1300, Grant McLean wrote: > On Wed, 2006-03-15 at 21:13 -0600, David wrote: [...] "use strict" and separate files. > No, that's right, before you added 'use strict' all your variables were > global variables. When you declared the variables with 'my', you > restricted their scope to the block they appeared in (eg: a subroutine) > or to the file if they weren't in a block. What came as a surprise to me was that I couldn't have global variables. Again, I'm quite new to Perl and some of the rules are a bit unexpected. However, it seems that it's _highly_ recommended to "use strict" so I worked around this requirement by merging all the code into one file. I realized that I could have passed variable values or references to them to subroutines that resided in a different file. > Global variables are OK for quick hack scripts but as you code grows it > can become hard to keep track of all the places which might rely on or > alter the value of a global variable. Yes, I'm beginning to understand this principle. I've been following the GTK lists for some time and have worked with GTK programming in "C". I saw that there, using references and static variables were the chief rule. > > For a little perspective, my code now occupies some 1500+ lines. > > That would benefit from being organised into subroutines at the very > least. Of course I do have lots of subroutines. As a matter of fact, I still keep the single file arranged and marked off at the boundaries of the original modular files. > > if I were to adapt some of the routines to Classes, what's > > normally best - separate files or a single file? > > You can do either. It's perfectly reasonable to declare multiple > classes in a single file. With the above question, I meant keeping the classes in the same file as the mainline code. I know that in your tutorial, you stated that while developing your project, you kept separate files for the classes and the mailine code, but that sometimes it was advantageous, especially after development was complete, to merge them all into one file. > The main benefit is organising your code into manageable chunks to make > code maintenance easier. I'm sure it all makes sense to you now, but if > you come back to it after three months things might not be so clear. > Organising things into subroutines is a good start because you have to > give the subroutines names to describe what they do and you have to > think about what inputs they require and what outputs they return. By > going a step further and making classes and methods, you can store your > program state inside the classes rather than in global variables. > > Another advantage to making your code more modular, Yes. That was the purpose of my originally wanting to make separate files. But then, I was attempting to just include them as if they were part of the main file - ala "C". But I found that this didn't work. > It sounds like you're in the ideal situation of being able to play > around with the code and try different styles without being under > pressure - and what you have already works. So explore a bit. Yes, I think I will. What I need is a deeper understanding of the usage of Classes and modules under Perl. One other thing that was concerning me regarding finding the files in a sensible way. I notice your use of FindBin (never heard of it before ). I'm running Linux, and my solution (at least while developing), is to keep them all in my user's home and have a symbolic link to the binary in /usr/local/bin. If I use other files, put links to them in one of the @INC directories under /usr/local/. > The perlmonks.org web site is a good place for questions and quick > feedback too. Yes, that would be a more apropriate place. I do realize that this question _was_ a bit OT for this list. > Good luck Thanks for the wishes and especially thanks for taking the time to reply. You definitely have given me some insight into what I might do. From dbree@duo-county.com Thu Mar 16 16:00:26 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4F3083B3E61 for ; Thu, 16 Mar 2006 16:00: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 02202-02 for ; Thu, 16 Mar 2006 16:00:24 -0500 (EST) Received: from smtp.duo-county.com (smtp.duo-county.com [66.38.0.221]) by menubar.gnome.org (Postfix) with ESMTP id 68B6C3B24B1 for ; Thu, 16 Mar 2006 16:00:22 -0500 (EST) Received: from localhost.localdomain (12-066.mod.duo-county.com [66.38.12.66]) by bn9.blue.net (8.12.10/8.12.10/SMTP) with ESMTP id k2GL0A80016751; Thu, 16 Mar 2006 15:00:13 -0600 (CST) Received: from dlb by localhost.localdomain with local (Exim 4.50) id 1FJzZH-0000aU-3z; Thu, 16 Mar 2006 14:59:35 -0600 Date: Thu, 16 Mar 2006 14:59:35 -0600 To: Daniel Kasak Message-ID: <20060316205935.GB1544@localhost.localdomain> Mail-Followup-To: Daniel Kasak , gtk-perl-list@gnome.org References: <20060316031301.GA2713@localhost.localdomain> <4418E00A.5020807@entropy.homelinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4418E00A.5020807@entropy.homelinux.org> User-Agent: Mutt/1.5.9i From: David X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.242 tagged_above=-999 required=2 tests=[AWL=-0.234, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, RCVD_IN_SORBS_WEB=1.456] X-Spam-Score: -1.242 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 21:00:26 -0000 On Thu, Mar 16, 2006 at 02:48:26PM +1100, Daniel Kasak wrote: > David wrote: > >I first tried to keep my perl source separated into 3 files, all inline > >code without making any packages, including the other two into the main > >program by "use" statements, > >For a little perspective, my code now occupies some 1500+ lines. > > Once I got to that point ( ie things got very messy ), I split things up > like this: I can't say if my program has gotten to the point that it's "messy", but I really think modularization is the way to go. That was my original intent, with the separate files, but got a bit hung up when "strict" didn't allow globals. [ ... file layout ... ] Looks very logical. > If you're doing database stuff, you should check out my website: > http://entropy.homelinux.org/axis_not_evil I have visited your site. It did seem interesting. I'll go back and look around some more. > I've automated a LOT of the mundane stuff required for dealing with > databases. Everything is extremely well tested on MySQL ( and kinda > tested with SQL Server ). I'd love to have some feedback from Postgres > users ... I'll give it a shot and see what I find. I believe I've seen announcements from you posted from you on the list. In fact, I do believe I'm keeping the latest one in my mailbox for reference. > as long as they don't start flaming me for using MySQL :) I don't see why it should matter what one uses, as long as it suits one's needs. > I've got Gtk2::Ex::DBI for dealing with 'normal' forms ( ie Access > forms ), and Gtk2::Ex::Datasheet::DBI for dealing with ... datasheet > ... type things. I've also got PDF::ReportWriter for doing printable > reports. I'm on the verge of a 1.1 release of this, which will have > full XML report definition support :) Stay tuned for this 'real soon > now'. It sounds interesting and useful. Thanks for responding. From ari.jolma@tkk.fi Thu Mar 16 16:21:30 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 85BDA3B2457 for ; Thu, 16 Mar 2006 16:21:27 -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 03678-07 for ; Thu, 16 Mar 2006 16:21:26 -0500 (EST) Received: from pne-smtpout4-sn1.fre.skanova.net (pne-smtpout4-sn1.fre.skanova.net [81.228.11.168]) by menubar.gnome.org (Postfix) with ESMTP id 1FF3B3B24A8 for ; Thu, 16 Mar 2006 16:21:25 -0500 (EST) Received: from [192.168.3.12] (80.221.66.9) by pne-smtpout4-sn1.fre.skanova.net (7.2.070) id 43CBBB290043D238 for gtk-perl-list@gnome.org; Thu, 16 Mar 2006 22:21:24 +0100 Message-ID: <4419D69B.7050007@tkk.fi> Date: Thu, 16 Mar 2006 23:20:27 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> <4419A4DB.4080709@tkk.fi> <8841.192.146.101.26.1142540753.squirrel@webmail.asofyet.org> In-Reply-To: <8841.192.146.101.26.1142540753.squirrel@webmail.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=-2.562 tagged_above=-999 required=2 tests=[AWL=0.037, BAYES_00=-2.599] X-Spam-Score: -2.562 X-Spam-Level: Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 21:21:30 -0000 muppet wrote: > Alternatively, use a single offscreen pixmap for the source buffer, > and another for the annotate image; to "undraw" previous annotations, > copy from the clean one. This avoids the whole re-render stage. This seems to remove the memory problem :) and if I understand correctly, is faster because pixbuf->pixmap rendering requires a copy from client to server. Thank you very much, Ari From zentara1@sbcglobal.net Thu Mar 16 18:07:23 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B0AF03B0C77 for ; Thu, 16 Mar 2006 18:07:23 -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 09027-08 for ; Thu, 16 Mar 2006 18:07:20 -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 01F603B0DCB for ; Thu, 16 Mar 2006 18:07:19 -0500 (EST) Received: (qmail 15034 invoked from network); 16 Mar 2006 23:07:19 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.6.13 with login) by smtp111.sbc.mail.re2.yahoo.com with SMTP; 16 Mar 2006 23:07:19 -0000 Date: Thu, 16 Mar 2006 18:04:03 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060316180403.1cf2c098@zentara.zentara.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.14; 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.476 tagged_above=-999 required=2 tests=[AWL=-0.862, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, TW_XF=0.077] X-Spam-Score: -1.476 X-Spam-Level: Subject: setting line dash on Gnome2::Canvas X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Mar 2006 23:07:23 -0000 Hi, Does anyone know how to make dashed lines on the Gnome2::Canvas? I saw some mention of it on the C maillist, but don't seem to be able to make it work on Perl. #!/usr/bin/perl use warnings; use strict; use Gtk2 -init; use Gnome2::Canvas; my $window = Gtk2::Window->new; $window ->signal_connect( 'destroy' => sub{Gtk2->main_quit } ); my $scroller = Gtk2::ScrolledWindow->new; my $canvas = Gnome2::Canvas->new_aa; $scroller->add ($canvas); $window->add ($scroller); $window->set_default_size (350, 350); $canvas->set_scroll_region (0, 0, 700, 700); $window->show_all; my $black = Gtk2::Gdk::Color->new (0x0000,0x0000,0x0000); $canvas->modify_bg('normal',$black); my $line1= Gnome2::Canvas::Item->new ($canvas->root, 'Gnome2::Canvas::Line', points => [0,20,130,150], fill_color => "red", width_units => 8.0, line_style => 'GDK_LINE_ON_OFF_DASH', ); # feeble attempt dosn't work #$line1->set_dashes( {0,0xff,0,0xff} ); # some stuff from the c mail list #you can give a line pattern to the function in this way #gchar list[]={ 0, 0xff, 0, 0xff } #gdk_gc_set_dashes( gc, 0, list, sizeof(list) / sizeof( gchar) ); #this produces a line like this: - - - - - - - - - #The offset controls the starting point of the pattern. #Elements of dash_list give the length (in pixels) of dash segments. n is the #number of elements in dash_list. dash_offset is the distance (in pixels) to #start in dash_list. #Example: #gdk_gc_set_dashes( gc, 3, { 6, 3 }, 2 ); #Draws a line which is on for 6 pixels, then off for 3, then on for 6, etc. An #offset of half the first segments helps lines to match up more cleanly when #they join. Dash patterns look best with an even number of elements in #dash_list (obviously). #Use gdk_gc_set_line_attributes() to turn on GDK_LINE_ON_OFF_DASH or #GDK_LINE_DOUBLE_DASH to see your pattern. Gtk2->main; __END__ -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From scott@asofyet.org Thu Mar 16 20:16:10 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 87E2C3B0846 for ; Thu, 16 Mar 2006 20: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 14876-02 for ; Thu, 16 Mar 2006 20:16:06 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id 9A2813B120C for ; Thu, 16 Mar 2006 20:16:06 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by merry.dreamhost.com (Postfix) with ESMTP id BE78610713D; Thu, 16 Mar 2006 17:16:04 -0800 (PST) In-Reply-To: <20060316193043.GA1544@localhost.localdomain> References: <20060316031301.GA2713@localhost.localdomain> <1142499140.8520.20.camel@localhost.localdomain> <20060316193043.GA1544@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0FD7B410-B49C-4B99-BF69-122A8FF9E413@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Thu, 16 Mar 2006 20:16:12 -0500 To: David X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 01:16:10 -0000 On Mar 16, 2006, at 2:30 PM, David wrote: > On Thu, Mar 16, 2006 at 09:52:20PM +1300, Grant McLean wrote: >> On Wed, 2006-03-15 at 21:13 -0600, David wrote: > > [...] "use strict" and separate files. > >> No, that's right, before you added 'use strict' all your variables >> were >> global variables. When you declared the variables with 'my', you >> restricted their scope to the block they appeared in (eg: a >> subroutine) >> or to the file if they weren't in a block. > > What came as a surprise to me was that I couldn't have global > variables. > Again, I'm quite new to Perl and some of the rules are a bit > unexpected. "strict" doesn't prevent you from having globals. What it does is require that you use either fully-qualified package names or lexically-scoped variables. Without "strict", any variable name is legal, and the scope is global by default. This was and is very handy for command-line one-liners and other quick hacks, but in Real Code is Very Dangerous. The most common case is that you can misspell a variable name and never know it until you've spent far too long tracking down the resulting logic bug. So, "strict" essentially makes you declare your variables. With "my" you create a variable which is visible only within the containing lexical scope (the file, package, or block). With "our" you declare a variable that lives in this file but is visible to anyone who knows the package name. You can also say "use vars qw($foo @bar)" to achieve the same effect as "our $foo; our @bar;". To refer to these variables from other packages you must either refer to them with fully-qualified package names (e.g. $OtherPackage::foo) or set up the host package as an Exporter and import them into other packages. All of this is documented in perl's online manual. And, actually, i hesitate to mention all of this because globals really are not good things to use. They limit the ability of your packages to scale to multiple instances and tend to cause spaghetti- like interdependencies. Avoid globals. Learn to create classes. Perl makes it very easy. Once you understand classes, there's a slight change in initialization style to start creating subclasses of Glib::Objects so that you can create your own widgets. Here's a write-up that contrasts normal perl classes and Glib::Object-style classes. http://gtk2-perl.sourceforge.net/doc/subclassing_widgets_in_perl.html >>> if I were to adapt some of the routines to Classes, what's >>> normally best - separate files or a single file? >> >> You can do either. It's perfectly reasonable to declare multiple >> classes in a single file. > > With the above question, I meant keeping the classes in the same > file as > the mainline code. I know that in your tutorial, you stated that > while > developing your project, you kept separate files for the classes > and the > mailine code, but that sometimes it was advantageous, especially after > development was complete, to merge them all into one file. Whether to use one file or a bunch of files really depends on how the code will be used. When i have something that i want to deploy easily, i like to have all the classes in a single file so that the application consists of just one file. If i'm reusing code, i'll create installable modules. An important thing to remember when placing a bunch of classes in one file is that execution order still matters. When using "require" or "use", your whole pm file will be parsed and then executed. If you have all the classes in one file, all of the code will be parsed, but whether it will be executed depends on the position in the file. To wit: -=-=-=-=-=- #!/usr/bin/perl -w package ThingOne; print "initializing ".__PACKAGE__."\n"; our $stuff = 42; sub new { return bless { stuff => $stuff }, $_[0]; } package main; # here is some driver code. use strict; foreach my $class (qw(ThingOne ThingTwo ThingThree)) { my $thing = new $class; print "$thing\->{stuff} = $thing->{stuff}\n"; } package ThingTwo; print "initializing ".__PACKAGE__."\n"; our $stuff = 42; sub new { return bless { stuff => $stuff }, $_[0]; } package ThingThree; print "running in ".__PACKAGE__."\n"; our $stuff; BEGIN { print "initializing ".__PACKAGE__."\n"; $stuff = 42; } sub new { return bless { stuff => $stuff }, $_[0]; } -=-=-=-=-=-=-=-=- This prints out the following: $ perl single-file.pl initializing ThingThree initializing ThingOne ThingOne=HASH(0x9339d20)->{stuff} = 42 Use of uninitialized value in concatenation (.) or string at single- file.pl line 12. ThingTwo=HASH(0x9339d98)->{stuff} = ThingThree=HASH(0x9357080)->{stuff} = 42 initializing ThingTwo running in ThingThree Figuring out why is left as an exercise for you. :-) So, you then get to decide whether you want your main driver logic at the top or at the bottom of the file. >> The perlmonks.org web site is a good place for questions and quick >> feedback too. > > Yes, that would be a more apropriate place. I do realize that this > question _was_ a bit OT for this list. If everything was on-topic life would be quite boring. But i do try to spare y'all the tales of what crazy things my kids have done each day. =) -- "that's it! you're a genius!" "yes. that's what i think. do you think i deserve a raise?" - dialogue from 'Godzilla versus Mothra', 1964 From ari.jolma@tkk.fi Fri Mar 17 02:13:27 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4659F3B3F4E for ; Fri, 17 Mar 2006 02:13:27 -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 30600-01 for ; Fri, 17 Mar 2006 02:13:26 -0500 (EST) Received: from pne-smtpout3-sn1.fre.skanova.net (pne-smtpout3-sn1.fre.skanova.net [81.228.11.120]) by menubar.gnome.org (Postfix) with ESMTP id C2E833B27BE for ; Fri, 17 Mar 2006 02:13:25 -0500 (EST) Received: from [192.168.3.12] (80.221.66.9) by pne-smtpout3-sn1.fre.skanova.net (7.2.070) id 43CE0B3900298CD7 for gtk-perl-list@gnome.org; Fri, 17 Mar 2006 08:13:23 +0100 Message-ID: <441A615B.1060204@tkk.fi> Date: Fri, 17 Mar 2006 09:12:27 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl mailing list References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> In-Reply-To: <44199C24.9060004@tkk.fi> 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.563 tagged_above=-999 required=2 tests=[AWL=0.036, BAYES_00=-2.599] X-Spam-Score: -2.563 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 07:13:27 -0000 Ari Jolma wrote: > muppet wrote: > >> If dealing with the separate XML file is a problem, you can embed >> the XML in the perl file with very little effort. I've seen >> various people use a Makefile rule to concatenate the .glade file >> onto the .pm or .pl file before installation. > > > > This is a very good idea (I've done that too many times by hand :). > how do I put this into Makefile.PL? to answer myself: One way is to use MY::postamble and add rules to cat .pm from .pm.in and .glade perhaps a more elegant solution is to use filters in build, perhaps using PM_FILTER of MakeMaker but that seems to be somewhat deprecated Ari From dbree@duo-county.com Fri Mar 17 07:19:24 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4985D3B280A for ; Fri, 17 Mar 2006 07:19: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 13246-08 for ; Fri, 17 Mar 2006 07:19:23 -0500 (EST) Received: from smtp.duo-county.com (smtp.duo-county.com [66.38.0.221]) by menubar.gnome.org (Postfix) with ESMTP id 189703B15D0 for ; Fri, 17 Mar 2006 07:19:23 -0500 (EST) Received: from localhost.localdomain (12-159.mod.duo-county.com [66.38.12.159]) by bn9.blue.net (8.12.10/8.12.10/SMTP) with ESMTP id k2HCJGux006351 for ; Fri, 17 Mar 2006 06:19:17 -0600 (CST) Received: from dlb by localhost.localdomain with local (Exim 4.50) id 1FK5xq-0000rP-QJ for gtk-perl-list@gnome.org; Thu, 16 Mar 2006 21:49:22 -0600 Date: Thu, 16 Mar 2006 21:49:22 -0600 To: gtk-perl-list@gnome.org Message-ID: <20060317034922.GA3203@localhost.localdomain> Mail-Followup-To: gtk-perl-list@gnome.org References: <20060316031301.GA2713@localhost.localdomain> <1142499140.8520.20.camel@localhost.localdomain> <20060316193043.GA1544@localhost.localdomain> <0FD7B410-B49C-4B99-BF69-122A8FF9E413@asofyet.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0FD7B410-B49C-4B99-BF69-122A8FF9E413@asofyet.org> User-Agent: Mutt/1.5.9i From: David X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.776 tagged_above=-999 required=2 tests=[AWL=-0.595, BAYES_00=-2.599, DATE_IN_PAST_06_12=0.827, FORGED_RCVD_HELO=0.135, RCVD_IN_SORBS_WEB=1.456] X-Spam-Score: -0.776 X-Spam-Level: Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 12:19:24 -0000 On Thu, Mar 16, 2006 at 08:16:12PM -0500, muppet wrote: > On Mar 16, 2006, at 2:30 PM, David wrote: > >What came as a surprise to me was that I couldn't have global > >variables. > >Again, I'm quite new to Perl and some of the rules are a bit > >unexpected. > "strict" doesn't prevent you from having globals. What it does is > require that you use either fully-qualified package names or > lexically-scoped variables. Yes, I learned that in the docs. What I should have said was that you couldn't use them "conveniently", at least, IMO. What I was trying to do was something I guess not appropriate in Perl. What I had attempted was to keep it modular - I had three component files - but none were defined as packages. I'd attempted to keep the related portions of the code in separate files, and then just include them into the main program. In the fashion as you would in C. In C, if you "include " a file, the code and all variables in all these files are treated as if it were one single file. I found that this didn't work this way in Perl. [ .. description of what "strict" does .. ] > All of this is documented in perl's online manual. Yes, I've studied them and the concepts are _slowly_ creeping in. > And, actually, i hesitate to mention all of this because globals > really are not good things to use. They limit the ability of your > packages to scale to multiple instances and tend to cause spaghetti- > like interdependencies. > Avoid globals. Yes, I think I depend too heavily on globals. I tend to try to access global variables directly from within a subroutine when I should be passing references or returning a reference or value. I need to get out of that habit, I think. > Learn to create classes. Perl makes it very easy. Once you > understand classes, there's a slight change in initialization style > to start creating subclasses of Glib::Objects so that you can create > your own widgets. Here's a write-up that contrasts normal perl > classes and Glib::Object-style classes. > http://gtk2-perl.sourceforge.net/doc/subclassing_widgets_in_perl.html > >>You can do either. It's perfectly reasonable to declare multiple > >>classes in a single file. > > > >With the above question, I meant keeping the classes in the same > >file as > >the mainline code. I know that in your tutorial, you stated that > >while > >developing your project, you kept separate files for the classes > >and the > >mailine code, but that sometimes it was advantageous, especially after > >development was complete, to merge them all into one file. > Whether to use one file or a bunch of files really depends on how the > code will be used. When i have something that i want to deploy > easily, i like to have all the classes in a single file so that the > application consists of just one file. If i'm reusing code, i'll > create installable modules. In my particular case, I don't think any packages I'd create would be very generic to where they could be reused. The main reason I'd want to split it up (wanted to split it up to begin with, actually), would be for manageability. > An important thing to remember when placing a bunch of classes in one > file is that execution order still matters. When using "require" or > "use", your whole pm file will be parsed and then executed. If you > have all the classes in one file, all of the code will be parsed, but > whether it will be executed depends on the position in the file. Not trying to be a grammar police, but, for my understanding, do you mean "will have been executed"? It appears that in the following code all executes, but the question is whether it has executed by the time (in this case) main:: does its thing. I had not even thought about executable code outside of a subroutin in a package. Since you bring up this point, wouldn't it be wise to avoid, if at all possible, having any executable code outside a subroutine in a package. Again, I'm really new at this, but I'd think that it would be best to do all initialization that you can from within your constructor. Of course, I realize that this program you supplied was for demonstration purposes. > To wit: [ .. sample program .. ] > Figuring out why is left as an exercise for you. :-) Yeah, think I followed it all.. Just tried something. I cut-and-pasted your program putting the three packages into separate files, and inserting corresponding "use " statements at the appropriate places and the program ran without error or warning. I had expected the same results as the single-file.pl. Did I see somewhere that "use" statements are all processed at compile time, regardless of position? > So, you then get to decide whether you want your main driver logic at > the top or at the bottom of the file. Well, after this thread, I may do some Packaging :) Actually, I have gotten in the habit of trying to put most of my subroutines at the begin of the file. This in an attempt to avoid having to prototype my C variables and subroutines.. But I think prototyping is the equivalent of "strict" in perl, and it's a Bad Thing(tm) to avoid it. > >I do realize that this > >question _was_ a bit OT for this list. > If everything was on-topic life would be quite boring. But i do try > to spare y'all the tales of what crazy things my kids have done each > day. =) I appreciate that. I know that on some lists, there are people who seem to look for every opportunity to jump on people for OT posts, but I'm thinking that there may be others who might be helped by this thread. From scott@asofyet.org Fri Mar 17 07:32:43 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 09D403B165B for ; Fri, 17 Mar 2006 07:32: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 14385-04 for ; Fri, 17 Mar 2006 07:32:41 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id 592F13B110B for ; Fri, 17 Mar 2006 07:32:41 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id 16A13A7D59 for ; Fri, 17 Mar 2006 04:32:40 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <441A615B.1060204@tkk.fi> References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> <441A615B.1060204@tkk.fi> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Fri, 17 Mar 2006 07:32:48 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 12:32:43 -0000 On Mar 17, 2006, at 2:12 AM, Ari Jolma wrote: > Ari Jolma wrote: > >> how do I put this into Makefile.PL? > > > to answer myself: One way is to use MY::postamble and add rules to > cat .pm from .pm.in and .glade > > perhaps a more elegant solution is to use filters in build, perhaps > using PM_FILTER of MakeMaker but that seems to be somewhat deprecated Mmmmm... ExtUtils::PkgConfig uses a PREOP rule in the call to WriteMakefile() to generate README from the pod before dist. However, this doesn't help if you're not using a dist tarball... So a postamble rule is probably best. Here's an untested example... it tries to put the pms first to avoid execution order problems, and collects the glade files in __DATA__... your code would have to handle this, of course. sub MY::postable { return ' script_included_pls = main.pl script_included_pms = lib/Foo/Bar.pm lib/Foo/Baz.pm script_included_glades = glade/*.glade my_cool_installable_script : $(script_included_pls) $ (script_included_pms) $(script_included_glades) $(PERLRUN) -e "print \'#!$(PERLRUN) -w\\n\'" > $@ perl -MExtUtils::Command -e cat $(script_included_pms) >> $@ perl -MExtUtils::Command -e cat $(script_included_pls) >> $@ $(PERLRUN) -e "print \'__DATA__\'" > $@ perl -MExtUtils::Command -e cat $(script_included_glades) >> $@ '; } -- Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we. -- President George W. Bush From kaffeetisch@gmx.de Fri Mar 17 07:45:51 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0CEDE3B289E for ; Fri, 17 Mar 2006 07:45:51 -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 14882-10 for ; Fri, 17 Mar 2006 07:45:49 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 15A423B28C9 for ; Fri, 17 Mar 2006 07:45:48 -0500 (EST) Received: (qmail invoked by alias); 17 Mar 2006 12:45:46 -0000 Received: from port-212-202-0-228.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.0.228] by mail.gmx.net (mp015) with SMTP; 17 Mar 2006 13:45:46 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org In-Reply-To: <20060316180403.1cf2c098@zentara.zentara.net> References: <20060316180403.1cf2c098@zentara.zentara.net> Content-Type: text/plain Date: Fri, 17 Mar 2006 13:45:46 +0100 Message-Id: <1142599546.7230.4.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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: Subject: Re: setting line dash on Gnome2::Canvas X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 12:45:51 -0000 On Thu, 2006-03-16 at 18:04 -0500, zentara wrote: > # feeble attempt dosn't work > #$line1->set_dashes( {0,0xff,0,0xff} ); As the name gdk_gc_set_dashes suggests, you need to call the set_dashes method on a Gtk2::Gdk::GC object: $gc->set_dashes(0, 0xff, 0, 0xff); Unfortunately though, the "gc" struct member of Gnome2::Canvas::Line is not accessible via the bindings at this point -- so right now, I think this isn't possible. -- Bye, -Torsten From scott@asofyet.org Fri Mar 17 09:48:21 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0B4FA3B2934 for ; Fri, 17 Mar 2006 09:48: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 22623-04 for ; Fri, 17 Mar 2006 09:48:18 -0500 (EST) Received: from webmail4.sd.dreamhost.com (webmail4.sd.dreamhost.com [64.111.100.16]) by menubar.gnome.org (Postfix) with ESMTP id 55A4D3B2861 for ; Fri, 17 Mar 2006 09:48:18 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail4.sd.dreamhost.com (Postfix) with ESMTP id 7F802301F4 for ; Fri, 17 Mar 2006 06:48:17 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Fri, 17 Mar 2006 09:48:17 -0500 (EST) Message-ID: <3757.192.146.101.26.1142606897.squirrel@webmail.asofyet.org> In-Reply-To: <20060317034922.GA3203@localhost.localdomain> References: <20060316031301.GA2713@localhost.localdomain> <1142499140.8520.20.camel@localhost.localdomain> <20060316193043.GA1544@localhost.localdomain> <0FD7B410-B49C-4B99-BF69-122A8FF9E413@asofyet.org> <20060317034922.GA3203@localhost.localdomain> Date: Fri, 17 Mar 2006 09:48:17 -0500 (EST) 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=-2.558 tagged_above=-999 required=2 tests=[AWL=0.041, BAYES_00=-2.599] X-Spam-Score: -2.558 X-Spam-Level: Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 14:48:21 -0000 David wrote: > What I was trying to > do was something I guess not appropriate in Perl. What I had attempted > was to keep it modular - I had three component files - but none were > defined as packages. I'd attempted to keep the related portions of the > code in separate files, and then just include them into the main program. > In the fashion as you would in C. In C, if you "include " a file, the > code and all variables in all these files are treated as if it were one > single file. I found that this didn't work this way in Perl. I think a "require" of a file that does not define a package may behave similarly to what C does. But there are caveats, and it's not as nice as proper packages, so i never do it and can't really tell you. >> An important thing to remember when placing a bunch of classes in one >> file is that execution order still matters. When using "require" or >> "use", your whole pm file will be parsed and then executed. If you >> have all the classes in one file, all of the code will be parsed, but >> whether it will be executed depends on the position in the file. > > Not trying to be a grammar police, but, for my understanding, do you > mean "will have been executed"? It appears that in the following code > all executes, but the question is whether it has executed by the time > (in this case) main:: does its thing. You're correct. More appropriate would be "when it will be executed". Note that if i'd put an "exit" at the end of main, the initialization code in ThingTwo would not have run at all. > I had not even thought about executable code outside of a subroutin in a > package. Since you bring up this point, wouldn't it be wise to avoid, > if at all possible, having any executable code outside a subroutine in a > package. Again, I'm really new at this, but I'd think that it would be > best to do all initialization that you can from within your constructor. > Of course, I realize that this program you supplied was for > demonstration purposes. Since packages are typically in pm files that are "use"d or "require"d, it's not much of a problem. The code outside of subroutines will be executed once, when the files are "require"d ("use" performs a "require"). In many situations, you need code outside of subroutines in modules for things like initializing @ISA or @EXPORT_OK. If you are placing your package at the bottom a single-file program, you want to wrap that in a BEGIN block to ensure that it executes at the right time. In fact, convention for XS extensions is to have the bootstrapping calls outside of subroutines. See, for example, Glib.pm and Gtk2.pm. This effectively guarantees that they get called, and that they get called once. >> To wit: > [ .. sample program .. ] > >> Figuring out why is left as an exercise for you. :-) > > Yeah, think I followed it all.. Just tried something. I cut-and-pasted > your program putting the three packages into separate files, and > inserting corresponding "use " statements at the appropriate places and > the program ran without error or warning. I had expected the same > results as the single-file.pl. Did I see somewhere that "use" > statements are all processed at compile time, regardless of position? Yes. Essentially, when "require"ing a file, it gets parsed, compiled, and then executed before the "require" returns. A "use", which performs a "require", happens at compile time, so code in included modules gets executed at compile time, a la BEGIN blocks. "perldoc -f require" explains it in detail. The perlmod manpage adds Because the "use" statement implies a "BEGIN" block, the importing of semantics happens as soon as the "use" statement is compiled, before the rest of the file is compiled. This is how it is able to function as a pragma mechanism, and also how modules are able to declare sub- routines that are then visible as list or unary operators for the rest of the current file. This will not work if you use "require" instead of "use". With "require" you can get into this problem: require Cwd; # make Cwd:: accessible $here = Cwd::getcwd(); use Cwd; # import names from Cwd:: $here = getcwd(); require Cwd; # make Cwd:: accessible $here = getcwd(); # oops! no main::getcwd() In general, "use Module ()" is recommended over "require Module", because it determines module availability at compile time, not in the middle of your program's execution. An exception would be if two mod- ules each tried to "use" each other, and each also called a function from that other module. In that case, it's easy to use "require" instead. -- muppet From scott@asofyet.org Fri Mar 17 09:51:17 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B4D943B29D3 for ; Fri, 17 Mar 2006 09:51: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 22623-10 for ; Fri, 17 Mar 2006 09:51:13 -0500 (EST) Received: from webmail4.sd.dreamhost.com (webmail4.sd.dreamhost.com [64.111.100.16]) by menubar.gnome.org (Postfix) with ESMTP id A0CD63B29C6 for ; Fri, 17 Mar 2006 09:51:13 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail4.sd.dreamhost.com (Postfix) with ESMTP id 0F6F0301F4 for ; Fri, 17 Mar 2006 06:51:13 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Fri, 17 Mar 2006 09:51:13 -0500 (EST) Message-ID: <19779.192.146.101.26.1142607073.squirrel@webmail.asofyet.org> In-Reply-To: <1142599546.7230.4.camel@localhost.localdomain> References: <20060316180403.1cf2c098@zentara.zentara.net> <1142599546.7230.4.camel@localhost.localdomain> Date: Fri, 17 Mar 2006 09:51:13 -0500 (EST) 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=-2.559 tagged_above=-999 required=2 tests=[AWL=0.040, BAYES_00=-2.599] X-Spam-Score: -2.559 X-Spam-Level: Subject: Re: setting line dash on Gnome2::Canvas X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 14:51:17 -0000 (Damn. It appears that my reply last night either didn't go out or didn't go the list.) Torsten Schoenfeld wrote: > On Thu, 2006-03-16 at 18:04 -0500, zentara wrote: > >> # feeble attempt dosn't work >> #$line1->set_dashes( {0,0xff,0,0xff} ); > > As the name gdk_gc_set_dashes suggests, you need to call the set_dashes > method on a Gtk2::Gdk::GC object: > > $gc->set_dashes(0, 0xff, 0, 0xff); > > Unfortunately though, the "gc" struct member of Gnome2::Canvas::Line is > not accessible via the bindings at this point -- so right now, I think > this isn't possible. Additionally, this gc, which is modified by the Gnome2::Canvas::Line's line-style property, is used only for GDK canvases, not antialiased ones. I don't see any way to make an antialiased canvas use dashes. -- muppet From pagaltzis@gmx.de Fri Mar 17 10:33:35 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E14BD3B101C for ; Fri, 17 Mar 2006 10:33: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 24989-10 for ; Fri, 17 Mar 2006 10:33:33 -0500 (EST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 697E53B2A2F for ; Fri, 17 Mar 2006 10:33:32 -0500 (EST) Received: (qmail invoked by alias); 17 Mar 2006 15:33:31 -0000 Received: from xdsl-81-173-225-88.netcologne.de (EHLO klangraum) [81.173.225.88] by mail.gmx.net (mp017) with SMTP; 17 Mar 2006 16:33:31 +0100 X-Authenticated: #163624 Date: Fri, 17 Mar 2006 16:34:03 +0100 From: "A. Pagaltzis" To: gtk-perl-list@gnome.org Message-ID: <20060317153403.GB13237@klangraum> Mail-Followup-To: gtk-perl-list@gnome.org References: <20060316031301.GA2713@localhost.localdomain> <1142499140.8520.20.camel@localhost.localdomain> <20060316193043.GA1544@localhost.localdomain> <0FD7B410-B49C-4B99-BF69-122A8FF9E413@asofyet.org> <20060317034922.GA3203@localhost.localdomain> <3757.192.146.101.26.1142606897.squirrel@webmail.asofyet.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3757.192.146.101.26.1142606897.squirrel@webmail.asofyet.org> User-Agent: Mutt/1.4.2.1i X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.494 tagged_above=-999 required=2 tests=[AWL=-0.029, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, SPF_PASS=-0.001] X-Spam-Score: -2.494 X-Spam-Level: Subject: Re: Programming style: using Classes or inline X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 15:33:35 -0000 * muppet [2006-03-17 15:50]: >I think a "require" of a file that does not define a package may >behave similarly to what C does. Sort of. `require`ing a file multiple times won’t load it multiple times. In Perl, you get that using `do $filename`, which equates to `eval slurp($filename)` (except that there’s no builtin `slurp`). But even that is not the same. An `#include` in C is a purely textual inclusion, so it does not have any semantics at the language level. It does not affect scopes, f.ex. Of course, this is a truism, because `#include` is handled by the preprocessor long before the compiler even sees the source, so the compiler actually has no idea what macros or includes where there before. In Perl, there is no such thing as “does not affect scope,†unless maybe your main program consists of an elaborate version of eval slurp( $file1 ) . slurp( $file2 ) . slurp( $file3 ); which gets you back to the C-ish purely textual processing. But the Perl way, of course, is much better; and not because Perl does it that way. It’s the way every language designed with modularity in mind works. C never was. (Not that I’m dissing C, mind. C is extremely good at what C is good at.) Not that you have much choice where Perl is concerned, because Perl is extremely hard to parse and makes it even harder to safely paste together pieces of source code programmatically; this makes preprocessing (eg. source filters) highly buggy and dangerous. [NB.: this is only half directed at you-as-in-muppet, of course; half of it is more for the benefit of anyone who does not already know all this.] Regards, -- Aristotle Pagaltzis // From beast@ldap.or.id Fri Mar 17 22:45:03 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9324B3B02E5 for ; Fri, 17 Mar 2006 22:45: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 30420-04 for ; Fri, 17 Mar 2006 22:45:00 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 3B60B3B02E2 for ; Fri, 17 Mar 2006 22:44:58 -0500 (EST) Message-ID: <441B8229.8030708@ldap.or.id> Date: Sat, 18 Mar 2006 10:44:41 +0700 From: Beast User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-1.629 tagged_above=-999 required=2 tests=[AWL=-0.612, BAYES_00=-2.599, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -1.629 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 03:45:03 -0000 Beast wrote: > > I have these following code: > > ... > > sub cb_ok { > my $self = shift; > ... > my $dialog = Gtk2::MessageDialog->new($self, 'modal', 'error', 'ok', > $message); > > $dialog->set_position('center-on-parent'); > } > > But it behave like I wanted. It should be: but it doesn't behave as i expected. :) > > 1. The error pop-up did not center in their parrent, but seems on > top-left of screen. I think the problem might because of variable $self is undefined, but I have sure that $self is defined (the parent window): print "self is defined: $self" if defined $self; So, what could be the reason? > 2. How to make the "OK" button centered (presently it right alignment)? > 3. How to remove the icon on the "OK" button? > > -- --beast -- --beast http://sum.ldap.or.id/blog From beast@ldap.or.id Fri Mar 17 23:29:31 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1020A3B02F4 for ; Fri, 17 Mar 2006 23:29: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 32271-07 for ; Fri, 17 Mar 2006 23:29:30 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 20D7D3B02EF for ; Fri, 17 Mar 2006 23:29:29 -0500 (EST) Message-ID: <441B8C9A.9000305@ldap.or.id> Date: Sat, 18 Mar 2006 11:29:14 +0700 From: Beast User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Beast References: <441B8229.8030708@ldap.or.id> In-Reply-To: <441B8229.8030708@ldap.or.id> 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=-1.629 tagged_above=-999 required=2 tests=[AWL=-0.612, BAYES_00=-2.599, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -1.629 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 04:29:31 -0000 Beast wrote: > Beast wrote: >> >> I have these following code: >> >> ... >> >> sub cb_ok { >> my $self = shift; >> ... >> my $dialog = Gtk2::MessageDialog->new($self, 'modal', 'error', >> 'ok', $message); >> >> $dialog->set_position('center-on-parent'); >> } >> >> But it behave like I wanted. > > It should be: but it doesn't behave as i expected. :) > >> >> 1. The error pop-up did not center in their parrent, but seems on >> top-left of screen. > > I think the problem might because of variable $self is undefined, but I > have sure that $self is defined (the parent window): > > print "self is defined: $self" if defined $self; > > So, what could be the reason? My fault. The reference object is wrong :( But these 2 questions is still unanswered. > > >> 2. How to make the "OK" button centered (presently it right alignment)? >> 3. How to remove the icon on the "OK" button? -- --beast From alexe.cn@gmail.com Sat Mar 18 02:24:17 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id EAA5B3B039F for ; Sat, 18 Mar 2006 02:24: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 05898-02 for ; Sat, 18 Mar 2006 02:24:16 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by menubar.gnome.org (Postfix) with ESMTP id CD35B3B038C for ; Sat, 18 Mar 2006 02:24:15 -0500 (EST) Received: by zproxy.gmail.com with SMTP id 16so729545nzp for ; Fri, 17 Mar 2006 23:24:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=iEJNcGsFtiHn1T1Vey1Us1tgA52WiyO4Ed44NcT1cOlYXQvnBcmmHCGPpWF6c8V4L26Su8T8rBcb+WZ/da4LgE1I4FdeZht5ekOu43qNNQGAfQ2RbVIWojrM8eNMKotKW38PdDVR2mUhf1Z0EDYksIQeph8pnCMkeIi4TuHIxVg= Received: by 10.35.119.11 with SMTP id w11mr2183542pym; Fri, 17 Mar 2006 23:24:14 -0800 (PST) Received: by 10.35.16.20 with HTTP; Fri, 17 Mar 2006 23:24:14 -0800 (PST) Message-ID: <4590d5230603172324l53af3080l@mail.gmail.com> Date: Sat, 18 Mar 2006 15:24:14 +0800 From: alexe.cn@gmail.com To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.22 tagged_above=-999 required=2 tests=[BAYES_20=-0.74, NO_REAL_NAME=0.961, SPF_PASS=-0.001] X-Spam-Score: 0.22 X-Spam-Level: Subject: Input method in drawingarea widget X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 07:24:17 -0000 hi,all You know, in normal widget(textview...) i can use input method because gtk+ support it. but how can i use input method in my drawingarea widget? -- +--------------------------------------------+ |By Alexe (http://www.alexe.cn)| +--------------------------------------------+ From hemlock@vtlink.net Sat Mar 18 10:01:32 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DD4AC3B0B1B for ; Sat, 18 Mar 2006 10:01: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 10751-07 for ; Sat, 18 Mar 2006 10:01:30 -0500 (EST) Received: from mail2.vtlink.com (srs.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id AE1783B0B01 for ; Sat, 18 Mar 2006 10:01:29 -0500 (EST) Received: (qmail 25129 invoked by uid 5142); 18 Mar 2006 15:01:31 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(64.30.50.175):. Processed in 0.491006 secs); 18 Mar 2006 15:01:31 -0000 Received: from unknown (HELO ?10.0.1.3?) (hemlock@64.30.50.175) by mail2.vtlink.com with ESMTPA; 18 Mar 2006 10:01:31 -0500 Message-ID: <441C20C2.7040803@vtlink.net> Date: Sat, 18 Mar 2006 10:01:22 -0500 From: James Muir User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-2.6 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.6 X-Spam-Level: Subject: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 15:01:32 -0000 Hello, I recently upgraded the software on my machine and was very surprised to find that the behaviour of Glib::Object::Subclass has changed and breaks the code I've been working on. Lucky I found this before releasing it to the world! :-) It seems that get() no longer works if I happen to have a SET_PROPERTY subroutine defined. Below is a small example that demonstrates the problem. If I comment out the SET_PROPERTY sub, I find that the tests pass, otherwise 2 of 3 fail. Is this a bug, or am I as usual missing something? My setup: I'm running ZenWalk 2.2 which uses Linux kernel 2.6.15.4 My Gtk2-perl libs are: Glib-1.102, Gnome2-1.023, Gnome2-Canvas-1.002, Gnome2-Print-0.951, Gnome2-VFS-1.041, Gtk2-1.102. use Test::More tests => 3; use Gtk2 '-init'; use Gnome2::Canvas; my $view = Gnome2::Canvas->new_aa(); my $goober = Gnome2::Canvas::Item->new($view->root, 'Goober', border=>99); isa_ok( $goober, 'Goober'); my $border = $goober->get('border'); is( defined($border), 1, 'border should be defined'); is ($border, 99, 'border should have value 99'); exit 0; package Goober; use warnings; use strict; use Gnome2::Canvas; use Glib ':constants'; use Glib::Object::Subclass Gnome2::Canvas::Group::, properties => [ Glib::ParamSpec->scalar ('border', 'border', 'The border', G_PARAM_READWRITE), ] ; # Comment out the SET_PROPERTY and get() works!! sub SET_PROPERTY { my ($self, $pspec, $newval) = @_; my $param_name = $pspec->get_name; print "Item, SET_PROPERTY: name: $param_name value: $newval\n"; } From scott@asofyet.org Sat Mar 18 11:26:23 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 969E43B0F66 for ; Sat, 18 Mar 2006 11:26:23 -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 14699-03 for ; Sat, 18 Mar 2006 11:26:22 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id 42F513B0F9F for ; Sat, 18 Mar 2006 11:26:22 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by merry.dreamhost.com (Postfix) with ESMTP id 8E39C1063C4 for ; Sat, 18 Mar 2006 08:26:19 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <441B8C9A.9000305@ldap.or.id> References: <441B8229.8030708@ldap.or.id> <441B8C9A.9000305@ldap.or.id> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <71D70D5D-A352-49D2-B0C6-20162D7EC5FA@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Sat, 18 Mar 2006 11:26:29 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 16:26:23 -0000 On Mar 17, 2006, at 11:29 PM, Beast wrote: > But these 2 questions is still unanswered. > >>> 2. How to make the "OK" button centered (presently it right >>> alignment)? >>> 3. How to remove the icon on the "OK" button? Don't. The alignment of buttons and contents of common buttons are things that should be taken care of by user themes and should conform to human interface guidelines for user interface consistency. If you have a *really* good argument for breaking that consistency, pitch it to us, and then maybe we'll tell you how. ;-) -- To type! perchance to fart! ay, there's the stench; For in that type of death what nostrils may come When we have laid off this green coil, Must give us eye.... -- http://www.madlibs.org/ From scott@asofyet.org Sat Mar 18 11:32:04 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 53B4B3B0FBD for ; Sat, 18 Mar 2006 11:32: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 15154-06 for ; Sat, 18 Mar 2006 11:32:03 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id 450F03B0FB1 for ; Sat, 18 Mar 2006 11:32:03 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by merry.dreamhost.com (Postfix) with ESMTP id 8294C106A69 for ; Sat, 18 Mar 2006 08:32:02 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <4590d5230603172324l53af3080l@mail.gmail.com> References: <4590d5230603172324l53af3080l@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0C342BF2-507D-44B5-B011-4F0E41562C4E@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Sat, 18 Mar 2006 11:32:13 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: Input method in drawingarea widget X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 16:32:04 -0000 On Mar 18, 2006, at 2:24 AM, alexe.cn@gmail.com wrote: > You know, in normal widget(textview...) i can use input method > because gtk+ support it. > > but how can i use input method in my drawingarea widget? According to the source of GtkEntry, you use GtkIMContext to filter the key events. Unfortunately, it looks like GtkIMContext is not bound to perl. Not sure why we missed it. /me puts that on a TODO list... -- Without treatment, a common cold will last about seven days. With treatment, it will last about a week. -- conventional wisdom From scott@asofyet.org Sat Mar 18 11:37:53 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id AD3373B101F for ; Sat, 18 Mar 2006 11:37: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 15906-04 for ; Sat, 18 Mar 2006 11:37:51 -0500 (EST) Received: from merry.dreamhost.com (merry.dreamhost.com [66.33.211.26]) by menubar.gnome.org (Postfix) with ESMTP id D21873B101B for ; Sat, 18 Mar 2006 11:37:49 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by merry.dreamhost.com (Postfix) with ESMTP id CB1981063C4 for ; Sat, 18 Mar 2006 08:37:48 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <441C20C2.7040803@vtlink.net> References: <441C20C2.7040803@vtlink.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Sat, 18 Mar 2006 11:37:59 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.2) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 16:37:53 -0000 On Mar 18, 2006, at 10:01 AM, James Muir wrote: > Is this a bug, or am I as usual missing something? It's functioning correctly; your SET_PROPERTY isn't actually doing anything. See below: > # Comment out the SET_PROPERTY and get() works!! > sub SET_PROPERTY > { > my ($self, $pspec, $newval) = @_; > > my $param_name = $pspec->get_name; > > print "Item, SET_PROPERTY: name: $param_name value: $newval\n"; # actually do something with $newval. the default implementation # of GET_PROPERTY will look for the value in $self->{$param_name}. # the default implementation of SET_PROPERTY does this: $self->{$param_name} = $newval; > } So, GET_PROPERTY was looking for $self->{border}, which was undefined, because no value had ever been set to it. -- I believe that if music companies are going to set examples they need to do it to appropriate people and not dead people. -- Robin Chianumba From ebassi@gmail.com Sat Mar 18 12:47:04 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 64C873B1290 for ; Sat, 18 Mar 2006 12:47: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 19523-03 for ; Sat, 18 Mar 2006 12:47:03 -0500 (EST) Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.178]) by menubar.gnome.org (Postfix) with ESMTP id 441083B1260 for ; Sat, 18 Mar 2006 12:47:03 -0500 (EST) Received: by pproxy.gmail.com with SMTP id x66so2585665pye for ; Sat, 18 Mar 2006 09:47:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=Noxnuo4knTf67HxqiSKRTT0jPW0GOPkjytVJfliPj7qG81+FB3hGHUI7KLuuQgVvPrLbS1T/CTFWd9wXdOabSiLnubWjJ/mH2VBL0H1BXg7g2YnHzxPVeCibd1VtMRaqhRfsUzPwTRk4w+hacyJrCtxzHpr85X6SM9eC57fAo6s= Received: by 10.65.193.7 with SMTP id v7mr25731qbp; Sat, 18 Mar 2006 09:47:02 -0800 (PST) Received: from . ( [213.140.6.105]) by mx.gmail.com with ESMTP id e11sm488802qbc.2006.03.18.09.47.00; Sat, 18 Mar 2006 09:47:01 -0800 (PST) From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <441B8C9A.9000305@ldap.or.id> References: <441B8229.8030708@ldap.or.id> <441B8C9A.9000305@ldap.or.id> Content-Type: text/plain Date: Sat, 18 Mar 2006 17:39:15 +0100 Message-Id: <1142699956.983.19.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.084 tagged_above=-999 required=2 tests=[AWL=-0.498, BAYES_00=-2.599, RCVD_IN_BL_SPAMCOP_NET=1.558, RCVD_IN_SORBS_WEB=1.456, SPF_PASS=-0.001] X-Spam-Score: -0.084 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Mar 2006 17:47:04 -0000 Hi, On Sat, 2006-03-18 at 11:29 +0700, Beast wrote: > But these 2 questions is still unanswered. > > > > > > >> 2. How to make the "OK" button centered (presently it right alignment)? > >> 3. How to remove the icon on the "OK" button? Short answer: you don't. Long answer: these are theme-related issues, and should be dealt with by the user and his/hers theme, not by the application developer. Really long answer for the question number 2: usability studies have shown that the user will most likely move the mouse cursor on the lower corner of a message box in order to read it or to operate on it; that is also why Gnome and GTK have "inverted" the order of the buttons on dialogs. By placing the button on the centre you are violating the consistency of the user interface, and you are requiring the user to actually move the mouse twice: the first time to the corner, the other time on the centre of the dialog. Thus, you are kindly invited to follow the human interface guidelines in order to ensure both UI consistency with the rest of the platform and the best user experience. Ciao, Emmanuele. -- Emmanuele Bassi - Log: http://log.emmanuelebassi.net From hemlock@vtlink.net Sun Mar 19 17:07:42 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3CA023B07E1 for ; Sun, 19 Mar 2006 17:07: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 13185-10 for ; Sun, 19 Mar 2006 17:07:39 -0500 (EST) Received: from mail2.vtlink.com (srs.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id 52B9A3B07B0 for ; Sun, 19 Mar 2006 17:07:38 -0500 (EST) Received: (qmail 24571 invoked by uid 5142); 19 Mar 2006 22:07:31 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(64.30.50.149):. Processed in 1.147063 secs); 19 Mar 2006 22:07:31 -0000 Received: from unknown (HELO ?10.0.1.3?) (hemlock@64.30.50.149) by mail2.vtlink.com with ESMTPA; 19 Mar 2006 17:07:30 -0500 Message-ID: <441DD630.7090202@vtlink.net> Date: Sun, 19 Mar 2006 17:07:44 -0500 From: James Muir User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> In-Reply-To: <9B46DD34-B56A-44D2-96D9-575C3097ABC8@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=-2.527 tagged_above=-999 required=2 tests=[AWL=-0.004, BAYES_00=-2.599, SPF_PASS=-0.001, TW_BG=0.077] X-Spam-Score: -2.527 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Mar 2006 22:07:42 -0000 muppet wrote: > > On Mar 18, 2006, at 10:01 AM, James Muir wrote: > >> Is this a bug, or am I as usual missing something? > > It's functioning correctly; your SET_PROPERTY isn't actually doing > anything. See below: > > >> # Comment out the SET_PROPERTY and get() works!! >> sub SET_PROPERTY >> { >> my ($self, $pspec, $newval) = @_; >> >> my $param_name = $pspec->get_name; >> >> print "Item, SET_PROPERTY: name: $param_name value: $newval\n"; > > # actually do something with $newval. the default implementation > # of GET_PROPERTY will look for the value in $self->{$param_name}. > # the default implementation of SET_PROPERTY does this: > $self->{$param_name} = $newval; > >> } > > > So, GET_PROPERTY was looking for $self->{border}, which was undefined, > because no value had ever been set to it. I apologize for the posting error. In my attempt to get to the essence of the problem I went too far. Here's the simple example with the $self->{$param_name} = $newval in place. Now the get -- still -- fails, though I wouldn't have expected it to do so. If I uncomment the GET_PROPERTY in the example below all is well, but I would have expected the example below to work without it. I'm using libgnomecanvas 2.10.2 and Gtk+2 2.8.11 Thanks for any help you can offer on this matter. Jaap Karssenberg has reported problems to me with the software I sent him after he upgraded his machine. So it's not just me that's having troubles after an upgrade. I'm trying to understand what's going wrong so I can fix this problem. -James use Test::More tests => 3; use Gtk2 '-init'; use Gnome2::Canvas; my $view = Gnome2::Canvas->new_aa(); my $goober = Gnome2::Canvas::Item->new($view->root, 'Goober', border=>99); isa_ok( $goober, 'Goober'); my $border = $goober->get('border'); is( defined($border), 1, 'border should be defined'); is ($border, 99, 'border should have value 99'); exit 0; package Goober; use warnings; use strict; use Gnome2::Canvas; use Glib ':constants'; use Glib::Object::Subclass Gnome2::Canvas::Group::, properties => [ Glib::ParamSpec->scalar ('border', 'border', 'The border', G_PARAM_READWRITE), ] ; # Comment out the SET_PROPERTY and get() works!! sub SET_PROPERTY { my ($self, $pspec, $newval) = @_; my $param_name = $pspec->get_name; print "Item, SET_PROPERTY: name: $param_name value: $newval\n"; $self->{$param_name} = $newval; } #sub GET_PROPERTY #{ # my ($self, $pspec) = @_; # return ($self->{$pspec->get_name} || $pspec->get_default_value); #} This is what I get for output: (/home/james/bug)> perl bug02.pl 1..3 Item, SET_PROPERTY: name: border value: 99 ok 1 - The object isa Goober not ok 2 - border should be defined # Failed test 'border should be defined' # in bug02.pl at line 15. # got: '' # expected: '1' not ok 3 - border should have value 99 # Failed test 'border should have value 99' # in bug02.pl at line 17. # got: undef # expected: '99' # Looks like you failed 2 tests of 3. From beast@ldap.or.id Sun Mar 19 23:24:16 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 169AB3B1F3F for ; Sun, 19 Mar 2006 23:24: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 30418-06 for ; Sun, 19 Mar 2006 23:24:15 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id DD46A3B0A34 for ; Sun, 19 Mar 2006 23:24:14 -0500 (EST) Message-ID: <441E2E5C.8050007@ldap.or.id> Date: Mon, 20 Mar 2006 11:23:56 +0700 From: Beast User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 Cc: gtk-perl mailing list References: <441B8229.8030708@ldap.or.id> <441B8C9A.9000305@ldap.or.id> <71D70D5D-A352-49D2-B0C6-20162D7EC5FA@asofyet.org> In-Reply-To: <71D70D5D-A352-49D2-B0C6-20162D7EC5FA@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=-1.63 tagged_above=-999 required=2 tests=[AWL=-0.613, BAYES_00=-2.599, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -1.63 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 04:24:16 -0000 muppet wrote: > > On Mar 17, 2006, at 11:29 PM, Beast wrote: > >> But these 2 questions is still unanswered. >> >>>> 2. How to make the "OK" button centered (presently it right alignment)? >>>> 3. How to remove the icon on the "OK" button? > > Don't. The alignment of buttons and contents of common buttons are > things that should be taken care of by user themes and should conform to > human interface guidelines for user interface consistency. > > If you have a *really* good argument for breaking that consistency, > pitch it to us, and then maybe we'll tell you how. ;-) Hi muppet, I'm porting MS Windows apps and I want it behaves and looks like what in windows does. -- --beast From beast@ldap.or.id Sun Mar 19 23:31:22 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0B24C3B1F54 for ; Sun, 19 Mar 2006 23:31: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 30530-09 for ; Sun, 19 Mar 2006 23:31:21 -0500 (EST) Received: from dc.ldap.or.id (webmail.indorama.com [202.154.34.135]) by menubar.gnome.org (Postfix) with ESMTP id 320093B0B68 for ; Sun, 19 Mar 2006 23:31:17 -0500 (EST) Message-ID: <441E2FFD.6020507@ldap.or.id> Date: Mon, 20 Mar 2006 11:30:53 +0700 From: Beast User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 Cc: gtk-perl-list@gnome.org References: <441B8229.8030708@ldap.or.id> <441B8C9A.9000305@ldap.or.id> <1142699956.983.19.camel@localhost.localdomain> In-Reply-To: <1142699956.983.19.camel@localhost.localdomain> 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=-1.629 tagged_above=-999 required=2 tests=[AWL=-0.612, BAYES_00=-2.599, DNS_FROM_RFC_WHOIS=1.447, FORGED_RCVD_HELO=0.135] X-Spam-Score: -1.629 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 04:31:22 -0000 Emmanuele Bassi wrote: >>>> 2. How to make the "OK" button centered (presently it right alignment)? >>>> 3. How to remove the icon on the "OK" button? > > > Short answer: you don't. > > Long answer: these are theme-related issues, and should be dealt with by > the user and his/hers theme, not by the application developer. > > Really long answer for the question number 2: usability studies have > shown that the user will most likely move the mouse cursor on the lower > corner of a message box in order to read it or to operate on it; that is > also why Gnome and GTK have "inverted" the order of the buttons on > dialogs. By placing the button on the centre you are violating the > consistency of the user interface, and you are requiring the user to > actually move the mouse twice: the first time to the corner, the other > time on the centre of the dialog. Thus, you are kindly invited to > follow the human interface guidelines in order to ensure both UI > consistency with the rest of the platform and the best user experience. > > Hi Emmanuele, Im not a usability expert, but for popup window with less than 2 button, isn't that center aligned looks better than right aligned? i know its personal preference but centered makes balance spaces, and i guess everybody will agree on this :) Regarding icon, icon is good as long as its not overused. I saw that Linux (or GNOME) application are using icons everywhere, it makes application less elegant than in windows. -- --beast From pagaltzis@gmx.de Mon Mar 20 01:10:10 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DA59E3B0B96 for ; Mon, 20 Mar 2006 01:10: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 02024-08 for ; Mon, 20 Mar 2006 01:10:09 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id CD3793B06BA for ; Mon, 20 Mar 2006 01:10:08 -0500 (EST) Received: (qmail invoked by alias); 20 Mar 2006 06:10:07 -0000 Received: from xdsl-213-196-241-1.netcologne.de (EHLO klangraum) [213.196.241.1] by mail.gmx.net (mp043) with SMTP; 20 Mar 2006 07:10:07 +0100 X-Authenticated: #163624 Date: Mon, 20 Mar 2006 07:10:46 +0100 From: "A. Pagaltzis" To: gtk-perl-list@gnome.org Message-ID: <20060320061046.GK13237@klangraum> Mail-Followup-To: gtk-perl-list@gnome.org References: <441B8229.8030708@ldap.or.id> <441B8C9A.9000305@ldap.or.id> <1142699956.983.19.camel@localhost.localdomain> <441E2FFD.6020507@ldap.or.id> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <441E2FFD.6020507@ldap.or.id> User-Agent: Mutt/1.4.2.1i X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.531 tagged_above=-999 required=2 tests=[AWL=0.069, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.531 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 06:10:11 -0000 * Beast [2006-03-20 05:35]: >i know its personal preference but centered makes balance >spaces, and i guess everybody will agree on this :) I like asymmetry. >Regarding icon, icon is good as long as its not overused. I saw >that Linux (or GNOME) application are using icons everywhere, it >makes application less elegant than in windows. That’s your opinion. I like having more icons better; they make it much easier to use a familiar program. If you consider this bad, talk to the GNOME Human Interface Guidelines people. Regards, -- Aristotle Pagaltzis // From remco.wouts@mpibp-frankfurt.mpg.de Mon Mar 20 08:42:41 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 594F33B0DC1 for ; Mon, 20 Mar 2006 08:42: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 28078-09 for ; Mon, 20 Mar 2006 08:42:37 -0500 (EST) Received: from zeus.mpibp-frankfurt.mpg.de (zeus.mpibp-frankfurt.mpg.de [194.95.31.240]) by menubar.gnome.org (Postfix) with ESMTP id 89FCA3B0D22 for ; Mon, 20 Mar 2006 08:42:37 -0500 (EST) Received: from conversion-daemon.zeus.mpibp-frankfurt.mpg.de by zeus.mpibp-frankfurt.mpg.de (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) id <0IWF00601H73IY@zeus.mpibp-frankfurt.mpg.de> (original mail from remco.wouts@mpibp-frankfurt.mpg.de) for gtk-perl-list@gnome.org; Mon, 20 Mar 2006 14:42:35 +0100 (MET) Received: from [127.0.0.1] ([194.95.31.237]) by zeus.mpibp-frankfurt.mpg.de (iPlanet Messaging Server 5.2 HotFix 2.06 (built Mar 28 2005)) with ESMTPA id <0IWF00MW2I2Z2S@zeus.mpibp-frankfurt.mpg.de> for gtk-perl-list@gnome.org; Mon, 20 Mar 2006 14:42:35 +0100 (MET) Date: Mon, 20 Mar 2006 15:42:28 +0100 From: Remco Wouts In-reply-to: <1142599546.7230.4.camel@localhost.localdomain> To: gtk-perl-list@gnome.org Message-id: <441EBF54.4030703@mpibp-frankfurt.mpg.de> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20060201 References: <20060316180403.1cf2c098@zentara.zentara.net> <1142599546.7230.4.camel@localhost.localdomain> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.598 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, UNPARSEABLE_RELAY=0.001] X-Spam-Score: -2.598 X-Spam-Level: Subject: Re: setting line dash on Gnome2::Canvas X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 13:42:41 -0000 Torsten Schoenfeld wrote: > On Thu, 2006-03-16 at 18:04 -0500, zentara wrote: > > >># feeble attempt dosn't work >>#$line1->set_dashes( {0,0xff,0,0xff} ); > > > As the name gdk_gc_set_dashes suggests, you need to call the set_dashes > method on a Gtk2::Gdk::GC object: > > $gc->set_dashes(0, 0xff, 0, 0xff); > > Unfortunately though, the "gc" struct member of Gnome2::Canvas::Line is > not accessible via the bindings at this point -- so right now, I think > this isn't possible. > The following hack works for me: use Inline C => 'DATA'; Inline->init; .... $canvasitem->set(dash=>main::pattern(0,10,5)); __DATA__ __C__ void pattern(SV* dashes, ... ) { Inline_Stack_Vars; int i; static struct dashes { double offset; int ndash; double *buf; } *dash = NULL; if ( dash == NULL ) { New(0, dash, 1, struct dashes); New(0, dash->buf, Inline_Stack_Items-1, double); } else { Renew(dash->buf, Inline_Stack_Items-1, double); } dash->ndash = Inline_Stack_Items-1; dash->offset = SvNV(Inline_Stack_Item(0)); for ( i = 1; i < Inline_Stack_Items; i++ ) dash->buf[i-1] = SvNV(Inline_Stack_Item(i)) > 0 ? SvNV(Inline_Stack_Item(i)) : 1; Inline_Stack_Reset; Inline_Stack_Push(sv_2mortal(newSViv((long) dash))); Inline_Stack_Done; } -- remco wouts From mospelt@student.ethz.ch Mon Mar 20 08:47:11 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2E90B3B0738 for ; Mon, 20 Mar 2006 08:47: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 28369-10 for ; Mon, 20 Mar 2006 08:47:04 -0500 (EST) Received: from XSMTP0.ethz.ch (xsmtp0.ethz.ch [82.130.70.14]) by menubar.gnome.org (Postfix) with ESMTP id 499693B21F6 for ; Mon, 20 Mar 2006 08:47:03 -0500 (EST) Received: from xfe1.d.ethz.ch ([82.130.124.41]) by XSMTP0.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Mon, 20 Mar 2006 14:47:02 +0100 Received: from [192.168.100.113] ([217.173.228.89]) by xfe1.d.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Mon, 20 Mar 2006 14:47:02 +0100 Message-ID: <441EB257.3090702@student.ethz.ch> Date: Mon, 20 Mar 2006 14:47:03 +0100 From: Mario Ospelt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: gtk-perl mailing list References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> <441A615B.1060204@tkk.fi> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Mar 2006 13:47:02.0187 (UTC) FILETIME=[C44297B0:01C64C24] X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.412 tagged_above=-999 required=2 tests=[AWL=0.187, BAYES_00=-2.599] X-Spam-Score: -2.412 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 13:47:11 -0000 Hello, I followed this thread and it was very interesting. I wanted to use this Gtk2::GladeXML package too and downloaded it from cpan. There was no ppm package, as I need it also for windows. Therefore I wanted to install it manually with nmake. I got then the following errors: --------------------------------------------------------------------------------------------- C:\usr\site\lib\Gtk2-GladeXML>nmake Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. Skip blib\lib\Gtk2/GladeXML.pm (unchanged) Skip blib\arch/Gtk2\GladeXML/Install/Files.pm (unchanged) Skip blib\arch/Gtk2\GladeXML/Install/gladexmlperl.h (unchanged) Skip blib\arch/Gtk2\GladeXML/Install/gladexmlperl.typemap (unchanged) C:\usr\bin\perl.exe C:\usr\lib\ExtUtils/xsubpp -noprototypes -typemap C: \usr\lib\ExtUtils\typemap -typemap C:\usr\site\lib\Gtk2-GladeXML\gladexmlperl.ty pemap -typemap C:\usr\site\lib\Glib\Install\typemap -typemap C:\usr\site\lib\Gtk 2\Install\gtk2perl.typemap -typemap C:\usr\site\lib\Gtk2\Install\gdk.typemap -ty pemap C:\usr\site\lib\Gtk2\Install\gtk.typemap GladeXML.xs > GladeXML.xsc && C: \usr\bin\perl.exe -MExtUtils::Command -e mv GladeXML.xsc GladeXML.c Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 94 Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 95 Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 103 Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 104 NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1' Stop. --------------------------------------------------------------------------------------------- Does someone know what is wrong here? Thanks Mario From scott@asofyet.org Mon Mar 20 09:31:08 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 01D333B1D4D for ; Mon, 20 Mar 2006 09:31:08 -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 30941-04 for ; Mon, 20 Mar 2006 09:31:05 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id E56B33B1C2E for ; Mon, 20 Mar 2006 09:31:04 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id B2137DC7A0 for ; Mon, 20 Mar 2006 06:31:02 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 20 Mar 2006 09:31:02 -0500 (EST) Message-ID: <60303.192.146.101.26.1142865062.squirrel@webmail.asofyet.org> In-Reply-To: <441E2E5C.8050007@ldap.or.id> References: <441B8229.8030708@ldap.or.id> <441B8C9A.9000305@ldap.or.id> <71D70D5D-A352-49D2-B0C6-20162D7EC5FA@asofyet.org> <441E2E5C.8050007@ldap.or.id> Date: Mon, 20 Mar 2006 09:31:02 -0500 (EST) 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=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: error dialog not centered X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 14:31:08 -0000 Beast wrote: > muppet wrote: >> >> On Mar 17, 2006, at 11:29 PM, Beast wrote: >> >>> But these 2 questions is still unanswered. >>> >>>>> 2. How to make the "OK" button centered (presently it right alignment)? >>>>> 3. How to remove the icon on the "OK" button? >> >> Don't. The alignment of buttons and contents of common buttons are >> things that should be taken care of by user themes and should conform to >> human interface guidelines for user interface consistency. >> >> If you have a *really* good argument for breaking that consistency, >> pitch it to us, and then maybe we'll tell you how. ;-) > > Hi muppet, > I'm porting MS Windows apps and I want it behaves and looks like what in > windows does. Porting MS Windows apps to Gtk2-Perl, or writing a Gtk2-Perl app that will run on Windows? This is really the sort of thing that a theme should take care of, especially if you want the same code to run unchanged on more than one platform. I would be rather annoyed by an application running on my Linux or Mac box that looked and behaved like a Windows app simply because it was ported from Windows. -- muppet From scott@asofyet.org Mon Mar 20 09:41:31 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ABEF63B2250 for ; Mon, 20 Mar 2006 09:41: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 31279-08 for ; Mon, 20 Mar 2006 09:41:30 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id 990423B09C6 for ; Mon, 20 Mar 2006 09:41:30 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id 926FFDC7B8 for ; Mon, 20 Mar 2006 06:41:29 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 20 Mar 2006 09:41:29 -0500 (EST) Message-ID: <50829.192.146.101.26.1142865689.squirrel@webmail.asofyet.org> In-Reply-To: <441EB257.3090702@student.ethz.ch> References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> <441A615B.1060204@tkk.fi> <441EB257.3090702@student.ethz.ch> Date: Mon, 20 Mar 2006 09:41:29 -0500 (EST) 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=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 14:41:31 -0000 Mario Ospelt wrote: > C:\usr\bin\perl.exe C:\usr\lib\ExtUtils/xsubpp -noprototypes > -typemap C: > \usr\lib\ExtUtils\typemap -typemap > C:\usr\site\lib\Gtk2-GladeXML\gladexmlperl.ty > pemap -typemap C:\usr\site\lib\Glib\Install\typemap -typemap > C:\usr\site\lib\Gtk > 2\Install\gtk2perl.typemap -typemap > C:\usr\site\lib\Gtk2\Install\gdk.typemap -ty > pemap C:\usr\site\lib\Gtk2\Install\gtk.typemap GladeXML.xs > > GladeXML.xsc && C: > \usr\bin\perl.exe -MExtUtils::Command -e mv GladeXML.xsc GladeXML.c > Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 94 > Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 95 > Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 103 > Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 104 char_ornull was added to Glib's typemap two years ago (17 March '04). I see Glib\Install\typemap in the xsubpp command --- does the file actually exist? Is the path correct? Does it contain "char_ornull"? -- muppet From scott@asofyet.org Mon Mar 20 09:46:44 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E505F3B2344 for ; Mon, 20 Mar 2006 09:46: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 31871-09 for ; Mon, 20 Mar 2006 09:46:41 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id DFEC93B2324 for ; Mon, 20 Mar 2006 09:46:35 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id 37E65DC7B4 for ; Mon, 20 Mar 2006 06:46:35 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 20 Mar 2006 09:46:35 -0500 (EST) Message-ID: <12262.192.146.101.26.1142865995.squirrel@webmail.asofyet.org> In-Reply-To: <441EBF54.4030703@mpibp-frankfurt.mpg.de> References: <20060316180403.1cf2c098@zentara.zentara.net> <1142599546.7230.4.camel@localhost.localdomain> <441EBF54.4030703@mpibp-frankfurt.mpg.de> Date: Mon, 20 Mar 2006 09:46:35 -0500 (EST) 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=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: setting line dash on Gnome2::Canvas X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 14:46:44 -0000 Remco Wouts wrote: > The following hack works for me: > > use Inline C => 'DATA'; > > Inline->init; > > .... > $canvasitem->set(dash=>main::pattern(0,10,5)); Well, look at that. I thought i'd checked GnomeCanvasShape's properties and found nothing, but apparently i just need more sleep. The problem, of course, is that a) the property is G_TYPE_POINTER, which is useless to bindings because it lacks type information, and b) the type of the structure being passed is ArtVpathDash, a libart type, which is unbound. We may have to come up with a special handler for this. It gets complicated because of the need to manage object lifetimes -- the Inline code you posted uses a static structure and therefore is neither threadsafe nor reentrant. -- muppet From mospelt@student.ethz.ch Mon Mar 20 10:17:20 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A94993B2346 for ; Mon, 20 Mar 2006 10:17: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 01799-05 for ; Mon, 20 Mar 2006 10:17:17 -0500 (EST) Received: from xsmtp1.ethz.ch (xsmtp1.ethz.ch [82.130.70.13]) by menubar.gnome.org (Postfix) with ESMTP id 13C0B3B2394 for ; Mon, 20 Mar 2006 10:17:16 -0500 (EST) Received: from xfe1.d.ethz.ch ([82.130.124.41]) by xsmtp1.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Mon, 20 Mar 2006 16:17:16 +0100 Received: from [192.168.100.113] ([217.173.228.89]) by xfe1.d.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Mon, 20 Mar 2006 16:17:15 +0100 Message-ID: <441EC77C.3070406@student.ethz.ch> Date: Mon, 20 Mar 2006 16:17:16 +0100 From: Mario Ospelt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: muppet References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> <441A615B.1060204@tkk.fi> <441EB257.3090702@student.ethz.ch> <50829.192.146.101.26.1142865689.squirrel@webmail.asofyet.org> In-Reply-To: <50829.192.146.101.26.1142865689.squirrel@webmail.asofyet.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Mar 2006 15:17:15.0413 (UTC) FILETIME=[5ECB5450:01C64C31] X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.504 tagged_above=-999 required=2 tests=[AWL=0.095, BAYES_00=-2.599] X-Spam-Score: -2.504 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 15:17:20 -0000 muppet schrieb: > Mario Ospelt wrote: > >> C:\usr\bin\perl.exe C:\usr\lib\ExtUtils/xsubpp -noprototypes >> -typemap C: >> \usr\lib\ExtUtils\typemap -typemap >> C:\usr\site\lib\Gtk2-GladeXML\gladexmlperl.ty >> pemap -typemap C:\usr\site\lib\Glib\Install\typemap -typemap >> C:\usr\site\lib\Gtk >> 2\Install\gtk2perl.typemap -typemap >> C:\usr\site\lib\Gtk2\Install\gdk.typemap -ty >> pemap C:\usr\site\lib\Gtk2\Install\gtk.typemap GladeXML.xs > >> GladeXML.xsc && C: >> \usr\bin\perl.exe -MExtUtils::Command -e mv GladeXML.xsc GladeXML.c >> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 94 >> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 95 >> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 103 >> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 104 >> > > char_ornull was added to Glib's typemap two years ago (17 March '04). I see > Glib\Install\typemap in the xsubpp command --- does the file actually exist? > Is the path correct? Does it contain "char_ornull"? > > The file exists in this path. It contains in a line: gchar_ornull * T_GCHAR_ORNULL Does that help you (or me)? From scott@asofyet.org Mon Mar 20 10:50:27 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 105E03B2335 for ; Mon, 20 Mar 2006 10:50:27 -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 04267-01 for ; Mon, 20 Mar 2006 10:50:25 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id BE9723B241D for ; Mon, 20 Mar 2006 10:50:25 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id F0BCCDC7F0 for ; Mon, 20 Mar 2006 07:50:24 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 20 Mar 2006 10:50:25 -0500 (EST) Message-ID: <30842.192.146.101.26.1142869825.squirrel@webmail.asofyet.org> In-Reply-To: <441EC77C.3070406@student.ethz.ch> References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> <441A615B.1060204@tkk.fi> <441EB257.3090702@student.ethz.ch> <50829.192.146.101.26.1142865689.squirrel@webmail.asofyet.org> <441EC77C.3070406@student.ethz.ch> Date: Mon, 20 Mar 2006 10:50:25 -0500 (EST) 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=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 15:50:27 -0000 Mario Ospelt wrote: > > > muppet schrieb: >> Mario Ospelt wrote: >> >>> C:\usr\bin\perl.exe C:\usr\lib\ExtUtils/xsubpp -noprototypes >>> -typemap C: >>> \usr\lib\ExtUtils\typemap -typemap >>> C:\usr\site\lib\Gtk2-GladeXML\gladexmlperl.ty >>> pemap -typemap C:\usr\site\lib\Glib\Install\typemap -typemap >>> C:\usr\site\lib\Gtk >>> 2\Install\gtk2perl.typemap -typemap >>> C:\usr\site\lib\Gtk2\Install\gdk.typemap -ty >>> pemap C:\usr\site\lib\Gtk2\Install\gtk.typemap GladeXML.xs > >>> GladeXML.xsc && C: >>> \usr\bin\perl.exe -MExtUtils::Command -e mv GladeXML.xsc GladeXML.c >>> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 94 >>> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 95 >>> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 103 >>> Error: 'const char_ornull *' not in typemap in GladeXML.xs, line 104 >>> >> >> char_ornull was added to Glib's typemap two years ago (17 March '04). I see >> Glib\Install\typemap in the xsubpp command --- does the file actually exist? >> Is the path correct? Does it contain "char_ornull"? >> >> > The file exists in this path. It contains in a line: gchar_ornull * > T_GCHAR_ORNULL > > Does that help you (or me)? It should *also* contain the two lines char_ornull * T_CHAR_ORNULL const char_ornull * T_CHAR_ORNULL They are different --- we use a convention that says "char" is ascii and "gchar" is uft8. -- muppet From szgezu@freemail.hu Mon Mar 20 11:21:45 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4E2663B0A48 for ; Mon, 20 Mar 2006 11:21: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 05933-03 for ; Mon, 20 Mar 2006 11:21:37 -0500 (EST) Received: from fmx10.freemail.hu (unknown [195.228.245.60]) by menubar.gnome.org (Postfix) with SMTP id 5D05E3B0768 for ; Mon, 20 Mar 2006 11:21:36 -0500 (EST) Received: (qmail 92873 invoked from network); 20 Mar 2006 17:23:30 +0100 Received: from fm09.freemail.hu (195.228.245.109) by fmx10.freemail.hu with SMTP; 20 Mar 2006 17:23:30 +0100 Received: (qmail 95544 invoked by uid 2492393); 20 Mar 2006 17:18:15 +0100 Date: Mon, 20 Mar 2006 17:18:15 +0100 (CET) From: =?ISO-8859-2?Q?Szab=F3_G=E9za?= To: gtk-perl-list@gnome.org Message-ID: X-Originating-IP: [194.88.55.211] X-HTTP-User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Freemail: message scanned X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.457 tagged_above=-999 required=2 tests=[AWL=0.065, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.457 X-Spam-Level: Subject: gtk/glext help needed X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 16:21:45 -0000 Dear All, I would like to use glext under Perl with the gtk2-glext module.=20 Unfortunately I have not found a ppm (if you know one please tell=20 me), but I tried to install it from source: =20 C:\Download\perl\Gtk2-GLExt-0.90>perl Makefile.pl Base class package "Glib::CodeGen" is empty. (Perhaps you need to 'use' the module which defines that package=20 first.) at C:/Perl/site/lib/Gtk2/CodeGen.pm line 7 BEGIN failed--compilation aborted at C:/Perl/site/lib/Gtk2/CodeGen.pm=20 line 7. Compilation failed in require at (eval 10) line 1. BEGIN failed--compilation aborted at (eval 10) line 1. =20 Warning: Guessing NAME [Gtk2-GLExt] from current directory name. loathe nmake. Writing Makefile for Gtk2-GLExt =20 If I try to install Glib from source: =20 C:\Download\perl\Glib-1.105>perl Makefile.PL Including ApiDoc pod... Deleting Glib::Object::_LazyLoader from doc.pl's $data Deleting Glib from doc.pl's $data *** can not find package gobject-2.0 >=3D 2.0.0 *** check that it is properly installed and available in=20 PKG_CONFIG_PATH at Makefile.PL line 87 I need it very much because actually I wrote my script on Linux where=20 glext worked fine, but I have to move the code to a win machine... Thanks a lot in advance! Regards, Geza Szabo=0A=0A___________________________________________________________= ______________=0ALimo-King Magyarorsz=E1g - Limuzinszolg=E1lat=0Ahttp://ad.= adverticum.net/b/cl,1,6022,87374,144118/click.prm=0A=0A From scott@asofyet.org Mon Mar 20 12:50:10 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 248F93B0FE2 for ; Mon, 20 Mar 2006 12:50: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 11083-03 for ; Mon, 20 Mar 2006 12:50:06 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id 64C3D3B0D58 for ; Mon, 20 Mar 2006 12:50:06 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id 8B3D9DC865 for ; Mon, 20 Mar 2006 09:50:05 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 20 Mar 2006 12:50:05 -0500 (EST) Message-ID: <10289.192.146.101.26.1142877005.squirrel@webmail.asofyet.org> In-Reply-To: References: Date: Mon, 20 Mar 2006 12:50:05 -0500 (EST) 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=-2.527 tagged_above=-999 required=2 tests=[AWL=-0.005, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.527 X-Spam-Level: Subject: Re: gtk/glext help needed X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 17:50:10 -0000 Szabó Géza wrote: > > Dear All, > I would like to use glext under Perl with the gtk2-glext module. > Unfortunately I have not found a ppm (if you know one please tell > me), but I tried to install it from source: > > C:\Download\perl\Gtk2-GLExt-0.90>perl Makefile.pl > Base class package "Glib::CodeGen" is empty. > (Perhaps you need to 'use' the module which defines that package > first.) > at C:/Perl/site/lib/Gtk2/CodeGen.pm line 7 The Glib perl module is not installed, cannot be found, or is too old. Since it *did* find Gtk2::CodeGen, and it knows that Gtk2::CodeGen depends on Glib::CodeGen, i'd say that your Glib module is too old. > If I try to install Glib from source: This shouldn't be necessary -- just get the Glib PPM whose version matches the Gtk2 one you have installed. > *** can not find package gobject-2.0 >= 2.0.0 > *** check that it is properly installed and available in > PKG_CONFIG_PATH > at Makefile.PL line 87 You need to have the corresponding C libraries and executables, and their dependencies, installed. There are PPM binaries of Glib and Gtk2 available at http://gtk2-perl.sf.net/win32/ppm/ , but these packages include only the perl extensions --- you must install glib and gtk+ separately. The same will go for Gtk2::GLExt --- the gtk-glext C library must be installed and functioning properly or you'll be wasting your time with the perl stuff. -- muppet From scott@asofyet.org Mon Mar 20 12:55:23 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E68F33B0F8E for ; Mon, 20 Mar 2006 12:55: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 11328-03 for ; Mon, 20 Mar 2006 12:55:22 -0500 (EST) Received: from webmail2.sd.dreamhost.com (webmail2.sd.dreamhost.com [66.33.201.157]) by menubar.gnome.org (Postfix) with ESMTP id 030073B0BA6 for ; Mon, 20 Mar 2006 12:55:21 -0500 (EST) Received: from webmail.asofyet.org (localhost [127.0.0.1]) by webmail2.sd.dreamhost.com (Postfix) with ESMTP id 21B28DC873 for ; Mon, 20 Mar 2006 09:55:21 -0800 (PST) Received: from 192.146.101.26 (SquirrelMail authenticated user scott@asofyet.org) by webmail.asofyet.org with HTTP; Mon, 20 Mar 2006 12:55:21 -0500 (EST) Message-ID: <46268.192.146.101.26.1142877321.squirrel@webmail.asofyet.org> In-Reply-To: <441EB257.3090702@student.ethz.ch> References: <4414D31B.3040701@gmail.com> <44199C24.9060004@tkk.fi> <441A615B.1060204@tkk.fi> <441EB257.3090702@student.ethz.ch> Date: Mon, 20 Mar 2006 12:55:21 -0500 (EST) 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=-2.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: GTK2, XML, perl X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 17:55:23 -0000 Mario Ospelt wrote: > Hello, > > I followed this thread and it was very interesting. I wanted to use this > Gtk2::GladeXML package too and downloaded it from cpan. There was no ppm > package, as I need it also for windows. Therefore I wanted to install it > manually with nmake. Er, there is, indeed, a PPM package... http://gtk2-perl.sourceforge.net/win32/ppm/ http://gtk2-perl.sourceforge.net/win32/ppm/Gtk2-GladeXML.ppd which is a symlink to http://gtk2-perl.sourceforge.net/win32/ppm/Gtk2-GladeXML-1.005.ppd -- muppet From ari.jolma@tkk.fi Mon Mar 20 16:00:15 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E6B843B2930 for ; Mon, 20 Mar 2006 16:00: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 21751-03 for ; Mon, 20 Mar 2006 16:00:13 -0500 (EST) Received: from pne-smtpout4-sn1.fre.skanova.net (pne-smtpout4-sn1.fre.skanova.net [81.228.11.168]) by menubar.gnome.org (Postfix) with ESMTP id 5BEE83B291D for ; Mon, 20 Mar 2006 16:00:12 -0500 (EST) Received: from [192.168.3.13] (80.221.67.212) by pne-smtpout4-sn1.fre.skanova.net (7.2.070) id 43CBBB29004675BA for gtk-perl-list@gnome.org; Mon, 20 Mar 2006 22:00:11 +0100 Message-ID: <441F17A3.9040509@tkk.fi> Date: Mon, 20 Mar 2006 22:59:15 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> <4419A4DB.4080709@tkk.fi> <8841.192.146.101.26.1142540753.squirrel@webmail.asofyet.org> In-Reply-To: <8841.192.146.101.26.1142540753.squirrel@webmail.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=-2.563 tagged_above=-999 required=2 tests=[AWL=0.036, BAYES_00=-2.599] X-Spam-Score: -2.563 X-Spam-Level: Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 21:00:15 -0000 muppet wrote: >Ari Jolma wrote: > > >>looking at process info, it seems that X is piling up memory, the code >> $self->{pixmap} = $self->{pixbuf}->render_pixmap_and_mask; >> $self->{image}->set_from_pixmap($self->{pixmap}); >> >> I've still seem to have a problem with this. I did a bit of research and it seems that GtkImage's set_from_pixmap increases the ref_count of the pixmap, thus the pixmap ends up with two ref_count two (I build NOISY Glib to confirm this) and thus X does not free its memory. Is there a way to unset the pixmap from the image or force the destroying of the pixmap? Recreating the image at this point in code does not work right away. Ari From rajyalakshmi.racharla@gmail.com Mon Mar 20 00:13:31 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9E3773B06B1 for ; Mon, 20 Mar 2006 00:13: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 32166-05 for ; Mon, 20 Mar 2006 00:13:29 -0500 (EST) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by menubar.gnome.org (Postfix) with ESMTP id 11D463B09BE for ; Mon, 20 Mar 2006 00:13:24 -0500 (EST) Received: by wproxy.gmail.com with SMTP id i27so1028416wra for ; Sun, 19 Mar 2006 21:13:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=iW0mhRMM8zHtgXKp/noUfndUmJyOX/FSymOZRCkWf2JAjAd5LjaAjCFphnIwE+eRUbqg+CpDI16+bX0/jQLl4TfvGuyRRei2MFQeqxAmpreWbQGaAzM/gC9LmaH2u/U5O5Ro/4rPZbc2xoAS14er/8B8l2XIe1Wtsbqoh1QLjLo= Received: by 10.65.251.8 with SMTP id d8mr539370qbs; Sun, 19 Mar 2006 21:13:23 -0800 (PST) Received: by 10.65.224.14 with HTTP; Sun, 19 Mar 2006 21:13:22 -0800 (PST) Message-ID: Date: Mon, 20 Mar 2006 10:43:22 +0530 From: Raji To: gtk2-perl-list@gnome.org, gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7625_11584402.1142831602989" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.226 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, SPF_PASS=-0.001, USERPASS=1.373] X-Spam-Score: -1.226 X-Spam-Level: X-Mailman-Approved-At: Mon, 20 Mar 2006 17:09:19 -0500 Cc: Subject: is it a thread problem? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 05:13:31 -0000 ------=_Part_7625_11584402.1142831602989 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Iam using threads in gtk2.My application is doing transfer files(IO::Ftp) with progressbars updation using threads. But it is showing error as Thread failed to start:Gdk-ERROR assertion faile= d and Could not read memory at progressbar6->set_fraction($totalpercent)in my code. Can any one suggest that how to solve this problem. Here iam giving part of my code. split_file is another subroutine which splits the file into 5 parts. sub on_btnAddToXfer_clicked { my $filename =3D get_selected_file; my $model =3D $lstXferQ->get_model; my $new_iter =3D $model->append; $model->set($new_iter, 0 =3D> $filename); print "File is $filename\n"; my $data =3D get_story_data_from_widgets; $fnames{$filename} =3D $data; $thread =3D new threads(\&get_value,$filename) unless (defined($thread)); } sub transfer_file { my $arrayref =3D shift; my $filename =3D @$arrayref[0]; my $count =3D @$arrayref[1]; print "FILE IS : $filename\n"; my $file_size =3D -s $filename; my $org_file; #Taking only filename from the path if($filename =3D~ /([A-Za-z0-9_-]*\.mpg)$/) { $org_file =3D $1; } open(FD,"$filename") or die "cannot open file: $!"; binmode(FD); my $completed; my $ftp=3DIO::Ftp->new(">","//user: usr1234\@callista.ueltv.org/squick/$org_file",TYPE=3D>'i'); my $n; my $buffer; while($n =3D read(FD,$buffer,4*1024*1024)) { $ftp->send($buffer); $completed +=3D $n; print "C is $completed\n"; $finished +=3D $n; print "F is : $finished\n"; # % xferred my $percent =3D $completed / $file_size; $progressbar[$count]->set_fraction($percent); #~ my $totalpercent =3D $finished / $totalfilesize; #~ print "Total is $totalpercent\n"; #~ if($totalpercent <=3D 1) #~ { #~ $progressbar6->set_fraction($totalpercent); #~ } undef($buffer); if($ftp_die =3D=3D 1) { $ftp->close; $ftp->delete($filename); unlink($filename); &clear_progressbars; print "File deleted\n"; return; } } if($finished =3D=3D $totalfilesize )#or $finished !=3D $totalfilesize= ) { sleep(1); $finished =3D 0; print "cleared\n"; &clear_progressbars; } close(FD); # Deleting temporary files from the Directory unlink($filename); } sub get_value { print "Monitoring...\n"; while(1) { next unless (defined($list)); my $iter =3D $list->get_iter_first; my $filename =3D $list->get($iter, 0) if defined($iter); if($is_filexfer =3D=3D1) { my $totalpercent =3D $finished / $totalfilesize; print "Total is $totalpercent\n"; if($totalpercent > 1) { print "total exceeds one\n"; $totalpercent =3D 1; } if($totalpercent <=3D 1) { $progressbar6->set_fraction($totalpercent); } if($totalpercent >=3D 1) { $is_filexfer =3D 0 ; sleep(1); } } if($is_filexfer =3D=3D 0) { next unless(defined($filename)); print"File name is : $filename\n"; print "Splitting file...\n"; my $filenames_ref =3D split_file($filename); my @filenames =3D @$filenames_ref; $count =3D 0; $finished =3D 0; foreach (@filenames) { print "Transferring $_ ...\n"; transfer_file_cb($_,$count); $is_filexfer =3D 1 ; $count++; } sleep(2); $list->remove($iter) if defined($iter); } } } sub transfer_file_cb { my $thread =3D new threads(\&transfer_file,\@_); push (@threads, $thread); } # wait for the children to finish... foreach (@threads) { $_->join; } ------=_Part_7625_11584402.1142831602989 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Iam using threads in gtk2.My application is doing transfer files(IO::Ftp) w= ith progressbars updation using threads.
But it is showing error as Thread failed to start:Gdk-ERROR assertion failed and Could not read memory at progressbar6->set_fraction($totalpercent)in my code.


Can any one suggest that how to solve this problem. Here iam giving part of my code. split_file is another subroutine which splits the file into 5 parts.



sub on_btnAddToXfer_clicked
{
     my $filename =3D get_selected_file;
     my $model =3D $lstXferQ->get_model;
     my $new_iter =3D $model->append;
     $model->set($new_iter, 0 =3D> $filename);      print "File is $filename\n";
     my $data =3D get_story_data_from_widgets;
     $fnames{$filename} =3D $data;

     $thread =3D new threads(\&get_value,$filename)= unless (defined($thread)); 
}   


sub transfer_file
{
    my $arrayref =3D shift;
    my $filename =3D @$arrayref[0];
    my $count =3D @$arrayref[1];
    print "FILE IS : $filename\n";
    my $file_size =3D -s $filename;
    my $org_file;
           
    #Taking only filename from the path
    if($filename =3D~ /([A-Za-z0-9_-]*\.mpg)$/)
    {
        $org_file =3D $1;            =             &nb= sp;            =             &nb= sp;            =             &nb= sp;     
    }
    open(FD,"$filename") or die "cannot open = file: $!";
    binmode(FD);
    my $completed;
    my $ftp=3DIO::Ftp->new(">","//user:= usr1234\@ca= llista.ueltv.org/squick/$org_file",TYPE=3D>'i');
    my $n;
    my $buffer;
    while($n =3D read(FD,$buffer,4*1024*1024))
    {
      $ftp->send($buffer);   &nb= sp; 
      $completed +=3D $n;
      print "C is $completed\n";
      $finished +=3D $n;
      print "F is : $finished\n"; &= nbsp;   
      # % xferred
      my $percent =3D $completed / $file_size;       $progressbar[$count]->set_fraction($perce= nt);
      #~ my $totalpercent =3D $finished / $totalfi= lesize;
      #~ print "Total is $totalpercent\n"= ;;
      #~ if($totalpercent <=3D 1)
      #~ {
         #~ $progressbar6->set_f= raction($totalpercent);
      #~ }
      undef($buffer);
      if($ftp_die =3D=3D 1)
      {
        $ftp->close;
        $ftp->delete($filename);
        unlink($filename);  &n= bsp;  
        &clear_progressbars;
        print "File deleted\n"= ;
        return;
      }
     }
      if($finished =3D=3D $totalfilesize )#or $fin= ished !=3D $totalfilesize)
      {
          sleep(1);
          $finished =3D 0;
          print "cleared\= n";
          &clear_progressb= ars;
      }
      close(FD);
      # Deleting temporary files from the Director= y
      unlink($filename);
}     

sub get_value
{   
     print "Monitoring...\n";
     while(1)
     {
      next unless (defined($list));
      my $iter =3D $list->get_iter_first;
      my $filename =3D $list->get($iter, 0) if = defined($iter);
      if($is_filexfer =3D=3D1)
      {
           my $totalperce= nt =3D $finished / $totalfilesize;
           print "To= tal is $totalpercent\n";
           if($totalperce= nt > 1)
           {
            &nb= sp;  print "total exceeds one\n";
            &nb= sp;  $totalpercent =3D 1;
           }   =
           if($totalperce= nt <=3D 1)
           {
            $progres= sbar6->set_fraction($totalpercent);
           }
           if($totalperce= nt >=3D 1)
           {
            &nb= sp;  $is_filexfer =3D 0 ;
            &nb= sp;  sleep(1);
           }
      }
       if($is_filexfer =3D=3D 0)
       {
      next unless(defined($filename));  =   
      print"File name is : $filename\n";=
      print "Splitting file...\n";
      my $filenames_ref =3D split_file($filename);=
       my @filenames =3D @$filenames_ref;
       $count =3D 0;
       $finished =3D 0;
       foreach (@filenames)          &nb= sp;            =             &nb= sp;          
       {     
        print "Transferring $_ ...\= n";
        transfer_file_cb($_,$count);
        $is_filexfer =3D 1 ;
        $count++;
       }
      sleep(2);
      $list->remove($iter) if defined($iter);       }
    } 
}
sub transfer_file_cb
{
      my $thread =3D new threads(\&transfer_fi= le,\@_);
      push (@threads, $thread);
}    
   
 # wait for the children to finish...
foreach (@threads)
{
      $_->join;
           



------=_Part_7625_11584402.1142831602989-- From ari.jolma@tkk.fi Mon Mar 20 17:32:16 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 24D183B0D64 for ; Mon, 20 Mar 2006 17:32: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 26962-08 for ; Mon, 20 Mar 2006 17:32:14 -0500 (EST) Received: from pne-smtpout3-sn1.fre.skanova.net (pne-smtpout3-sn1.fre.skanova.net [81.228.11.120]) by menubar.gnome.org (Postfix) with ESMTP id 6DECE3B0DB2 for ; Mon, 20 Mar 2006 17:32:14 -0500 (EST) Received: from [192.168.3.13] (80.221.67.212) by pne-smtpout3-sn1.fre.skanova.net (7.2.070) id 43CE0B39002C1646; Mon, 20 Mar 2006 23:32:12 +0100 Message-ID: <441F2D35.8030605@tkk.fi> Date: Tue, 21 Mar 2006 00:31:17 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ari Jolma References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> <4419A4DB.4080709@tkk.fi> <8841.192.146.101.26.1142540753.squirrel@webmail.asofyet.org> <441F17A3.9040509@tkk.fi> In-Reply-To: <441F17A3.9040509@tkk.fi> 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.525 tagged_above=-999 required=2 tests=[AWL=-0.003, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.525 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 22:32:16 -0000 Ari Jolma wrote: >> >>> looking at process info, it seems that X is piling up memory, the code >>> $self->{pixmap} = $self->{pixbuf}->render_pixmap_and_mask; >>> $self->{image}->set_from_pixmap($self->{pixmap}); >>> >> > > I've still seem to have a problem with this. I did a bit of research > and it seems that GtkImage's set_from_pixmap increases the ref_count > of the pixmap, thus the pixmap ends up with two ref_count two (I build > NOISY Glib to confirm this) and thus X does not free its memory. > > Is there a way to unset the pixmap from the image or force the > destroying of the pixmap? Recreating the image at this point in code > does not work right away. Sorry for flooding. I tested a simple xs function which is essentially this: while (object->ref_count > 1) { g_object_unref (object); } which I call with pixmap once I'm sure it is not used any more (after new one is created and set to the image). The while is needed because set_from_pixmap might be called several times to refresh the image on the screen. After using this the X server does not pile up memory any more. I could not find any example where pixmap is used this way as an offscreen drawable. > > Ari > > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list From dan@entropy.homelinux.org Mon Mar 20 17:50:06 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2CAB33B2A64 for ; Mon, 20 Mar 2006 17:50: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 28134-04 for ; Mon, 20 Mar 2006 17:50: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 681DF3B29D7 for ; Mon, 20 Mar 2006 17:50:03 -0500 (EST) Received: from [10.146.1.200] (metabox.nusconsulting.com.au [10.146.1.200]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k2KMoNLx023993 for ; Tue, 21 Mar 2006 09:50:46 +1100 Message-ID: <441F4852.2080103@entropy.homelinux.org> Date: Tue, 21 Mar 2006 11:26:58 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060303) MIME-Version: 1.0 To: gtk-perl-list@gnome.org X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.0017 (Score -0.5) X-Canit-Stats-ID: 404992 - 7dba394c6103 (trained as not-spam) X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=404992&m=7dba394c6103 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=404992&m=7dba394c6103 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=404992&m=7dba394c6103 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.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Which version of what for Win32 at the moment? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 22:50:06 -0000 Hi all. I'm preparing to do an install for a customer on a Windows system. ActiveState Perl 5.8.8 is out. Will this work with the latest Gtk2-Perl bindings available for Windows ( Gtk2-1080.ppd )? Or should I use ActiveState Perl 5.8.7? Dan From dan@entropy.homelinux.org Mon Mar 20 19:26:47 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 5C01C3B073D for ; Mon, 20 Mar 2006 19:26: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 32268-06 for ; Mon, 20 Mar 2006 19:26:45 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id 74D2D3B068D for ; Mon, 20 Mar 2006 19:26:44 -0500 (EST) Received: from [10.146.1.200] (metabox.nusconsulting.com.au [10.146.1.200]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k2L0QvjI028860 for ; Tue, 21 Mar 2006 11:27:28 +1100 Message-ID: <441F5EF4.2040804@entropy.homelinux.org> Date: Tue, 21 Mar 2006 13:03:32 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060303) MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441F4852.2080103@entropy.homelinux.org> In-Reply-To: <441F4852.2080103@entropy.homelinux.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.0001 (Score -0.5) X-Canit-Stats-ID: 405086 - c54c1a6f5216 (trained as not-spam) X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=405086&m=c54c1a6f5216 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=405086&m=c54c1a6f5216 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=405086&m=c54c1a6f5216 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.565 tagged_above=-999 required=2 tests=[AWL=0.034, BAYES_00=-2.599] X-Spam-Score: -2.565 X-Spam-Level: Subject: Re: Which version of what for Win32 at the moment? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 00:26:47 -0000 Daniel Kasak wrote: > Hi all. > > I'm preparing to do an install for a customer on a Windows system. > ActiveState Perl 5.8.8 is out. Will this work with the latest Gtk2-Perl > bindings available for Windows ( Gtk2-1080.ppd )? Or should I use > ActiveState Perl 5.8.7? Never mind. 5.8.8 doesn't work with this version of Gtk2 on Windows either. Back to 5.8.7. Dan From scott@asofyet.org Mon Mar 20 20:04:06 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4C70D3B08AB for ; Mon, 20 Mar 2006 20:04: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 01203-07 for ; Mon, 20 Mar 2006 20:04:05 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id DA2063B08A4 for ; Mon, 20 Mar 2006 20:04:04 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id B3A41A80A9 for ; Mon, 20 Mar 2006 17:04:03 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <441F17A3.9040509@tkk.fi> References: <441726BD.8050303@tkk.fi> <90BE6960-B8C4-41CA-9714-8DDF902E109D@asofyet.org> <4419A4DB.4080709@tkk.fi> <8841.192.146.101.26.1142540753.squirrel@webmail.asofyet.org> <441F17A3.9040509@tkk.fi> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1F047CFD-6243-49FD-932F-7871308DC468@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Mon, 20 Mar 2006 20:04:01 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.564 tagged_above=-999 required=2 tests=[AWL=0.035, BAYES_00=-2.599] X-Spam-Score: -2.564 X-Spam-Level: Subject: Re: Correct use of pixbuf, pixmap, and image? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 01:04:06 -0000 On Mar 20, 2006, at 3:59 PM, Ari Jolma wrote: > muppet wrote: > >> Ari Jolma wrote: >> >>> looking at process info, it seems that X is piling up memory, the >>> code >>> $self->{pixmap} = $self->{pixbuf}->render_pixmap_and_mask; >>> $self->{image}->set_from_pixmap($self->{pixmap}); >>> > > I've still seem to have a problem with this. I did a bit of > research and it seems that GtkImage's set_from_pixmap increases the > ref_count of the pixmap, thus the pixmap ends up with two ref_count > two (I build NOISY Glib to confirm this) and thus X does not free > its memory. Yes. Because there's one reference owned by the GtkImage and another owned by the perl scalar wrapper, which is held by the $self instance hash. The pixmap will not be freed until *both* of these references are released. > Is there a way to unset the pixmap from the image or force the > destroying of the pixmap? Recreating the image at this point in > code does not work right away. You can unset the GtkImage with $self->{image}->set_from_pixbuf (undef, undef); but you'll still need to release the pixmap from $self with $self->{pixmap} = undef; or delete $self->{pixmap}; -- Examples really shouldn't include unexploded ordnance. -- Joe Smith, referring to an example program i wrote. From scott@asofyet.org Mon Mar 20 21:33:02 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B52DF3B0BA0 for ; Mon, 20 Mar 2006 21:33: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 04944-05 for ; Mon, 20 Mar 2006 21:33:01 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id 4DB733B09E0 for ; Mon, 20 Mar 2006 21:33:01 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id 12FA3A80A9; Mon, 20 Mar 2006 18:32:59 -0800 (PST) In-Reply-To: <441DD630.7090202@vtlink.net> References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> Mime-Version: 1.0 (Apple Message framework v746.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Mon, 20 Mar 2006 21:32:58 -0500 To: James Muir X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.525 tagged_above=-999 required=2 tests=[AWL=-0.003, BAYES_00=-2.599, TW_BG=0.077] X-Spam-Score: -2.525 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 02:33:02 -0000 On Mar 19, 2006, at 5:07 PM, James Muir wrote: > I apologize for the posting error. In my attempt to get to the > essence of the problem I went too far. Here's the simple example > with the $self->{$param_name} = $newval in place. Now the get -- > still -- fails, though I wouldn't have expected it to do so. If I > uncomment the GET_PROPERTY in the example below all is well, but I > would have expected the example below to work without it. > > I'm using libgnomecanvas 2.10.2 and Gtk+2 2.8.11 > > Thanks for any help you can offer on this matter. Jaap Karssenberg > has reported problems to me with the software I sent him after he > upgraded his machine. So it's not just me that's having troubles > after an upgrade. I'm trying to understand what's going wrong so I > can fix this problem. What upgrade was it? Was glib-2.0 upgraded without rebuilding Glib? There was a rash of "bugs" recently related to botched upgrades... I can't reproduce this. I've tried - Gnome2::Canvas 1.002. - libgnomecanvas 2.6.0 - libgnomecanvas 2.11.1 - Glib 1.105 - Glib 1.120 - glib 2.4.8 - glib 2.10.2 -- I don't have a drinking problem, 'cept when i can't get drink. -- Tom Waits From hemlock@vtlink.net Mon Mar 20 22:18:23 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A42663B0B60 for ; Mon, 20 Mar 2006 22:18:23 -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 07009-01 for ; Mon, 20 Mar 2006 22:18:19 -0500 (EST) Received: from mail2.vtlink.com (srs.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id 8DE313B0904 for ; Mon, 20 Mar 2006 22:18:18 -0500 (EST) Received: (qmail 13417 invoked by uid 5142); 21 Mar 2006 03:18:14 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(64.30.33.156):. Processed in 1.840274 secs); 21 Mar 2006 03:18:14 -0000 Received: from unknown (HELO ?10.0.1.3?) (hemlock@64.30.33.156) by mail2.vtlink.com with ESMTPA; 20 Mar 2006 22:18:12 -0500 Message-ID: <441F7086.9000003@vtlink.net> Date: Mon, 20 Mar 2006 22:18:30 -0500 From: James Muir User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> In-Reply-To: <549FD574-E8C7-4FEC-8266-859E2B562383@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=-2.506 tagged_above=-999 required=2 tests=[AWL=0.017, BAYES_00=-2.599, SPF_PASS=-0.001, TW_BG=0.077] X-Spam-Score: -2.506 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 03:18:23 -0000 muppet wrote: > > On Mar 19, 2006, at 5:07 PM, James Muir wrote: > >> I apologize for the posting error. In my attempt to get to the >> essence of the problem I went too far. Here's the simple example with >> the $self->{$param_name} = $newval in place. Now the get -- still -- >> fails, though I wouldn't have expected it to do so. If I uncomment >> the GET_PROPERTY in the example below all is well, but I would have >> expected the example below to work without it. >> >> I'm using libgnomecanvas 2.10.2 and Gtk+2 2.8.11 >> >> Thanks for any help you can offer on this matter. Jaap Karssenberg >> has reported problems to me with the software I sent him after he >> upgraded his machine. So it's not just me that's having troubles >> after an upgrade. I'm trying to understand what's going wrong so I >> can fix this problem. > > What upgrade was it? Was glib-2.0 upgraded without rebuilding Glib? > There was a rash of "bugs" recently related to botched upgrades... > > I can't reproduce this. I've tried > > - Gnome2::Canvas 1.002. > - libgnomecanvas 2.6.0 > - libgnomecanvas 2.11.1 > > - Glib 1.105 > - Glib 1.120 > - glib 2.4.8 > - glib 2.10.2 Another error in communication on my part. I performed a clean install of Zenwalk 2.2. I tried inserting the default GET_PROPERTY into the modules that use Glib::Object::Subclass and I got further. Some objects were displayed on the canvas, but I'm now getting: *** unhandled exception in callback: *** Can't locate object method "get_default_value" via package "Glib::Param::Boxed" at ../lib/Gtk2/Ex/MindMapView/Item.pm line 227. *** ignoring at example4.pl line 68. and also I ran the Glib and Gtk2 regression tests. It looks to me like the "f.t" Glib test is confirming that I have problem with Glib::Object::Subclass. Maybe you can make more of it. Here's the Glib test results: t/1........................ok t/2........................ok t/3........................ok t/4........................ok t/5........................ok t/6........................ok t/7........................ok t/8........................ok t/9........................ok t/a........................ok t/b........................ok t/c........................ok t/d........................ok t/e........................ok t/f........................ # Failed test 'and they have values' # in t/f.t at line 111. # Structures begin differing at: # $got->[0] = undef # $expected->[0] = 'Joe' # Failed test 'and they have values' # in t/f.t at line 168. # Structures begin differing at: # $got->[0] = undef # $expected->[0] = 'Joe' # Looks like you failed 2 tests of 42. dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 13, 42 Failed 2/42 tests, 95.24% okay t/filename.................ok t/g........................ok t/signal_emission_hooks....ok t/signal_query.............ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/f.t 2 512 42 2 4.76% 13 42 Failed 1/19 test scripts, 94.74% okay. 2/659 subtests failed, 99.70% okay. and here's the Gtk2 tests: t/00.Gtk2....................ok t/01.GtkWindow...............ok t/02.GtkContainer............ok t/Gdk........................ok t/GdkColor...................ok t/GdkCursor..................ok t/GdkDisplay.................ok t/GdkDisplayManager..........ok t/GdkDnd.....................ok 1/20 unexpectedly succeeded t/GdkDrawable................ok 1/11 skipped: get_image returned undef, skipping draw_image t/GdkEvent...................ok t/GdkGC......................ok t/GdkInput...................ok t/GdkKeys....................ok t/GdkPango...................ok t/GdkPixbuf..................ok t/GdkPixbufLoader............ok t/GdkPixmap..................ok t/GdkProperty................ok t/GdkRegion..................ok t/GdkRgb.....................ok t/GdkScreen..................ok t/GdkSelection...............ok t/GdkVisual..................ok t/GdkWindow..................ok t/GdkX11.....................ok t/GtkAboutDialog.............GLib-GObject-CRITICAL **: g_boxed_copy: assertion `src_boxed != NULL' failed at t/GtkAboutDialog.t line 121. GLib-GObject-CRITICAL **: g_boxed_copy: assertion `src_boxed != NULL' failed at t/GtkAboutDialog.t line 124. ok t/GtkAccelGroup..............ok t/GtkAccelLabel..............ok t/GtkAccelMap................ok t/GtkAction..................ok t/GtkActionGroup.............ok t/GtkAdjustment..............ok t/GtkAlignment...............ok t/GtkArrow...................ok t/GtkAspectFrame.............ok t/GtkBin.....................ok t/GtkBox.....................ok t/GtkButton..................ok t/GtkButtonBox...............ok t/GtkCalendar................ok t/GtkCellEditable............ok t/GtkCellLayout..............ok t/GtkCellRenderer............ok t/GtkCellRendererCombo.......ok t/GtkCellRendererPixbuf......ok t/GtkCellRendererProgress....ok t/GtkCellRendererText........ok t/GtkCellRendererToggle......ok t/GtkCellView................ok t/GtkCheckButton.............ok t/GtkCheckMenuItem...........ok t/GtkClipboard...............ok t/GtkColorButton.............ok t/GtkColorSelection..........ok t/GtkColorSelectionDialog....ok t/GtkCombo...................ok t/GtkComboBox................ok t/GtkComboBoxEntry...........ok t/GtkCurve...................ok t/GtkDialog..................ok t/GtkDnd.....................ok t/GtkDrawingArea.............ok t/GtkEditable................ok t/GtkEntry...................ok t/GtkEntryCompletion.........ok t/GtkEventBox................ok t/GtkExpander................ok t/GtkFileChooser.............Gtk-WARNING **: Could not find the icon 'application-x-troff'. The 'hicolor' theme was not found either, perhaps you need to install it. You can get a copy from: http://icon-theme.freedesktop.org/releases at /usr/lib/perl5/site_perl/5.8.8/i486-linux/Gtk2/TestHelper.pm line 80. ok 9/44 unexpectedly succeeded t/GtkFileChooserButton.......Gtk-WARNING **: Could not find the icon 'stock_unknown'. The 'hicolor' theme was not found either, perhaps you need to install it. You can get a copy from: http://icon-theme.freedesktop.org/releases at t/GtkFileChooserButton.t line 13. dubious Test returned status 0 (wstat 11, 0xb) DIED. FAILED tests 1-8 Failed 8/8 tests, 0.00% okay t/GtkFileChooserDialog.......ok t/GtkFileChooserWidget.......ok t/GtkFileFilter..............ok t/GtkFileSelection...........ok t/GtkFixed...................ok t/GtkFontButton..............ok t/GtkFontSelection...........ok t/GtkFrame...................ok t/GtkGC......................ok t/GtkGammaCurve..............ok t/GtkHBox....................ok t/GtkHButtonBox..............ok t/GtkHPaned..................ok t/GtkHRuler..................ok t/GtkHScale..................ok t/GtkHScrollbar..............ok t/GtkHSeparator..............ok t/GtkHandleBox...............ok t/GtkIconFactory.............ok t/GtkIconTheme...............Gtk-WARNING **: Could not find the icon 'stock_edit'. The 'hicolor' theme was not found either, perhaps you need to install it. You can get a copy from: http://icon-theme.freedesktop.org/releases at t/GtkIconTheme.t line 24. ok 6/16 skipped: various reasons t/GtkIconView................ok t/GtkImage...................ok t/GtkImageMenuItem...........ok t/GtkInputDialog.............ok t/GtkInvisible...............ok t/GtkItemFactory.............ok t/GtkLabel...................ok t/GtkLayout..................ok t/GtkListStore...............ok t/GtkMenu....................ok t/GtkMenuBar.................ok t/GtkMenuItem................ok t/GtkMenuShell...............ok t/GtkMenuToolButton..........ok t/GtkMessageDialog...........ok t/GtkMisc....................ok t/GtkNotebook................ok t/GtkObject..................ok t/GtkOptionMenu..............ok t/GtkPaned...................ok 54/59 unexpectedly succeeded t/GtkProgressBar.............ok t/GtkRadioAction.............ok t/GtkRadioButton.............ok t/GtkRadioMenuItem...........ok t/GtkRadioToolButton.........ok t/GtkRange...................ok t/GtkRc......................ok t/GtkRuler...................ok t/GtkScale...................ok t/GtkScrolledWindow..........ok t/GtkSelection...............ok t/GtkSeparatorMenuItem.......ok t/GtkSeparatorToolItem.......ok t/GtkSimpleList..............ok t/GtkSimpleMenu..............ok t/GtkSizeGroup...............ok t/GtkSocket-GtkPlug..........ok t/GtkSpinButton..............ok t/GtkStatusBar...............ok t/GtkStock...................ok t/GtkStyle...................ok t/GtkTable...................ok t/GtkTearoffMenuItem.........ok t/GtkTextBuffer..............ok t/GtkTextChildAnchor.........ok t/GtkTextIter................ok t/GtkTextMark................ok t/GtkTextTag.................ok t/GtkTextTagTable............ok t/GtkTextView................ok t/GtkToggleAction............ok t/GtkToggleButton............ok t/GtkToggleToolButton........ok t/GtkToolButton..............ok t/GtkToolItem................ok t/GtkToolbar.................ok t/GtkTooltips................ok t/GtkTreeModel...............ok t/GtkTreeModelFilter.........ok t/GtkTreeModelIface..........ok t/GtkTreeModelSort...........ok t/GtkTreeSelection...........ok t/GtkTreeSortable............ok t/GtkTreeStore...............ok t/GtkTreeView-Dnd............skipped all skipped: how do we simulate a drag t/GtkTreeView................dubious Test returned status 0 (wstat 11, 0xb) DIED. FAILED tests 112-137 Failed 26/137 tests, 81.02% okay t/GtkUIManager...............ok t/GtkVBox....................ok t/GtkVButtonBox..............ok t/GtkVPaned..................ok t/GtkVRuler..................ok t/GtkVScale..................ok t/GtkVScrollbar..............ok t/GtkVSeparator..............ok t/GtkViewport................ok t/GtkWidget..................ok t/PangoAttributes............ok t/PangoContext...............ok t/PangoFont..................ok t/PangoFontMap...............ok t/PangoFontset...............ok t/PangoLayout................ok t/PangoRenderer..............ok t/PangoScript................ok t/PangoTabs..................ok t/PangoTypes.................ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/GtkFileChooserButton.t 0 11 8 16 200.00% 1-8 t/GtkTreeView.t 0 11 137 52 37.96% 112-137 (64 subtests UNEXPECTEDLY SUCCEEDED), 1 test and 7 subtests skipped. Failed 2/176 test scripts, 98.86% okay. 34/3517 subtests failed, 99.03% okay. Any suggestions on how to proceed with debugging this problem would be appreciated. -James From zentara1@sbcglobal.net Tue Mar 21 06:56:59 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2FBCA3B2B95 for ; Tue, 21 Mar 2006 06:56: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 00919-04 for ; Tue, 21 Mar 2006 06:56:58 -0500 (EST) Received: from smtp113.sbc.mail.re2.yahoo.com (smtp113.sbc.mail.re2.yahoo.com [68.142.229.92]) by menubar.gnome.org (Postfix) with SMTP id E954B3B2BC3 for ; Tue, 21 Mar 2006 06:56:57 -0500 (EST) Received: (qmail 99855 invoked from network); 21 Mar 2006 11:56:56 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.252.127.29 with login) by smtp113.sbc.mail.re2.yahoo.com with SMTP; 21 Mar 2006 11:56:56 -0000 Date: Tue, 21 Mar 2006 06:53:02 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060321065302.1d734d52@zentara.zentara.net> In-Reply-To: <441F7086.9000003@vtlink.net> References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> <441F7086.9000003@vtlink.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.14; 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.457 tagged_above=-999 required=2 tests=[AWL=-0.843, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, TW_BG=0.077] X-Spam-Score: -1.457 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 11:56:59 -0000 On Mon, 20 Mar 2006 22:18:30 -0500 James Muir wrote: >>> fails, though I wouldn't have expected it to do so. If I uncomment >>> the GET_PROPERTY in the example below all is well, but I would have >>> expected the example below to work without it. >>> >>> I'm using libgnomecanvas 2.10.2 and Gtk+2 2.8.11 >>> >>> Thanks for any help you can offer on this matter. Jaap Karssenberg >>> has reported problems to me with the software I sent him after he >>> upgraded his machine. So it's not just me that's having troubles >>> after an upgrade. I'm trying to understand what's going wrong so I >>> can fix this problem. >> >> What upgrade was it? Was glib-2.0 upgraded without rebuilding Glib? >> There was a rash of "bugs" recently related to botched upgrades... < 2 cents> This rings a bell for me. I recently was confused why I needed to use SET_PROPERTY in some of the custom_cell_renderers after I upgraded my Perl version to 5.8.8. Then it was pointed out to me, by Daniel Kasak, that you need the latest Gtk-Perl module ( Gtk-1.116 ) for the sub-classing properties to work right in Perl-5.8.8 So if your Perl is 5.8.8 , try Gtk-Perl module ( Gtk-1.116 ) or later. -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From scott@asofyet.org Tue Mar 21 07:56:39 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 125AB3B0FBC for ; Tue, 21 Mar 2006 07:56: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 04127-05 for ; Tue, 21 Mar 2006 07:56:33 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id CEA693B11C8 for ; Tue, 21 Mar 2006 07:56:32 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id BEFF0A726F for ; Tue, 21 Mar 2006 04:56:28 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <441F7086.9000003@vtlink.net> References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> <441F7086.9000003@vtlink.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <86EDFA0B-B86C-4510-821D-6AF3FA57BD52@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Tue, 21 Mar 2006 07:56:27 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.523 tagged_above=-999 required=2 tests=[AWL=-0.001, BAYES_00=-2.599, TW_BG=0.077] X-Spam-Score: -2.523 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 12:56:39 -0000 On Mar 20, 2006, at 10:18 PM, James Muir wrote: > muppet wrote: >> >> What upgrade was it? Was glib-2.0 upgraded without rebuilding >> Glib? There was a rash of "bugs" recently related to botched >> upgrades... >> >> I can't reproduce this. I've tried >> >> - Gnome2::Canvas 1.002. >> - libgnomecanvas 2.6.0 >> - libgnomecanvas 2.11.1 >> >> - Glib 1.105 >> - Glib 1.120 >> - glib 2.4.8 >> - glib 2.10.2 > Another error in communication on my part. I performed a clean > install of Zenwalk 2.2. > > I tried inserting the default GET_PROPERTY into the modules that > use Glib::Object::Subclass and I got further. Some objects were > displayed on the canvas, but I'm now getting: > > *** unhandled exception in callback: > *** Can't locate object method "get_default_value" via package > "Glib::Param::Boxed" at ../lib/Gtk2/Ex/MindMapView/Item.pm line 227. > *** ignoring at example4.pl line 68. That's because you can't specify a default value for a Boxed parameter type. The code in the XS implementation does the equivalent of "$pspec->can ('get_default_value') && return $pspec- >get_default_value". The documentation omits that for brevity and clarity. *cough* If you're planning to use integer values for that property, use Glib::Param::Int instead. > and also I ran the Glib and Gtk2 regression tests. It looks to me > like the "f.t" Glib test is confirming that I have problem with > Glib::Object::Subclass. Maybe you can make more of it. Here's the > Glib test results: [...] > t/f........................ > # Failed test 'and they have values' > # in t/f.t at line 111. > # Structures begin differing at: > # $got->[0] = undef > # $expected->[0] = 'Joe' > > # Failed test 'and they have values' > # in t/f.t at line 168. > # Structures begin differing at: > # $got->[0] = undef > # $expected->[0] = 'Joe' > # Looks like you failed 2 tests of 42. > dubious > Test returned status 2 (wstat 512, 0x200) > DIED. FAILED tests 13, 42 > Failed 2/42 tests, 95.24% okay Please try with Glib 1.105. I would swear till i was blue in the face that this is a problem we fixed in the last couple of months, but i can't remember the details. > t/GtkTreeView................dubious > Test returned status 0 (wstat 11, 0xb) > DIED. FAILED tests 112-137 > Failed 26/137 tests, 81.02% okay That's somewhat worrying... > Any suggestions on how to proceed with debugging this problem would > be appreciated. Try figuring out why the code is skipped. I can't give many more details because i can't reproduce it. -- muppet From scott@asofyet.org Tue Mar 21 08:03:40 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id CBC5B3B0D48 for ; Tue, 21 Mar 2006 08:03: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 04817-09 for ; Tue, 21 Mar 2006 08:03:28 -0500 (EST) Received: from samwise.dreamhost.com (samwise.dreamhost.com [66.33.212.8]) by menubar.gnome.org (Postfix) with ESMTP id A46663B2CEC for ; Tue, 21 Mar 2006 08:02:03 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by samwise.dreamhost.com (Postfix) with ESMTP id 2B8A9A726F for ; Tue, 21 Mar 2006 05:02:03 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <20060321065302.1d734d52@zentara.zentara.net> References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> <441F7086.9000003@vtlink.net> <20060321065302.1d734d52@zentara.zentara.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Tue, 21 Mar 2006 08:02:01 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.559 tagged_above=-999 required=2 tests=[AWL=0.040, BAYES_00=-2.599] X-Spam-Score: -2.559 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 13:03:40 -0000 On Mar 21, 2006, at 6:53 AM, zentara wrote: > Then it was pointed out to me, by Daniel Kasak, that you need the > latest Gtk-Perl module ( Gtk-1.116 ) Now that 1.120 is out, we disavow the existence of the 1.11x series. Please use 1.12x, not 1.11x. > for the sub-classing properties to work right in Perl-5.8.8 Hey, that's right! 2006/02/11 muppetman * GObject.xs: SvLEN() is the length of the SV's buffer; SvCUR () is the length of the SV's string. Use SvCUR() instead of SvLEN ()-1 in _gperl_fetch_wrapper_key(), or we get garbage key names with perl 5.8.8, resulting in failures in t/f.t related to properties with no getter or setter. At least somebody on here has a good memory, 'cause i sure don't. :-) -- I bring the rock, and provided it is fiscally responsible, I will bring the funk as well. And that's fo-shizzle. -- Saturday Night Live From szgezu@freemail.hu Tue Mar 21 11:48:35 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B86513B2D7E for ; Tue, 21 Mar 2006 11:48: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 18416-06 for ; Tue, 21 Mar 2006 11:48:33 -0500 (EST) Received: from fmx09.freemail.hu (unknown [195.228.245.59]) by menubar.gnome.org (Postfix) with SMTP id A038F3B2D5A for ; Tue, 21 Mar 2006 11:48:32 -0500 (EST) Received: (qmail 37772 invoked from network); 21 Mar 2006 17:51:03 +0100 Received: from fm13.freemail.hu (HELO fm18.freemail.hu) (195.228.245.113) by fmx09.freemail.hu with SMTP; 21 Mar 2006 17:51:02 +0100 Received: (qmail 4021 invoked by uid 2492393); 21 Mar 2006 17:48:40 +0100 Date: Tue, 21 Mar 2006 17:48:40 +0100 (CET) From: =?ISO-8859-2?Q?Szab=F3_G=E9za?= To: gtk-perl-list@gnome.org Message-ID: X-Originating-IP: [194.88.55.211] X-HTTP-User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Freemail: message scanned X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.531 tagged_above=-999 required=2 tests=[AWL=-0.926, BAYES_20=-0.74, FORGED_RCVD_HELO=0.135] X-Spam-Score: -1.531 X-Spam-Level: Subject: treeview clearing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 16:48:35 -0000 Dear All, I have a very simple question for which you experts can answer me=20 surely in a second, but I was not able to find the solution even after=20 few hours googling. So I have a Treeview (and of cours e a treestore)=20 and I just want to simply clear all the whole treeview. I tried with $treestore->clear; but nothing happens. I tried to reconstruct the olda treeview with the cleared treestore: $tree_viewl =3D Gtk2::TreeView->new($tree_store); but nothing happens either. All the time the old data remins in the=20 treeview and the new just appended to it. How can this be fixed? Thanks a lot for the answer!=0A=0A_________________________________________= ________________________________=0AT=E1rsash=E1zi gyakorlati k=E9zik=F6nyv = - Hasznos =E9s n=E9lk=FCl=F6zhetetlen seg=EDt=F5je=0Aminden t=E1rsash=E1zba= n lak=F3nak: http://manager.menedzsmentforum.hu/tarsashaz/=0A=0A From ari.jolma@tkk.fi Tue Mar 21 12:17:54 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id C0A353B152E for ; Tue, 21 Mar 2006 12:17: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 20655-09 for ; Tue, 21 Mar 2006 12:17:52 -0500 (EST) Received: from pne-smtpout4-sn2.hy.skanova.net (pne-smtpout4-sn2.hy.skanova.net [81.228.8.154]) by menubar.gnome.org (Postfix) with ESMTP id 3B5723B1262 for ; Tue, 21 Mar 2006 12:17:51 -0500 (EST) Received: from [192.168.3.8] (80.221.67.212) by pne-smtpout4-sn2.hy.skanova.net (7.2.070) id 43CE185D002D70EB; Tue, 21 Mar 2006 18:17:47 +0100 Message-ID: <44203503.3010908@tkk.fi> Date: Tue, 21 Mar 2006 19:16:51 +0200 From: Ari Jolma User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-2?Q?Szab=F3_G=E9za?= References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.563 tagged_above=-999 required=2 tests=[AWL=0.036, BAYES_00=-2.599] X-Spam-Score: -2.563 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: treeview clearing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 17:17:55 -0000 Szabó Géza wrote: >Dear All, >I have a very simple question for which you experts can answer me >surely in a second, but I was not able to find the solution even after >few hours googling. So I have a Treeview (and of cours e a treestore) >and I just want to simply clear all the whole treeview. >I tried with $treestore->clear; but nothing happens. > > That should do it. Are you sure you have set the treestore as the model for the treeview? Ari >I tried to reconstruct the olda treeview with the cleared treestore: >$tree_viewl = Gtk2::TreeView->new($tree_store); >but nothing happens either. All the time the old data remins in the >treeview and the new just appended to it. > >How can this be fixed? > >Thanks a lot for the answer! > >_________________________________________________________________________ >Társasházi gyakorlati kézikönyv - Hasznos és nélkülözhetetlen segítõje >minden társasházban lakónak: http://manager.menedzsmentforum.hu/tarsashaz/ > > >_______________________________________________ >gtk-perl-list mailing list >gtk-perl-list@gnome.org >http://mail.gnome.org/mailman/listinfo/gtk-perl-list > > From zentara1@sbcglobal.net Tue Mar 21 15:37:21 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 074523B230C for ; Tue, 21 Mar 2006 15:37: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 31692-07 for ; Tue, 21 Mar 2006 15:37:20 -0500 (EST) Received: from smtp105.sbc.mail.re2.yahoo.com (smtp105.sbc.mail.re2.yahoo.com [68.142.229.100]) by menubar.gnome.org (Postfix) with SMTP id F0D6E3B142A for ; Tue, 21 Mar 2006 15:37:19 -0500 (EST) Received: (qmail 75962 invoked from network); 21 Mar 2006 20:37:18 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@68.251.227.128 with login) by smtp105.sbc.mail.re2.yahoo.com with SMTP; 21 Mar 2006 20:37:18 -0000 Date: Tue, 21 Mar 2006 15:33:47 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060321153347.5c70c07f@zentara.zentara.net> In-Reply-To: References: X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.14; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.207 tagged_above=-999 required=2 tests=[AWL=0.484, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.207 X-Spam-Level: Subject: Re: treeview clearing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 20:37:21 -0000 On Tue, 21 Mar 2006 17:48:40 +0100 (CET) Szab=F3 G=E9za wrote: >and I just want to simply clear all the whole treeview. >I tried with $treestore->clear; but nothing happens. >How can this be fixed? Your $treestore may be out of scope? Do you have warnings and strict enabled? This works. #! /usr/bin/perl -w use strict; use Gtk2 '-init'; use Glib qw/TRUE FALSE/;=20 =20 my $window =3D Gtk2::Window->new('toplevel'); $window->signal_connect('delete_event' =3D> sub { Gtk2->main_quit; }); $window->set_border_width(5); $window->set_position('center_always'); my $vbox =3D &ret_vbox(); $window->add($vbox); $window->show(); Gtk2->main(); sub ret_vbox { my $vbox =3D Gtk2::VBox->new(FALSE,5); my $sw =3D Gtk2::ScrolledWindow->new (undef, undef); $sw->set_shadow_type ('etched-out'); $sw->set_policy ('automatic', 'automatic'); $sw->set_size_request (300, 300); $sw->set_border_width(5); =09 my $tree_store =3D Gtk2::TreeStore->new(qw/Glib::String/); foreach (1..30) { my $parent_nr =3D $_; my $iter =3D $tree_store->append(undef); $tree_store->set ($iter,0 =3D> "Parent $parent_nr"); =09 foreach (1..3){ my $iter_child =3D $tree_store->append($iter); $tree_store->set ($iter_child,0 =3D> "Child $_ of Parent $parent_nr= "); } } my $tree_view =3D Gtk2::TreeView->new($tree_store); my $tree_column =3D Gtk2::TreeViewColumn->new(); $tree_column->set_title ("Click to sort"); =09 my $renderer =3D Gtk2::CellRendererText->new; $tree_column->pack_start ($renderer, FALSE); $tree_column->add_attribute($renderer, text =3D> 0); =09 $tree_view->append_column ($tree_column); $sw->add($tree_view); =09 $vbox->pack_start($sw,TRUE,TRUE,0); my $button =3D Gtk2::Button->new('Clear'); $vbox->pack_end( $button, FALSE, FALSE, 0 ); $button->signal_connect( clicked =3D> sub{ $tree_store->clear; } ); $vbox->show_all(); return $vbox; } __END__ --=20 I'm not really a human, but I play one on earth. http://zentara.net/japh.html From kaffeetisch@gmx.de Tue Mar 21 17:42:28 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id ABF7E3B1264 for ; Tue, 21 Mar 2006 17:42:27 -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 07769-03 for ; Tue, 21 Mar 2006 17:42:26 -0500 (EST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id E82913B1593 for ; Tue, 21 Mar 2006 17:42:17 -0500 (EST) Received: (qmail invoked by alias); 21 Mar 2006 22:42:16 -0000 Received: from port-212-202-198-170.dynamic.qsc.de (EHLO [192.168.0.2]) [212.202.198.170] by mail.gmx.net (mp018) with SMTP; 21 Mar 2006 23:42:16 +0100 X-Authenticated: #2092818 From: Torsten Schoenfeld To: gtk-perl-list@gnome.org Content-Type: text/plain Date: Tue, 21 Mar 2006 23:42:18 +0100 Message-Id: <1142980939.7472.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.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.466 tagged_above=-999 required=2 tests=[AWL=-0.001, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, SPF_PASS=-0.001] X-Spam-Score: -2.466 X-Spam-Level: Subject: GStreamer 0.07 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 22:42:28 -0000 GStreamer makes everybody dance like crazy. It provides the means to play, stream, and convert nearly any type of media -- be it audio or video. GStreamer wraps the 0.10.x series of the GStreamer library in a nice and Perlish way, freeing the programmer from any memory management and object casting hassles. The package is available from: http://sourceforge.net/project/showfiles.php?group_id=64773&package_id=150831&release_id=403558 Overview of changes in GStreamer 0.07 ===================================== * Make GStreamer::Clock::wait_async work correctly. * Fix some test suite issues. From hemlock@vtlink.net Tue Mar 21 19:45:28 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 7741F3B1E9F for ; Tue, 21 Mar 2006 19:45: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 17321-01 for ; Tue, 21 Mar 2006 19:45:26 -0500 (EST) Received: from mail2.vtlink.com (mail2.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id 29BD93B12DF for ; Tue, 21 Mar 2006 19:45:25 -0500 (EST) Received: (qmail 18424 invoked by uid 5142); 22 Mar 2006 00:45:20 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(64.30.50.189):. Processed in 0.520271 secs); 22 Mar 2006 00:45:20 -0000 Received: from unknown (HELO ?10.0.1.3?) (hemlock@64.30.50.189) by mail2.vtlink.com with ESMTPA; 21 Mar 2006 19:45:20 -0500 Message-ID: <44209E38.8060409@vtlink.net> Date: Tue, 21 Mar 2006 19:45:44 -0500 From: James Muir User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.org References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> <441F7086.9000003@vtlink.net> <20060321065302.1d734d52@zentara.zentara.net> In-Reply-To: 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=-2.538 tagged_above=-999 required=2 tests=[AWL=0.062, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.538 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 00:45:28 -0000 muppet wrote: > > On Mar 21, 2006, at 6:53 AM, zentara wrote: > >> Then it was pointed out to me, by Daniel Kasak, that you need the >> latest Gtk-Perl module ( Gtk-1.116 ) > > Now that 1.120 is out, we disavow the existence of the 1.11x series. > Please use 1.12x, not 1.11x. > > >> for the sub-classing properties to work right in Perl-5.8.8 > > Hey, that's right! > > 2006/02/11 muppetman > > * GObject.xs: SvLEN() is the length of the SV's buffer; SvCUR() is > the length of the SV's string. Use SvCUR() instead of SvLEN()-1 in > _gperl_fetch_wrapper_key(), or we get garbage key names with perl > 5.8.8, resulting in failures in t/f.t related to properties with no > getter or setter. > > > At least somebody on here has a good memory, 'cause i sure don't. :-) > Hey, thanks Zentara and Muppetman! You've slain the Jabberwock! :-) I installed Glib 1.105 and now Gtk2::Ex::MindMapView is working again. Yay! Where did you find the posting about the GObject.xs? It looks like it might be good place to look for answers to problems. From scott@asofyet.org Tue Mar 21 20:16:59 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id AC32C3B25C0 for ; Tue, 21 Mar 2006 20:16: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 19397-01 for ; Tue, 21 Mar 2006 20:16:58 -0500 (EST) Received: from pippin.dreamhost.com (pippin.dreamhost.com [66.33.211.27]) by menubar.gnome.org (Postfix) with ESMTP id 64C253B13AB for ; Tue, 21 Mar 2006 20:16:58 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by pippin.dreamhost.com (Postfix) with ESMTP id 1A6DC109EC1 for ; Tue, 21 Mar 2006 17:16:54 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <44209E38.8060409@vtlink.net> References: <441C20C2.7040803@vtlink.net> <9B46DD34-B56A-44D2-96D9-575C3097ABC8@asofyet.org> <441DD630.7090202@vtlink.net> <549FD574-E8C7-4FEC-8266-859E2B562383@asofyet.org> <441F7086.9000003@vtlink.net> <20060321065302.1d734d52@zentara.zentara.net> <44209E38.8060409@vtlink.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7B4AB0BA-3199-41DB-B68C-02DBF157F30F@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Tue, 21 Mar 2006 20:16:52 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.56 tagged_above=-999 required=2 tests=[AWL=0.039, BAYES_00=-2.599] X-Spam-Score: -2.56 X-Spam-Level: Subject: Re: Glib::Object::Subclass bug? or Misunderstanding? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 01:16:59 -0000 On Mar 21, 2006, at 7:45 PM, James Muir wrote: > I installed Glib 1.105 and now Gtk2::Ex::MindMapView is working > again. Yay! phew! > Where did you find the posting about the GObject.xs? It looks like > it might be good place to look for answers to problems. It's in the ChangeLog. http://cvs.sourceforge.net/viewcvs.py/gtk2-perl/gtk2-perl-xs/Gtk2/ ChangeLog?rev=1.672&view=auto -- "that's it! you're a genius!" "yes. that's what i think. do you think i deserve a raise?" - dialogue from 'Godzilla versus Mothra', 1964 From djdaga@gmail.com Tue Mar 21 20:44:41 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 95C7B3B14FE for ; Tue, 21 Mar 2006 20:44: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 21075-10 for ; Tue, 21 Mar 2006 20:44:40 -0500 (EST) Received: from rs26s12.datacenter.cha.cantv.net (rs26s12.datacenter.cha.cantv.net [200.44.33.31]) by menubar.gnome.org (Postfix) with ESMTP id 0D9DB3B1477 for ; Tue, 21 Mar 2006 20:44:39 -0500 (EST) Received: from [201.249.147.227] (scr-06-482.scr.ras.cantv.net [201.249.147.227]) by rs26s12.datacenter.cha.cantv.net (8.13.4/8.13.0/3.0) with ESMTP id k2M1ibW0027978 for ; Tue, 21 Mar 2006 21:44:38 -0400 X-Matched-Lists: [] Message-ID: <4420AC03.5070606@gmail.com> Date: Tue, 21 Mar 2006 21:44:35 -0400 From: =?ISO-8859-1?Q?Jos=E9_Luis_Regalado?= User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on rs26s12.datacenter.cha.cantv.net X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.733 tagged_above=-999 required=2 tests=[AWL=-0.280, BAYES_00=-2.599, SPF_NEUTRAL=1.069, TW_GT=0.077] X-Spam-Score: -1.733 X-Spam-Level: Subject: Perl GKT gksu X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 01:44:41 -0000 greetings. Sorry for my English. I need write a program for administration. I need work with *gksu* I not know about how work perl scripts and gtk with gksu. Please i need how to. Some of you has implemented it with perl + gtk?. Thanks. -- José Luis Regalado Debian GNU/Linux User 280381. San Cristóbal Edo. Táchira - Venezuela 0276-766.72.20 0416-373.75.15 0414-710.48.57 FINGERPRINT= "Donde hay ignorancia hay fanatismo donde hay fanatismo no hay tolerancia, donde no hay tolerancia no hay _paz_" From grant@mclean.net.nz Tue Mar 21 22:12:38 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D68433B266F for ; Tue, 21 Mar 2006 22:12: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 25695-10 for ; Tue, 21 Mar 2006 22:12: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 121F83B1309 for ; Tue, 21 Mar 2006 22:12:35 -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 1FLtly-00028G-E8 for gtk-perl-list@gnome.org; Wed, 22 Mar 2006 15:12:34 +1200 From: Grant McLean To: gtk-perl-list@gnome.org In-Reply-To: <4420AC03.5070606@gmail.com> References: <4420AC03.5070606@gmail.com> Content-Type: text/plain; charset=UTF-8 Date: Wed, 22 Mar 2006 15:12:34 +1200 Message-Id: <1142997154.7296.14.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.391 tagged_above=-999 required=2 tests=[AWL=-0.004, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_GT=0.077] X-Spam-Score: -2.391 X-Spam-Level: Subject: Re: Perl GKT gksu X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 03:12:39 -0000 On Tue, 2006-03-21 at 21:44 -0400, Jos=C3=A9 Luis Regalado wrote: > greetings. > Sorry for my English. >=20 > I need write a program for administration. I need work with *gksu* >=20 > I not know about how work perl scripts and gtk with gksu. Please i need=20 > how to. If you had a compiled C program like 'xclock' you could run it via gksu like this: gksu xclock If you had a Perl+GTK program called for example 'setclock' then you would run it via gksu in exactly the same way: gksu setclock I just tested that now and had no problem. I would recommend two things: 1. Make sure your Perl program enables 'taint' checking by turning on the -T option. The first line of the Perl program should be similar to this: #!/usr/bin/perl -T This will protect you against common attacks using malicious characters in command line arguments, environment variables, etc. 2. Don't use gksu, use gksudo instead. The first requires the user to know the root password whereas the second only requires them to know their own password. With the root password they can do anything. =20 With sudo and their own password they can do only what you let them do. In general, gksudo should work with graphical applications too, but I have found in necessary to tweak the sudoers file to pass the required DISPLAY and XAUTHORITY environment variables (particularly on Debian): User_Alias X_USERS =3D tom, dick, larry Defaults:X_USERS env_reset Defaults:X_USERS env_keep +=3D DISPLAY Defaults:X_USERS env_keep +=3D XAUTHORITY Regards Grant From mospelt@student.ethz.ch Wed Mar 22 03:27:56 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id DB0E83B3139 for ; Wed, 22 Mar 2006 03:27:55 -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 07524-08 for ; Wed, 22 Mar 2006 03:27:52 -0500 (EST) Received: from XSMTP0.ethz.ch (xsmtp0.ethz.ch [82.130.70.14]) by menubar.gnome.org (Postfix) with ESMTP id 74D6B3B3147 for ; Wed, 22 Mar 2006 03:27:42 -0500 (EST) Received: from xfe1.d.ethz.ch ([82.130.124.41]) by XSMTP0.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Wed, 22 Mar 2006 09:27:40 +0100 Received: from [192.168.100.113] ([217.173.228.89]) by xfe1.d.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Wed, 22 Mar 2006 09:27:40 +0100 Message-ID: <44210A7C.5080807@student.ethz.ch> Date: Wed, 22 Mar 2006 09:27:40 +0100 From: Mario Ospelt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: gtk-perl mailing list Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Mar 2006 08:27:40.0459 (UTC) FILETIME=[7BCE6FB0:01C64D8A] X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.32 tagged_above=-999 required=2 tests=[AWL=-1.135, BAYES_40=-0.185] X-Spam-Score: -1.32 X-Spam-Level: Subject: Filechooser in MS Windows style X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 08:27:56 -0000 Hi everybody, The application I'm writing is only used on MS Windows. Therefore there's the desire to give it a MS Windows look. Is it possible to get the filechooser in the typical Windows style (and not the standard gnome style)? Thanks a lot! Mario From ebassi@gmail.com Wed Mar 22 06:36:20 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0B9643B32DE for ; Wed, 22 Mar 2006 06:36: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 19992-01 for ; Wed, 22 Mar 2006 06:36:17 -0500 (EST) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.195]) by menubar.gnome.org (Postfix) with ESMTP id B7B793B32E6 for ; Wed, 22 Mar 2006 06:36:16 -0500 (EST) Received: by wproxy.gmail.com with SMTP id i34so111306wra for ; Wed, 22 Mar 2006 03:36:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=Xeed8bVBYCCNIpdbGDiaTN4UqSCRzwMcGV8qd2LRKL3qsCMe0wOJMU1r4V4fASbCFLcAZ3X2xJ/QETn72i9jzBx/riSdSi1ZuPjlzedO2tNJVlzyPDyz+ED9juOT3dB3rSNVTShHA/EtvP67ga9yE4pbytTcqh9h4+ADYFDr1nA= Received: by 10.65.240.18 with SMTP id s18mr535413qbr; Wed, 22 Mar 2006 03:36:15 -0800 (PST) Received: from . ( [213.140.6.105]) by mx.gmail.com with ESMTP id d2sm2093057qbc.2006.03.22.03.36.13; Wed, 22 Mar 2006 03:36:15 -0800 (PST) From: Emmanuele Bassi To: gtk-perl-list@gnome.org In-Reply-To: <44210A7C.5080807@student.ethz.ch> References: <44210A7C.5080807@student.ethz.ch> Content-Type: text/plain Date: Wed, 22 Mar 2006 12:36:11 +0100 Message-Id: <1143027371.983.100.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.552 tagged_above=-999 required=2 tests=[AWL=0.971, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -1.552 X-Spam-Level: Subject: Re: Filechooser in MS Windows style X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 11:36:20 -0000 Hi, On Wed, 2006-03-22 at 09:27 +0100, Mario Ospelt wrote: > Hi everybody, > > The application I'm writing is only used on MS Windows. Therefore > there's the desire to give it a MS Windows look. Is it possible to get > the filechooser in the typical Windows style (and not the standard gnome > style)? This is more a question for gtk-app-devel than gtk-perl. Anyway, the answer is: no. It was planned to use native dialogs, ma no-one really got around it, AFAIR. Ciao, Emmanuele. -- Emmanuele Bassi - Log: http://log.emmanuelebassi.net From scott@asofyet.org Wed Mar 22 07:36:28 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1D3FA3B319B for ; Wed, 22 Mar 2006 07:36:23 -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 23273-02 for ; Wed, 22 Mar 2006 07:36:15 -0500 (EST) Received: from pippin.dreamhost.com (pippin.dreamhost.com [66.33.211.27]) by menubar.gnome.org (Postfix) with ESMTP id B72973B333F for ; Wed, 22 Mar 2006 07:35:56 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by pippin.dreamhost.com (Postfix) with ESMTP id 8CA9C109EAF for ; Wed, 22 Mar 2006 04:35:55 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <44210A7C.5080807@student.ethz.ch> References: <44210A7C.5080807@student.ethz.ch> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1D27674C-2872-40CF-978B-01F0EEDA2F26@asofyet.org> Content-Transfer-Encoding: 7bit From: muppet Date: Wed, 22 Mar 2006 07:35:54 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.56 tagged_above=-999 required=2 tests=[AWL=0.039, BAYES_00=-2.599] X-Spam-Score: -2.56 X-Spam-Level: Subject: Re: Filechooser in MS Windows style X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 12:36:28 -0000 On Mar 22, 2006, at 3:27 AM, Mario Ospelt wrote: > The application I'm writing is only used on MS Windows. Therefore > there's the desire to give it a MS Windows look. Is it possible to > get the filechooser in the typical Windows style (and not the > standard gnome style)? That doesn't work with gtk+ alone. There are a couple of perl module that wrap the Win32 API in such a way that you can call GetOpenFileName() to bring up the native win32 file selector; Win32::GUI, for example. I have no idea how this module interacts with Gtk2, no idea how to use it, and no idea how widely available it is (aside from its presence on CPAN). If you use it, you'll have to do a platform- specific branch in your code. -- If I lived in Teletubby Land, the homicide rate would be four. -- elysse From szgezu@freemail.hu Wed Mar 22 12:47:54 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B815A3B33DB for ; Wed, 22 Mar 2006 12:47: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 10098-02 for ; Wed, 22 Mar 2006 12:47:48 -0500 (EST) Received: from fmx12.freemail.hu (unknown [195.228.245.62]) by menubar.gnome.org (Postfix) with SMTP id 28D7E3B33E0 for ; Wed, 22 Mar 2006 12:47:47 -0500 (EST) Received: (qmail 87538 invoked from network); 22 Mar 2006 18:50:15 +0100 Received: from fm15.freemail.hu (195.228.245.115) by fmx12.freemail.hu with SMTP; 22 Mar 2006 18:50:15 +0100 Received: (qmail 93528 invoked by uid 2492393); 22 Mar 2006 18:46:25 +0100 Date: Wed, 22 Mar 2006 18:46:25 +0100 (CET) From: =?ISO-8859-2?Q?Szab=F3_G=E9za?= To: gtk-perl-list@gnome.org Message-ID: X-Originating-IP: [84.0.135.238] X-HTTP-User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Freemail: message scanned X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.448 tagged_above=-999 required=2 tests=[AWL=0.074, BAYES_00=-2.599, TW_EG=0.077] X-Spam-Score: -2.448 X-Spam-Level: Subject: Re:Re: treeview clearing X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 17:47:54 -0000 Thanks, all the answers, I have just connected my clearing function to =20 a wrong button :-( (the whole problem seemed to be more serious, as=20 I have come across with so much help request in connection with=20 deleting rows from treeview, it looked like as clearing from treeview=20 even more difficult :-) ) Thanks again! On Tue, 21 Mar 2006 17:48:40 +0100 (CET) Szab=F3 G=E9za wrote: =20 > and I just want to simply clear all the whole treeview. > I tried with $treestore->clear; but nothing happens. > How can this be fixed? =0A=0A____________________________________________________________________= _____=0ALegjobb ny=E1ri aj=E1nlatok: k=F6rutaz=E1sok, Horv=E1to., G=F6r=F6g= o., Spanyolo., Olaszo., Ausztria,=0AEur=F3pa nagyv=E1rosai, rep=FCl=F5jegye= k =E9s minden, ami utaz=E1s. www.cartouronline.hu=0A=0A From dkasak@nusconsulting.com.au Wed Mar 22 16:52:50 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 3E25E3B3562 for ; Wed, 22 Mar 2006 16:52: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 24415-05 for ; Wed, 22 Mar 2006 16:52:47 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id 44EC73B356D for ; Wed, 22 Mar 2006 16:52:46 -0500 (EST) Received: from [10.146.1.25] (dkasak.nusconsulting.com.au [10.146.1.25]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k2MLrQh1016476; Thu, 23 Mar 2006 08:53:32 +1100 Message-ID: <4421C72C.3090106@nusconsulting.com.au> Date: Thu, 23 Mar 2006 08:52:44 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060120) MIME-Version: 1.0 To: Mario Ospelt References: <44210A7C.5080807@student.ethz.ch> In-Reply-To: <44210A7C.5080807@student.ethz.ch> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Canit-Stats-ID: 406706 - a035f5cbd88a X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=406706&m=a035f5cbd88a X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=406706&m=a035f5cbd88a X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=406706&m=a035f5cbd88a 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.358 tagged_above=-999 required=2 tests=[AWL=0.164, BAYES_00=-2.599, TW_GT=0.077] X-Spam-Score: -2.358 X-Spam-Level: Cc: gtk-perl mailing list Subject: Re: Filechooser in MS Windows style X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2006 21:52:50 -0000 Mario Ospelt wrote: > Hi everybody, > > The application I'm writing is only used on MS Windows. Therefore > there's the desire to give it a MS Windows look. Is it possible to get > the filechooser in the typical Windows style (and not the standard > gnome style)? There was a debate on this in the gtk mailing list recently ( subject was 'Usability of the GTK+ 2 file open dialog' ). I was arguing against your side :) The suggestion was to override the gtk2 file open dialogs with native ones on Windows. Personally I would prefer that the gtk2 dialog be 'fixed' to the extent that it offers all the functionality that people are after, and then a Win32 theme created so that it looks the part as well. But anyway, feel free to rock up and add your thoughts to the thread. -- 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 szgezu@freemail.hu Fri Mar 24 01:50:50 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A03573B19CB for ; Fri, 24 Mar 2006 01:50: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 31253-09 for ; Fri, 24 Mar 2006 01:50:49 -0500 (EST) Received: from fmx11.freemail.hu (unknown [195.228.245.61]) by menubar.gnome.org (Postfix) with SMTP id 1B5E03B19BD for ; Fri, 24 Mar 2006 01:50:47 -0500 (EST) Received: (qmail 23788 invoked from network); 24 Mar 2006 07:54:08 +0100 Received: from fm03.freemail.hu (195.228.245.103) by fmx11.freemail.hu with SMTP; 24 Mar 2006 07:54:08 +0100 Received: (qmail 55219 invoked by uid 2492393); 24 Mar 2006 07:47:15 +0100 Date: Fri, 24 Mar 2006 07:47:15 +0100 (CET) From: =?ISO-8859-2?Q?Szab=F3_G=E9za?= To: gtk-perl-list@gnome.org Message-ID: X-Originating-IP: [81.182.60.138] X-HTTP-User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Freemail: message scanned X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.289 tagged_above=-999 required=2 tests=[AWL=-1.104, BAYES_40=-0.185] X-Spam-Score: -1.289 X-Spam-Level: Subject: textview help X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2006 06:50:50 -0000 Dear All, I would like to get informed how it is possible to save the content of=20 TextView to some format keeping document file (eg. rtf, html)? I have=20 found examples but just to simple text file saving. I would like to save=20 even pictures on the TextView get saved. (I hope it not complicates=20 things further) Thanks all the answers!=0A=0A______________________________________________= ___________________________=0ANyitott K=F6nyvek =C9jszak=E1ja - 30% kedvezm= =E9ny a Helikon Kiad=F3 k=F6nyveire=0Ahttp://www.bookline.hu/control/news?n= ewsid=3D311&affiliate=3Dfrenykkar2139=0A=0A From j.g.karssenberg@student.utwente.nl Fri Mar 24 03:34:35 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 540003B3940 for ; Fri, 24 Mar 2006 03:34: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 03205-08 for ; Fri, 24 Mar 2006 03:34:31 -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 EA6203B38CB for ; Fri, 24 Mar 2006 03:34:30 -0500 (EST) Received: from [192.168.3.8] (unknown [192.168.3.8]) by zoidberg.student.utwente.nl (Postfix) with ESMTP id 46AA957195; Fri, 24 Mar 2006 09:34:30 +0100 (CET) Message-ID: <4423AF14.1070402@student.utwente.nl> Date: Fri, 24 Mar 2006 09:34:28 +0100 From: Jaap Karssenberg User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: =?ISO-8859-2?Q?Szab=F3_G=E9za?= References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.482 tagged_above=-999 required=2 tests=[AWL=0.040, BAYES_00=-2.599, TW_XT=0.077] X-Spam-Score: -2.482 X-Spam-Level: Cc: gtk-perl-list@gnome.org Subject: Re: textview help X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2006 08:34:35 -0000 Szabó Géza wrote: > I would like to get informed how it is possible to save the content of > TextView to some format keeping document file (eg. rtf, html)? I have > found examples but just to simple text file saving. I would like to save > even pictures on the TextView get saved. (I hope it not complicates > things further) > I'm currently working to make the classes used by the zim editor available on CPAN. I exchanged some example code that reads/writes parse trees based on a TextView with Fabrizio Lanza, who asked for something similar on this list last week or so. I'm preparing a new revision for this weekend, I'll send you a copy too. -- Jaap From j.g.karssenberg@student.utwente.nl Sat Mar 25 16:41:46 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9DD0D3B10DA for ; Sat, 25 Mar 2006 16:41: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 22204-01 for ; Sat, 25 Mar 2006 16:41:43 -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 0439F3B1082 for ; Sat, 25 Mar 2006 16:41:42 -0500 (EST) Received: from [192.168.2.71] (captain [192.168.2.71]) by zoidberg.student.utwente.nl (Postfix) with ESMTP id 23452571AD for ; Sat, 25 Mar 2006 22:41:44 +0100 (CET) Message-ID: <4425B91B.4080004@student.utwente.nl> Date: Sat, 25 Mar 2006 22:41:47 +0100 From: Jaap Karssenberg User-Agent: Thunderbird 1.5 (X11/20060113) MIME-Version: 1.0 To: gtk-perl mailing list 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=-1.592 tagged_above=-999 required=2 tests=[AWL=-0.852, BAYES_20=-0.74] X-Spam-Score: -1.592 X-Spam-Level: Subject: non-modal dialogs X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Mar 2006 21:41:46 -0000 Hi, I've got a problem here with creating non-modal dialogs. Some dialogs in my application behave modal while they are not modal (no 'modal' dialog flag and I checked that the 'modal' property is 0). Is there any other property or flag that can trigger modal behavior or are there any known problems with this behavior ? Thanks, -- Jaap Karssenberg From mlaks@verizon.net Sat Mar 25 20:03:08 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 9EE4A3B0818 for ; Sat, 25 Mar 2006 20:03:08 -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 30711-01 for ; Sat, 25 Mar 2006 20:03:05 -0500 (EST) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by menubar.gnome.org (Postfix) with ESMTP id D69E23B0931 for ; Sat, 25 Mar 2006 20:03:05 -0500 (EST) Received: from rambam ([68.237.217.164]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IWP007VCMX4QMH6@vms042.mailsrvcs.net> for gtk-perl-list@gnome.org; Sat, 25 Mar 2006 19:03:05 -0600 (CST) Date: Sat, 25 Mar 2006 20:03:03 -0500 From: Mitchell Laks To: gtk-perl mailing list Message-id: <200603252003.03261.mlaks@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-disposition: inline User-Agent: KMail/1.9.1 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-0.52 tagged_above=-999 required=2 tests=[AWL=-1.841, BAYES_20=-0.74, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, SPF_PASS=-0.001, TW_GT=0.077, TW_TK=0.077] X-Spam-Score: -0.52 X-Spam-Level: Subject: can we combile gtk2-perl with gtkmm in an application? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2006 01:03:08 -0000 Hi, I am designing an open source application to display medical images (MRI and CT etc). I have read about the idea of splitting the functionality so that the core user interface issues are controlled via a gui that is designed with a scripting language like perl, and thus can be easily customized, while the parts of the application such as the opengl window that will deal with the display images would be done in C++ for speed. People need to load over 1000 images at a time and I have had difficulties with java applications being too slow for that aspect of the program. How had is it to make an application with the central Object being gtkmm object. Ideal would be high level integration with the gtk-perl interface, but I could even survive perhaps with sending signals between somewhat "independent" applications... Mitchell From ari.jolma@tkk.fi Sun Mar 26 03:37:20 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 002023B0DA3 for ; Sun, 26 Mar 2006 03:37: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 15247-05 for ; Sun, 26 Mar 2006 03:37:19 -0500 (EST) Received: from pne-smtpout3-sn2.hy.skanova.net (pne-smtpout3-sn2.hy.skanova.net [81.228.8.111]) by menubar.gnome.org (Postfix) with ESMTP id D3AA13B080B for ; Sun, 26 Mar 2006 03:37:18 -0500 (EST) Received: from [192.168.3.13] (80.221.67.212) by pne-smtpout3-sn2.hy.skanova.net (7.2.070) id 43CE14DF00327B75; Sun, 26 Mar 2006 10:37:12 +0200 Message-ID: <4426446D.1080507@tkk.fi> Date: Sun, 26 Mar 2006 10:36:13 +0300 From: Ari Jolma User-Agent: Thunderbird 1.5 (X11/20060313) MIME-Version: 1.0 To: Mitchell Laks References: <200603252003.03261.mlaks@verizon.net> In-Reply-To: <200603252003.03261.mlaks@verizon.net> 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.448 tagged_above=-999 required=2 tests=[AWL=-0.080, BAYES_00=-2.599, TW_GD=0.077, TW_GT=0.077, TW_TK=0.077] X-Spam-Score: -2.448 X-Spam-Level: Cc: gtk-perl mailing list Subject: Re: can we combile gtk2-perl with gtkmm in an application? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2006 08:37:20 -0000 Mitchell Laks wrote: > Hi, > > I am designing an open source application to display medical images (MRI and > CT etc). > Hi, I've been working on Gtk2::Ex::Geo modules, where a central functionality is to display geospatial data. > I have read about the idea of splitting the functionality so that the core > user interface issues are controlled via a gui that is designed with a > scripting language like perl, and thus can be easily customized, while the > parts of the application such as the opengl window that will deal with the > display images would be done in C++ for speed. People need to load over 1000 > images at a time and I have had difficulties with java applications being too > slow for that aspect of the program. > Surely the lowest level of making the images is fastest done with C or perhaps C++, but I guess in this case the speed of disk and network (are those images on a network disk?) and amount of memory (are those images to be open at the same time?) are important. But in general I think it is very sensible to divide the functionality between Perl and C, it makes many things much easier. 'So far I've been looking at only a few images but in near future I expect to work with spatio-temporal data and then the number of images increases substantially. > How had is it to make an application with the central Object being gtkmm > object. > I'm a bit puzzled with this. I haven't used gtkmm at all, in fact I had to look it up now to see what it is. I've been using simple gdk pixbufs, which are easy to make and easy to use in GUI (although the memory management took a while to learn). Right now I'm considering starting to use Cairo and Cairo objects as the central image. > Ideal would be high level integration with the gtk-perl interface, but I could > even survive perhaps with sending signals between somewhat "independent" > applications... > What kind of functionality do people want from the software? Compare images? Overlay them? Zoom in/out? See animations? Ari > Mitchell > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > From scott@asofyet.org Sun Mar 26 08:51:29 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id A9C2A3B1125 for ; Sun, 26 Mar 2006 08:51:27 -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 11258-03 for ; Sun, 26 Mar 2006 08:51:24 -0500 (EST) Received: from pippin.dreamhost.com (pippin.dreamhost.com [66.33.211.27]) by menubar.gnome.org (Postfix) with ESMTP id 9815A3B21E1 for ; Sun, 26 Mar 2006 08:50:21 -0500 (EST) Received: from [192.168.0.100] (12-203-239-118.client.insightBB.com [12.203.239.118]) by pippin.dreamhost.com (Postfix) with ESMTP id 295BA109EC2 for ; Sun, 26 Mar 2006 05:50:19 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <200603252003.03261.mlaks@verizon.net> References: <200603252003.03261.mlaks@verizon.net> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: muppet Date: Sun, 26 Mar 2006 08:50:18 -0500 To: gtk-perl mailing list X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.483 tagged_above=-999 required=2 tests=[AWL=-0.038, BAYES_00=-2.599, TW_GT=0.077, TW_TK=0.077] X-Spam-Score: -2.483 X-Spam-Level: Subject: Re: can we combile gtk2-perl with gtkmm in an application? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2006 13:51:29 -0000 On Mar 25, 2006, at 8:03 PM, Mitchell Laks wrote: > I have read about the idea of splitting the functionality so that > the core > user interface issues are controlled via a gui that is designed with a > scripting language like perl, and thus can be easily customized, > while the > parts of the application such as the opengl window that will deal > with the > display images would be done in C++ for speed. People need to load > over 1000 > images at a time and I have had difficulties with java applications > being too > slow for that aspect of the program. > > How had is it to make an application with the central Object being > gtkmm > object. > > Ideal would be high level integration with the gtk-perl interface, > but I could > even survive perhaps with sending signals between somewhat > "independent" > applications... To get this high level of integration, you will basically wind up writing bindings for your application's objects. So long as your application's objects are based on GObject, this will be very, very easy, because you can use the extensive infrastructure of Gtk2-Perl. Otherwise, you'll have more work to do. Personally, i have found it easier to write a C library containing the core functionality (image loading, processing, analysis, display, and storing) in GObject-based C libraries, then bind these libraries to perl, and write the application itself in perl. The application logic is very easy to change, and the performance-critical stuff is all under the hood. By using C libraries from perl you avoid many issues involved in embedding a perl interpreter in a C program, and make it possible to create a whole suite of applications using the same underlying libraries. I have never tried binding gtkmm code to perl. In theory, it should be possible, but i have not done it, and don't know enough of the dirty details of gtkmm to know if there would be any problems. You may want to have a look through the "Binding Developers" section of http://gtk2-perl.sourceforge.net/doc/ . We're also available in #gtk-perl on irc.gnome.org if you want to chat. (Be patient, we're all in different timezones.) -- Jolt is my co-pilot. -- Slogan on a giant paper airplane hung in Lobby 7 at MIT. http://hacks.mit.edu/ From mlaks@verizon.net Sun Mar 26 09:19:30 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 8DC4C3B1111 for ; Sun, 26 Mar 2006 09:19: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 12969-10 for ; Sun, 26 Mar 2006 09:19:28 -0500 (EST) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by menubar.gnome.org (Postfix) with ESMTP id DFCE13B10F1 for ; Sun, 26 Mar 2006 09:19:27 -0500 (EST) Received: from rambam ([68.237.217.164]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IWQ005Y7NSBW914@vms042.mailsrvcs.net> for gtk-perl-list@gnome.org; Sun, 26 Mar 2006 08:19:24 -0600 (CST) Date: Sun, 26 Mar 2006 09:19:25 -0500 From: Mitchell Laks In-reply-to: <4426446D.1080507@tkk.fi> To: Ari Jolma , gtk-perl mailing list Message-id: <200603260919.25603.mlaks@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-8-i Content-transfer-encoding: 7bit Content-disposition: inline References: <200603252003.03261.mlaks@verizon.net> <4426446D.1080507@tkk.fi> User-Agent: KMail/1.9.1 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.322 tagged_above=-999 required=2 tests=[AWL=-0.861, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, SPF_PASS=-0.001, TW_GD=0.077, TW_GT=0.077, TW_TK=0.077] X-Spam-Score: -1.322 X-Spam-Level: Cc: Subject: Re: can we combile gtk2-perl with gtkmm in an application? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2006 14:19:30 -0000 On Sunday 26 March 2006 02:36, you wrote: > Surely the lowest level of making the images is fastest done with C or > perhaps C++, but I guess in this case the speed of disk and network (are > those images on a network disk?) and amount of memory (are those images > to be open at the same time?) are important. But in general I think it > is very sensible to divide the functionality between Perl and C, it > makes many things much easier. > > 'So far I've been looking at only a few images but in near future I > expect to work with spatio-temporal data and then the number of images > increases substantially. > > > How had is it to make an application with the central Object being gtkmm > > object. > > I'm a bit puzzled with this. I haven't used gtkmm at all, in fact I had > to look it up now to see what it is. I've been using simple gdk pixbufs, > which are easy to make and easy to use in GUI (although the memory > management took a while to learn). Right now I'm considering starting to > use Cairo and Cairo objects as the central image. Medical images "slice" a patient into thousands of consecutive images. Images will typically be stored on local disk as well as streamed over the network to the workstation. They are then loaded in memory. It is not unusual to be looking at 2000-3000 images at a time, each 512x512 matrix with depth of 12-16 bits of data. We will scroll through the images while dragging the mouse as the images are flipped onto the screen. You also want to have 3d visualization built in. You do not want to reinvent the display image wheel. You want to use Opengl. You want to use VTK. Take a look at a similar project that is very-very-very Mac centric. It has done a marvelous job. http://homepage.mac.com/rossetantoine/osirix/Index2.html It annoys me that it is so mac centric that I must reinvent the entire project from scratch to do it right for linux. Mitchell > > > Ideal would be high level integration with the gtk-perl interface, but I > > could even survive perhaps with sending signals between somewhat > > "independent" applications... > > What kind of functionality do people want from the software? Compare > images? Overlay them? Zoom in/out? See animations? > > Ari > > > Mitchell > > _______________________________________________ > > gtk-perl-list mailing list > > gtk-perl-list@gnome.org > > http://mail.gnome.org/mailman/listinfo/gtk-perl-list From ari.jolma@tkk.fi Sun Mar 26 11:20:25 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id E5ED23B112D for ; Sun, 26 Mar 2006 11:20: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 18772-09 for ; Sun, 26 Mar 2006 11:20:22 -0500 (EST) Received: from pne-smtpout4-sn1.fre.skanova.net (pne-smtpout4-sn1.fre.skanova.net [81.228.11.168]) by menubar.gnome.org (Postfix) with ESMTP id 5ED343B0CC0 for ; Sun, 26 Mar 2006 11:20:21 -0500 (EST) Received: from [192.168.3.13] (80.221.67.212) by pne-smtpout4-sn1.fre.skanova.net (7.2.070) id 43CBBB29004AE13C; Sun, 26 Mar 2006 18:20:16 +0200 Message-ID: <4426B0F4.5000501@tkk.fi> Date: Sun, 26 Mar 2006 18:19:16 +0300 From: Ari Jolma User-Agent: Thunderbird 1.5 (X11/20060313) MIME-Version: 1.0 To: Mitchell Laks References: <200603252003.03261.mlaks@verizon.net> <4426446D.1080507@tkk.fi> <200603260919.25603.mlaks@verizon.net> In-Reply-To: <200603260919.25603.mlaks@verizon.net> Content-Type: text/plain; charset=ISO-8859-8-I; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.478 tagged_above=-999 required=2 tests=[AWL=-0.033, BAYES_00=-2.599, TW_GT=0.077, TW_TK=0.077] X-Spam-Score: -2.478 X-Spam-Level: Cc: gtk-perl mailing list Subject: Re: can we combile gtk2-perl with gtkmm in an application? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2006 16:20:25 -0000 Mitchell Laks wrote: > Medical images "slice" a patient into thousands of consecutive images. > > Images will typically be stored on local disk as well as streamed over the > network to the workstation. They are then loaded in memory. > > It is not unusual to be looking at 2000-3000 images at a time, each 512x512 > matrix with depth of 12-16 bits of data. We will scroll through the images > while dragging the mouse as the images are flipped onto the screen. > Is there a common data format for this data? Climate data files, which are a bit similar, are often huge (>100MB) NetCDF files. There are libraries for reading NetCDF files, which have Perl interfaces, but for visualization the data would need to be rendered onto something that can be put to screen. > You also want to have 3d visualization built in. > > You do not want to reinvent the display image wheel. > You want to use Opengl. You want to use VTK. > Yes, putting simple matrix data simply onto a Gdk Pixbuf is fast and simple, but if you want to do fancier visualization than that, there are OpenGL and VTK (which is news to me also) and other tools to look at. But it doesn't matter how complicated it is, if the end product is a Gdk Pixbuf, you can use it simply in you Gtk2-Perl code. BTW, VTK homepage says it has interfaces to Tcl/Tk, Java, and Python, i.e., Perl is not mentioned. Should I be worried that I see more often Python than Perl mentioned in these kinds of situations? Ari > Take a look at a similar project that is very-very-very Mac centric. It has > done a marvelous job. > > http://homepage.mac.com/rossetantoine/osirix/Index2.html > > It annoys me that it is so mac centric that I must reinvent the entire project > from scratch to do it right for linux. > > Mitchell > > >>> Ideal would be high level integration with the gtk-perl interface, but I >>> could even survive perhaps with sending signals between somewhat >>> "independent" applications... >>> >> What kind of functionality do people want from the software? Compare >> images? Overlay them? Zoom in/out? See animations? >> >> Ari >> >> >>> Mitchell >>> _______________________________________________ >>> gtk-perl-list mailing list >>> gtk-perl-list@gnome.org >>> http://mail.gnome.org/mailman/listinfo/gtk-perl-list >>> From mospelt@student.ethz.ch Mon Mar 27 08:27:34 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B62433B14C5 for ; Mon, 27 Mar 2006 08:27: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 21158-03 for ; Mon, 27 Mar 2006 08:27:29 -0500 (EST) Received: from xsmtp1.ethz.ch (xsmtp1.ethz.ch [82.130.70.13]) by menubar.gnome.org (Postfix) with ESMTP id 2307A3B0FA1 for ; Mon, 27 Mar 2006 08:27:27 -0500 (EST) Received: from xfe0.d.ethz.ch ([82.130.124.40]) by xsmtp1.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Mon, 27 Mar 2006 15:27:26 +0200 Received: from [192.168.100.113] ([217.173.228.89]) by xfe0.d.ethz.ch with Microsoft SMTPSVC(6.0.3790.2499); Mon, 27 Mar 2006 15:27:26 +0200 Message-ID: <4427E83F.9020000@student.ethz.ch> Date: Mon, 27 Mar 2006 15:27:27 +0200 From: Mario Ospelt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0 MIME-Version: 1.0 To: gtk-perl mailing list Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 27 Mar 2006 13:27:26.0323 (UTC) FILETIME=[30483C30:01C651A2] X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.2 tagged_above=-999 required=2 tests=[AWL=-1.201, BAYES_50=0.001] X-Spam-Score: -1.2 X-Spam-Level: Subject: Progressbar in a statusbar? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2006 13:27:35 -0000 Hello, Actually I would like to know if it is possible to create a progressbar in a statusbar. Can a statusbar be divided into several parts, so that in each part different information can be shown (and in one of them e.g. a progressbar). Or do I have to use a HBox and create several statusbars in each of the boxes? Thanks Mario From pagaltzis@gmx.de Mon Mar 27 09:15:43 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id B55CF3B22C6 for ; Mon, 27 Mar 2006 09:15: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 23827-08 for ; Mon, 27 Mar 2006 09:15:40 -0500 (EST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id A33233B228A for ; Mon, 27 Mar 2006 09:15:39 -0500 (EST) Received: (qmail invoked by alias); 27 Mar 2006 14:15:37 -0000 Received: from xdsl-81-173-175-224.netcologne.de (EHLO klangraum) [81.173.175.224] by mail.gmx.net (mp013) with SMTP; 27 Mar 2006 16:15:37 +0200 X-Authenticated: #163624 Date: Mon, 27 Mar 2006 16:15:23 +0200 From: "A. Pagaltzis" To: gtk-perl mailing list Message-ID: <20060327141523.GD14993@klangraum> Mail-Followup-To: gtk-perl mailing list References: <4427E83F.9020000@student.ethz.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4427E83F.9020000@student.ethz.ch> User-Agent: Mutt/1.4.2.1i X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.458 tagged_above=-999 required=2 tests=[AWL=0.007, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, SPF_PASS=-0.001] X-Spam-Score: -2.458 X-Spam-Level: Subject: Re: Progressbar in a statusbar? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2006 14:15:43 -0000 Hi Mario, * Mario Ospelt [2006-03-27 15:30]: >Can a statusbar be divided into several parts, so that in each >part different information can be shown (and in one of them e.g. >a progressbar). Or do I have to use a HBox and create several >statusbars in each of the boxes? if you check the docs, you will find that GtkStatusbar *is* a GtkHBox. So you can simply pack widgets into it using the GtkHBox interface. Be aware that you can only pack them into it to the right of the status text label widget, though. Regards, -- Aristotle Pagaltzis // From szgezu@freemail.hu Tue Mar 28 10:52:36 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 23C143B0A88 for ; Tue, 28 Mar 2006 10:52: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 15651-06 for ; Tue, 28 Mar 2006 10:52:15 -0500 (EST) Received: from fmx04.freemail.hu (fmx04.freemail.hu [195.228.245.54]) by menubar.gnome.org (Postfix) with SMTP id 149443B079C for ; Tue, 28 Mar 2006 10:52:14 -0500 (EST) Received: (qmail 61537 invoked from network); 28 Mar 2006 17:49:59 +0200 Received: from fm11.freemail.hu (195.228.245.111) by fmx04.freemail.hu with SMTP; 28 Mar 2006 17:49:58 +0200 Received: (qmail 21732 invoked by uid 2492393); 28 Mar 2006 17:48:18 +0200 Date: Tue, 28 Mar 2006 17:48:18 +0200 (CEST) From: =?ISO-8859-2?Q?Szab=F3_G=E9za?= To: gtk-perl-list@gnome.org Message-ID: X-Originating-IP: [194.88.55.211] X-HTTP-User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Freemail: message scanned X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-1.479 tagged_above=-999 required=2 tests=[AWL=-0.893, BAYES_20=-0.74, TW_KK=0.077, TW_XT=0.077] X-Spam-Score: -1.479 X-Spam-Level: Subject: write columns in textview X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 15:52:36 -0000 Dear All, While I am looking forward to getting the module which is able to=20 convert from the TextView's buffer to HTML, I would like to write in the TextView text which is in two column. I tried= =20 to print \t in the buffer, but in all of the rows the second column begins= =20 differently; I tried to use html tags with not so much fortune; and I=20 tried the Pango::Layout::TabArray which would be probably the=20 solution but I can not figure out how I should use it, and no manual or=20 example can be founded. Can someone tell me how should I print a=20 two columned text/table in the Textview widget? Thanks for the answers!=0A=0A______________________________________________= ___________________________=0A[origo] klikkbank lakoss=E1gi sz=E1mlacsomag = havi 199 Ft-=E9rt, bankk=E1rtya =E9ves d=EDj n=E9lk=FCl! =0Awww.klikkbank.h= u=0A=0A From nasir@mitco.ws Tue Mar 28 12:33:57 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 1C16D3B2952 for ; Tue, 28 Mar 2006 12:33: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 04887-02 for ; Tue, 28 Mar 2006 12:33:54 -0500 (EST) Received: from sv1.xs.net.pk (sv1.mitco.ws [66.98.154.3]) by menubar.gnome.org (Postfix) with ESMTP id 031DB3B284A for ; Tue, 28 Mar 2006 12:33:53 -0500 (EST) Received: (qmail 25988 invoked from network); 28 Mar 2006 22:33:51 +0500 Received: from unknown (HELO ?127.0.0.1?) (@58.65.199.35) by sv1.mitco.ws with SMTP; 28 Mar 2006 22:33:49 +0500 Message-ID: <44297364.2030400@mitco.ws> Date: Tue, 28 Mar 2006 22:33:24 +0500 From: "A.R. Nasir Qureshi" User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gtk-perl-list@gnome.org Content-Type: multipart/mixed; boundary="------------040101090106030708090007" X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.387 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, FORGED_RCVD_HELO=0.135, TW_GM=0.077] X-Spam-Score: -2.387 X-Spam-Level: Subject: Date and Time Entry Boxes X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 17:33:57 -0000 This is a multi-part message in MIME format. --------------040101090106030708090007 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have made these two Widget, each under Gtk2::Entry. I want to release them for the benefit of the community, but have no experience in making the Installation Package, Man page etc. They also require a lot of work, which I will do soon, but the provide basic functionality now. The have to be placed under /usr/lib/perl5/site_perl/5.8.4/Gtk2/Ex/ I would appreciate the guidance on the the gurus. -- Regards, Nasir. --------------040101090106030708090007 Content-Type: text/plain; name="EntryTime.pm" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="EntryTime.pm" # Written by A.R. Nasir Qureshi (nasir@mitco.ws) #COPYRIGHT & LICENSE # #Copyright 2006 A.R. Nasir Qureshi, All Rights Reserved. # #This library is free software; you can redistribute it and/or modify it under #the terms of the GNU Library General Public License as published by the Free #Software Foundation; either version 2.1 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 Library General Public License for more #details. # #You should have received a copy of the GNU Library General Public License along #with this library; if not, write to the Free Software Foundation, Inc., 59 #Temple Place - Suite 330, Boston, MA 02111-1307 USA. package Gtk2::Ex::EntryTime; use strict; use warnings; use Carp; use Gtk2; use Gtk2::Gdk::Keysyms ; use Glib qw(TRUE FALSE); use base 'Gtk2::Entry'; sub new { my $class = shift; # create an entry my $self = Gtk2::Entry->new_with_max_length(10); # rebless it to an Gtk2::EntryTime bless $self, $class; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime() ; if(length($hour) < 2){$hour = "0$hour";} if(length($min) < 2){$min = "0$min";} my $time = "$hour:$min" ; my $month ; my $day ; $self->set_text($time) ; $self->signal_connect (key_press_event => sub { my ($widget, $event) = @_; my $keyval = $event->keyval ; my $pos = $self->get_property('cursor-position') ; my $spos = $self->get_property('selection-bound') ; my $mpos ; if(abs($pos-$spos) == 5){ $mpos = 'C' ; } elsif($pos >= 0 && $pos <= 2){ $mpos = 'H' ; } elsif ($pos >= 3 && $pos <= 5){ $mpos = 'M' ; } my $text = $self->get_text ; my $hour = substr($self->get_text,0,2) ; my $min = substr($self->get_text,3,2) ; my $num = $self->_GetNumber($keyval) ; return (TRUE) if($keyval >= 65 && $keyval <= 90) ; # A - Z return (TRUE) if($keyval >= 97 && $keyval <= 122) ; # a - z return (TRUE) if($keyval >= 33 && $keyval <= 47) ; # special return (TRUE) if($keyval >= 59 && $keyval <= 64) ; # special return (TRUE) if($keyval >= 91 && $keyval <= 96) ; # special return (TRUE) if($keyval >= 123 && $keyval <= 126) ; # special if($keyval == 65293 || $keyval == 65421){ # Enter Keys $self->CheckTime ; return (FALSE) ; } if($keyval == 65363 || $keyval == 58){ # Right Arrow Key or ':' key if($mpos eq 'H'){ $self->select_region(3,5) ; $self->CheckTime ; return (TRUE) ; } if($mpos eq 'M' || $mpos eq 'C'){ $self->select_region(3,5) ; return (TRUE) ; } return (TRUE) if $pos == 5 && $spos > 3 ; return (FALSE) ; } if($keyval == 65361){ # Left Arrow Key if($mpos eq 'M' || $mpos eq 'H'){ $self->CheckTime ; $self->select_region(0,2) ; return (TRUE) ; } if($pos eq '5' && $spos == 0){ $self->select_region(0,2) ; return (TRUE) ; } if($pos == 2){ return (TRUE) ; } return (FALSE) ; } if($keyval == 65362){ # Up Arrow Key if($mpos eq 'H' || $mpos eq 'C'){ if($hour == 23){ $time = "00:$min" ; } else { $hour ++ ; if(length($hour) < 2){$hour = "0$hour";} $time = "$hour:$min" ; } $self->set_text($time) ; } elsif($mpos eq 'M'){ $self->select_region(0,2) ; if($min == 59){ $time = "$hour:00" ; } else { $min ++ ; if(length($min) < 2){$min = "0$min";} $time = "$hour:$min" ; } $self->set_text($time) ; $self->select_region(3,5) ; } return (TRUE) ; } if($keyval == 65364){ # Up Down Key if($mpos eq 'H' || $mpos eq 'C'){ if($hour == 00){ $time = "23:$min" ; } else { $hour -- ; if(length($hour) < 2){$hour = "0$hour";} $time = "$hour:$min" ; } $self->set_text($time) ; } elsif($mpos eq 'M'){ $self->select_region(0,2) ; if($min == 00){ $time = "$hour:59" ; } else { $min -- ; if(length($min) < 2){$min = "0$min";} $time = "$hour:$min" ; } $self->set_text($time) ; $self->select_region(3,5) ; } return (TRUE) ; } if(($keyval >= 48 && $keyval <= 57) || ($keyval >= 65456 && $keyval <= 65465)){ # Numbers if($mpos eq 'H' || $mpos eq 'C'){ if((abs($pos-$spos) == 2 || $pos == 0 || ($pos == 1 && $spos == 0)) && $num >=0 and $num <=2){ $self->set_text($num . substr($text,1)) ; $self->select_region(1,2) ; } elsif(($num < 4 && substr($text,0,1) == 2) || substr($text,0,1) < 2){ $self->set_text(substr($text,0,1) . $num . substr($text,2)) ; $self->select_region(0,2) ; } } elsif($mpos eq 'M'){ if((abs($pos-$spos) == 2 || $pos == 3 || ($pos == 4 && $spos == 3)) && $num >=0 and $num <=6){ $self->set_text(substr($text,0,3) . $num . substr($text,4)) ; $self->select_region(4,5) ; } else { $self->set_text(substr($text,0,4) . $num) ; $self->select_region(3,5) ; } } return (TRUE) ; } }) ; $self->signal_connect (focus_out_event => sub { $self->CheckTime ; return (FALSE) ; }) ; return $self; } sub show { my $entrydate = shift; # this doesn't do anything but show you how to call # a parent method if you really override this function # you'd do something here. note that this won't really # work as you'd expect for various reasons explained in # Glib::Subclass, take a look at that if you're wanting # to override C object functions. This is just an # example of using SUPER $entrydate->SUPER::show; } sub _GetNumber { my $self = shift ; my $keyval = shift ; if($keyval >= 48 && $keyval <= 57){ return($keyval - 48) ; } elsif($keyval >= 65456 && $keyval <= 65465){ return($keyval - 65456) ; } else { return(0) ; } } 1; --------------040101090106030708090007 Content-Type: text/plain; name="EntryDate.pm" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="EntryDate.pm" # Written by A.R. Nasir Qureshi (nasir@mitco.ws) #COPYRIGHT & LICENSE # #Copyright 2006 A.R. Nasir Qureshi, All Rights Reserved. # #This library is free software; you can redistribute it and/or modify it under #the terms of the GNU Library General Public License as published by the Free #Software Foundation; either version 2.1 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 Library General Public License for more #details. # #You should have received a copy of the GNU Library General Public License along #with this library; if not, write to the Free Software Foundation, Inc., 59 #Temple Place - Suite 330, Boston, MA 02111-1307 USA. package Gtk2::Ex::EntryDate; use strict; use warnings; use Carp; use Gtk2; use Gtk2::Gdk::Keysyms ; use Glib qw(TRUE FALSE); use Class::Date qw(:errors date localdate gmdate now -DateParse -EnvC); $Class::Date::RANGE_CHECK = 0; $Class::Date::DATE_FORMAT="%d-%m-%Y" ; use base 'Gtk2::Entry'; sub new { my $class = shift; # create an entry my $self = Gtk2::Entry->new_with_max_length(10); # rebless it to an Gtk2::EntryDate bless $self, $class; my $date = now ; $self->set_text($date) ; $self->signal_connect (key_press_event => sub { my ($widget, $event) = @_; my $keyval = $event->keyval ; my $pos = $self->get_property('cursor-position') ; my $spos = $self->get_property('selection-bound') ; my $mpos ; if(abs($pos-$spos) == 10){ $mpos = 'C' ; } elsif($pos >= 0 && $pos <= 2){ $mpos = 'D' ; } elsif ($pos >= 3 && $pos <= 5){ $mpos = 'M' ; } elsif ($pos >= 6 && $pos <= 10){ $mpos = 'Y' ; } my $text = $self->get_text ; my $year = substr($self->get_text,6,4) ; my $month = substr($self->get_text,3,2) ; my $day = substr($self->get_text,0,2) ; my $num = $self->_GetNumber($keyval) ; return (TRUE) if($keyval >= 65 && $keyval <= 90) ; # A - Z return (TRUE) if($keyval >= 97 && $keyval <= 122) ; # a - z return (TRUE) if($keyval >= 33 && $keyval <= 44) ; # special return (TRUE) if($keyval >= 46 && $keyval <= 47) ; # special return (TRUE) if($keyval >= 58 && $keyval <= 64) ; # special return (TRUE) if($keyval >= 91 && $keyval <= 96) ; # special return (TRUE) if($keyval >= 123 && $keyval <= 126) ; # special if($keyval == 65293 || $keyval == 65421){ # Enter Keys $self->CheckDate ; return (FALSE) ; } if($keyval == 65363 || $keyval == 45){ # Right Arrow Key or '-' key if($mpos eq 'D'){ $self->select_region(3,5) ; $self->CheckDate ; return (TRUE) ; } if($mpos eq 'M'){ $self->select_region(6,10) ; $self->CheckDate ; return (TRUE) ; } if($pos == 10 && $spos == 0){ $self->select_region(6,10) ; return (TRUE) ; } return (TRUE) if $pos == 10 && $spos > 6 ; return (FALSE) ; } if($keyval == 65361){ # Left Arrow Key if($mpos eq 'M' || $mpos eq 'D'){ $self->CheckDate ; $self->select_region(0,2) ; return (TRUE) ; } if($mpos eq 'Y' && $spos != 0){ $self->select_region(3,5) ; $self->CheckDate ; return (TRUE) ; } if($pos eq '10' && $spos == 0){ $self->select_region(0,2) ; return (TRUE) ; } if($pos == 2){ return (TRUE) ; } return (FALSE) ; } if($keyval == 65362){ # Up Arrow Key my $date = now ; $Class::Date::RANGE_CHECK = 0; if($mpos eq 'D' || $mpos eq 'C'){ $date = date {year => $year, month => $month,day => $day + 1} ; $self->set_text($date) ; $self->select_region(0,2) ; } elsif($mpos eq 'M'){ $date = date {year => $year, month => $month + 1,day => $day} ; $self->set_text($date) ; $self->select_region(3,5) ; } elsif($mpos eq 'Y'){ $date = date {year => $year + 1, month => $month,day => $day} ; $self->set_text($date) ; $self->select_region(6,10) ; } return (TRUE) ; } if($keyval == 65364){ # Up Down Key my $date = now ; $Class::Date::RANGE_CHECK = 0; if($mpos eq 'D' || $mpos eq 'C'){ $date = date {year => $year, month => $month,day => $day - 1} ; $self->set_text($date) ; $self->select_region(0,2) ; } elsif($mpos eq 'M'){ $date = date {year => $year, month => $month - 1,day => $day} ; $self->set_text($date) ; $self->select_region(3,5) ; } elsif($mpos eq 'Y'){ $date = date {year => $year - 1, month => $month,day => $day} ; $self->set_text($date) ; $self->select_region(6,10) ; } return (TRUE) ; } if(($keyval >= 48 && $keyval <= 57) || ($keyval >= 65456 && $keyval <= 65465)){ # Numbers my $date = now ; $Class::Date::RANGE_CHECK = 0; if($mpos eq 'D' || $mpos eq 'C'){ if($pos == 0 || $pos == 10 || abs($pos-$spos) == 2){ if(($month == 2 && $num < 3) || ($month != 2 && $num < 4)){ $self->set_text($num . substr($text,1)) ; $self->select_region(1,2) ; } } else { my $dd = substr($text,0,1) ; if($month == 2 && ((($year%4) == 0 || $day < 20 || $num < 9) && ($dd > 0 || $num > 0))){ $self->set_text($dd . $num . substr($text,2)) ; $self->select_region(0,2) ; } elsif($month == 1 || $month == 3 || $month == 5 || $month == 7 || $month == 8 || $month == 10 || $month == 12){ if(($dd == 3 && $num < 2) || ($dd > 0 && $dd < 3) || ($num > 0 && $dd == 0)){ $self->set_text(substr($text,0,1) . $num . substr($text,2)) ; $self->select_region(0,2) ; } } elsif(($dd == 3 && $num == 0) || ($dd > 0 && $dd < 3) || ($num > 0 && $dd == 0)){ $self->set_text(substr($text,0,1) . $num . substr($text,2)) ; $self->select_region(0,2) ; } } } elsif($mpos eq 'M'){ if(($pos == 3 || abs($pos-$spos) == 2) && $num < 2){ $self->set_text(substr($text,0,3) . $num . substr($text,4)) ; $self->select_region(4,5) ; } elsif(($pos > 3 && abs($pos-$spos) < 2) && (substr($text,3,1) == 0 && $num > 0) || (substr($text,3,1) == 1 && $num < 3)){ $self->set_text(substr($text,0,4) . $num . substr($text,5)) ; $self->select_region(3,5) ; } } elsif($mpos eq 'Y'){ if(($pos == 6 || abs($pos-$spos) == 4) && $num == 2){ $self->set_text(substr($text,0,6) . $num . substr($text,7)) ; $self->select_region(7,10) ; } elsif(($pos == 7 || abs($pos-$spos) == 3) && $num == 0){ $self->set_text(substr($text,0,7) . $num . substr($text,8)) ; $self->select_region(8,10) ; } elsif($pos == 8 || abs($pos-$spos) == 2){ $self->set_text(substr($text,0,8) . $num . substr($text,9)) ; $self->select_region(9,10) ; } elsif($pos == 9 || abs($pos-$spos) == 1){ $self->set_text(substr($text,0,9) . $num) ; $self->select_region(6,10) ; } } return (TRUE) ; } }) ; $self->signal_connect (focus_out_event => sub { $self->CheckDate ; return (FALSE) ; }) ; return $self; } sub show { my $entrydate = shift; # this doesn't do anything but show you how to call # a parent method if you really override this function # you'd do something here. note that this won't really # work as you'd expect for various reasons explained in # Glib::Subclass, take a look at that if you're wanting # to override C object functions. This is just an # example of using SUPER $entrydate->SUPER::show; } sub CheckDate { $Class::Date::RANGE_CHECK = 0; my $self = shift ; my $year = substr($self->get_text,6,4) ; my $month = substr($self->get_text,3,2) ; my $day = substr($self->get_text,0,2) ; my $date = date {year => $year, month => $month,day => $day, hour => 0, min => 0, sec => 0} ; $self->set_text($date) ; return (FALSE) ; } sub _GetNumber { my $self = shift ; my $keyval = shift ; if($keyval >= 48 && $keyval <= 57){ return($keyval - 48) ; } elsif($keyval >= 65456 && $keyval <= 65465){ return($keyval - 65456) ; } else { return(0) ; } } 1; --------------040101090106030708090007-- From zentara1@sbcglobal.net Tue Mar 28 14:33:57 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 54B163B10FE for ; Tue, 28 Mar 2006 14:33: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 13963-02 for ; Tue, 28 Mar 2006 14:33:52 -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 E3AE73B138F for ; Tue, 28 Mar 2006 14:33:51 -0500 (EST) Received: (qmail 61255 invoked from network); 28 Mar 2006 19:33:51 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@66.72.148.2 with login) by smtp109.sbc.mail.re2.yahoo.com with SMTP; 28 Mar 2006 19:33:50 -0000 Date: Tue, 28 Mar 2006 14:30:02 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060328143002.4fd8e976@zentara.zentara.net> In-Reply-To: <44297364.2030400@mitco.ws> References: <44297364.2030400@mitco.ws> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.14; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Subject: Re: Date and Time Entry Boxes X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 19:33:57 -0000 On Tue, 28 Mar 2006 22:33:24 +0500 "A.R. Nasir Qureshi" wrote: > >I have made these two Widget, each under Gtk2::Entry. I want to release >them for the benefit of the community, but have no experience in making >the Installation Package, Man page etc. They also require a lot of work, >which I will do soon, but the provide basic functionality now. > >The have to be placed under /usr/lib/perl5/site_perl/5.8.4/Gtk2/Ex/ > >I would appreciate the guidance on the the gurus. > Read perldoc -q create a module Basically h2xs -XA -n My::Module then put your code in and write the perldoc. -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From peco@microbotica.es Wed Mar 29 09:52:05 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 0F6473B1B50 for ; Wed, 29 Mar 2006 09:52: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 11361-09 for ; Wed, 29 Mar 2006 09:52:03 -0500 (EST) Received: from hosting02.redcoruna.org (unknown [82.194.78.12]) by menubar.gnome.org (Postfix) with ESMTP id 901243B1A5B for ; Wed, 29 Mar 2006 09:52:03 -0500 (EST) Received: from 64.red-80-33-1.staticip.rima-tde.net ([80.33.1.64] helo=[192.168.1.109]) by hosting02.redcoruna.org with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.52) id 1FOc1X-0003V8-TK for gtk-perl-list@gnome.org; Wed, 29 Mar 2006 16:51:52 +0200 From: Juan Jose 'Peco' San Martin To: gtk-perl Mailing List Content-Type: text/plain Date: Wed, 29 Mar 2006 16:51:42 +0200 Message-Id: <1143643903.6493.42.camel@cae.pulsartec.com> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1-2mdk Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hosting02.redcoruna.org X-AntiAbuse: Original Domain - gnome.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - microbotica.es X-Source: X-Source-Args: X-Source-Dir: 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: Subject: Gtk-CRITICAL X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2006 14:52:05 -0000 Hello all. I'm working on a small Gtk-perl application in order to read data from the Joystick. All the interface was done using Glade-2 and I'm loading it with Gtk2::GladeXML. The interface has only two windows, the main one that appears always, and a secondary that initially is hiden. Well, my issue is that when I execute the app, I get the following message: Gtk-CRITICAL **: gtk_widget_grab_focus: assertion `GTK_IS_WIDGET (widget)' failed at .... Do I need to setup a focus on one window?, Is it possible to do it from Glade? Thanks! Peco From dkasak@nusconsulting.com.au Wed Mar 29 20:16:11 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 97E733B0B88 for ; Wed, 29 Mar 2006 20: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 12818-10 for ; Wed, 29 Mar 2006 20:16:08 -0500 (EST) Received: from screamer.nusconsulting.com.au (mail.nusconsulting.com.au [203.191.186.114]) by menubar.gnome.org (Postfix) with ESMTP id BD2183B2DE1 for ; Wed, 29 Mar 2006 20:16:05 -0500 (EST) Received: from [10.146.1.200] (metabox.nusconsulting.com.au [10.146.1.200]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k2U2GdUT009578 for ; Thu, 30 Mar 2006 12:17:02 +1000 Message-ID: <442B2344.3000007@nusconsulting.com.au> Date: Thu, 30 Mar 2006 11:16:04 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060303) MIME-Version: 1.0 To: gtk-perl Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.0001 (Score -0.5) X-Canit-Stats-ID: 411841 - 2f86bb5522b8 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=411841&m=2f86bb5522b8 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=411841&m=2f86bb5522b8 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=411841&m=2f86bb5522b8 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.474 tagged_above=-999 required=2 tests=[AWL=-0.734, BAYES_20=-0.74] X-Spam-Score: -1.474 X-Spam-Level: Subject: $combo->set_text_column() fails X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 01:16:11 -0000 Can someone tell me what's up with this: my $model = Gtk2::ListStore->new( 'Glib::String', 'Glib::String' ); foreach my $category ( [ "body_location", "Body Location" ], [ "breakdown_agency", "Breakdown Agency" ], [ "incident_type", "Incident Type" ], [ "injury_and_disease", "Injury / Disease Type" ], [ "injury_consequence", "Injury Consequence" ], [ "injury_location", "Injury Location" ], [ "injury_mechanism", "Injury Mechanism" ], [ "risk_category", "Risk Category" ], [ "risk_score", "Risk Score" ] ) { my $iter = $model->append; $model->set( $iter, 0, $$category[0], 1, $$category[1] ); print "\n0: " . $model->get( $iter, 0 ) . "\n"; print "1: " . $model->get( $iter, 1 ) . "\n"; } my $combo = $self->{form}->get_widget("ReportCategory"); $combo->set_model( $model ); $combo->set_text_column( 1 ); At this point, I get: Gtk-CRITICAL **: gtk_combo_box_entry_set_text_column: assertion `entry_box->priv->text_column == -1' failed at forms/report_builder.pm line 146. But my print statements are finding the right values in the model, and if I use the model in an auto_completion object, *it* allows me to set the text column: my $entry_completion = Gtk2::EntryCompletion->new; $entry_completion->set_minimum_key_length( 1 ); $entry_completion->set_model( $model ); $entry_completion->set_text_column( 1 ); $combo->get_child->set_completion( $entry_completion ); If I use the entry completion, it also uses the correct values. Why can't I set the text column for the combo? Dan From dkasak@nusconsulting.com.au Wed Mar 29 20:26:38 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 667023B0855 for ; Wed, 29 Mar 2006 20:26: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 13108-10 for ; Wed, 29 Mar 2006 20:26: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 35A5D3B07EF for ; Wed, 29 Mar 2006 20:26:36 -0500 (EST) Received: from [10.146.1.200] (metabox.nusconsulting.com.au [10.146.1.200]) by screamer.nusconsulting.com.au (8.13.4/8.13.4) with ESMTP id k2U2RYCH009964 for ; Thu, 30 Mar 2006 12:27:34 +1000 Message-ID: <442B25D3.4090605@nusconsulting.com.au> Date: Thu, 30 Mar 2006 11:26:59 +1100 From: Daniel Kasak User-Agent: Mail/News 1.5 (X11/20060303) MIME-Version: 1.0 To: gtk-perl Mailing List References: <442B2344.3000007@nusconsulting.com.au> In-Reply-To: <442B2344.3000007@nusconsulting.com.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Bayes-Prob: 0.0001 (Score -0.5) X-Canit-Stats-ID: 411848 - bb5afa4c4557 X-Antispam-Training: Train as spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=s&i=411848&m=bb5afa4c4557 X-Antispam-Training: Train as non-spam: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=n&i=411848&m=bb5afa4c4557 X-Antispam-Training: Cancel training: http://screamer.nusconsulting.com.au/internal/canit/b.php?c=f&i=411848&m=bb5afa4c4557 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.406 tagged_above=-999 required=2 tests=[AWL=0.193, BAYES_00=-2.599] X-Spam-Score: -2.406 X-Spam-Level: Subject: Re: $combo->set_text_column() fails X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 01:26:38 -0000 Daniel Kasak wrote: > $combo->set_text_column( 1 ); > > At this point, I get: > > Gtk-CRITICAL **: gtk_combo_box_entry_set_text_column: assertion > `entry_box->priv->text_column == -1' failed at forms/report_builder.pm > line 146. > Never mind. I had previously filled in options in the combo in glade and although I'd cleared them out, *something* must have remained behind and affected things. I deleted the combo and created a new one, and the problem has disappeared. Dan From ofey.aikon@gmail.com Thu Mar 30 00:41:19 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D33533B0A40 for ; Thu, 30 Mar 2006 00:41: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 23528-08 for ; Thu, 30 Mar 2006 00:41:19 -0500 (EST) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.184]) by menubar.gnome.org (Postfix) with ESMTP id BD9B63B0A4A for ; Thu, 30 Mar 2006 00:41:18 -0500 (EST) Received: by nproxy.gmail.com with SMTP id m18so296693nfc for ; Wed, 29 Mar 2006 21:41:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eTGAzSpAm+xeGSSccDENoXSo/wSzk90WOltCaJXJrFdkVfdifFuyzRigbnOAODY875lg16pbfhU463LSXIyFE0Lwd+pyLWunlWTJWxZ6LvPefvFs8ZMo6GUCOFdw4JTXJS/akFZ+t4uUyJpaw+C5qUQHwu38tqIJfGqvoY+a5IE= Received: by 10.49.36.9 with SMTP id o9mr124757nfj; Wed, 29 Mar 2006 21:41:17 -0800 (PST) Received: by 10.48.202.15 with HTTP; Wed, 29 Mar 2006 21:41:17 -0800 (PST) Message-ID: <17dc6b00603292141s4157d648xdfc2b4422862ce5a@mail.gmail.com> Date: Wed, 29 Mar 2006 23:41:17 -0600 From: "ofey aikon" To: gtk-perl-list@gnome.org In-Reply-To: <441F5EF4.2040804@entropy.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <441F4852.2080103@entropy.homelinux.org> <441F5EF4.2040804@entropy.homelinux.org> 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: Subject: Re: Which version of what for Win32 at the moment? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 05:41:20 -0000 On 3/20/06, Daniel Kasak wrote: > > I'm preparing to do an install for a customer on a Windows system. > > ActiveState Perl 5.8.8 is out. Will this work with the latest Gtk2-Perl > > bindings available for Windows ( Gtk2-1080.ppd )? Or should I use > > ActiveState Perl 5.8.7? > > Never mind. 5.8.8 doesn't work with this version of Gtk2 on Windows > either. Back to 5.8.7. (my hard-drive crashed and that gave me an opportunity to try this out) The following combination works fine for me. perl, v5.8.8 built for MSWin32-x86-multi-thread Glib 1.100, Gtk2 1.100 Glib built for 2.6.6, running with 2.8.5 Gtk2 built for 2.6.10, running with 2.8.9 Regards, _Ofey. From velisungutay@gmail.com Thu Mar 30 04:13:31 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 744633B1F01 for ; Thu, 30 Mar 2006 04:13: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 02729-02 for ; Thu, 30 Mar 2006 04:13:30 -0500 (EST) Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.178]) by menubar.gnome.org (Postfix) with ESMTP id E62753B2EB2 for ; Thu, 30 Mar 2006 04:13:29 -0500 (EST) Received: by pproxy.gmail.com with SMTP id b36so511151pyb for ; Thu, 30 Mar 2006 01:13:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=e7hJj+j1Sn5rR7kGupNV78DQTYCkYs0MJJTdKFO8w3+YPohNshqtX2eqmALYX8kBSrQBfc1qItxMfw1JK8ADEh7Yeb7jVdGOnnhJBcqrYoD2C+LzEbMoYHiwngBo+tAHrkrYKg4VhA/HfDMgyGV3gVc4S2sCiKN5wn541OHE/kA= Received: by 10.35.113.12 with SMTP id q12mr400523pym; Thu, 30 Mar 2006 01:13:28 -0800 (PST) Received: by 10.35.27.1 with HTTP; Thu, 30 Mar 2006 01:13:28 -0800 (PST) Message-ID: <9da0760f0603300113l28bcdeaai41dbce7789047a4b@mail.gmail.com> Date: Thu, 30 Mar 2006 12:13:28 +0300 From: "Veli Ogla Sungutay" To: gtk-perl-list@gnome.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=0.447 tagged_above=-999 required=2 tests=[BAYES_05=-1.11, RCVD_IN_BL_SPAMCOP_NET=1.558, SPF_PASS=-0.001] X-Spam-Score: 0.447 X-Spam-Level: Subject: drawing shapes with color X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 09:13:31 -0000 Would someone please show me how to draw a shape, say a rectangle or a line with some color on????? I would really appreciate it. I've been trying to find my way around these and to no avail: ## IMAGE WORKING: $hbox->realize(); ($pixmap,$mask)=3DGtk2::Gdk::Pixmap->create_from_xpm($hbox->window,undef,"i= mage.jpg"); $img =3D Gtk2::Image->new_from_pixmap($pixmap,$mask); $vbox->pack_start($img,FALSE,FALSE,0); ## GARBAGE BG, white line $pixmap =3D Gtk2::Gdk::Pixmap->new($hbox->window,100,100,-1); $gc =3D $hbox->style->fg_gc('selected'); $pixmap->draw_line($gc,0,0,100,100); $img2 =3D Gtk2::Image->new_from_pixmap($pixmap,undef); $vbox->pack_start($img2,FALSE,FALSE,0); ## WORKING $pixmap =3D Gtk2::Gdk::Pixmap->new(undef,100,100,-1); $gc =3D $hbox->style->fg_gc('selected'); $pixmap->draw_rectangle($gc,TRUE,0,0,100,100); ## GARBAGE BG $pixmap =3D Gtk2::Gdk::Pixmap->new(undef,100,100,-1); $gc =3D $hbox->style->fg_gc('selected'); $pixmap->draw_line($gc,0,0,100,100); $img =3D Gtk2::Image->new_from_pixmap($pixmap,undef); $vbox->pack_start($img,FALSE,FALSE,0); ## EITHER GETTING BLACK RECT OR GARBAGE depending on the draw_ methods my $pixmap =3D Gtk2::Gdk::Pixmap->new(undef,100,100,-1); my $gc =3D Gtk2::Gdk::GC->new($pixmap); my $c =3D Gtk2::Gdk::Color->new(65535,65535,65535); my $c2 =3D Gtk2::Gdk::Color->new(32000,0,0); $gc->set_background($c); $gc->set_foreground($c2); $pixmap->draw_rectangle($gc,TRUE,0,0,100,100); $img =3D Gtk2::Image->new_from_pixmap($pixmap,undef); $vbox->pack_start($img,FALSE,FALSE,0); From dov.grobgeld@gmail.com Thu Mar 30 06:33:33 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 2AF3C3B1AA4 for ; Thu, 30 Mar 2006 06:33: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 10195-04 for ; Thu, 30 Mar 2006 06:33:29 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by menubar.gnome.org (Postfix) with ESMTP id 8FD553B0D3C for ; Thu, 30 Mar 2006 06:33:29 -0500 (EST) Received: by zproxy.gmail.com with SMTP id n1so720533nzf for ; Thu, 30 Mar 2006 03:33:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tauor8ex0temVoHhpKYwdepE4eU5ujT43Efb3Nu+DThdqgBCYaZVPiiWgIczzyiNCE5FXtlwP4kwu+lAKX2Uiq6ADP1Dw3McnwBPhylVLHemI4aiLhp9OUTycRxpzf8ifvRQWha2cLEm6wpyykKSfAHVLNh1I23GohrIHM18Cjw= Received: by 10.36.50.8 with SMTP id x8mr1303503nzx; Thu, 30 Mar 2006 03:33:28 -0800 (PST) Received: by 10.37.21.49 with HTTP; Thu, 30 Mar 2006 03:33:28 -0800 (PST) Message-ID: Date: Thu, 30 Mar 2006 13:33:28 +0200 From: "Dov Grobgeld" To: gtk-perl-list@gnome.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <9da0760f0603300113l28bcdeaai41dbce7789047a4b@mail.gmail.com> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.517 tagged_above=-999 required=2 tests=[AWL=0.006, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.517 X-Spam-Level: Subject: Re: drawing shapes with color X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 11:33:33 -0000 Here's what I use: #!/usr/bin/perl use Gtk2 '-init'; { my %allocated_colors; sub get_color { my ($colormap, $name) =3D @_; my $ret; if ($ret =3D $allocated_colors{$name}) { return $ret; } my $color =3D Gtk2::Gdk::Color->parse($name); $colormap->alloc_color($color,TRUE,TRUE); $allocated_colors{$name} =3D $color; return $color; } } sub draw_line { my($widget) =3D shift; my($line) =3D shift; my($color) =3D shift; my $colormap =3D $widget->window->get_colormap; my $gc =3D $widget->{gc} || new Gtk2::Gdk::GC $widget->window; $gc->set_foreground(get_color($colormap, $color)); $widget->window->draw_line($gc, @$line); } # Draw a line in the expose callback sub cb_da_event { my $this =3D shift; my $event =3D shift; if ($event->type eq "expose") { draw_line($this, [30,30, 200,100], "red"); } } sub create_widgets { my $mw =3D Gtk2::Window->new(); my $w_drawing_area =3D Gtk2::DrawingArea->new(); $mw->add($w_drawing_area); $w_drawing_area->set_size_request(256,256); $w_drawing_area->signal_connect(event=3D>\&cb_da_event); $mw->show_all; } create_widgets(); main Gtk2; Hope this helps. Regards, Dov On 3/30/06, Veli Ogla Sungutay wrote: > Would someone please show me how to draw a shape, say a rectangle or a > line with some color on????? I would really appreciate it. I've been > trying to find my way around these and to no avail: > > ## IMAGE WORKING: > $hbox->realize(); > ($pixmap,$mask)=3DGtk2::Gdk::Pixmap->create_from_xpm($hbox->window,undef,= "image.jpg"); > $img =3D Gtk2::Image->new_from_pixmap($pixmap,$mask); > $vbox->pack_start($img,FALSE,FALSE,0); > > ## GARBAGE BG, white line > $pixmap =3D Gtk2::Gdk::Pixmap->new($hbox->window,100,100,-1); > $gc =3D $hbox->style->fg_gc('selected'); > $pixmap->draw_line($gc,0,0,100,100); > $img2 =3D Gtk2::Image->new_from_pixmap($pixmap,undef); > $vbox->pack_start($img2,FALSE,FALSE,0); > > > ## WORKING > $pixmap =3D Gtk2::Gdk::Pixmap->new(undef,100,100,-1); > $gc =3D $hbox->style->fg_gc('selected'); > $pixmap->draw_rectangle($gc,TRUE,0,0,100,100); > > ## GARBAGE BG > $pixmap =3D Gtk2::Gdk::Pixmap->new(undef,100,100,-1); > $gc =3D $hbox->style->fg_gc('selected'); > $pixmap->draw_line($gc,0,0,100,100); > $img =3D Gtk2::Image->new_from_pixmap($pixmap,undef); > $vbox->pack_start($img,FALSE,FALSE,0); > > > > > ## EITHER GETTING BLACK RECT OR GARBAGE depending on the draw_ methods > my $pixmap =3D Gtk2::Gdk::Pixmap->new(undef,100,100,-1); > my $gc =3D Gtk2::Gdk::GC->new($pixmap); > my $c =3D Gtk2::Gdk::Color->new(65535,65535,65535); > my $c2 =3D Gtk2::Gdk::Color->new(32000,0,0); > $gc->set_background($c); > $gc->set_foreground($c2); > $pixmap->draw_rectangle($gc,TRUE,0,0,100,100); > $img =3D Gtk2::Image->new_from_pixmap($pixmap,undef); > $vbox->pack_start($img,FALSE,FALSE,0); > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list > From zentara1@sbcglobal.net Thu Mar 30 07:49:43 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 4006A3B2ED6 for ; Thu, 30 Mar 2006 07:49: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 14162-06 for ; Thu, 30 Mar 2006 07:49:41 -0500 (EST) Received: from smtp103.sbc.mail.re2.yahoo.com (smtp103.sbc.mail.re2.yahoo.com [68.142.229.102]) by menubar.gnome.org (Postfix) with SMTP id BD0903B1F96 for ; Thu, 30 Mar 2006 07:49:37 -0500 (EST) Received: (qmail 74989 invoked from network); 30 Mar 2006 12:49:37 -0000 Received: from unknown (HELO zentara.zentara.net) (zentara1@sbcglobal.net@70.229.47.158 with login) by smtp103.sbc.mail.re2.yahoo.com with SMTP; 30 Mar 2006 12:49:36 -0000 Date: Thu, 30 Mar 2006 07:49:15 -0500 From: zentara To: gtk-perl-list@gnome.org Message-ID: <20060330074915.0a2ec8f8@zentara.zentara.net> In-Reply-To: References: <9da0760f0603300113l28bcdeaai41dbce7789047a4b@mail.gmail.com> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.14; 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=-0.691 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708] X-Spam-Score: -0.691 X-Spam-Level: Subject: Re: drawing shapes with color X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 12:49:43 -0000 On Thu, 30 Mar 2006 13:33:28 +0200 "Dov Grobgeld" wrote: >Here's what I use: > >#!/usr/bin/perl >use Gtk2 '-init'; Also: I just discovered the theme setting for DrawingArea. You need to specify NONE for bg_pixmap because the drawing area will use the default bg pixmap if defined. style "drawingarea" { # if you want to use bg colors, specify none # for bg_pixmap # bg_pixmap[NORMAL] = "bg.png" bg_pixmap[NORMAL] = "" bg[NORMAL] = { 1.0, 1.0, 1.0 } #white }class "GtkDrawingArea" style "drawingarea" I'm trying to collect as many theme modification syntax statements as I can, if you have any for unusual widgets, let me know pleae. :-) My theme derived from Bumblebee can be had at http://www.zentara.net/gtk2-theme -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html From hemlock@vtlink.net Thu Mar 30 21:00:26 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 6FF833B0672 for ; Thu, 30 Mar 2006 21:00: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 27779-10 for ; Thu, 30 Mar 2006 21:00:19 -0500 (EST) Received: from mail2.vtlink.com (srs.vtlink.com [64.30.24.44]) by menubar.gnome.org (Postfix) with SMTP id AD5CB3B0FDF for ; Thu, 30 Mar 2006 21:00:18 -0500 (EST) Received: (qmail 4895 invoked by uid 5142); 31 Mar 2006 02:00:10 -0000 Received: from hemlock@vtlink.net by mail2.vtlink.com by uid 5001 with qmail-scanner-1.22 ( Clear:RC:1(64.30.33.77):. Processed in 0.177046 secs); 31 Mar 2006 02:00:10 -0000 Received: from unknown (HELO ?10.0.1.3?) (hemlock@64.30.33.77) by mail2.vtlink.com with ESMTPA; 30 Mar 2006 21:00:10 -0500 Message-ID: <442C8D2B.2060602@vtlink.net> Date: Thu, 30 Mar 2006 21:00:11 -0500 From: James Muir User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: gtk-perl-list@gnome.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=-2.506 tagged_above=-999 required=2 tests=[AWL=0.017, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.506 X-Spam-Level: Subject: Unicode Pages Missing? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 02:00:26 -0000 Are Dov Grobgeld's Unicode pages still available? I am unable to access them from the link on the gtk2-perl documentation page. Bummer :-( http://gtk2-perl.sourceforge.net/doc/ -James From borup@borup.com Fri Mar 31 04:39:42 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 07E2F3B0D2E for ; Fri, 31 Mar 2006 04:39: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 20268-01 for ; Fri, 31 Mar 2006 04:39:40 -0500 (EST) Received: from fred.adapt.dk (fred.adapt.dk [129.142.227.162]) by menubar.gnome.org (Postfix) with ESMTP id F25973B0C73 for ; Fri, 31 Mar 2006 04:39:39 -0500 (EST) Received: from rose.i.adapt.dk ([130.228.247.194]) by fred.adapt.dk (8.12.11.20060308/8.12.10) with ESMTP id k2V9dY5k015026 for ; Fri, 31 Mar 2006 11:39:34 +0200 Received: from henrik.i.adapt.dk (henrik.i.adapt.dk [130.228.247.207]) by rose.i.adapt.dk (8.12.11.20060308/8.12.11) with ESMTP id k2V9dVQb027326 for ; Fri, 31 Mar 2006 11:39:32 +0200 From: Christian Borup To: gtk-perl-list@gnome.org In-Reply-To: <442C8D2B.2060602@vtlink.net> References: <442C8D2B.2060602@vtlink.net> Content-Type: text/plain Date: Fri, 31 Mar 2006 11:39:27 +0200 Message-Id: <1143797968.9586.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.347 tagged_above=-999 required=2 tests=[BAYES_00=-2.599, NORMAL_HTTP_TO_IP=0.175, TW_GT=0.077] X-Spam-Score: -2.347 X-Spam-Level: Subject: Re: Unicode Pages Missing? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 09:39:42 -0000 On Thu, 2006-03-30 at 21:00 -0500, James Muir wrote: > Are Dov Grobgeld's Unicode pages still available? I am unable to access > them from the link on the gtk2-perl documentation page. Bummer :-( His server seems to have died... But the content lives on in the Google cache. http://72.14.203.104/search?q=cache:Pp6aWj7ap8kJ:imagic.weizmann.ac.il/~dov/lectures/yapc-2004-perl-gtk2/slides.html+Dov+Grobgeld+unicode&hl=en&lr=&strip=1 ./borup From pagaltzis@gmx.de Fri Mar 31 05:27:41 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id D4B773B0841 for ; Fri, 31 Mar 2006 05:27: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 22604-02 for ; Fri, 31 Mar 2006 05:27:39 -0500 (EST) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by menubar.gnome.org (Postfix) with SMTP id 36B463B0892 for ; Fri, 31 Mar 2006 05:27:38 -0500 (EST) Received: (qmail invoked by alias); 31 Mar 2006 10:27:37 -0000 Received: from xdsl-213-196-221-246.netcologne.de (EHLO klangraum) [213.196.221.246] by mail.gmx.net (mp033) with SMTP; 31 Mar 2006 12:27:37 +0200 X-Authenticated: #163624 Date: Fri, 31 Mar 2006 12:27:46 +0200 From: "A. Pagaltzis" To: gtk-perl-list@gnome.org Message-ID: <20060331102746.GK28107@klangraum> Mail-Followup-To: gtk-perl-list@gnome.org References: <442C8D2B.2060602@vtlink.net> <1143797968.9586.1.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1143797968.9586.1.camel@localhost.localdomain> User-Agent: Mutt/1.4.2.1i X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.538 tagged_above=-999 required=2 tests=[AWL=0.062, BAYES_00=-2.599, SPF_PASS=-0.001] X-Spam-Score: -2.538 X-Spam-Level: Subject: Re: Unicode Pages Missing? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 10:27:41 -0000 * Christian Borup [2006-03-31 11:45]: >His server seems to have died... But the content lives on in the >Google cache. Or, more durably, the Wayback Machine: http://web.archive.org/web/20050307221500/http://imagic.weizmann.ac.il/~dov/lectures/yapc-2004-perl-gtk2/slides.html Regards, -- Aristotle Pagaltzis // From dov.grobgeld@gmail.com Fri Mar 31 06:22:09 2006 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (unknown [127.0.0.1]) by menubar.gnome.org (Postfix) with ESMTP id 071FC3B3271 for ; Fri, 31 Mar 2006 06:22: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 25012-06 for ; Fri, 31 Mar 2006 06:22:07 -0500 (EST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) by menubar.gnome.org (Postfix) with ESMTP id 246B73B0F48 for ; Fri, 31 Mar 2006 06:22:07 -0500 (EST) Received: by zproxy.gmail.com with SMTP id n1so1635894nzf for ; Fri, 31 Mar 2006 03:22:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=I8lt3j0dkYA6qIymRVQCTHAeiF6rzB6DifRPGj/orubF4MEkGc6tI9M2mRzdXw+fLgKFeCznwMoh4/MTexsev2OFvwmrirsg6rBaHPv731gq1KB9mnXkYQrKZE6LipdhFe+PH6dZ5CY9CTLw/o3fEy6MlJVUyhuFSeY1IO2hGc8= Received: by 10.36.120.19 with SMTP id s19mr24919nzc; Fri, 31 Mar 2006 03:22:06 -0800 (PST) Received: by 10.37.21.49 with HTTP; Fri, 31 Mar 2006 03:22:06 -0800 (PST) Message-ID: Date: Fri, 31 Mar 2006 14:22:06 +0300 From: "Dov Grobgeld" To: gtk-perl-list@gnome.org In-Reply-To: <20060331102746.GK28107@klangraum> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <442C8D2B.2060602@vtlink.net> <1143797968.9586.1.camel@localhost.localdomain> <20060331102746.GK28107@klangraum> X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Status: No, score=-2.518 tagged_above=-999 required=2 tests=[AWL=0.005, BAYES_00=-2.599, SPF_PASS=-0.001, TW_GT=0.077] X-Spam-Score: -2.518 X-Spam-Level: Subject: Re: Unicode Pages Missing? X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 11:22:09 -0000 Sorry, the imagic.weizmann.ac.il server on which they were hosted crashed recently. If I get write permission to the gtk2-perl project on sourceforge, I'd be happy to host the pages there. muppet, could you please add dov-g as a developer for gtk2-perl? I promise not to commit anything to cvs without permission. (Do developers have write access to the web site? I hope so...) James, please let me know if you want me to send the tar file with the slides to you. It is about 350k large. Regards, Dov On 3/31/06, A. Pagaltzis wrote: > * Christian Borup [2006-03-31 11:45]: > >His server seems to have died... But the content lives on in the > >Google cache. > > Or, more durably, the Wayback Machine: > > http://web.archive.org/web/20050307221500/http://imagic.weizmann.ac.il/~d= ov/lectures/yapc-2004-perl-gtk2/slides.html > > Regards, > -- > Aristotle Pagaltzis // > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list >