On Mon, Feb 08, 2010 at 03:59:43PM +0100, Julian Andres Klode wrote: > Package: checkgmail > Version: 1.13+svn43-1 > Severity: wishlist > Tags: patch > > Hi, please include the attached patch in the next upload, > depend on GTK+ 2.18, and remove dependencies against > libsexy*. > > This should allow us to get rid of the sexy Perl bindings > if their maintainers agree. > > Also see > http://live.gnome.org/GnomeGoals/DropLibsexy > > Regards, > Julian > Sending patch
-- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
From 4e2218ec43639b26c0eac7bb40ebb9f1db4ee20e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode <[email protected]> Date: Mon, 8 Feb 2010 15:54:08 +0100 Subject: [PATCH] checkgmail: Replace Gtk2::Sexy::UrlLabel with Gtk2::Label. GTK+ 2.18 supports showing links inside a GtkLabel, similar to SexyUrlLabel. Port checkgmail to use this new functionality. --- checkgmail | 34 ++++++++++------------------------ 1 files changed, 10 insertions(+), 24 deletions(-) diff --git a/checkgmail b/checkgmail index 58a0818..03b5efb 100755 --- a/checkgmail +++ b/checkgmail @@ -32,9 +32,9 @@ use strict; # # global variables (can't be set global in the BEGIN block) -my ($version, $silent, $nocrypt, $update, $notsexy, $profile, $disable_monitors_check, +my ($version, $silent, $nocrypt, $update, $profile, $disable_monitors_check, $private, $cookies, $popup_size, $hosted_tmp, $show_popup_delay, - $popup_persistence, $usekwallet, $libsexy, $nologin, $mailno, $debug); + $popup_persistence, $usekwallet, $nologin, $mailno, $debug); BEGIN { $version = "1.13svn"; $silent = 1; @@ -63,9 +63,6 @@ BEGIN { $disable_monitors_check = 1; last }; - /no-libsexy/ && do { - $notsexy = 1; - last }; /no-login/ && do { $nologin = 1; @@ -125,7 +122,7 @@ BEGIN { print "CheckGmail v$version\nCopyright © 2005-7 Owen Marshall\n\n"; - print "usage: checkgmail [-profile=profile_name] [-popup_delay=millisecs] [-hosted=hosted_domain] [-no_cookies] [-popup_persistence=millisecs] [-private] [-v | -verbose] [-nocrypt] [-no-libsexy] [-disable-monitors-check] [-update] [-h]\n\n"; + print "usage: checkgmail [-profile=profile_name] [-popup_delay=millisecs] [-hosted=hosted_domain] [-no_cookies] [-popup_persistence=millisecs] [-private] [-v | -verbose] [-nocrypt] [-disable-monitors-check] [-update] [-h]\n\n"; exit 1; } @@ -266,14 +263,7 @@ EOF } } - # optional packages for urls in labels - foreach (split("\n"," - use Gtk2::Sexy; - ")) {&$eval_sub($_)}; - if (($failed_packages) && ($failed_packages =~ m/Sexy/i)) { - print "\nCheckGmail uses Gtk2::Sexy for clickable URLs in mail messages\nPlease download and install from CPAN (http://search.cpan.org) if you want to use this feature ...\n\n"; - $libsexy = 0; - } else { $libsexy = 1 unless $notsexy; } + } # There's something wrong with Debian's Crypt::Simple, and it's causing problems ... @@ -1272,7 +1262,6 @@ sub clean_text_body { s/<p\s*\/*\\*>/\n\n/g; s/<\/div\\*>/\n/g; # GMail now uses div blocks for paragraphs! Who'd have thought they could be so abhorrent? # s/(?:\n\s*){3,}/\n\n/sg; - s/<.*?>//g unless $libsexy; s/<a.*?(href=".*?").*?>(.*?)<\/a>/<-a $1>$2<-\/a>/ig; s/<[^-].*?>//g; # s/<([\/]|[^a])[^a].*?>//g; @@ -1854,15 +1843,12 @@ sub notify { $notify_vbox->pack_start($hbox_b,0,0,0); my $body_l; - if ($libsexy) { - $body_l = Gtk2::Sexy::UrlLabel->new; - $body_l->signal_connect(url_activated => sub{ - my ($url_label, $url) = @_; - run_command($gmail_command, $url); - }); - } else { - $body_l = Gtk2::Label->new; - } + $body_l = Gtk2::Label->new; + $body_l->signal_connect(activate_link => sub{ + + my ($url_label, $url) = @_; + run_command($gmail_command, $url); + }); $body_l->set_line_wrap(1); # my ($w, $h) = $body_l->get_size_request; # print "($w, $h)\n"; -- 1.6.6.1
signature.asc
Description: Digital signature

