Hi monkies ;-)

I'm building a tool which will allow me to modify/set EXIF information for images (and prolly more in the future). This is my very first Gtk2 application. I've found the gtk-perl tutorial and I also know where to look up the API.

The subject is somewhat misleading: I *do* know how to create thumbnails et al., my problem is: my application freezes when I'm generating the thumbs, and of course, when all thumbs are generated, *pling* the application is back. How can I avoid this, and maybe use a Gtk2::ProgressBar to indicate that thumbs are being generated.
Or even better: how can update/redraw my application to show thumbs when they're being generated? So that you seem them appearing one at a time.

Ideas, hints, ... everything will be appreciated ;-)

Thanks!!

ugly try-out code for displaying the thumbs
for my $image (@images) { last if $total_count++ == 55; if(not $count){ $thumb_line = Gtk2::HBox->new(FALSE,1); $thumb_page->pack_start($thumb_line,FALSE,FALSE,5); } print "Thumbing ". $image->name."\n"; my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file ($image->name); my ($width,$height) = ($pixbuf->get_width, $pixbuf->get_height +); my ($scale_width,$scale_height) = $width > $height ? (80,70) : + (70,80); my $new_pixbuf = $pixbuf->scale_simple($scale_width,$scale_hei +ght,'GDK_INTERP_BILINEAR'); my $event_box = Gtk2::EventBox->new; $thumb_line->add($event_box); $event_box->show; my $image_widget = Gtk2::Image->new(); $image_widget->set_from_pixbuf($new_pixbuf); $image_widget->set_size_request(80,80); $image_widget->show; $event_box->add($image_widget); $event_box->signal_connect('button_press_event',\&image_clicke +d_event, $image->name); $event_box->window->set_cursor(Gtk2::Gdk::Cursor->new('hand1') +); $thumb_line->show; #$pbar->pulse(); #$pbar->show; $count = 0 unless ++$count < 10; $window->show; }

to ask a question is a moment of shame
to remain ignorant is a lifelong shame


In reply to Gtk2-perl: Create thumbnail pages by insaniac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.