From c0334f51acc0029be14bfd17750246c1f601cd08 Mon Sep 17 00:00:00 2001 From: Thierry N Date: Sun, 9 Aug 2009 14:33:29 +0200 Subject: Ajout de checkgmail#1.13-1 --- extra/checkgmail/.footprint | 11 + extra/checkgmail/.md5sum | 4 + extra/checkgmail/Pkgfile | 21 ++ extra/checkgmail/checkgmail.desktop | 550 ++++++++++++++++++++++++++++++++++++ extra/checkgmail/checkgmail.png | Bin 0 -> 449 bytes extra/checkgmail/svn-33.patch | 327 +++++++++++++++++++++ 6 files changed, 913 insertions(+) create mode 100644 extra/checkgmail/.footprint create mode 100644 extra/checkgmail/.md5sum create mode 100755 extra/checkgmail/Pkgfile create mode 100644 extra/checkgmail/checkgmail.desktop create mode 100644 extra/checkgmail/checkgmail.png create mode 100644 extra/checkgmail/svn-33.patch diff --git a/extra/checkgmail/.footprint b/extra/checkgmail/.footprint new file mode 100644 index 000000000..14f8bdd6a --- /dev/null +++ b/extra/checkgmail/.footprint @@ -0,0 +1,11 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/checkgmail +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/applications/ +-rw-r--r-- root/root usr/share/applications/checkgmail.desktop +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/checkgmail.1.gz +drwxr-xr-x root/root usr/share/pixmaps/ +-rw-r--r-- root/root usr/share/pixmaps/checkgmail.png diff --git a/extra/checkgmail/.md5sum b/extra/checkgmail/.md5sum new file mode 100644 index 000000000..19bb3e409 --- /dev/null +++ b/extra/checkgmail/.md5sum @@ -0,0 +1,4 @@ +8f6742ba9c09f7b7b23a5be2e14708c7 checkgmail-1.13.tar.bz2 +8b5287c2a3468fc4ec6bbcb754b44144 checkgmail.desktop +f551f6cefb06201b03f8cb41fc85edb3 checkgmail.png +cd42ddddeb68e9f59e9b80836ff8ac31 svn-33.patch diff --git a/extra/checkgmail/Pkgfile b/extra/checkgmail/Pkgfile new file mode 100755 index 000000000..441e1d093 --- /dev/null +++ b/extra/checkgmail/Pkgfile @@ -0,0 +1,21 @@ +# Description: Notificateur de messages provenant gmail +# URL: http://checkgmail.sourceforge.net/ +# Maintainer: NutyX core team +# Packager: thierryn1 at hispeed dot ch +# Depends on: p5-gtk, p5-gtk2-trayicon, p5-crypt-ssleay, p5-libwww, p5-xml-simple + +name=checkgmail +version=1.13 +release=1 +source=(http://downloads.sourceforge.net/$name/$name-$version.tar.bz2 \ + checkgmail.desktop checkgmail.png svn-33.patch) + +build() { + cd $name-$version + patch -Np1 -i ../svn-33.patch + install -D -m 755 $name $PKG/usr/bin/$name + install -D -m 644 man/$name.1.gz $PKG/usr/share/man/man1/$name.1.gz + install -D -m 644 ../$name.desktop $PKG/usr/share/applications/$name.desktop + install -D -m 644 ../$name.png $PKG/usr/share/pixmaps/$name.png + +} diff --git a/extra/checkgmail/checkgmail.desktop b/extra/checkgmail/checkgmail.desktop new file mode 100644 index 000000000..a05fe7d4b --- /dev/null +++ b/extra/checkgmail/checkgmail.desktop @@ -0,0 +1,550 @@ + + + + + + + + +Arch Linux Repositories [community] Log of /community/network/checkgmail/checkgmail.desktop + + + + + + + + + +
+ + +
+ + +
+
+
+
+ +
+ +
+ + + + +[community] +/ + + + +community +/ + + + +network +/ + + + +checkgmail +/ + + + +checkgmail.desktop + + + + +
+ + +
+ +
+

Log of /community/network/checkgmail/checkgmail.desktop

+ +

+ +Parent Directory Parent Directory + + + + +

+ +
+ + + + + + + + + + + + + + + + + + + + +
Links to HEAD: +(view) +(download) + +(annotate) +
Links to CURRENT: +(view) +(download) + +(annotate) +
Sticky Tag:
+
+ + + + + + +
+
+ +
+
+ + + + +
+
+ +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RevisionTasksDiffsBranches/
Tags
AgeAuthor
+1.2 + + + +View
+ +Download
+ +Annotate
+
+ + + + +[select for diffs]
+ + + +Diff to previous 1.1 + +
+ + +
+ + + + +MAIN
+ + + + + + + +
+ + +
+ +
+ +13 months, 3 weeks ago
Thu Mar 20 14:45:07 2008 UTC + + + +
Changes since 1.1: +2 -2 lines + + + +
+BaSh +
+ +Log:
*** empty log message ***
+
+
+1.1 + + + +View
+ +Download
+ +Annotate
+
+ + + + +[select for diffs]
+ + + + +
+ + + + +MAIN
+ + + + + + +  + +
+ +2 years, 1 month ago
Thu Mar 22 21:23:36 2007 UTC + + + +
+dtw +
+ +Log:
whoops
+
+
+ + + + + + +
+

+This form allows you to request diffs between any two revisions of this file. +For each of the two "sides" of the diff, + +select a symbolic revision name using the selection box, or choose +'Use Text Field' and enter a numeric revision. + +

+
+ + + + + + + + + +
  + +Diffs between + + + + +and + + + + +
  +Type of Diff should be a + + +
+
+
+ + +
+
+ + +Sort log by: + + +
+
+ + +
+
+Copyright © 2002-2008 +Judd Vinet and +Aaron Griffin. +
+The Arch Linux name and logo are recognized trademarks. Some rights reserved. +
+ + + + + + diff --git a/extra/checkgmail/checkgmail.png b/extra/checkgmail/checkgmail.png new file mode 100644 index 000000000..fbd1c5d1d Binary files /dev/null and b/extra/checkgmail/checkgmail.png differ diff --git a/extra/checkgmail/svn-33.patch b/extra/checkgmail/svn-33.patch new file mode 100644 index 000000000..5b1257355 --- /dev/null +++ b/extra/checkgmail/svn-33.patch @@ -0,0 +1,327 @@ +--- checkgmail-1.13/checkgmail 2008-01-17 07:30:23.000000000 +0100 ++++ checkgmail/checkgmail 2008-07-22 21:57:51.000000000 +0200 +@@ -5,7 +5,7 @@ + # system tray; optionally saves password in encrypted form using + # machine-unique passphrase + +-# version 1.12.1svn (25/6/2007) ++# version 1.13svn (14/2/2008) + # Copyright © 2005-7 Owen Marshall + + # This program is free software; you can redistribute it and/or modify +@@ -31,9 +31,12 @@ + # Command-line processing + # + +-my ($version, $silent, $nocrypt, $update, $notsexy, $profile, $disable_monitors_check, $private, $cookies, $popup_size, $hosted_tmp, $show_popup_delay, $popup_persistence, $usekwallet, $libsexy); ++# global variables (can't be set global in the BEGIN block) ++my ($version, $silent, $nocrypt, $update, $notsexy, $profile, $disable_monitors_check, ++ $private, $cookies, $popup_size, $hosted_tmp, $show_popup_delay, ++ $popup_persistence, $usekwallet, $libsexy, $nologin, $mailno, $debug); + BEGIN { +- $version = "1.12.1svn"; ++ $version = "1.13svn"; + $silent = 1; + $profile = ""; + $cookies = 1; +@@ -64,6 +67,10 @@ + $notsexy = 1; + last }; + ++ /no-login/ && do { ++ $nologin = 1; ++ last }; ++ + /cookie_login/ && do { + $cookies = 1; + last }; +@@ -105,6 +112,18 @@ + $update = 1; + last }; + ++ ++ /numbers/ && do { ++ $mailno = 1; ++ last }; ++ ++ /debug/ && do { ++ $debug = 1; ++ $silent = 0; ++ last }; ++ ++ ++ + 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"; + exit 1; +@@ -158,6 +177,7 @@ + my $failed_packages; + + my $eval_sub = sub { ++ print "$_\n" if $debug; + eval $_; + if ($@) { + return unless m/(use|require)\s*([\w:-]+).*?\;/; +@@ -176,6 +196,7 @@ + use Thread::Queue; + use Thread::Semaphore; + use threads::shared; ++ use Encode; + use XML::Simple; + use FileHandle; + use LWP::UserAgent; +@@ -355,14 +376,17 @@ + my $fat_lady = new Thread::Semaphore(0); + my $child_exit : shared = 0; # to signal exit to child + ++print "About to start new thread ...\n" if $debug; + # Start http checking thread ... + my $http_check = new threads(\&http_check); ++print "Parent: Process now continues ...\n" if $debug; + + + ####################### + # Prefs and Variables + # + ++print "Parent: Setting up global variables ...\n" if $debug; + # Prefs hash + my %pref_variables = ( + user => \$user, +@@ -430,6 +454,7 @@ + my $status_label; + # my $message_flag; + ++print "Parent: Checking the existence of ~/.checkgmail ...\n" if $debug; + # Create the default .checkgmail directory and migrate prefs from users of older versions + unless (-d $prefs_dir) { + if (-e "$prefs_dir") { +@@ -452,6 +477,7 @@ + # Icons + # + ++print "Parent: Loading icon data ...\n" if $debug; + # we load the pixmaps as uuencoded data + my ($error_data, $no_mail_data, $mail_data, $compose_mail_data); + load_icon_data(); +@@ -462,10 +488,12 @@ + + my $image = Gtk2::Image->new_from_pixbuf($no_mail_pixbuf); + ++ + ############## + # Setup tray + # + ++print "Parent: Setting up system tray ...\n" if $debug; + my $tray = Gtk2::TrayIcon->new("gmail"); + my $eventbox = Gtk2::EventBox->new; + my $tray_hbox = Gtk2::HBox->new(0,0); +@@ -488,14 +516,25 @@ + $eventbox->add($tray_hbox); + $tray_hbox->pack_start($image,0,0,0); + ++# number of new mail messages (use -numbers) ++my $number_label; ++if ($mailno) { ++ $number_label = Gtk2::Label->new; ++ $number_label->set_markup("0"); ++ $tray_hbox->pack_start($number_label,0,0,0); ++ $number_label->hide; ++} ++ + + ######################## + # Read prefs and login + # + ++print "Parent: Reading translations ...\n" if $debug; + # Read translations if they exist ... + read_translations(); + ++print "Parent: Reading prefs ...\n" if $debug; + # First time configuration ... + unless (read_prefs()) { + show_prefs(); +@@ -532,7 +571,7 @@ + + $tray->add($eventbox); + $tray->show_all; +- ++print "Parent: System tray now complete ...\n" if $debug; + + ############################ + # enter/leave notification +@@ -603,6 +642,7 @@ + # All set? Let's login ... + # + ++print "Parent: Sending semaphore to child process ...\n" if $debug; + # She's singing ... + $fat_lady->up; + +@@ -675,6 +715,7 @@ + + sub http_check { + # Threaded process for sending HTTP requests ... ++ print "Child: Checking thread now starting ... waiting for semaphore to continue\n" if $debug; + + # Variable initialisation isn't over until the fat lady sings ... + $fat_lady->down; +@@ -716,14 +757,21 @@ + unless ($hosted) { + # Normal Gmail login action ... + $error = http_get("https://www.google.com/accounts/ServiceLoginAuth?ltmpl=yj_wsad<mplcache=2&continue=https%3A%2F%2Fmail.google.com%2Fmail%3F&service=mail&rm=false<mpl=yj_wsad&Email=$URI_user&Passwd=$URI_passwd&rmShown=1&null=Sign+in", "LOGIN"); +- # $cookie_jar->scan(\&scan_at); ++ ++ $cookie_jar->scan(\&scan_at); ++ unless ($error || !$gmail_sid || !$gmail_gausr) { ++ $error = http_get("https://mail.google.com/mail/?auth=$gmail_sid&gausr=$gmail_gausr", 'GET'); ++ } ++ + # $error = http_get("https://mail.google.com/mail?nsr=0&auth=$gmail_sid&gausr=$gmail_gausr", "LOGIN"); + + } else { + # hosted domains work differently ... + # First we POST a login +- $error = http_get("https://www.google.com/a/$hosted/LoginAction|at=null&continue=http%3A%2F%2Fmail.google.com%2Fa%2F$hosted&service=mail&userName=$URI_user&password=$URI_passwd", "POST"); +- ++ # $error = http_get("https://www.google.com/a/$hosted/LoginAction|at=null&continue=http%3A%2F%2Fmail.google.com%2Fa%2F$hosted&service=mail&userName=$URI_user&password=$URI_passwd", "POST"); ++ # thanks to Olinto Neto for this fix for hosted domains: ++ $error = http_get("https://www.google.com/a/$hosted/LoginAction2|at=null&continue=http%3A%2F%2Fmail.google.com%2Fa%2F$hosted&service=mail&Email=$URI_user&Passwd=$URI_passwd", "POST"); ++ + # Then we grab the HID ("Hosted ID"?) cookie + $cookie_jar->scan(\&scan_at); + +@@ -1045,9 +1093,9 @@ + my $author = $author_name || $author_mail; + + # clean text for Pango compatible display ... +- $title = clean_text($title); +- $author = clean_text($author); +- $summary = clean_text($summary); ++ $title = clean_text_and_decode($title); ++ $author = clean_text_and_decode($author); ++ $summary = clean_text_and_decode($summary); + + my ($year, $month, $day, $hour, $min, $sec) = ($issued =~ m/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/); + my $time_abs = $sec+$min*60+$hour*3600+$day*86400+$month*2678400+$year*32140800; +@@ -1089,7 +1137,7 @@ + # Create popup text + if ($popup_authors) { + $popup_authors =~ s/, ([\w\s-]+)$/ $trans{notify_and} $1/; # replace final comma with "and" +- $popup_authors = clean_text($popup_authors); ++ $popup_authors = clean_text_and_decode($popup_authors); + $popup_text = "$trans{notify_new_mail}$popup_authors ..."; + } + +@@ -1111,6 +1159,32 @@ + return 1; + } + ++# Note -- for some reason (?? why ??) the title does not need decoding; all other data apparently does. Very strange ... ++sub clean_text_and_decode { ++ ($_) = @_; ++ # some basic replacements so that the text is readable ... ++ # (these aren't used by pango markup, unlike other HTML escapes) ++ s/…/\.\.\./g; ++ s/&\s/\& /g; ++ s/\\u003c//\n/g; ++ s//\>/g; ++ s/&(?>([\w\d\,\.]+))(?!;)/\&$1/g; #not a great fix, but at least it's simple (heavy irony ... :) ++ s/ / /g; ++ # s/\\n/\n/g; ++ # Encode::from_to($body, 'utf-8', 'iso-8859-15'); ++ # eval { decode("utf8", $_, Encode::FB_CROAK); }; ++ # my $body_decode = $@ ? $_ : decode("utf8", $_); ++ #my $body_decode= decode("utf-8", $_); ++ ++ # I have no idea why this works ... ++ my $body_encode = encode("utf8", $_); ++ my $body_decode = decode("utf8", $body_encode); ++ ++ return $body_decode; ++} + + sub clean_text { + ($_) = @_; +@@ -1129,6 +1203,7 @@ + return $_; + } + ++ + sub clean_text_body { + ($_) = @_; + # some basic replacements so that the text is readable ... +@@ -1164,9 +1239,13 @@ + # s/&(?>([\w\d\,\.]+))(?!;)/\&$1/g; #not a great fix, but at least it's simple (heavy irony ... :) + s/ / /g; + # s/\\n/\n/g; +- use Encode; + # Encode::from_to($body, 'utf-8', 'iso-8859-15'); +- my $body_decode= decode("utf-8", $_); ++ # eval { decode("utf8", $_, Encode::FB_CROAK); }; ++ # my $body_decode = $@ ? $_ : decode("utf8", $_); ++ # my $body_encode = encode("utf8", $_); ++ ++ # I have no idea why this works either ... ++ my $body_decode = decode("utf8", $_); + + return $body_decode; + } +@@ -1335,6 +1414,14 @@ + my ($status, $text) = @_; + my $new_mail = @messages; + ++ # display number of messages ++ if ($mailno) { ++ print "setting \"$new_mail\"\n"; ++ $number_label->set_markup("$new_mail"); ++ $new_mail ? $number_label->show : $number_label->hide; ++ # $new_mail ? $number_label->set_markup("$new_mail") : $number_label->set_markup(" ") ++ } ++ + my @sorted_messages = sort {$b->{time} <=> $a->{time}} @messages; + @messages = @sorted_messages; + +@@ -1497,8 +1584,7 @@ + $title_l_ebox->signal_handler_disconnect($s2); + unless ($mb) { + # yep, here's the magic code. This accesses the datapack, which we read with a little hack in the check routine ... +- $request->enqueue("GET:".gen_prefix_url()."/?ui=1&view=cv&search=all&th=$id&ww=1173&qt=&prf=1&pft=undefined&rq=xm&at=$gmail_at"); +- # $request->enqueue("GET:".gen_prefix_url()."/?ui=2&ik=b8bb7ca6af&view=cv&search=all&th=$id&rt=j&prf=1"); ++ $request->enqueue("GET:".gen_prefix_url()."/?ui=1&view=cv&search=all&th=$id&qt=&prf=1&pft=undefined&rq=xm&at=$gmail_at"); + } else { + # this allows the message text to be toggled ... + # oh yes, we're all about usability here, folks! :) +@@ -1684,6 +1770,7 @@ + show_notify($win_notify_temp); + } else { + $win_notify->destroy if $win_notify; ++ $win_notify=""; + $win_notify = $win_notify_temp; + } + } +@@ -1742,6 +1829,11 @@ + sub get_login_href { + # Login directly to gmail ... + $_ = shift; ++ ++ # The following is for people who like to stay permanently logged in ... ++ # (enable with -no-login on the command-line for now ...) ++ return $_ if $nologin; ++ + my ($options) = m/.*?\?(.*)/; + my $options_uri = $options ? "?&$options" : ""; + +@@ -1908,6 +2000,7 @@ + + if ($win_notify_temp) { + $win_notify->destroy; ++ $win_notify=""; + $win_notify=$new_win; + } + -- cgit v1.2.3-70-g09d2