2
Copyright (c) 2010 Julien Lavergne <gilir@ubuntu.com>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software Foundation,
16
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
import apport.hookutils
23
session = os.environ['DESKTOP_SESSION']
25
#If it's not Lubuntu or LXDE, fallback to default location
26
if session <> "Lubuntu" and session <> "LXDE":
29
#Set location of various configuration files
30
system_conf = "/usr/share/lxpanel/profile/"
31
home_conf = os.path.expanduser("~/.config/lxpanel/")
33
#Set description for each file reported by apport
34
report_config_system = "Config_System_" + session
35
report_panel_system = "Panel_System_" + session
36
report_config_home = "Config_Home_" + session
37
report_panel_home = "Panel_Home_" + session
40
# If a config file exist in HOME, report it instead of the system one.
41
if os.path.exists(os.path.join(home_conf,session,"config")):
42
report[report_config_home] = apport.hookutils.read_file(os.path.join(home_conf,session,"config"))
44
report[report_config_system] = apport.hookutils.read_file(os.path.join(system_conf,session,"config"))
46
if os.path.exists(os.path.join(home_conf,session,"panels/panel")):
47
report[report_panel_home] = apport.hookutils.read_file(os.path.join(home_conf,session,"panels/panel"))
49
report[report_panel_system] = apport.hookutils.read_file(os.path.join(system_conf,session,"panels/panel"))