Bug#428260: Proxy support

2007-08-13 Thread Luca Falavigna

Hi Alan,

This patch was initially submitted to Ubuntu 
(https://launchpad.net/bugs/66276).


I thought it had already been submitted upstream by Ubuntu uploader, but 
I was wrong. I submitted it just now.


Thank you.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#428260: Proxy support

2007-07-17 Thread Alan Woodland
Hi,

Luca Falavigna wrote:
 Attached patch provides proxy support. Thank you.
Have you forwarded this patch upstream or considered it for inclusion in
Debian before upstream review it?

Alan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#428260: Proxy support

2007-06-10 Thread Luca Falavigna
From: Luca Falavigna [EMAIL PROTECTED]
To: Debian Bug Tracking System [EMAIL PROTECTED]
Subject: Proxy support
Package: gmail-notify
Version: 1.6.1-3
Severity: normal
Tags: patch

Attached patch provides proxy support. Thank you.
diff -u gmail-notify-1.6.1/debian/changelog gmail-notify-1.6.1/debian/changelog
--- gmail-notify-1.6.1/debian/changelog
+++ gmail-notify-1.6.1/debian/changelog
@@ -1,3 +1,10 @@
+gmail-notify (1.6.1-4) unstable; urgency=low
+
+  * 05_proxy_support.patch: added proxy support
+
+ -- Luca Falavigna [EMAIL PROTECTED]  Sat,  9 Jun 2007 15:06:19 +0200
+
 gmail-notify (1.6.1-3) unstable; urgency=low
 
   * Chance default x-www-browser to www-browser (closes: #389532) 
--- gmail-notify-1.6.1.orig/debian/patches/05_proxy_support.patch
+++ gmail-notify-1.6.1/debian/patches/05_proxy_support.patch
@@ -0,0 +1,145 @@
+diff -Nur gmail-notify-1.6.1/gmailatom.py gmail-notify-1.6.1.new/gmailatom.py
+--- gmail-notify-1.6.1/gmailatom.py2007-06-09 13:41:13.0 +0200
 gmail-notify-1.6.1.new/gmailatom.py2007-06-09 18:32:24.0 
+0200
+@@ -116,12 +116,17 @@
+   host = https://mail.google.com;
+   url = host + /mail/feed/atom
+ 
+-  def __init__(self, user, pswd):
++  def __init__(self, user, pswd, proxy=None):
+   self.m = MailHandler()
+   # initialize authorization handler
+   auth_handler = urllib2.HTTPBasicAuthHandler()
+   auth_handler.add_password( self.realm, self.host, user, pswd)
+-  opener = urllib2.build_opener(auth_handler)
++  # manage proxy
++  if proxy:
++  proxy_handler = urllib2.ProxyHandler({'http': proxy})
++  opener = urllib2.build_opener(proxy_handler, 
auth_handler)
++  else:
++  opener = urllib2.build_opener(auth_handler)
+   urllib2.install_opener(opener)
+ 
+   def sendRequest(self):
+diff -Nur gmail-notify-1.6.1/GmailConfig.py 
gmail-notify-1.6.1.new/GmailConfig.py
+--- gmail-notify-1.6.1/GmailConfig.py  2007-06-09 18:32:08.0 +0200
 gmail-notify-1.6.1.new/GmailConfig.py  2007-06-09 18:32:09.0 
+0200
+@@ -18,8 +18,8 @@
+   configElements = None 
+ 
+   # Declare global variables for configuration as dictionary
+-  options = { gmailusername:None, gmailpassword:None, 
browserpath:www-browser, lang:English,   
+-  voffset:0, hoffset:0, 
checkinterval:2, 
++  options = { gmailusername:None, gmailpassword:None, 
browserpath:www-browser, proxy:None,
++  lang:English, voffset:0, hoffset:0, 
checkinterval:2, 
+   animationdelay:15, popuptimespan:5000}
+   
+   config = ConfigParser.RawConfigParser()
+@@ -49,6 +49,7 @@
+   [gmailusername,2,None,None],
+   [gmailpassword,22,None,None],
+   [browserpath,3,None,None],
++  [proxy,35,None,None],
+   [voffset,28,None,None],
+   [hoffset,27,None,None],
+   [checkinterval,31,None,None],
+@@ -57,7 +58,7 @@
+   ]
+ 
+   # Create table and attach to window
+-  table = gtk.Table( rows=11, columns=2, homogeneous=gtk.FALSE )
++  table = gtk.Table( rows=12, columns=2, homogeneous=gtk.FALSE )
+ 
+   self.window.add(table)
+ 
+@@ -114,7 +115,7 @@
+   self.savePassword.set_active( gtk.FALSE )
+   
+   self.savePassword.show()
+-  table.attach( alignment, 0, 2, 9, 10 )
++  table.attach( alignment, 0, 2, 10, 11 )
+   alignment.show()
+ 
+   # Add combobox to select language 
+@@ -129,14 +130,14 @@
+ self.cbo_langs.append_text( 
one_lang.get_name())
+   self.cbo_langs.set_active(0)
+   # Attach combobox and label
+-  table.attach( self.lbl_langs, 0, 1, 8, 9 )
++  table.attach( self.lbl_langs, 0, 1, 9, 10 )
+   self.lbl_langs.show()
+-  table.attach( self.cbo_langs, 1, 2, 8, 9, xpadding=5, 
ypadding=5 )
++  table.attach( self.cbo_langs, 1, 2, 9, 10, xpadding=5, 
ypadding=5 )
+   self.cbo_langs.show()
+   
+   # Add 'Close' button
+   button = gtk.Button( stock=gtk.STOCK_OK )
+-  table.attach( button, 0, 2, 10, 11, xpadding=2, ypadding=2 )
++  table.attach( button, 0, 2, 11, 12, xpadding=2, ypadding=2 )
+   button.connect( clicked, self.onOkay )
+   button.show()
+ 
+@@ -222,7 +223,7 @@
+