Replace rsvg with rsvg-convert.
[laditools.git] / laditools / application.py
blobfa2092a8953712338b9f7bc68d7e12db7772144f
1 #!/usr/bin/python
2 # LADITools - Linux Audio Desktop Integration Tools
3 # Copyright (C) 2011-2012 Alessio Treglia <quadrispro@ubuntu.com>
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 import signal
20 class LadiApp(object):
22 @property
23 def appname(self): return self._appname
25 @property
26 def appname_long(self): return self._appname_long
28 @property
29 def appid(self): return self._appid
31 def connect_signals_quit(self, signals=[], sig_handler=None):
32 if not signals:
33 signals = [signal.SIGTERM,
34 signal.SIGINT]
35 if not sig_handler:
36 sig_handler = self.quit
38 for sig in signals:
39 signal.signal(sig, sig_handler)
40 signal.signal(sig, sig_handler)
42 def run(self): raise NotImplementedError
43 def quit(self): raise NotImplementedError