move icons to xdg standard dirs, add desktop files

closes #359
This commit is contained in:
Christophe Benz 2010-08-11 19:27:41 +02:00
commit 13f9fc07b2
36 changed files with 70 additions and 29 deletions

9
desktop/qboobmsg.desktop Normal file
View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=QBoobmsg
Comment=Send and receive messages from various websites
Exec=qboobmsg
# Icon=qboobmsg
Terminal=false
Type=Application
StartupNotify=true
Categories=Network;Qt;

9
desktop/qhavesex.desktop Normal file
View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=QHavesex
Comment=Optimize your probabilities to have sex on dating websites
Exec=qhavesex
# Icon=qhavesex
Terminal=false
Type=Application
StartupNotify=true
Categories=Network;Chat;ContactManagement;Qt;

9
desktop/qvideoob.desktop Normal file
View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=QVideoob
Comment=Search for videos on many websites, and get info about them
Exec=qvideoob
# Icon=qvideoob
Terminal=false
Type=Application
StartupNotify=true
Categories=Video;Qt;

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Weboob backends configuration
Comment=Configure Weboob backends
Exec=weboob-config-qt
# Icon=weboob-config-qt
Terminal=false
Type=Application
StartupNotify=true
Categories=Utility;Qt;

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before After
Before After

BIN
icons/bnporc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

View file

@ -17,20 +17,32 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from __future__ import with_statement
from setuptools import find_packages, setup from setuptools import find_packages, setup
import glob
import os import os
import subprocess
import sys
with open('/dev/null', 'w') as devnull:
process = subprocess.Popen(['which', 'pyuic4'], stdout=devnull)
return_code = process.wait()
if return_code != 0:
print 'pyuic4 is not installed on your system'
sys.exit(1)
os.system('make -C weboob/applications/qboobmsg/ui') os.system('make -C weboob/applications/qboobmsg/ui')
os.system('make -C weboob/applications/qhavesex/ui') os.system('make -C weboob/applications/qhavesex/ui')
os.system('make -C weboob/applications/qvideoob/ui') os.system('make -C weboob/applications/qvideoob/ui')
os.system('make -C weboob/tools/application/qt') os.system('make -C weboob/tools/application/qt')
setup( setup(
name='weboob-dev', name='weboob',
version='dev', version='dev',
description='Weboob, Web Out Of Browsers - core library', description='Weboob, Web Out Of Browsers - development version',
author='Romain Bignon', author='Romain Bignon',
author_email='weboob@lists.symlink.me', author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz', maintainer='Christophe Benz',
@ -57,3 +69,15 @@ setup(
# 'WebOb', # python-webob # 'WebOb', # python-webob
], ],
) )
def install_xdg():
"""
On xdg-compliant systems, install desktop file and icon
"""
print 'Installing desktop menu files'
os.system('xdg-desktop-menu install --novendor desktop/*.desktop')
for filepath in glob.glob('icons/*'):
print 'Installing icon %s' % filepath
os.system('xdg-icon-resource install --size 64 --novendor %s' % filepath)
install_xdg()

View file

@ -37,8 +37,6 @@ class ArteBackend(BaseBackend, ICapVideo):
VERSION = '0.2' VERSION = '0.2'
DESCRIPTION = 'Arte french TV' DESCRIPTION = 'Arte french TV'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = ArteBrowser BROWSER = ArteBrowser
def get_video(self, _id): def get_video(self, _id):

View file

@ -46,7 +46,6 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesReply, ICapDating, ICapC
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
DESCRIPTION = u"“Adopte un mec” french dating website" DESCRIPTION = u"“Adopte un mec” french dating website"
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
CONFIG = {'username': BaseBackend.ConfigField(description='Username on website'), CONFIG = {'username': BaseBackend.ConfigField(description='Username on website'),
'password': BaseBackend.ConfigField(description='Password of account', is_masked=True), 'password': BaseBackend.ConfigField(description='Password of account', is_masked=True),
'register': BaseBackend.ConfigField(default=False, description='Register as new account?'), 'register': BaseBackend.ConfigField(default=False, description='Register as new account?'),

View file

@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import os import os
from weboob.capabilities.bank import ICapBank, AccountNotFound from weboob.capabilities.bank import ICapBank, AccountNotFound
@ -22,15 +23,14 @@ from weboob.tools.backend import BaseBackend
from .browser import BNPorc from .browser import BNPorc
class BNPorcBackend(BaseBackend, ICapBank): class BNPorcBackend(BaseBackend, ICapBank):
NAME = 'bnporc' NAME = 'bnporc'
MAINTAINER = 'Romain Bignon' MAINTAINER = 'Romain Bignon'
EMAIL = 'romain@peerfuse.org' EMAIL = 'romain@peerfuse.org'
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
DESCRIPTION = 'BNP Paribas french bank\' website' DESCRIPTION = 'BNP Paribas french bank\' website'
CONFIG = {'login': BaseBackend.ConfigField(description='Account ID'), CONFIG = {'login': BaseBackend.ConfigField(description='Account ID'),
'password': BaseBackend.ConfigField(description='Password of account', is_masked=True) 'password': BaseBackend.ConfigField(description='Password of account', is_masked=True)
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

View file

@ -33,7 +33,6 @@ class CanalTPBackend(BaseBackend, ICapTravel):
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
DESCRIPTION = "French trains" DESCRIPTION = "French trains"
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = CanalTP BROWSER = CanalTP
def iter_station_search(self, pattern): def iter_station_search(self, pattern):

View file

@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import os import os
from weboob.capabilities.bank import ICapBank, AccountNotFound from weboob.capabilities.bank import ICapBank, AccountNotFound
@ -22,6 +23,7 @@ from weboob.tools.backend import BaseBackend
from .browser import Cragr from .browser import Cragr
class CragrBackend(BaseBackend, ICapBank): class CragrBackend(BaseBackend, ICapBank):
NAME = 'cragr' NAME = 'cragr'
MAINTAINER = 'Laurent Bachelier' MAINTAINER = 'Laurent Bachelier'
@ -29,8 +31,6 @@ class CragrBackend(BaseBackend, ICapBank):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'Credit Agricole french bank\'s website' DESCRIPTION = 'Credit Agricole french bank\'s website'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
CONFIG = {'login': BaseBackend.ConfigField(description='Account ID'), CONFIG = {'login': BaseBackend.ConfigField(description='Account ID'),
'password': BaseBackend.ConfigField(description='Password of account', is_masked=True), 'password': BaseBackend.ConfigField(description='Password of account', is_masked=True),
'website': BaseBackend.ConfigField(description='What website to use', default='m.lefil.com'), 'website': BaseBackend.ConfigField(description='What website to use', default='m.lefil.com'),

View file

@ -37,8 +37,6 @@ class DLFPBackend(BaseBackend, ICapMessages, ICapMessagesReply):
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
DESCRIPTION = "Da Linux French Page" DESCRIPTION = "Da Linux French Page"
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
CONFIG = {'username': BaseBackend.ConfigField(description='Username on website'), CONFIG = {'username': BaseBackend.ConfigField(description='Username on website'),
'password': BaseBackend.ConfigField(description='Password of account', is_masked=True), 'password': BaseBackend.ConfigField(description='Password of account', is_masked=True),
'get_news': BaseBackend.ConfigField(default=True, description='Get newspapers'), 'get_news': BaseBackend.ConfigField(default=True, description='Get newspapers'),

View file

@ -37,8 +37,6 @@ class FourChanBackend(BaseBackend, ICapMessages):
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
DESCRIPTION = "4chan website" DESCRIPTION = "4chan website"
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
CONFIG = {'boards': BaseBackend.ConfigField(description='Boards'), CONFIG = {'boards': BaseBackend.ConfigField(description='Boards'),
} }
STORAGE = {'boards': {}} STORAGE = {'boards': {}}

View file

@ -33,8 +33,6 @@ class GazelleBackend(BaseBackend, ICapTorrent):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'gazelle bittorrent tracker' DESCRIPTION = 'gazelle bittorrent tracker'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
CONFIG = {'username': BaseBackend.ConfigField(description='Username on website'), CONFIG = {'username': BaseBackend.ConfigField(description='Username on website'),
'password': BaseBackend.ConfigField(description='Password of account', is_masked=True), 'password': BaseBackend.ConfigField(description='Password of account', is_masked=True),
'protocol': BaseBackend.ConfigField(description='Protocol to use ("http" or "https")', regexp='^(http|https)$'), 'protocol': BaseBackend.ConfigField(description='Protocol to use ("http" or "https")', regexp='^(http|https)$'),

View file

@ -34,7 +34,6 @@ class GeolocIpBackend(BaseBackend, ICapGeolocIp):
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
DESCRIPTION = u"IP Adresses geolocalisation" DESCRIPTION = u"IP Adresses geolocalisation"
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
CONFIG = {'email': BaseBackend.ConfigField(description='Username on website'), CONFIG = {'email': BaseBackend.ConfigField(description='Username on website'),
'password': BaseBackend.ConfigField(description='Password of account', is_masked=True), 'password': BaseBackend.ConfigField(description='Password of account', is_masked=True),
} }

View file

@ -35,8 +35,6 @@ class InaBackend(BaseBackend, ICapVideo):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'INA french video archives' DESCRIPTION = 'INA french video archives'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = InaBrowser BROWSER = InaBrowser
def get_video(self, _id): def get_video(self, _id):

View file

@ -31,7 +31,6 @@ class TransilienBackend(BaseBackend, ICapTravel):
VERSION = '0.1' VERSION = '0.1'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
DESCRIPTION = "Transports in Paris" DESCRIPTION = "Transports in Paris"
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = Transilien BROWSER = Transilien
def iter_station_search(self, pattern): def iter_station_search(self, pattern):

View file

@ -37,8 +37,6 @@ class YahooBackend(BaseBackend, ICapWeather):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'Yahoo' DESCRIPTION = 'Yahoo'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
WEATHER_URL = 'http://weather.yahooapis.com/forecastrss?w=%s&u=%s' WEATHER_URL = 'http://weather.yahooapis.com/forecastrss?w=%s&u=%s'
def iter_city_search(self, pattern): def iter_city_search(self, pattern):

View file

@ -37,8 +37,6 @@ class YoujizzBackend(BaseBackend, ICapVideo):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'Youjizz videos website' DESCRIPTION = 'Youjizz videos website'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = YoujizzBrowser BROWSER = YoujizzBrowser
def get_video(self, _id): def get_video(self, _id):

View file

@ -37,8 +37,6 @@ class YoupornBackend(BaseBackend, ICapVideo):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'Youporn videos website' DESCRIPTION = 'Youporn videos website'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = YoupornBrowser BROWSER = YoupornBrowser
def get_video(self, _id): def get_video(self, _id):

View file

@ -38,8 +38,6 @@ class YoutubeBackend(BaseBackend, ICapVideo):
VERSION = '0.1' VERSION = '0.1'
DESCRIPTION = 'Youtube videos website' DESCRIPTION = 'Youtube videos website'
LICENSE = 'GPLv3' LICENSE = 'GPLv3'
ICON = os.path.join(os.path.dirname(__file__), 'data/logo.png')
BROWSER = YoutubeBrowser BROWSER = YoutubeBrowser
def get_video(self, _id): def get_video(self, _id):

View file

@ -24,6 +24,7 @@ from logging import debug, error, exception, warning
import os import os
import re import re
import stat import stat
import xdg.IconTheme
from weboob.capabilities.cap import ICap from weboob.capabilities.cap import ICap
from weboob.tools.backend import BaseBackend from weboob.tools.backend import BaseBackend
@ -69,6 +70,8 @@ class Backend(object):
@property @property
def icon_path(self): def icon_path(self):
if self.klass.ICON is None:
self.klass.ICON = xdg.IconTheme.getIconPath(self.klass.NAME)
return self.klass.ICON return self.klass.ICON
def iter_caps(self): def iter_caps(self):

View file

@ -66,7 +66,7 @@ class BaseBackend(object):
# License of this backend. # License of this backend.
LICENSE = '<unspecified>' LICENSE = '<unspecified>'
# Icon file path # Icon file path
ICON = '' ICON = None
# Configuration required for this backend. # Configuration required for this backend.
# Values must be ConfigField objects. # Values must be ConfigField objects.
CONFIG = {} CONFIG = {}