From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 23 23:20:28 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D46D16A41C for ; Thu, 23 Jun 2005 23:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 537A643D1D for ; Thu, 23 Jun 2005 23:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j5NNKSfA060343 for ; Thu, 23 Jun 2005 23:20:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j5NNKS8i060342; Thu, 23 Jun 2005 23:20:28 GMT (envelope-from gnats) Date: Thu, 23 Jun 2005 23:20:28 GMT Message-Id: <200506232320.j5NNKS8i060342@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: David Cc: Subject: Re: ports/81998: New port: mail/gmail-notify Notify new mail stored in a gmail account X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: David List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2005 23:20:28 -0000 The following reply was made to PR ports/81998; it has been noted by GNATS. From: David To: bug-followup@freebsd.org Cc: Sergey Matveychuk Subject: Re: ports/81998: New port: mail/gmail-notify Notify new mail stored in a gmail account Date: Fri, 24 Jun 2005 01:19:42 +0200 Here is a new shar. I hope it will arrive correctly formated. -- David # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # gmail-notify # gmail-notify/Makefile # gmail-notify/distinfo # gmail-notify/pkg-descr # gmail-notify/pkg-plist # gmail-notify/files # gmail-notify/files/patch-GmailConfig.py # gmail-notify/files/patch-notifier.py # gmail-notify/files/patch-langs.xml # gmail-notify/files/patch-notifier.conf.sample # gmail-notify/files/Makefile # gmail-notify/files/gmail-notifier # gmail-notify/files/config.h # echo c - gmail-notify mkdir -p gmail-notify > /dev/null 2>&1 echo x - gmail-notify/Makefile sed 's/^X//' >gmail-notify/Makefile << 'END-of-gmail-notify/Makefile' X# New ports collection makefile for: gmail-notify X# Date created: 07 June 2005 X# Whom: David X# X# $FreeBSD$ X# X XPORTNAME= gmail-notify XPORTVERSION= 1.6 XCATEGORIES= mail python XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= ${PORTNAME} X XMAINTAINER= djulien.bsd@gmail.com XCOMMENT= GMail Notifier X XBUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/x11-toolkits/py-gnome-extras:extract X XUSE_GNOME= pygtk2 XUSE_PYTHON= yes XUSE_REINPLACE= yes XUSE_GMAKE= yes X XWRKSRC= ${WRKDIR}/${DISTNAME} X XGMAIL_EXTRA_PATH=${PORTSDIR}/x11-toolkits/py-gnome-extras/work/gnome-python-extras-2.10.2/egg/tray X Xpre-configure: X ${CP} ${GMAIL_EXTRA_PATH}/eggtrayicon.[ch] ${GMAIL_EXTRA_PATH}/trayicon* ${WRKSRC} X ${CP} ${FILESDIR}/gmail-notifier ${FILESDIR}/config.h ${FILESDIR}/Makefile ${WRKSRC} X ${RM} ${WRKSRC}/pytrayicon.so X Xdo-install: X ${MKDIR} ${DATADIR} X ${REINPLACE_CMD} -e 's,@DATADIR@,${DATADIR},g' ${WRKSRC}/gmail-notifier X ${INSTALL_SCRIPT} ${WRKSRC}/gmail-notifier ${PREFIX}/bin/ X ${INSTALL_DATA} ${WRKSRC}/*.py ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/*.pyc ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/*.png ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/*.jpg ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/*.so ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/README ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/langs.xml ${DATADIR} X X.include END-of-gmail-notify/Makefile echo x - gmail-notify/distinfo sed 's/^X//' >gmail-notify/distinfo << 'END-of-gmail-notify/distinfo' XMD5 (gmail-notify-1.6.tar.gz) = 1d448d3c4423dd1b5d4cdad10279b974 XSIZE (gmail-notify-1.6.tar.gz) = 57214 END-of-gmail-notify/distinfo echo x - gmail-notify/pkg-descr sed 's/^X//' >gmail-notify/pkg-descr << 'END-of-gmail-notify/pkg-descr' XGmail Notifier is a Linux/Windows alternative for the notifier program released Xby Google. It is written in Python and provides an attractive and simple way to Xcheck for new mail messages. X XWWW: http://sourceforge.net/projects/gmail-notify X X- David X END-of-gmail-notify/pkg-descr echo x - gmail-notify/pkg-plist sed 's/^X//' >gmail-notify/pkg-plist << 'END-of-gmail-notify/pkg-plist' Xbin/gmail-notifier X%%DATADIR%%/GmailConfig.py X%%DATADIR%%/GmailConfig.pyc X%%DATADIR%%/GmailPopupMenu.py X%%DATADIR%%/GmailPopupMenu.pyc X%%DATADIR%%/README X%%DATADIR%%/constants.py X%%DATADIR%%/constants.pyc X%%DATADIR%%/gmail-notify-icon.png X%%DATADIR%%/background.jpg X%%DATADIR%%/icon.jpg X%%DATADIR%%/icon.png X%%DATADIR%%/icon2.jpg X%%DATADIR%%/icon2.png X%%DATADIR%%/langs.xml X%%DATADIR%%/libgmail.py X%%DATADIR%%/libgmail.pyc X%%DATADIR%%/mkconstants.py X%%DATADIR%%/notifier.py X%%DATADIR%%/trayicon.so X%%DATADIR%%/xmllangs.py X%%DATADIR%%/xmllangs.pyc X@dirrm %%DATADIR%% END-of-gmail-notify/pkg-plist echo c - gmail-notify/files mkdir -p gmail-notify/files > /dev/null 2>&1 echo x - gmail-notify/files/patch-GmailConfig.py sed 's/^X//' >gmail-notify/files/patch-GmailConfig.py << 'END-of-gmail-notify/files/patch-GmailConfig.py' X*** GmailConfig.py.orig Tue May 3 10:02:32 2005 X--- GmailConfig.py Tue Jun 7 15:27:30 2005 X*************** X*** 18,24 **** X configElements = None X X # Declare global variables for configuration as dictionary X! options = { "gmailusername":None, "gmailpassword":None, "browserpath":"firefox", "lang":"English", X "voffset":0, "hoffset":0, "checkinterval":20000, X "animationdelay":15, "popuptimespan":5000} X X--- 18,24 ---- X configElements = None X X # Declare global variables for configuration as dictionary X! options = { "gmailusername":None, "gmailpassword":None, "browserpath":"firefox", "lang":"English", "actionpath":"play", X "voffset":0, "hoffset":0, "checkinterval":20000, X "animationdelay":15, "popuptimespan":5000} X X*************** X*** 36,43 **** X self.window.set_title( self.lang.get_string(1) ) X self.window.set_border_width( 5 ) X self.window.set_position( gtk.WIN_POS_CENTER ) X! self.window.set_modal( gtk.TRUE ) X! self.window.set_resizable(gtk.FALSE) X icon = gtk.gdk.pixbuf_new_from_file(ICON_PATH) X gtk.window_set_default_icon_list( (icon) ) X X--- 36,43 ---- X self.window.set_title( self.lang.get_string(1) ) X self.window.set_border_width( 5 ) X self.window.set_position( gtk.WIN_POS_CENTER ) X! self.window.set_modal( True ) X! self.window.set_resizable(False) X icon = gtk.gdk.pixbuf_new_from_file(ICON_PATH) X gtk.window_set_default_icon_list( (icon) ) X X*************** X*** 49,54 **** X--- 49,55 ---- X ["gmailusername",2,None,None], X ["gmailpassword",22,None,None], X ["browserpath",3,None,None], X+ ["actionpath",99,None,None], X ["voffset",28,None,None], X ["hoffset",27,None,None], X ["checkinterval",31,None,None], X*************** X*** 57,63 **** X ] X X # Create table and attach to window X! table = gtk.Table( rows=11, columns=2, homogeneous=gtk.FALSE ) X X self.window.add(table) X X--- 58,64 ---- X ] X X # Create table and attach to window X! table = gtk.Table( rows=12, columns=2, homogeneous=False ) X X self.window.add(table) X X*************** X*** 74,80 **** X textbox.set_text( str( self.options[curVar] ) ) X X if ( curVar == "gmailpassword" ): X! textbox.set_visibility( gtk.FALSE ) X textbox.set_invisible_char( '*' ) X X # Store widget in element array X--- 75,81 ---- X textbox.set_text( str( self.options[curVar] ) ) X X if ( curVar == "gmailpassword" ): X! textbox.set_visibility( False ) X textbox.set_invisible_char( '*' ) X X # Store widget in element array X*************** X*** 109,120 **** X X X if ( self.readLoginFromFile ): X! self.savePassword.set_active( gtk.TRUE ) X else: X! self.savePassword.set_active( gtk.FALSE ) X X self.savePassword.show() X! table.attach( alignment, 0, 2, 9, 10 ) X alignment.show() X X # Add combobox to select language X--- 110,121 ---- X X X if ( self.readLoginFromFile ): X! self.savePassword.set_active( True ) X else: X! self.savePassword.set_active( False ) X X self.savePassword.show() X! table.attach( alignment, 0, 2, 10, 11 ) X alignment.show() X X # Add combobox to select language X*************** X*** 129,142 **** X self.cbo_langs.append_text( one_lang.get_name()) X self.cbo_langs.set_active(0) X # Attach combobox and label X! table.attach( self.lbl_langs, 0, 1, 8, 9 ) X self.lbl_langs.show() X! table.attach( self.cbo_langs, 1, 2, 8, 9, ypadding=5 ) X self.cbo_langs.show() X X # Add 'Close' button X button = gtk.Button( stock=gtk.STOCK_OK ) X! table.attach( button, 0, 2, 10, 11, ypadding=2 ) X button.connect( "clicked", self.onOkay ) X button.show() X X--- 130,143 ---- X self.cbo_langs.append_text( one_lang.get_name()) X self.cbo_langs.set_active(0) X # Attach combobox and label X! table.attach( self.lbl_langs, 0, 1, 9, 10 ) X self.lbl_langs.show() X! table.attach( self.cbo_langs, 1, 2, 9, 10, xpadding=0, ypadding=5 ) X self.cbo_langs.show() X X # Add 'Close' button X button = gtk.Button( stock=gtk.STOCK_OK ) X! table.attach( button, 0, 2, 11, 12, xpadding=0, ypadding=2 ) X button.connect( "clicked", self.onOkay ) X button.show() X X*************** X*** 206,212 **** X def onDelete( self, widget, data=None ): X gtk.main_quit() X self.hide() X! return gtk.TRUE X X def onOkay( self, widget, callback_data=None ): X errorString = "" X--- 207,213 ---- X def onDelete( self, widget, data=None ): X gtk.main_quit() X self.hide() X! return True X X def onOkay( self, widget, callback_data=None ): X errorString = "" END-of-gmail-notify/files/patch-GmailConfig.py echo x - gmail-notify/files/patch-notifier.py sed 's/^X//' >gmail-notify/files/patch-notifier.py << 'END-of-gmail-notify/files/patch-notifier.py' X*** notifier.py.orig Tue May 3 10:02:33 2005 X--- notifier.py Thu Jun 23 23:30:03 2005 X*************** X*** 7,13 **** X import time X import libgmail X import os X! import pytrayicon X import sys X import warnings X import ConfigParser X--- 7,13 ---- X import time X import libgmail X import os X! import trayicon X import sys X import warnings X import ConfigParser X*************** X*** 82,88 **** X self.popuptimer=0 X self.waittimer=0 X # Create the tray icon object X! self.tray = pytrayicon.TrayIcon(self.lang.get_string(21)); X self.eventbox = gtk.EventBox() X self.tray.add(self.eventbox) X self.eventbox.connect("button_press_event", self.tray_icon_clicked) X--- 82,88 ---- X self.popuptimer=0 X self.waittimer=0 X # Create the tray icon object X! self.tray = trayicon.TrayIcon(self.lang.get_string(21)); X self.eventbox = gtk.EventBox() X self.tray.add(self.eventbox) X self.eventbox.connect("button_press_event", self.tray_icon_clicked) X*************** X*** 205,210 **** X--- 205,211 ---- X self.imageicon = gtk.Image() X X if attrs[1]>0: X+ os.system(self.options['actionpath']+" &") X print str(attrs[1])+" new messages" X sender = attrs[2] X subject= attrs[3] END-of-gmail-notify/files/patch-notifier.py echo x - gmail-notify/files/patch-langs.xml sed 's/^X//' >gmail-notify/files/patch-langs.xml << 'END-of-gmail-notify/files/patch-langs.xml' X*** langs.xml.orig Tue May 3 10:02:33 2005 X--- langs.xml Tue Jun 7 15:28:53 2005 X*************** X*** 33,38 **** X--- 33,39 ---- X Conns time span X Some value is missing X Save username and password X+ Action path: X X X Configuración de Gmail Notifier X*************** X*** 67,71 **** X--- 68,73 ---- X Intervalo e/conexiones X Falta completar algún valor X Guardar nombre de usuario y contraseña X+ Acción X X END-of-gmail-notify/files/patch-langs.xml echo x - gmail-notify/files/patch-notifier.conf.sample sed 's/^X//' >gmail-notify/files/patch-notifier.conf.sample << 'END-of-gmail-notify/files/patch-notifier.conf.sample' X*** notifier.conf.sample.ori Tue Jun 7 13:29:16 2005 X--- notifier.conf.sample Tue Jun 7 13:35:44 2005 X*************** X*** 7,12 **** X--- 7,14 ---- X X browserpath="your_browser_path" X X+ actionpath="action_to_do_when_new_mails" X+ X voffset=48 X hoffset=128 X END-of-gmail-notify/files/patch-notifier.conf.sample echo x - gmail-notify/files/Makefile sed 's/^X//' >gmail-notify/files/Makefile << 'END-of-gmail-notify/files/Makefile' X# Makefile to build trayicon.so X XCFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I${PREFIX}/include/python2.4/ -I. -Wall -I${PREFIX}/share/pygtk/2.0 -I${PREFIX}/libdata/pkgconfig -DEGG_COMPILATION XLDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0` X XDEFS_DIR= ${PREFIX}/share/pygtk/2.0/defs/ X XCODEGEN = pygtk-codegen-2.0 X Xall: trayicon.so X Xtrayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o X $(CC) $(LDFLAGS) -shared $^ -o $@ X Xtrayicon.c: trayicon.defs eggtrayicon.h trayicon.override X $(CODEGEN) --prefix pytrayicon \ X --register $(DEFS_DIR)/gdk-types.defs \ X --register $(DEFS_DIR)/gtk-types.defs \ X --override trayicon.override \ X trayicon.defs > $@ X Xclean: X rm -f *.o *.so trayicon.c *~ END-of-gmail-notify/files/Makefile echo x - gmail-notify/files/gmail-notifier sed 's/^X//' >gmail-notify/files/gmail-notifier << 'END-of-gmail-notify/files/gmail-notifier' X#! /bin/sh X# Launch notifier X# X# David Xcd @DATADIR@ ; python notifier.py END-of-gmail-notify/files/gmail-notifier echo x - gmail-notify/files/config.h sed 's/^X//' >gmail-notify/files/config.h << 'END-of-gmail-notify/files/config.h' X/* X * This file is empty. eggtrayicon.c includes a even if it appears to X * be useless. X * X * David X */ END-of-gmail-notify/files/config.h exit