Merge lp:~mandel/ubuntuone-windows-installer/fix_655853 into lp:ubuntuone-windows-installer/beta

Proposed by Manuel de la Peña
Status: Merged
Approved by: Manuel de la Peña
Approved revision: 114
Merged at revision: 104
Proposed branch: lp:~mandel/ubuntuone-windows-installer/fix_655853
Merge into: lp:ubuntuone-windows-installer/beta
Prerequisite: lp:~mandel/ubuntuone-windows-installer/fix_655842
Diff against target: 106 lines (+17/-15)
4 files modified
src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml (+6/-4)
src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs (+8/-4)
src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs (+3/-3)
src/Canonical.UbuntuOne.Common/Utils/Explorer.cs (+0/-4)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/fix_655853
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+38209@code.launchpad.net

Description of the change

Fix lp:655853 by connecting the presenter with the UI. Disable open shares until sync daemon has been ported.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml'
2--- src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml 2010-10-05 18:11:43 +0000
3+++ src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml 2010-10-12 12:16:43 +0000
4@@ -44,10 +44,12 @@
5 Header="{x:Static resx:Resources.UbuntuOnePreferences}" />
6 <MenuItem x:Uid="OpenShareManueItem"
7 Name="OpenShareManueItem"
8- Header="{x:Static resx:Resources.OpenShares}" />
9+ Header="{x:Static resx:Resources.OpenShares}"
10+ IsEnabled="False"/> <!-- TODO: open the shares when ever syncdaemon ha been ported-->
11 <MenuItem x:Uid="OpenSyncMenuItem"
12 Name="OpenSyncMenuItem"
13- Header="{x:Static resx:Resources.OpenSync}" />
14+ Header="{x:Static resx:Resources.OpenSync}"
15+ Click="OnOpenShareManueItemClick"/>
16 <Separator />
17 <MenuItem Name="StateMenuItem"
18 Header="State"/> <!-- Out sync, sync in progress (animate), everything up to date, error -->
19@@ -63,11 +65,11 @@
20 <MenuItem x:Uid="HelpMenuItem"
21 Name="HelpMenuItem"
22 Header="{x:Static resx:Resources.Help}"
23- Click="HelpMenuItemClick"/>
24+ Click="OnHelpMenuItemClick"/>
25 <MenuItem x:Uid="MoreSpaceMenuItem"
26 Name="MoreSpaceMenuItem"
27 Header="{x:Static resx:Resources.MoreSpace}"
28- Click="MoreSpaceMenuItemClick"/>
29+ Click="OnMoreSpaceMenuItemClick"/>
30 <MenuItem x:Uid="ExitMenuItem"
31 Name="ExitMenuItem"
32 Header="{x:Static resx:Resources.Exit}"
33
34=== modified file 'src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs'
35--- src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs 2010-10-05 18:11:43 +0000
36+++ src/Canonical.UbuntuOne.Client.Views/NotifyIcon.xaml.cs 2010-10-12 12:16:43 +0000
37@@ -17,8 +17,6 @@
38 // Authors: Manuel de la Peña <manuel.delapena@canonical.com>
39 using System;
40 using System.Collections.Generic;
41-using System.Diagnostics;
42-using System.IO;
43 using Canonical.UbuntuOne.Client.Notification;
44
45 namespace Canonical.UbuntuOne.Client.Views
46@@ -96,14 +94,20 @@
47 NotificationIconPresenter.Exit();
48 }
49
50- private void HelpMenuItemClick(object sender, System.Windows.RoutedEventArgs e)
51+ private void OnHelpMenuItemClick(object sender, System.Windows.RoutedEventArgs e)
52 {
53 NotificationIconPresenter.OpenHelp();
54 }
55
56- private void MoreSpaceMenuItemClick(object sender, System.Windows.RoutedEventArgs e)
57+ private void OnMoreSpaceMenuItemClick(object sender, System.Windows.RoutedEventArgs e)
58 {
59 NotificationIconPresenter.OpenUpgradeOption();
60 }
61+
62+ private void OnOpenShareManueItemClick(object sender, System.Windows.RoutedEventArgs e)
63+ {
64+ NotificationIconPresenter.OpenSyncsLocation();
65+ }
66+
67 }
68 }
69
70=== modified file 'src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs'
71--- src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-10-12 12:16:42 +0000
72+++ src/Canonical.UbuntuOne.Client/Notification/NotificationIconPresenter.cs 2010-10-12 12:16:43 +0000
73@@ -170,7 +170,7 @@
74 static NotificationIconPresenter()
75 {
76 SharesLocation = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
77- SyncsLocation = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
78+ SyncsLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UbuntuOne");
79 }
80
81 #endregion
82@@ -314,8 +314,8 @@
83 {
84 Logger.WarnFormat("There was an error operning the SharesLocation, {0}", exception);
85 // use the view to notify the error
86- NotificationIconView.Notification = String.Format(NotificationResources.ErrorOpeningFolder,
87- Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
88+ MessageBox.ShowError(String.Format(NotificationResources.ErrorOpeningFolder,
89+ Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)));
90 throw;
91 }
92 }
93
94=== modified file 'src/Canonical.UbuntuOne.Common/Utils/Explorer.cs'
95--- src/Canonical.UbuntuOne.Common/Utils/Explorer.cs 2010-09-08 08:24:05 +0000
96+++ src/Canonical.UbuntuOne.Common/Utils/Explorer.cs 2010-10-12 12:16:43 +0000
97@@ -37,10 +37,6 @@
98 /// </summary>
99 public void OpenFolder(string folderFullPath)
100 {
101- if(!File.Exists(folderFullPath))
102- {
103- throw new ExplorerException("File not found.");
104- }
105 Process.Start(ExplorerProcess, folderFullPath);
106 }
107

Subscribers

People subscribed via source and target branches

to all changes: