1 diff -aur a/gdm3setup-daemon.py b/gdm3setup-daemon.py
2 --- a/gdm3setup-daemon.py 2011-11-29 16:00:49.000000000 +0100
3 +++ b/gdm3setup-daemon.py 2011-12-04 12:29:09.367918331 +0100
6 return dbus_address,dbus_pid
8 -def HackShellTheme(b):
10 - os.rename('/usr/share/gnome-shell/theme','/usr/share/gnome-shell/theme.original')
11 - os.symlink('/usr/share/gnome-shell/theme.original','/usr/share/gnome-shell/theme')
12 - os.symlink('/usr/share/gnome-shell/theme.original','/usr/share/themes/Adwaita/gnome-shell')
14 - os.remove('/usr/share/themes/Adwaita/gnome-shell')
15 - os.remove('/usr/share/gnome-shell/theme')
16 - os.rename('/usr/share/gnome-shell/theme.original','/usr/share/gnome-shell/theme')
18 -def Get_Shell_theme():
19 - if os.path.islink('/usr/share/gnome-shell/theme'):
20 - theme_path = os.readlink('/usr/share/gnome-shell/theme')
21 - if theme_path == '/usr/share/gnome-shell/theme.original':
22 - shell_theme='Adwaita'
24 - tb_path = theme_path.split('/')
25 - shell_theme = tb_path[len(tb_path)-2]
27 - shell_theme='Adwaita'
31 -def Set_Shell_theme(value):
32 - if value=='Adwaita':
33 - HackShellTheme(False)
35 - if not os.path.islink('/usr/share/gnome-shell/theme'):
36 - HackShellTheme(True)
37 - os.remove('/usr/share/gnome-shell/theme')
38 - os.symlink('/usr/share/themes/'+value+'/gnome-shell','/usr/share/gnome-shell/theme')
40 class GDM3SetupDBusService(dbus.service.Object):
44 sender_keyword='sender', connection_keyword='connexion')
45 def SetUI(self,name,value,sender=None, connexion=None):
46 if self.policykit_test(sender,connexion,'apps.nano77.gdm3setup.set') :
47 - if name!='SHELL_THEME':
48 - bus_adrress , bus_pid = Get_Bus()
49 - subprocess.call('su - gdm -s /bin/bash -c "LANG='+LANG+' DBUS_SESSION_BUS_ADDRESS='+bus_adrress+' DBUS_SESSION_BUS_PID='+bus_pid+' set_gdm.sh -n '+name+' -v '+"'"+value+"'"+'"',shell=True)
51 - Set_Shell_theme(value)
52 + bus_adrress , bus_pid = Get_Bus()
53 + subprocess.call('su - gdm -s /bin/bash -c "LANG='+LANG+' DBUS_SESSION_BUS_ADDRESS='+bus_adrress+' DBUS_SESSION_BUS_PID='+bus_pid+' set_gdm.sh -n '+name+' -v '+"'"+value+"'"+'"',shell=True)
58 settings = ifile.readlines()
60 os.remove("/tmp/GET_GDM")
61 - settings.append("SHELL='"+Get_Shell_theme()+"'\n")
64 @dbus.service.method('apps.nano77.gdm3setup','bsbi','s',sender_keyword='sender', connection_keyword='connexion')
65 diff -aur a/get_gdm.sh b/get_gdm.sh
66 --- a/get_gdm.sh 2011-11-13 00:40:20.000000000 +0100
67 +++ b/get_gdm.sh 2011-11-16 14:07:58.087329638 +0100
70 echo -n "GTK=" > /tmp/GET_GDM
71 gsettings get org.gnome.desktop.interface gtk-theme >> /tmp/GET_GDM
72 +echo -n "SHELL=" >> /tmp/GET_GDM
73 +gsettings get org.gnome.shell theme-name >> /tmp/GET_GDM
74 echo -n "ICON=" >> /tmp/GET_GDM
75 gsettings get org.gnome.desktop.interface icon-theme >> /tmp/GET_GDM
76 echo -n "FONT=" >> /tmp/GET_GDM
77 diff -aur a/set_gdm.sh b/set_gdm.sh
78 --- a/set_gdm.sh 2011-12-23 12:48:13.000000000 +0100
79 +++ b/set_gdm.sh 2011-12-23 12:50:13.674599183 +0100
81 echo "$parameter_name = $parameter_value"
82 gsettings set org.gnome.desktop.interface gtk-theme "$parameter_value"
85 + echo "$parameter_name = $parameter_value"
86 + gsettings set org.gnome.shell theme-name "$parameter_value"
89 echo "$parameter_name = $parameter_value"
90 gsettings set org.gnome.desktop.interface font-name "$parameter_value"