rpms/jabbim/devel jabbim-svn.diff,NONE,1.1 jabbim.spec,1.8,1.9

Michal Schmidt (michich) fedora-extras-commits at redhat.com
Sun Jan 6 23:04:39 UTC 2008


Author: michich

Update of /cvs/pkgs/rpms/jabbim/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13180

Modified Files:
	jabbim.spec 
Added Files:
	jabbim-svn.diff 
Log Message:
* Sun Jan  6 2008 Michal Schmidt <mschmidt at redhat.com> - 0.3-0.61.20080106svn
- Upstream SVN revision 1766.
- changes: self-contact menu, file transfer in MUC, translations.
- Change in packaging - Don't upload every new upstream SVN snapshot to the
  lookaside cache. That seems too wasteful. Have a patch in CVS instead.


jabbim-svn.diff:

--- NEW FILE jabbim-svn.diff ---
Index: plugins/archive/archive.pro
===================================================================
--- plugins/archive/archive.pro	(revision 1721)
+++ plugins/archive/archive.pro	(revision 1766)
@@ -1,4 +1,5 @@
 SOURCES         = archive.py \
 historyBrowser.ui.py
 TRANSLATIONS    = cs.ts \
-				en.ts 
\ No newline at end of file
+				en.ts \
+pl.ts
\ No newline at end of file
Index: plugins/archive/pl.ts
===================================================================
--- plugins/archive/pl.ts	(revision 0)
+++ plugins/archive/pl.ts	(revision 1766)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+    <name>MainWindow</name>
+    <message>
+        <location filename="historyBrowser.ui.py" line="58"/>
+        <source>Archive browser</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>Plugin</name>
+    <message>
+        <location filename="archive.py" line="231"/>
+        <source>History</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="archive.py" line="317"/>
+        <source>Contacts in roster</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="archive.py" line="319"/>
+        <source>Others</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>self.main</name>
+    <message>
+        <location filename="archive.py" line="172"/>
+        <source>Number of messages from last conversation, which are show in chat:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="archive.py" line="173"/>
+        <source>Cas, po kterem se zpravy z posledni konverzace nezobrazi:</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
Index: plugins/archive/en.ts
===================================================================
--- plugins/archive/en.ts	(revision 1721)
+++ plugins/archive/en.ts	(revision 1766)
@@ -11,22 +11,32 @@
 <context>
     <name>Plugin</name>
     <message>
-        <location filename="archive.py" line="265"/>
+        <location filename="archive.py" line="317"/>
         <source>Contacts in roster</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="archive.py" line="267"/>
+        <location filename="archive.py" line="319"/>
         <source>Others</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="archive.py" line="231"/>
+        <source>History</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>self.main</name>
     <message>
-        <location filename="archive.py" line="142"/>
+        <location filename="archive.py" line="172"/>
         <source>Number of messages from last conversation, which are show in chat:</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="archive.py" line="173"/>
+        <source>Cas, po kterem se zpravy z posledni konverzace nezobrazi:</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 </TS>
Index: plugins/archive/cs.ts
===================================================================
--- plugins/archive/cs.ts	(revision 1721)
+++ plugins/archive/cs.ts	(revision 1766)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS><TS version="1.1" language="cs_CZ">
-<defaultcodec></defaultcodec>
 <context>
     <name>MainWindow</name>
     <message>
@@ -12,22 +11,32 @@
 <context>
     <name>Plugin</name>
     <message>
-        <location filename="archive.py" line="265"/>
+        <location filename="archive.py" line="317"/>
         <source>Contacts in roster</source>
         <translation>Kontakty v seznamu kontaktů</translation>
     </message>
     <message>
-        <location filename="archive.py" line="267"/>
+        <location filename="archive.py" line="319"/>
         <source>Others</source>
         <translation>Ostatní</translation>
     </message>
+    <message>
+        <location filename="archive.py" line="231"/>
+        <source>History</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>self.main</name>
     <message>
-        <location filename="archive.py" line="142"/>
+        <location filename="archive.py" line="172"/>
         <source>Number of messages from last conversation, which are show in chat:</source>
         <translation>Počet zpráv z archivu, které jsou načteny do rozhovoru:</translation>
     </message>
+    <message>
+        <location filename="archive.py" line="173"/>
+        <source>Cas, po kterem se zpravy z posledni konverzace nezobrazi:</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 </TS>
Index: plugins/responder/pl.ts
===================================================================
--- plugins/responder/pl.ts	(revision 0)
+++ plugins/responder/pl.ts	(revision 1766)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1">
+<context>
+    <name>Plugin</name>
+    <message>
+        <location filename="responder.py" line="20"/>
+        <source>Automaticka odpoved:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="responder.py" line="20"/>
+        <source>Toto je automaticka odpoved. Toto ICQ cislo je mimo provoz, jeho uzivatel nyni pouziva pouze Jabber. Muzes ho kontaktovat na jeho JabberID [JID]. Pokud nevis jak na to, navstiv  http://www.jabbim.cz/services-start.html 
+ Preji pekny den.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
Index: plugins/responder/cs.qm
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: plugins/responder/cs.qm
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: plugins/responder/en.ts
===================================================================
--- plugins/responder/en.ts	(revision 0)
+++ plugins/responder/en.ts	(revision 1766)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="cs_CZ">
+<defaultcodec></defaultcodec>
+<context>
+    <name>Plugin</name>
+    <message>
+        <location filename="responder.py" line="20"/>
+        <source>Automaticka odpoved:</source>
+        <translation>Autoreply:</translation>
+    </message>
+    <message>
+        <location filename="responder.py" line="20"/>
+        <source>Toto je automaticka odpoved. Toto ICQ cislo je mimo provoz, jeho uzivatel nyni pouziva pouze Jabber. Muzes ho kontaktovat na jeho JabberID [JID]. Pokud nevis jak na to, navstiv  http://www.jabbim.cz/services-start.html 
+ Preji pekny den.</source>
+        <translation>This is an automated reply. This ICQ number is no longer used, its user uses only Jabber. You can contact him at his Jabber ID [JID]. If you dont know how, visit http://www.jabbim.cz/services-start.html 
[...9519 lines suppressed...]
+	def sendPresence(self,jid,show,message="",pri=None):
+		"""
+		Send presence and update GUI.
+		@type jid: unicode
+		@param jid: JID or None for sending presence to server
+		@type show: unicode
+		@param show: String from this list: ["online","chat","away","xa","dnd","offline"]
+		@type message: unicode
+		@param message: Status message
+		@type pri: integer
+		@param pri: Priority
+		"""
 		print "sending presence",jid,show
 		if not jid:
+			# global presence => presence will be send to server
 			if show=="offline":
-				
 				self.client.sendPresence(typ = "unavailable", status = unicode(message))
-				MainWindow.client.factory.stopTrying()
-				MainWindow.reconnect = False
-				MainWindow.client.disconnect()
-				MainWindow._disconnect()
+				self.client.factory.stopTrying()
+				self.reconnect = False
+				self.client.disconnect()
+				self._disconnect()
 			else:
-				icon=QtGui.QIcon("images/16x16/apps/jabbim.png")
-				if show!='online':
-					result=icon.pixmap(16,16)
-					painter=QtGui.QPainter(result)
-					icon=self.getIcon(status=unicode(show),size="16x16")
-					painter.drawPixmap(0,0,icon.pixmap(16,16))
-					painter.end()
-				else:
-					result=icon
-				self.tray.setIcon(QtGui.QIcon(result))
 				if not pri:
+					# get priority from config
 					if self.config.has_key('autoPriority'):
 						if self.config['autoPriority']=='True':
 							priors={"chat":"25","online":"20","away":"15","xa":"10","dnd":"5"}
@@ -1658,30 +1707,36 @@
 						else:
 							pri="0"
 				self.selfStatus=show
-		if jid:
+				# update tray icon
+				self.tray.setIcon(self.getCurrentTrayIcon())
+				
+				# send presence to the server
+				self.client.sendPresence(show = unicode(show), status = unicode(message),priority=pri)
+				
+				# send presence to groupchats
+				for muc in self.client.groupchats.itervalues():
+					self.client.sendPresence(show = unicode(show), status = unicode(message), to = '%s/%s'%(muc.jid, muc.nick))
+				
+				# update statusWidget
+				if len(message)>20:
+					self.ui.statusWidget.setText(unicode(message)[:20]+"...")
+				elif len(message)==0:
+					self.ui.statusWidget.setText(self.status[show])
+				else:
+					self.ui.statusWidget.setText(unicode(message))
+				self.ui.statusWidget.setIcon(self.getIcon(status=show,size="16x16"))
+		else:
+			# update transport's icon in statusWidgetMenu
 			if self.transports.has_key(jid):
 				if self.transports[jid]!=None:
 					self.transports[jid].setIcon(self.getIcon(status=unicode(show),size="16x16"))
-				
+			# send presence
 			self.client.sendPresence(to=jid,show = unicode(show), status = unicode(message),priority=pri)
-		else:
-			self.client.sendPresence(show = unicode(show), status = unicode(message),priority=pri)
-		#musime updatovat MUCy
-		if not jid:
-			for muc in self.client.groupchats.itervalues():
-				self.client.sendPresence(show = unicode(show), status = unicode(message), to = '%s/%s'%(muc.jid, muc.nick))
-	
-			if len(message)>20:
-				self.ui.statusWidget.setText(unicode(message)[:20]+"...")
-			elif len(message)==0:
-				self.ui.statusWidget.setText(self.status[show])
-			else:
-				self.ui.statusWidget.setText(unicode(message))
-			self.ui.statusWidget.setIcon(self.getIcon(status=show,size="16x16"))
 
 	def profileChanged(self,jid):
 		self.homeDir=unicode(self.realHomeDir+"/"+jid+"-profile")
-		utils.loadConfig(self,[]) # load config files
+		utils.loadConfig(self,[])
+		# change log files
 		if self.config['log'] == 'true':
 			logfile = open(self.homeDir+'/'+self.config['logfile'], 'w')
 			start=True
@@ -1692,10 +1747,11 @@
 			log.addObserver(self.log.emit)
 			if start:
 				log.startLoggingWithObserver(self.log.emit, setStdout=0)
-
+		# change GUI according to new config
 		self.fillLoginForm()
 		self.loadTheme()
 		self.ui.roster.reskin()
+		# change cache
 		if self.cache:
 			self.cache.close()
 			del self.cache
@@ -1706,8 +1762,12 @@
 
 
 	def fillLoginForm(self):
+		"""
+		Fill login form according to config file and existing profiles
+		"""
 		profiles=utils.getProfiles(self.realHomeDir)
 		
+		# show profiles only if their count is more than 1
 		if len(profiles)<=1:
 			self.ui.profilesList.hide()
 			self.ui.profilesLine.hide()
@@ -1717,12 +1777,13 @@
 			self.ui.profilesLine.show()
 			self.ui.profilesHeader.show()
 
+		# update profiles QComboBox
 		if self.ui.profilesList.count()!=len(profiles):
 			QtCore.QObject.disconnect(self.ui.profilesList, QtCore.SIGNAL("currentIndexChanged ( const QString & )"),self.profileChanged)
 			self.ui.profilesList.clear()
 			for profile in profiles:
 				jid=profile.replace('-profile','')
-		
+				# load profile avatar
 				if os.path.isfile(self.realHomeDir+"/"+profile+"/avatars/"+unicode(jid)):
 					avatar=QtGui.QPixmap(self.realHomeDir+"/"+profile+"/avatars/"+unicode(jid)).scaled(22,22,QtCore.Qt.KeepAspectRatio)
 					result=QtGui.QPixmap(22,22)
@@ -1733,23 +1794,21 @@
 					result=QtGui.QIcon(result)
 				else:
 					result=QtGui.QIcon("images/22x22/apps/jabbim.png")
-		
+
 				if self.config['jid']==jid:
 					self.ui.profilesList.insertItem(0,result,jid)
 				else:
 					self.ui.profilesList.addItem(result,jid)
 			self.ui.profilesList.setCurrentIndex(0)
 			QtCore.QObject.connect(self.ui.profilesList, QtCore.SIGNAL("currentIndexChanged ( const QString & )"),self.profileChanged)
+		
 		# fill login form
 		self.ui.login_password.setText(rot13.scramble(self.config['passwd']))
 		self.ui.login_jid.setText(self.config['jid'])
-
 		if self.config['autoJoin']=="True":
 			self.ui.login_autoconnect.setChecked(True)
 		else:
 			self.ui.login_autoconnect.setChecked(False)
-
-
 		if self.config['savePasswd']=="True":
 			self.ui.login_savePassword.setChecked(True)
 
@@ -2564,6 +2623,7 @@
 		layout.addWidget(self.scroll)
 
 	def _connected(self):
+		print 'connected in main'
 		self.ui.roster.reskin()
 		self.ui.actionAdd_Contact.setEnabled(True)
 		self.ui.actionJoin_Groupchat.setEnabled(True)
@@ -2577,6 +2637,7 @@
 		self.ui.showOffline.show()
 		self.tray.showMessage(self.tr("Jabbim"),self.tr("Jabbim is ready! You are connected! :) "))
 		self.tray.setIcon(QtGui.QIcon("images/16x16/apps/jabbim.png"))
+		print 'end connected in main'
 	def disconnect(self):
 		#if self.client!=None:
 		reactor.stop2()
@@ -2717,7 +2778,7 @@
 		self.config.write(f)
 		f.close()
 		utils.loadConfig(self,[]) # load config files
-		self.config['savePasswd']=savePassword
+		self.config['savePasswd']=unicode(savePassword)
 		if savePassword==True:
 			self.config['passwd']=rot13.scramble(password)
 		else:
@@ -2809,7 +2870,10 @@
 			self.config.write(f)
 			f.close()
 			self.reconnect = True
-			self.client.connect()
+			if self.config['specifyHost'] == 'True':
+				self.client.connect(self.config['connectHost'], self.config['connectPort'])
+			else:
+				self.client.connect()
 	
 	def _loadAvatar(self,file, hash, jid):
 		if os.path.isfile(unicode(file)):


Index: jabbim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/jabbim/devel/jabbim.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- jabbim.spec	6 Jan 2008 01:55:14 -0000	1.8
+++ jabbim.spec	6 Jan 2008 23:03:50 -0000	1.9
@@ -1,6 +1,6 @@
 Name:		jabbim
 Version:	0.3
-Release:	0.60.20080106svn%{?dist}
+Release:	0.61.20080106svn%{?dist}
 Summary:	Jabber client for mere mortals
 
 Group:		Applications/Internet
@@ -11,6 +11,9 @@
 # tar -czvf jabbim-ng.tar.gz jabbim-ng/
 Source0:	jabbim-ng.tar.gz
 Source1:	jabbim.in
+# This one was generated with:
+# svn diff -r 1721:1766 > jabbim-svn.diff
+Patch0:		jabbim-svn.diff
 BuildArch:	noarch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -37,6 +40,7 @@
 
 %prep
 %setup -q -n jabbim-ng
+%patch0 -p0
 # fill in the template for the starting script
 sed -e 's|@JABBIMDATA@|%{jabbimdata}|g' %{SOURCE1} > jabbim
 
@@ -111,6 +115,12 @@
 
 
 %changelog
+* Sun Jan  6 2008 Michal Schmidt <mschmidt at redhat.com> - 0.3-0.61.20080106svn
+- Upstream SVN revision 1766.
+- changes: self-contact menu, file transfer in MUC, translations.
+- Change in packaging - Don't upload every new upstream SVN snapshot to the
+  lookaside cache. That seems too wasteful. Have a patch in CVS instead.
+
 * Sun Jan  6 2008 Michal Schmidt <mschmidt at redhat.com> - 0.3-0.60.20080106svn
 - Upstream SVN revision 1721.
 - translation fixes, /join command in MUC, automatic download fix.




More information about the fedora-extras-commits mailing list