Stephan Erb
e41e484855
Proof of concept: Move markup / pixbuf determination logic from the UI to the different PEP classes.
...
Currently this is only done for UserMood. We can decide later on (if needed), to move the asPixbufIcon and asMarkupText methods to a more appropriate place.
Goal is to remove as much redundant code as possible.
2009-11-15 00:12:15 +01:00
Stephan Erb
36fb5def4b
Shrink public interface of the MetacontactManager.
2009-11-12 22:58:45 +01:00
Stephan Erb
022003239d
Merge changes from default branch into refactoring branch
...
Hg: changed data/pixmaps/mic_active.png
2009-11-11 23:37:46 +01:00
Stephan Erb
8203211e74
Inject account object instead of account string into contact instances.
...
Each contact has now access to the account object instead of the account string.
2009-11-11 21:38:39 +01:00
Stephan Erb
ae9376ff63
Split the 'account sensitive' parts of the Contacts class and move them to an intermediate Contacts_New class.
...
The Contact class remains the public interface for contact handling. This is only a single step of a longer refactoring to empower the Account class.
2009-11-10 22:56:10 +01:00
Stephan Erb
b4285302db
Make the GC_Contacts class 'account insensitive'. Instead, create an Account class which holds a GC_Contacts object.
...
The API has been preserved. For now the old Contacts() API has not been changed.
2009-11-10 21:08:25 +01:00
Stephan Erb
3ddc5ce78e
Use implicit delegation with __getattr__ instead of explicit delegation via method calls
2009-11-10 19:26:17 +01:00
Stephan Erb
2c296f3fe0
Create a GC_Contacts() class and move groupchat related behavior to it.
...
This is similar to what has been done with the MetacontactManager
2009-11-10 19:05:47 +01:00
Stephan Erb
ba9ef8301b
Remove superfluous clear_contacts method
2009-11-09 23:03:16 +01:00
Stephan Erb
d5ac527f84
Filter duplicate groups centrally.
2009-11-09 21:51:43 +01:00
Stephan Erb
cec93b6135
Push method to check if a specific ClientCaps supports a feature down to the caps module.
...
Public interfaces stay the same.
2009-11-09 21:26:56 +01:00
Yann Leboulanger
8f2120371b
update correctly self_contact Contact instance and roster row when we use an anonymous account (our jid changes in this case). Fixes #5370
2009-11-07 12:37:16 +01:00
Stephan Erb
17af7902e4
Make it explicit whether an ordinary Contact, a Self Contact or a Not-In-Roster Contact is created.
2009-11-05 22:16:38 +01:00
Stephan Erb
f297aa0a11
Make methods of MetacontactManager private if those are only used internally
2009-11-05 20:09:26 +01:00
Stephan Erb
0abb1dfd20
Extract class: MetacontactManager from Contacts
...
For easy migration, interface is still preserved.
2009-11-05 19:43:25 +01:00
Stephan Erb
8a127b4e4d
Several small bugfixes: Add missing accout parameter to constructors.
2009-11-05 16:53:30 +01:00
Stephan Erb
89b1c6a7df
Move method close to data.
...
gajim.contacts.contact_from_gc_contact(gc_contact) is now gc_contact.as_contact()
2009-11-05 16:25:13 +01:00
Stephan Erb
06129f45ef
Let contact instances know their corresponding account.
...
contact.account and gc_contact.account contains the account name of the owning account. There is still code around in many placed which tries to workaround this missing information. Such code has to be migrated on per-need basis.
2009-11-05 15:57:43 +01:00
Stephan Erb
47f875a4bc
Move CapsCache global from gajim.capscache to caps.capscache.
2009-10-30 23:01:25 +01:00
Stephan Erb
bd714f66fc
Move common part of Contact and GC_Contact into a new CommonContact class.
...
The CommonClass helps to spot easily where GC_Contacts and Contacts differ. This is just the first step a potential refactoring in this area.
2009-10-28 23:37:40 +01:00
Stephan Erb
33fe53ff7d
Swtich from old to new caps API.
...
Now we do:
contact.supports(feauture) instead of gajim.capscache.is_supported(contact, feature)
2009-10-27 22:41:39 +01:00
Stephan Erb
c7ff97703f
Redistribute responsibility: Let contact instances check if features are supported
2009-10-27 20:31:09 +01:00
Stephan Erb
346953fd93
Duplicate 'supports' feature for GC_CONTACTS. TODO: Unify Contacts and GC_Contacts
2009-10-25 23:58:02 +01:00
Stephan Erb
700665151c
Implement 'supports' on contact instances.
...
Usage:
if contact.supports(NS_E2E):
....
2009-10-25 23:56:14 +01:00
Yann Leboulanger
d408610425
copy list before iterating on it in case we modify it.
2009-07-21 00:13:55 +02:00
Yann Leboulanger
cd9eed6277
stupid me, calling .keys() on a dict ...
2009-07-20 23:51:17 +02:00
Yann Leboulanger
e40a3b6272
prevent traceback when we remove contacts in iter_contacts() loop.
2009-07-20 23:47:59 +02:00
Yann Leboulanger
15b3ba35b1
restore metacontct correctly when we connect to server and we already have contacts in roster (stored locally). Fixes #5156
2009-07-12 13:33:29 +02:00
Yann Leboulanger
8514e51675
factorize send_file action in chat / groupchat / private chat. see #3948
2009-04-07 17:07:04 +00:00
Yann Leboulanger
0cf86f5a8f
[Dicson] Fix meta contact order by DND. Fixes #4797 , #4779
2009-02-11 17:55:00 +00:00
Yann Leboulanger
e389e0b16b
[thorstenp] remove whitespace at eol
2008-12-03 21:56:12 +00:00
Stephan Erb
246e549012
Improved "is_groupchat" logic. Fixes #4413 .
2008-11-08 22:00:56 +00:00
Yann Leboulanger
66f8bab7d6
show number of participants in groupchats. fixes #3418
2008-09-02 07:00:35 +00:00
Stephan Erb
433fcafc52
Correctly sort metacontact data if one of the jids is a transport and not in our roster. Fixes #4208 , #4195 .
2008-08-19 21:41:43 +00:00
Julien Pivotto
de4a23e751
See #4200 .
...
* remove js from some headers
* set coding:utf-8 to allow real names in headers
2008-08-15 17:31:51 +00:00
Julien Pivotto
8bc9bc29ae
* Big headers review
...
* Remove some licencing problems
* To do: same for images
* See #4200
2008-08-15 03:20:23 +00:00
Stephan Erb
f5be05a14a
Coding style
2008-08-06 20:19:16 +00:00
js
8605cd3f38
For historical reasons, we have a tab width of 3. This is strange, but
...
we have that in all files. To at least lesser the confusion a bit, add
vim tags for that.
Additionally, fix wrong #! in a few files.
2008-07-29 19:49:31 +00:00
Brendan Taylor
094052eb7c
fix some issues with the difference between Contacts and GC_Contacts
2008-07-26 01:16:24 +00:00
Stephan Erb
eda061e15d
Don't crash when we receive contacts that have a group tag assigned multiple times.
...
Remove some usage of has_key() in the contacts module. It is a bit slower (method overhead) and will be deprecated soon.
In roster_window. make a small if-clause more pythonic.
2008-07-06 21:35:19 +00:00
Yann Leboulanger
2f857870f3
add caps_* arguments in create_contact
2008-07-05 19:16:04 +00:00
Yann Leboulanger
4c33f4d478
typo
2008-07-05 19:08:15 +00:00
Yann Leboulanger
74c53da32a
fix arguments order in contacts.py, some coding standards. should fix #4081
2008-07-05 19:04:27 +00:00
Stephan Erb
0671e6c865
Correctly count metacontacts in non merged accounts mode if we have metacontacts over several accounts.
2008-07-05 06:33:49 +00:00
Stephan Erb
215fdc964a
Count metacontacts only once.
...
Remove timing information for roster drawing.
2008-07-04 21:29:46 +00:00
Yann Leboulanger
2fd4ea7637
keep caps info when we create a contact instance from groupchat_contact instance
2008-07-03 21:43:28 +00:00
Stephan Erb
2cd24aa8ae
Do not update metacontacts when nothing has changed. Fixes sending metacontact info to server when we expand a groupchat.
2008-06-26 14:09:27 +00:00
Yann Leboulanger
ef0b115710
quick fix for private messages until we support caps for them. see #4033
2008-06-20 06:34:24 +00:00
js
9634f98250
* Implemented XEP-0184 section 5.
...
* Added NS_RECEIPTS to protocol namespace list.
* Show our support of XEP-0184 in caps.
* Added a big, fat warning to get_contact as this does not work as
expected.
* There was some strangeness in our XEP-0022, it added an id tag to
the x tag, which isn't mentioned anywhere in the XEP. And for some
strange reason, that id even was the same all the time.
* Fixed a typo.
2008-06-17 16:03:21 +00:00
Stephan Erb
c5f7922e29
Two roster sort fixes.
...
* Change metacontact ordering. Fallback to priority only if two contacts have the same show, not the other way round.
* Move contacts that just signed out to the bottom of the group, not to the top.
2008-06-15 23:03:51 +00:00