1 # -*- coding: utf-8 -*-
4 Dboxswitch dropbox profile switcher
6 license: Modified BSD License
8 Copyright (c) 2012, <stack@inventati.org>
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13 * Redistributions of source code must retain the above copyright
14 notice, this list of conditions and the following disclaimer.
15 * Redistributions in binary form must reproduce the above copyright
16 notice, this list of conditions and the following disclaimer in the
17 documentation and/or other materials provided with the distribution.
18 * Neither the name of the <organization> nor the
19 names of its contributors may be used to endorse or promote products
20 derived from this software without specific prior written permission.
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
26 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 from apperror import AppError
40 path = __file__ if __file__ is not None else sys.argv[0]
41 __location__ = os.path.realpath(os.path.join(os.getcwd(),
42 os.path.dirname(path)))
44 self.appname = "dboxswitch"
45 self.appversion = "0.1"
46 if os.path.isdir(os.path.join(__location__,"/icons")):
47 path = os.path.join(__location__,"/icons")
52 path = pkg_resources.resource_filename(__name__, 'icons/')
54 print "unable to load resource icons"
55 self.icon = os.path.join(path,"icon.png")
56 self.cpicon = os.path.join(path,"current-profile.png")
57 self.delpicon = os.path.join(path,"delete.png")
58 self.addpicon = os.path.join(path,"add.png")