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

Proposed by Manuel de la Peña
Status: Merged
Approved by: Stuart Colville
Approved revision: 48
Merged at revision: 45
Proposed branch: lp:~mandel/ubuntuone-windows-installer/systray_integrate_spring
Merge into: lp:ubuntuone-windows-installer/beta
Prerequisite: lp:~mandel/ubuntuone-windows-installer/systray_icon_core
Diff against target: 148 lines (+84/-1)
5 files modified
src/UbuntuOneClient/App.config (+23/-0)
src/UbuntuOneClient/Config/log4net.config (+29/-0)
src/UbuntuOneClient/Program.cs (+7/-1)
src/UbuntuOneClient/UbuntuOneClient.csproj (+19/-0)
src/UbuntuOneClient/objects.xml (+6/-0)
To merge this branch: bzr merge lp:~mandel/ubuntuone-windows-installer/systray_integrate_spring
Reviewer Review Type Date Requested Status
Stuart Colville (community) Approve
Vincenzo Di Somma (community) Approve
Review via email: mp+31123@code.launchpad.net

Description of the change

This branch adds the use of Spring.Net as the IoC used in the client (NotifyIcon).

To post a comment you must log in.
48. By Manuel de la Peña

Adapt the name of the log file used.

Revision history for this message
Vincenzo Di Somma (vds) :
review: Approve
Revision history for this message
Stuart Colville (muffinresearch) wrote :

Few warnings:

  [msbuild] (CoreCompile target) ->
  [msbuild] Notification\NotificationIconPresenter.cs(50,58): warning CS0067:
The event 'Canonical.UbuntuOne.Client.Notification.NotificationIconPresenter.OnN
otificationChanged' is never used
  [msbuild] Notification\NotificationIconPresenter.cs(51,51): warning CS0067:
The event 'Canonical.UbuntuOne.Client.Notification.NotificationIconPresenter.OnS
tateChanged' is never used
  [msbuild] Notification\NotificationIconPresenter.cs(52,67): warning CS0067:
The event 'Canonical.UbuntuOne.Client.Notification.NotificationIconPresenter.OnC
ompletenessChanged' is never used
  [msbuild] Notification\NotificationIconPresenter.cs(53,62): warning CS0067:
The event 'Canonical.UbuntuOne.Client.Notification.NotificationIconPresenter.OnR
ecentlyModifiedChanged' is never used
  [msbuild]
  [msbuild] 4 Warning(s)
  [msbuild] 0 Error(s)
  [msbuild]
  [msbuild] Time Elapsed 00:00:17.95

BUILD SUCCEEDED

Otherwise builds and tests ok.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'src/UbuntuOneClient/App.config'
2--- src/UbuntuOneClient/App.config 1970-01-01 00:00:00 +0000
3+++ src/UbuntuOneClient/App.config 2010-07-28 07:58:44 +0000
4@@ -0,0 +1,23 @@
5+<?xml version="1.0" encoding="utf-8" ?>
6+<configuration>
7+ <configSections>
8+ <sectionGroup name="spring">
9+ <section name="parsers"
10+ type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
11+ <section name="context"
12+ type="Spring.Context.Support.ContextHandler, Spring.Core"/>
13+ <section name="objects"
14+ type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
15+ </sectionGroup>
16+ <sectionGroup name="common">
17+ <section name="logging"
18+ type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
19+ </sectionGroup>
20+ </configSections>
21+ <spring>
22+ <context>
23+ <resource uri="assembly://UbuntuOneClient/UbuntuOneClient/objects.xml" />
24+ </context>
25+
26+ </spring>
27+</configuration>
28\ No newline at end of file
29
30=== added directory 'src/UbuntuOneClient/Config'
31=== added file 'src/UbuntuOneClient/Config/log4net.config'
32--- src/UbuntuOneClient/Config/log4net.config 1970-01-01 00:00:00 +0000
33+++ src/UbuntuOneClient/Config/log4net.config 2010-07-28 07:58:44 +0000
34@@ -0,0 +1,29 @@
35+<?xml version="1.0" encoding="utf-8" ?>
36+<log4net>
37+ <appender name="RollingFileAppender"
38+ type="log4net.Appender.RollingFileAppender">
39+ <file value="Logs/Client.log" />
40+ <appendToFile value="true" />
41+ <rollingStyle value="Size" />
42+ <maxSizeRollBackups value="10" />
43+ <maximumFileSize value="2MB" />
44+ <staticLogFileName value="true" />
45+ <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
46+ <layout type="log4net.Layout.PatternLayout">
47+ <conversionPattern value="%date{yyyy-MM-dd HH:mm:ss} [%4thread] [%5level] %logger - %message%newline" />
48+ </layout>
49+ </appender>
50+
51+ <root>
52+ <level value="ALL" />
53+ <appender-ref ref="RollingFileAppender" />
54+ </root>
55+ <logger name="Spring">
56+ <level value="WARN" />
57+ <appender-ref ref="RollingFileAppender" />
58+ </logger>
59+ <logger name="NHibernate">
60+ <level value="WARN" />
61+ <appender-ref ref="RollingFileAppender" />
62+ </logger>
63+</log4net>
64\ No newline at end of file
65
66=== modified file 'src/UbuntuOneClient/Program.cs'
67--- src/UbuntuOneClient/Program.cs 2010-07-28 07:58:44 +0000
68+++ src/UbuntuOneClient/Program.cs 2010-07-28 07:58:44 +0000
69@@ -20,16 +20,22 @@
70 using System;
71 using System.Windows;
72 using Canonical.UbuntuOne.Client.Views;
73+using Canonical.UbuntuOne.Common.Container;
74+using log4net;
75
76 namespace UbuntuOneClient
77 {
78 class Program
79 {
80+ private static ILog _logger = LogManager.GetLogger(typeof(Program));
81+
82 [STAThread]
83 static void Main()
84 {
85+ _logger.Debug("Starting client application.");
86+ ObjectsContainer.Initialize(new SpringContainer());
87+ var notifyIcon = ObjectsContainer.GetImplementationOf<UbuntuOneNotifyIcon>();
88 var app = new Application {ShutdownMode = ShutdownMode.OnExplicitShutdown};
89- var notifyIcon = new UbuntuOneNotifyIcon();
90 app.Run(notifyIcon);
91 }
92 }
93
94=== modified file 'src/UbuntuOneClient/UbuntuOneClient.csproj'
95--- src/UbuntuOneClient/UbuntuOneClient.csproj 2010-07-28 07:58:44 +0000
96+++ src/UbuntuOneClient/UbuntuOneClient.csproj 2010-07-28 07:58:44 +0000
97@@ -37,6 +37,14 @@
98 <SpecificVersion>False</SpecificVersion>
99 <HintPath>..\..\lib\WPFContrib\AvalonLibrary.dll</HintPath>
100 </Reference>
101+ <Reference Include="Common.Logging.Log4Net, Version=1.2.0.2, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
102+ <SpecificVersion>False</SpecificVersion>
103+ <HintPath>..\..\lib\Spring.Net\Common.Logging.Log4Net.dll</HintPath>
104+ </Reference>
105+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
106+ <SpecificVersion>False</SpecificVersion>
107+ <HintPath>..\..\lib\log4net\log4net.dll</HintPath>
108+ </Reference>
109 <Reference Include="System" />
110 <Reference Include="System.Core">
111 <RequiredTargetFramework>3.5</RequiredTargetFramework>
112@@ -73,6 +81,10 @@
113 <LastGenOutput>Resources.Designer.cs</LastGenOutput>
114 <SubType>Designer</SubType>
115 </EmbeddedResource>
116+ <None Include="App.config" />
117+ <None Include="Config\log4net.config">
118+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
119+ </None>
120 <None Include="Properties\Settings.settings">
121 <Generator>SettingsSingleFileGenerator</Generator>
122 <LastGenOutput>Settings.Designer.cs</LastGenOutput>
123@@ -84,6 +96,13 @@
124 <Project>{1F0E3DAF-F22F-4B0C-8039-118B082DA237}</Project>
125 <Name>Canonical.UbuntuOne.Client.Views</Name>
126 </ProjectReference>
127+ <ProjectReference Include="..\Canonical.UbuntuOne.Common\Canonical.UbuntuOne.Common.csproj">
128+ <Project>{11353FF8-8E5A-488E-9CB1-873DADD232B9}</Project>
129+ <Name>Canonical.UbuntuOne.Common</Name>
130+ </ProjectReference>
131+ </ItemGroup>
132+ <ItemGroup>
133+ <EmbeddedResource Include="objects.xml" />
134 </ItemGroup>
135 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
136 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
137
138=== added file 'src/UbuntuOneClient/objects.xml'
139--- src/UbuntuOneClient/objects.xml 1970-01-01 00:00:00 +0000
140+++ src/UbuntuOneClient/objects.xml 2010-07-28 07:58:44 +0000
141@@ -0,0 +1,6 @@
142+<?xml version="1.0" encoding="utf-8" ?>
143+<objects xmlns="http://www.springframework.net">
144+ <!-- Define window that will be used as the start point of the app -->
145+ <object id="UbuntuOneNotifyIcon"
146+ type="Canonical.UbuntuOne.Client.Views.UbuntuOneNotifyIcon, Canonical.UbuntuOne.Client.Views" />
147+</objects>
148\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: