File: 40_bts568882_use_GTK_new_widget_insteadof_libsexy.patch

package info (click to toggle)
checkgmail 1.13%2Bsvn43-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,564 kB
  • sloc: perl: 3,938; makefile: 14
file content (83 lines) | stat: -rw-r--r-- 3,022 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Author: Julian Andres Klode <jak@debian.org>
Description: 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.orig/checkgmail
+++ checkgmail/checkgmail
@@ -32,9 +32,9 @@
 #
 
 # 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 @@
 				$disable_monitors_check = 1;
 				last };
 				
-			/no-libsexy/ && do {
-				$notsexy = 1;
-				last };
 				
 			/no-login/ && do {
 				$nologin = 1;
@@ -125,7 +122,7 @@
 				
 				
 			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 @@
 		}
 	}
 	
-	# 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 @@
 	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 @@
 		$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";