Commit Graph

1141 Commits

Author SHA1 Message Date
Stephan Erb 6e442a50c8 Fix var usage.
(Commit correct hg rev :-) )
2008-06-09 18:31:05 +00:00
Stephan Erb db5b3c724b Introduce _recalibrate_metacontact_family()
Do not risk invalidating child_model iters when redrawing a contact.
Move logic to update the family when the big brother has changed to an extra function.

ToDo:
 * nearby_family code duplication
 * totaly restructure and cleanup draw_contact
2008-06-09 18:27:40 +00:00
Jean-Marie Traissard f9c981df5d -Set General and Observer group directly in contact instance, instead of calculating it each time
-When creating self-contact contact instance, store it with group 'self_contact', so it never goes in General
-Make general group not be seen visible because of self contact even if self.regroup
-Remove the self contact instance itself too when WE deconnect or when IT deconnect, so we will
not see it as offline if refilling roster (regroup account for example)
2008-06-08 21:27:31 +00:00
js c2eb4b5a9f Completely remove OTR.
Sorry, it just wasn't maintainable. The problem is the current libotr
API. I'm sick of working around the strange libotr API, sick of getting
HTML messages, sick of losing messages. The final argument for
completely removing it was that we can't get the message ID of a sent
msg anymore - which we need. I tried to work around this as well, but
there seems to be no way to wait for a signal in glib the way I would
need it for the workaround (I wanted to emit a signal in inject_message
and then wait for it after the call to otr_message_fragment_and_send
so the signal can pass us the message id). And the last reason is that
we're heading towards a new release and thus want to stabilize the code,
thus don't have time to work around even more libotr API strangeness.
I will give feedback to the libotr developers, who are currently
planning a new API, so that we can hopefully see OTR support once again
as soon as libotr4 is released.

Kjell already announced that he will continue his branch:
https://code.launchpad.net/~afflux/gajim/otr

I really hope the libotr devs will provide a sane API with libotr4 so
we can integrate OTR support again.

Oh, and I added one more try/except block for OS X.
2008-06-08 15:27:05 +00:00
Jean-Marie Traissard 0d645437d8 Don't act like if self contact is in group General. See #4000.
Don't make General group visible when we have self contact.
2008-06-08 14:35:40 +00:00
Jean-Marie Traissard 40e360d1c8 [modelfilter]Fix row behind that expand when moving contact problem.
This code seems not necessary. But why does that created that problem ?
It seems for some reason, path is not good. Probably the iter itself is not good. So expand act on the wrong
group (I can proove that).
2008-06-08 13:20:46 +00:00
js 03d68c0d26 Be more specific on excepts. 2008-06-08 10:19:26 +00:00
js 8def8de5c7 Make Gajim work on OS X again.
Someone completely broke it by trying to port it to native GTK.
However, that person didn't only break it with X11 GTK, with
native GTK it wasn't working correctly either.
Fixed it by adding lots of try/except blocks. Someone definitely
deserves to be slaughtered for completely breaking it on OS X…
2008-06-07 20:42:15 +00:00
Jean-Marie Traissard 7fbfa0547d Regroup window.present() calls. See #3908. 2008-06-05 15:09:17 +00:00
Stephan Erb fa48c480ff Fix modelfilter regression. Renaming a group duplicated it.
Even make it work in merged accounts mode.
2008-06-02 17:59:59 +00:00
Yann Leboulanger 3fe89676ac don't allow to send custom status nor revoke subscription for transport contacts. fixes #3984 2008-06-02 10:27:16 +00:00
Yann Leboulanger e5f682a81a fix wrong syntax 2008-06-02 10:23:27 +00:00
Yann Leboulanger b3d57ed5b1 coding standards 2008-06-02 10:04:27 +00:00
Jean-Marie Traissard d927d260c2 Removing tic tac toe game. Maybe one day a full version in a plugin ? :) 2008-06-01 23:07:34 +00:00
Stephan Erb 82edfdf42e Small cleanups to roster and modelfilter.
* rename draw_roster to better express its functionality
 * remove unnecessary call of refilter()
 * directly remove groups when there is only one child left and we want to remove it

Note: in gtkTreeStore iters persist as long as the row isn't removed. Iters in Modelfilter persist as long as the model is unchanged.
2008-06-01 22:46:41 +00:00
Jean-Marie Traissard c6aa116db8 try another way do redraw roster. See #3955. 2008-06-01 22:23:16 +00:00
Stephan Erb 794a5f33d5 Use correct modelfilter API to expand to selected contacts. 2008-05-31 15:31:49 +00:00
Stephan Erb e2c3555e6f A few expand/collapse related changes.
* always adjust account toggle state
 * try to eliminate extra adjustmants to group state
 * small function renaming
2008-05-30 23:09:13 +00:00
Yann Leboulanger 533e955cf1 make pep work, move config options per account, make publish_tune configurable in account context menu. fixes #3954 2008-05-30 21:43:53 +00:00
Stephan Erb ac8faf47ca Fix eventhandling for non chat message events.
Evens were not properly removed.
2008-05-30 20:56:54 +00:00
Stephan Erb 6fd860a1b3 Remove debug print. 2008-05-30 20:21:12 +00:00
Stephan Erb 7259f95b0b Fix drag and drop within the same group. 2008-05-30 20:16:00 +00:00
Stephan Erb 0e519bce9e Do not recalibrate metacontacts if there is only one brother (the big brother). 2008-05-30 20:07:14 +00:00
Stephan Erb 4b6fabadd9 Don't remove contacts from roster when they have pending events.
* update documentation and fix indentation
 * don't remove offline contacts from roster when we open the last pending, non chat message event
 * store account and jid per event
2008-05-30 17:42:53 +00:00
Yann Leboulanger c127493e58 remove pep options from pref window, store them per account, store caps_hash per account. see #3954 2008-05-27 10:24:29 +00:00
Brendan Taylor f7874d29c7 reuse chat controls after session termination
fixes #3950
2008-05-23 23:27:08 +00:00
Stephan Erb a06468b846 Always remove contacts from GUI when we receive a roster via xmppy.
This fixes a bug with metacontacts over different groups and should stop contact duplication in most cases.
2008-05-19 21:17:43 +00:00
Stephan Erb abe75901d4 Remove some extra model refiltering.
Whenever we write to the underlying child_model gtk will call the _visible_func on itself.
2008-05-19 20:08:32 +00:00
Stephan Erb ea00e4d933 Improve select_contact method.
* use correct API in session.py
 * only filter when really needed
2008-05-19 20:00:41 +00:00
js 75ad801f62 Fix music_track_info for multiple accounts. 2008-05-16 16:04:51 +00:00
js 96a5b497a8 * Remove old code to update status to current track.
* Don't bind the track listener when not enabled anymore.
* Remove the signal / add the signal when changed in preferences.
2008-05-15 19:52:04 +00:00
js 129c115837 PEP creates less traffic now and MPRIS is now more tolerant. 2008-05-15 17:42:32 +00:00
Yann Leboulanger 35aefc2df8 indentation is with tabs 2008-05-13 14:03:30 +00:00
Brendan Taylor d511b5afc4 merged in session-centric branch, with fixes for OTR compatibility 2008-05-13 01:59:10 +00:00
js 573568f9ac Reverted r9614 and r9615.
Sorry, bct, but I think it is to early to merge that as it completely
breaks. It seems nobody in gajim@conference.gajim.org considers it
usable yet.
I don't know if you got asterix' ok for it and I'm sorry if I reverted
it now although you had his ok, but having broken trunk is very
contra-productive. I think it was just too early to merge.
2008-05-11 13:17:28 +00:00
Brendan Taylor 2162c3730a merged in session_centric branch 2008-05-11 01:19:59 +00:00
js 91211e189d Fix DnD FT on Windows:
* Fix helpers.py so URL is decoded correctly.
* Fix code in roster_window.py so the \0 that's alway the last file
  on win32 is ignored.

This also fixes and closes #2398.
2008-05-10 23:21:28 +00:00
js 4eeb96368b Store otr_userstates at the right place and create it the right way.
This fixes the crash when creating a new account, which made Gajim
unusable on systems where it never ran before.
2008-05-10 21:29:47 +00:00
js 435042968e Added OTR support.
Work done by Kjell Braden <fnord@pentabarf.de>.
Some fixes done by me.
2008-05-09 12:35:25 +00:00
Stephan Erb 115006fa14 Fix add_transport function. TODO: Use it.... xD 2008-05-08 22:15:56 +00:00
Stephan Erb 56da8d7cfb Some random roster cleanups:
* remove unused code
 * use self.model directly when obvious
 * cleanup some FIXME comments
2008-05-08 22:09:43 +00:00
Stephan Erb 708e48a2a7 Do not redefine built-in 'iter'. Follow recommendation and use 'titer' instead. 2008-05-08 21:53:26 +00:00
Stephan Erb bbb07caa0a Coding standards. 2008-05-08 21:18:39 +00:00
Stephan Erb 5b5412621e Fix assertion message. 2008-05-07 18:07:31 +00:00
Stephan Erb 09b3af3367 Allow to have several SelfContact jids in merged accounts mode. Previously only one was shown. 2008-05-07 17:42:42 +00:00
Stephan Erb d6b95daa8b Add transports to roster only once. Fixes #3911, #3923. 2008-05-06 22:25:27 +00:00
Stephan Erb 1e68eb3de9 Sync groups of metacontacts to fix a potential bug. Contact iters of brothers might not be found, though they are in roster. 2008-05-06 17:43:03 +00:00
Stephan Erb b1a2951634 Make "invite to" menuitem sensitive when possible. Regression introduced in r9524. 2008-05-06 16:46:33 +00:00
Brendan Taylor d15b9dea6e reuse existing chat sessions and controls 2008-05-03 16:52:27 +00:00
Brendan Taylor 99f2997d27 pm fixes 2008-05-03 00:10:17 +00:00
Brendan Taylor 20beea4b49 fixed groupchat 2008-05-02 02:32:28 +00:00
Jean-Marie Traissard cb9d2a3ca0 Revert "when removing last metacontact little brother, remove meta tag for big brother" from [9553],
that breaks meta over multiple accounts. Thanks steve-e
2008-05-01 18:24:31 +00:00
Jean-Marie Traissard 7144520bc0 Fix edit group problems :
-redraw group expand state
-when removing last metacontact little brother, remove meta tag for big brother. Else that confuse when
moving via edit group.

Note that edit group is broken by http://trac.gajim.org/changeset/9551
2008-05-01 14:27:53 +00:00
Stephan Erb 79f4d22fa4 Fix inconsisten indentation. 2008-05-01 08:40:20 +00:00
Stephan Erb df5a4c2281 Reimplement _get_contact_iter to be faster in bigger rosters. 2008-05-01 08:38:08 +00:00
Jean-Marie Traissard 299f560749 This is needed finally, reverting from previous changeset 2008-05-01 02:32:57 +00:00
Jean-Marie Traissard 6c8d196383 [modelfilter]
-fix row not expanded when contact connected in group with no one online yet
-fix WHEN filter is done when contact disconnect/connect
-fix number of connected contacts not showed for new groups
-fix General created when moving a contact to another group
2008-05-01 02:13:00 +00:00
Brendan Taylor d4a766963f multiple chat session windows per contact. groupchat and pms broken. 2008-04-30 02:55:13 +00:00
Jean-Marie Traissard 60bb033a90 Cleaner way to check for account line expand state. Fixes #3884. 2008-04-30 00:51:36 +00:00
Jean-Marie Traissard 6b465a4218 Some little on_model_row_has_child_toggled() speedups 2008-04-30 00:28:34 +00:00
Jean-Marie Traissard d555954ee5 [modelfilter]
-restore call to _adjust_group_expand_collapse_state() even if not filtering in
on_model_row_has_child_toggled(). Is used.
-restore "# Draw the contact and its groups contact" removed in last changeset but
-change way to toogle self.starting so it works when add_account_contacts() is called from gajim.py too. One
useless call to draw_account() added, maybe.
-If showingOfflines, all contacts are visible, set visibility True FAST
2008-04-29 23:50:44 +00:00
Jean-Marie Traissard cc97c3ce7b [modelfilter]
-Always use self.modelfilter instead of self.tree.get_model()
-filter twice to show groups with no contacts inside in the correct expand state when showingOfflines. ( We
can't expand the group before we filter, and we need to filter to effectively show tree expand state in model )
-UNSURE : call _adjust_group_expand_collapse_state() only if filtering in on_model_row_has_child_toggled(). That
seems sufficient and when not filtering, it works better with :
-when contact change status, don't refilter, only adjust group row state. Steve-e, do we need to filter in a
case I don't see ?
-in visible_func : Don't initialize 'accounts' var if not needed
-Don't draw anything in add_contact(), that seems to be done somewhere else anyway
2008-04-29 22:07:59 +00:00
Jean-Marie Traissard ab8d2f6320 Add missing call to adjust_group_expand_collapse_state() 2008-04-28 22:49:19 +00:00
Jean-Marie Traissard 2056ee8886 [steve-e only]modelfilter fixes about group and account collapse
little bug, fix follow
2008-04-28 22:46:49 +00:00
Yann Leboulanger a9e25aa98a fix arguments of on_open_chat_window functions. It is called from callbacks, so first argument is widget. 2008-04-26 23:36:03 +00:00
Stephan Erb 8929f4e630 Fixing a few modelfilter bugs.
* Show all groups in merged accounts view that have online contacts. Fixes #3890
 * Allow metacontacts over several accounts. Fixes #3889
 * Fix on_drop_in_group when two accounts in merged view have the same contact
 * Fix potential traceback when receiving a message
2008-04-26 10:18:33 +00:00
Yann Leboulanger 6990b23bcc fix groupchat addition to roster 2008-04-24 07:52:11 +00:00
Stephan Erb 75e44510a1 Add parameter checks to public API. Remove boiler code. 2008-04-23 22:52:22 +00:00
Stephan Erb 29d2e00803 Small roster API cleanups. 2008-04-23 22:34:10 +00:00
Stephan Erb 465aab8200 Fix Modelfilter regression: disconnecting a minimized groupchat was broken. 2008-04-21 22:34:32 +00:00
Stephan Erb fb12c17fb9 In obvious cased, don't compare boolean values to True or False. 2008-04-21 20:52:35 +00:00
Stephan Erb f877fbea13 http://python.org/dev/peps/pep-0008/ " Comparisons to singletons like None should always be done with
'is' or 'is not', never the equality operators."


Apply do roster_window. See r9488.
2008-04-21 20:23:03 +00:00
Stephan Erb e504cee6fb Revert r9519. It was breaking DND. 2008-04-21 20:07:08 +00:00
Stephan Erb 7d8f72d663 Show correct color of status_messages in roster in more cases.
This is only a simple port of the old non-modelfilter method. Functionality not restored yet: Custom colors are lost when refiltering the model.
2008-04-21 19:57:48 +00:00
Stephan Erb b56c0c94af Connect drag'n'drop signals in glade. 2008-04-21 19:02:24 +00:00
Stephan Erb dc266592b7 Remove unused variables. 2008-04-21 18:52:15 +00:00
Jean-Marie Traissard 2c891b5b87 Translatable (desync'ed) 2008-04-20 20:06:16 +00:00
Jean-Marie Traissard 47bc1d61b4 Added one unique function to src/gajim.py to add a GC bookmark.
Moved newly created auto_join_bookmarks() to good source file.
Fix :
-when using bookmark auto from join dialog : Action rebuild now done; Add GC sorted in list
-when using gc_control->bookmark : Store password if any.
2008-04-20 19:45:09 +00:00
Jean-Marie Traissard 8b8f139f79 Moved methods for opening new messages controls from roster.py to src/gajim.py. This is not roster related. See #3643.
Sorted src/gajim.py functions, using steve-e style :p
2008-04-20 18:14:04 +00:00
Stephan Erb 4e6bd4ee8f Port roster_window to gtk.TreeModelFilter.
Contacts are now online hidden when they connect/reconnect and not completely removed/readded. Should come with a great speed improvement for people with big rosters.
There are still a few known problems but non that should dalay this patch any longer. Related bugs will be tracked with 'modelfilter' keyword.

See #1201
2008-04-20 14:01:04 +00:00
Jean-Marie Traissard 0374e72b28 Use one function to join bookmarks automatically only. Fix bug "all bookmarks joined minimized when going back
from invisible". Not sure it's right place for this function.
2008-04-19 23:39:09 +00:00
Yann Leboulanger 5dd0d4fce8 move functions that build icons to gtkgui_helpers instead of roster_window. Fixes #3873 2008-04-17 14:17:14 +00:00
Yann Leboulanger 278d63ca35 indentation 2008-04-17 06:55:12 +00:00
Yann Leboulanger 2d04fc6ae6 don't hide roster on startup if no systray module is available 2008-04-17 06:34:32 +00:00
Yann Leboulanger b936fa4bfe coding standards 2008-04-15 22:51:41 +00:00
Brendan Taylor b170e77cdb functioning tic-tac-toe :D 2008-04-11 03:52:45 +00:00
Yann Leboulanger db59de9397 fix argument in a menu.popup() call 2008-04-07 12:58:34 +00:00
Stephan Erb bea91baeaa Remove useless group redrawing. Remove unused variable. 2008-04-04 09:44:47 +00:00
Stephan Erb 611a53422e A few small PEP GUI and code changes. No new functionality. 2008-04-03 22:50:03 +00:00
Yann Leboulanger f3665cd689 don't remove metacontact when we reconnect. fixes #3771 2008-04-01 23:13:10 +00:00
Jean-Marie Traissard a0d8aea90b chat_control : fix possible var name confusion
roster : Fix resource problem, gajim.contacts.get_contact() can return first contact instead of specified resource. Fixes #3789.
2008-03-23 17:44:47 +00:00
Yann Leboulanger 5b55264c92 fix call to correct function when inviting to room in roster 2008-03-21 12:46:54 +00:00
Yann Leboulanger 1008d162f4 show invitation from anonymous room in roster from a groupchat rather than from a normal Contact. fixes #3448 2008-03-21 12:30:23 +00:00
Jean-Marie Traissard ff32d0ccb3 roster.on_quit_request() cleanups :
-Check if there are pending events and send offline even if we don't ask a status message (was a indentation
mistake I think)
- Really make unread and recent working according to 'notify_on_all_muc_messages' value
- be faster, hopefully
2008-03-20 20:26:58 +00:00
Jean-Marie Traissard d7a6734601 Clarify how roster.quit_on_next_offline works with comments.
Use only one function when user wants to quit. Bad dup code !
Maybe see #3643.
2008-03-20 16:31:21 +00:00
Jean-Marie Traissard e07ce48240 Restore single click behaviour. Function was called 2 times by mistake. 2008-03-19 23:53:40 +00:00
Jean-Marie Traissard f9ca40ff1b - Change the way roster.fire_up_unread_messages_events()/logger.get_unread_msgs() work, so it's
faster
- Stop adding pm chat messages received to unread messages. This is in addition to [8311], but
works also when chat win is already opened now.
- Automatically remove unread_message lines for messages older than a month, so we will clear this
table for everybody, and keep it quite clear. Specially because messages can still be blocked here
if it's from someone not in the roster and we don't open it during the session. This can be long
at first connection with this version, because we delete a lot of lines (nearly one per PMs you
received since a long time). Could also be a very little longer during one month.
2008-03-19 21:43:01 +00:00
Jean-Marie Traissard 7dca69467e Stop loading all transport iconsets at launch. Load them on the fly, if and when needed. Speedup gajim start and
use less mem :)
2008-03-19 00:25:28 +00:00
Yann Leboulanger d26080a3dd missing space in a string 2008-03-10 21:41:21 +00:00
Yann Leboulanger 3f98f9c53b prevent traceback when there is a row in roster without an associated Contact instance. see #3718 2008-03-10 15:41:06 +00:00