From 9347fe10e18a1a679bf8119321d8ace0ef0d6952 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Wed, 15 Nov 2006 01:59:21 +0000 Subject: [PATCH] Remove lot of useless imports Fix gajim-remote contact_info Fix profile_win right click on avatar Fix a call and a comment Thanks pyflakes (a program, not a person) for the whole. --- src/common/events.py | 2 +- src/config.py | 1 - src/conversation_textview.py | 1 - src/notify.py | 2 +- src/profile_window.py | 8 +------- src/remote_control.py | 2 +- src/roster_window.py | 1 - src/statusicon.py | 1 - src/tooltips.py | 1 - src/vcard.py | 2 -- 10 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/common/events.py b/src/common/events.py index 156d58ef6..99cd98cfc 100644 --- a/src/common/events.py +++ b/src/common/events.py @@ -223,7 +223,7 @@ class Events: return self._get_first_event_with_attribute(events) def get_nb_roster_events(self, account = None, jid = None, types = []): - '''returns the number of events displayedin roster''' + '''returns the number of events displayed in roster''' return self._get_nb_events(attribute = 'roster', account = account, jid = jid, types = types) diff --git a/src/config.py b/src/config.py index 16b4a0fa9..8e0e6d40d 100644 --- a/src/config.py +++ b/src/config.py @@ -24,7 +24,6 @@ import common.sleepy import gtkgui_helpers import dialogs -import vcard import cell_renderer_image import message_control import chat_control diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 35c615026..834ec6acd 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -18,7 +18,6 @@ import gtk import pango import gobject import time -import sys import os import tooltips import dialogs diff --git a/src/notify.py b/src/notify.py index ad4857ac3..c79463a7b 100644 --- a/src/notify.py +++ b/src/notify.py @@ -101,7 +101,7 @@ def get_advanced_notification(event, account, contact): if tab_opened == 'both': tab_opened_ok = True else: - chat_control = helper.get_chat_control(account, contact) + chat_control = helpers.get_chat_control(account, contact) if (chat_control and tab_opened == 'yes') or (not chat_control and \ tab_opened == 'no'): tab_opened_ok = True diff --git a/src/profile_window.py b/src/profile_window.py index 72ce0f98d..b5bd62809 100644 --- a/src/profile_window.py +++ b/src/profile_window.py @@ -20,13 +20,10 @@ import gobject import base64 import mimetypes import os -import time -import locale import gtkgui_helpers import dialogs -from common import helpers from common import gajim from common.i18n import Q_ @@ -172,10 +169,7 @@ class ProfileWindow: menu = gtk.Menu() # Try to get pixbuf - is_fake = False - if account and gajim.contacts.is_pm_from_jid(account, jid): - is_fake = True - pixbuf = get_avatar_pixbuf_from_cache(jid, is_fake) + pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(self.jid) if pixbuf: nick = gajim.config.get_per('accounts', self.account, 'name') diff --git a/src/remote_control.py b/src/remote_control.py index 980b40448..a87c89294 100644 --- a/src/remote_control.py +++ b/src/remote_control.py @@ -307,7 +307,7 @@ class SignalObject(dbus.service.Object): if not jid: raise MissingArgument return None - jid = self._get_real_jid(jid, account) + jid = self._get_real_jid(jid) cached_vcard = gajim.connections.values()[0].get_cached_vcard(jid) if cached_vcard: diff --git a/src/roster_window.py b/src/roster_window.py index 744ac446c..e1647fcd9 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -18,7 +18,6 @@ import gtk import gobject import os -import sys import time import urllib diff --git a/src/statusicon.py b/src/statusicon.py index 4dd11040c..0201afe64 100644 --- a/src/statusicon.py +++ b/src/statusicon.py @@ -14,7 +14,6 @@ ## import gtk -import gobject import systray from common import gajim diff --git a/src/tooltips.py b/src/tooltips.py index e6a42d33f..a6e40fe2f 100644 --- a/src/tooltips.py +++ b/src/tooltips.py @@ -21,7 +21,6 @@ import time import locale import gtkgui_helpers -import message_control from common import gajim from common import helpers diff --git a/src/vcard.py b/src/vcard.py index 844425b65..096093d27 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -19,8 +19,6 @@ import gtk import gobject import base64 -import mimetypes -import os import time import locale