Merge lp:~azzar1/unity/fix-731578 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Merged at revision: 960
Proposed branch: lp:~azzar1/unity/fix-731578
Merge into: lp:unity
Diff against target: 51 lines (+12/-4)
2 files modified
com.canonical.Unity.gschema.xml (+2/-2)
tools/unity.cmake (+10/-2)
To merge this branch: bzr merge lp:~azzar1/unity/fix-731578
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+53658@code.launchpad.net

Description of the change

Add unity --reset-icons option to restore default launcher icons.

I don't know if this is the better way to do this.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Approved! thanks a lot for your work there ;)

And no, there is no gsettings binding in python (yet), so this is the less ugly way to deal with it :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'com.canonical.Unity.gschema.xml'
2--- com.canonical.Unity.gschema.xml 2011-03-16 16:29:02 +0000
3+++ com.canonical.Unity.gschema.xml 2011-03-16 17:11:26 +0000
4@@ -40,8 +40,8 @@
5 <schema path="/desktop/unity/devices/" id="com.canonical.Unity.Devices" gettext-domain="unity">
6 <key enum="devices-option-enum" name="devices-option">
7 <default>"OnlyMounted"</default>
8- <summary>Summary</summary>
9- <description>Description</description>
10+ <summary>The devices that will be shown on launcher</summary>
11+ <description>Key for setting the devices that will be shown on launcher. </description>
12 </key>
13 </schema>
14 </schemalist>
15
16=== modified file 'tools/unity.cmake'
17--- tools/unity.cmake 2011-03-07 15:47:14 +0000
18+++ tools/unity.cmake 2011-03-16 17:11:26 +0000
19@@ -87,7 +87,10 @@
20 # the python binding doesn't recursive-unset right
21 subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compiz-1"]).communicate()
22 subprocess.Popen(["gconftool-2", "--recursive-unset", "/apps/compizconfig-1/profiles/unity"]).communicate()
23-
24+
25+def reset_launcher_icons ():
26+ '''Reset the default launcher icon and restart it.'''
27+ subprocess.Popen(["gsettings", "reset" ,"com.canonical.Unity.Launcher" , "favorites"])
28
29 def process_and_start_unity (verbose, debug, compiz_args, log_file):
30 '''launch unity under compiz (replace the current shell in any case)'''
31@@ -175,7 +178,9 @@
32 parser.add_option("--replace", action="store_true",
33 help="Run unity /!\ This is for compatibility with other desktop interfaces and acts the same as running unity without --replace")
34 parser.add_option("--reset", action="store_true",
35- help="Reset the unity profile in compiz and restart it.")
36+ help="Reset the unity profile in compiz and restart it.")
37+ parser.add_option("--reset-icons", action="store_true",
38+ help="Reset the default launcher icon.")
39 parser.add_option("-v", "--verbose", action="store_true",
40 help="Get additional debug output from unity.")
41 (options, args) = parser.parse_args()
42@@ -187,6 +192,9 @@
43
44 if options.reset:
45 reset_unity_compiz_profile ()
46+
47+ if options.reset_icons:
48+ reset_launcher_icons ()
49
50 if options.replace:
51 print ("WARNING: This is for compatibility with other desktop interfaces please use unity without --replace")