From lestrol123@gmx.com Fri Feb 2 17:02:55 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 02584760EE for ; Fri, 2 Feb 2018 17:02:55 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.626 X-Spam-Level: X-Spam-Status: No, score=-1.626 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=no Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tVgIuH1oOYet for ; Fri, 2 Feb 2018 17:02:54 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by smtp.gnome.org (Postfix) with ESMTPS id 8E87E760E7 for ; Fri, 2 Feb 2018 17:02:53 +0000 (UTC) Received: from [84.13.56.39] ([84.13.56.39]) by 3c-app-mailcom-bs10.server.lan (via HTTP); Fri, 2 Feb 2018 18:02:49 +0100 MIME-Version: 1.0 Message-ID: From: "Les Trol" To: gtk-perl-list@gnome.org Subject: Overwrite mode in Gtk2::TextView Content-Type: text/html; charset=UTF-8 Date: Fri, 2 Feb 2018 18:02:49 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:dQYwGdyC2+FYOJ66ONstjT9fbY8GwuF3lf+jEfldHdt B6ZH6wc8JUurGjhb1KHVBTEmfOZ17oFUhOyTNaZf9p7JkkGQx6 gOGVMjrXEnpHAC3h2+Ua6YO4XWsJ7oeVh3cBYzdbrEavsy58QR ub9w3SfUoAkWWYnbgqLgaZFxGXiRHDCHOqLxnwsONbULPtzPyE NaXADDMoxmgKsSKbG4dBYBOfGecShIQ0hRG8qVmLR6PPSA0KFj BCcOzZ5U7CRpjFfT3BN5nlXEgqXSCVugrcwpI1nnkrESqAkXG9 XEz6DA= X-UI-Out-Filterresults: notjunk:1;V01:K0:pTgukzRVBrc=:QCjAw60uorrQZrPA7WXTui TtHUY7aNA70Dw61c8PXKxbyX+ZIEaMqmtg7HVgfZMRY7aAJ/YMlRoIDuydS+p+3jIy+0dnDLG ySFF202Hcj76kKuRO0PvLc3ZwtyAXO+fSST0EofkehyN7R5x7Loyvxab8zndEsQxdm144BjfQ +XiWYY5JL9tQFdCsZ6u7DmaYERjDPfDdnrVjHlrNOGWj0pdpRAXW/fjmm8RvyBha/5VyOpPGT 8E3VOvopT9UzUCy6pQVDAPczuDeWThB0RhuQhYgOMMTv8KT7RJQLCJthxnEXCEjH5EJR5e7tW sLTZaVTHe4wB7+dCNFKvmDTvnQlG5c6+FcVB/TpuzcgYVWNMXyYeYTPYdBgu/pmjyHFkyymGZ XNr/Z3ohiqv1Z1Z8GOhGWD3S0O3nr8oARmsY1oyt+WPYFc7Civ7UKjtE1fcjoRjNep/M5DUMJ ly2j54eE5fAarRVCxnJNJDi4IVG9C15A5/zvTFB5v+Jff6h2PWA9 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2018 17:02:55 -0000
Hello all,
 
I have a small but baffling problem, hopefully with an obvious solution.
 
I'm trying to write text to a Gtk2::TextView with overwrite mode turned on. For example, I might want to write the text:
 
> Hello world
 
...then overwrite the first word, to produce:
 
> Howdy world
 
...but I am actually getting:
 
>HowdyHello world
 
...indicating that overwrite mode isn't working at all. Any ideas, oh great Gtk megabrain?
 
---
 
#!/usr/bin/perl
 
use strict;
use diagnostics;
use warnings;
 
use Glib qw(TRUE FALSE);
use Gtk2 '-init';
 
# Open a Gtk2 window containing a Gtk2::TextView
my $window = Gtk2::Window->new('toplevel');
$window->set_title('Overwrite test');
$window->set_position('center');
$window->set_default_size(400, 400);
$window->signal_connect('delete-event' => sub {
 
    Gtk2->main_quit();
    exit;
});
             
my $scrollWin = Gtk2::ScrolledWindow->new(undef, undef);
$window->add($scrollWin);
$scrollWin->set_policy('automatic', 'automatic');      
$scrollWin->set_border_width(0);
 
my $textView = Gtk2::TextView->new;
$scrollWin->add_with_viewport($textView);
$textView->set_wrap_mode('word-char');
$textView->set_justification('left');
 
# Display some text
my $buffer = $textView->get_buffer();
$buffer->insert($buffer->get_start_iter(), "Hello world");
$window->show_all();
 
# Turn on overwrite mode
$textView->set_overwrite(TRUE);

# Check it's really on
print "Overwrite mode: " . $textView->get_overwrite . "\n";
 
# Overwrite the first word, changing "Hello world" to "Howdy world"
$buffer->insert($buffer->get_start_iter(), "Howdy");
 
# All done
Gtk2->main();
  
From jffry@posteo.net Sun Feb 4 19:16:25 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id A90A5760F6 for ; Sun, 4 Feb 2018 19:16:25 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.301 X-Spam-Level: X-Spam-Status: No, score=-4.301 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZmxBQHgsMD95 for ; Sun, 4 Feb 2018 19:16:24 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by smtp.gnome.org (Postfix) with ESMTPS id C5B49760DA for ; Sun, 4 Feb 2018 19:16:23 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 0C1BE20DC8 for ; Sun, 4 Feb 2018 20:16:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1517771780; bh=YtHywN+SbVCX72B4raQlb2fbtQ7yihZNO1P69E4EiWg=; h=From:Subject:To:Date:From; b=qDVJ9Kedxp49Gslz37jK9E8KvCyV1Z7/R5Qt8bMWo4X/x6qyETdeQ4TXYS2DIvhgg wMJD4mmC9+1dfgWycPd92H7cb+Qrev0cgrUrIWsaiwTSQqQqSO7qUEDbXSnfLScTpH BNvj1QL2J9gVhnLi1zreMUgaHZylkZ6MK+ginIdb9nZxEsesJTRl/QlN0HwrIqdfxA criFzS7ftPFSCwsXpKTGW2jipdd7RnEIvNlsBgvX+Lp7Obgdd2C6nq8SP7OnYE7S2M uvAVTdTUan0eVzmbLpkPBR52bqRZ78UjzMM0W0VooW38IrWyPUrqk30vyDcQxml9iv wYZNe7pwJZ+bA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3zZL6p5t1Tz9rxT for ; Sun, 4 Feb 2018 20:16:18 +0100 (CET) From: Jeff Subject: Re: GtkImageView and gtk+-3 To: gtk-perl-list@gnome.org References: <76ad45f6-bb05-92d0-c014-b3d067aaf415@posteo.net> <6ecbc29d-5075-bf21-70ad-d1539db6c32b@posteo.net> Message-ID: <2be26368-95e9-2286-4ac3-518907e89ee3@posteo.net> Date: Sun, 4 Feb 2018 20:16:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <6ecbc29d-5075-bf21-70ad-d1539db6c32b@posteo.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EaaKDomKMalJ1LGh52iNRpFrPg6p6ObY7" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2018 19:16:25 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EaaKDomKMalJ1LGh52iNRpFrPg6p6ObY7 Content-Type: multipart/mixed; boundary="ohyaf1JILd1CZHvPBgbKWsMQo1MwqJJew"; protected-headers="v1" From: Jeff To: gtk-perl-list@gnome.org Message-ID: <2be26368-95e9-2286-4ac3-518907e89ee3@posteo.net> Subject: Re: GtkImageView and gtk+-3 References: <76ad45f6-bb05-92d0-c014-b3d067aaf415@posteo.net> <6ecbc29d-5075-bf21-70ad-d1539db6c32b@posteo.net> In-Reply-To: <6ecbc29d-5075-bf21-70ad-d1539db6c32b@posteo.net> --ohyaf1JILd1CZHvPBgbKWsMQo1MwqJJew Content-Type: multipart/mixed; boundary="------------A8FB1558C3482FF65A6F9066" Content-Language: en-GB This is a multi-part message in MIME format. --------------A8FB1558C3482FF65A6F9066 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/01/18 19:04, Jeff wrote: > Some ten years ago various people on this list helped me write Perl > bindings for GtkImageView. [...] > Now I am trying to decide how to create the functionality of the widget= > in gtk+-3. I see a couple of options: [...] > 3. Do something basic in Perl. Is region selection even possible in pur= e > Perl? I've made some progress. Attached are a couple of small examples (drawingarea_pan.pl and drawingarea_rubberband.pl) for selecting a region of an image, and also panning and zooming an image. Probably thanks to Cairo, they are almost certainly quick enough for what I want, even though they are pure Perl. However, I don't understand why although panning and zooming works, the Cairo context never seems to reflect this in $context->user_to_device() If you run drawingarea_pan.pl, and try panning at various zoom levels in the top left hand corner (to keep the numbers small and simple), the coordinates are not affected by the zoom level or the amount of pan. What is going on? Why isn't user_to_device() working as I expect? Regards Jeff --------------A8FB1558C3482FF65A6F9066 Content-Type: application/x-perl; name="drawingarea_rubberband.pl" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="drawingarea_rubberband.pl" #!/usr/bin/perl use warnings; use strict; use List::Util qw/min max/; use Cairo; use Glib qw(TRUE FALSE); use Gtk3 -init; my $button_x =3D 0; my $button_y =3D 0; my $button_down =3D 0; my $selection =3D {x =3D> -10, y =3D> -10, width =3D> 0, height =3D> 0}; my $image_rect =3D {width =3D> 1000, height =3D> 1000}; my ($sb_selector_x, $sb_selector_y, $sb_selector_w, $sb_selector_h); my $show_selection =3D FALSE; system("convert -geometry $image_rect->{width}x$image_rect->{height} rose= : test.png"); my $image =3D Cairo::ImageSurface->create_from_png("test.png"); my $window =3D Gtk3::Window->new('toplevel'); $window->set_size_request (500, 500); $window->signal_connect('delete-event' =3D> sub{Gtk3->main_quit}); my $canvas =3D Gtk3::DrawingArea->new; $window->add($canvas); $canvas->signal_connect(draw =3D> \&_draw); $canvas->signal_connect('button-press-event' =3D> \&_button_pressed); $canvas->signal_connect('button-release-event' =3D> \&_button_released); $canvas->signal_connect('motion-notify-event' =3D> \&_motion); $canvas->set_app_paintable(TRUE); $canvas->add_events( Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3::Gdk::EventM= ask', 'exposure-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3::Gdk::Ev= entMask', 'button-press-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3::Gdk= ::EventMask', 'button-release-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3:= :Gdk::EventMask', 'pointer-motion-mask') ); $window->show_all; my $selector =3D selection($window); Gtk3->main; unlink 'test.png'; sub _button_pressed { my ($widget, $event) =3D @_; # left mouse button if ($event->button !=3D 1) { return FALSE } ($button_x, $button_y) =3D ($event->x, $event->y); $button_down =3D TRUE; $widget->get_window()->invalidate_rect($selection, FALSE); return TRUE; } sub _button_released { my ($widget, $event) =3D @_; $button_down =3D FALSE; $show_selection =3D FALSE; } sub _motion { my ($widget, $event) =3D @_; if (not $button_down) { return FALSE } # calculate the rectangle, give it the right orientation my ($x1, $y1) =3D ($button_x, $button_y); my ($x2, $y2) =3D ($event->x, $event->y); my $x =3D int(min($x1, $x2)); my $y =3D int(min($y1, $y2)); my $w =3D int(abs($x1-$x2)); my $h =3D int(abs($y1-$y2)); update_selector($widget, {x =3D> $x, y =3D> $y, width =3D> $w, height= =3D> $h}); } sub _draw { my ($widget, $context) =3D @_; # Create pixbuf $context->set_source_surface($image, 0, 0); $context->paint; if ($show_selection) { # to get a non-antialiased rubber band rectangle, # stroke needs half-integer coordinates, # and fill/clip integer coordinates to be sharp. my ($x, $y, $w, $h) =3D ($selection->{x}, $selection->{y}, $selection->{width}, $selection->{height})= ; if ($w <=3D 0 or $h <=3D 0) { return TRUE } $context->set_line_width(1); $context->set_source_rgb(0, 0, 0); $context->rectangle($x+1, $y+1, $w-2, $h-2); $context->set_source_rgba(0.2, 0.6, 0.8, 0.2); $context->fill(); $context->rectangle($x+0.5, $y+0.5, $w-1, $h-1); $context->set_source_rgba(0.2, 0.6, 0.8, 0.35); $context->set_line_width(1); $context->stroke(); } # suppress default expose handler return TRUE; } sub selection { my ($parent) =3D @_; my $window =3D Gtk3::Dialog->new; $window->set('transient-for', $parent); $window->set(title =3D> 'Selection'); my $vbox =3D $window->get_content_area; # table for nice layout my $grid =3D Gtk3::Grid->new; $vbox->pack_start( $grid, TRUE, TRUE, 0 ); # SpinButton for x my $hbox =3D Gtk3::HBox->new; my ( $row, $desc, $widget, $units ) =3D ( 0, 0, 1, 3 ); $grid->attach( $hbox, $desc, $row, $desc + 1, $row + 1 ); my $label =3D Gtk3::Label->new('x'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $widget, $row, $widget + 1, $row + 1 ); $sb_selector_x =3D Gtk3::SpinButton->new_with_range( 0, $image_rect->{width}, 1 ); $hbox->pack_end( $sb_selector_x, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $units, $row, $units + 1, $row + 1 ); $label =3D Gtk3::Label->new('pixels'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); # SpinButton for y $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $desc, ++$row, $desc + 1, $row + 1 ); $label =3D Gtk3::Label->new('y'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $widget, $row, $widget + 1, $row + 1 ); $sb_selector_y =3D Gtk3::SpinButton->new_with_range( 0, $image_rect->{height}, 1 ); $hbox->pack_end( $sb_selector_y, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $units, $row, $units + 1, $row + 1 ); $label =3D Gtk3::Label->new('pixels'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); # SpinButton for w $row +=3D 1; # don't know why this is necessary $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $desc, ++$row, $desc + 1, $row + 1 ); $label =3D Gtk3::Label->new('Width'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $widget, $row, $widget + 1, $row + 1 ); $sb_selector_w =3D Gtk3::SpinButton->new_with_range( 0, $image_rect->{width}, 1 ); $hbox->pack_end( $sb_selector_w, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $units, $row, $units + 1, $row + 1 ); $label =3D Gtk3::Label->new('pixels'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); # SpinButton for h $row +=3D 3; # don't know why this is necessary $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $desc, ++$row, $desc + 1, $row + 1 ); $label =3D Gtk3::Label->new('Height'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $widget, $row, $widget + 1, $row + 1 ); $sb_selector_h =3D Gtk3::SpinButton->new_with_range( 0, $image_rect->{height}, 1 ); $hbox->pack_end( $sb_selector_h, FALSE, TRUE, 0 ); $hbox =3D Gtk3::HBox->new; $grid->attach( $hbox, $units, $row, $units + 1, $row + 1 ); $label =3D Gtk3::Label->new('pixels'); $hbox->pack_start( $label, FALSE, TRUE, 0 ); # Callbacks if the spinbuttons change $sb_selector_x->{value_changed_signal} =3D $sb_selector_x->signal_con= nect( 'value-changed' =3D> sub { my %new_selection =3D %{$selection}; $new_selection{x} =3D $sb_selector_x->get_value; $sb_selector_w->set_range( 0, $image_rect->{width} - $new_sel= ection{x} ); update_selector($canvas, \%new_selection); } ); $sb_selector_y->{value_changed_signal} =3D $sb_selector_y->signal_con= nect( 'value-changed' =3D> sub { my %new_selection =3D %{$selection}; $new_selection{y} =3D $sb_selector_y->get_value; $sb_selector_h->set_range( 0, $image_rect->{height} - $new_se= lection{y} ); update_selector($canvas, \%new_selection); } ); $sb_selector_w->{value_changed_signal} =3D $sb_selector_w->signal_con= nect( 'value-changed' =3D> sub { my %new_selection =3D %{$selection}; $new_selection{width} =3D $sb_selector_w->get_value; $sb_selector_x->set_range( 0, $image_rect->{width} - $new_sel= ection{width} ); update_selector($canvas, \%new_selection); } ); $sb_selector_h->{value_changed_signal} =3D $sb_selector_h->signal_con= nect( 'value-changed' =3D> sub { my %new_selection =3D %{$selection}; $new_selection{height} =3D $sb_selector_h->get_value; $sb_selector_y->set_range( 0, $image_rect->{height} - $new_se= lection{height} ); update_selector($canvas, \%new_selection); } ); $window->show_all; return; } sub update_selector { my ($widget, $new_selection) =3D @_; $sb_selector_x->signal_handler_block( $sb_selector_x->{value_changed_signal}); $sb_selector_y->signal_handler_block( $sb_selector_y->{value_changed_signal}); $sb_selector_w->signal_handler_block( $sb_selector_w->{value_changed_signal}); $sb_selector_h->signal_handler_block( $sb_selector_h->{value_changed_signal}); $sb_selector_x->set_value( $new_selection->{x} ); $sb_selector_y->set_value( $new_selection->{y} ); $sb_selector_w->set_value( $new_selection->{width} ); $sb_selector_h->set_value( $new_selection->{height} ); $sb_selector_x->signal_handler_unblock( $sb_selector_x->{value_changed_signal}); $sb_selector_y->signal_handler_unblock( $sb_selector_y->{value_changed_signal}); $sb_selector_w->signal_handler_unblock( $sb_selector_w->{value_changed_signal}); $sb_selector_h->signal_handler_unblock( $sb_selector_h->{value_changed_signal}); my $old =3D $selection; $selection =3D $new_selection; my $win =3D $widget->get_window(); $show_selection =3D TRUE; for my $rect (($selection, $old)) { $win->invalidate_rect($rect, FALSE) } return; } --------------A8FB1558C3482FF65A6F9066 Content-Type: application/x-perl; name="drawingarea_pan.pl" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="drawingarea_pan.pl" #!/usr/bin/perl use warnings; use strict; use Cairo; use Glib qw(TRUE FALSE); use Gtk3 -init; my $button_x =3D 0; my $button_y =3D 0; my $button_down =3D 0; my $whole_window =3D {x =3D> 0, y =3D> 0, width =3D> 500, height =3D> 500= }; my $offset_x =3D 0; my $offset_y =3D 0; my $zoom =3D 1; system("convert -geometry 1000x1000 rose: test.png"); my $image =3D Cairo::ImageSurface->create_from_png("test.png"); my $image_rect =3D {width =3D> $image->get_width, height =3D> $image->get= _height}; my $window =3D Gtk3::Window->new('toplevel'); $window->set_size_request ($whole_window->{width}, $whole_window->{height= }); $window->signal_connect('delete-event' =3D> sub{Gtk3->main_quit}); my $canvas =3D Gtk3::DrawingArea->new; $window->add($canvas); $canvas->signal_connect(draw =3D> \&_draw); $canvas->signal_connect('button-press-event' =3D> \&_button_pressed); $canvas->signal_connect('button-release-event' =3D> \&_button_released); $canvas->signal_connect('motion-notify-event' =3D> \&_motion); $canvas->signal_connect('scroll-event' =3D> \&_scroll); $canvas->set_app_paintable(TRUE); $canvas->add_events( Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3::Gdk::EventM= ask', 'exposure-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3::Gdk::Ev= entMask', 'button-press-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3::Gdk= ::EventMask', 'button-release-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'Gtk3:= :Gdk::EventMask', 'pointer-motion-mask') | Glib::Object::Introspection->convert_sv_to_flags ( 'G= tk3::Gdk::EventMask', 'scroll-mask') ); $window->show_all; Gtk3->main; unlink 'test.png'; sub _button_pressed { my ($widget, $event) =3D @_; # left mouse button if ($event->button !=3D 1) { return FALSE } ($button_x, $button_y) =3D ($event->x, $event->y); $button_down =3D TRUE; return TRUE; } sub _button_released { my ($widget, $event) =3D @_; $button_down =3D FALSE; } sub _motion { my ($widget, $event) =3D @_; if (not $button_down) { return FALSE } $offset_x +=3D $event->x - $button_x; $offset_y +=3D $event->y - $button_y; ($button_x, $button_y) =3D ($event->x, $event->y); if ($offset_x > 0) { $offset_x =3D 0 } elsif ($image_rect->{width} + $offset_x < $whole_window->{width}) { $= offset_x =3D $whole_window->{width} - $image_rect->{width} } if ($offset_y > 0) { $offset_y =3D 0 } elsif ($image_rect->{height} + $offset_y < $whole_window->{height}) {= $offset_y =3D $whole_window->{height} - $image_rect->{height} } my $win =3D $widget->get_window(); $win->invalidate_rect($whole_window, FALSE) } sub _scroll { my ($widget, $event) =3D @_; if ($event->direction eq 'up') { $zoom *=3D 2; } else { $zoom /=3D 2; } my $win =3D $widget->get_window(); $win->invalidate_rect($whole_window, FALSE); } sub _draw { my ($widget, $context) =3D @_; $context->scale($zoom, $zoom); # Create pixbuf $context->set_source_surface($image, $offset_x, $offset_y); $context->paint; return TRUE; } --------------A8FB1558C3482FF65A6F9066-- --ohyaf1JILd1CZHvPBgbKWsMQo1MwqJJew-- --EaaKDomKMalJ1LGh52iNRpFrPg6p6ObY7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEERjKT5K4zhxhG8wInsyHyAxEPyvMFAlp3XAEACgkQsyHyAxEP yvMngg//c3u00LMXrjJw3Tx7+O6bs/OErLKlUbUrfMKibjbLEKm6t5EZiYAZwGua mvZxVmfkqoysODuivj5jgXRqcosTbomEos6w7DJiJZYprSNNP7miqMcUoR4KOqj7 +CDwe7AKsySTe9+vASEvvhmX6EkoPdPOjktkyb2zMBk8fjKNJP+VO+cu/gIzQXjy 7UoPrIYKnPX9HBk/BJh1t6EStSel8YccjvGYK7QMssQCmG2jsnQUeGgQUFZiyCFH iz63HBYbPk/nrybymS4n9EsneFOhctlstp6xUpW1/re+oMNgZtI2ZOQPrKolRuL/ 0LmywgjlZjgwZTI3/83c7naQ41L58kF1a7N39tQosomo3vnqWQ1x+jJ+uEsn/x+N 0xoCl+3RgqzvFOSdfTYzVY6lYau4AiufJHpmWlcn1urJYQ26HOXcy7xlvDLOpU3k LyCAU2i9SDexkQBmxOeQuoomsp2RkO8PL7kKc80B7Q4R3VzmxI4tE0YwkxKjrbay wyAMoqYX9WxxCX7aCtOKPU8hZp5j3kpvrpkuhg0T1h/mHAV4mkiLqUh7KdiB2hpI MLd6fWjFtnpW+MVxmU5Xmx6GBhyDL4NrEVEKZhKvfv8d1EEN1r+zhYauydD1I12D GIwllanReuOpgh4fUThJfuSAKXSaTYe39H4ao5LS2newnoZtCtY= =/gE4 -----END PGP SIGNATURE----- --EaaKDomKMalJ1LGh52iNRpFrPg6p6ObY7-- From brian@xaoc.org Fri Feb 23 06:03:15 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 4932776159 for ; Fri, 23 Feb 2018 06:03:15 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 50_jSvmFa1so for ; Fri, 23 Feb 2018 06:03:14 +0000 (UTC) Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by smtp.gnome.org (Postfix) with ESMTPS id EBEC27613A for ; Fri, 23 Feb 2018 06:03:13 +0000 (UTC) Received: by mail-qk0-f171.google.com with SMTP id f25so9562156qkm.0 for ; Thu, 22 Feb 2018 22:03:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xaoc.org; s=google; h=mime-version:sender:from:date:message-id:subject:to; bh=EcgQxjEVaVLi325BeSAmnDXXW7GB1f2EVU8BYIhVO+c=; b=acZx6HauG41zDquKg1rBmqc2gkyr4ykztPhJZ4jk7LvdtSVsmGG1cPranQCDwKmIjM aG86s0LOLmoFsyobG8e7MEg3rll+X/MlBmVsYqKmeWeFuRJKP26m2WbbR5ndvr86xxuU wxNMFqSbW1ppxxEKva+8MFY9kmNGapwe9W7L4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=EcgQxjEVaVLi325BeSAmnDXXW7GB1f2EVU8BYIhVO+c=; b=hjNLBaHSZrqMD1J6rF53DoMRIkiovZNSTsXs8Tm0kebVtjt5nPfU5GXw8YaS0GXQRQ bN8zrRG2PJi6PcBh/zVXYMmIUHERVg7iCM4Wg/qUeA5rYGaa46q/YtLTlDGO1MrFvWJm 6UsFCb7mL/5ZwnlmCEin+oR1xyj9BzcyV9o3EXCy28aFOQ6851OA5EYT4CP8kTZDke7+ Ha1cYpoi9tp+NPEfaEdDOFdL/EvZdJm8lrmRisHAmQVfelOhkvGnOH0vsci15ip6js1/ 9abmdql33XyGeldZsMm14oIkSVunjZFlx+G6CRr/jT6CUJ9iSUs+OxH7cq12Mw8SItvD PlpA== X-Gm-Message-State: APf1xPDf8sQ503kOfLDpatKK54RA9H1EcKCQmgpwNbfxt84X0DBdVtfh awCeAOMsYOX9xRhRTEpjh9guz68wj92oe+gajMk42VUMK5w= X-Google-Smtp-Source: AG47ELtG3IaASclg69xAhGYJmw5yZKO/aC6mC8H7C4ieOx4VfkCcc383Rxt0+jEEEcFpYH0sIRbsWb5jzfiNKqJuytI= X-Received: by 10.55.156.75 with SMTP id f72mr832333qke.235.1519365791416; Thu, 22 Feb 2018 22:03:11 -0800 (PST) MIME-Version: 1.0 Sender: brian@xaoc.org Received: by 10.140.21.213 with HTTP; Thu, 22 Feb 2018 22:03:10 -0800 (PST) X-Originating-IP: [65.49.60.56] From: Brian Manning Date: Thu, 22 Feb 2018 22:03:10 -0800 X-Google-Sender-Auth: IcLRdjqIfOkwL93DpFP-HsV9qik Message-ID: Subject: Next release deadline: Saturday, March 17th, 2018 at 00:01 UTC To: GTK-Perl List Content-Type: text/plain; charset="UTF-8" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 06:03:15 -0000 Hi folks, Based on the Gnome 3.27.x release calendar [1], I am setting the deadline for code submissions for the next release of Gtk-Perl modules to be Saturday, March 17th, 2018, at 00:01 UTC. Please have all code submissions into the Gtk-Perl maintainers before the above deadline; please allow time for the maintainers to audit and test code submissions. If you have your favorite RT ticket[2][3] or Gnome bug tracker bug[4] that you would like looked at, don't be afraid to bring it up for discussion here on the mailing list. Once the above deadline date arrives, I will begin packaging any new code in the Gtk-Perl git repos. After packaging, I will distribute tarballs to CPAN and Sourceforge, and post the release announcements, usually within a few days of the release date. If you have any questions about the above, please ask. Heads up for April, the release deadline will be April 14th, 2018, at 00:01UTC. Thanks, Brian [1] https://wiki.gnome.org/ThreePointTwentyseven [2] https://rt.cpan.org/Public/Dist/ByMaintainer.html?Name=XAOC [3] https://rt.cpan.org/Public/Dist/ByMaintainer.html?Name=TSCH [4] https://bugzilla.gnome.org/browse.cgi?product=gnome-perl From brian@xaoc.org Fri Feb 23 05:51:34 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 4A7C476161 for ; Fri, 23 Feb 2018 05:51:34 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fzhlhupDSMXV for ; Fri, 23 Feb 2018 05:51:33 +0000 (UTC) Received: from mail-qk0-f182.google.com (mail-qk0-f182.google.com [209.85.220.182]) by smtp.gnome.org (Postfix) with ESMTPS id 2D77876159 for ; Fri, 23 Feb 2018 05:51:32 +0000 (UTC) Received: by mail-qk0-f182.google.com with SMTP id z197so9513903qkb.6 for ; Thu, 22 Feb 2018 21:51:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xaoc.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=50q/6+J7c79DY+0Xt4x4G4Ny7QMdFtI8BLVdRLz/8dI=; b=Hx6+T5VjF1CkKWZbpdykUT/K6B5ICP7SIt4UdeGrGDn5evos6cUVsjfNHg+YA3D1/c 6wupdWJvj/iYiIS5CGqs4ZynEJPbnm68Z0Fi83EnqVSw8vIvupDRp7b4YUwKsKnoqBCv 5sFXyJyv1n9KgewQiGIyFuHTMf/MTX4MQj35Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=50q/6+J7c79DY+0Xt4x4G4Ny7QMdFtI8BLVdRLz/8dI=; b=joHVBT4mGxcFRyn7te90ztGTvLQEGyKvfsgZ3tmvNcwqKHzIsVESuCBNf7gtuOqknT pEUyQ7ZIHPjr4DrYM1PR1H4BA8Ra0WcOeiwL0Pxm2yCe4HUIRfE4V5j8ZgWHCNbQE16J 9bhi6R3sHqrhwBhYD6AHz5JBhMcpSAeXslMQofW52ifhT071Rr+QUqEqcTAe00tv8QXH tSYg5ZVyh4Q3R1BASj4NRCwvY6HPV5XK0VylpVWZz3Djin6TjF0VsraNItHzwVfN+C76 pn/yagf3odkbx4A/81qd/F/BFIEEt+eL99xNw02XllbaRQoX9xJNruTZ86krf2Qb+G0l NYjQ== X-Gm-Message-State: APf1xPB9farZms4ZAripGT+aDYD8/qVkZIW9AJnBgDJ6HEqIj8enMTgg Pi4i9WZ9UzQdGS5pA6KzlcpIF25rX8iqKdz+rz7cG5JDnPw= X-Google-Smtp-Source: AG47ELteMY8rX9r1DNvkf5838VGn6viV+YdiFRB2F/MQsrGxGuGjvYQsk5Puc3GbnQkdTCfUtJMNC1R2nOTUYDFFvKY= X-Received: by 10.55.173.7 with SMTP id f7mr756037qkm.195.1519365089821; Thu, 22 Feb 2018 21:51:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.21.213 with HTTP; Thu, 22 Feb 2018 21:51:29 -0800 (PST) X-Originating-IP: [65.49.60.56] From: Brian Manning Date: Thu, 22 Feb 2018 21:51:29 -0800 Message-ID: Subject: No Gtk-Perl releases for February To: GTK-Perl List Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Fri, 23 Feb 2018 16:55:13 +0000 X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 05:51:34 -0000 Hi folks, There have been no new code submissions to the Gtk-Perl repos since October, so there will be no Gtk-Perl releases for the month of February. Stay tuned for the release deadline announcement for March, which I will be sending out shortly. Thanks, Brian From jffry@posteo.net Sat Feb 24 12:10:51 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 244AF76111 for ; Sat, 24 Feb 2018 12:10:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.301 X-Spam-Level: X-Spam-Status: No, score=-4.301 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KWHr9RrNFNt7 for ; Sat, 24 Feb 2018 12:10:49 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by smtp.gnome.org (Postfix) with ESMTPS id D842D76108 for ; Sat, 24 Feb 2018 12:10:48 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id C275E20F1D for ; Sat, 24 Feb 2018 13:10:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1519474244; bh=PTT31N+ZDUUfF8j1qA+3FdpyJKUuzOM0n/5spqaATQ8=; h=To:From:Subject:Date:From; b=RGJoQz7iYljfyRXjQ+FuIbhAafCjr+qqBQ2jZzTd0CuvF3geuPT8Br8zpYHRvYWTF kQF/DDr5bZhtOBh+iKzbSNygqakPwikh9kKlkg3YsVy/M77DbIkIpO681sa68bLW6l /E6PWOAvGQebBKxC7fpaVRIBIbQnBWIxpk9YCmVg0WTvBw62ul7ABEBFNiXkQqlTkC h5YpKJZUmhnT2taDT9WFw7YklDRL/L7CqsuZx2DE+8yQB2kbr/6fGoXKv/V6LfNd2u REC0u2LZVWn7xgEP1mgcEnoTHucWPENsfF73XByBz3Hcz1Z2925JcN+14Z952JKjAq JFGR4A/rxCARw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3zpRkW4ypJz9rxV for ; Sat, 24 Feb 2018 13:10:43 +0100 (CET) To: gtk-perl-list@gnome.org From: Jeff Subject: Gtk3 and drag'n'drop Message-ID: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> Date: Sat, 24 Feb 2018 13:10:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="55xznUHKULHadaFAqHLOmPcR4nB6ARKL2" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 12:10:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --55xznUHKULHadaFAqHLOmPcR4nB6ARKL2 Content-Type: multipart/mixed; boundary="GoHGwnjWbimt15GFBup4IVwnREBwYHTqS"; protected-headers="v1" From: Jeff To: gtk-perl-list@gnome.org Message-ID: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> Subject: Gtk3 and drag'n'drop --GoHGwnjWbimt15GFBup4IVwnREBwYHTqS Content-Type: multipart/mixed; boundary="------------A6EFC3F4E6B5F1D9109D1F85" Content-Language: en-GB This is a multi-part message in MIME format. --------------A6EFC3F4E6B5F1D9109D1F85 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I've almost got drag'n'drop working in Gtk3, but I'm just missing the final piece: To finish a drag in Gtk2, you call finish() on the context, typically lik= e: $context->finish(1, $delete, time); If I do this in Gtk3, I get: *** unhandled exception in callback: *** Can't locate object method "finish" via package "Glib::Object::_Unregistered::GdkX11DragContext" at ../gtk3_iconview.pl line 251. *** ignoring at /usr/share/perl5/Gtk3.pm line 546. I can't find any docs or examples for dnd and Gtk3 in Perl, but the C docs describes finish: https://developer.gnome.org/gtk3/stable/gtk3-Drag-and-Drop.html#gtk-drag-= finish This python example doesn't finish the drag: https://python-gtk-3-tutorial.readthedocs.io/en/latest/drag_and_drop.html= So - what is the Perl equivalent of gtk_drag_finish()? Regards Jeff P.S. For those interested, I got most of the way through transcribing the drag and drop tutorial here: http://gtk2-perl.sourceforge.net/doc/gtk2-perl-study-guide/c5651.html and have attached the results (which show the above problem). --------------A6EFC3F4E6B5F1D9109D1F85 Content-Type: application/x-perl; name="gtk3_iconview.pl" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gtk3_iconview.pl" #! /usr/bin/perl -w use strict; use Gtk3 '-init'; use Glib qw/TRUE FALSE/; use Gtk3::SimpleList; use Try::Tiny; #Declare our columns use constant C_MARKUP =3D> 0; use constant C_PIXBUF =3D> 1; #Declare our IDENDTIFIER ID's use constant ID_ICONVIEW =3D> 48; use constant ID_LABEL =3D> 49; use constant ID_URI =3D> 50; #standard window creation, placement, and signal connecting my $window =3D Gtk3::Window->new('toplevel'); $window->signal_connect('delete_event' =3D> sub { Gtk3->main_quit; }); $window->set_border_width(5); $window->set_position('center_always'); #add and show the vbox $window->add(&ret_vbox); $window->show(); #our main event-loop Gtk3->main(); sub ret_vbox { my $vbox =3D Gtk3::VBox->new(FALSE,5); my $h_paned =3D Gtk3::HPaned->new(); my $v_paned =3D Gtk3::VPaned->new(); #get the iconview $v_paned->pack1(create_iconview(),TRUE,FALSE); #get the simple list where everything will be dropped into $v_paned->pack2(create_simple_list(),TRUE,FALSE); $h_paned->pack1($v_paned,TRUE,FALSE); #create an eventbox to accept drag actions my $event_box =3D Gtk3::EventBox->new(); my $label_drag_me =3D Gtk3::Label->new("Now Stanley,\nDO NOT drag thi= s item"); $event_box->add($label_drag_me); #Try and convince the user otherwise $event_box->set_tooltip_text ( 'No way! You have to drag it at least once!'. 'Drag it, and drop it into the bottom list' ); #Setting up the Gtk3::Event Box instead of the Gtk3::Label, enabling = it as #a drag source my $dnd_source =3D Gtk3::TargetEntry->new( 'text/plain', # some string representing the drag type [], #flags ID_LABEL, # some app-defined integer identifier ); $event_box->drag_source_set( 'button1_mask', [$dnd_source], [ 'copy' = ] ); my $text_to_drag =3D '"Well= there\'s another nice mess you\'ve gotten me into."'; #set up the data which needs to be fed to the drag destination (drop)= $event_box->signal_connect ('drag-data-get' =3D> \&source_drag_data_g= et,$text_to_drag ); $h_paned->pack2($event_box,TRUE,FALSE); $vbox->add($h_paned); $vbox->show_all(); return $vbox; } sub create_iconview { #--------------------------------------------------- #Creates an Iconview in a ScrolledWindow. This ----- #Iconview has the ability to drag items off it ----- #--------------------------------------------------- my $icon_string=3D undef; my $tree_model =3D create_iconview_model(); my $icon_view =3D Gtk3::IconView->new_with_model($tree_model); $icon_view->set_markup_column(C_MARKUP); $icon_view->set_pixbuf_column(C_PIXBUF); #Enable the Gtk3::IconView as a drag source my $dnd_source =3D Gtk3::TargetEntry->new( 'Glib::Scalar', # some string representing the drag type [], #flags ID_ICONVIEW, # some app-defined integer identifier ); $icon_view->drag_source_set( ['button1_mask', 'button3_mask'], [$dnd_= source], [ 'copy' ] ); #This is a nice to have. It changes the drag icon to that of the #icon which are now selected and dragged (single selection mode) $icon_view->signal_connect('drag-begin' =3D> sub { $icon_view->selected_foreach ( sub{ my $iter =3D$tree_model->get_iter($_[1]); #set the text and pixbuf my $icon_pixbuf =3D $tree_model->get_value($iter,C_PIXBUF= ); $icon_string =3D $tree_model->get_value($iter,C_MARKUP); $icon_view->drag_source_set_icon_pixbuf ($icon_pixbuf); } ); }); #set up the data which needs to be fed to the drag destination (drop)= $icon_view->signal_connect ('drag-data-get' =3D> sub { source_drag_da= ta_get(@_,$icon_string) } ); #Standard scrolledwindow to allow growth my $sw =3D Gtk3::ScrolledWindow->new(undef,undef); $sw->set_policy('never','automatic'); $sw->add($icon_view); $sw->set_border_width(6); $sw->set_size_request(600,150); return $sw; } sub create_iconview_model { #---------------------------------------------------- #The Iconview needs a Gtk3::Treemodel implementation- #containing at least a Glib::String and ------------- #Gtk3::Gdk::Pixbuf type. The first is used for the -- #text of the icon, and the last for the icon self---- #Gtk3::ListStore is ideal for this ------------------ #---------------------------------------------------- my $list_store =3D Gtk3::ListStore->new(qw/Glib::String Gtk3::Gdk::Pi= xbuf/); #****************************************************** #we populate the Gtk3::ListStore with Gtk3::Stock icons #****************************************************** my $icon_factory =3D Gtk3::IconFactory->new(); my @ids =3D Gtk3::Stock::list_ids; for my $val(sort @ids){ #get the iconset from the icon_factory #try and extract the icon from it my $pixbuf; try { $pixbuf =3D Gtk3::IconTheme::get_default->load_icon($val, 64,= []) } catch { print "$val not in theme\n"; }; #if there was a valid icon in the iconset, add it if( defined $pixbuf ){ my $iter =3D $list_store->append; $list_store->set ( $iter, C_MARKUP, "$val", C_PIXBUF, $pixbuf, ); } } return $list_store; } sub create_simple_list { #--------------------------------------------------- #Creates a simple list with pixbuf and markup ----- #columns make this list the drop target for various- #drag sources -------------------------------------- #--------------------------------------------------- my $slist =3D Gtk3::SimpleList->new ('' =3D> 'pixbuf', '' =3D> 'mark= up'); $slist->set_rules_hint(TRUE); $slist->set_headers_visible(FALSE); #Also suggest to try Nautilus $slist->set_tooltip_text ( 'Drag a few files from Nautilus '. 'and drop it here' ); #Create a target table to receive drops my $target_table =3D [ Gtk3::TargetEntry->new( 'Glib::Scalar', # some string represen= ting the drag type [], #flags ID_ICONVIEW, # some app-defined = integer identifier ), Gtk3::TargetEntry->new( 'text/uri-list', # some string represe= nting the drag type [], #flags ID_URI, # some app-defined integ= er identifier ), Gtk3::TargetEntry->new( 'text/plain', # some string representi= ng the drag type [], #flags ID_LABEL, # some app-defined int= eger identifier ), ]; #make this the drag destination (drop) for various drag sources $slist->drag_dest_set( [ 'all' ], $target_table, [ 'copy' ] ); #do a callback as soon as drag data is received $slist->signal_connect ('drag-data-received' =3D> \&target_drag_data_= received,$slist ); #Standard scrolledwindow to allow growth my $sw =3D Gtk3::ScrolledWindow->new(undef,undef); $sw->set_policy('never','automatic'); $sw->add($slist); $sw->set_border_width(6); $sw->set_size_request(600,150); return $sw; } sub target_drag_data_received { #--------------------------------------------------- #Extract the data which was set up during the ----- #'drag-data-get' event which fired just before ----- #the 'drag-data-received' event. Also checks which-- #source supplied the data, and handle accordingly---- #--------------------------------------------------- my ($widget, $context, $x, $y, $data, $info, $time,$slist) =3D @_; if ($info eq ID_LABEL){ my $pixbuf =3D Gtk3::IconTheme::get_default->load_icon('gtk-no', = 64, []); use Data::Dumper; print Dumper($data->get_data); push @{$slist->{data}}, [ $pixbuf, $data->get_data ]; } if ($info eq ID_URI){ my $pixbuf =3D Gtk3::IconTheme::get_default->load_icon('gtk-yes',= 64, []); foreach ($data->get_uris){ push @{$slist->{data}},=20 [ $pixbuf, ''.$_.'' ]; } } if ($info eq ID_ICONVIEW){ my $no_markup =3D $data->get_data; $no_markup =3D~ s/<[^>]*>//g; my $iconset =3D Gtk3::Stock::lookup($no_markup); my $pixbuf =3D $iconset->render_icon(Gtk3::Style->new(),'none','n= ormal','menu',undef); push @{$slist->{data}}, [ $pixbuf, $data->get_data ]; } # $context->finish (0, 0, $time); } sub source_drag_data_get { #--------------------------------------------------- #This sets up the data of the drag source. It is --- #required before the 'drag-data-received' event ---- #fires which can be used to extract this data ------ #--------------------------------------------------- my ($widget, $context, $data, $info, $time,$string) =3D @_; use Data::Dumper; print Dumper($widget, $context, $data, $info, $time,$string); $data->set_text($string,-1); } --------------A6EFC3F4E6B5F1D9109D1F85-- --GoHGwnjWbimt15GFBup4IVwnREBwYHTqS-- --55xznUHKULHadaFAqHLOmPcR4nB6ARKL2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEERjKT5K4zhxhG8wInsyHyAxEPyvMFAlqRVkIACgkQsyHyAxEP yvNSQxAAj1ygPDNc6lgWty+0/VEmA5D6ca+LU+2iA9n+VzNBEjESNH84Z1m34xAL u8P4kN0vhWENSlVm6GOMQfRL7NkF28zUfn+64viRA1tb5QRpu8IIpEXquDSWLSIe Fiu+6WvKxo33aGFWo1wLd0wk4AkqF86YqCKMHsW01kgvtNboMyRldEp2V3IG3/tw S2uRDQMSp9KZVCNttOWqpOjCrFdZyZ2L+/8qhA/G3cjJVLdc6tEnBcKmH9LizyBP rhMnKz94PhOyrgORt8/v9R0OjcyDNi5O9LFSC8x9BrAXBngPm4arK3Am2h9omIXI /hnetvljkpIlEUbYGiSnTg+NnllXbodzGTzbajAcE8ZqXtqU1V91dQWsGDBVn11C ch0H4jIa2wdtfjaHld7r32E9BzoKaLGJNrRfTHxBsT0o7TWPu8d4CaPc/WpATs/K mR1Yf5NQNpSKVj9w2q9zSDVJDNAyF4SQCmj9qoldrHnm+3T3m6fmaQcabg4AbNSE D4ljCwUJrJ4bdJvKmWlffYlqTcoGVd97u3LTByxFcY96dWeDqK4qfzEtEkZFpHxK cF5n0g9m4QeU5sgyMy/IFlICFZ1b+5jhmjR4FlqUDdZDmgzmaGXECf/Tw1+HLSIV kdolEA1O+8N9SGwInaXSBFeuf7pt1PGMEh+1Hfu3nSzFvwAcU9o= =qiYl -----END PGP SIGNATURE----- --55xznUHKULHadaFAqHLOmPcR4nB6ARKL2-- From ebassi@gmail.com Sat Feb 24 12:16:46 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 1C921760E6 for ; Sat, 24 Feb 2018 12:16:46 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -2 X-Spam-Level: X-Spam-Status: No, score=-2 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z7NuAzoK4v8b for ; Sat, 24 Feb 2018 12:16:44 +0000 (UTC) Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by smtp.gnome.org (Postfix) with ESMTPS id C2CF9760D8 for ; Sat, 24 Feb 2018 12:16:44 +0000 (UTC) Received: by mail-vk0-f41.google.com with SMTP id z130so84932vkd.0 for ; Sat, 24 Feb 2018 04:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XZmQ27BE7NhZvrsTPC8p7JB6nYhOrAYLqp1XeZaPkR0=; b=k6eiVif0x6hMZA6mzgYsyz/NxEeCAwYb7NBfSM4pith2FNwn8hkooPY5bA5yqzt/9c 3WMgBeyq1KMqIh2VqsKeQ4DZ7x4YIDEeWOt5vt28NXoDD82AcRgqXvsUy3oP6DXtxVhi KVD9zbMNLkC6fG1pFDk4b8gEbvi6m4abvLaD83BdqgWunDwlf+96Twy4xucXIS6fJ3Zi vW2lXSsUYfiz9KiM5TfGCsXbuZzSkcFZPgGP2L7SZCsZ6zdFgz34aGRN9ZIDbEH9v21O YsTw+u9K3X5HFS3nJBUaYUXxz8qBLudGAIcuI4Oj3z3XdrlOgdZPVDoOyGAFvcIHkyjh Lq7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XZmQ27BE7NhZvrsTPC8p7JB6nYhOrAYLqp1XeZaPkR0=; b=eG6G5+fk+D8HYUlcytwjt/PZX49dffOTGm+7lZQSp41Umn9rfSLXFjnz2HAnCMlMca 4ePInJVf0GUhcDmhkpvK7Yqb9FWQ04yByCnx5mZ1aZXz0649moybG2kY/h5ELYar8pgm ojh4EAXzlfSSwFOENNVrdjNWz5MJqpRfwP1/jGA1v7l86rLtiZpWwaT8ZGRh37MLY9u+ z/T6YGN2u4TCQGzhXvOcVdJjV2mUQlTc4iZ3vDQdboY4NkftD4T1vQS1fc5/DdOX/nlf B93F6AcYVPh/hxyCElJwFlaLjb//SJLpvx92REoZKH7vnhUWpqiZG7JiXqwxafe8gbUP zbsA== X-Gm-Message-State: APf1xPBCWtBlm1Kit4uEOiwvs33ywI8cXluYYcgdlb25k707wiz+Qpoi XLIgUJI1NPPtmVnk3aejdE2vB8VNsbJjrfMhQHA= X-Google-Smtp-Source: AG47ELvGCrDVg0se6Nd59FKQ67CueS7JtFwxju75uLvWfHnTlxh4FWTHvdENxoSo4Y8zemejo3228CdAc6qX8xppquc= X-Received: by 10.31.57.203 with SMTP id g194mr3548366vka.137.1519474602237; Sat, 24 Feb 2018 04:16:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.61.146 with HTTP; Sat, 24 Feb 2018 04:16:41 -0800 (PST) In-Reply-To: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> From: Emmanuele Bassi Date: Sat, 24 Feb 2018 12:16:41 +0000 Message-ID: Subject: Re: Gtk3 and drag'n'drop To: Jeff Cc: gtk-perl mailing list Content-Type: text/plain; charset="UTF-8" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 12:16:46 -0000 On 24 February 2018 at 12:10, Jeff wrote: > I've almost got drag'n'drop working in Gtk3, but I'm just missing the > final piece: > > To finish a drag in Gtk2, you call finish() on the context, typically like: > > $context->finish(1, $delete, time); > > If I do this in Gtk3, I get: > > *** unhandled exception in callback: > *** Can't locate object method "finish" via package > "Glib::Object::_Unregistered::GdkX11DragContext" at ../gtk3_iconview.pl > line 251. > *** ignoring at /usr/share/perl5/Gtk3.pm line 546. > > I can't find any docs or examples for dnd and Gtk3 in Perl, but the C > docs describes finish: > > https://developer.gnome.org/gtk3/stable/gtk3-Drag-and-Drop.html#gtk-drag-finish > > This python example doesn't finish the drag: > > https://python-gtk-3-tutorial.readthedocs.io/en/latest/drag_and_drop.html > > So - what is the Perl equivalent of gtk_drag_finish()? The issue is that the GTK drag and drop API lives in the GTK namespace, but operates on a GdkDragContext object under the GDK namespace. This is not allowed with introspection-based bindings, because the method cannot be reconciled with the object. Of course, this is perfectly valid at the C level, because there are only functions. Which means that the gtk_drag_* API has to be treated as functions, e.g.: Gtk3::drag_finish($context, $delete, time); The old Gtk2 bindings would "cheat", and move the API under the GdkDragContext namespace, hence the change. Ciao, Emmanuele. From jffry@posteo.net Sat Feb 24 12:30:20 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 5108876111 for ; Sat, 24 Feb 2018 12:30:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.301 X-Spam-Level: X-Spam-Status: No, score=-4.301 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YvTJH6rxckCv for ; Sat, 24 Feb 2018 12:30:19 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by smtp.gnome.org (Postfix) with ESMTPS id DFB07760E6 for ; Sat, 24 Feb 2018 12:30:18 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id BEFAA20FE3 for ; Sat, 24 Feb 2018 13:30:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1519475414; bh=SjaWwYRl7fSo0SiU7HEiVysaBSeIouehKOQy198mdxo=; h=Subject:To:Cc:From:Date:From; b=IaDRUaC1/hLf6aecBE76WCC4fuFyr0augEh+ke/5kBTmBH8OChRWJ95bhPIk08iR9 QpQt03J7PnmIebBHB4uq6rbHp+vvTEOjt4Vih1D91PRPZqWz4ATxhLbSSb8kRJmvKn EmRPzNFrfgSXiyW4mMze4lAOZmnCy+Eprdf7sVRyGIZ9Mpvqul4RNAq8ULsSi0pBJv hqO+Zfht3y+zYIAlxWRf4dtCrs838JZUtXwgaM2XHdHZDbDleN+0YIUgujZ8P2I5gV OMiXXFwQtBcCReYqcMC0FnTHTS9cWQ7viqDehO9cEXoJsDt2OPScVZuFT0wVGOYLJc KmfzyePbsYpGA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3zpS8q14L5z9rxf; Sat, 24 Feb 2018 13:30:02 +0100 (CET) Subject: Re: Gtk3 and drag'n'drop To: Emmanuele Bassi Cc: gtk-perl mailing list References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> From: Jeff Message-ID: Date: Sat, 24 Feb 2018 13:30:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XHThOcEjy59YKjquAME7xEtS5SX4rg4Ud" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 12:30:20 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --XHThOcEjy59YKjquAME7xEtS5SX4rg4Ud Content-Type: multipart/mixed; boundary="xQBY3fEm85rKXIyUWhUnAZ20s9tT4RCc2"; protected-headers="v1" From: Jeff To: Emmanuele Bassi Cc: gtk-perl mailing list Message-ID: Subject: Re: Gtk3 and drag'n'drop References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> In-Reply-To: --xQBY3fEm85rKXIyUWhUnAZ20s9tT4RCc2 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 24/02/18 13:16, Emmanuele Bassi wrote: > The issue is that the GTK drag and drop API lives in the GTK > namespace, but operates on a GdkDragContext object under the GDK > namespace. This is not allowed with introspection-based bindings, > because the method cannot be reconciled with the object. >=20 > Of course, this is perfectly valid at the C level, because there are > only functions. Which means that the gtk_drag_* API has to be treated > as functions, e.g.: >=20 > Gtk3::drag_finish($context, $delete, time); >=20 > The old Gtk2 bindings would "cheat", and move the API under the > GdkDragContext namespace, hence the change. Thanks for this. That seems to work. Now I am looking for the Gtk3 equivalent of $context->get_targets as per: $self->signal_connect( drag_drop =3D> sub { my ( $tree, $context, $x, $y, $when ) =3D @_; if ( my $targ =3D $context->get_targets ) { $tree->drag_get_data( $context, $targ, $when ); return TRUE; } return FALSE; } ); I've tried variations on Gtk3::drag_dest_get_target_list() but I can't find the right one. Any ideas? Regards Jeff --xQBY3fEm85rKXIyUWhUnAZ20s9tT4RCc2-- --XHThOcEjy59YKjquAME7xEtS5SX4rg4Ud Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEERjKT5K4zhxhG8wInsyHyAxEPyvMFAlqRWsoACgkQsyHyAxEP yvNgog/+KTjFujRRCSd//P1l9aRXJO/jZi85WyUmi2GUgXTeOMXlfsRxMrDDMNpY c1h4caswfgHwz2zXe1qXe/XxE6k6fy45zpHh9ORFBEJOBhwnVOeP0VSJreOt9fHs gKxaKyR8hN9E8S9G0qmeEA2bFjfx5B2NYWXwvBJh4OAGF5hitEmCc09plaTY9xx6 iQkVPPbLppum4rphaB2SqNA6SY5vb9/eSEQtny9l8HP5x4KOESJPM8fKsJ9ud2c2 7v6S1rQ9ZRFfwbd1mr3C6WNakd861vSTkQ6vC0h3I0vZ4CmJr9/xXf9/0FA9q4r9 ZG6TArnSntGmetvUS9MVA2+KYsM82ihiiey+4L46TCNqVn41Wxdy8jx3bUb8QPNL QfdZ3N37Jc5OYNkmWiC6ZoNvBwaFkXqvRfwxWd7TqZ30vT0vQTJXZeCoxP1z1XjZ JCz3Muwpw8Eg9EB3ymDomT6oY9e/mIJiHxY6pq0NF/7mmm0pgcD/xO8uY8UCd0mc VmZQdk3w4iHiIMtG/OhWt9SCO3LQB4ymzmumfYIF0UFSdmkN4T7yX6BlKpPju/Cy zak4bTLULS7BW4KUDfbuFIAx1ntMW0BghDTORTXLQpv0zPOqmPyFpxDMm/ezUbjv GBZxHlmsIIwoT0q4hHbHzjo5+vQL8gbaJMX03GTe6lUC8yHoxbc= =fl4W -----END PGP SIGNATURE----- --XHThOcEjy59YKjquAME7xEtS5SX4rg4Ud-- From jffry@posteo.net Sat Feb 24 14:44:14 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id B971E760DC for ; Sat, 24 Feb 2018 14:44:14 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.301 X-Spam-Level: X-Spam-Status: No, score=-4.301 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TcSfT77d8M-v for ; Sat, 24 Feb 2018 14:44:12 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by smtp.gnome.org (Postfix) with ESMTPS id 998807609E for ; Sat, 24 Feb 2018 14:44:12 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DAF0F20E29 for ; Sat, 24 Feb 2018 15:44:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1519483448; bh=MfoHX/dDSzBq5rMRzhEyVUUd0r3MUPkeHgQ0rjQGdrY=; h=Subject:To:From:Date:From; b=Pcfxvw7cvlff9xu/1MCwSE+W/+7TG9NeOQWr13mUe4connIHOfji3T56CR5mDdntq Wq4Ywcax8X76B541pYIkwjiprRyh5W+bBaSE6a3QJI/8QbNpv2n8CsZMqRMK1YRmCJ ejexf8ZsTvKCGKhf5APPdr0HdoNNpZ7GnSiB+8ob7QiFpXAIPmPimHjX0r3giGP89Y Fu7Q/EQTFN+6QjHaownBrj9vpe0OQ7MN+nU0lR1g2YsB/d/YqixabA3u9Lor+2FJqa NPvvw24O4xLXk6j+FNbLv5rYTOMyG8GG8sh2Om60zQJO1OpYPxEt8QYkQ7dvYCGjBd sZThCaO8SZ2pw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3zpW7W6bNCz9rxQ for ; Sat, 24 Feb 2018 15:44:07 +0100 (CET) Subject: Re: Gtk3 and drag'n'drop To: gtk-perl-list@gnome.org References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> From: Jeff Message-ID: Date: Sat, 24 Feb 2018 15:44:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mreF1MNP68nzUSAGQ9afXkp3jdE6w5xqV" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 14:44:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mreF1MNP68nzUSAGQ9afXkp3jdE6w5xqV Content-Type: multipart/mixed; boundary="r6RSRWMksBbNSpGMhZZZ9F4DOUJEySbJL"; protected-headers="v1" From: Jeff To: gtk-perl-list@gnome.org Message-ID: Subject: Re: Gtk3 and drag'n'drop References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> In-Reply-To: --r6RSRWMksBbNSpGMhZZZ9F4DOUJEySbJL Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 24/02/18 13:30, Jeff wrote: > Thanks for this. That seems to work. Now I am looking for the Gtk3 > equivalent of $context->get_targets as per: This seems at least to run: # Callback for dropped signal. $self->signal_connect( drag_drop =3D> sub { my ( $tree, $context, $x, $y, $when ) =3D @_; my $targets =3D $tree->drag_dest_get_target_list; if ( my $target =3D $tree->drag_dest_find_target($context, $targets)){ $tree->drag_get_data( $context, $target, $when ); return TRUE; } return FALSE; } ); Still not quite there, though. Regards Jeff --r6RSRWMksBbNSpGMhZZZ9F4DOUJEySbJL-- --mreF1MNP68nzUSAGQ9afXkp3jdE6w5xqV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEERjKT5K4zhxhG8wInsyHyAxEPyvMFAlqRejIACgkQsyHyAxEP yvNXPRAAltUh3FSXoO9WD4nIedrRZuW77vC2Z/E5x3TybrCRXaOypyaxTzm0AYwo xgU20bPauNMWRnI/+M4ERG5B5PSoo5UiJ5aOhihjroL096FZzrHGTpgeBYBcD/tM XI7rnU/xy9fomIIgJyUSjBwZhUpCBfvlcA8fgO3byq49VSYcoiT1kXIaQPlhzqib H/pDxDipqCtOO5OfSlGu5iC7GtUqhQbEW0qZ7w0aTjdkyUBsFqFlBfH6PmPUF3e5 qA81sS+KKvkEk2RsNBHtqj6Y7wd+1umjoBBxzCHJCTZ6hkhoSnW4XQtfRvHbekmR 2kPoOUrI0iJkQjGDmmwFJ7NDRG6iyCWnRbohacXXUuuHQsQO5ZKrkfYYN43Ic0Ya CBGxX43UrEL/idvBMEu0gwevBJAbKYHk7/g9LU3mFv698kxZIDheY1HawCsj4ro3 y0bA7FUsWMVOyW1Lhip+A6sm+zBsMC3ezQLBc93CBfes/ZSPtx3GKKSxnT4nmJF3 pXb32rmyl0J9ZpcwGM1gydFvCNBJclGXoX/lDGizcmL29Tc7fcmLTjN1jyyK9RsF EkstgsQiyZPyF8txvJcujWACX4nQ+YAOi20kTQ+eN1IE8FT/G0hlpRsLITgCfDCl hnnGwooat9vLb8ylIgJjnQB2ZiBtjH29Z/Vy5+AUmrnppPHsRPc= =H16x -----END PGP SIGNATURE----- --mreF1MNP68nzUSAGQ9afXkp3jdE6w5xqV-- From oldtechaa@gmail.com Sat Feb 24 19:10:29 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id E0F5B760CC for ; Sat, 24 Feb 2018 19:10:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xDxTIDl8pqhs for ; Sat, 24 Feb 2018 19:10:28 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by smtp.gnome.org (Postfix) with ESMTPS id 9A672760C3 for ; Sat, 24 Feb 2018 19:10:28 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id t3so10503234wmc.2 for ; Sat, 24 Feb 2018 11:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7c6Kg0Brx/clftol7MLBiRVA8wAdjI4gQStV2EvxVio=; b=ThJnvwZa2HzDPzmDiwyy5bzl2ClfBMdonZc1Rf/A4BafSSzIp8EbUEv7lv//FIQjTg 06N+g0v55aHeFbOJwKB/gsVHQC5PmUAvn/Cdpq3gicyMO9uAXNHv8NeZJZFl6iNaoi5S pedosWQ6iak7BE5rgXq2wRVySdMofZ4GIFEeZn9o2DlG6EAwVcSjU36dsQBfWWtDbNsM apAfWRCN1kmsVM7ArvA62qr2fQrheN37Dqq4FwJlRcsOKT3L5FB7JsfgzLt5yMH2AuIn Eu834LWMAsZzet65R0pdQi6Kcztw+uGPtJzlUuvH33JybX+HQTgHg4zDzHaEaWI2DtrS N2mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7c6Kg0Brx/clftol7MLBiRVA8wAdjI4gQStV2EvxVio=; b=rqo7tG8S5Ci62SP5jggjz7V5CWlohwV52nIJzQPE2jjBnGildMYK2VB67XF1gmG9Fk Yf5AEKcy17DJSPG0pb7W361KD7jUvBSKez8dRcfj/Bo2d+WXTY5P3FH1E+AIPD5JmL+C 0ZoDt3J8eSxMjPRjk9Ci8H5GuB3DRL+CJhvvYgfKdXRENgie5vTifSnupJABorPYst2p 0DeTG5kE0EZcGQHgDpPCOdKpyLEb/M17/M8xLnURNzDGhEy5OLxsXJriQ+DA96jPDLE7 uPlx7r3MQAN7ln2MyyEmFwhBoyYmB4em/3ZFd1SX6ryxZhRebahvbs3K6jbq3YoeDtED z/CA== X-Gm-Message-State: APf1xPCIeQWnNwKZCECe8PkQ2Iccx71o2LPvGvbydauqD5E2sdOJprek 2J8vrTVr4qyKw5KRifJOc+Rne7tgA4z4d14g41k= X-Google-Smtp-Source: AH8x225FrskyuSWyahzP05EaldMlZAc3a60jpbJj+wa3CYB5VlH+t+Uxc5jfBi0uwOeJ+b+LMEi02yPoUi+76L9yEEE= X-Received: by 10.80.191.71 with SMTP id g7mr7742442edk.246.1519499424897; Sat, 24 Feb 2018 11:10:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.220.129 with HTTP; Sat, 24 Feb 2018 11:10:24 -0800 (PST) In-Reply-To: References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> From: oldtechaa Date: Sat, 24 Feb 2018 14:10:24 -0500 Message-ID: Subject: Re: Gtk3 and drag'n'drop To: gtk-perl-list@gnome.org Content-Type: multipart/alternative; boundary="089e0824d30c751f2e0565fa0791" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 19:10:30 -0000 --089e0824d30c751f2e0565fa0791 Content-Type: text/plain; charset="UTF-8" For documentation for Gtk3 in Perl, you can use the "perli11ndoc" tool included with Glib::Object::Introspection. If you're using Debian or a derived distro, you'll need to install libxml-libxml-perl and libgtk-3-dev also, but the docs for drag look like they're in there. I see drag_finish() and GestureDrag. This might help. oldtechaa --089e0824d30c751f2e0565fa0791 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
For documentation for Gtk3 in Perl, you can use the &= quot;perli11ndoc" tool included with Glib::Object::Introspection. If y= ou're using Debian or a derived distro, you'll need to install libx= ml-libxml-perl and libgtk-3-dev also, but the docs for drag look like they&= #39;re in there. I see drag_finish() and GestureDrag. This might help.
<= br>
oldtechaa

--089e0824d30c751f2e0565fa0791-- From jffry@posteo.net Sat Feb 24 19:17:06 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 419B3760CC for ; Sat, 24 Feb 2018 19:17:06 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -4.301 X-Spam-Level: X-Spam-Status: No, score=-4.301 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V9NmOsmVndgs for ; Sat, 24 Feb 2018 19:17:04 +0000 (UTC) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by smtp.gnome.org (Postfix) with ESMTPS id 04CF8760C3 for ; Sat, 24 Feb 2018 19:17:03 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6C44220E85 for ; Sat, 24 Feb 2018 20:17:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1519499820; bh=lBvOisuVuuTdxCHfrhCYKvVEWX1sGsNxJqMAbfM5CKE=; h=Subject:To:From:Date:From; b=klAJu7zxYD1ArLr7MXrTQcx7mJs0yc7by8JLzt8WBzT9e32PHE4nt0m/76Qausi/I bBdt+rXxkIOot5svf/KTdovXHlqVGI1bEE9XcHSFYtie7e8oTlR4esL/WojC1KJR8d ZCJ6y0hOX5PHU52vks4np3BGLPmFA+j+S/94XqaHDjPYgb+tGc7LFxA+UuIYF35d0c y/TCykUBiSz0wDrMMzi3SMUQW+6MelyKNulqTIlyv05jKtn1BDE9i0ImXKVYXJQpD3 35l5F0T7LMSltRv+3rGuRNBviyd/qh1ej7jdCOZd4oTRAd/tq6QVO9VKmIXqB4wMx2 K/AXtgBK/Vdug== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3zpdBM36mCz9rxF for ; Sat, 24 Feb 2018 20:16:59 +0100 (CET) Subject: Re: Gtk3 and drag'n'drop To: gtk-perl-list@gnome.org References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> From: Jeff Message-ID: <846b49cb-3ba6-d0ca-755a-1b9cdf19f58c@posteo.net> Date: Sat, 24 Feb 2018 20:16:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PXC4YRBRJNGCZGLyLtoZzzJaSD2Weczo6" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 19:17:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PXC4YRBRJNGCZGLyLtoZzzJaSD2Weczo6 Content-Type: multipart/mixed; boundary="a0mTEMGT67yIf3vbrXCaO7gMnc5Dd52pb"; protected-headers="v1" From: Jeff To: gtk-perl-list@gnome.org Message-ID: <846b49cb-3ba6-d0ca-755a-1b9cdf19f58c@posteo.net> Subject: Re: Gtk3 and drag'n'drop References: <712da85a-aef0-2087-8157-eab3c9753fbc@posteo.net> In-Reply-To: --a0mTEMGT67yIf3vbrXCaO7gMnc5Dd52pb Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 24/02/18 20:10, oldtechaa wrote: > For documentation for Gtk3 in Perl, you can use the "perli11ndoc" tool > included with Glib::Object::Introspection. If you're using Debian or a > derived distro, you'll need to install libxml-libxml-perl and > libgtk-3-dev also, but the docs for drag look like they're in there. I > see drag_finish() and GestureDrag. This might help. That's a really good tip. Thanks. It could do with a search function. Regards Jeff --a0mTEMGT67yIf3vbrXCaO7gMnc5Dd52pb-- --PXC4YRBRJNGCZGLyLtoZzzJaSD2Weczo6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEERjKT5K4zhxhG8wInsyHyAxEPyvMFAlqRuioACgkQsyHyAxEP yvMQpA//bkF4JA9FIpRWCURWWXgRxkslJtTYr1JeoGvRRx6Q71kLm/AuVpACkY/+ hz9Ix4oiUGNBU3gWbPxyjWQG8Ozqn5caXF8jn8I093lE/IWH9woXTiI8Kv8Iv+XX yUXCxpXhUohyGIV0V7IcCCi8L7N6uGEHUXyMoWOIUDC4Ll16FhBavF+uw8NBOMMy nv53L1zsoY3MM2HuMDSTdJkoR2IEqEzDDPxiZX1qTeNnH1K9JNi8GFYNF1A0zJcg eJVTEh53RiKix13gsdVJOlZRkCKg5qfhK7/KJjcd7hxj1cdeP2jpOAQg6ltlCssX Fftqbc1PawUWQ52/gCaTbCqVspnCn5FXflptF7FfGJxbPgmtY4DlL64Sn9HkCNAR 5rjVjKVy3kVN9xKakJQL5Lzc4JM8samHyB9b3xV0FDRtVJykuYEmdozuOpDHkGVf /soj2/5LZ/7I+qSWMuyqHJvksGMjT+7VyhwOMEyBwvGH6s1DP4epE0MiRsvG7xHh Y/iobNUT4FmdWre/VCsfo+2I73fIuk/TBtdvkwPqmPAnTXT9vUyiJf6DxaLLgue9 9vZI3Kwi9wjvDzXrbQroTdJpEQMWuUnWS/NByEfCDmxRPc8GLsAIsjfflLhO654d lbEARaNK9aPXDiUSWquUmJGoIpOadtN2eMO0xp1nKGttAQsU9AY= =vT+K -----END PGP SIGNATURE----- --PXC4YRBRJNGCZGLyLtoZzzJaSD2Weczo6-- From oldtechaa@gmail.com Sun Feb 25 19:43:29 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id B5A1D760D6 for ; Sun, 25 Feb 2018 19:43:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SgviC3RGk_KY for ; Sun, 25 Feb 2018 19:43:28 +0000 (UTC) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by smtp.gnome.org (Postfix) with ESMTPS id BF348760AD for ; Sun, 25 Feb 2018 19:43:27 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id s206so14145172wme.0 for ; Sun, 25 Feb 2018 11:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Qtc3IR4sNRXdGsegxrLyAFiWGGaVwtQCuPedrx78qiE=; b=GbZvKguAq3yOTLn4xlXhJkGVckwE5HusEq/CEI56Bf24sjxPlQdK3SOmAIH04lYPKa t1EQo9vO0VNpudh7DDl4dka69UCxV36sxfLjAByyHvi1Wqru2fnAK+G26EdWDqNKkc/u e7v09SxC4I6q9V+Ypt/+/TiX5V5WVkMMhv3Jvdy7LzRpHhOs+COuMB5xaSw23UQvR0yQ rqfOJmR0sdkLLNAv5ijAoxNg1l8GhQHc3bfKPwlXV/LAve/WiON18KZpRl9HDlEVbBdU Uiexkl0TO2ABAT4GziIn+ZCd3Xx2Z1Hm14uZv1ROeWPTTARwZPTS5pU/wLQ0U1jLhoLU oooA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Qtc3IR4sNRXdGsegxrLyAFiWGGaVwtQCuPedrx78qiE=; b=kwHO0yklcPZLTTTRMhGqKXNdz4Ha372v3PHWii9ObbCBr9WjaEkj01yXWkXe9XuYl6 4fwMJmDZwB1UjAbBTDXToZVzfxAfhRnS6I522W9unxU9539HNMFmb12DipT0l+EiYn9h 3BowB643gyNLTS8qUXX6se1LHg9c9gWERovxFb/W2PvUSOQJ3yQSmo+LCpF2FAaIG/cV kTBvPdtGf+UsHwDngfWjYR9L6gtZq2excdpYWAYKN3jBtDBR7vPfrp5GdTlnHjusogKt 1jYcfp160MNvP6PLx9X/IvFULfZzPTAydpR2fPS1iiLYxgoEdY0ZNWaPsPGCVoXesiOC u/rw== X-Gm-Message-State: APf1xPAGynnyKq4R8F0ze1FAW1M5zUv/qqkepXCIOZ7CQ/3ox0ay/OhD y/c22dhVy4+gj2Q5DqQf/4FbxMYFjZ8zBjNCLbE= X-Google-Smtp-Source: AH8x225ONy7aDPwHJ0qYKN+CYfaAWzrdFMQVkq7qia5YCFKUXoMZ1svAGEmh4XzW0jupV8dDUUIWajl6sKWzQQW7jY8= X-Received: by 10.80.153.221 with SMTP id n29mr11845851edb.303.1519587804474; Sun, 25 Feb 2018 11:43:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.220.129 with HTTP; Sun, 25 Feb 2018 11:43:23 -0800 (PST) Received: by 10.80.220.129 with HTTP; Sun, 25 Feb 2018 11:43:23 -0800 (PST) In-Reply-To: References: <151949054798.19691.18370564893264669406.reportbug@oldtechaa.oldtechaa.com> <85vael2oxk.fsf@boum.org> From: oldtechaa Date: Sun, 25 Feb 2018 14:43:23 -0500 Message-ID: Subject: Re: Bug#891334: libglib-object-introspection-perl: Does not recommend or depend on libxml-libxml-perl for perli11ndoc To: gtk-perl-list@gnome.org Content-Type: multipart/alternative; boundary="94eb2c197e124a732605660e9b4d" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 19:43:29 -0000 --94eb2c197e124a732605660e9b4d Content-Type: text/plain; charset="UTF-8" Sorry I emailed your address, Gmail likes to do that. Original email below. I see what you mean. I think a suggestion would still be good. As for its usefulness, it can help with the nuances of the Perl binding. Some things get bound kind of weirdly, so personally, I use the C API reference but when something doesn't work as it should, I use perli11ndoc. The perl-specific examples can be invaluable. While it's convenient to have it in $PATH, I can see it being a problem, especially since having no manpage violates Debian standards, doesn't it? The problem is that's true of any executable from what I saw, not just those in $PATH. Is there any way we can follow standards but keep perli11ndoc, even if it's slightly less convenient? oldtechaa On Feb 25, 2018 8:12 AM, "intrigeri" wrote: Hi, oldtechaa: > Package: libglib-object-introspection-perl > Version: 0.042-1 > Severity: normal > Dear Maintainer, > The utility perli11ndoc in libglib-object-introspection-perl depends on > libxml-libxml-perl. This should be either a package dependency or recommendation for > those who intend to use perli11ndoc. Let's keep in mind that libglib-object-introspection-perl is needed at runtime by any Perl program that uses GObject introspection. Given Debian installs Recommends by default and perli11ndoc is an add-on that's only useful for developers, I don't think we should pull libxml-libxml-perl on all systems that happen to have a Perl program that uses GObject introspection. So IMO it should be "Suggests: libxml-libxml-perl" at best, with a note in README.Debian about this. To be honest I've been hesitating about shipping perli11ndoc in $PATH at all: it lacks a manpage, has additional dependencies, and I'm not quite sure what it gives us that Devhelp does not (while Devhelp displays much more complete and better structured documentation). So perhaps shipping this program under /usr/share/doc/libglib-object-introspection-perl/examples/ would be more suitable. What do you think? Cheers, -- intrigeri --94eb2c197e124a732605660e9b4d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry I emailed your address, Gmail likes to do that= . Original email below.

=
I see what you mean. I t= hink a suggestion would still be good.

As for its usefulness, it can help with the nuances of the Perl b= inding. Some things get bound kind of weirdly, so personally, I use the C A= PI reference but when something doesn't work as it should, I use perli1= 1ndoc. The perl-specific examples can be invaluable.

While it's convenient to have it in $PATH,= I can see it being a problem, especially since having no manpage violates = Debian standards, doesn't it? The problem is that's true of any exe= cutable from what I saw, not just those in $PATH. Is there any way we can f= ollow standards but keep perli11ndoc, even if it's slightly less conven= ient?

oldtechaa

On Feb 25, 2018 8:12 AM, &quo= t;intrigeri" <intrigeri@deb= ian.org> wrote:
Hi,

oldtechaa:=
> Package: libglib-object-introspection-perl
> Versi= on: 0.042-1
> Severity: normal

> Dear Maintainer,

&g= t; The utility perli11ndoc in libglib-object-introspection-perl depend= s on
> libxml-libxml-perl. This should be either a package dependency= or recommendation for
> those who intend to use perli11ndoc.

=
Let's keep in mind that libglib-object-introspection-perl is= needed at
runtime by any Perl program that uses GObject introspection.<= br>
Given Debian installs Recommends by default and perli11ndoc is anadd-on that's only useful for developers, I don't think we should = pull
libxml-libxml-perl on all systems that happen to have a Perl progra= m
that uses GObject introspection. So IMO it should be "Suggests:libxml-libxml-perl" at best, with a note in README.Debian about this= .

To be honest I've been hesitating about shipping perli11ndoc i= n $PATH
at all: it lacks a manpage, has additional dependencies, and I&#= 39;m not
quite sure what it gives us that Devhelp does not (while Devhel= p
displays much more complete and better structured documentation).
S= o perhaps shipping this program under
/usr/share/doc/libglib-object-introspection-perl/examples/
would be more suitable. What do you think?=

Cheers,
--
intrigeri

--94eb2c197e124a732605660e9b4d-- From oldtechaa@gmail.com Sun Feb 25 19:44:46 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 01A6F760D6 for ; Sun, 25 Feb 2018 19:44:46 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id loqJpHp2PJjl for ; Sun, 25 Feb 2018 19:44:44 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by smtp.gnome.org (Postfix) with ESMTPS id 85757760AD for ; Sun, 25 Feb 2018 19:44:44 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id h21so13646138wmd.1 for ; Sun, 25 Feb 2018 11:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=cT3iPVwz3vJfU34Cguph/jmuykyIrlGDp8SLhAuancI=; b=QtfxcwhdiYBJzD/JqZO2QOClBL+bsNabL9+fDyIhwNW1ENMX2tNixokJyVBCFL9yoK BZppPcDm8s5BsGaHnl6QE4u4FJFdPDrtqA4/8GdDBph/vGyQmbesxtPP5iuahlQR7ZSJ l1Y7a5KxRgUv+TKxn5mTV3V9uxz80ipMH55wXttG14Tf1Y0nmi+caEY55nKpsddxaqN2 XkxJrg/7KUIhDWiLeudO8ewJSh2MRSh7SfWv1LHB0cF9+mEVicNEFMpNaYy//W2aGZuM aGeJK3f0SpB+U+os1dq4M28RZh22XYnMAEGRFrP1A8ct6tniPqXQwJRQWx2sCNfoUGSu rLTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=cT3iPVwz3vJfU34Cguph/jmuykyIrlGDp8SLhAuancI=; b=P8DjHwqjaTK4xOCR/AwQ8IZIGS3N4ilNeLG9GkCuyTstCQz6zacJsCXJjMZRKtJzBm SPPg4DTZU/aThU+xkHKKW1yR3tijnw+cndMczzIUkG7dLspCgyzjYlQSnhxC8lKP7zpk /webRcaI3kLv+p17a97dByQOIDxH+N13Aatc+plmUvFqF3mZ5v0/pxKFI+I8AMiMfMMB QcXOGC/LlbTTresKZseqlsGPRwOyqEn2YLOh5O8iuEJCA8xkkh9uJAEBKqo/kBdegK1C K1UhwQZ9n2LgAclYd1VZ+3WTxG5pPx/4CR+FEfjr16v1kYtEsORpqhLVKrczKkaj/HKV PYEg== X-Gm-Message-State: APf1xPCT0QfR148s4d2sAudQLQRXs4pGoo0pOAEdUm1ZMDAOKQVkMiDI MBFu5CqqsPTWUzhExaagTpwNZw6ZKy/0Qa/pxvA= X-Google-Smtp-Source: AH8x226eE+Z5F684za+VZgSNiGmzZIaCIBbYdlc+zB7WE1D7jIRZNIGuLXuYvoBXwaSS2ceYmJo0QbFIIX8OQLGdw2k= X-Received: by 10.80.172.44 with SMTP id v41mr11667659edc.130.1519587881638; Sun, 25 Feb 2018 11:44:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.220.129 with HTTP; Sun, 25 Feb 2018 11:44:41 -0800 (PST) Received: by 10.80.220.129 with HTTP; Sun, 25 Feb 2018 11:44:41 -0800 (PST) In-Reply-To: References: <151949135201.19844.3870024611319532027.reportbug@oldtechaa.oldtechaa.com> <85371p43t8.fsf@boum.org> From: oldtechaa Date: Sun, 25 Feb 2018 14:44:41 -0500 Message-ID: Subject: Fwd: Re: Bug#891339: libglib-object-introspection-perl: Documentation should make a note that the base library devel packages must be installed To: gtk-perl-list@gnome.org Content-Type: multipart/alternative; boundary="f403045c3b46e3dfd205660e9fe6" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Feb 2018 19:44:46 -0000 --f403045c3b46e3dfd205660e9fe6 Content-Type: text/plain; charset="UTF-8" I'd be OK with drafting it, but it may be a couple days. We can discuss the future of perli11ndoc in #891334. --f403045c3b46e3dfd205660e9fe6 Content-Type: text/html; charset="UTF-8"
I'd be OK with drafting it, but it may be a couple days. We can discuss the future of perli11ndoc in #891334.
--f403045c3b46e3dfd205660e9fe6-- From oldtechaa@gmail.com Mon Feb 26 04:32:20 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id 1256D760E6 for ; Mon, 26 Feb 2018 04:32:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I6s6eFTYh_yH for ; Mon, 26 Feb 2018 04:32:18 +0000 (UTC) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by smtp.gnome.org (Postfix) with ESMTPS id 931C3760CB for ; Mon, 26 Feb 2018 04:32:18 +0000 (UTC) Received: by mail-wm0-f54.google.com with SMTP id t74so14874103wme.3 for ; Sun, 25 Feb 2018 20:32:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=i6BYp24AqQo2n1/rG3KtvqSYKse2MHoHgJMsoCDDHuk=; b=pO5+Hw+cLUfSUINFMoihmuchdzpROMGABMCqXt+eMQAar1BeU6p+ZgVE+LQ6sq0L3S OCIE4g3WKa37efO9GvKH+te/bwb+y1gZEUKSpeipXTYWOcgQGLGDObPnJaFAHE2GwXTq E7JtMVyObz+U2tEQqJ9KWQzSAELWkaGAGas7qeixf612AOJFjIX8FBAJLtCM100QS5aa x1DXvCbF0LULqCcex7l/YfO7b1r+kTrDMpF67r3xOGZhsoeSF3Xp+5wkkN90TcmbM8tC KysU9yjdzSDmGR+KdUAi7+duFzrjKpmrf7YPz5MGOTes+9Ql1QAUtan5on4+uRdSAPom Y/jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=i6BYp24AqQo2n1/rG3KtvqSYKse2MHoHgJMsoCDDHuk=; b=TS0C9LCskFUgo9ITc/0WwDCdb9nX8W457TTOI0Ur3HxgyywVs0yXiJJKuW2iYt0msh c92rMUB+Ku2q/hU5G1UgMWAoPpErMI3d/4oDRVyhUDfVgD4ZHxiUzCTVuJPkPBLcb9UM dkLA0gwjwFkL+/VIOFX2kwAA1D347gpoOVWSZdDE/iYGaPWt6JZ6xa1ALkopmWLwSFtq UIw9fGZJlQGFuFPR/8tSE2VPpHFLq5NxUobfilbGDtZf33otbWga1jSTL4MvehUq3ubB pBnVNNIzJobTcvGqFO0KiRTnu/X+ZsxELZQRXy3Kv3R0z5ouNqyXKsPuT+w9f2y902Pm 0dKA== X-Gm-Message-State: APf1xPCBpqrqF5MTqmiTz10sRcxw7vkvG/w+ZE6kq/QrebkZH3Kks0BR lpW+WH8kj4/dM9cH6GQjTsIB83oUaY/7AtDJ7+U= X-Google-Smtp-Source: AH8x227yWJ4GW2k1ENnQqztD5byOTVlplkea96qS7Q6bc9U6aCwRga8n4WqqoKAEW5BChrMFV1HQQTFUTeEsDaMlaJ8= X-Received: by 10.80.153.221 with SMTP id n29mr13127398edb.303.1519619535448; Sun, 25 Feb 2018 20:32:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.220.129 with HTTP; Sun, 25 Feb 2018 20:32:14 -0800 (PST) Received: by 10.80.220.129 with HTTP; Sun, 25 Feb 2018 20:32:14 -0800 (PST) In-Reply-To: References: <151949054798.19691.18370564893264669406.reportbug@oldtechaa.oldtechaa.com> <85vael2oxk.fsf@boum.org> From: oldtechaa Date: Sun, 25 Feb 2018 23:32:14 -0500 Message-ID: Subject: Re: Bug#891334: libglib-object-introspection-perl: Does not recommend or depend on libxml-libxml-perl for perli11ndoc To: gtk-perl-list@gnome.org Content-Type: multipart/alternative; boundary="94eb2c197e129aadf1056615fe1b" X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2018 04:32:20 -0000 --94eb2c197e129aadf1056615fe1b Content-Type: text/plain; charset="UTF-8" Very sorry about this and the other bug report, #891339. These are bugs I was filing in Debian and I typed in the wrong address for the emails. If anyone has any input on how perli11ndoc could be improved in Debian or otherwise though, please take a look at the reports. Again, very sorry, oldtechaa On Feb 25, 2018 2:43 PM, "oldtechaa" wrote: > Sorry I emailed your address, Gmail likes to do that. Original email below. > > I see what you mean. I think a suggestion would still be good. > > As for its usefulness, it can help with the nuances of the Perl binding. > Some things get bound kind of weirdly, so personally, I use the C API > reference but when something doesn't work as it should, I use perli11ndoc. > The perl-specific examples can be invaluable. > > While it's convenient to have it in $PATH, I can see it being a problem, > especially since having no manpage violates Debian standards, doesn't it? > The problem is that's true of any executable from what I saw, not just > those in $PATH. Is there any way we can follow standards but keep > perli11ndoc, even if it's slightly less convenient? > > oldtechaa > > On Feb 25, 2018 8:12 AM, "intrigeri" wrote: > > Hi, > > oldtechaa: > > Package: libglib-object-introspection-perl > > Version: 0.042-1 > > Severity: normal > > > Dear Maintainer, > > > The utility perli11ndoc in libglib-object-introspection-perl depends on > > libxml-libxml-perl. This should be either a package dependency or > recommendation for > > those who intend to use perli11ndoc. > > Let's keep in mind that libglib-object-introspection-perl is needed at > runtime by any Perl program that uses GObject introspection. > > Given Debian installs Recommends by default and perli11ndoc is an > add-on that's only useful for developers, I don't think we should pull > libxml-libxml-perl on all systems that happen to have a Perl program > that uses GObject introspection. So IMO it should be "Suggests: > libxml-libxml-perl" at best, with a note in README.Debian about this. > > To be honest I've been hesitating about shipping perli11ndoc in $PATH > at all: it lacks a manpage, has additional dependencies, and I'm not > quite sure what it gives us that Devhelp does not (while Devhelp > displays much more complete and better structured documentation). > So perhaps shipping this program under > /usr/share/doc/libglib-object-introspection-perl/examples/ > would be more suitable. What do you think? > > Cheers, > -- > intrigeri > > > --94eb2c197e129aadf1056615fe1b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Very sorry about this and the other bug report, #891339. = These are bugs I was filing in Debian and I typed in the wrong address for = the emails. If anyone has any input on how perli11ndoc could be improved in= Debian or otherwise though, please take a look at the reports.

Again, very sorry,
oldtechaa

On Feb 25, 2018 2:43 PM, "oldtechaa" <oldtechaa@gmail.com> wrote:
Sorry I emailed y= our address, Gmail likes to do that. Original email below.

I see what you mean. I think a suggestion would still be good.
As for its usefulness, it can h= elp with the nuances of the Perl binding. Some things get bound kind of wei= rdly, so personally, I use the C API reference but when something doesn'= ;t work as it should, I use perli11ndoc. The perl-specific examples can be = invaluable.

While it'= ;s convenient to have it in $PATH, I can see it being a problem, especially= since having no manpage violates Debian standards, doesn't it? The pro= blem is that's true of any executable from what I saw, not just those i= n $PATH. Is there any way we can follow standards but keep perli11ndoc, eve= n if it's slightly less convenient?

oldtechaa

On Feb 25, 2018 8:12 AM, "intrigeri" &= lt;intrigeri@debi= an.org> wrote:
Hi,

oldtechaa:<= br>
> Package: libglib-object-introspection-perl
> Versio= n: 0.042-1
> Severity: normal

> Dear Maintainer,

>= ; The utility perli11ndoc in libglib-object-introspection-perl depends= on
> libxml-libxml-perl. This should be either a package dependency = or recommendation for
> those who intend to use perli11ndoc.

<= /div>Let's keep in mind that libglib-object-introspection-perl is = needed at
runtime by any Perl program that uses GObject introspection.
Given Debian installs Recommends by default and perli11ndoc is an
= add-on that's only useful for developers, I don't think we should p= ull
libxml-libxml-perl on all systems that happen to have a Perl program=
that uses GObject introspection. So IMO it should be "Suggests:libxml-libxml-perl" at best, with a note in README.Debian about this.=

To be honest I've been hesitating about shipping perli11ndoc in= $PATH
at all: it lacks a manpage, has additional dependencies, and I= 9;m not
quite sure what it gives us that Devhelp does not (while Devhelp=
displays much more complete and better structured documentation).
So= perhaps shipping this program under
/usr/share/doc/libglib-object-= introspection-perl/examples/
would be more suitable. What do you think?<= br>
Cheers,
--
intrigeri

--94eb2c197e129aadf1056615fe1b-- From intrigeri@debian.org Mon Feb 26 08:21:05 2018 Return-Path: X-Original-To: gtk-perl-list@gnome.org Delivered-To: gtk-perl-list@gnome.org Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.gnome.org (Postfix) with ESMTP id C7E2676119 for ; Mon, 26 Feb 2018 08:21:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at gnome.org X-Spam-Flag: NO X-Spam-Score: -1.899 X-Spam-Level: X-Spam-Status: No, score=-1.899 tagged_above=-999 required=2 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, UNPARSEABLE_RELAY=0.001] autolearn=ham Received: from smtp.gnome.org ([127.0.0.1]) by localhost (restaurant.gnome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SQlJ5V7T0cFf for ; Mon, 26 Feb 2018 08:21:04 +0000 (UTC) X-Greylist: delayed 370 seconds by postgrey-1.34 at restaurant.gnome.org; Mon, 26 Feb 2018 08:21:04 UTC Received: from boum.org (boum.org [204.13.164.192]) by smtp.gnome.org (Postfix) with ESMTPS id BF9BF760FD for ; Mon, 26 Feb 2018 08:21:04 +0000 (UTC) Received: from censure.boum.org (censure.boum.org [192.168.122.20]) by boum.org (Postfix) with ESMTP id C490F941; Mon, 26 Feb 2018 09:14:50 +0100 (CET) Received: from boum.org ([192.168.122.29]) by censure.boum.org (censure.boum.org [192.168.122.20]) (amavisd-new, port 10024) with ESMTP id pGlySnrWo8Jc; Mon, 26 Feb 2018 09:14:51 +0100 (CET) Received: from boum.org (boum.org [127.0.0.1]) with ESMTPSA id C7A4A8F7 Received: from localhost (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id AD32B7262BE; Mon, 26 Feb 2018 09:14:44 +0100 (CET) Message-Id: <85371omakr.fsf@boum.org> From: intrigeri To: oldtechaa Cc: 891334@bugs.debian.org, gtk-perl-list@gnome.org Subject: Re: Bug#891334: libglib-object-introspection-perl: Does not recommend or depend on libxml-libxml-perl for perli11ndoc References: <151949054798.19691.18370564893264669406.reportbug@oldtechaa.oldtechaa.com> <85vael2oxk.fsf@boum.org> Reply-To: 891334@bugs.debian.org Date: Mon, 26 Feb 2018 09:14:44 +0100 In-Reply-To: (oldtechaa@gmail.com's message of "Sun, 25 Feb 2018 14:43:23 -0500") MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: gtk-perl-list@gnome.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Using GTK+ with Perl List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2018 08:21:06 -0000 oldtechaa: > Sorry I emailed your address, Gmail likes to do that. Original email belo= w. =E2=80=A6 and now you emailed the upstream mailing list. I'm putting the Debian bug back into the loop, Cc'ing the upstream mailing list *once* so people there understand what's going on, and setting Reply-To =E2=86=92 the Debian bug report. > I see what you mean. I think a suggestion would still be good. > As for its usefulness, it can help with the nuances of the Perl binding. > Some things get bound kind of weirdly, so personally, I use the C API > reference but when something doesn't work as it should, I use perli11ndoc. > The perl-specific examples can be invaluable. > While it's convenient to have it in $PATH, I can see it being a problem, > especially since having no manpage violates Debian standards, doesn't it? > The problem is that's true of any executable from what I saw, not just > those in $PATH. Is there any way we can follow standards but keep > perli11ndoc, even if it's slightly less convenient? Cheers, --=20 intrigeri