Commit 0408b35c authored by Éric Araujo's avatar Éric Araujo

convert tabs to spaces in source code thanks to reindent.py

also use 2to3 -f ws_comma to fix some whitespace
parent d1a9a698
# coding=utf-8
emoticons = {
'smile.png': [':-)', ':)'],
'coolglasses.png': ['B-)', '(H)'],
'wink.gif': [';-)', ';)'],
'biggrin.png': [':-D', ':D'],
'unhappy.png': [':-(', ':('],
'cry.gif': [":'-(", ":'(", ';-(', ';(', ";'-("],
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
'blush.png': [':-$', ':$'],
'angry.png': [':-@', ':@'],
'bat.gif': [':-[', ':['],
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
'stare.png': [':-|', ':|'],
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
'oh.png': ['=-O', ':-O', ':O'],
'heart.png': ['<3', '(L)', '*IN LOVE*'],
'pussy.png': ['(@)'],
'cuffs.png': ['(%)'],
'moon.png': ['(S)'],
'lamp.png': ['(I)'],
'music.png': ['(8)'],
'beer.png': ['(B)', '*DRINK*'],
'brflower.png': ['(W)'],
'boy.png': ['(Z)'],
'girl.png': ['(X)'],
'mail.png': ['(E)'],
'thumbdown.png': ['(N)'],
'photo.png': ['(P)'],
'thumbup.png': ['(Y)', '*THUMBS UP*'],
'hugleft.png': ['(})'],
'brheart.png': ['</3', '(U)'],
'flower.png': ['@}->--', '(F)'],
'drink.png': ['(D)'],
'phone.png': ['(T)'],
'coffee.png': ['(C)'],
'hugright.png': ['({)'],
'star.png': ['(*)'],
'rainbow.png': ['(R)'],
'cigarette.gif': ['(ci)'],
'cake.gif': ['(^)'],
'dontknow.gif': [':^)'],
'eyeroll.gif': ['8-)'],
'lightning.gif': ['(li)'],
'party.gif': ['<:o)'],
'sleepy.gif': ['|-)'],
'think.gif': ['*-)'],
'puke.gif': [':-!'],
'smile.png': [':-)', ':)'],
'coolglasses.png': ['B-)', '(H)'],
'wink.gif': [';-)', ';)'],
'biggrin.png': [':-D', ':D'],
'unhappy.png': [':-(', ':('],
'cry.gif': [":'-(", ":'(", ';-(', ';(', ";'-("],
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
'blush.png': [':-$', ':$'],
'angry.png': [':-@', ':@'],
'bat.gif': [':-[', ':['],
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
'stare.png': [':-|', ':|'],
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
'oh.png': ['=-O', ':-O', ':O'],
'heart.png': ['<3', '(L)', '*IN LOVE*'],
'pussy.png': ['(@)'],
'cuffs.png': ['(%)'],
'moon.png': ['(S)'],
'lamp.png': ['(I)'],
'music.png': ['(8)'],
'beer.png': ['(B)', '*DRINK*'],
'brflower.png': ['(W)'],
'boy.png': ['(Z)'],
'girl.png': ['(X)'],
'mail.png': ['(E)'],
'thumbdown.png': ['(N)'],
'photo.png': ['(P)'],
'thumbup.png': ['(Y)', '*THUMBS UP*'],
'hugleft.png': ['(})'],
'brheart.png': ['</3', '(U)'],
'flower.png': ['@}->--', '(F)'],
'drink.png': ['(D)'],
'phone.png': ['(T)'],
'coffee.png': ['(C)'],
'hugright.png': ['({)'],
'star.png': ['(*)'],
'rainbow.png': ['(R)'],
'cigarette.gif': ['(ci)'],
'cake.gif': ['(^)'],
'dontknow.gif': [':^)'],
'eyeroll.gif': ['8-)'],
'lightning.gif': ['(li)'],
'party.gif': ['<:o)'],
'sleepy.gif': ['|-)'],
'think.gif': ['*-)'],
'puke.gif': [':-!'],
}
# vim: se ts=3:
# coding=utf-8
emoticons = {
'smile.png': [':-)', ':)'],
'coolglasses.png': ['8-)', 'B-)', '(H)'],
'wink.png': [';-)', ';)'],
'biggrin.png': [':-D', ':D'],
'unhappy.png': [':-(', ':('],
'cry.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
'blush.png': [':-$', ':$'],
'angry.png': [':-@', ':@'],
'bat.png': [':-[', ':['],
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
'stare.png': [':-|', ':|'],
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
'oh.png': ['=-O', ':-O', ':O'],
'heart.png': ['<3', '(L)', '*IN LOVE*'],
'lion.png': [':3', '>:3'],
'pussy.png': ['(@)', '=^.^='],
'cuffs.png': ['(%)'],
'moon.png': ['(S)'],
'lamp.png': ['(I)'],
'music.png': ['(8)'],
'beer.png': ['(B)', '*DRINK*'],
'brflower.png': ['(W)'],
'boy.png': ['(Z)'],
'girl.png': ['(X)'],
'mail.png': ['(E)'],
'thumbdown.png': ['(N)'],
'photo.png': ['(P)'],
'thumbup.png': ['(Y)', '*THUMBS UP*'],
'hugleft.png': ['(})'],
'brheart.png': ['</3', '(U)'],
'flower.png': ['@}->--', '(F)'],
'drink.png': ['(D)'],
'phone.png': ['(T)'],
'coffee.png': ['(C)'],
'hugright.png': ['({)'],
'star.png': ['(*)'],
'rainbow.png': ['(R)'],
'puke.png': [':-!'],
'smile.png': [':-)', ':)'],
'coolglasses.png': ['8-)', 'B-)', '(H)'],
'wink.png': [';-)', ';)'],
'biggrin.png': [':-D', ':D'],
'unhappy.png': [':-(', ':('],
'cry.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
'blush.png': [':-$', ':$'],
'angry.png': [':-@', ':@'],
'bat.png': [':-[', ':['],
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
'stare.png': [':-|', ':|'],
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
'oh.png': ['=-O', ':-O', ':O'],
'heart.png': ['<3', '(L)', '*IN LOVE*'],
'lion.png': [':3', '>:3'],
'pussy.png': ['(@)', '=^.^='],
'cuffs.png': ['(%)'],
'moon.png': ['(S)'],
'lamp.png': ['(I)'],
'music.png': ['(8)'],
'beer.png': ['(B)', '*DRINK*'],
'brflower.png': ['(W)'],
'boy.png': ['(Z)'],
'girl.png': ['(X)'],
'mail.png': ['(E)'],
'thumbdown.png': ['(N)'],
'photo.png': ['(P)'],
'thumbup.png': ['(Y)', '*THUMBS UP*'],
'hugleft.png': ['(})'],
'brheart.png': ['</3', '(U)'],
'flower.png': ['@}->--', '(F)'],
'drink.png': ['(D)'],
'phone.png': ['(T)'],
'coffee.png': ['(C)'],
'hugright.png': ['({)'],
'star.png': ['(*)'],
'rainbow.png': ['(R)'],
'puke.png': [':-!'],
}
# vim: se ts=3:
# coding=utf-8
emoticons = {
'smile.png': [':-)', ':)'],
'coolglasses.png': ['8-)', 'B-)', '(H)'],
'wink.png': [';-)', ';)'],
'biggrin.png': [':-D', ':D'],
'unhappy.png': [':-(', ':('],
'cry.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
'blush.png': [':-$', ':$'],
'angry.png': [':-@', ':@'],
'bat.png': [':-[', ':['],
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
'stare.png': [':-|', ':|'],
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
'oh.png': ['=-O', ':-O', ':O'],
'heart.png': ['<3', '(L)', '*IN LOVE*'],
'lion.png': [':3', '>:3'],
'pussy.png': ['(@)', '=^.^='],
'cuffs.png': ['(%)'],
'moon.png': ['(S)'],
'lamp.png': ['(I)'],
'music.png': ['(8)'],
'beer.png': ['(B)', '*DRINK*'],
'brflower.png': ['(W)'],
'boy.png': ['(Z)'],
'girl.png': ['(X)'],
'mail.png': ['(E)'],
'thumbdown.png': ['(N)'],
'photo.png': ['(P)'],
'thumbup.png': ['(Y)', '*THUMBS UP*'],
'hugleft.png': ['(})'],
'brheart.png': ['</3', '(U)'],
'flower.png': ['@}->--', '(F)'],
'drink.png': ['(D)'],
'phone.png': ['(T)'],
'coffee.png': ['(C)'],
'hugright.png': ['({)'],
'star.png': ['(*)'],
'rainbow.png': ['(R)'],
'puke.png': [':-!'],
'smile.png': [':-)', ':)'],
'coolglasses.png': ['8-)', 'B-)', '(H)'],
'wink.png': [';-)', ';)'],
'biggrin.png': [':-D', ':D'],
'unhappy.png': [':-(', ':('],
'cry.png': [":'-(", ":'(", ';-(', ';(', ";'-("],
'frowning.png': [':-/', ':/', ':-\\', ':\\', ':-S', ':S'],
'blush.png': [':-$', ':$'],
'angry.png': [':-@', ':@'],
'bat.png': [':-[', ':['],
'kiss.png': [':-{}', ':-*', ':*', '(K)'],
'stare.png': [':-|', ':|'],
'devil.png': [']:->', '>:-)', '>:)', '(6)'],
'tongue.png': [':-P', ':P', ':-þ', ':þ'],
'oh.png': ['=-O', ':-O', ':O'],
'heart.png': ['<3', '(L)', '*IN LOVE*'],
'lion.png': [':3', '>:3'],
'pussy.png': ['(@)', '=^.^='],
'cuffs.png': ['(%)'],
'moon.png': ['(S)'],
'lamp.png': ['(I)'],
'music.png': ['(8)'],
'beer.png': ['(B)', '*DRINK*'],
'brflower.png': ['(W)'],
'boy.png': ['(Z)'],
'girl.png': ['(X)'],
'mail.png': ['(E)'],
'thumbdown.png': ['(N)'],
'photo.png': ['(P)'],
'thumbup.png': ['(Y)', '*THUMBS UP*'],
'hugleft.png': ['(})'],
'brheart.png': ['</3', '(U)'],
'flower.png': ['@}->--', '(F)'],
'drink.png': ['(D)'],
'phone.png': ['(T)'],
'coffee.png': ['(C)'],
'hugright.png': ['({)'],
'star.png': ['(*)'],
'rainbow.png': ['(R)'],
'puke.png': [':-!'],
}
# vim: se ts=3:
......@@ -49,4 +49,4 @@ emoticons = {
'pissed-off.png': ['*WALL*'],
'mail.png': ['*WRITE*', '(E)'],
'tremble.png': ['*SCRATCH*'],
}
\ No newline at end of file
}
......@@ -4,19 +4,16 @@ import os
import sys
if os.getcwd().endswith('dev'):
os.chdir('../../') # we were in scripts/dev
os.chdir('../../') # we were in scripts/dev
ret = 0
ret += os.system("make clean > " + os.devnull)
ret += os.system("make > " + os.devnull)
ret += os.system("make > " + os.devnull)
ret += os.system("make check > " + os.devnull)
if ret == 0:
print "Build successfull"
sys.exit(0)
print "Build successfull"
sys.exit(0)
else:
print >>sys.stderr, "Build failed"
sys.exit(1)
# vim: se ts=3:
print >>sys.stderr, "Build failed"
sys.exit(1)
......@@ -5,9 +5,7 @@ import os
import sys
if os.getcwd().endswith('dev'):
os.chdir('../../src/') # we were in scripts/dev
os.chdir('../../src/') # we were in scripts/dev
os.system("pylint --indent-string='\t' --additional-builtins='_' --disable-msg=C0111,C0103,C0111,C0112 --disable-checker=design " + "".join(sys.argv[1:]))
# vim: se ts=3:
......@@ -54,39 +54,34 @@ opts = {
# ConfigParser,UserString,roman are needed for docutils
'includes': 'pango,atk,gobject,cairo,pangocairo,gtk.keysyms,encodings,encodings.*,ConfigParser,UserString',
'dll_excludes': [
'iconv.dll','intl.dll','libatk-1.0-0.dll',
'libgdk_pixbuf-2.0-0.dll','libgdk-win32-2.0-0.dll',
'libglib-2.0-0.dll','libgmodule-2.0-0.dll',
'libgobject-2.0-0.dll','libgthread-2.0-0.dll',
'libgtk-win32-2.0-0.dll','libpango-1.0-0.dll',
'libpangowin32-1.0-0.dll','libcairo-2.dll',
'libpangocairo-1.0-0.dll','libpangoft2-1.0-0.dll',
'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll',
'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll',
'libglib-2.0-0.dll', 'libgmodule-2.0-0.dll',
'libgobject-2.0-0.dll', 'libgthread-2.0-0.dll',
'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll',
'libpangowin32-1.0-0.dll', 'libcairo-2.dll',
'libpangocairo-1.0-0.dll', 'libpangoft2-1.0-0.dll',
],
'excludes': [
'docutils'
],
'optimize': 2,
'optimize': 2,
}
}
setup(
name = 'Gajim',
version = '0.12.1',
description = 'A full featured Jabber client',
author = 'Gajim Development Team',
url = 'http://www.gajim.org/',
download_url = 'http://www.gajim.org/downloads.php',
license = 'GPL',
windows = [{'script': 'src/gajim.py',
'icon_resources': [(1, 'data/pixmaps/gajim.ico')]},
{'script': 'src/history_manager.py',
'icon_resources': [(1, 'data/pixmaps/gajim.ico')]}],
name='Gajim',
version='0.12.1',
description='A full featured Jabber client',
author='Gajim Development Team',
url='http://www.gajim.org/',
download_url='http://www.gajim.org/downloads.php',
license='GPL',
windows=[{'script': 'src/gajim.py',
'icon_resources': [(1, 'data/pixmaps/gajim.ico')]},
{'script': 'src/history_manager.py',
'icon_resources': [(1, 'data/pixmaps/gajim.ico')]}],
options=opts,
data_files=docutils_files,
)
# vim: se ts=3:
This diff is collapsed.
This diff is collapsed.
......@@ -30,121 +30,119 @@ from common import helpers
from common import i18n
class AtomWindow:
window = None
entries = []
@classmethod
def newAtomEntry(cls, entry):
"""
Queue new entry, open window if there's no one opened
"""
cls.entries.append(entry)
if cls.window is None:
cls.window = AtomWindow()
else:
cls.window.updateCounter()
@classmethod
def windowClosed(cls):
cls.window = None
def __init__(self):
"""
Create new window... only if we have anything to show
"""
assert len(self.__class__.entries)>0
self.entry = None # the entry actually displayed
self.xml = gtkgui_helpers.get_glade('atom_entry_window.glade')
self.window = self.xml.get_widget('atom_entry_window')
for name in ('new_entry_label', 'feed_title_label', 'feed_title_eventbox',
'feed_tagline_label', 'entry_title_label', 'entry_title_eventbox',
'last_modified_label', 'close_button', 'next_button'):
self.__dict__[name] = self.xml.get_widget(name)
self.displayNextEntry()
self.xml.signal_autoconnect(self)
self.window.show_all()
self.entry_title_eventbox.add_events(gtk.gdk.BUTTON_PRESS_MASK)
self.feed_title_eventbox.add_events(gtk.gdk.BUTTON_PRESS_MASK)
def displayNextEntry(self):
"""
Get next entry from the queue and display it in the window
"""
assert len(self.__class__.entries)>0
newentry = self.__class__.entries.pop(0)
# fill the fields
if newentry.feed_link is not None:
self.feed_title_label.set_markup(
u'<span foreground="blue" underline="single">%s</span>' % \
gobject.markup_escape_text(newentry.feed_title))
else:
self.feed_title_label.set_markup(
gobject.markup_escape_text(newentry.feed_title))
self.feed_tagline_label.set_markup(
u'<small>%s</small>' % \
gobject.markup_escape_text(newentry.feed_tagline))
if newentry.uri is not None:
self.entry_title_label.set_markup(
u'<span foreground="blue" underline="single">%s</span>' % \
gobject.markup_escape_text(newentry.title))
else:
self.entry_title_label.set_markup(
gobject.markup_escape_text(newentry.title))
self.last_modified_label.set_text(newentry.updated)
# update the counters
self.updateCounter()
self.entry = newentry
def updateCounter(self):
"""
Display number of events on the top of window, sometimes it needs to be
changed
"""
count = len(self.__class__.entries)
if count>0:
self.new_entry_label.set_text(i18n.ngettext(
'You have received new entries (and %d not displayed):',
'You have received new entries (and %d not displayed):', count,
count, count))
self.next_button.set_sensitive(True)
else:
self.new_entry_label.set_text(_('You have received new entry:'))
self.next_button.set_sensitive(False)
def on_close_button_clicked(self, widget):
self.window.destroy()
self.windowClosed()
def on_next_button_clicked(self, widget):
self.displayNextEntry()
def on_entry_title_button_press_event(self, widget, event):
#FIXME: make it using special gtk2.10 widget
if event.button == 1: # left click
uri = self.entry.uri
if uri is not None:
helpers.launch_browser_mailer('url', uri)
return True
def on_feed_title_button_press_event(self, widget, event):
#FIXME: make it using special gtk2.10 widget
if event.button == 1: # left click
uri = self.entry.feed_uri
if uri is not None:
helpers.launch_browser_mailer('url', uri)
return True
# vim: se ts=3:
window = None
entries = []
@classmethod
def newAtomEntry(cls, entry):
"""
Queue new entry, open window if there's no one opened
"""
cls.entries.append(entry)
if cls.window is None:
cls.window = AtomWindow()
else:
cls.window.updateCounter()
@classmethod
def windowClosed(cls):
cls.window = None
def __init__(self):
"""
Create new window... only if we have anything to show
"""
assert len(self.__class__.entries)>0
self.entry = None # the entry actually displayed
self.xml = gtkgui_helpers.get_glade('atom_entry_window.glade')
self.window = self.xml.get_widget('atom_entry_window')
for name in ('new_entry_label', 'feed_title_label', 'feed_title_eventbox',
'feed_tagline_label', 'entry_title_label', 'entry_title_eventbox',
'last_modified_label', 'close_button', 'next_button'):
self.__dict__[name] = self.xml.get_widget(name)
self.displayNextEntry()
self.xml.signal_autoconnect(self)
self.window.show_all()
self.entry_title_eventbox.add_events(gtk.gdk.BUTTON_PRESS_MASK)
self.feed_title_eventbox.add_events(gtk.gdk.BUTTON_PRESS_MASK)
def displayNextEntry(self):
"""
Get next entry from the queue and display it in the window
"""
assert len(self.__class__.entries)>0
newentry = self.__class__.entries.pop(0)
# fill the fields
if newentry.feed_link is not None:
self.feed_title_label.set_markup(
u'<span foreground="blue" underline="single">%s</span>' % \
gobject.markup_escape_text(newentry.feed_title))
else:
self.feed_title_label.set_markup(
gobject.markup_escape_text(newentry.feed_title))
self.feed_tagline_label.set_markup(
u'<small>%s</small>' % \
gobject.markup_escape_text(newentry.feed_tagline))
if newentry.uri is not None:
self.entry_title_label.set_markup(
u'<span foreground="blue" underline="single">%s</span>' % \
gobject.markup_escape_text(newentry.title))
else:
self.entry_title_label.set_markup(
gobject.markup_escape_text(newentry.title))
self.last_modified_label.set_text(newentry.updated)
# update the counters
self.updateCounter()
self.entry = newentry
def updateCounter(self):
"""
Display number of events on the top of window, sometimes it needs to be
changed
"""
count = len(self.__class__.entries)
if count>0:
self.new_entry_label.set_text(i18n.ngettext(
'You have received new entries (and %d not displayed):',
'You have received new entries (and %d not displayed):', count,
count, count))
self.next_button.set_sensitive(True)
else:
self.new_entry_label.set_text(_('You have received new entry:'))
self.next_button.set_sensitive(False)
def on_close_button_clicked(self, widget):
self.window.destroy()
self.windowClosed()
def on_next_button_clicked(self, widget):
self.displayNextEntry()
def on_entry_title_button_press_event(self, widget, event):
#FIXME: make it using special gtk2.10 widget
if event.button == 1: # left click
uri = self.entry.uri
if uri is not None:
helpers.launch_browser_mailer('url', uri)
return True
def on_feed_title_button_press_event(self, widget, event):
#FIXME: make it using special gtk2.10 widget
if event.button == 1: # left click
uri = self.entry.feed_uri
if uri is not None:
helpers.launch_browser_mailer('url', uri)
return True
......@@ -27,113 +27,111 @@ import gobject
class CellRendererImage(gtk.GenericCellRenderer):
__gproperties__ = {
'image': (gobject.TYPE_OBJECT, 'Image',
'Image', gobject.PARAM_READWRITE),
}
def __init__(self, col_index, tv_index):
self.__gobject_init__()
self.image = None
self.col_index = col_index
self.tv_index = tv_index
self.iters = {}
def do_set_property(self, pspec, value):
setattr(self, pspec.name, value)
def do_get_property(self, pspec):
return getattr(self, pspec.name)
def func(self, model, path, iter_, image_tree):
image, tree = image_tree
if model.get_value(iter_, self.tv_index) != image:
return
self.redraw = 1
col = tree.get_column(self.col_index)
cell_area = tree.get_cell_area(path, col)
tree.queue_draw_area(cell_area.x, cell_area.y,
cell_area.width, cell_area.height)