...
 
Commits (28)
Gajim 0.8.2 (06 Sep 2005)
* Fix so Gajim runs in pygtk2.8.x
* Gajim can use pydns too (apart from dnspython) to do SRV lookup
* Other minor fixes
Gajim 0.8.1 (02 Sep 2005)
* Systray icon for windows
* Gajim is available in Dutch
* Gajim can use gpg-agent
Gajim 0.8 (18 Aug 2005)
* Tabbed chat windows
* Group chat support (with MUC protocol)
* Emoticons, Avatars, File transfer, URL grabber, Bookmarks
* Systray icon, Speller
* TLS and GPG support (with SSL legacy support)
* Transport Registration support
* Service Discovery including Nodes
* Wikipedia, dictionary and search engine lookup
* Multiple accounts support
* DBus Capabilities. Read more information
* Avatars (JEP-0153)
* Chat state notifications aka. typing notification (JEP-0085)
* Bookmark storage (JEP-0048)
* File Transfer (JEP-0096)
* Major changes to adhere to GNOME HIG
* Complete vcard fields support
* New and better user interface for chat and groupchat windows
* SRV capabilities and custom hostname/port
* Many improvements in group chat and IRC emulation (eg. nick autocompletation and cycling)
* Gajim can now send and receive single messages
* New iconsets and new dialog for customizing the user interface
* Mouseover information for contacts in the roster window (aka tooltips)
* DBus Capabilities. Now Gajim can be remote controlled
* Authenticating HTTP Requests via XMPP (JEP-0070)
* Now you can lookup a word in Wikipedia, dictionary or in search engine
* XML Console
* Gajim is available in 11 languages: English, French, German, Russian, Spanish, Polish, Portugese, Greek, Bulgarian, Czech and Norwegian
* Gajim is now also available in norwegian and czech language
Gajim 0.7.1 (5 Jun 2005)
......
VERSION ?= 0.8.1
VERSION ?= 0.8.2
GAJIM_AP = 0 # do we build Autopackage?
MODULES = src src/common po
PREFIX = /usr/local
DESTDIR =
OPTFLAGS =
export OPTFLAGS
LIBDIR = /lib
export LIBDIR
MANDIR = $(DESTDIR)$(PREFIX)/share/man
FIND = find . \( -name '*.glade' -o -name '*.py' -o -name '*.xpm' -o -name '*.gif' -o -name '*.png' -o -name '*.mo' -o -name '*.wav' \)
FIND = find . \( -name '*.glade' -o -name '*.py' -o -name '*.xpm' -o -name '*.gif' -o -name '*.png' -o -name '*.wav' \)
FILES = `$(FIND)`
DIRS = `$(FIND) -exec dirname {} \; | sort -u`
FIND_PO = find ./po \( -name '*.mo' \)
FILES_PO = `$(FIND_PO) | sed -e 's/^\.\/po/\./g'`
DIRS_PO = `$(FIND_PO) -exec dirname {} \; | sort -u | sed -e 's/^\.\/po/\./g'`
FIND_LIB = find . -name '*.so'
FILES_LIB = `$(FIND_LIB)`
......@@ -48,7 +54,6 @@ dist:
for s in $(SCRIPTS) ; do \
cp $$s gajim-$(VERSION)/scripts/; \
done
cp scripts/gajim-remote.py gajim-$(VERSION)/scripts/; \
find gajim-$(VERSION) -name '.svn' -type d | xargs rm -rf
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
......@@ -59,6 +64,10 @@ dist:
rm -rf gajim-$(VERSION)
install:
# Remove the old po folder if it exists
if [ -d $(DESTDIR)$(PREFIX)/share/gajim/po ] ; then \
rm -rf $(DESTDIR)$(PREFIX)/share/gajim/po; \
fi
for d in $(DIRS) ; do \
if [ ! -d $(DESTDIR)$(PREFIX)/share/gajim/$$d ] ; then \
mkdir -p "$(DESTDIR)$(PREFIX)/share/gajim/$$d"; \
......@@ -68,6 +77,16 @@ install:
DST=`dirname "$$f"`; \
cp "$$f" "$(DESTDIR)$(PREFIX)/share/gajim/$$DST/"; \
done
rm "$(DESTDIR)$(PREFIX)/share/gajim/src/systraywin32.py"
for d in $(DIRS_PO) ; do \
if [ ! -d $(DESTDIR)$(PREFIX)/share/locale/$$d ] ; then \
mkdir -p "$(DESTDIR)$(PREFIX)/share/locale/$$d"; \
fi; \
done
for f in $(FILES_PO) ; do \
DST=`dirname "$$f"`; \
cp "./po/$$f" "$(DESTDIR)$(PREFIX)/share/locale/$$DST/"; \
done
cp COPYING "$(DESTDIR)$(PREFIX)/share/gajim/";
mkdir -p "$(DESTDIR)$(PREFIX)/share/pixmaps";
cp data/pixmaps/gajim.png "$(DESTDIR)$(PREFIX)/share/pixmaps/";
......@@ -116,9 +135,10 @@ help:
uninstall:
rm -rf "$(DESTDIR)$(PREFIX)/share/gajim" # the main files are here
rm -rf "$(DESTDIR)$(PREFIX)/lib/gajim" # the .so files are here
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim" # the bash script
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim-remote" # remote-control script
rm -f "$(MANDIR)/man1/gajim.1.gz" # the man page
rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/gajim.png" # the icon
rm -f "$(DESTDIR)$(PREFIX)/share/applications/gajim.desktop" #the desktop
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim" # the bash script
rm -f "$(DESTDIR)$(PREFIX)/bin/gajim-remote" # remote-control script
rm -f "$(MANDIR)/man1/gajim.1.gz" # the man page
rm -f "$(MANDIR)/man1/gajim-remote.1.gz" # the man page
rm -f "$(DESTDIR)$(PREFIX)/share/pixmaps/gajim.png" # the icon
rm -f "$(DESTDIR)$(PREFIX)/share/applications/gajim.desktop" #the desktop
@echo done uninstalling
gajim (0.8-2) unstable; urgency=low
gajim (0.8.2-1) unstable; urgency=low
* build-depend list now works with sarge
* new upstream release Closes: #325080,#324481,#325126,#324493,#326655
* Gajim now depends on python-gtk2 >= 2.6.0
-- Yann Le Boulanger <asterix@lagaule.org> Sun, 21 Aug 2005 14:56:48 +0200
-- Yann Le Boulanger <asterix@lagaule.org> Sun, 02 Sep 2005 14:56:48 +0200
gajim (0.8-1) unstable; urgency=low
......
......@@ -7,7 +7,8 @@ Standards-Version: 3.6.2
Package: gajim
Architecture: any
Depends: ${shlibs:Depends}, python (>= 2.3), python-glade2 (>= 2.4.0), python-gtk2 (>= 2.4.0)
Depends: ${shlibs:Depends}, python (>= 2.3), python-glade2 (>= 2.6.0), python-gtk2 (>= 2.6.0)
Recommends: python-dns
Suggests: python-gnupginterface
Description: Jabber client written in PyGTK
Gajim is a jabber client written in python, with a GTK frontend. It supports
......
......@@ -3,7 +3,7 @@ Categories=Network;InstantMessaging;Application;GTK;GNOME;
Name=Gajim
GenericName=Jabber IM Client
Comment=A GTK+ Jabber client
Version=0.8.1
Version=0.8.2
Encoding=UTF-8
Exec=gajim
Icon=gajim.png
......@@ -17,7 +17,7 @@ X-DCOP-ServiceType=Unique
X-DCOP-ServiceName=Gajim
GenericName[bg]=Jabber Съобщения в реално време
GenericName[bg]=Бързи съобщения (Gajim)
GenericName[ca]=Jabber Missatger a l'instant
GenericName[cy]=Jabber Negesydd Chwim
GenericName[el]=Jabber Στιγμιαίος αποστολέας
......
......@@ -5,7 +5,7 @@
[Setup]
AppName=Gajim
AppVerName=Gajim version 0.8.1
AppVerName=Gajim version 0.8.2
DefaultDirName={pf}\Gajim
DefaultGroupName=Gajim
UninstallDisplayIcon={app}\src\Gajim.exe
......@@ -26,7 +26,7 @@ Source: "COPYING"; DestDir: "{app}"
Source: "dist\gajim.exe"; DestDir: "{app}\src"; components: main
Source: "dist\*.glade"; DestDir: "{app}\src"
Source: "data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
Source: "po\*"; DestDir: "{app}\po"; Flags: recursesubdirs
Source: "po\*.mo"; DestDir: "{app}\po"; Flags: recursesubdirs
[Icons]
Name: "{group}\Gajim"; Filename: "{app}\src\Gajim.exe"; WorkingDir: "{app}\src"
......
......@@ -29,4 +29,4 @@ src/vcard.py
src/gtkgui.glade.h
src/tooltips.py
src/filetransfers_window.py
scripts/gajim-remote.py
src/gajim-remote.py
......@@ -22,6 +22,6 @@ if [ `id -u` -eq 0 ]; then
echo "You must not launch gajim-remote as root, it is INSECURE"
fi
cd PREFIX/share/gajim/scripts
cd PREFIX/share/gajim/src
export PYTHONPATH="$PYTHONPATH:PREFIXLIB/gajim"
python gajim-remote.py $@
......@@ -18,7 +18,8 @@ def visit(arg, dirname, names):
if 'gajim.po' in names:
path_to_po = os.path.join(dirname, 'gajim.po')
pos = path_to_po.find('po/') + 3 #3 = len('po/')
name = path_to_po[pos:pos+2]
endpos = path_to_po.find('/', pos)
name = path_to_po[pos:endpos]
if update: # update an existing po file)
os.system('msgmerge -q -U ../po/'+name+'/LC_MESSAGES/gajim.po ../po/gajim.pot')
if stats:
......
......@@ -10,7 +10,7 @@ trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o
$(CC) $(LDFLAGS) -shared $^ -o $@
gtkspell.so:
$(CC) $(CFLAGS) $(LDFLAGS) `pkg-config --libs --cflags gtkspell-2.0` -shared gtkspellmodule.c $^ -o $@
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) `pkg-config --libs --cflags gtkspell-2.0` -shared gtkspellmodule.c $^ -o $@
# The path to the GTK+ python types
DEFS=`pkg-config --variable=defsdir pygtk-2.0`
......
......@@ -121,4 +121,5 @@ class CellRendererImage(gtk.GenericCellRenderer):
self.get_property('ypad'))
return x_offset, y_offset, calc_width, calc_height
gobject.type_register(CellRendererImage)
if gtk.pygtk_version < (2, 8, 0):
gobject.type_register(CellRendererImage)
......@@ -6,7 +6,7 @@ LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
all: idle.so
idle.so:
$(CC) $(CFLAGS) $(LDFLAGS) -shared idle.c $^ -o $@ -L/usr/X11R6/lib -lX11 -lXss -lXext
$(CC) $(OPTFLAGS) $(CFLAGS) $(LDFLAGS) -shared idle.c $^ -o $@ -L/usr/X11R6$(LIBDIR) -lX11 -lXss -lXext
clean:
rm -f *.so
......
......@@ -117,7 +117,7 @@ class Config:
'send_on_ctrl_enter': [opt_bool, False], # send on ctrl+enter
'show_roster_on_startup': [opt_bool, True],
'key_up_lines': [opt_int, 25], # how many lines to store for key up
'version': [ opt_str, '0.9' ], # what version first created the config
'version': [ opt_str, '0.8.2' ],
'always_compact_view': [opt_bool, False], # initial compact view state
'search_engine': [opt_str, 'http://www.google.com/search?&q=%s&sourceid=gajim'],
'dictionary_url': [opt_str, 'WIKTIONARY'], # by default use wiktionary
......
......@@ -24,7 +24,7 @@ import mutex
import common.config
import common.logger
version = '0.9'
version = '0.8.2'
config = common.config.Config()
connections = {}
verbose = False
......
......@@ -17,11 +17,15 @@
## GNU General Public License for more details.
##
APP = 'gajim'
DIR = '../po'
import locale
import gettext
import os
APP = 'gajim'
if os.path.isdir('../po'):
DIR = '../po'
else:
DIR = '../../locale'
locale.setlocale(locale.LC_ALL, '')
_translation = None
......
......@@ -36,6 +36,8 @@ if os.name == 'nt':
# win9x, ./logs
LOGPATH = 'Logs'
LOGPATH = LOGPATH.decode(sys.getfilesystemencoding())
class Logger:
def __init__(self):
dot_gajim = os.path.dirname(LOGPATH)
......
......@@ -17,6 +17,7 @@
##
import os
import sys
import locale
from common import gajim
from common import i18n
......@@ -85,6 +86,8 @@ class OptionsParser:
def write(self):
(base_dir, filename) = os.path.split(self.__filename)
base_dir = base_dir.decode(sys.getfilesystemencoding())
filename = filename.decode(sys.getfilesystemencoding())
self.__tempfile = os.path.join(base_dir, '.' + filename)
try:
fd = open(self.__tempfile, 'w')
......
......@@ -32,10 +32,18 @@ from simplexml import ustr
from client import PlugIn
from protocol import *
# determine which DNS resolution library is available
HAVE_DNSPYTHON = False
HAVE_PYDNS = False
try:
import dns.resolver
except:
pass
import dns.resolver # http://dnspython.org/
HAVE_DNSPYTHON = True
except ImportError:
try:
import DNS # http://pydns.sf.net/
HAVE_PYDNS = True
except ImportError:
print "Could not load one of the supported DNS libraries (dnspython or pydns). SRV records will not be queried and you may need to set custom hostname/port for some servers to be accessible."
DATA_RECEIVED='DATA RECEIVED'
DATA_SENT='DATA SENT'
......@@ -60,20 +68,31 @@ class TCPsocket(PlugIn):
self._exported_methods=[self.send,self.disconnect]
# SRV resolver
if 'dns' in globals(): # if dnspython is available support SRV
if HAVE_DNSPYTHON or HAVE_PYDNS:
host, port = server
possible_queries = ['_xmpp-client._tcp.' + host]
for query in possible_queries:
try:
answers = [x for x in dns.resolver.query(query, 'SRV')]
if answers:
host = str (answers[0].target)
port = int (answers[0].port)
break
if HAVE_DNSPYTHON:
answers = [x for x in dns.resolver.query(query, 'SRV')]
if answers:
host = str (answers[0].target)
port = int (answers[0].port)
break
elif HAVE_PYDNS:
# ensure we haven't cached an old configuration
DNS.ParseResolvConf()
response = DNS.Request().req(query, qtype='SRV')
answers = response.answers
if len(answers) > 0:
# ignore the priority and weight for now
_, _, port, host = answers[0]['data']
del _
port = int(port)
break
except:
pass
print 'An error occurred while looking up %s' % query
server = (host, port)
# end of SRV resolver
......
......@@ -1881,8 +1881,10 @@ class ManageEmoticonsWindow:
if not emot in emots:
gajim.config.add_per('emoticons', emot)
self.plugin.init_regexp() # update regexp [emoticons included]
gajim.config.set_per('emoticons', emot, 'path',
model[iter][1].decode('utf-8'))
image = model[iter][1]
if image:
image = image.decode('utf-8')
gajim.config.set_per('emoticons', emot, 'path', image)
self.plugin.save_config()
def image_is_ok(self, image):
......@@ -1932,20 +1934,30 @@ class ManageEmoticonsWindow:
old_text = model.get_value(iter, 0).decode('utf-8')
if old_text in emots:
gajim.config.del_per('emoticons', old_text)
emots = gajim.config.get_per('emoticons')
emot = new_text.decode('utf-8').upper()
if emot in emots:
model.remove(iter)
else:
gajim.config.add_per('emoticons', emot)
self.plugin.init_regexp() # update regexp [emoticons included]
self.plugin.init_regexp() # update regexp (emoticons included)
gajim.config.set_per('emoticons', emot, 'path',
model[iter][1].decode('utf-8'))
model.set_value(iter, 0, emot)
model[iter][0] = emot
self.plugin.save_config()
def update_preview(self, widget):
path_to_file = widget.get_preview_filename()
widget.get_preview_widget().set_from_file(path_to_file)
if path_to_file is None or os.path.isdir(path_to_file):
# nothing to preview or directory
# make sure you clean image do show nothing
widget.get_preview_widget().set_from_file(None)
return
try:
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(path_to_file, 32, 32)
except (gobject.GError, TypeError):
return
widget.get_preview_widget().set_from_pixbuf(pixbuf)
def on_set_image_button_clicked(self, widget, data=None):
(model, iter) = self.emot_tree.get_selection().get_selected()
......
......@@ -241,6 +241,7 @@ _('Connection with peer cannot be established.'))
if response == gtk.RESPONSE_OK:
files_path_list = dialog.get_filenames()
dialog.destroy()
file_dir = None
for file_path in files_path_list:
file_path = file_path.decode(sys.getfilesystemencoding())
if os.path.isfile(file_path):
......
......@@ -32,11 +32,16 @@ import signal
signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
import i18n
from common import i18n
_ = i18n._
i18n.init()
def send_error(error_message):
''' Writes error message to stderr and exits '''
sys.stderr.write(error_message + '\n')
sys.stderr.flush()
sys.exit(1)
try:
import dbus
......@@ -149,9 +154,8 @@ using this account'), False)
}
if self.argv_len < 2 or \
sys.argv[1] not in self.commands.keys(): # no args or bad args
self.send_error(self.compose_help())
send_error(self.compose_help())
self.command = sys.argv[1]
if self.command == 'help':
if self.argv_len == 3:
print self.help_on_command(sys.argv[2])
......@@ -164,12 +168,12 @@ using this account'), False)
if self.command == 'contact_info':
if self.argv_len < 3:
self.send_error(_('Missing argument "contact_jid"'))
send_error(_('Missing argument "contact_jid"'))
try:
id = self.sbus.add_signal_receiver(self.show_vcard_info,
'VcardInfo', INTERFACE, SERVICE, OBJ_PATH)
except:
self.send_error(_('Service not available'))
except Exception, e:
send_error(_('Service not available'))
res = self.call_remote_method()
self.print_result(res)
......@@ -187,10 +191,10 @@ using this account'), False)
if res == False:
if self.argv_len < 4:
self.send_error(_('\'%s\' is not in your roster.\n\
send_error(_('\'%s\' is not in your roster.\n\
Please specify account for sending the message.') % sys.argv[2])
else:
self.send_error(_('You have no active account'))
send_error(_('You have no active account'))
elif self.command == 'list_accounts':
if isinstance(res, list):
for account in res:
......@@ -209,16 +213,16 @@ Please specify account for sending the message.') % sys.argv[2])
try:
self.sbus = dbus.SessionBus()
except:
self.send_error(_('Session bus is not available.'))
send_error(_('Session bus is not available.'))
if _version[1] >= 30 and _version[1] <= 42:
if _version[1] >= 30:
obj = self.sbus.get_object(SERVICE, OBJ_PATH)
interface = dbus.Interface(obj, INTERFACE)
elif _version[1] < 30:
self.service = self.sbus.get_service(SERVICE)
interface = self.service.get_object(OBJ_PATH, INTERFACE)
else:
send_error(_('Unknown D-Bus version: %s') % _version)
send_error(_('Unknown D-Bus version: %s') % _version[1])
# get the function asked
self.method = interface.__getattr__(self.command)
......@@ -251,7 +255,7 @@ Please specify account for sending the message.') % sys.argv[2])
for argument in command_props[1]:
str += ' ' + argument[0] + ' - ' + argument[1] + '\n'
return str
self.send_error(_('%s not found') % command)
send_error(_('%s not found') % command)
def compose_help(self):
''' print usage, and list available commands '''
......@@ -292,6 +296,8 @@ Please specify account for sending the message.') % sys.argv[2])
res += self.print_info(level+1, items)
if res != '':
ret_str += '\t' + res
elif type(val) == dict:
ret_str += self.print_info(level+1, val)
ret_str = '%s(%s)\n' % (spacing, ret_str[1:])
elif isinstance(prop_dict, dict):
for key in prop_dict.keys():
......@@ -311,8 +317,6 @@ Please specify account for sending the message.') % sys.argv[2])
res = self.print_info(level+1, val)
if res != '':
ret_str += '%s%s: \n%s' % (spacing, key, res)
else:
self.send_warning(_('Unknown type %s ') % type(val))
return ret_str
def unrepr(self, serialized_data):
......@@ -437,13 +441,12 @@ Please specify account for sending the message.') % sys.argv[2])
else:
if args and len(args) >= 5:
props_dict = self.unrepr(args[4].get_args_list()[0])
if props_dict:
print self.print_info(0,props_dict[0])
# remove_signal_receiver is broken in lower versions (< 0.35),
# so we leave the leak - nothing can be done
if _version[1] >= 41:
self.sbus.remove_signal_receiver(show_vcard_info, 'VcardInfo',
self.sbus.remove_signal_receiver(self.show_vcard_info, 'VcardInfo',
INTERFACE, SERVICE, OBJ_PATH)
gtk.main_quit()
......@@ -454,12 +457,12 @@ Please specify account for sending the message.') % sys.argv[2])
args = self.commands[self.command][1]
if len(args) > argv_len:
if args[argv_len][2]:
self.send_error(_('Argument "%s" is not specified. \n\
send_error(_('Argument "%s" is not specified. \n\
Type "%s help %s" for more info') % (args[argv_len][0], BASENAME, self.command))
def gtk_quit(self):
if _version[1] >= 41:
self.sbus.remove_signal_receiver(show_vcard_info, 'VcardInfo',
self.sbus.remove_signal_receiver(self.show_vcard_info, 'VcardInfo',
INTERFACE, SERVICE, OBJ_PATH)
gtk.main_quit()
......@@ -481,14 +484,9 @@ Type "%s help %s" for more info') % (args[argv_len][0], BASENAME, self.command))
sys.argv[5])
return res
except:
self.send_error(_('Service not available'))
send_error(_('Service not available'))
return None
def send_error(self, error_message):
''' Writes error message to stderr and exits '''
sys.stderr.write(error_message + '\n')
sys.stderr.flush()
sys.exit(1)
if __name__ == '__main__':
GajimRemote()
......@@ -610,6 +610,8 @@ class Interface:
array['resource']]
if win:
win.set_avatar(array)
if self.remote is not None:
self.remote.raise_signal('VcardInfo', (account, array))
def handle_event_os_info(self, account, array):
win = None
......
......@@ -423,6 +423,7 @@ class GroupchatWindow(chat.Chat):
response = instance.get_response()
if response == gtk.RESPONSE_OK:
nick = instance.input_entry.get_text().decode('utf-8')
self.nicks[room_jid] = nick
gajim.connections[self.account].change_gc_nick(room_jid, nick)
def on_configure_room_menuitem_activate(self, widget):
......
......@@ -20,6 +20,7 @@
import xml.sax.saxutils
import gtk
import gobject
import os
from common import i18n
i18n.init()
......
......@@ -278,8 +278,9 @@ class SignalObject(DbusPrototype):
You have to register the 'VcardInfo' signal to get the real vcard. '''
if self.disabled:
return
[jid] = self._get_real_arguments(args, 1)
if not isinstance(jid, unicode):
jid = unicode(jid)
if not jid:
# FIXME: raise exception for missing argument (0.3+)
return None
......@@ -287,10 +288,8 @@ class SignalObject(DbusPrototype):
accounts = gajim.contacts.keys()
for account in accounts:
if gajim.contacts[account].has_key(jid):
if gajim.contacts[account].__contains__(jid):
self.vcard_account = account
gajim.connections[account].register_handler('VCARD',
self._receive_vcard)
gajim.connections[account].request_vcard(jid)
break
return None
......@@ -302,7 +301,10 @@ class SignalObject(DbusPrototype):
if gajim.contacts:
result = gajim.contacts.keys()
if result and len(result) > 0:
return result
result_array = []
for account in result:
result_array.append(account.encode('utf-8'))
return result_array
return None
......@@ -324,7 +326,6 @@ class SignalObject(DbusPrototype):
result.append(item)
else:
# 'for_account: is not recognised:',
# FIXME: there can be a return status for this [0.3+]
return None
else:
for account in gajim.contacts:
......@@ -358,19 +359,6 @@ class SignalObject(DbusPrototype):
return True
return False
def _receive_vcard(self,account, array):
if self.vcard_account:
gajim.connections[self.vcard_account].unregister_handler('VCARD',
self._receive_vcard)
self.unregistered_vcard = None
if self.disabled:
return
if _version[1] >=30:
self.VcardInfo(repr(array))
else:
self.emit_signal(INTERFACE, 'VcardInfo',
repr(array))
def _get_real_arguments(self, args, desired_length):
# supresses the first 'message' argument, which is set in dbus 0.23
if _version[1] == 20:
......
......@@ -1172,6 +1172,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
return False
def send_status(self, account, status, txt, sync = False, auto = False):
accountIter = self.get_account_iter(account)
if status != 'offline':
if gajim.connections[account].connected < 2:
model = self.tree.get_model()
......
......@@ -19,6 +19,7 @@
import gtk
import gtk.glade
import gobject
import urllib
import base64
import mimetypes
......@@ -120,7 +121,16 @@ class VcardWindow:
def update_preview(self, widget):
path_to_file = widget.get_preview_filename()
widget.get_preview_widget().set_from_file(path_to_file)
if path_to_file is None or os.path.isdir(path_to_file):
# nothing to preview or directory
# make sure you clean image do show nothing
widget.get_preview_widget().set_from_file(None)
return
try:
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(path_to_file, 100, 100)
except gobject.GError:
return
widget.get_preview_widget().set_from_pixbuf(pixbuf)
def on_set_avatar_button_clicked(self, widget):
f = None
......