Commit a5259626 authored by nicfit's avatar nicfit

Merged trunk

parent a4477f88
......@@ -25,6 +25,8 @@ Optionally:
dnspython or pydns for SRV support; if you don't know what that is, you don't need it
gtkspell and aspell-LANG where lang is your locale eg. en, fr etc
GnomePythonExtras 2.10 or above so you can avoid compiling trayicon and gtkspell
notification-daemon (and D-Bus) to get cooler popups
D-Bus to have gajim-remote working
NOTE TO PACKAGERS:
Gajim is a GTK+ app and not a gnome one. Just do 'make' so you don't require gnomepythonextras
......
......@@ -4,9 +4,9 @@ gajim (0.9.1-1) unstable; urgency=low
* Gajim now reconnects when connection is lost Closes: #329376
* Status-changer widget's behaviour has been improved Closes: #340499
* Gajim now recommends python-dns Closes: #340492
* new russion translation Closes: #337971
* Gajim now depends on python-pysqlite2, recommands python-dbus, and
suggests python-gnome2
* new russian translation Closes: #337971
* Gajim now depends on python-pysqlite2, recommends python-dbus and
notification-daemon, and suggests python-gnome2
-- Yann Le Boulanger <asterix@lagaule.org> Fri, 27 Dec 2005 01:20:54 +0100
......
......@@ -8,8 +8,9 @@ Standards-Version: 3.6.2
Package: gajim
Architecture: any
Depends: ${shlibs:Depends}, python (>= 2.3), python-glade2 (>= 2.6.0), python-gtk2 (>= 2.6.0), python-pysqlite2
Recommends: python-dns, python2.3-dbus | python2.4-dbus
Recommends: python-dns, python2.4-dbus | python2.3-dbus, notification-daemon
Suggests: python-gnupginterface, python-gnome2
Description: Jabber client written in PyGTK
Gajim is a jabber client written in python, with a GTK frontend. It supports
tabbed chat, MUC, systray icon, TLS, GPG, SSL, multiple accounts, ...
tabbed chat, MUC, systray icon, TLS, GPG, SSL, multiple accounts, avatars,
file transfert, transports, DBus.
[Setup]
AppName=Gajim
AppVerName=Gajim version 0.9.1
AppVerName=Gajim version 0.10
DefaultDirName={pf}\Gajim
DefaultGroupName=Gajim
UninstallDisplayIcon={app}\src\Gajim.exe
......
cd src
gajim.py
\ No newline at end of file
......@@ -95,6 +95,8 @@ class CellRendererImage(gtk.GenericCellRenderer):
pix = self.image.get_pixbuf()
else:
return
if draw_rect.x < 1:
return
window.draw_pixbuf(widget.style.black_gc, pix,
draw_rect.x - pix_rect.x,
draw_rect.y - pix_rect.y,
......
......@@ -172,7 +172,8 @@ class Config:
'restored_messages_color': [opt_str, 'grey'],
'hide_avatar_of_transport': [opt_bool, False],
'roster_window_skip_taskbar': [opt_bool, False],
# TODO: Need to decide Gajim default. methinks 'always'
'use_urgency_hint': [opt_bool, True, _('If True and installed GTK+ and PyGTK versions are at least 2.8, make the window flash (the default behaviour in most Window Managers) when holding pending events.')],
'notification_timeout': [opt_int, 5],
'one_message_window': [opt_str, 'never',
_('Controls the window where new messages are placed.\n\'always\' - All messages are sent to a single window.\n\'never\' - All messages get their own window.\n\'peracct\' - Messages for each account are sent to a specific window.\n\'pertype\' - Each message type (e.g., chats vs. groupchats) are sent to a specific window. Note, changing this option requires restarting Gajim before the changes will take effect')],
}
......
......@@ -32,7 +32,7 @@ import config
interface = None # The actual interface (the gtk one for the moment)
version = '0.9.1'
version = '0.10'
config = config.Config()
connections = {}
verbose = False
......
......@@ -496,6 +496,18 @@ def get_global_show():
if connected > maxi:
maxi = connected
return gajim.SHOW_LIST[maxi]
def get_global_status():
maxi = 0
for account in gajim.connections:
if not gajim.config.get_per('accounts', account,
'sync_with_global_status'):
continue
connected = gajim.connections[account].connected
if connected > maxi:
maxi = connected
status = gajim.connections[account].status
return status
def get_icon_name_to_show(contact, account = None):
'''Get the icon name to show in online, away, requested, ...'''
......
......@@ -898,7 +898,8 @@ class PopupNotificationWindow:
xml.signal_autoconnect(self)
self.window.show_all()
gobject.timeout_add(5000, self.on_timeout)
timeout = gajim.config.get('notification_timeout') * 1000 # make it ms
gobject.timeout_add(timeout, self.on_timeout)
def on_close_button_clicked(self, widget):
self.adjust_height_and_move_popup_notification_windows()
......
......@@ -196,7 +196,13 @@ class GajimRemote:
(_('account'), _(''), False)
]
],
'get_status_message': [
_('Returns current status message(the global one unless account is specified)'),
[
(_('account'), _(''), False)
]
],
}
if self.argv_len < 2 or \
sys.argv[1] not in self.commands.keys(): # no args or bad args
......
This diff is collapsed.
......@@ -264,7 +264,8 @@ def parse_server_xml(path_to_file):
def set_unset_urgency_hint(window, unread_messages_no):
'''sets/unsets urgency hint in window argument
depending if we have unread messages or not'''
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0):
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0) and \
gajim.config.get('use_urgency_hint'):
if unread_messages_no > 0:
window.props.urgency_hint = True
else:
......
......@@ -189,10 +189,11 @@ class DesktopNotification:
self.notif = dbus_support.get_notifications_interface()
if self.notif is None:
raise dbus.dbus_bindings.DBusException()
timeout = gajim.config.get('notification_timeout') # in seconds
self.id = self.notif.Notify(dbus.String(_('Gajim')),
dbus.String(path), dbus.UInt32(0), ntype, dbus.Byte(0),
dbus.String(event_type), dbus.String(txt),
[dbus.String(path)], {'default':0}, [''], True, dbus.UInt32(5))
[dbus.String(path)], {'default': 0}, [''], True, dbus.UInt32(timeout))
notification_response_manager.attach_to_interface()
notification_response_manager.pending[self.id] = self
......
......@@ -107,6 +107,7 @@ class SignalObject(DbusPrototype):
self.add_contact,
self.remove_contact,
self.get_status,
self.get_status_message,
])
def raise_signal(self, signal, arg):
......@@ -137,6 +138,20 @@ class SignalObject(DbusPrototype):
# return show for the given account
index = gajim.connections[account].connected
return STATUS_LIST[index]
def get_status_message(self, *args):
'''get_status(account = None)
returns status which is the global one
unless account is given'''
account = self._get_real_arguments(args, 1)[0]
accounts = gajim.contacts.keys()
if not account:
# If user did not ask for account, returns the global status
return str(helpers.get_global_status())
# return show for the given account
status = gajim.connections[account].status
return str(status)
def send_file(self, *args):
'''send_file(file_path, jid, account=None)
......@@ -488,3 +503,4 @@ class SignalObject(DbusPrototype):
remove_contact = method(INTERFACE)(remove_contact)
add_contact = method(INTERFACE)(add_contact)
get_status = method(INTERFACE)(get_status)
get_status_message = method(INTERFACE)(get_status_message)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment