Glib::Timeout causing memory leak
I have this fairly large program. Recently I have discovered a memory leak occurring in two Glib::Timeouts and have not been able to discover the cause. The firs widget is a red off that switches to a green on when the use clicks the button. The second is similar and also includes a black label that displays a GPS location. These widgets are located in the same widget. When these time outs are running and the widget that contains them is open, memory usage increases and keeps going until windows crashes producing a blue screen. Vise versa when they are commented out the leakage goes away. Has anyone ever encountered this type of leak? Any ideas? Below is the code for the two time outs: #---Telemetry State--- sub tele_state { #Tele client connected if ($tele_start == 1 and $telemetry == 1) { $tele_status-set_markup( 'span size=large foreground=greenConnected/span'); if ($subflag = 4) { $tele_subscribe-set_markup( 'span size=small foreground=greentele subscribe/span'); } if ($planflag = 3) { $fp_subscribe-set_markup( 'span size=small foreground=greenFP subscribe/span'); } } #Tele Client not connected elsif ($tele_start == 1 and $telemetry == 0) { $tele_status-set_markup( 'span size=large foreground=yellowNo Server/span'); } #tele client off else { $tele_status-set_markup( 'span size=large foreground=redOFF/span'); $tele_subscribe-set_markup( 'span size=small foreground=redtele Unsubscribe/span'); $fp_subscribe-set_markup( 'span size=small foreground=redFP Unsubscribe/span'); } #handle the button if ($tele_start == 0 and $tele_state eq 'Tele Disconnect') { $tele_button-set_label('Tele Connect'); $tele_state='Tele Connect'; } #Subscribed to atmospheric data if ($metflag == 3) {$met_subscribe-set_markup( 'span size=large foreground=greenSubscribe/span')} if ($metflag == 0) {$met_subscribe-set_markup( 'span size=large foreground=redUnsubscribe/span')} return 1; } #---GPS States--- sub gps_state { #GPS on and working if ($gps_start == 1 and defined($ns $lat $ew $lon $utc) and $lat != 0) { #display the current GPS position $gps_current-set_label($ns $lat, $ew $lon \n$utc); $gps_status-set_markup( 'span size=xx-large foreground=greenON/span'); } #GPS on but not working elsif ($gps_start == 1) { $gps_current-set_label(N/A); $gps_status-set_markup( 'span size=xx-large foreground=yellowNO DATA/span'); } elsif ($gps_current == 1) {} #GPS off else { $gps_current-set_label(N/A); $gps_status-set_markup( 'span size=xx-large foreground=redOFF/span'); } return 1; } called by: my $timer_tele = Glib::Timeout-add(1000, \tele_state); my $timer_gps = Glib::Timeout-add(1000, \gps_state); -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahow...@gmail.com ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Gdk warnings
I am getting these warning that preceed a crash: Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command. at GRRUVI-v1.61.pl line 195. Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect. at GRRUVI-v1.61.pl line 195. Gdk-WARNING **: gdkdrawable-win32.c:1782: CreateCompatibleDC failed: The operation completed successfully. at GRRUVI-v1.61.pl line 195. They all point to the Gtk2-main loop. The app crashes after 10 minutes of idle work. I am having trouble finding the source of the errors. Any ideas? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jlahow...@gmail.com ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: Gtk2::Imageview install
On Fri, Mar 27, 2009 at 12:57 PM, Brian Manning elspicyj...@gmail.comwrote: On Fri, Mar 27, 2009 at 8:56 AM, Jamie Lahowetz jlahow...@gmail.com wrote: I went ahead and added these to the EXTRALIBS/LDLOADLIBS: [snippage] and ran dmake. I then got these errors: Running Mkbootstrap for Gtk2::ImageView () AnimView.o:AnimView.c:(.text+0x7c): undefined reference to `gtk2perl_new_gtkobject' [snippage] collect2: ld returned 1 exit status dmake: Error code 129, while making 'blib\arch\auto\Gtk2\ImageView\ImageView.dll' Any reason why didn't you add the new library that you just compiled and installed to the above list of EXTRALIBS/LDLOADLIBS libraries? I added this to the above: C:\camelbox\lib\libgtkimageview.dll.a And this to INC: -IC:/camelbox/include/gtkimageview still get: Running Mkbootstrap for Gtk2::ImageView () C:\camelbox\bin\perl.exe -MExtUtils::Command -e chmod 644 ImageView.bs dlltool --def ImageView.def --output-exp dll.exp [ LD blib\arch\auto\Gtk2\ImageView\ImageView.dll ] AnimView.o:AnimView.c:(.text+0x7c): undefined reference to `gtk2perl_new_gtkobje ct' ImageNav.o:ImageNav.c:(.text+0x90): undefined reference to `gtk2perl_new_gtkobje ct' ImageScrollWin.o:ImageScrollWin.c:(.text+0xa7): undefined reference to `gtk2perl _new_gtkobject' ImageView.o:ImageView.c:(.text+0x7c): undefined reference to `gtk2perl_new_gtkob ject' collect2: ld returned 1 exit status dmake: Error code 129, while making 'blib\arch\auto\Gtk2\ImageView\ImageView.dl l' Thanks, Brian -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Gtk2::Imageview install
I just got gtkimageview installed using MSYS on my windows system (put it under my camelbox). I am now trying to install the module Gtk2::Imageview. I gave it a go and got this: C:\camelbox\.cpan\build\Gtk2-ImageView-0.04-h_IrCkperl Makefile.PL Including generated API documentation... WARNING: EXTRA_META is not a known parameter. Checking if your kit is complete... Looks good 'EXTRA_META' is not a known MakeMaker parameter name. Note (probably harmless): No library found for -lgtk-win32-2.0 Note (probably harmless): No library found for -lgdk-win32-2.0 Note (probably harmless): No library found for -latk-1.0 Note (probably harmless): No library found for -lgdk_pixbuf-2.0 Note (probably harmless): No library found for -lpangowin32-1.0 Note (probably harmless): No library found for -lpangocairo-1.0 Note (probably harmless): No library found for -lpango-1.0 Note (probably harmless): No library found for -lcairo Note (probably harmless): No library found for -lgobject-2.0 Note (probably harmless): No library found for -lgmodule-2.0 Note (probably harmless): No library found for -lglib-2.0 Note (probably harmless): No library found for -lintl Note (probably harmless): No library found for -lgthread-2.0 Writing Makefile for Gtk2::ImageView These libs should be available since camelbox comes with Gtk. Any idea? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: gktimageview on windows
If your talking about my post, it is still unsolved as far as I'm aware. 2009/3/16 Jeff Hallock jhall...@wbanda.com This topic (and solution) was recently discussed on the camelbox mailing list. *Jeffrey Hallock *Data Processing Programmer WBA Market Research 2191 Defense Highway, Suite 401 Crofton, MD 21114 Phone: (607) 330-5300 x318 Fax: (607) 273-0295 [image: WBA_Logo RGB] *This email may contain information that is confidential or privileged. If you are not the intended recipient, any use, disclosure, copying or distribution of this message or any attachments is strictly prohibited. If you have received this message in error, please notify the sender and destroy any and all copies. Thank you.* -- *From:* gtk-perl-list-boun...@gnome.org [mailto: gtk-perl-list-boun...@gnome.org] *On Behalf Of *Jamie Lahowetz *Sent:* Friday, March 13, 2009 4:30 PM *To:* gtk-perl-list@gnome.org *Subject:* gktimageview on windows How can I gt this on windows so that I can install Gtk2::Imageview? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.13/1999 - Release Date: 03/13/09 05:59:00 ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu image001.jpg___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: Re-sampling a 32 bit geotif
Here is the output: C:\Users\deadpickle\Desktop\UAS\GRRUVI2_ucconvert -depth 24 NED_52181266.tif NE D_52181266.24bit.tif convert: NED_52181266.tif: unknown field with tag 33550 (0x830e) encountered. `T IFFReadDirectory' @ tiff.c/TIFFWarnings/526. convert: NED_52181266.tif: unknown field with tag 33922 (0x8482) encountered. `T IFFReadDirectory' @ tiff.c/TIFFWarnings/526. convert: NED_52181266.tif: unknown field with tag 34735 (0x87af) encountered. `T IFFReadDirectory' @ tiff.c/TIFFWarnings/526. convert: NED_52181266.tif: unknown field with tag 34737 (0x87b1) encountered. `T IFFReadDirectory' @ tiff.c/TIFFWarnings/526. Though in Arcmap the new geotif wont load. I got these from the USGS seamless server. Its the only place I can think of to get geotiffs. If anyone knows somewhere else that would help. On Sun, Mar 8, 2009 at 12:16 AM, Brian Manning elspicyj...@gmail.comwrote: 2009/3/7 Jamie Lahowetz jlahow...@gmail.com: I tried to make a test script but it crashes when trying to read the geotif. Any ideas? Try ImageMagick from the command line? convert -depth 24 NED_52181266.tif NED_52181266.24bit.tif If it crashes there, then you need to find some other tool to convert it. You may get some usable error output however. Does the program that created those TIFF files have some kind of bit depth option you can use? Thanks, Brian 2009/3/7 Jamie Lahowetz deadpic...@gmail.com: I am trying to display a geotif using Gtk2::Gdk::Pixbuf but the geotif is 32 bits and only a 24 bit image can be read in. I want to know if there is a way to resample the geotif so that it can be loaded into my Perl program. I imagine Imagemagick is your friend... Regards Jeff -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: Re-sampling a 32 bit geotif
I tried to make a test script but it crashes when trying to read the geotif. Any ideas? #!/usr/local/bin/perl -w use strict; use Image::Magick; my($image, $x); $image = Image::Magick-new; $x = $image-Read('NED_52181266.tif'); warn $x if $x; my ($width, $height) = $image-Get('columns', 'rows'); print $width,$height\n; On Sat, Mar 7, 2009 at 3:43 AM, Jeffrey Ratcliffe jeffrey.ratcli...@gmail.com wrote: 2009/3/7 Jamie Lahowetz deadpic...@gmail.com: I am trying to display a geotif using Gtk2::Gdk::Pixbuf but the geotif is 32 bits and only a 24 bit image can be read in. I want to know if there is a way to resample the geotif so that it can be loaded into my Perl program. I imagine Imagemagick is your friend... Regards Jeff -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re-sampling a 32 bit geotif
I am trying to display a geotif using Gtk2::Gdk::Pixbuf but the geotif is 32 bits and only a 24 bit image can be read in. I want to know if there is a way to resample the geotif so that it can be loaded into my Perl program. -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 jrl9...@huskers.unl.edu ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: Goo::Canvas, how to delete an item
Hello, I havent worked on this for a while but I was able to get my program to remove a waypoint by using this scheme, it may help you some: #remove waypoints if ($event-type eq button-press $event-button == 3){ my ($x,$y) = ($event-x,$event-y); print right click\n; my $items = $canvas-get_item_at($x,$y,TRUE); my $parent = $items-get_parent; print $parent\n; $parent-remove; } Looking at the goocanvas H files I noticed that destroy is not in there. hopefully it will be added :) On Sun, Aug 3, 2008 at 10:48 AM, zentara [EMAIL PROTECTED] wrote: Hi, I can't figure out how to delete an item from a Goo::Canvas. In the Gnome2::Canvas and the Goo::Canvas, items are based on Glib::Object. In Gnome2::Canvas, you can say $item-destroy, and it works. In Goo::Canvas, an error is generated: Can't locate object method destroy via package Goo::Canvas::Ellipse even though it is based on a Glib::Object. I admit, that a Gnome2::Canvas::Item inherits from Gtk2::Object, which also contains a destroy method, but shouldn't the Glib::Object destroy be found? I realize that the Goo::Canvas is in beta, but is there a trick I must use to get destroy to work? Thanks, zentara #!/usr/bin/perl -w use strict; use warnings; use Goo::Canvas; use Gtk2 '-init'; use Glib qw(TRUE FALSE); my $e1; my $window = Gtk2::Window-new('toplevel'); $window-signal_connect('delete_event' = sub { Gtk2-main_quit; }); $window-set_default_size(680, 600); my $vbox = Gtk2::VBox-new; $vbox-set_border_width(4); $vbox-show; my $hbox = Gtk2::HBox-new(FALSE, 4); $vbox-pack_start($hbox, FALSE, FALSE, 0); $hbox-show; $window-add($vbox); my $swin = Gtk2::ScrolledWindow-new; $swin-set_shadow_type('in'); $vbox-pack_start($swin, 1, 1, 0); my $cwidth = 1000; my $cheight = 1000; my $canvas = Goo::Canvas-new(); $canvas-set_size_request(600, 450); # minimum size on screen $canvas-set_bounds(0, 0, $cwidth, $cheight); # scrollregion $swin-add($canvas); my $root = $canvas-get_root_item(); $canvas-signal_connect('button-press-event', \on_can_button_press); my $button = Gtk2::Button-new ('Draw'); $button-signal_connect (clicked = \clicked ); $hbox-pack_start($button, FALSE, FALSE, 10); $button-show(); $window-show_all(); Gtk2-main; sub clicked { my $cur_lab = $button-get_label(); #print $cur_lab\n; if($cur_lab eq 'Draw'){ $button-set_label('Clear'); print Starting action\n; draw(); }elsif($cur_lab eq 'Clear'){ $button-set_label('Draw'); print Stopping action\n; clear; } } sub draw{ # item = Goo::Canvas::Ellipse-new ($parent, $center_x, $center_y, # $radius_x, $radius_y, ...) $e1 = Goo::Canvas::Ellipse-new( $root, 310, 300,300, 225, 'stroke-color' = 'black', 'line-width' = 2, 'fill-color-rgba' = 0x3cb3f111, ); return 0; } sub clear{ $e1-destroy; undef $e1; return 0; } sub on_can_button_press { my ( $widget, $event ) = @_; # print $widget ,' ',$event-type,\n; my ($x,$y) = ($event-x,$event-y); print $x $y\n; return TRUE; } __END__ -- I'm not really a human, but I play one on earth. http://zentara.net/Remember_How_Lucky_You_Are.html ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Fwd: Gtk2 and Windows exe
-- Forwarded message -- From: Jamie Lahowetz [EMAIL PROTECTED] Date: Thu, Jul 3, 2008 at 11:25 AM Subject: Re: Gtk2 and Windows exe To: rahed [EMAIL PROTECTED] I have the Gtk+ environment installed on the computer. I built the perl exe using perl2exe and when i go to run it on the computer I get the error: The procedure entry point g_assertion_message could not be located in the dynamic link library libglib-2.0-0.dll Any ideas? This program use to work when the gtk+ runtime library was installed on the system. On Tue, Jun 17, 2008 at 1:33 PM, rahed [EMAIL PROTECTED] wrote: Jamie Lahowetz [EMAIL PROTECTED] writes: I keep getting the popup error: This application has failed to start because Cairo.dll was not found. Re-installing the application may fix this problem when I run the pp cmd: C:\Documents and Settings\UAS\Desktop\GRRUVIpp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Cairo.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl or C:\Documents and Settings\UAS\Desktop\GRRUVIpp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Gtk2\Gtk2.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl If it's of any help, this is a long list of dll libraries included with pp to pack my Gtk2 application: -l C:/GTK/libiconv/bin/iconv.dll -l C:/GTK/bin/libpng12.dll -l C:/GTK/bin/charset.dll -l C:/GTK/bin/zlib1.dll -l C:/GTK/libxml/bin/libxml2.dll -l C:/GTK/bin/libmodule-2.0-0 -l C:/perl5-10/site/lib/auto/Cairo/Cairo.dll -l C:/perl5-10/site/lib/auto/Gtk2/Gtk2.dll -l C:/perl5-10/site/lib/auto/Glib/Glib.dll -l C:/perl5-10/site/lib/auto/Gtk2/GladeXML/GladeXML.dll -l C:/GTK/bin/libglib-2.0-0.dll -l C:/GTK/bin/libglade-2.0-0.dll -l C:/GTK/bin/intl.dll -l C:/GTK/bin/libatk-1.0-0.dll -l C:/GTK/bin/libcairo-2.dll -l C:/GTK/bin/libgdk_pixbuf-2.0-0.dll -l C:/GTK/bin/libgdk-win32-2.0-0.dll -l C:/GTK/bin/libgmodule-2.0-0.dll -l C:/GTK/bin/libgobject-2.0-0.dll -l C:/GTK/bin/libgthread-2.0-0.dll -l C:/GTK/bin/libgtk-win32-2.0-0.dll -l C:/GTK/bin/libpango-1.0-0.dll -l C:/GTK/bin/libpangocairo-1.0-0.dll -l C:/GTK/bin/libpangowin32-1.0-0.dll -l C:/GTK/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-jpeg.dll -l C:/gnu/GnuWin32/jpeg62.dll -l C:/GTK/lib/pango/1.6.0/modules/pango-basic-win32.dll -l C:/GTK/bin/libfontconfig-1.dll -l C:/GTK/bin/xmlparse.dll -l C:/GTK/bin/xmltok.dll -l C:/GTK/bin/libfreetype-6.dll -l C:/GTK/bin/libpangoft2-1.0-0.dll -- Radek ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Gtk2 and Windows exe
I keep getting the popup error: This application has failed to start because Cairo.dll was not found. Re-installing the application may fix this problem when I run the pp cmd: C:\Documents and Settings\UAS\Desktop\GRRUVIpp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Cairo.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl or C:\Documents and Settings\UAS\Desktop\GRRUVIpp -I GRRUVI.ICO -l C:\camelbox\site\lib\auto\Gtk2\Gtk2.dll -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl On Mon, Jun 16, 2008 at 3:22 PM, rahed [EMAIL PROTECTED] wrote: Jamie Lahowetz [EMAIL PROTECTED] writes: Can't load 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified module c ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. at C:/camelbox/site/lib/PAR/Heavy.pm line 109 Compilation failed in require at script/GRRUVI-v1.40.pl line 11. BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl line 11. You probably miss some dll libraries which have to be included with -l switch during packing with pp. For instance using Gtk2 requires Glib which is an interface to glib libraries. -- Radek ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: Gtk2 and Windows exe
C:\Documents and Settings\UAS\Desktop\GRRUVIpp -i GRRUVI.ICO -o testGRRUVI-v1.40.exe GRRUVI-v1.40.pl On Mon, Jun 16, 2008 at 2:02 PM, Fluff [EMAIL PROTECTED] wrote: What pp-cmd are you using? /Fluff Den 2008-06-16 20:59, Jamie Lahowetz skrev: I'm trying to package a script into an exe using pp that contains Gtk2 widgets. When I go to run the script I get these errors: Can't load 'C:\DOCUME~1\UAS\LOCALS~1\Temp\par-UAS\cache-c5f2b5bc0399abd8abdbbdd3 a5b6fecd9c5ca6fd\3c52f058.dll' for module Gtk2: load_file:The specified module c ould not be found at C:/camelbox/lib/DynaLoader.pm line 203. at C:/camelbox/site/lib/PAR/Heavy.pm line 109 Compilation failed in require at script/GRRUVI-v1.40.pl http://GRRUVI-v1.40.pl line 11. BEGIN failed--compilation aborted at script/GRRUVI-v1.40.pl http://GRRUVI-v1.40.pl line 11. Was wondering, anyone know anything about this? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- /(bb|[^b]{2})/ that is the Question. ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Drawing lines on Gnome2::Canvas
Dont know if this fits this mailing list so I apologize if it doesnt. I'm trying to draw lines on a Gnome2::Canvas widget but the man page I found for Gnome2::Canvas::Line does not tell me much on how to do this. I was wondering if anyone has an example on how to draw a simple line from one point to another in Gnome2::Canvas? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
meta-data in geoTiff
I'm building a simple gtk2 geotiff app and I would like to extract the meta-data from the geotiff. Any ideas on how to do that? -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
having problems after installing camelbox
I have just switched from ActivePerl to Camelbox and am having trouble running my Gtk2 scripts ( I have deleted AP). I receive the popup errors: This application has failed to start because MSVCR80.dll was not found. This application has failed to start because Cairo.dll was not found. and the terminal shows: C:\Users\deadpickle\Desktop\testperl GRRUVI-v1.35.pl Can't load 'C:/camelbox/site/lib/auto/Gtk2/Gtk2.dll' for module Gtk2: load_file: The specified module could not be found at C:/camelbox/lib/DynaLoader.pm line 20 3. at GRRUVI-v1.35.pl line 13 Compilation failed in require at GRRUVI-v1.35.pl line 13. BEGIN failed--compilation aborted at GRRUVI-v1.35.pl line 13. The errors point to use Gtk2 in the script. -- Jamie Ryan Lahowetz University of Nebraska - Lincoln Graduate Student - Geosciences 249 Hardin Hall, Section 21 402.304.0766 [EMAIL PROTECTED] ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Textview not scrolling in Client
I have been struggling with this and I just cant seem to figure what the problem is. I have this IRC client that wont scroll far enough down to show the full text. Its rather hard to explain but I'll give it a try: when you get down to the bottom on the textview and you go to enter a message such as: *John(10:00:00) I have to go to the story today and get some fruit.* And this message is the last one to be entered before the bottom of the window therefore causing it to have to scroll down, the program only shows the first line: *John(10:00:00) I have to go to the story * Forcing the user to scroll down to view the rest: *today and get some fruit. * You can see that this would be a problem when users are chatting, having to always take your attention off of the session just to scroll down and view the whole message. Currently the program uses the code * $chat_textview-scroll_to_mark* where mark is defined as the end iter of the buffer. I cant figure how to get this to work and show the whole text without the user having to manually scroll down. I am wondering if the word wrapping is causing it since this behavior is true for a single unwrapped line. I would appreciate any help on this since it seems like such a simple thing and I cant figure it. #!/usr/local/bin/perl -w use strict; use Gtk2 '-init'; use Glib qw/TRUE FALSE/; use Net::IRC; use threads; use threads::shared; my $irc = new Net::IRC; my $chat_state = 'Connect'; my $chat_entry; my $chat_send_sig; my $chat_textview; my $chat_button; my $sys_msg; my $tag; my $die:shared = 0; my $chat_start:shared = 0; my $channel:shared = #GRRUVI; my $irc_server:shared = irc.servercentral.net; my $nick:shared = VCBase; my $msg:shared; my $post:shared = 0; my $name:shared = 0; my $list:shared; # #Threads my $thread_chat = threads-new(\chat); # # #Timeout my $timer_post = Glib::Timeout-add(100, \post); # #---Main Loop--- chat_build; Gtk2-main; CHAT BLOCK #---chat Build--- sub chat_build { my $chat_window = Gtk2::Window-new('toplevel'); $chat_window-set_title('Chat Client'); $chat_window-set_position('center'); $chat_window-set_default_size( 300, 300 ); $chat_window-signal_connect(delete_event= sub{ $die = 1; $thread_chat-join; Gtk2-main_quit; }); $chat_entry = Gtk2::Entry-new; my $chat_vbox = Gtk2::VBox-new; my $chat_scroll = Gtk2::ScrolledWindow-new(undef, undef); $chat_scroll-set_policy('never', 'always'); $chat_scroll-set_shadow_type( 'etched-out'); $chat_textview = Gtk2::TextView-new; my $chat_buffer = $chat_textview-get_buffer; * $chat_buffer-create_mark( 'end', $chat_buffer-get_end_iter, FALSE ); $chat_buffer-signal_connect(insert_text = sub { $chat_textview-scroll_to_mark( $chat_buffer-get_mark('end'), 0.0, TRUE, 0.0, 1.0 ); }); * $chat_button = Gtk2::Button-new; $chat_button-set_label($chat_state); # allows for sending each line with an enter keypress $chat_send_sig = $chat_entry-signal_connect ('key-press-event' = sub { my ($widget,$event)= @_; if( $event-keyval() == 65293){ # a return key press $msg = $chat_entry-get_text; $chat_entry-set_text(''); $chat_entry-set_position(0); $chat_start = 2; $name = $nick; $post = 6; #print $chat_start\n; } }); $chat_entry-signal_handler_block($chat_send_sig); #not connected yet $chat_entry-set_editable(0); $chat_textview-set_editable(0); $chat_textview-set_cursor_visible(0); $chat_textview-set_wrap_mode('char'); $chat_scroll-add($chat_textview); $chat_vbox-add($chat_scroll); $chat_vbox-pack_start( $chat_entry, FALSE, FALSE, 0 ); $chat_vbox-pack_start( $chat_button, FALSE, FALSE, 0 ); $chat_window-add($chat_vbox); $chat_window-show_all; $chat_button-signal_connect(clicked = sub { if ($chat_state eq 'Connect') { $chat_button-set_label('Disconnect'); $chat_state='Disconnect'; $chat_start = 1; $post = 1; } else { $chat_button-set_label('Connect'); $chat_state='Connect'; $chat_start = 0; $post = 5; } }); return 1; } #---Post to Textview--- sub post { my @time = gmtime; my $hour = $time[2]; my $min = $time[1]; my $sec = $time[0]; $hour = 0$time[2] if $time[2] 10; $min = 0$time[1] if $time[1] 10; $sec = 0$time[0] if $time[0] 10; my $post_time = ($hour:$min:$sec); my $chat_buffer = $chat_textview-get_buffer;
Re: Installing Gtk2 using PPM on Windows
I ran the program in a terminal window and received this 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:/Perl/lib/DynaLoader.pm line 229. I didnt find much on goolge about this. I hope someone here can help me out. On 8/11/07, Jamie Lahowetz [EMAIL PROTECTED] wrote: I am trying to install Gtk2-perl on my Windows XP comp. So far here is what I have done: *Downloaded and installed Gtk+/Win32 Runtime Environment 2.10.11 *Added repository to PPM; ppm repo add http://www.lostmind.de/gtk2-perl/ppm/ *Installed Gtk2 1.141 using PPM After that I went to test the install to see if it worked. I used an example Gtk2 script. Upon Running the script I receive the error: The procedure entry point g_type_default_interface_unref could not be located in the dynamic link library libgobject-2.0-0.dll What does this error mean? How can I fix it? -- Jamie Lahowetz -- Jamie Lahowetz ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
StatusIcon error
I have been trying to get Gtk2::SatusIcon to work correctly. I am using ActivePerl with Gtk2 1.141 compiled with gtk+ runtime environment 2.10.11and when I go to run a script using Gtk2::StatusIcon I get the error Can't locate object method new via package Gtk2::StatusIcon at test.pl line 7 where the line in question is my $icon = Gtk2::StatusIcon-new();. Any idea on whats going on? CODE #!/usr/bin/perl use Gtk2 '-init'; use strict; my $icon = Gtk2::StatusIcon-new(); $icon-set_from_stock('open'); $icon-set_visible(1); $icon-signal_connect('popup-menu' = sub { show_icon_menu($icon); } ); $icon-set_tooltip('Gtk2 BitlBee, B...'); print StatusIcon loaded\n; sub show_icon_menu { my $menu = Gtk2::Menu-new(); my $menuitem = Gtk2::MenuItem-new('Preferences'); my $nicksitem = Gtk2::MenuItem-new('Nicks'); $nicksitem-show(); my $allnicks = new Gtk2::Menu-new(); my @nicks = ('foo', 'bar', 'me', 'you'); foreach my $nick (@nicks) { my $nickitem = Gtk2::MenuItem-new($nick); $nickitem-show(); $allnicks-append($nickitem); } $nicksitem-set_submenu($allnicks); $menuitem-show(); $menuitem-signal_connect('activate', sub { print Click\n; }); $menu-append($menuitem); $menu-append($nicksitem); $menu-show_all(); $menu-popup(undef, undef, sub { return Gtk2::StatusIcon::position_menu($menu, 0, 0, $icon); }, [1,1], 0, 0 ); } Gtk2-main; -- Jamie Lahowetz ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Installing Gtk2 using PPM on Windows
I am trying to install Gtk2-perl on my Windows XP comp. So far here is what I have done: *Downloaded and installed Gtk+/Win32 Runtime Environment 2.10.11 *Added repository to PPM; ppm repo add http://www.lostmind.de/gtk2-perl/ppm/ *Installed Gtk2 1.141 using PPM After that I went to test the install to see if it worked. I used an example Gtk2 script. Upon Running the script I receive the error: The procedure entry point g_type_default_interface_unref could not be located in the dynamic link library libgobject-2.0-0.dll What does this error mean? How can I fix it? -- Jamie Lahowetz ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: GLib-GObject errors on exitGLib-GObject error on exit
I receive the following errors when I exit my program and I'm wondering what they are and what could cause them? GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion `G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion `G_IS_OBJECT (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed during global destruction. I would post the script as well but it is rather large and I'm not sure what the errors are or where they occur. ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Gtk2 and placing widgets in Gtk2::Menu
I am using Gtk2-perl. What I am trying to do is use the Gtk2::Menu to add a Gtk2::Progressbar to the Menu widget. The idea is to have a window that pops up only when the user left clicks the system tray icon. Is this possible to do? If not is there another way I can do this? Below is a code snippet of the program I am writing. the Gtk2::Progressbar widget will be located in the interface subroutine. #!/usr/bin/perl -w use strict; use warnings; use threads; use threads::shared; use Glib qw/TRUE FALSE/; use Gtk2 '-init'; use Gtk2::TrayIcon; #user variables my $icon_main = Gtk2::Gdk::Pixbuf-new_from_file(/home/deadpickle/Desktop/Gtk2/test.png); my $icon_nav = Gtk2::Gdk::Pixbuf-new_from_file(/home/deadpickle/Desktop/Gtk2/uvnav.png); my $icon_vci = Gtk2::Gdk::Pixbuf-new_from_file(/home/deadpickle/Desktop/Gtk2/vci.png); my $time = 120; #icon goes in box, box goes in tray my $icon = Gtk2::Image-new_from_pixbuf($icon_main); my $eventbox = Gtk2::EventBox-new; $eventbox-add($icon); my $tray = Gtk2::TrayIcon-new('Test'); $tray-add($eventbox); #tooltip my $tooltip = Gtk2::Tooltips-new; $tooltip-set_tip($tray, GRRUVI v1.0); #events and timeouts $eventbox-signal_connect('button_release_event', \click); #show tray $tray-show_all; #end event loop Gtk2-main; #handles tray clicks sub click { #left mouse button if ($_[1]-button == 1) { interface; } #right mouse button elsif ($_[1]-button == 3) { menu; } return 1; } #right click menu sub menu { my $menu = Gtk2::Menu-new(); #VCI my $menu_VCI = Gtk2::ImageMenuItem-new_with_label(VCI); $menu_VCI-set_image(Gtk2::Image-new_from_stock('gtk-refresh', 'menu')); $menu-add($menu_VCI); #configure my $menu_pref = Gtk2::ImageMenuItem-new_with_label(Configure); $menu_pref-set_image(Gtk2::Image-new_from_stock('gtk-preferences', 'menu')); $menu-add($menu_pref); #separator my $menu_sep = Gtk2::SeparatorMenuItem-new(); $menu-add($menu_sep); #Quit my $menu_quit = Gtk2::ImageMenuItem-new_with_label(Quit); $menu_quit-signal_connect(activate = sub {Gtk2-main_quit}); $menu_quit-set_image(Gtk2::Image-new_from_stock('gtk-quit', 'menu')); $menu-add($menu_quit); $menu-show_all; #popup menu, the three is for right mouse button $menu-popup(undef,undef,undef,3,undef,undef); return 1; } #Program interfaces sub interface { my $interface = Gtk2::Menu-new; #menu items for VCI #Progress bar for number of downloads; just a countng bar #Add the correct controls to menu my $menu_vci_connect = Gtk2::ImageMenuItem-new_with_label(Connect); $interface-add($menu_vci_connect); my $menu_vci_stop = Gtk2::ImageMenuItem-new_with_label(Stop); $interface-add($menu_vci_stop); $interface-show_all; $interface-popup(undef,undef,undef,1,undef,undef); } -- Jamie Lahowetz Software Developer GRRUVI Project ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Gtk2-perl: Menu containing Progressbar
I am using Gtk2-perl. What I am trying to do is use the Gtk2::Menu to add a Gtk2::Progressbar to the Menu widget. The idea is to have a window that pops up only when the user left clicks the system tray icon. Is this possible to do? If not is there another way I can do this? Below is a code snippet of the program I am writing. the Gtk2::Progressbar widget will be located in the interface subroutine. #!/usr/bin/perl -w use strict; use warnings; use threads; use threads::shared; use Glib qw/TRUE FALSE/; use Gtk2 '-init'; use Gtk2::TrayIcon; #user variables my $icon_main = Gtk2::Gdk::Pixbuf-new_from_file(/home/deadpickle/Desktop/Gtk2/test.png); my $icon_nav = Gtk2::Gdk::Pixbuf-new_from_file(/home/deadpickle/Desktop/Gtk2/uvnav.png); my $icon_vci = Gtk2::Gdk::Pixbuf-new_from_file(/home/deadpickle/Desktop/Gtk2/vci.png); my $time = 120; #icon goes in box, box goes in tray my $icon = Gtk2::Image-new_from_pixbuf($icon_main); my $eventbox = Gtk2::EventBox-new; $eventbox-add($icon); my $tray = Gtk2::TrayIcon-new('Test'); $tray-add($eventbox); #tooltip my $tooltip = Gtk2::Tooltips-new; $tooltip-set_tip($tray, GRRUVI v1.0); #events and timeouts $eventbox-signal_connect('button_release_event', \click); #show tray $tray-show_all; #end event loop Gtk2-main; #handles tray clicks sub click { #left mouse button if ($_[1]-button == 1) { interface; } #right mouse button elsif ($_[1]-button == 3) { menu; } return 1; } #right click menu sub menu { my $menu = Gtk2::Menu-new(); #VCI my $menu_VCI = Gtk2::ImageMenuItem-new_with_label(VCI); $menu_VCI-set_image(Gtk2::Image-new_from_stock('gtk-refresh', 'menu')); $menu-add($menu_VCI); #configure my $menu_pref = Gtk2::ImageMenuItem-new_with_label(Configure); $menu_pref-set_image(Gtk2::Image-new_from_stock('gtk-preferences', 'menu')); $menu-add($menu_pref); #separator my $menu_sep = Gtk2::SeparatorMenuItem-new(); $menu-add($menu_sep); #Quit my $menu_quit = Gtk2::ImageMenuItem-new_with_label(Quit); $menu_quit-signal_connect(activate = sub {Gtk2-main_quit}); $menu_quit-set_image(Gtk2::Image-new_from_stock('gtk-quit', 'menu')); $menu-add($menu_quit); $menu-show_all; #popup menu, the three is for right mouse button $menu-popup(undef,undef,undef,3,undef,undef); return 1; } #Program interfaces sub interface { my $interface = Gtk2::Menu-new; #menu items for VCI #Progress bar for number of downloads; just a countng bar #Add the correct controls to menu my $menu_vci_connect = Gtk2::ImageMenuItem-new_with_label(Connect); $interface-add($menu_vci_connect); my $menu_vci_stop = Gtk2::ImageMenuItem-new_with_label(Stop); $interface-add($menu_vci_stop); $interface-show_all; $interface-popup(undef,undef,undef,1,undef,undef); } -- Jamie Lahowetz ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list