gajim.sh --> gajim.py, adding psyco support if available, small fix in new message dialog if @ is not given

This commit is contained in:
Nikos Kouremenos 2005-04-01 14:55:56 +00:00
parent 38a576d870
commit d409b248b5
8 changed files with 21 additions and 11 deletions

View File

@ -4,7 +4,7 @@ MODULES = common plugins/gtkgui
PREFIX = /usr PREFIX = /usr
DESTDIR = / DESTDIR = /
FIND = find -regex '.*\.\(\(glade\)\|\(py\)\|\(sh\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)' FIND = find -regex '.*\.\(\(glade\)\|\(py\)\|\(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.sh gajim-$(VERSION) cp setup_win32.py gajim.iss AUTHORS gajim.1 gajim.xpm gajim.ico COPYING Makefile Changelog README gajim.py 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 {} \;

2
README
View File

@ -22,7 +22,7 @@ RUN GAJIM
gajim gajim
or if you didn'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.sh ./gajim.py
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

6
debian/rules vendored
View File

@ -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.sh chmod -x debian/tmp/usr/share/gajim/gajim.py
sed -ne '1d;w debian/tmp/gajim.sh.tmp' debian/tmp/usr/share/gajim/gajim.sh sed -ne '1d;w 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 mv debian/tmp/gajim.py.tmp debian/tmp/usr/share/gajim/gajim.py
binary-indep: checkroot build binary-indep: checkroot build
$(checkdir) $(checkdir)

View File

View File

@ -675,6 +675,9 @@ class New_message_dialog:
def on_chat_button_clicked(self, widget): def on_chat_button_clicked(self, widget):
"""When Chat button is clicked""" """When Chat button is clicked"""
jid = self.jid_entry.get_text() jid = self.jid_entry.get_text()
if jid.find('@') == -1: # if no @ was given
Error_dialog(_('User ID is not valid'))
return
# use User class, new_chat expects it that way # use User class, new_chat expects it that way
# is it in the roster? # is it in the roster?
if self.plugin.roster.contacts[self.account].has_key(jid): if self.plugin.roster.contacts[self.account].has_key(jid):

View File

@ -19,6 +19,13 @@
if __name__ == "__main__": if __name__ == "__main__":
import getopt, pickle, sys, socket import getopt, pickle, sys, socket
try: # Import Psyco if available
import psyco
psyco.full()
except ImportError:
pass
try: try:
opts, args = getopt.getopt(sys.argv[1:], "p:h", ["help"]) opts, args = getopt.getopt(sys.argv[1:], "p:h", ["help"])
except getopt.GetoptError: except getopt.GetoptError:

View File

@ -24,4 +24,4 @@ fi
cd PREFIX/share/gajim cd PREFIX/share/gajim
export PYTHONPATH="$PYTHONPATH:PREFIX/lib/gajim" export PYTHONPATH="$PYTHONPATH:PREFIX/lib/gajim"
gajim.sh gajim.py

View File

@ -1,8 +1,8 @@
## setup_win32.py ## setup_win32.py
## ##
## 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> ## - Nikos Kouremenos <kourem@gmail.com>
## Copyright (C) 2003-2005 Gajim Team ## Copyright (C) 2003-2005 Gajim Team
## ##
@ -40,8 +40,8 @@ opts = {
setup( setup(
name = "Gajim", name = "Gajim",
description = "A jabber client", description = "A jabber client",
# console=["gajim.sh"], # console=["gajim.py"],
windows = [{"script": "gajim.sh", windows = [{"script": "gajim.py",
"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")),