From: Stas Z. <sta...@us...> - 2005-09-28 12:40:25
|
Update of /cvsroot/gmailagent/GA-Qgcm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26171 Modified Files: Contrgcm.py GuiQTgcm.py MakeTarBall.py QgcmDialogs.py README TODO filelist setup.py Log Message: Bunch of little fixes Index: MakeTarBall.py =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/MakeTarBall.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MakeTarBall.py 10 Aug 2005 14:42:47 -0000 1.1 --- MakeTarBall.py 28 Sep 2005 12:40:09 -0000 1.2 *************** *** 15,32 **** myFiles = filelist.readlines() myFolders = folderlist.readlines() ! os.system('mkdir gcm-qt_%s' % VERSION) for file in myFiles: ! os.system('cp %s gcm-qt_%s' % (file[:-1], VERSION)) for folder in myFolders: ! os.system('mkdir gcm-qt_%s/%s' % (VERSION, folder[:-1])) ! os.system('cp -r %s gcm-qt_%s' % (folder[:-1], VERSION)) # removing the CVS stuff ! os.path.walk('gcm-qt_%s' % VERSION,cleanup,None) print "\nCreate a GNU/Linux tarball..." try: ! execString = 'tar -czf gcm-qt_%s.tgz gcm-qt_%s/' % (VERSION, VERSION) print execString os.system(execString) --- 15,32 ---- myFiles = filelist.readlines() myFolders = folderlist.readlines() ! os.system('mkdir gca-qt_%s' % VERSION) for file in myFiles: ! os.system('cp %s gca-qt_%s' % (file[:-1], VERSION)) for folder in myFolders: ! os.system('mkdir gca-qt_%s/%s' % (VERSION, folder[:-1])) ! os.system('cp -r %s gca-qt_%s' % (folder[:-1], VERSION)) # removing the CVS stuff ! os.path.walk('gca-qt_%s' % VERSION,cleanup,None) print "\nCreate a GNU/Linux tarball..." try: ! execString = 'tar -czf gca-qt_%s.tgz gca-qt_%s/' % (VERSION, VERSION) print execString os.system(execString) *************** *** 38,42 **** print "Create a Windows compatible zipfile..." try: ! execString = 'zip -rq gcm-qt_%s.zip ./gcm-qt_%s' % (VERSION, VERSION) print execString os.system(execString) --- 38,42 ---- print "Create a Windows compatible zipfile..." try: ! execString = 'zip -rq gca-qt_%s.zip ./gca-qt_%s' % (VERSION, VERSION) print execString os.system(execString) *************** *** 45,47 **** else: print "Done\n" ! os.system('rm -rf gcm-qt_%s' % VERSION) --- 45,47 ---- else: print "Done\n" ! os.system('rm -rf gca-qt_%s' % VERSION) Index: Contrgcm.py =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/Contrgcm.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Contrgcm.py 28 Sep 2005 09:14:58 -0000 1.3 --- Contrgcm.py 28 Sep 2005 12:40:09 -0000 1.4 *************** *** 181,186 **** database. When the db exist it will be updated else it will be created. It return a list of tuples containing the contacts. """ - if CG_DEBUG: logging.debug("\n>>>>>>>> Function: import_contacts_gmail") if not self.ga: return None try: --- 181,188 ---- database. When the db exist it will be updated else it will be created. It return a list of tuples containing the contacts. + This will also set two attributes: + self.gm_contacts - a libgmail GmailContactList object + self.gm_allcontacts - a libgmail GmailContactList.contactslist """ if not self.ga: return None try: *************** *** 203,206 **** --- 205,209 ---- self._DBase._store_value(conitem[3],conitem) if CG_DEBUG > 1: logging.debug("Database values %s" % self._DBase._get_all_values()) + self.gm_allcontacts = contacts return conlist *************** *** 259,267 **** def export_contacts(self,file): ! """export_contacts --> True on succes, False on faillure. Export contacts into the VCard format to a file. @file must be a valid path writable by the user. """ ! pass def sync_contacts(self): --- 262,283 ---- def export_contacts(self,file): ! """export_contacts --> tuple True on succes, False on faillure. Export contacts into the VCard format to a file. @file must be a valid path writable by the user. """ ! # refresh contacts list. self.gm_contacts will hold the contacts objects ! # so we don't care about the returnt contacts list. ! self.import_contacts_gmail() ! vc = [] ! for cnt in self.gm_allcontacts: ! vc.append(cnt.getVCard()) ! try: ! f = open(file,'w') ! f.write("".join(vc)) ! f.close() ! except Exception,info: ! print info ! return (False,str(info)) ! return (True,) def sync_contacts(self): Index: QgcmDialogs.py =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/QgcmDialogs.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** QgcmDialogs.py 28 Sep 2005 09:14:58 -0000 1.2 --- QgcmDialogs.py 28 Sep 2005 12:40:09 -0000 1.3 *************** *** 46,49 **** --- 46,50 ---- self.keepsettings = 0 self.ga = None + self.butlogin_state = 0# used to signal button is pushed. (It sucks, it's a quick hack) # Try to get the data from a rcfile result = Contrgcm.load_login() *************** *** 63,66 **** --- 64,68 ---- if not log or not pas: return + self.butlogin_state = 1 self._do_login(log,pas) *************** *** 86,89 **** --- 88,92 ---- "Error", "Failed to store the login data to disk", QMessageBox.Ok) + self.butlogin_state = 0 self.done(retval) *************** *** 91,94 **** --- 94,98 ---- return self.ga def pushButtonCancel_clicked(self): + self.butlogin_state = 0 self.done(False) def checkBoxPass_toggled(self,a0): Index: filelist =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/filelist,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** filelist 28 Sep 2005 09:14:58 -0000 1.3 --- filelist 28 Sep 2005 12:40:09 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- MainWinContacts_forms.py ModalPopUpDialog_forms.py + AboutDialog_forms.py Observers.py QgcmDialogs.py *************** *** 10,13 **** --- 11,15 ---- version.py README + INSTALL setup.py __init__.py Index: README =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 10 Aug 2005 14:42:47 -0000 1.1 --- README 28 Sep 2005 12:40:09 -0000 1.2 *************** *** 1,17 **** ! gcm-qt is a GUI to manage Gmail contacts and is part of the gmailagent ! project. ! It uses the QT widgetset and libgmail, you must make sure you ! have installed libgmail and pyqt before using gcm. ! ! gmailagent: http://gmailagent.sf.net ! libgmail: http://libgmail.sf.net ! pyqt: http://www.riverbankcomputing.co.uk/pyqt ! To install gcm-qt do as root: ! ./INSTALL.sh [Enter] ! This will install gcm-qt in /usr/local/... ! You can change the installation path by editing the INSTALL.sh file. ! gcm-qt is licensed under the GPL. See the file named COPYING for more information. --- 1,8 ---- ! GContactsAgent or gca for short is a GUI to manage Gmail contacts and ! is part of the gmailagent project. ! See the file INSTALL for installation instructions. ! gca-qt is licensed under the GPL. See the file named COPYING for more information. Index: setup.py =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/setup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.py 28 Sep 2005 09:14:58 -0000 1.2 --- setup.py 28 Sep 2005 12:40:09 -0000 1.3 *************** *** 1,5 **** #!/usr/bin/env python # ! # This is the distutils setup script for GmailAgent. # Based on the pygame setup scripts. --- 1,5 ---- #!/usr/bin/env python # ! # This is the distutils setup script for GControlAgent. # Based on the pygame setup scripts. *************** *** 8,12 **** # pointing to this location. basepath = '/usr/local/share' ! execpath = '/usr/local/bin/gcm-qt' import version --- 8,12 ---- # pointing to this location. basepath = '/usr/local/share' ! execpath = '/usr/local/bin/gca-qt' import version *************** *** 28,32 **** import distutils except ImportError: ! raise SystemExit, "gcm-qt requires distutils (Python-dev) to build and install." #get us to the correct directory --- 28,32 ---- import distutils except ImportError: ! raise SystemExit, "gca-qt requires distutils (Python-dev) to build and install." #get us to the correct directory *************** *** 118,124 **** print "=========== Installation Ok ================" ! print "\nThe gcm-qt executable is installed in\n %s" % execpath print "You should read the README file that came with this package\nfor possible usage" print "\n Be aware that not all the functionality is yet available." ! print " The things not yet implemented are: printing of the contacts and exporting them" print "Enjoy" --- 118,127 ---- print "=========== Installation Ok ================" ! print "\nThe gca-qt executable is installed in\n %s" % execpath print "You should read the README file that came with this package\nfor possible usage" print "\n Be aware that not all the functionality is yet available." ! print " The things not yet implemented are:" ! print " printing of the contacts" ! print " help files" ! print "" print "Enjoy" Index: GuiQTgcm.py =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/GuiQTgcm.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GuiQTgcm.py 28 Sep 2005 09:14:58 -0000 1.2 --- GuiQTgcm.py 28 Sep 2005 12:40:09 -0000 1.3 *************** *** 20,24 **** GQ_DEBUG = 0 ! import logging from qt import * --- 20,24 ---- GQ_DEBUG = 0 ! import logging,os from qt import * *************** *** 26,30 **** from MainWinContacts_forms import FormMainWin from Observers import Observer,Observable ! from QgcmDialogs import Login,ModalPopup,AddressEditDialog import BorgSingleton # We import Contrgcm only to access it's 'load_login' function and to set the --- 26,30 ---- from MainWinContacts_forms import FormMainWin from Observers import Observer,Observable ! from QgcmDialogs import Login,ModalPopup,AddressEditDialog,About import BorgSingleton # We import Contrgcm only to access it's 'load_login' function and to set the *************** *** 123,129 **** return if not self.gaContr: ! QMessageBox.information(self, ! "Information", "Please login in your Gmail account first", ! QMessageBox.Ok) return name = str(self.selecteditem.text(0)) --- 123,127 ---- return if not self.gaContr: ! self.no_login() return name = str(self.selecteditem.text(0)) *************** *** 158,163 **** def helpAbout_activated(self): ! print "FormMainWin.helpAbout_activated(): Not implemented yet" ! def pushButtonClose_clicked(self): --- 156,160 ---- def helpAbout_activated(self): ! About(self) def pushButtonClose_clicked(self): *************** *** 180,185 **** def contactsExportcontacts_activated(self): ! print "FormMainWin.contactsExportcontacts_activated(): Not implemented yet" ! def lineEditSearchToolbar_textChanged(self,a0): print "FormMainWin.lineEditSearchToolbar_textChanged(const QString&)" --- 177,194 ---- def contactsExportcontacts_activated(self): ! if not self.gaContr: ! self.no_login() ! return ! filename=str(QFileDialog.getSaveFileName(os.path.expanduser('~'),\ ! "VCard (*.vcf);;All (*.*)",\ ! self,\ ! "FileDialog",\ ! "Choose a filename to export to")) ! result = self.gaContr.export_contacts(filename) ! if not result[0]: ! QMessageBox.critical(self, ! "Error", "An error occured while exporting contacts:\n%s" % result[1], ! QMessageBox.Ok) ! def lineEditSearchToolbar_textChanged(self,a0): print "FormMainWin.lineEditSearchToolbar_textChanged(const QString&)" *************** *** 205,209 **** def contactsImportcontacts_activated(self): - if GQ_DEBUG: logging.debug("FormMainWin.contactsImportcontacts_activated()") if not self.gaContr: dlg = Login(self.Qapplication,parent=self) --- 214,217 ---- *************** *** 218,221 **** --- 226,230 ---- def contactsPrintAction_activated(self): print "FormMainWin.contactsPrintAction_activated(): Not implemented yet" + NotYet(self,"Printing is not yet available") def contactsExit_activated(self): Index: TODO =================================================================== RCS file: /cvsroot/gmailagent/GA-Qgcm/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TODO 7 Aug 2005 19:08:45 -0000 1.1.1.1 --- TODO 28 Sep 2005 12:40:09 -0000 1.2 *************** *** 1,3 **** ! Progressbar sucks, see releaseforge for a better solution --- 1,4 ---- ! When searching a contact by using the menu searchbar the window doesn't ! scroll up or down. Progressbar sucks, see releaseforge for a better solution |