Ticket #3643 (closed defect: fixed)

Opened 3 years ago

Last modified 12 months ago

Un-clutter roster_window.py

Reported by: steve-e Owned by: asterix
Priority: normal Milestone:
Component: None Version: hg
Severity: normal Keywords:
Cc: Blocked By:
OS: All Blocking:

Description

I know there is still the modelfilter patch pending, nevertheless we should think about cleaning up the roster sources.

Roster_window.py is 5578 lines long and declares 169 public methods (only about 40% of those are documented)

On a quick glance I spotted the following:

  • Music Track notifications should be moved somewhere else
    • enable_syncing_status_msg_from_current_music_track()
    • enable_syncing_status_msg_from_lastfm()
    • _music_track_changed
    • some stuff in init
  • change_awn_icon_status should be moved to statusicon.py
  • A lot of Icon related stuff could be moved to gtkgui_helpers
    • get_appropriate_state_images
    • load_iconset or make_foo_state_images
    • ...
  • on_status_combobox_changed and change_status kill DRY Principal
    • Don't repeat yourself: both fire dialog for invisibility in groupchat

Attachments

Change History

Changed 2 years ago by jim++

(In [e77f0ed376d3b258fb2ca52fdea0a4ffad8f3077]) 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.

Changed 2 years ago by steve-e

Do we want that for 0.12 or would it be easier to wait for the plugin system and let MusicTrack? and AWN become a plugin.

Changed 2 years ago by asterix

  • milestone 0.12 deleted

Changed 2 years ago by Jim++

Avoid duplicate icons and move icon code outside of roster_window (not sure better place yet):

Assigned to me (after modelfilter is finished).

Changed 2 years ago by Jim++

For icon code, see also #2378

Changed 2 years ago by jim++

(In [3c83a314697e4ea50c8a01e914709c8cbb939d02]) 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

Changed 12 months ago by Yann Leboulanger <asterix@…>

(In [875625bb2767d069a04b110b5f47f1e42a2bc21c]) move music track listener things from roster_window.py to gajim.py. see #3643

Changed 12 months ago by Yann Leboulanger <asterix@…>

(In [00738d503d157b7199c61ef454f7c905669f4798]) move change_awn_icon_status from roster_window.py to gajim.py. see #3643

Changed 12 months ago by asterix

  • status changed from new to closed
  • resolution set to fixed

I don't think it's good to move get_appropriate_state_images because it uses self.transports_state_images which has it's place in roster instance as it's used there only.

Add/Change #3643 (Un-clutter roster_window.py)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Next status will be 'needinfo'
 
Note: See TracTickets for help on using tickets.