CSSU's portrait mode support - WIP
[drlaunch] / drlaunch / src / drlaunch_widget.py
1 #!/usr/bin/env python
2 # coding=UTF-8
3
4 # Copyright (C) 2010 Stefanos Harhalakis
5 #
6 # This file is part of wifieye.
7 #
8 # wifieye is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # wifieye is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with wifieye.  If not, see <http://www.gnu.org/licenses/>.
20 #
21 # $Id: 0.py 2265 2010-02-21 19:16:26Z v13 $
22
23 __version__ = "$Id: 0.py 2265 2010-02-21 19:16:26Z v13 $"
24
25 import os.path
26 from drlaunch import widget
27
28 class DrlaunchPlugin(widget.DrlaunchPlugin):
29     pass
30
31 def redirect_err():
32     import sys
33     import time
34
35     print "Opening /tmp/drlaunch.log"
36     f=open('/tmp/drlaunch.log', 'at', buffering=1)
37     sys.stdout=f
38     sys.stderr=f
39     print "Log open:", time.ctime()
40
41 hd_plugin_type = DrlaunchPlugin
42
43 if os.path.exists('/tmp/drlaunch.log'):
44     redirect_err()
45
46 if __name__=="__main__":
47     import gobject
48     import gtk
49
50     gobject.type_register(hd_plugin_type)
51     obj=gobject.new(hd_plugin_type, plugin_id="plugin_id")
52     obj.show_all()
53     gtk.main()
54
55
56
57 # vim: set ts=8 sts=4 sw=4 noet formatoptions=r ai nocindent:
58