ImageCellRenderer has now better name, gajim.py --> gajim.sh [needs fix to makefile to make it work, padding and xalign trying to clean up (don't work yet). added a fixme in new message dialog about focus problems..
This commit is contained in:
parent
ce6f724620
commit
610bc35b22
14 changed files with 168 additions and 165 deletions
6
Makefile
6
Makefile
|
@ -1,10 +1,10 @@
|
||||||
VERSION ?= 0.6
|
VERSION ?= 0.6.1
|
||||||
|
|
||||||
MODULES = common plugins/gtkgui
|
MODULES = common plugins/gtkgui
|
||||||
PREFIX = /usr
|
PREFIX = /usr
|
||||||
DESTDIR = /
|
DESTDIR = /
|
||||||
|
|
||||||
FIND = find -regex '.*\.\(\(glade\)\|\(py\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)'
|
FIND = find -regex '.*\.\(\(glade\)\|\(py\)\|\(sh\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)'
|
||||||
FILES = `$(FIND)`
|
FILES = `$(FIND)`
|
||||||
DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
||||||
FIND_LIB = find -regex '.*\.\(so\)'
|
FIND_LIB = find -regex '.*\.\(so\)'
|
||||||
|
@ -37,7 +37,7 @@ dist:
|
||||||
-rm -rf gajim-$(VERSION)
|
-rm -rf gajim-$(VERSION)
|
||||||
mkdir gajim-$(VERSION)
|
mkdir gajim-$(VERSION)
|
||||||
cp -r plugins scripts common Core doc Messages sounds gajim-$(VERSION)/
|
cp -r plugins scripts common Core doc Messages sounds gajim-$(VERSION)/
|
||||||
cp setup_win32.py gajim.iss AUTHORS gajim.1 gajim.xpm gajim.ico COPYING Makefile Changelog README gajim.py gajim-$(VERSION)
|
cp setup_win32.py gajim.iss AUTHORS gajim.1 gajim.xpm gajim.ico COPYING Makefile Changelog README gajim.sh gajim-$(VERSION)
|
||||||
-find gajim-$(VERSION) -name '.svn' -exec rm -rf {} \; 2> /dev/null
|
-find gajim-$(VERSION) -name '.svn' -exec rm -rf {} \; 2> /dev/null
|
||||||
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
|
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
|
||||||
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
|
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
|
||||||
|
|
16
PKGBUILD
16
PKGBUILD
|
@ -9,10 +9,22 @@ url="http://www.gajim.org"
|
||||||
license="GPL"
|
license="GPL"
|
||||||
depends=(pygtk)
|
depends=(pygtk)
|
||||||
source=($url/downloads/$pkgname-$pkgver.tar.bz2)
|
source=($url/downloads/$pkgname-$pkgver.tar.bz2)
|
||||||
md5sums=(8175a3ccf93093f23865baebe4fa82f8)
|
#md5sums=(8175a3ccf93093f23865baebe4fa82f8)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $startdir/src/$pkgname-$pkgver
|
cd $startdir/src/$pkgname-$pkgver
|
||||||
make || return 1
|
|
||||||
|
echo "making trayicon..."
|
||||||
|
make trayicon || return 1 #remove this if you have gnome-python-extras
|
||||||
|
echo "done."
|
||||||
|
|
||||||
|
echo "making idle detection..."
|
||||||
|
make idle || return 1
|
||||||
|
echo "done."
|
||||||
|
|
||||||
|
echo "making translations..."
|
||||||
|
make translation || return 1
|
||||||
|
echo "done."
|
||||||
|
|
||||||
make DESTDIR=$startdir/pkg install
|
make DESTDIR=$startdir/pkg install
|
||||||
}
|
}
|
||||||
|
|
5
README
5
README
|
@ -21,8 +21,8 @@ make install # as superuser
|
||||||
RUN GAJIM
|
RUN GAJIM
|
||||||
gajim
|
gajim
|
||||||
|
|
||||||
or if you don't 'make install' you can also run from gajim folder with
|
or if you didn't 'make install' you can also run from gajim folder with
|
||||||
./gajim.py
|
./gajim.sh
|
||||||
|
|
||||||
TROUBLESHOOTING
|
TROUBLESHOOTING
|
||||||
If you have python2.3 please manually edit plugins/gtkgui/Makefile and in
|
If you have python2.3 please manually edit plugins/gtkgui/Makefile and in
|
||||||
|
@ -40,4 +40,3 @@ http://gajim.org
|
||||||
PS.
|
PS.
|
||||||
sounds & emoticons taken from Psi
|
sounds & emoticons taken from Psi
|
||||||
gossip iconstyle taken from Imendio Gossip
|
gossip iconstyle taken from Imendio Gossip
|
||||||
thanks to Alex Podaras for various code contributions
|
|
||||||
|
|
6
debian/rules
vendored
6
debian/rules
vendored
|
@ -28,9 +28,9 @@ install-stamp: build-stamp
|
||||||
cd debian/tmp && install -d `cat ../dirs`
|
cd debian/tmp && install -d `cat ../dirs`
|
||||||
make install PREFIX=/usr DESTDIR=`pwd`/debian/tmp
|
make install PREFIX=/usr DESTDIR=`pwd`/debian/tmp
|
||||||
cp gajim.xpm debian/tmp/usr/share/pixmaps
|
cp gajim.xpm debian/tmp/usr/share/pixmaps
|
||||||
chmod -x debian/tmp/usr/share/gajim/gajim.py
|
chmod -x debian/tmp/usr/share/gajim/gajim.sh
|
||||||
sed -ne '1d;w debian/tmp/gajim.py.tmp' debian/tmp/usr/share/gajim/gajim.py
|
sed -ne '1d;w debian/tmp/gajim.sh.tmp' debian/tmp/usr/share/gajim/gajim.sh
|
||||||
mv debian/tmp/gajim.py.tmp debian/tmp/usr/share/gajim/gajim.py
|
mv debian/tmp/gajim.sh.tmp debian/tmp/usr/share/gajim/gajim.sh
|
||||||
|
|
||||||
binary-indep: checkroot build
|
binary-indep: checkroot build
|
||||||
$(checkdir)
|
$(checkdir)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppName=Gajim
|
AppName=Gajim
|
||||||
AppVerName=Gajim version 0.6
|
AppVerName=Gajim version 0.6.1
|
||||||
DefaultDirName={pf}\Gajim
|
DefaultDirName={pf}\Gajim
|
||||||
DefaultGroupName=Gajim
|
DefaultGroupName=Gajim
|
||||||
UninstallDisplayIcon={app}\Gajim.exe
|
UninstallDisplayIcon={app}\Gajim.exe
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/python -tt
|
#!/bin/sh
|
||||||
## gajim.py
|
''':'
|
||||||
|
exec python -OOtt "$0" ${1+"$@"}
|
||||||
|
' '''
|
||||||
##
|
##
|
||||||
## Gajim Team:
|
## Gajim Team:
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||||
|
@ -55,3 +57,5 @@ signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
|
||||||
Core.core.start(mode)
|
Core.core.start(mode)
|
||||||
print _("Core Stopped")
|
print _("Core Stopped")
|
||||||
|
|
||||||
|
|
|
@ -622,11 +622,6 @@ class Preferences_window:
|
||||||
if event.keyval == gtk.keysyms.Delete:
|
if event.keyval == gtk.keysyms.Delete:
|
||||||
self.on_button_remove_emoticon_clicked(widget)
|
self.on_button_remove_emoticon_clicked(widget)
|
||||||
|
|
||||||
def sound_is_ok(self, sound):
|
|
||||||
if not os.path.exists(sound):
|
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
def sound_toggled_cb(self, cell, path):
|
def sound_toggled_cb(self, cell, path):
|
||||||
model = self.sound_tree.get_model()
|
model = self.sound_tree.get_model()
|
||||||
model[path][1] = not model[path][1]
|
model[path][1] = not model[path][1]
|
||||||
|
@ -685,7 +680,7 @@ class Preferences_window:
|
||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
if response == gtk.RESPONSE_OK:
|
if response == gtk.RESPONSE_OK:
|
||||||
file = dialog.get_filename()
|
file = dialog.get_filename()
|
||||||
if self.sound_is_ok(file):
|
if os.path.exists(file):
|
||||||
ok = 1
|
ok = 1
|
||||||
else:
|
else:
|
||||||
ok = 1
|
ok = 1
|
||||||
|
@ -836,7 +831,7 @@ class Preferences_window:
|
||||||
|
|
||||||
col = gtk.TreeViewColumn(_('Image'))
|
col = gtk.TreeViewColumn(_('Image'))
|
||||||
self.emot_tree.append_column(col)
|
self.emot_tree.append_column(col)
|
||||||
renderer = gtkgui.ImageCellRenderer()
|
renderer = gtkgui.CellRendererImage()
|
||||||
col.pack_start(renderer, expand = False)
|
col.pack_start(renderer, expand = False)
|
||||||
col.add_attribute(renderer, 'image', 2)
|
col.add_attribute(renderer, 'image', 2)
|
||||||
|
|
||||||
|
|
|
@ -541,7 +541,7 @@ class About_dialog:
|
||||||
dlg.set_comments(_('A GTK jabber client'))
|
dlg.set_comments(_('A GTK jabber client'))
|
||||||
dlg.set_website('http://www.gajim.org')
|
dlg.set_website('http://www.gajim.org')
|
||||||
|
|
||||||
authors = ['Yann Le Boulanger <asterix@lagaule.org>', 'Vincent Hanquez <tab@snarc.org>', 'Nikos Kouremenos <kourem@gmail.com>']
|
authors = ['Yann Le Boulanger <asterix@lagaule.org>', 'Vincent Hanquez <tab@snarc.org>', 'Nikos Kouremenos <kourem@gmail.com>', 'Alex Podaras <bigpod@gmail.com>']
|
||||||
dlg.set_authors(authors)
|
dlg.set_authors(authors)
|
||||||
dlg.set_logo(gtk.gdk.pixbuf_new_from_file('plugins/gtkgui/pixmaps/logo.png'))
|
dlg.set_logo(gtk.gdk.pixbuf_new_from_file('plugins/gtkgui/pixmaps/logo.png'))
|
||||||
dlg.set_translator_credits(_('translator_credits'))
|
dlg.set_translator_credits(_('translator_credits'))
|
||||||
|
@ -689,6 +689,7 @@ class New_message_dialog:
|
||||||
self.plugin.roster.new_chat(user, self.account)
|
self.plugin.roster.new_chat(user, self.account)
|
||||||
self.plugin.windows[self.account]['chats'][jid].active_tab(jid)
|
self.plugin.windows[self.account]['chats'][jid].active_tab(jid)
|
||||||
self.plugin.windows[self.account]['chats'][jid].window.present()
|
self.plugin.windows[self.account]['chats'][jid].window.present()
|
||||||
|
#FIXME: PROBLEM WITH FOCUS
|
||||||
|
|
||||||
widget.get_toplevel().destroy()
|
widget.get_toplevel().destroy()
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ import time
|
||||||
|
|
||||||
from dialogs import *
|
from dialogs import *
|
||||||
from chat import *
|
from chat import *
|
||||||
from gtkgui import ImageCellRenderer
|
from gtkgui import CellRendererImage
|
||||||
|
|
||||||
from common import i18n
|
from common import i18n
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ class Groupchat_window(Chat):
|
||||||
#status_image, nickname, real_jid, status
|
#status_image, nickname, real_jid, status
|
||||||
store = gtk.TreeStore(gtk.Image, str, str, str)
|
store = gtk.TreeStore(gtk.Image, str, str, str)
|
||||||
column = gtk.TreeViewColumn('contacts')
|
column = gtk.TreeViewColumn('contacts')
|
||||||
render_text = ImageCellRenderer()
|
render_text = CellRendererImage()
|
||||||
column.pack_start(render_text, expand = False)
|
column.pack_start(render_text, expand = False)
|
||||||
column.add_attribute(render_text, 'image', 0)
|
column.add_attribute(render_text, 'image', 0)
|
||||||
render_text = gtk.CellRendererText()
|
render_text = gtk.CellRendererText()
|
||||||
|
|
|
@ -2623,7 +2623,6 @@
|
||||||
<widget class="GtkButton" id="close_button">
|
<widget class="GtkButton" id="close_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="has_default">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label">gtk-close</property>
|
<property name="label">gtk-close</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
|
|
|
@ -57,7 +57,7 @@ import Queue
|
||||||
import sre
|
import sre
|
||||||
import common.sleepy
|
import common.sleepy
|
||||||
|
|
||||||
class ImageCellRenderer(gtk.GenericCellRenderer):
|
class CellRendererImage(gtk.GenericCellRenderer):
|
||||||
|
|
||||||
__gproperties__ = {
|
__gproperties__ = {
|
||||||
"image": (gobject.TYPE_OBJECT, "Image",
|
"image": (gobject.TYPE_OBJECT, "Image",
|
||||||
|
@ -149,7 +149,7 @@ class ImageCellRenderer(gtk.GenericCellRenderer):
|
||||||
calc_height - self.get_property("ypad"))
|
calc_height - self.get_property("ypad"))
|
||||||
return x_offset, y_offset, calc_width, calc_height
|
return x_offset, y_offset, calc_width, calc_height
|
||||||
|
|
||||||
gobject.type_register(ImageCellRenderer)
|
gobject.type_register(CellRendererImage)
|
||||||
|
|
||||||
class User:
|
class User:
|
||||||
"""Information concerning each users"""
|
"""Information concerning each users"""
|
||||||
|
@ -806,8 +806,8 @@ class plugin:
|
||||||
'ask_online_status':0,\
|
'ask_online_status':0,\
|
||||||
'ask_offline_status':0,\
|
'ask_offline_status':0,\
|
||||||
'last_msg':'',\
|
'last_msg':'',\
|
||||||
'msg0_name':'Online',\
|
'msg0_name':'Nap',\
|
||||||
'msg0':'Yep I\'m online.',\
|
'msg0':'I\'m taking a nap.',\
|
||||||
'msg1_name':'Brb',\
|
'msg1_name':'Brb',\
|
||||||
'msg1':'Back in some minutes.',\
|
'msg1':'Back in some minutes.',\
|
||||||
'msg2_name':'Eating',\
|
'msg2_name':'Eating',\
|
||||||
|
@ -816,10 +816,6 @@ class plugin:
|
||||||
'msg3':'I\'m watching a movie.',\
|
'msg3':'I\'m watching a movie.',\
|
||||||
'msg4_name':'Working',\
|
'msg4_name':'Working',\
|
||||||
'msg4':'I\'m working.',\
|
'msg4':'I\'m working.',\
|
||||||
'msg5_name':'Nap',\
|
|
||||||
'msg5':'I\'m taking a nap.',\
|
|
||||||
'msg6_name':'Offline',\
|
|
||||||
'msg6':'I\'m offline.',\
|
|
||||||
'trayicon':1,\
|
'trayicon':1,\
|
||||||
'iconset':'sun',\
|
'iconset':'sun',\
|
||||||
'inmsgcolor':'#ff0000',\
|
'inmsgcolor':'#ff0000',\
|
||||||
|
|
|
@ -28,7 +28,7 @@ import common.sleepy
|
||||||
from tabbed_chat_window import *
|
from tabbed_chat_window import *
|
||||||
from groupchat_window import *
|
from groupchat_window import *
|
||||||
from history_window import *
|
from history_window import *
|
||||||
from gtkgui import ImageCellRenderer, User
|
from gtkgui import CellRendererImage, User
|
||||||
from dialogs import *
|
from dialogs import *
|
||||||
from config import *
|
from config import *
|
||||||
|
|
||||||
|
@ -651,9 +651,10 @@ class Roster_window:
|
||||||
iter = model.get_iter(path)
|
iter = model.get_iter(path)
|
||||||
type = model.get_value(iter, 2)
|
type = model.get_value(iter, 2)
|
||||||
if (type == 'group' or type == 'account'):
|
if (type == 'group' or type == 'account'):
|
||||||
# The integer 30 is the width of the first CellRenderer (see
|
print self.tree.get_columns()
|
||||||
# iconCellDataFunc function)
|
print column
|
||||||
if x <= 30:
|
#self.tree.get_column(0)
|
||||||
|
if column == self.tree.get_column(0): # if first column (the one that has \/
|
||||||
if (self.tree.row_expanded(path)):
|
if (self.tree.row_expanded(path)):
|
||||||
self.tree.collapse_row(path)
|
self.tree.collapse_row(path)
|
||||||
else:
|
else:
|
||||||
|
@ -693,7 +694,7 @@ class Roster_window:
|
||||||
model.set_value(accountIter, 0, self.pixbufs['offline'])
|
model.set_value(accountIter, 0, self.pixbufs['offline'])
|
||||||
self.plugin.connected[account] = 0
|
self.plugin.connected[account] = 0
|
||||||
self.plugin.systray.set_status('offline')
|
self.plugin.systray.set_status('offline')
|
||||||
self.set_cb()
|
self.update_status_comboxbox()
|
||||||
return
|
return
|
||||||
self.plugin.send('PASSPHRASE', account, passphrase)
|
self.plugin.send('PASSPHRASE', account, passphrase)
|
||||||
if save:
|
if save:
|
||||||
|
@ -749,21 +750,21 @@ class Roster_window:
|
||||||
return
|
return
|
||||||
self.send_status(account, status, message)
|
self.send_status(account, status, message)
|
||||||
|
|
||||||
def on_cb_changed(self, widget):
|
def on_status_combobox_changed(self, widget):
|
||||||
"""When we change our status"""
|
"""When we change our status"""
|
||||||
model = self.cb.get_model()
|
model = self.status_combobox.get_model()
|
||||||
active = self.cb.get_active()
|
active = self.status_combobox.get_active()
|
||||||
if active < 0:
|
if active < 0:
|
||||||
return
|
return
|
||||||
accounts = self.plugin.accounts.keys()
|
accounts = self.plugin.accounts.keys()
|
||||||
if len(accounts) == 0:
|
if len(accounts) == 0:
|
||||||
Error_dialog(_("You must setup an account before connecting to jabber network."))
|
Error_dialog(_('You must create an account before connecting to jabber network.'))
|
||||||
self.set_cb()
|
self.update_status_comboxbox()
|
||||||
return
|
return
|
||||||
status = model[active][2]
|
status = model[active][2]
|
||||||
message = self.get_status_message(status)
|
message = self.get_status_message(status)
|
||||||
if message == -1:
|
if message == -1:
|
||||||
self.set_cb()
|
self.update_status_comboxbox()
|
||||||
return
|
return
|
||||||
for acct in accounts:
|
for acct in accounts:
|
||||||
if self.plugin.accounts[acct].has_key('sync_with_global_status'):
|
if self.plugin.accounts[acct].has_key('sync_with_global_status'):
|
||||||
|
@ -771,7 +772,7 @@ class Roster_window:
|
||||||
continue
|
continue
|
||||||
self.send_status(acct, status, message)
|
self.send_status(acct, status, message)
|
||||||
|
|
||||||
def set_cb(self):
|
def update_status_comboxbox(self):
|
||||||
#table to change index in plugin.connected to index in combobox
|
#table to change index in plugin.connected to index in combobox
|
||||||
table = {0:5, 1:5, 2:0, 3:1, 4:2, 5:3, 6:4}
|
table = {0:5, 1:5, 2:0, 3:1, 4:2, 5:3, 6:4}
|
||||||
maxi = 0
|
maxi = 0
|
||||||
|
@ -779,9 +780,9 @@ class Roster_window:
|
||||||
maxi = max(self.plugin.connected.values())
|
maxi = max(self.plugin.connected.values())
|
||||||
#temporarily block signal in order not to send status that we show
|
#temporarily block signal in order not to send status that we show
|
||||||
#in the combobox
|
#in the combobox
|
||||||
self.cb.handler_block(self.id_signal_cb)
|
self.status_combobox.handler_block(self.id_signal_cb)
|
||||||
self.cb.set_active(table[maxi])
|
self.status_combobox.set_active(table[maxi])
|
||||||
self.cb.handler_unblock(self.id_signal_cb)
|
self.status_combobox.handler_unblock(self.id_signal_cb)
|
||||||
statuss = ['offline', 'connecting', 'online', 'away', 'xa', 'dnd',\
|
statuss = ['offline', 'connecting', 'online', 'away', 'xa', 'dnd',\
|
||||||
'invisible']
|
'invisible']
|
||||||
if self.plugin.systray_enabled:
|
if self.plugin.systray_enabled:
|
||||||
|
@ -812,7 +813,7 @@ class Roster_window:
|
||||||
for user in luser_copy:
|
for user in luser_copy:
|
||||||
self.chg_user_status(user, 'offline', 'Disconnected', account)
|
self.chg_user_status(user, 'offline', 'Disconnected', account)
|
||||||
self.plugin.connected[account] = statuss.index(status)
|
self.plugin.connected[account] = statuss.index(status)
|
||||||
self.set_cb()
|
self.update_status_comboxbox()
|
||||||
|
|
||||||
def new_chat(self, user, account):
|
def new_chat(self, user, account):
|
||||||
if self.plugin.config['usetabbedchat']:
|
if self.plugin.config['usetabbedchat']:
|
||||||
|
@ -1040,7 +1041,7 @@ class Roster_window:
|
||||||
self.hidden_lines.append(account)
|
self.hidden_lines.append(account)
|
||||||
|
|
||||||
def on_editing_canceled (self, cell):
|
def on_editing_canceled (self, cell):
|
||||||
"""editing have been canceled"""
|
"""editing has been canceled"""
|
||||||
#TODO: get iter
|
#TODO: get iter
|
||||||
#model.set_value(iter, 5, False)
|
#model.set_value(iter, 5, False)
|
||||||
pass
|
pass
|
||||||
|
@ -1112,7 +1113,7 @@ class Roster_window:
|
||||||
# Update the roster
|
# Update the roster
|
||||||
self.draw_roster()
|
self.draw_roster()
|
||||||
# Update the status combobox
|
# Update the status combobox
|
||||||
model = self.cb.get_model()
|
model = self.status_combobox.get_model()
|
||||||
iter = model.get_iter_root()
|
iter = model.get_iter_root()
|
||||||
while iter:
|
while iter:
|
||||||
model.set_value(iter, 1, self.pixbufs[model.get_value(iter, 2)])
|
model.set_value(iter, 1, self.pixbufs[model.get_value(iter, 2)])
|
||||||
|
@ -1130,11 +1131,6 @@ class Roster_window:
|
||||||
if jid != 'tabbed':
|
if jid != 'tabbed':
|
||||||
self.plugin.windows[account]['gc'][jid].udpate_pixbufs()
|
self.plugin.windows[account]['gc'][jid].udpate_pixbufs()
|
||||||
|
|
||||||
def sound_is_ok(self, sound):
|
|
||||||
if not os.path.exists(sound):
|
|
||||||
return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
def on_show_offline_contacts_menuitem_activate(self, widget):
|
def on_show_offline_contacts_menuitem_activate(self, widget):
|
||||||
"""when show offline option is changed:
|
"""when show offline option is changed:
|
||||||
redraw the treeview"""
|
redraw the treeview"""
|
||||||
|
@ -1156,7 +1152,6 @@ class Roster_window:
|
||||||
renderer.set_property('cell-background', \
|
renderer.set_property('cell-background', \
|
||||||
self.plugin.config['userbgcolor'])
|
self.plugin.config['userbgcolor'])
|
||||||
renderer.set_property('xalign', 1)
|
renderer.set_property('xalign', 1)
|
||||||
renderer.set_property('width', 30)
|
|
||||||
|
|
||||||
def nameCellDataFunc(self, column, renderer, model, iter, data=None):
|
def nameCellDataFunc(self, column, renderer, model, iter, data=None):
|
||||||
"""When a row is added, set properties for name renderer"""
|
"""When a row is added, set properties for name renderer"""
|
||||||
|
@ -1166,21 +1161,20 @@ class Roster_window:
|
||||||
renderer.set_property('cell-background', \
|
renderer.set_property('cell-background', \
|
||||||
self.plugin.config['accountbgcolor'])
|
self.plugin.config['accountbgcolor'])
|
||||||
renderer.set_property('font', self.plugin.config['accountfont'])
|
renderer.set_property('font', self.plugin.config['accountfont'])
|
||||||
renderer.set_property('xpad', 0)
|
|
||||||
elif model.get_value(iter, 2) == 'group':
|
elif model.get_value(iter, 2) == 'group':
|
||||||
renderer.set_property('foreground', \
|
renderer.set_property('foreground', \
|
||||||
self.plugin.config['grouptextcolor'])
|
self.plugin.config['grouptextcolor'])
|
||||||
renderer.set_property('cell-background', \
|
renderer.set_property('cell-background', \
|
||||||
self.plugin.config['groupbgcolor'])
|
self.plugin.config['groupbgcolor'])
|
||||||
renderer.set_property('font', self.plugin.config['groupfont'])
|
renderer.set_property('font', self.plugin.config['groupfont'])
|
||||||
renderer.set_property('xpad', 8)
|
|
||||||
else:
|
else:
|
||||||
renderer.set_property('foreground', \
|
renderer.set_property('foreground', \
|
||||||
self.plugin.config['usertextcolor'])
|
self.plugin.config['usertextcolor'])
|
||||||
renderer.set_property('cell-background', \
|
renderer.set_property('cell-background', \
|
||||||
self.plugin.config['userbgcolor'])
|
self.plugin.config['userbgcolor'])
|
||||||
renderer.set_property('font', self.plugin.config['userfont'])
|
renderer.set_property('font', self.plugin.config['userfont'])
|
||||||
renderer.set_property('xpad', 16)
|
|
||||||
|
renderer.set_property('xpad', 5)
|
||||||
|
|
||||||
def compareIters(self, model, iter1, iter2, data = None):
|
def compareIters(self, model, iter1, iter2, data = None):
|
||||||
"""Compare two iters to sort them"""
|
"""Compare two iters to sort them"""
|
||||||
|
@ -1313,15 +1307,16 @@ class Roster_window:
|
||||||
|
|
||||||
liststore = gtk.ListStore(gobject.TYPE_STRING, gtk.Image, \
|
liststore = gtk.ListStore(gobject.TYPE_STRING, gtk.Image, \
|
||||||
gobject.TYPE_STRING)
|
gobject.TYPE_STRING)
|
||||||
self.cb = gtk.ComboBox()
|
self.status_combobox = gtk.ComboBox()
|
||||||
self.xml.get_widget('vbox1').pack_end(self.cb, False)
|
self.xml.get_widget('vbox1').pack_end(self.status_combobox, False)
|
||||||
cell = ImageCellRenderer()
|
cell = CellRendererImage()
|
||||||
self.cb.pack_start(cell, False)
|
self.status_combobox.pack_start(cell, False)
|
||||||
self.cb.add_attribute(cell, 'image', 1)
|
self.status_combobox.add_attribute(cell, 'image', 1)
|
||||||
cell = gtk.CellRendererText()
|
cell = gtk.CellRendererText()
|
||||||
cell.set_property('xpad', 8)
|
cell.set_property('xpad', 5) # padding for status text
|
||||||
self.cb.pack_start(cell, True)
|
self.status_combobox.pack_start(cell, True)
|
||||||
self.cb.add_attribute(cell, 'text', 0)
|
self.status_combobox.add_attribute(cell, 'text', 0)
|
||||||
|
|
||||||
for status in ['online', 'away', 'xa', 'dnd', 'invisible', 'offline']:
|
for status in ['online', 'away', 'xa', 'dnd', 'invisible', 'offline']:
|
||||||
if status == 'dnd':
|
if status == 'dnd':
|
||||||
status_better = 'Busy'
|
status_better = 'Busy'
|
||||||
|
@ -1330,9 +1325,9 @@ class Roster_window:
|
||||||
else:
|
else:
|
||||||
status_better = status.capitalize()
|
status_better = status.capitalize()
|
||||||
iter = liststore.append([status_better, self.pixbufs[status], status])
|
iter = liststore.append([status_better, self.pixbufs[status], status])
|
||||||
self.cb.show_all()
|
self.status_combobox.show_all()
|
||||||
self.cb.set_model(liststore)
|
self.status_combobox.set_model(liststore)
|
||||||
self.cb.set_active(5)
|
self.status_combobox.set_active(5)
|
||||||
|
|
||||||
showOffline = self.plugin.config['showoffline']
|
showOffline = self.plugin.config['showoffline']
|
||||||
self.xml.get_widget('show_offline_contacts_menuitem').set_active(showOffline)
|
self.xml.get_widget('show_offline_contacts_menuitem').set_active(showOffline)
|
||||||
|
@ -1340,7 +1335,7 @@ class Roster_window:
|
||||||
#columns
|
#columns
|
||||||
col = gtk.TreeViewColumn()
|
col = gtk.TreeViewColumn()
|
||||||
self.tree.append_column(col)
|
self.tree.append_column(col)
|
||||||
render_pixbuf = ImageCellRenderer()
|
render_pixbuf = CellRendererImage()
|
||||||
col.pack_start(render_pixbuf, expand = False)
|
col.pack_start(render_pixbuf, expand = False)
|
||||||
col.add_attribute(render_pixbuf, 'image', 0)
|
col.add_attribute(render_pixbuf, 'image', 0)
|
||||||
col.set_cell_data_func(render_pixbuf, self.iconCellDataFunc, None)
|
col.set_cell_data_func(render_pixbuf, self.iconCellDataFunc, None)
|
||||||
|
@ -1369,7 +1364,8 @@ class Roster_window:
|
||||||
self.tree.connect("drag_data_get", self.drag_data_get_data)
|
self.tree.connect("drag_data_get", self.drag_data_get_data)
|
||||||
self.tree.connect("drag_data_received", self.drag_data_received_data)
|
self.tree.connect("drag_data_received", self.drag_data_received_data)
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
self.id_signal_cb = self.cb.connect('changed', self.on_cb_changed)
|
self.id_signal_cb = self.status_combobox.connect('changed',\
|
||||||
|
self.on_status_combobox_changed)
|
||||||
|
|
||||||
self.hidden_lines = self.plugin.config['hiddenlines'].split('\t')
|
self.hidden_lines = self.plugin.config['hiddenlines'].split('\t')
|
||||||
self.draw_roster()
|
self.draw_roster()
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
## Gajim Team:
|
## Gajim Team:
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## - Vincent Hanquez <tab@snarc.org>
|
## - Vincent Hanquez <tab@snarc.org>
|
||||||
|
## - Nikos Kouremenos <kourem@gmail.com>
|
||||||
##
|
##
|
||||||
## Copyright (C) 2003-2005 Gajim Team
|
## Copyright (C) 2003-2005 Gajim Team
|
||||||
##
|
##
|
||||||
|
@ -23,4 +24,4 @@ fi
|
||||||
|
|
||||||
cd PREFIX/share/gajim
|
cd PREFIX/share/gajim
|
||||||
export PYTHONPATH="$PYTHONPATH:PREFIX/lib/gajim"
|
export PYTHONPATH="$PYTHONPATH:PREFIX/lib/gajim"
|
||||||
python gajim.py
|
gajim.sh
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
## Gajim Team:
|
## Gajim Team:
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## - Vincent Hanquez <tab@snarc.org>
|
## - Vincent Hanquez <tab@snarc.org>
|
||||||
##
|
## - Nikos Kouremenos <kourem@gmail.com>
|
||||||
## Copyright (C) 2003-2005 Gajim Team
|
## Copyright (C) 2003-2005 Gajim Team
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -40,8 +40,8 @@ opts = {
|
||||||
setup(
|
setup(
|
||||||
name = "Gajim",
|
name = "Gajim",
|
||||||
description = "A jabber client",
|
description = "A jabber client",
|
||||||
# console=["gajim.py"],
|
# console=["gajim.sh"],
|
||||||
windows = [{"script": "gajim.py",
|
windows = [{"script": "gajim.sh",
|
||||||
"icon_resources": [(1, "gajim.ico")]}],
|
"icon_resources": [(1, "gajim.ico")]}],
|
||||||
options=opts,
|
options=opts,
|
||||||
data_files=[("plugins/gtkgui", glob.glob("plugins/gtkgui/gtkgui.glade")),
|
data_files=[("plugins/gtkgui", glob.glob("plugins/gtkgui/gtkgui.glade")),
|
||||||
|
|
Loading…
Add table
Reference in a new issue