changeset 6145dada9635 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=6145dada9635
description: split long lines
diffstat:
src/common/gajim.py | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diffs (43 lines):
diff -r 59d9ae148726 -r 6145dada9635 src/common/gajim.py
--- a/src/common/gajim.py Sun Aug 12 22:04:20 2012 +0400
+++ b/src/common/gajim.py Thu Aug 16 20:22:29 2012 +0400
@@ -90,14 +90,19 @@
transport_type = {} # list the type of transport
last_message_time = {} # list of time of the latest incomming message
- # {acct1: {jid1: time1, jid2: time2}, }
-encrypted_chats = {} # list of encrypted chats {acct1: [jid1, jid2], ..}
+ # {acct1: {jid1: time1, jid2: time2}, }
+encrypted_chats = {} # list of encrypted chats {acct1: [jid1, jid2], ..}
contacts = LegacyContactsAPI()
-gc_connected = {} # tell if we are connected to the room or not {acct: {room_jid: True}}
-gc_passwords = {} # list of the pass required to enter a room {room_jid: password}
-automatic_rooms = {} # list of rooms that must be automaticaly configured and for which we have a list of invities {account: {room_jid: {'invities': []}}}
-new_room_nick = None # if it's != None, use this nick instead of asking for a new nickname when there is a conflict.
+gc_connected = {} # tell if we are connected to the room or not
+ # {acct: {room_jid: True}}
+gc_passwords = {} # list of the pass required to enter a room
+ # {room_jid: password}
+automatic_rooms = {} # list of rooms that must be automaticaly configured
+ # and for which we have a list of invities
+ #{account: {room_jid: {'invities': []}}}
+new_room_nick = None # if it's != None, use this nick instead of asking for
+ # a new nickname when there is a conflict.
groups = {} # list of groups
newly_added = {} # list of contacts that has just signed in
@@ -204,9 +209,10 @@
xmpp.NS_MUC, xmpp.NS_MUC_USER, xmpp.NS_MUC_ADMIN, xmpp.NS_MUC_OWNER,
xmpp.NS_MUC_CONFIG, xmpp.NS_COMMANDS, xmpp.NS_DISCO_INFO, 'ipv6',
'jabber:iq:gateway', xmpp.NS_LAST, xmpp.NS_PRIVACY, xmpp.NS_PRIVATE,
- xmpp.NS_REGISTER, xmpp.NS_VERSION, xmpp.NS_DATA, xmpp.NS_ENCRYPTED, 'msglog',
- 'sslc2s', 'stringprep', xmpp.NS_PING, xmpp.NS_TIME_REVISED, xmpp.NS_SSN,
- xmpp.NS_MOOD, xmpp.NS_ACTIVITY, xmpp.NS_NICK, xmpp.NS_ROSTERX, xmpp.NS_SECLABEL]
+ xmpp.NS_REGISTER, xmpp.NS_VERSION, xmpp.NS_DATA, xmpp.NS_ENCRYPTED,
+ 'msglog', 'sslc2s', 'stringprep', xmpp.NS_PING, xmpp.NS_TIME_REVISED,
+ xmpp.NS_SSN, xmpp.NS_MOOD, xmpp.NS_ACTIVITY, xmpp.NS_NICK,
+ xmpp.NS_ROSTERX, xmpp.NS_SECLABEL]
# Optional features gajim supports per account
gajim_optional_features = {}
changeset fe49adb8ec1c in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=fe49adb8ec1c
description: [Darlan and I].added the ability to restore the old tray icon (envelope).'trayicon_blink' in the ACE. Fixes #7176
diffstat:
src/common/config.py | 1 +
src/statusicon.py | 26 +++++++++++++++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
diffs (60 lines):
diff -r d0cfa7938e57 -r fe49adb8ec1c src/common/config.py
--- a/src/common/config.py Sun Aug 12 22:04:20 2012 +0400
+++ b/src/common/config.py Tue Aug 14 22:36:16 2012 +0400
@@ -207,6 +207,7 @@
'use_kib_mib': [opt_bool, False, _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.')],
'notify_on_all_muc_messages': [opt_bool, False],
'trayicon_notification_on_events': [opt_bool, True, _('Notify of events in the notification area.')],
+ 'trayicon_blink': [opt_bool, True, _('If False, Gajim will display a static event icon instead of the blinking status icon in the notification area when notifying on event.')],
'last_save_dir': [opt_str, ''],
'last_send_dir': [opt_str, ''],
'last_emoticons_dir': [opt_str, ''],
diff -r d0cfa7938e57 -r fe49adb8ec1c src/statusicon.py
--- a/src/statusicon.py Sun Aug 12 22:04:20 2012 +0400
+++ b/src/statusicon.py Tue Aug 14 22:36:16 2012 +0400
@@ -129,13 +129,28 @@
"""
Apart from image, we also update tooltip text here
"""
+ def really_set_img():
+ if image.get_storage_type() == gtk.IMAGE_PIXBUF:
+ self.status_icon.set_from_pixbuf(image.get_pixbuf())
+ # FIXME: oops they forgot to support GIF animation?
+ # or they were lazy to get it to work under Windows! WTF!
+ elif image.get_storage_type() == gtk.IMAGE_ANIMATION:
+ self.status_icon.set_from_pixbuf(
+ image.get_animation().get_static_image())
+ # self.status_icon.set_from_animation(image.get_animation())
+
if not gajim.interface.systray_enabled:
return
if gajim.config.get('trayicon') == 'always':
self.status_icon.set_visible(True)
if gajim.events.get_nb_systray_events():
self.status_icon.set_visible(True)
- self.status_icon.set_blinking(True)
+ if gajim.config.get('trayicon_blink'):
+ self.status_icon.set_blinking(True)
+ else:
+ image = gtkgui_helpers.load_icon('event')
+ really_set_img()
+ return
else:
if gajim.config.get('trayicon') == 'on_event':
self.status_icon.set_visible(False)
@@ -143,14 +158,7 @@
image = gajim.interface.jabber_state_images[self.statusicon_size][
self.status]
- if image.get_storage_type() == gtk.IMAGE_PIXBUF:
- self.status_icon.set_from_pixbuf(image.get_pixbuf())
- # FIXME: oops they forgot to support GIF animation?
- # or they were lazy to get it to work under Windows! WTF!
- elif image.get_storage_type() == gtk.IMAGE_ANIMATION:
- self.status_icon.set_from_pixbuf(
- image.get_animation().get_static_image())
- # self.img_tray.set_from_animation(image.get_animation())
+ really_set_img()
def change_status(self, global_status):
"""
changeset f0700c90c1dd in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=f0700c90c1dd
description: Add 'role' and 'affiliate' command to command system.
diffstat:
src/command_system/implementation/middleware.py | 2 +-
src/command_system/implementation/standard.py | 24 ++++++++++++++++++++++++
src/command_system/mapping.py | 8 ++++----
3 files changed, 29 insertions(+), 5 deletions(-)
diffs (85 lines):
diff -r 5b62751d4930 -r f0700c90c1dd src/command_system/implementation/middleware.py
--- a/src/command_system/implementation/middleware.py Fri Aug 10 10:43:02 2012 +0200
+++ b/src/command_system/implementation/middleware.py Sat Aug 11 14:59:05 2012 +0400
@@ -71,7 +71,7 @@
except CommandError, error:
self.echo_error("%s: %s" % (error.name, error.message))
except Exception:
- self.echo_error("Error during command execution!")
+ self.echo_error(_("Error during command execution!"))
print_exc()
else:
self.command_succeeded = True
diff -r 5b62751d4930 -r f0700c90c1dd src/command_system/implementation/standard.py
--- a/src/command_system/implementation/standard.py Fri Aug 10 10:43:02 2012 +0200
+++ b/src/command_system/implementation/standard.py Sat Aug 11 14:59:05 2012 +0400
@@ -347,6 +347,30 @@
raise CommandError(_("Nickname not found"))
self.connection.gc_set_role(self.room_jid, who, 'none', reason or str())
+ @command(raw=True)
+ @doc(_("""Set occupant role in group chat.
+ Role can be given as one of the following values:
+ moderator, participant, visitor, none"""))
+ def role(self, who, role):
+ if role not in ('moderator', 'participant', 'visitor', 'none'):
+ raise CommandError(_("Invalid role given"))
+ if not who in gajim.contacts.get_nick_list(self.account, self.room_jid):
+ raise CommandError(_("Nickname not found"))
+ self.connection.gc_set_role(self.room_jid, who, role)
+
+ @command(raw=True)
+ @doc(_("""Set occupant affiliation in group chat.
+ Affiliation can be given as one of the following values:
+ owner, admin, member, outcast, none"""))
+ def affiliate(self, who, affiliation):
+ if affiliation not in ('owner', 'admin', 'member', 'outcast', 'none'):
+ raise CommandError(_("Invalid affiliation given"))
+ if not who in gajim.contacts.get_nick_list(self.account, self.room_jid):
+ raise CommandError(_("Nickname not found"))
+ contact = gajim.contacts.get_gc_contact(self.account, self.room_jid, who)
+ self.connection.gc_set_affiliation(self.room_jid, contact.jid,
+ affiliation)
+
@command
@doc(_("Display names of all group chat occupants"))
def names(self, verbose=False):
diff -r 5b62751d4930 -r f0700c90c1dd src/command_system/mapping.py
--- a/src/command_system/mapping.py Fri Aug 10 10:43:02 2012 +0200
+++ b/src/command_system/mapping.py Sat Aug 11 14:59:05 2012 +0400
@@ -162,7 +162,7 @@
try:
stopper, (start, end) = args[spec_len - 2]
except IndexError:
- raise CommandError("Missing arguments", command)
+ raise CommandError(_("Missing arguments"), command)
# The essential point of the whole play. After
# boundaries are being determined (supposingly correct)
@@ -172,7 +172,7 @@
raw = raw.strip() or None
if not raw and not command.empty:
- raise CommandError("Missing arguments", command)
+ raise CommandError(_("Missing arguments"), command)
# Discard residual arguments and all of the options as
# raw command does not support options and if an option
@@ -192,7 +192,7 @@
if command.empty:
args.append((None, (0, 0)))
else:
- raise CommandError("Missing arguments", command)
+ raise CommandError(_("Missing arguments"), command)
# The first stage of transforming options we have got to a format
# that can be used to associate them with declared keyword
@@ -259,7 +259,7 @@
for arg, (spec_key, spec_value) in zip(overlapped, spec_kwargs):
opts.append((spec_key, arg))
else:
- raise CommandError("Excessive arguments", command)
+ raise CommandError(_("Excessive arguments"), command)
# Detect every switch and ensure it will not receive any arguments.
# Normally this does not happen unless overlapping is enabled.