Merge lp:~brian.curtin/ubuntuone-control-panel/fix-windows-startup into lp:ubuntuone-control-panel

Proposed by Brian Curtin on 2012-03-29
Status: Rejected
Rejected by: Brian Curtin on 2012-03-29
Proposed branch: lp:~brian.curtin/ubuntuone-control-panel/fix-windows-startup
Merge into: lp:ubuntuone-control-panel
Diff against target: 43 lines (+5/-11)
2 files modified
ubuntuone/controlpanel/utils/tests/test_windows.py (+3/-5)
ubuntuone/controlpanel/utils/windows.py (+2/-6)
To merge this branch: bzr merge lp:~brian.curtin/ubuntuone-control-panel/fix-windows-startup
Reviewer Review Type Date Requested Status
Roberto Alsina 2012-03-29 Pending
Review via email: mp+99945@code.launchpad.net

Commit Message

- Fix Windows autostart behavior to match that of what was used for the other shortcuts.

Description of the Change

Fix Windows autostart behavior to match that of what was used for the other shortcuts. Remove syncdaemon from startup and remove the --minimized flag from controlpanel.

To post a comment you must log in.

Unmerged revisions

302. By Brian Curtin on 2012-03-29

Remove SD and CP's --minimized from Windows startup

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/controlpanel/utils/tests/test_windows.py'
2--- ubuntuone/controlpanel/utils/tests/test_windows.py 2012-03-23 21:20:18 +0000
3+++ ubuntuone/controlpanel/utils/tests/test_windows.py 2012-03-29 14:00:28 +0000
4@@ -161,11 +161,9 @@
5 self.assertEqual(self.registry.query_args, None)
6 path = os.path.dirname(os.path.abspath(sys.executable))
7 self.assertEqual(self.registry.set_args,
8- [((self.registry.OpenKey, 'Ubuntu One', 0, 1,
9- '"%s\\ubuntuone-syncdaemon.exe"' % path), {}),
10- ((self.registry.OpenKey, 'Ubuntu One Icon', 0, 1,
11- '"%s\\ubuntuone-control-panel-qt.exe" --minimized' % path),
12- {})])
13+ [((self.registry.OpenKey, 'Ubuntu One Icon', 0, 1,
14+ '"%s\\ubuntuone-control-panel-qt.exe" --with-icon' % path),
15+ {})])
16
17 def test_not_added_if_not_frozen(self):
18 """Not frozen binaries are not added to the registry."""
19
20=== modified file 'ubuntuone/controlpanel/utils/windows.py'
21--- ubuntuone/controlpanel/utils/windows.py 2012-03-23 21:48:53 +0000
22+++ ubuntuone/controlpanel/utils/windows.py 2012-03-29 14:00:28 +0000
23@@ -101,11 +101,8 @@
24
25
26 def add_to_autostart():
27- """Add syncdaemon to the session's autostart."""
28+ """Add controlpanel to the session's autostart."""
29 if getattr(sys, "frozen", False):
30- sd_path = '"%s"' % os.path.join(os.path.dirname(
31- os.path.abspath(sys.executable)),
32- "ubuntuone-syncdaemon.exe")
33 u1cp_path = '"%s"' % os.path.join(os.path.dirname(
34 os.path.abspath(sys.executable)),
35 "ubuntuone-control-panel-qt.exe")
36@@ -113,6 +110,5 @@
37 with _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, AUTORUN_KEY,
38 0, _winreg.KEY_ALL_ACCESS) as key:
39 # pylint: disable=E0602
40- _winreg.SetValueEx(key, "Ubuntu One", 0, _winreg.REG_SZ, sd_path)
41 _winreg.SetValueEx(key, "Ubuntu One Icon", 0, _winreg.REG_SZ,
42- u1cp_path + " --minimized --with-icon")
43+ u1cp_path + " --with-icon")

Subscribers

People subscribed via source and target branches