What is the process for submitting patches?

Asked by Alvin on 2012-05-05

I wrote a patch for the gmail applet to open the mail item being clicked on directly in the inbox.

Curious what the process is for submitting it?

bzr diff output:
--- Gmail/Gmail.py 2012-03-12 10:22:04 +0000
+++ Gmail/Gmail.py 2012-05-05 17:40:43 +0000
@@ -26,6 +26,7 @@
 import libxml2 # used to parse XML content from Gmail inbox
 import os # used to find paths and to launch 'aplay'
 import sys # used to find relative paths
+import re

 import SVGmaker # home-made module to edit SVG counter emblem
 import gtk # used for Menu class displaying inbox
@@ -54,7 +55,7 @@
             menu_item.set_image(gtk.image_new_from_file('./img/menu-gmail.png'))
             menu_item.get_children()[0].set_markup(string)
             menu_item.url = mail['link']
- menu_item.connect('activate', self.open_mail)
+ menu_item.connect('activate', self.open_mail, mail)
             self.append(menu_item)
             menu_item.show()
             # add a separator if mail is not last in list
@@ -68,11 +69,19 @@

- def open_mail(self, mail=None):
+ def open_mail(self, menu, mail=None):

         """ Opens the mail URL """

- os.popen('x-www-browser https://mail.google.com/mail')
+ try:
+ link = mail['link']
+ match = re.search(r"message_id=(.*?)&", link)
+ if match:
+ link = 'https://mail.google.com/mail/?fs=1&source=atom#inbox/%s' % match.group(1)
+ print link
+ os.popen('x-www-browser %s' % link.replace('&', '\&'))
+ except KeyError:
+ os.popen('x-www-browser https://mail.google.com/mail')

Question information

Language:
English Edit question
Status:
Answered
For:
Cairo-Dock Plug-Ins Extras (third-party) Edit question
Assignee:
No assignee Edit question
Last query:
2012-05-05
Last reply:
2012-05-08
Fabounet (fabounet03) said : #1

please take a look at
http://glx-dock.org/ww_page.php?p=Help%20us%20with%20BZR&lang=en

it explains how to make your own branch in Launchpad to share your modifications with everybody.
we can then merge them easily into the trunk.

for a patch (bug-fix or small feature), you can provide a diff file as you did on our forum, it's also a convenient way :-)

Can you help with this problem?

Provide an answer of your own, or ask Alvin for more information if necessary.

To post a message you must log in.