Do

Merge lp:~alexlauni/do/package-manager-service into lp:do

Proposed by Alex Launi
Status: Merged
Merged at revision: not available
Proposed branch: lp:~alexlauni/do/package-manager-service
Merge into: lp:do
Diff against target: None lines
To merge this branch: bzr merge lp:~alexlauni/do/package-manager-service
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Chris Halse Rogers Needs Fixing
Review via email: mp+7852@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) wrote :

Interface for hooking into the package manager, and a reference implementation for JoliCloud.

Revision history for this message
Chris Halse Rogers (raof) wrote :

 review needsfixing

Is this a merge for both PluginManagerService and PackageManagerService?
If so, could we merge PluginManagerService separately, and then merge
PackageManagerService after that has landed?

You've added Do.Linux.JoliCloud/Makefile.in to bzr. That's not very
useful :).

In
Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs:

I don't much like the magical Daemon property, particularly since you
need to document it with the comment
"""
// this call will instantiate the daemon, as well as make sure we also
got a DBus object
"""
in Initialize (). Is there any particular reason that Initialise can't
initialise the daemon explicitly?

In MaybeStartDaemon (), is it possibly to ask DBus to wait for an owner
of BusName rather than just sleeping for 5 seconds? I'm not sure if it
is, but I'd find it cleaner.

In Do.Platform/src/Do.Platform/AbstractPackageManagerService.cs:
MaybePluginForPackage (string): It might be worthwhile extending the
plugin API to allow a plugin itself to provide a list of packages that
it supports, as well as this magic name/description matching.

What happens if multiple addins support a new package?

This comment from PluginManagerService.cs seems wrong?
/// If this class loads, we have a serious plugin because that probably
means we have no plugin manager.

review: Needs Fixing
Revision history for this message
Alex Launi (alexlauni) wrote :

> review needsfixing
>
> Is this a merge for both PluginManagerService and PackageManagerService?
> If so, could we merge PluginManagerService separately, and then merge
> PackageManagerService after that has landed?

There is already a pending merge for PluginManagerService, this merge depends on it.

> You've added Do.Linux.JoliCloud/Makefile.in to bzr. That's not very
> useful :).

Whoops. Removed.

> In Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs:
>
> I don't much like the magical Daemon property, particularly since you
> need to document it with the comment
> """
> // this call will instantiate the daemon, as well as make sure we also
> got a DBus object
> """
> in Initialize (). Is there any particular reason that Initialise can't
> initialise the daemon explicitly?

I did it this way to avoid the duplication of adding the event, etc. It seems cleaner to me.

> In MaybeStartDaemon (), is it possibly to ask DBus to wait for an owner
> of BusName rather than just sleeping for 5 seconds? I'm not sure if it
> is, but I'd find it cleaner.

I don't think it's possible, this is how Banshee does it, but I'm pretty sure I can safely remove that sleep call if it'd make you feel better.

> In Do.Platform/src/Do.Platform/AbstractPackageManagerService.cs:
> MaybePluginForPackage (string): It might be worthwhile extending the
> plugin API to allow a plugin itself to provide a list of packages that
> it supports, as well as this magic name/description matching.

I had mentioned this in irc, perhaps in the plugin manifest adding an element/attribute of keywords that could be used. This could also be handy in the search.

> What happens if multiple addins support a new package?

We take the first.

> This comment from PluginManagerService.cs seems wrong?
> /// If this class loads, we have a serious plugin because that probably
> means we have no plugin manager.

This is a comment for the Plugin Manager merge, but I'll fix it there

1266. By Alex Launi

merge trunk

1267. By Alex Launi

add makefile.am

1268. By Alex Launi

remove Makefile.in

1269. By Alex Launi

removed Sleep and exception if no service found

1270. By Alex Launi

merge plugin manager changes

1271. By Alex Launi

fix a logic error that lead to an NRE

1272. By Alex Launi

added package->plugin map for jolicloud

1273. By Alex Launi

edit comment

1274. By Alex Launi

umm...

1275. By Alex Launi

merge trunk

1276. By Alex Launi

merge trunk

1277. By Alex Launi

merge updates from plugin-manager

1278. By Alex Launi

Show distributor logo on plugin-available dialog to help user associate the reason for the popup

1279. By Alex Launi

Only subscribe to package installed event once

1280. By Alex Launi

add cleanup routine for PackageManagerService

1281. By Alex Launi

merge trunk

Revision history for this message
Jason Smith (jassmith) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'Do.Platform.Linux.JoliCloud'
=== added file 'Do.Platform.Linux.JoliCloud/Do.Platform.Linux.JoliCloud.mdp'
--- Do.Platform.Linux.JoliCloud/Do.Platform.Linux.JoliCloud.mdp 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/Do.Platform.Linux.JoliCloud.mdp 2009-06-23 16:27:37 +0000
@@ -0,0 +1,33 @@
1<Project name="Do.Platform.Linux.JoliCloud" fileversion="2.0" language="C#" targetFramework="2.0" ctype="DotNetProject">
2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="bin/Debug" assembly="Do.Platform.Linux.JoliCloud" />
5 <Build debugmode="True" target="Exe" />
6 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">
10 <Output directory="bin/Release" assembly="Do.Platform.Linux.JoliCloud" />
11 <Build debugmode="False" target="Exe" />
12 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" />
13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>
15 </Configurations>
16 <Contents>
17 <File name="Resources" subtype="Directory" buildaction="Compile" />
18 <File name="src" subtype="Directory" buildaction="Compile" />
19 <File name="src/Do.Platform" subtype="Directory" buildaction="Compile" />
20 <File name="src/Do.Platform/Do.Platform.Linux" subtype="Directory" buildaction="Compile" />
21 <File name="src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud" subtype="Directory" buildaction="Compile" />
22 <File name="Resources/Do.Platform.Linux.JoliCloud.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
23 <File name="src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs" subtype="Code" buildaction="Compile" />
24 <File name="src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests" subtype="Directory" buildaction="Compile" />
25 <File name="src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs" subtype="Code" buildaction="Compile" />
26 </Contents>
27 <References>
28 <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../../usr/local/lib/gnome-do/Do.Platform.dll" />
29 <ProjectReference type="Gac" localcopy="True" refto="NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099" />
30 <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../../usr/local/lib/gnome-do/Do.Platform.Linux.dll" />
31 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
32 </References>
33</Project>
0\ No newline at end of file34\ No newline at end of file
135
=== added file 'Do.Platform.Linux.JoliCloud/Makefile.in'
--- Do.Platform.Linux.JoliCloud/Makefile.in 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/Makefile.in 2009-06-23 16:49:14 +0000
@@ -0,0 +1,588 @@
1# Makefile.in generated by automake 1.10.2 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17# Rules to more easily specify a C# build for automake.
18#
19# Inspired and adapted from Banshee's build system
20
21
22VPATH = @srcdir@
23pkgdatadir = $(datadir)/@PACKAGE@
24pkglibdir = $(libdir)/@PACKAGE@
25pkgincludedir = $(includedir)/@PACKAGE@
26am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
27install_sh_DATA = $(install_sh) -c -m 644
28install_sh_PROGRAM = $(install_sh) -c
29install_sh_SCRIPT = $(install_sh) -c
30INSTALL_HEADER = $(INSTALL_DATA)
31transform = $(program_transform_name)
32NORMAL_INSTALL = :
33PRE_INSTALL = :
34POST_INSTALL = :
35NORMAL_UNINSTALL = :
36PRE_UNINSTALL = :
37POST_UNINSTALL = :
38build_triplet = @build@
39host_triplet = @host@
40DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
41 $(top_srcdir)/build.rules.mk
42@ENABLE_DEBUG_TRUE@am__append_1 = -debug -d:DEBUG
43@HAVE_NUNIT_TRUE@am__append_2 = \
44@HAVE_NUNIT_TRUE@ src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs
45
46subdir = Do.Platform.Linux.JoliCloud
47ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
48am__aclocal_m4_deps = $(top_srcdir)/m4/shamrock/expansions.m4 \
49 $(top_srcdir)/m4/shamrock/i18n.m4 \
50 $(top_srcdir)/m4/shamrock/mono.m4 \
51 $(top_srcdir)/m4/shamrock/programs.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_CLEAN_FILES =
57am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" \
58 "$(DESTDIR)$(pkgconfigdir)"
59moduleSCRIPT_INSTALL = $(INSTALL_SCRIPT)
60SCRIPTS = $(module_SCRIPTS)
61SOURCES =
62DIST_SOURCES =
63am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
64am__vpath_adj = case $$p in \
65 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
66 *) f=$$p;; \
67 esac;
68am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
69moduleDATA_INSTALL = $(INSTALL_DATA)
70pkgconfigDATA_INSTALL = $(INSTALL_DATA)
71DATA = $(module_DATA) $(pkgconfig_DATA)
72DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
73ABI_VERSION = @ABI_VERSION@
74ACLOCAL = @ACLOCAL@
75ALL_LINGUAS = @ALL_LINGUAS@
76AMTAR = @AMTAR@
77AR = @AR@
78AUTOCONF = @AUTOCONF@
79AUTOHEADER = @AUTOHEADER@
80AUTOMAKE = @AUTOMAKE@
81AWK = @AWK@
82CATALOGS = @CATALOGS@
83CATOBJEXT = @CATOBJEXT@
84CC = @CC@
85CCDEPMODE = @CCDEPMODE@
86CFLAGS = @CFLAGS@
87CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
88CPP = @CPP@
89CPPFLAGS = @CPPFLAGS@
90CYGPATH_W = @CYGPATH_W@
91DATADIRNAME = @DATADIRNAME@
92DEFS = @DEFS@
93DEPDIR = @DEPDIR@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99EGREP = @EGREP@
100EXEEXT = @EXEEXT@
101FGREP = @FGREP@
102GCONFTOOL = @GCONFTOOL@
103GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
104GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
105GCONF_SHARP_20_CFLAGS = @GCONF_SHARP_20_CFLAGS@
106GCONF_SHARP_20_LIBS = @GCONF_SHARP_20_LIBS@
107GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
108GLADE_SHARP_20_CFLAGS = @GLADE_SHARP_20_CFLAGS@
109GLADE_SHARP_20_LIBS = @GLADE_SHARP_20_LIBS@
110GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@
111GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@
112GMOFILES = @GMOFILES@
113GMSGFMT = @GMSGFMT@
114GNOME_DESKTOP_SHARP_20_CFLAGS = @GNOME_DESKTOP_SHARP_20_CFLAGS@
115GNOME_DESKTOP_SHARP_20_LIBS = @GNOME_DESKTOP_SHARP_20_LIBS@
116GNOME_KEYRING_SHARP_CFLAGS = @GNOME_KEYRING_SHARP_CFLAGS@
117GNOME_KEYRING_SHARP_LIBS = @GNOME_KEYRING_SHARP_LIBS@
118GNOME_SHARP_20_CFLAGS = @GNOME_SHARP_20_CFLAGS@
119GNOME_SHARP_20_LIBS = @GNOME_SHARP_20_LIBS@
120GNOME_VFS_SHARP_20_CFLAGS = @GNOME_VFS_SHARP_20_CFLAGS@
121GNOME_VFS_SHARP_20_LIBS = @GNOME_VFS_SHARP_20_LIBS@
122GREP = @GREP@
123GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@
124GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@
125INSTALL = @INSTALL@
126INSTALL_DATA = @INSTALL_DATA@
127INSTALL_PROGRAM = @INSTALL_PROGRAM@
128INSTALL_SCRIPT = @INSTALL_SCRIPT@
129INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
130INSTOBJEXT = @INSTOBJEXT@
131INTLLIBS = @INTLLIBS@
132INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
133INTLTOOL_MERGE = @INTLTOOL_MERGE@
134INTLTOOL_PERL = @INTLTOOL_PERL@
135INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBDO_CFLAGS = @LIBDO_CFLAGS@
139LIBDO_LIBS = @LIBDO_LIBS@
140LIBOBJS = @LIBOBJS@
141LIBRSVG_SHARP_CFLAGS = @LIBRSVG_SHARP_CFLAGS@
142LIBRSVG_SHARP_LIBS = @LIBRSVG_SHARP_LIBS@
143LIBS = @LIBS@
144LIBTOOL = @LIBTOOL@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MCS = @MCS@
150MKDIR_P = @MKDIR_P@
151MKINSTALLDIRS = @MKINSTALLDIRS@
152MONO = @MONO@
153MONO_ADDINS_CFLAGS = @MONO_ADDINS_CFLAGS@
154MONO_ADDINS_GUI_CFLAGS = @MONO_ADDINS_GUI_CFLAGS@
155MONO_ADDINS_GUI_LIBS = @MONO_ADDINS_GUI_LIBS@
156MONO_ADDINS_LIBS = @MONO_ADDINS_LIBS@
157MONO_ADDINS_SETUP_CFLAGS = @MONO_ADDINS_SETUP_CFLAGS@
158MONO_ADDINS_SETUP_LIBS = @MONO_ADDINS_SETUP_LIBS@
159MSGFMT = @MSGFMT@
160MSGFMT_OPTS = @MSGFMT_OPTS@
161MSGMERGE = @MSGMERGE@
162NDESK_DBUS_10_CFLAGS = @NDESK_DBUS_10_CFLAGS@
163NDESK_DBUS_10_LIBS = @NDESK_DBUS_10_LIBS@
164NDESK_DBUS_GLIB_10_CFLAGS = @NDESK_DBUS_GLIB_10_CFLAGS@
165NDESK_DBUS_GLIB_10_LIBS = @NDESK_DBUS_GLIB_10_LIBS@
166NM = @NM@
167NMEDIT = @NMEDIT@
168NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@
169NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@
170NUNIT_CFLAGS = @NUNIT_CFLAGS@
171NUNIT_LIBS = @NUNIT_LIBS@
172OBJDUMP = @OBJDUMP@
173OBJEXT = @OBJEXT@
174OTOOL = @OTOOL@
175OTOOL64 = @OTOOL64@
176PACKAGE = @PACKAGE@
177PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
178PACKAGE_NAME = @PACKAGE_NAME@
179PACKAGE_STRING = @PACKAGE_STRING@
180PACKAGE_TARNAME = @PACKAGE_TARNAME@
181PACKAGE_VERSION = @PACKAGE_VERSION@
182PATH_SEPARATOR = @PATH_SEPARATOR@
183PKG_CONFIG = @PKG_CONFIG@
184POFILES = @POFILES@
185POSUB = @POSUB@
186PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
187PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
188RANLIB = @RANLIB@
189SED = @SED@
190SET_MAKE = @SET_MAKE@
191SHELL = @SHELL@
192STRIP = @STRIP@
193USE_NLS = @USE_NLS@
194VERSION = @VERSION@
195VERSION_INFO = @VERSION_INFO@
196WNCK_SHARP_10_CFLAGS = @WNCK_SHARP_10_CFLAGS@
197WNCK_SHARP_10_LIBS = @WNCK_SHARP_10_LIBS@
198XGETTEXT = @XGETTEXT@
199abs_builddir = @abs_builddir@
200abs_srcdir = @abs_srcdir@
201abs_top_builddir = @abs_top_builddir@
202abs_top_srcdir = @abs_top_srcdir@
203ac_ct_CC = @ac_ct_CC@
204ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
205am__include = @am__include@
206am__leading_dot = @am__leading_dot@
207am__quote = @am__quote@
208am__tar = @am__tar@
209am__untar = @am__untar@
210bindir = @bindir@
211build = @build@
212build_alias = @build_alias@
213build_cpu = @build_cpu@
214build_os = @build_os@
215build_vendor = @build_vendor@
216builddir = @builddir@
217datadir = @datadir@
218datarootdir = @datarootdir@
219docdir = @docdir@
220dvidir = @dvidir@
221exec_prefix = @exec_prefix@
222expanded_bindir = @expanded_bindir@
223expanded_datadir = @expanded_datadir@
224expanded_libdir = @expanded_libdir@
225host = @host@
226host_alias = @host_alias@
227host_cpu = @host_cpu@
228host_os = @host_os@
229host_vendor = @host_vendor@
230htmldir = @htmldir@
231includedir = @includedir@
232infodir = @infodir@
233install_sh = @install_sh@
234libdir = @libdir@
235libexecdir = @libexecdir@
236localedir = @localedir@
237localstatedir = @localstatedir@
238lt_ECHO = @lt_ECHO@
239mandir = @mandir@
240mkdir_p = @mkdir_p@
241oldincludedir = @oldincludedir@
242pdfdir = @pdfdir@
243prefix = @prefix@
244program_transform_name = @program_transform_name@
245psdir = @psdir@
246sbindir = @sbindir@
247sharedstatedir = @sharedstatedir@
248srcdir = @srcdir@
249sysconfdir = @sysconfdir@
250target_alias = @target_alias@
251top_build_prefix = @top_build_prefix@
252top_builddir = @top_builddir@
253top_srcdir = @top_srcdir@
254SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES))
255RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
256RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
257 -resource:$(resource),$(notdir $(resource)))
258
259BUILD_DIR = $(top_builddir)/build
260ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
261ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
262STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref))
263BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES))
264COMPONENT_REFERENCES = $(foreach ref, $(PROJECT_REFERENCES),-r:$(BUILD_DIR)/$(ref).dll)
265COMPONENT_DEPS = $(foreach ref,$(PROJECT_REFERENCES),$(BUILD_DIR)/$(ref).dll)
266OUTPUT_FILES = \
267 $(ASSEMBLY_FILE) \
268 $(ASSEMBLY_FILE).mdb
269
270moduledir = $(pkglibdir)
271# Install libraries as data; there's no need for them to be excutable
272module_DATA = $(foreach file,$(filter %.dll,$(OUTPUT_FILES)),$(file) $(file).mdb) $(foreach file,$(filter %.exe,$(OUTPUT_FILES)),$(file).mdb)
273# Install executables as scripts
274module_SCRIPTS = $(filter %.exe,$(OUTPUT_FILES))
275MCS_FLAGS = $(MCS_LINQ_FLAG) -noconfig -codepage:utf8 -warn:4 \
276 $(am__append_1)
277
278#
279# pkg-config handling
280#
281pkgconfigdir = $(libdir)/pkgconfig
282pkgconfig_DATA = $(PKG_CONFIG_FILES)
283
284#
285# Clean and dist targets
286#
287EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) \
288 $(foreach pkgcfg_file, $(PKG_CONFIG_FILES), $(pkgcfg_file).in)
289
290CLEANFILES = $(OUTPUT_FILES) $(pkgconfig_DATA)
291DISTCLEANFILES = *.pidb
292MAINTAINERCLEANFILES = Makefile.in
293
294# Simple component buildsystem
295ASSEMBLY = Do.Platform.Linux.JoliCloud
296TARGET = library
297FILES = src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs \
298 $(am__append_2)
299RESOURCES = \
300 Resources/Do.Platform.Linux.JoliCloud.addin.xml
301
302PKG_CONFIG_FILES = do.platform.linux.jolicloud.pc
303REFERENCES = \
304 System \
305 System.Core \
306 Mono.Posix \
307 $(MONO_ADDINS_LIBS) \
308 $(NDESK_DBUS_10_LIBS) \
309 $(NUNIT_LIBS)
310
311PROJECT_REFERENCES = \
312 Do.Platform \
313 Do.Platform.Linux
314
315all: all-am
316
317.SUFFIXES:
318$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build.rules.mk $(am__configure_deps)
319 @for dep in $?; do \
320 case '$(am__configure_deps)' in \
321 *$$dep*) \
322 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
323 && { if test -f $@; then exit 0; else break; fi; }; \
324 exit 1;; \
325 esac; \
326 done; \
327 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Do.Platform.Linux.JoliCloud/Makefile'; \
328 cd $(top_srcdir) && \
329 $(AUTOMAKE) --foreign Do.Platform.Linux.JoliCloud/Makefile
330.PRECIOUS: Makefile
331Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
332 @case '$?' in \
333 *config.status*) \
334 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
335 *) \
336 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
337 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
338 esac;
339
340$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
341 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
342
343$(top_srcdir)/configure: $(am__configure_deps)
344 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
345$(ACLOCAL_M4): $(am__aclocal_m4_deps)
346 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
347install-moduleSCRIPTS: $(module_SCRIPTS)
348 @$(NORMAL_INSTALL)
349 test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
350 @list='$(module_SCRIPTS)'; for p in $$list; do \
351 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
352 if test -f $$d$$p; then \
353 f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
354 echo " $(moduleSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(moduledir)/$$f'"; \
355 $(moduleSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(moduledir)/$$f"; \
356 else :; fi; \
357 done
358
359uninstall-moduleSCRIPTS:
360 @$(NORMAL_UNINSTALL)
361 @list='$(module_SCRIPTS)'; for p in $$list; do \
362 f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
363 echo " rm -f '$(DESTDIR)$(moduledir)/$$f'"; \
364 rm -f "$(DESTDIR)$(moduledir)/$$f"; \
365 done
366
367mostlyclean-libtool:
368 -rm -f *.lo
369
370clean-libtool:
371 -rm -rf .libs _libs
372install-moduleDATA: $(module_DATA)
373 @$(NORMAL_INSTALL)
374 test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
375 @list='$(module_DATA)'; for p in $$list; do \
376 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
377 f=$(am__strip_dir) \
378 echo " $(moduleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(moduledir)/$$f'"; \
379 $(moduleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(moduledir)/$$f"; \
380 done
381
382uninstall-moduleDATA:
383 @$(NORMAL_UNINSTALL)
384 @list='$(module_DATA)'; for p in $$list; do \
385 f=$(am__strip_dir) \
386 echo " rm -f '$(DESTDIR)$(moduledir)/$$f'"; \
387 rm -f "$(DESTDIR)$(moduledir)/$$f"; \
388 done
389install-pkgconfigDATA: $(pkgconfig_DATA)
390 @$(NORMAL_INSTALL)
391 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
392 @list='$(pkgconfig_DATA)'; for p in $$list; do \
393 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
394 f=$(am__strip_dir) \
395 echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
396 $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
397 done
398
399uninstall-pkgconfigDATA:
400 @$(NORMAL_UNINSTALL)
401 @list='$(pkgconfig_DATA)'; for p in $$list; do \
402 f=$(am__strip_dir) \
403 echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
404 rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
405 done
406tags: TAGS
407TAGS:
408
409ctags: CTAGS
410CTAGS:
411
412
413distdir: $(DISTFILES)
414 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
415 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
416 list='$(DISTFILES)'; \
417 dist_files=`for file in $$list; do echo $$file; done | \
418 sed -e "s|^$$srcdirstrip/||;t" \
419 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
420 case $$dist_files in \
421 */*) $(MKDIR_P) `echo "$$dist_files" | \
422 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
423 sort -u` ;; \
424 esac; \
425 for file in $$dist_files; do \
426 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
427 if test -d $$d/$$file; then \
428 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
429 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
430 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
431 fi; \
432 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
433 else \
434 test -f $(distdir)/$$file \
435 || cp -p $$d/$$file $(distdir)/$$file \
436 || exit 1; \
437 fi; \
438 done
439check-am: all-am
440check: check-am
441all-am: Makefile $(SCRIPTS) $(DATA)
442installdirs:
443 for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(pkgconfigdir)"; do \
444 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
445 done
446install: install-am
447install-exec: install-exec-am
448install-data: install-data-am
449uninstall: uninstall-am
450
451install-am: all-am
452 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
453
454installcheck: installcheck-am
455install-strip:
456 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
457 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
458 `test -z '$(STRIP)' || \
459 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
460mostlyclean-generic:
461
462clean-generic:
463 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
464
465distclean-generic:
466 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
467 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
468
469maintainer-clean-generic:
470 @echo "This command is intended for maintainers to use"
471 @echo "it deletes files that may require special tools to rebuild."
472 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
473clean: clean-am
474
475clean-am: clean-generic clean-libtool mostlyclean-am
476
477distclean: distclean-am
478 -rm -f Makefile
479distclean-am: clean-am distclean-generic
480
481dvi: dvi-am
482
483dvi-am:
484
485html: html-am
486
487info: info-am
488
489info-am:
490
491install-data-am: install-moduleDATA install-moduleSCRIPTS \
492 install-pkgconfigDATA
493
494install-dvi: install-dvi-am
495
496install-exec-am:
497
498install-html: install-html-am
499
500install-info: install-info-am
501
502install-man:
503
504install-pdf: install-pdf-am
505
506install-ps: install-ps-am
507
508installcheck-am:
509
510maintainer-clean: maintainer-clean-am
511 -rm -f Makefile
512maintainer-clean-am: distclean-am maintainer-clean-generic
513
514mostlyclean: mostlyclean-am
515
516mostlyclean-am: mostlyclean-generic mostlyclean-libtool
517
518pdf: pdf-am
519
520pdf-am:
521
522ps: ps-am
523
524ps-am:
525
526uninstall-am: uninstall-moduleDATA uninstall-moduleSCRIPTS \
527 uninstall-pkgconfigDATA
528
529.MAKE: install-am install-strip
530
531.PHONY: all all-am check check-am clean clean-generic clean-libtool \
532 distclean distclean-generic distclean-libtool distdir dvi \
533 dvi-am html html-am info info-am install install-am \
534 install-data install-data-am install-dvi install-dvi-am \
535 install-exec install-exec-am install-html install-html-am \
536 install-info install-info-am install-man install-moduleDATA \
537 install-moduleSCRIPTS install-pdf install-pdf-am \
538 install-pkgconfigDATA install-ps install-ps-am install-strip \
539 installcheck installcheck-am installdirs maintainer-clean \
540 maintainer-clean-generic mostlyclean mostlyclean-generic \
541 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
542 uninstall-moduleDATA uninstall-moduleSCRIPTS \
543 uninstall-pkgconfigDATA
544
545
546all: $(ASSEMBLY_FILE)
547
548$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
549
550build-debug :
551 @echo $(COMPONENT_REFERENCES)
552
553$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS)
554 @mkdir -p $(BUILD_DIR)
555 @colors=no; \
556 case $$TERM in \
557 "xterm" | "rxvt" | "rxvt-unicode") \
558 test "x$$COLORTERM" != "x" && colors=yes ;; \
559 "xterm-color") colors=yes ;; \
560 esac; \
561 if [ "x$$colors" = "xyes" ]; then \
562 tty -s && true || { colors=no; true; } \
563 fi; \
564 test "x$$colors" = "xyes" && \
565 echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \
566 echo "Compiling $(notdir $@)...";
567 @$(MCS) $(MCS_FLAGS) -target:$(TARGET) -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) $(RESOURCES_BUILD) $(SOURCES_BUILD)
568 @if [ -e $(srcdir)/$(notdir $@.config) ]; then \
569 cp $(srcdir)/$(notdir $@.config) $(BUILD_DIR) ; \
570 fi;
571
572%.pc : %.pc.in
573 @colors=no; \
574 case $$TERM in \
575 "xterm" | "rxvt" | "rxvt-unicode") \
576 test "x$$COLORTERM" != "x" && colors=yes ;; \
577 "xterm-color") colors=yes ;; \
578 esac; \
579 if [ "x$$colors" = "xyes" ]; then \
580 tty -s && true || { colors=no; true; } \
581 fi; \
582 test "x$$colors" = "xyes" && \
583 echo -e "\033[1mGenerating $(notdir $@)...\033[0m" || \
584 echo "Generating $(notdir $@)...";
585 @sed "s,\@ABI_VERSION\@,$(ABI_VERSION),g; s,\@expanded_libdir\@,$(expanded_libdir),g; s,\@PACKAGE\@,$(PACKAGE),g" < $< > $@
586# Tell versions [3.59,3.63) of GNU make to not export all variables.
587# Otherwise a system limit (for SysV at least) may be exceeded.
588.NOEXPORT:
0589
=== added directory 'Do.Platform.Linux.JoliCloud/Resources'
=== added file 'Do.Platform.Linux.JoliCloud/Resources/Do.Platform.Linux.JoliCloud.addin.xml'
--- Do.Platform.Linux.JoliCloud/Resources/Do.Platform.Linux.JoliCloud.addin.xml 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/Resources/Do.Platform.Linux.JoliCloud.addin.xml 2009-06-22 15:51:57 +0000
@@ -0,0 +1,16 @@
1<Addin id="Platform.Linux.JoliCloud" namespace="Do" version="1.0" category="Hidden">
2
3 <Runtime>
4 <Import assembly="Do.Platform.Linux.JoliCloud.dll" />
5 </Runtime>
6
7 <Dependencies>
8 <Addin id="Platform" version="1.0" />
9 <Addin id="Universe" version="1.0" />
10 </Dependencies>
11
12 <Extension path="/Do/Service">
13 <Service type="Do.Platform.Linux.JoliCloud.PackageManagerService" />
14 </Extension>
15
16</Addin>
017
=== added file 'Do.Platform.Linux.JoliCloud/do.platform.linux.jolicloud.pc.in'
--- Do.Platform.Linux.JoliCloud/do.platform.linux.jolicloud.pc.in 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/do.platform.linux.jolicloud.pc.in 2009-06-22 15:51:57 +0000
@@ -0,0 +1,6 @@
1Name: Do.Platform.Linux.JoliCloud
2Description: JoliCloud-specific functionality
3Version: @ABI_VERSION@
4
5Requires: do.platform
6Libs: -r:@expanded_libdir@/@PACKAGE@/Do.Platform.Linux.JoliCloud.dll
07
=== added directory 'Do.Platform.Linux.JoliCloud/src'
=== added file 'Do.Platform.Linux.JoliCloud/src/AssemblyInfo.cs.in'
--- Do.Platform.Linux.JoliCloud/src/AssemblyInfo.cs.in 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/src/AssemblyInfo.cs.in 2009-06-24 14:55:58 +0000
@@ -0,0 +1,45 @@
1// AssemblyInfo.cs
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18//
19
20using System.Reflection;
21using System.Runtime.CompilerServices;
22
23// Information about this assembly is defined by the following attributes.
24// Change them to the values specific to your project.
25
26[assembly: AssemblyTitle("Do.Platform.Linux.JoliCloud")]
27[assembly: AssemblyDescription("")]
28[assembly: AssemblyConfiguration("")]
29[assembly: AssemblyCompany("")]
30[assembly: AssemblyProduct("")]
31[assembly: AssemblyCopyright("")]
32[assembly: AssemblyTrademark("")]
33[assembly: AssemblyCulture("")]
34
35// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
36// The form "{Major}.{Minor}.*" will automatically update the build and revision,
37// and "{Major}.{Minor}.{Build}.*" will update just the revision.
38
39[assembly: AssemblyVersion("@ABI_VERSION@.0.0")]
40
41// The following attributes are used to specify the signing key for the assembly,
42// if desired. See the Mono documentation for more information about signing.
43
44[assembly: AssemblyDelaySign(false)]
45[assembly: AssemblyKeyFile("")]
046
=== added directory 'Do.Platform.Linux.JoliCloud/src/Do.Platform'
=== added directory 'Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux'
=== added directory 'Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud'
=== added file 'Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs'
--- Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/PackageManagerService.cs 2009-06-24 10:37:14 +0000
@@ -0,0 +1,164 @@
1// PackageManagerService.cs
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20using System.Threading;
21
22using NDesk.DBus;
23using org.freedesktop.DBus;
24
25using Mono.Addins;
26
27using Do.Platform;
28using Do.Platform.Linux;
29using Do.Platform.ServiceStack;
30
31namespace Do.Platform.Linux.JoliCloud
32{
33
34 [Interface ("org.jolicloud.JolicloudDaemon")]
35 interface IJolicloudDaemon
36 {
37 event ActionProcessedEventHandler ActionProcessed;
38 }
39
40 delegate void ActionProcessedEventHandler (string action, string [] packages, bool success, string error);
41
42 /// <summary>
43 /// Listens to the JoliCloud daemon for package install events, and offers to install an appropriate
44 /// plugin if one is found.
45 /// </summary>
46 public class PackageManagerService : AbstractPackageManagerService, IStrictService
47 {
48 const string ObjectPath = "/SoftwareManager";
49 const string BusName = "org.jolicloud.JolicloudDaemon";
50
51 IBus session_bus;
52 IJolicloudDaemon daemon;
53
54 /// <summary>
55 /// Find jolicloud on the bus
56 /// </summary>
57 public override void Initialize ()
58 {
59 session_bus = Bus.Session.GetObject<IBus> ("org.freedeskop.DBus", new ObjectPath ("/org/freedesktop/DBus"));
60 session_bus.NameOwnerChanged += HandleNameOwnerChanged;
61
62 // this call will instaniate the daemon, as well as make sure we also got a DBus object
63 if (Daemon == null)
64 Log<PackageManagerService>.Debug ("Failed to locate JoliCloud daemon on DBus.");
65
66 base.Initialize ();
67 }
68
69 IJolicloudDaemon Daemon {
70 get {
71 if (daemon == null) {
72 daemon = GetIJoliCloudDaemonObject (ObjectPath);
73 daemon.ActionProcessed += HandleActionProcessed;
74 Log<PackageManagerService>.Debug ("Aquired instance of JolicloudDaemon");
75 }
76 return daemon;
77 }
78 }
79
80 /// <summary>
81 /// When a package manager action is performed we receive a signal, this method processes the signal
82 /// and decides how to act.
83 /// </summary>
84 /// <param name="action">
85 /// A <see cref="System.String"/> the action performed by the package manager
86 /// </param>
87 /// <param name="packages">
88 /// A <see cref="System.String"/> the packages touched by the action
89 /// </param>
90 /// <param name="success">
91 /// A <see cref="System.Boolean"/> did the action succeed
92 /// </param>
93 /// <param name="error">
94 /// A <see cref="System.String"/> errors
95 /// </param>
96 void HandleActionProcessed (string action, string[] packages, bool success, string error)
97 {
98 Addin addin;
99 string cleanName;
100
101 if (action != "install" || packages.Length < 1 || DontShowPluginAvailableDialog)
102 return;
103
104 cleanName = HumanNameFromPackageName (packages [0]);
105 if ((addin = MaybePluginForPackage (cleanName)) == null && !addin.Enabled)
106 return;
107
108 new PluginAvailableDialog (cleanName, addin);
109 }
110
111 /// <summary>
112 /// Attempts to clean up a package name into something a little bit more friendly.
113 /// </summary>
114 /// <param name="package">
115 /// A <see cref="System.String"/>
116 /// </param>
117 /// <returns>
118 /// A <see cref="System.String"/>
119 /// </returns>
120 string HumanNameFromPackageName (string package)
121 {
122 if (package.Contains ("prism-webapp"))
123 package = package.Substring ("prism-webapp".Length + 1);
124
125 package.Replace ('-', ' ');
126
127 return package.ToLower ();
128 }
129
130#region DBus handling
131 void HandleNameOwnerChanged (string name, string old_owner, string new_owner)
132 {
133 // if the jolicloud daemon gets released, we should drop our object
134 if (Daemon != null && name == BusName) {
135 Daemon.ActionProcessed -= HandleActionProcessed;
136 daemon = null;
137 }
138 }
139
140 IJolicloudDaemon GetIJoliCloudDaemonObject (string objectPath)
141 {
142 MaybeStartDaemon ();
143 return Bus.Session.GetObject<IJolicloudDaemon> (BusName, new ObjectPath (objectPath));
144 }
145
146 bool DaemonIsRunning {
147 get { return Bus.Session.NameHasOwner (BusName); }
148 }
149
150 void MaybeStartDaemon ()
151 {
152 if (DaemonIsRunning)
153 return;
154
155 Bus.Session.StartServiceByName (BusName);
156 Thread.Sleep (5000);
157
158 if (!DaemonIsRunning)
159 throw new Exception (string.Format("Name {0} has no owner.", BusName));
160 }
161#endregion
162 }
163}
164
0\ No newline at end of file165\ No newline at end of file
1166
=== added directory 'Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests'
=== added file 'Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs'
--- Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux.JoliCloud/src/Do.Platform/Do.Platform.Linux/Do.Platform.Linux.JoliCloud/Tests/PackageManagerServiceTests.cs 2009-06-22 15:51:57 +0000
@@ -0,0 +1,32 @@
1// %filename
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20
21namespace Do.Platform.Linux.JoliCloud
22{
23
24
25 public class PackageManagerServiceTests
26 {
27
28 public PackageManagerServiceTests()
29 {
30 }
31 }
32}
033
=== modified file 'Do.Platform.Linux/Do.Platform.Linux.mdp'
--- Do.Platform.Linux/Do.Platform.Linux.mdp 2009-06-19 07:41:21 +0000
+++ Do.Platform.Linux/Do.Platform.Linux.mdp 2009-06-23 16:27:37 +0000
@@ -51,6 +51,8 @@
51 <File name="src/Do.Universe/NullApplicationItem.cs" subtype="Code" buildaction="Compile" />51 <File name="src/Do.Universe/NullApplicationItem.cs" subtype="Code" buildaction="Compile" />
52 <File name="src/Do.Universe/CategoryItem.cs" subtype="Code" buildaction="Compile" />52 <File name="src/Do.Universe/CategoryItem.cs" subtype="Code" buildaction="Compile" />
53 <File name="src/Do.Platform/Do.Platform.Linux/NetworkService.cs" subtype="Code" buildaction="Compile" />53 <File name="src/Do.Platform/Do.Platform.Linux/NetworkService.cs" subtype="Code" buildaction="Compile" />
54 <File name="src/Do.Widgets/PluginAvailableDialog.cs" subtype="Code" buildaction="Compile" />
55 <File name="gtk-gui/Do.Platform.Linux.PluginAvailableDialog.cs" subtype="Code" buildaction="Compile" />
54 </Contents>56 </Contents>
55 <References>57 <References>
56 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />58 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -71,5 +73,6 @@
71 <ProjectReference type="Gac" localcopy="True" refto="gnome-vfs-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />73 <ProjectReference type="Gac" localcopy="True" refto="gnome-vfs-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
72 <ProjectReference type="Gac" localcopy="True" refto="gnome-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />74 <ProjectReference type="Gac" localcopy="True" refto="gnome-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
73 <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />75 <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
76 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
74 </References>77 </References>
75</Project>78</Project>
76\ No newline at end of file79\ No newline at end of file
7780
=== modified file 'Do.Platform.Linux/Makefile.am'
--- Do.Platform.Linux/Makefile.am 2009-06-10 05:30:30 +0000
+++ Do.Platform.Linux/Makefile.am 2009-06-23 16:49:14 +0000
@@ -6,6 +6,7 @@
66
7FILES = \7FILES = \
8 gtk-gui/Do.Platform.Linux.AbstractLoginWidget.cs \8 gtk-gui/Do.Platform.Linux.AbstractLoginWidget.cs \
9 gtk-gui/Do.Platform.Linux.PluginAvailableDialog.cs \
9 gtk-gui/generated.cs \10 gtk-gui/generated.cs \
10 src/AssemblyInfo.cs \11 src/AssemblyInfo.cs \
11 src/Do.Platform/ConsoleCrayon.cs \12 src/Do.Platform/ConsoleCrayon.cs \
@@ -29,7 +30,8 @@
29 src/Do.Universe/ApplicationItemSource.cs \30 src/Do.Universe/ApplicationItemSource.cs \
30 src/Do.Universe/CopyToClipboardAction.cs \31 src/Do.Universe/CopyToClipboardAction.cs \
31 src/Do.Universe/GNOMESpecialLocationsItemSource.cs \32 src/Do.Universe/GNOMESpecialLocationsItemSource.cs \
32 src/Do.Widgets/AbstractLoginWidget.cs33 src/Do.Widgets/AbstractLoginWidget.cs \
34 src/Do.Widgets/PluginAvailableDialog.cs
3335
34if HAVE_NUNIT36if HAVE_NUNIT
35FILES += \37FILES += \
@@ -47,15 +49,16 @@
47 System \49 System \
48 System.Core \50 System.Core \
49 Mono.Posix \51 Mono.Posix \
50 $(NUNIT_LIBS) \
51 $(GTK_SHARP_20_LIBS) \52 $(GTK_SHARP_20_LIBS) \
52 $(GNOME_KEYRING_SHARP_LIBS) \53 $(GNOME_KEYRING_SHARP_LIBS) \
53 $(GNOME_SHARP_20_LIBS) \54 $(GNOME_SHARP_20_LIBS) \
54 $(GNOME_DESKTOP_SHARP_20_LIBS) \55 $(GNOME_DESKTOP_SHARP_20_LIBS) \
55 $(GCONF_SHARP_20_LIBS) \56 $(GCONF_SHARP_20_LIBS) \
57 $(MONO_ADDINS_LIBS) \
56 $(NDESK_DBUS_10_LIBS) \58 $(NDESK_DBUS_10_LIBS) \
57 $(NDESK_DBUS_GLIB_10_LIBS) \59 $(NDESK_DBUS_GLIB_10_LIBS) \
58 $(NOTIFY_SHARP_LIBS)60 $(NOTIFY_SHARP_LIBS) \
61 $(NUNIT_LIBS)
5962
60PROJECT_REFERENCES = \63PROJECT_REFERENCES = \
61 Do.Universe \64 Do.Universe \
6265
=== modified file 'Do.Platform.Linux/gtk-gui/Do.Platform.Linux.AbstractLoginWidget.cs'
--- Do.Platform.Linux/gtk-gui/Do.Platform.Linux.AbstractLoginWidget.cs 2009-06-19 04:30:03 +0000
+++ Do.Platform.Linux/gtk-gui/Do.Platform.Linux.AbstractLoginWidget.cs 2009-06-23 09:39:36 +0000
@@ -130,7 +130,6 @@
130 w6.Fill = false;130 w6.Fill = false;
131 // Container child account_vbox.Gtk.Box+BoxChild131 // Container child account_vbox.Gtk.Box+BoxChild
132 this.hbuttonbox1 = new Gtk.HButtonBox();132 this.hbuttonbox1 = new Gtk.HButtonBox();
133 this.hbuttonbox1.Name = "hbuttonbox1";
134 this.hbuttonbox1.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));133 this.hbuttonbox1.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
135 // Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild134 // Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
136 this.validate_btn = new Gtk.Button();135 this.validate_btn = new Gtk.Button();
137136
=== added file 'Do.Platform.Linux/gtk-gui/Do.Platform.Linux.PluginAvailableDialog.cs'
--- Do.Platform.Linux/gtk-gui/Do.Platform.Linux.PluginAvailableDialog.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux/gtk-gui/Do.Platform.Linux.PluginAvailableDialog.cs 2009-06-23 17:17:33 +0000
@@ -0,0 +1,193 @@
1// ------------------------------------------------------------------------------
2// <autogenerated>
3// This code was generated by a tool.
4//
5//
6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.
8// </autogenerated>
9// ------------------------------------------------------------------------------
10
11namespace Do.Platform.Linux {
12
13
14 public partial class PluginAvailableDialog {
15
16 private Gtk.VBox vbox2;
17
18 private Gtk.HBox hbox1;
19
20 private Gtk.Image title_img;
21
22 private Gtk.Alignment title_align;
23
24 private Gtk.Label title_lbl;
25
26 private Gtk.Alignment body_align;
27
28 private Gtk.Label body_lbl;
29
30 private Gtk.Alignment link_align;
31
32 private Gtk.VBox link_vbox;
33
34 private Gtk.Alignment ask_align;
35
36 private Gtk.CheckButton ask_chk;
37
38 private Gtk.Button buttonCancel;
39
40 private Gtk.Button install_btn;
41
42 protected virtual void Build() {
43 Stetic.Gui.Initialize(this);
44 // Widget Do.Platform.Linux.PluginAvailableDialog
45 this.Name = "Do.Platform.Linux.PluginAvailableDialog";
46 this.WindowPosition = ((Gtk.WindowPosition)(4));
47 this.BorderWidth = ((uint)(5));
48 this.HasSeparator = false;
49 // Internal child Do.Platform.Linux.PluginAvailableDialog.VBox
50 Gtk.VBox w1 = this.VBox;
51 w1.Name = "dialog1_VBox";
52 w1.BorderWidth = ((uint)(2));
53 // Container child dialog1_VBox.Gtk.Box+BoxChild
54 this.vbox2 = new Gtk.VBox();
55 this.vbox2.Name = "vbox2";
56 this.vbox2.Spacing = 6;
57 // Container child vbox2.Gtk.Box+BoxChild
58 this.hbox1 = new Gtk.HBox();
59 this.hbox1.Name = "hbox1";
60 this.hbox1.Spacing = 6;
61 // Container child hbox1.Gtk.Box+BoxChild
62 this.title_img = new Gtk.Image();
63 this.title_img.Name = "title_img";
64 this.title_img.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gnome-do", Gtk.IconSize.Dialog, 48);
65 this.hbox1.Add(this.title_img);
66 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.title_img]));
67 w2.Position = 0;
68 w2.Expand = false;
69 w2.Fill = false;
70 // Container child hbox1.Gtk.Box+BoxChild
71 this.title_align = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
72 this.title_align.Name = "title_align";
73 this.title_align.LeftPadding = ((uint)(7));
74 // Container child title_align.Gtk.Container+ContainerChild
75 this.title_lbl = new Gtk.Label();
76 this.title_lbl.Name = "title_lbl";
77 this.title_lbl.LabelProp = Mono.Unix.Catalog.GetString("<b><span size=\"x-large\">There's a Do plugin for that!</span></b>");
78 this.title_lbl.UseMarkup = true;
79 this.title_align.Add(this.title_lbl);
80 this.hbox1.Add(this.title_align);
81 Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.title_align]));
82 w4.Position = 1;
83 w4.Expand = false;
84 w4.Fill = false;
85 this.vbox2.Add(this.hbox1);
86 Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
87 w5.Position = 0;
88 w5.Expand = false;
89 w5.Fill = false;
90 // Container child vbox2.Gtk.Box+BoxChild
91 this.body_align = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
92 this.body_align.Name = "body_align";
93 this.body_align.LeftPadding = ((uint)(62));
94 // Container child body_align.Gtk.Container+ContainerChild
95 this.body_lbl = new Gtk.Label();
96 this.body_lbl.Name = "body_lbl";
97 this.body_lbl.Xalign = 0F;
98 this.body_lbl.LabelProp = Mono.Unix.Catalog.GetString("A Do plugin for {0} is available for installation. Would you like us to enable it for you?");
99 this.body_lbl.Wrap = true;
100 this.body_align.Add(this.body_lbl);
101 this.vbox2.Add(this.body_align);
102 Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.body_align]));
103 w7.Position = 1;
104 w7.Expand = false;
105 w7.Fill = false;
106 // Container child vbox2.Gtk.Box+BoxChild
107 this.link_align = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
108 this.link_align.Name = "link_align";
109 this.link_align.LeftPadding = ((uint)(55));
110 // Container child link_align.Gtk.Container+ContainerChild
111 this.link_vbox = new Gtk.VBox();
112 this.link_vbox.Name = "link_vbox";
113 this.link_align.Add(this.link_vbox);
114 this.vbox2.Add(this.link_align);
115 Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox2[this.link_align]));
116 w9.Position = 2;
117 // Container child vbox2.Gtk.Box+BoxChild
118 this.ask_align = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
119 this.ask_align.Name = "ask_align";
120 this.ask_align.LeftPadding = ((uint)(57));
121 // Container child ask_align.Gtk.Container+ContainerChild
122 this.ask_chk = new Gtk.CheckButton();
123 this.ask_chk.CanFocus = true;
124 this.ask_chk.Name = "ask_chk";
125 this.ask_chk.Label = Mono.Unix.Catalog.GetString("Don't ask me about Do plugins again.");
126 this.ask_chk.DrawIndicator = true;
127 this.ask_chk.UseUnderline = true;
128 this.ask_align.Add(this.ask_chk);
129 this.vbox2.Add(this.ask_align);
130 Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox2[this.ask_align]));
131 w11.Position = 3;
132 w11.Expand = false;
133 w11.Fill = false;
134 w1.Add(this.vbox2);
135 Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
136 w12.Position = 0;
137 // Internal child Do.Platform.Linux.PluginAvailableDialog.ActionArea
138 Gtk.HButtonBox w13 = this.ActionArea;
139 w13.Name = "dialog1_ActionArea";
140 w13.Spacing = 6;
141 w13.BorderWidth = ((uint)(5));
142 w13.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
143 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
144 this.buttonCancel = new Gtk.Button();
145 this.buttonCancel.CanDefault = true;
146 this.buttonCancel.CanFocus = true;
147 this.buttonCancel.Name = "buttonCancel";
148 this.buttonCancel.UseStock = true;
149 this.buttonCancel.UseUnderline = true;
150 this.buttonCancel.Label = "gtk-cancel";
151 this.AddActionWidget(this.buttonCancel, -6);
152 Gtk.ButtonBox.ButtonBoxChild w14 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.buttonCancel]));
153 w14.Expand = false;
154 w14.Fill = false;
155 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
156 this.install_btn = new Gtk.Button();
157 this.install_btn.CanDefault = true;
158 this.install_btn.CanFocus = true;
159 this.install_btn.Name = "install_btn";
160 this.install_btn.UseUnderline = true;
161 // Container child install_btn.Gtk.Container+ContainerChild
162 Gtk.Alignment w15 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
163 // Container child GtkAlignment1.Gtk.Container+ContainerChild
164 Gtk.HBox w16 = new Gtk.HBox();
165 w16.Spacing = 2;
166 // Container child GtkHBox1.Gtk.Container+ContainerChild
167 Gtk.Image w17 = new Gtk.Image();
168 w17.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-ok", Gtk.IconSize.Button, 20);
169 w16.Add(w17);
170 // Container child GtkHBox1.Gtk.Container+ContainerChild
171 Gtk.Label w19 = new Gtk.Label();
172 w19.LabelProp = Mono.Unix.Catalog.GetString("_Install");
173 w19.UseUnderline = true;
174 w16.Add(w19);
175 w15.Add(w16);
176 this.install_btn.Add(w15);
177 this.AddActionWidget(this.install_btn, -5);
178 Gtk.ButtonBox.ButtonBoxChild w23 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.install_btn]));
179 w23.Position = 1;
180 w23.Expand = false;
181 w23.Fill = false;
182 if ((this.Child != null)) {
183 this.Child.ShowAll();
184 }
185 this.DefaultWidth = 486;
186 this.DefaultHeight = 218;
187 this.Show();
188 this.ask_chk.Toggled += new System.EventHandler(this.OnAskChkToggled);
189 this.buttonCancel.Clicked += new System.EventHandler(this.OnButtonCancelClicked);
190 this.install_btn.Clicked += new System.EventHandler(this.OnInstallBtnClicked);
191 }
192 }
193}
0194
=== modified file 'Do.Platform.Linux/gtk-gui/generated.cs'
--- Do.Platform.Linux/gtk-gui/generated.cs 2009-01-19 23:59:12 +0000
+++ Do.Platform.Linux/gtk-gui/generated.cs 2009-06-22 18:04:05 +0000
@@ -69,6 +69,39 @@
69 }69 }
70 }70 }
71 71
72 internal class IconLoader {
73
74 public static Gdk.Pixbuf LoadIcon(Gtk.Widget widget, string name, Gtk.IconSize size, int sz) {
75 Gdk.Pixbuf res = widget.RenderIcon(name, size, null);
76 if ((res != null)) {
77 return res;
78 }
79 else {
80 try {
81 return Gtk.IconTheme.Default.LoadIcon(name, sz, 0);
82 }
83 catch (System.Exception ) {
84 if ((name != "gtk-missing-image")) {
85 return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size, sz);
86 }
87 else {
88 Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz);
89 Gdk.GC gc = new Gdk.GC(pmap);
90 gc.RgbFgColor = new Gdk.Color(255, 255, 255);
91 pmap.DrawRectangle(gc, true, 0, 0, sz, sz);
92 gc.RgbFgColor = new Gdk.Color(0, 0, 0);
93 pmap.DrawRectangle(gc, false, 0, 0, (sz - 1), (sz - 1));
94 gc.SetLineAttributes(3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
95 gc.RgbFgColor = new Gdk.Color(255, 0, 0);
96 pmap.DrawLine(gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
97 pmap.DrawLine(gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
98 return Gdk.Pixbuf.FromDrawable(pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
99 }
100 }
101 }
102 }
103 }
104
72 internal class ActionGroups {105 internal class ActionGroups {
73 106
74 public static Gtk.ActionGroup GetActionGroup(System.Type type) {107 public static Gtk.ActionGroup GetActionGroup(System.Type type) {
75108
=== modified file 'Do.Platform.Linux/gtk-gui/gui.stetic'
--- Do.Platform.Linux/gtk-gui/gui.stetic 2009-05-29 10:26:49 +0000
+++ Do.Platform.Linux/gtk-gui/gui.stetic 2009-06-24 15:08:47 +0000
@@ -7,7 +7,6 @@
7 <import>7 <import>
8 <widget-library name="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />8 <widget-library name="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
9 <widget-library name="notify-sharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=2df29c54e245917a" />9 <widget-library name="notify-sharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=2df29c54e245917a" />
10 <widget-library name="../../Do.Interface.Linux/bin/Debug/Do.Interface.Linux.dll" />
11 <widget-library name="gnome-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />10 <widget-library name="gnome-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
12 <widget-library name="../bin/Debug/Do.Platform.Linux.dll" internal="true" />11 <widget-library name="../bin/Debug/Do.Platform.Linux.dll" internal="true" />
13 </import>12 </import>
@@ -245,4 +244,179 @@
245 </widget>244 </widget>
246 </child>245 </child>
247 </widget>246 </widget>
247 <widget class="Gtk.Dialog" id="Do.Platform.Linux.PluginAvailableDialog" design-size="486 218">
248 <property name="MemberName" />
249 <property name="WindowPosition">CenterOnParent</property>
250 <property name="BorderWidth">5</property>
251 <property name="Buttons">2</property>
252 <property name="HelpButton">False</property>
253 <property name="HasSeparator">False</property>
254 <child internal-child="VBox">
255 <widget class="Gtk.VBox" id="dialog1_VBox">
256 <property name="MemberName" />
257 <property name="BorderWidth">2</property>
258 <child>
259 <widget class="Gtk.VBox" id="vbox2">
260 <property name="MemberName" />
261 <property name="Spacing">6</property>
262 <child>
263 <widget class="Gtk.HBox" id="hbox1">
264 <property name="MemberName" />
265 <property name="Spacing">6</property>
266 <child>
267 <widget class="Gtk.Image" id="title_img">
268 <property name="MemberName" />
269 <property name="Pixbuf">stock:gnome-do Dialog</property>
270 </widget>
271 <packing>
272 <property name="Position">0</property>
273 <property name="AutoSize">True</property>
274 <property name="Expand">False</property>
275 <property name="Fill">False</property>
276 </packing>
277 </child>
278 <child>
279 <widget class="Gtk.Alignment" id="title_align">
280 <property name="MemberName" />
281 <property name="LeftPadding">7</property>
282 <child>
283 <widget class="Gtk.Label" id="title_lbl">
284 <property name="MemberName" />
285 <property name="LabelProp" translatable="yes">&lt;b&gt;&lt;span size="x-large"&gt;There's a Do plugin for that!&lt;/span&gt;&lt;/b&gt;</property>
286 <property name="UseMarkup">True</property>
287 </widget>
288 </child>
289 </widget>
290 <packing>
291 <property name="Position">1</property>
292 <property name="AutoSize">True</property>
293 <property name="Expand">False</property>
294 <property name="Fill">False</property>
295 </packing>
296 </child>
297 </widget>
298 <packing>
299 <property name="Position">0</property>
300 <property name="AutoSize">True</property>
301 <property name="Expand">False</property>
302 <property name="Fill">False</property>
303 </packing>
304 </child>
305 <child>
306 <widget class="Gtk.Alignment" id="body_align">
307 <property name="MemberName" />
308 <property name="LeftPadding">62</property>
309 <child>
310 <widget class="Gtk.Label" id="body_lbl">
311 <property name="MemberName" />
312 <property name="Xalign">0</property>
313 <property name="LabelProp" translatable="yes">A Do plugin for {0} is available for installation. Would you like us to enable it for you?</property>
314 <property name="Wrap">True</property>
315 </widget>
316 </child>
317 </widget>
318 <packing>
319 <property name="Position">1</property>
320 <property name="AutoSize">True</property>
321 <property name="Expand">False</property>
322 <property name="Fill">False</property>
323 </packing>
324 </child>
325 <child>
326 <widget class="Gtk.Alignment" id="link_align">
327 <property name="MemberName" />
328 <property name="LeftPadding">55</property>
329 <child>
330 <widget class="Gtk.VBox" id="link_vbox">
331 <property name="MemberName" />
332 <child>
333 <placeholder />
334 </child>
335 <child>
336 <placeholder />
337 </child>
338 </widget>
339 </child>
340 </widget>
341 <packing>
342 <property name="Position">2</property>
343 <property name="AutoSize">True</property>
344 </packing>
345 </child>
346 <child>
347 <widget class="Gtk.Alignment" id="ask_align">
348 <property name="MemberName" />
349 <property name="LeftPadding">57</property>
350 <child>
351 <widget class="Gtk.CheckButton" id="ask_chk">
352 <property name="MemberName" />
353 <property name="CanFocus">True</property>
354 <property name="Label" translatable="yes">Don't ask me about Do plugins again.</property>
355 <property name="DrawIndicator">True</property>
356 <property name="HasLabel">True</property>
357 <property name="UseUnderline">True</property>
358 <signal name="Toggled" handler="OnAskChkToggled" />
359 </widget>
360 </child>
361 </widget>
362 <packing>
363 <property name="Position">3</property>
364 <property name="AutoSize">True</property>
365 <property name="Expand">False</property>
366 <property name="Fill">False</property>
367 </packing>
368 </child>
369 </widget>
370 <packing>
371 <property name="Position">0</property>
372 <property name="AutoSize">True</property>
373 </packing>
374 </child>
375 </widget>
376 </child>
377 <child internal-child="ActionArea">
378 <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
379 <property name="MemberName" />
380 <property name="Spacing">6</property>
381 <property name="BorderWidth">5</property>
382 <property name="Size">2</property>
383 <property name="LayoutStyle">End</property>
384 <child>
385 <widget class="Gtk.Button" id="buttonCancel">
386 <property name="MemberName" />
387 <property name="CanDefault">True</property>
388 <property name="CanFocus">True</property>
389 <property name="UseStock">True</property>
390 <property name="Type">StockItem</property>
391 <property name="StockId">gtk-cancel</property>
392 <property name="ResponseId">-6</property>
393 <signal name="Clicked" handler="OnButtonCancelClicked" />
394 <property name="label">gtk-cancel</property>
395 </widget>
396 <packing>
397 <property name="Expand">False</property>
398 <property name="Fill">False</property>
399 </packing>
400 </child>
401 <child>
402 <widget class="Gtk.Button" id="install_btn">
403 <property name="MemberName" />
404 <property name="CanDefault">True</property>
405 <property name="CanFocus">True</property>
406 <property name="Type">TextAndIcon</property>
407 <property name="Icon">stock:gtk-ok Button</property>
408 <property name="Label" translatable="yes">_Install</property>
409 <property name="UseUnderline">True</property>
410 <property name="ResponseId">-5</property>
411 <signal name="Clicked" handler="OnInstallBtnClicked" />
412 </widget>
413 <packing>
414 <property name="Position">1</property>
415 <property name="Expand">False</property>
416 <property name="Fill">False</property>
417 </packing>
418 </child>
419 </widget>
420 </child>
421 </widget>
248</stetic-interface>422</stetic-interface>
249\ No newline at end of file423\ No newline at end of file
250424
=== added file 'Do.Platform.Linux/src/Do.Widgets/PluginAvailableDialog.cs'
--- Do.Platform.Linux/src/Do.Widgets/PluginAvailableDialog.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform.Linux/src/Do.Widgets/PluginAvailableDialog.cs 2009-06-24 15:08:47 +0000
@@ -0,0 +1,78 @@
1// %filename
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20
21using Gtk;
22using Mono.Unix;
23using Mono.Addins;
24
25using Do.Platform;
26
27namespace Do.Platform.Linux
28{
29
30 public partial class PluginAvailableDialog : Gtk.Dialog
31 {
32 const string WhatIsDoUrl = "http://do.davebsd.com/wiki/index.php?title=Main_Page#What_is_GNOME_Do.3F";
33
34 Addin addin;
35
36 public PluginAvailableDialog (string package, Addin addin)
37 {
38 this.Build();
39
40 LinkButton wiki_btn, plugin_desc_btn;
41
42 this.addin = addin;
43
44 body_lbl.Text = string.Format (body_lbl.Text, package);
45
46 wiki_btn = new LinkButton (WhatIsDoUrl, Catalog.GetString ("What is Do?"));
47 wiki_btn.Xalign = 0F;
48 link_vbox.Add (wiki_btn);
49
50 // if the URL attribute is set, then we show a link to the plugin help
51 if (!string.IsNullOrEmpty (addin.Description.Url)) {
52 plugin_desc_btn = new LinkButton (addin.Description.Url,
53 string.Format (Catalog.GetString ("What does the {0} plugin do?"), package));
54 plugin_desc_btn.Xalign = 0F;
55 link_vbox.Add (plugin_desc_btn);
56 }
57
58 ShowAll ();
59 }
60
61 protected virtual void OnButtonCancelClicked (object sender, System.EventArgs e)
62 {
63 Destroy ();
64 }
65
66 protected virtual void OnInstallBtnClicked (object sender, System.EventArgs e)
67 {
68 Services.PluginManager.Install (addin);
69 Destroy ();
70 }
71
72 protected virtual void OnAskChkToggled (object sender, System.EventArgs e)
73 {
74 IPreferences prefs = Services.Preferences.Get<AbstractPackageManagerService> ();
75 prefs.Set (AbstractPackageManagerService.PluginAvailableKey, ask_chk.Active);
76 }
77 }
78}
079
=== modified file 'Do.Platform/Do.Platform.mdp'
--- Do.Platform/Do.Platform.mdp 2009-06-10 05:30:30 +0000
+++ Do.Platform/Do.Platform.mdp 2009-06-23 16:27:37 +0000
@@ -79,16 +79,21 @@
79 <File name="src/Do.Platform/INetworkService.cs" subtype="Code" buildaction="Compile" />79 <File name="src/Do.Platform/INetworkService.cs" subtype="Code" buildaction="Compile" />
80 <File name="src/Do.Platform/NetworkStateChangedEventArgs.cs" subtype="Code" buildaction="Compile" />80 <File name="src/Do.Platform/NetworkStateChangedEventArgs.cs" subtype="Code" buildaction="Compile" />
81 <File name="src/Do.Platform/Do.Platform.Default/NetworkService.cs" subtype="Code" buildaction="Compile" />81 <File name="src/Do.Platform/Do.Platform.Default/NetworkService.cs" subtype="Code" buildaction="Compile" />
82 <File name="src/Do.Platform/AbstractPackageManagerService.cs" subtype="Code" buildaction="Compile" />
83 <File name="src/Do.Platform/Do.Platform.Default/DefaultPackageManagerService.cs" subtype="Code" buildaction="Compile" />
84 <File name="src/Do.Platform/Do.Platform.ServiceStack/IStrictService.cs" subtype="Code" buildaction="Compile" />
85 <File name="src/Do.Platform/IPluginManagerService.cs" subtype="Code" buildaction="Compile" />
86 <File name="src/Do.Platform/Do.Platform.Default/PluginManagerService.cs" subtype="Code" buildaction="Compile" />
82 </Contents>87 </Contents>
83 <References>88 <References>
84 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />89 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
85 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />90 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
86 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />91 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
87 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
88 <ProjectReference type="Project" localcopy="True" refto="Do.Universe" />92 <ProjectReference type="Project" localcopy="True" refto="Do.Universe" />
89 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />93 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
90 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />94 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
91 <ProjectReference type="Gac" localcopy="True" refto="gnome-vfs-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />95 <ProjectReference type="Gac" localcopy="True" refto="gnome-vfs-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
92 <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />96 <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
97 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
93 </References>98 </References>
94</Project>
95\ No newline at end of file99\ No newline at end of file
100</Project>
96101
=== modified file 'Do.Platform/Makefile.am'
--- Do.Platform/Makefile.am 2009-06-10 05:30:30 +0000
+++ Do.Platform/Makefile.am 2009-06-23 16:27:37 +0000
@@ -17,10 +17,12 @@
17 src/Do.Platform/Do.Platform.Default/CoreService.cs \17 src/Do.Platform/Do.Platform.Default/CoreService.cs \
18 src/Do.Platform/Do.Platform.Default/DefaultApplicationService.cs \18 src/Do.Platform/Do.Platform.Default/DefaultApplicationService.cs \
19 src/Do.Platform/Do.Platform.Default/DefaultSystemService.cs \19 src/Do.Platform/Do.Platform.Default/DefaultSystemService.cs \
20 src/Do.Platform/Do.Platform.Default/DefaultPackageManagerService.cs \
20 src/Do.Platform/Do.Platform.Default/DefaultPathsService.cs \21 src/Do.Platform/Do.Platform.Default/DefaultPathsService.cs \
21 src/Do.Platform/Do.Platform.Default/EnvironmentService.cs \22 src/Do.Platform/Do.Platform.Default/EnvironmentService.cs \
22 src/Do.Platform/Do.Platform.Default/LogService.cs \23 src/Do.Platform/Do.Platform.Default/LogService.cs \
23 src/Do.Platform/Do.Platform.Default/NotificationsService.cs \24 src/Do.Platform/Do.Platform.Default/NotificationsService.cs \
25 src/Do.Platform/Do.Platform.Default/PluginManagerService.cs \
24 src/Do.Platform/Do.Platform.Default/PreferencesService.cs \26 src/Do.Platform/Do.Platform.Default/PreferencesService.cs \
25 src/Do.Platform/Do.Platform.Default/SecurePreferencesService.cs \27 src/Do.Platform/Do.Platform.Default/SecurePreferencesService.cs \
26 src/Do.Platform/Do.Platform.Default/UniverseFactoryService.cs \28 src/Do.Platform/Do.Platform.Default/UniverseFactoryService.cs \
@@ -30,10 +32,12 @@
30 src/Do.Platform/Do.Platform.Preferences/PreferencesImplementation.cs \32 src/Do.Platform/Do.Platform.Preferences/PreferencesImplementation.cs \
31 src/Do.Platform/Do.Platform.ServiceStack/IInitializedService.cs \33 src/Do.Platform/Do.Platform.ServiceStack/IInitializedService.cs \
32 src/Do.Platform/Do.Platform.ServiceStack/IService.cs \34 src/Do.Platform/Do.Platform.ServiceStack/IService.cs \
35 src/Do.Platform/Do.Platform.ServiceStack/IStrictService.cs \
33 src/Do.Platform/ICoreService.cs \36 src/Do.Platform/ICoreService.cs \
34 src/Do.Platform/IEnvironmentService.cs \37 src/Do.Platform/IEnvironmentService.cs \
35 src/Do.Platform/ILogService.cs \38 src/Do.Platform/ILogService.cs \
36 src/Do.Platform/INotificationsService.cs \39 src/Do.Platform/INotificationsService.cs \
40 src/Do.Platform/IPluginManagerService.cs \
37 src/Do.Platform/IPreferences.cs \41 src/Do.Platform/IPreferences.cs \
38 src/Do.Platform/IPreferencesService.cs \42 src/Do.Platform/IPreferencesService.cs \
39 src/Do.Platform/ISecurePreferencesService.cs \43 src/Do.Platform/ISecurePreferencesService.cs \
@@ -45,6 +49,7 @@
45 src/Do.Platform/Notification.cs \49 src/Do.Platform/Notification.cs \
46 src/Do.Platform/NotificationEventArgs.cs \50 src/Do.Platform/NotificationEventArgs.cs \
47 src/Do.Platform/AbstractApplicationService.cs \51 src/Do.Platform/AbstractApplicationService.cs \
52 src/Do.Platform/AbstractPackageManagerService.cs \
48 src/Do.Platform/AbstractSystemService.cs \53 src/Do.Platform/AbstractSystemService.cs \
49 src/Do.Platform/PathsService.cs \54 src/Do.Platform/PathsService.cs \
50 src/Do.Platform/PreferencesChangedEventArgs.cs \55 src/Do.Platform/PreferencesChangedEventArgs.cs \
5156
=== added file 'Do.Platform/src/Do.Platform/AbstractPackageManagerService.cs'
--- Do.Platform/src/Do.Platform/AbstractPackageManagerService.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform/src/Do.Platform/AbstractPackageManagerService.cs 2009-06-23 17:17:33 +0000
@@ -0,0 +1,74 @@
1/* AbstractPackageManagerService.cs
2 *
3 * GNOME Do is the legal property of its developers. Please refer to the
4 * COPYRIGHT file distributed with this source distribution.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20using System;
21
22using Mono.Addins;
23
24using Do.Platform.ServiceStack;
25
26namespace Do.Platform
27{
28
29 /// <summary>
30 /// The package manager service is a service that runs and listens for events from a package backend. The idea is
31 /// that when you install a package that has a corresponding Do plugin, Do will see this and ask you if you want to
32 /// enable the corresponding plugin. This architecture allows us to write backends for whatever package manager is in
33 /// use be it apt, rpm, packagekit, or whatever.
34 /// </summary>
35 public abstract class AbstractPackageManagerService : IService, IInitializedService
36 {
37 public const string PluginAvailableKey = "DontShowPluginAvailableDialog";
38 public const bool PluginAvailableDefault = false;
39
40 public virtual void Initialize ()
41 {
42 Preferences = Services.Preferences.Get<AbstractPackageManagerService> ();
43 }
44
45 IPreferences Preferences { get; set; }
46
47 protected bool DontShowPluginAvailableDialog {
48 get { return Preferences.Get (PluginAvailableKey, PluginAvailableDefault); }
49 set { Preferences.Get (PluginAvailableKey, value); }
50 }
51
52 /// <summary>
53 /// Tries to find a plugin that is appropriate for the packge given.
54 /// i.e. if the package is a twitter prism app, it would give the Microblogging plugin
55 /// </summary>
56 /// <param name="package">
57 /// A <see cref="System.String"/>
58 /// </param>
59 /// <returns>
60 /// A <see cref="Addin"/>
61 /// </returns>
62 protected Addin MaybePluginForPackage (string package)
63 {
64 package = package.ToLower ();
65
66 foreach (Addin addin in Services.PluginManager.GetAddins ()) {
67 if (addin.Name.ToLower ().Contains (package) || addin.Description.Description.Contains (package))
68 return addin;
69 }
70
71 return null;
72 }
73 }
74}
075
=== modified file 'Do.Platform/src/Do.Platform/Do.Platform.Default/DefaultApplicationService.cs'
--- Do.Platform/src/Do.Platform/Do.Platform.Default/DefaultApplicationService.cs 2009-01-17 22:35:46 +0000
+++ Do.Platform/src/Do.Platform/Do.Platform.Default/DefaultApplicationService.cs 2009-06-22 15:51:57 +0000
@@ -51,6 +51,5 @@
51 {51 {
52 Log<DefaultApplicationService>.Debug ("Cannot flush main thread queue.");52 Log<DefaultApplicationService>.Debug ("Cannot flush main thread queue.");
53 }53 }
54
55 }54 }
56}55}
5756
=== added file 'Do.Platform/src/Do.Platform/Do.Platform.Default/DefaultPackageManagerService.cs'
--- Do.Platform/src/Do.Platform/Do.Platform.Default/DefaultPackageManagerService.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform/src/Do.Platform/Do.Platform.Default/DefaultPackageManagerService.cs 2009-06-22 15:51:57 +0000
@@ -0,0 +1,33 @@
1// PackageManagerService.cs
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20
21using Do.Platform;
22
23namespace Do.Platform.Default
24{
25
26 public class DefaultPackageManagerService : AbstractPackageManagerService
27 {
28 public DefaultPackageManagerService ()
29 {
30 Log<DefaultPackageManagerService>.Warn ("Default service loaded, no package management available");
31 }
32 }
33}
034
=== added file 'Do.Platform/src/Do.Platform/Do.Platform.Default/PluginManagerService.cs'
--- Do.Platform/src/Do.Platform/Do.Platform.Default/PluginManagerService.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform/src/Do.Platform/Do.Platform.Default/PluginManagerService.cs 2009-06-23 16:25:39 +0000
@@ -0,0 +1,44 @@
1// PluginManagerService.cs
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20
21using Mono.Addins;
22
23using Do.Platform.ServiceStack;
24
25namespace Do.Platform.Default
26{
27 /// <summary>
28 /// If this class loads, we have a serious plugin because that probably means we have no plugin manager.
29 /// </summary>
30 public class PluginManagerService : IPluginManagerService
31 {
32 public Addin [] GetAddins ()
33 {
34 Log<PluginManagerService>.Error ("Using default service, could not locate any addins");
35 return new Addin [] { };
36 }
37
38 public void Install (Addin addin)
39 {
40 Log<PluginManagerService>.Error ("Using default service, could not install addin.");
41 return;
42 }
43 }
44}
045
=== added file 'Do.Platform/src/Do.Platform/Do.Platform.ServiceStack/IStrictService.cs'
--- Do.Platform/src/Do.Platform/Do.Platform.ServiceStack/IStrictService.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform/src/Do.Platform/Do.Platform.ServiceStack/IStrictService.cs 2009-06-22 15:41:57 +0000
@@ -0,0 +1,31 @@
1// %filename
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20
21namespace Do.Platform
22{
23
24 /// <summary>
25 /// If your service cannot be lazy loaded, and need initialization use this interface.
26 /// This will cause your service to be initialized with the Service manager.
27 /// </summary>
28 public interface IStrictService
29 {
30 }
31}
032
=== added file 'Do.Platform/src/Do.Platform/IPluginManagerService.cs'
--- Do.Platform/src/Do.Platform/IPluginManagerService.cs 1970-01-01 00:00:00 +0000
+++ Do.Platform/src/Do.Platform/IPluginManagerService.cs 2009-06-23 16:25:39 +0000
@@ -0,0 +1,33 @@
1// %filename
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20
21using Mono.Addins;
22
23using Do.Platform.ServiceStack;
24
25namespace Do.Platform
26{
27
28 public interface IPluginManagerService : IService
29 {
30 Addin [] GetAddins ();
31 void Install (Addin addin);
32 }
33}
034
=== modified file 'Do.Platform/src/Do.Platform/Services.cs'
--- Do.Platform/src/Do.Platform/Services.cs 2009-06-10 05:30:30 +0000
+++ Do.Platform/src/Do.Platform/Services.cs 2009-06-23 16:27:37 +0000
@@ -19,6 +19,7 @@
1919
20using System;20using System;
21using System.Linq;21using System.Linq;
22using System.Reflection;
22using System.Collections.Generic;23using System.Collections.Generic;
2324
24using Mono.Addins;25using Mono.Addins;
@@ -32,18 +33,19 @@
3233
33 public class Services34 public class Services
34 {35 {
35
36 static ICoreService core;36 static ICoreService core;
37 static PathsService paths;37 static PathsService paths;
38 static INetworkService network;
38 static IWindowingService windowing;39 static IWindowingService windowing;
39 static AbstractSystemService system;40 static AbstractSystemService system;
40 static IEnumerable<ILogService> logs;41 static IEnumerable<ILogService> logs;
41 static PreferencesFactory preferences;42 static PreferencesFactory preferences;
42 static AbstractApplicationService application;
43 static IEnvironmentService environment;43 static IEnvironmentService environment;
44 static INotificationsService notifications;44 static INotificationsService notifications;
45 static IPluginManagerService plugin_manager;
46 static AbstractApplicationService application;
45 static IUniverseFactoryService universe_factory;47 static IUniverseFactoryService universe_factory;
46 static INetworkService network;48 static AbstractPackageManagerService package_manager;
4749
48 /// <summary>50 /// <summary>
49 /// Initializes the class. Must be called after Mono.Addins is initialized; if this is51 /// Initializes the class. Must be called after Mono.Addins is initialized; if this is
@@ -59,14 +61,16 @@
59 // TODO find a better exception to throw.61 // TODO find a better exception to throw.
60 throw new Exception ("AddinManager was initialized before Services.");62 throw new Exception ("AddinManager was initialized before Services.");
61 }63 }
64
62 AddinManager.AddExtensionNodeHandler ("/Do/Service", OnServiceChanged);65 AddinManager.AddExtensionNodeHandler ("/Do/Service", OnServiceChanged);
66 InitializeStrictServices ();
63 }67 }
6468
65 /// <summary>69 /// <summary>
66 /// When a service is changed, we "dirty the cache".70 /// When a service is changed, we "dirty the cache".
67 /// </summary>71 /// </summary>
68 static void OnServiceChanged (object sender, ExtensionNodeEventArgs e)72 static void OnServiceChanged (object sender, ExtensionNodeEventArgs e)
69 {73 {
70 IService service = e.ExtensionObject as IService;74 IService service = e.ExtensionObject as IService;
7175
72 switch (e.Change) {76 switch (e.Change) {
@@ -79,29 +83,29 @@
79 }83 }
8084
81 // Dirty the appropriate cache.85 // Dirty the appropriate cache.
86 if (service is ILogService)
87 logs = null;
82 if (service is ICoreService)88 if (service is ICoreService)
83 core = null;89 core = null;
84 if (service is IEnvironmentService)90 if (service is PathsService)
85 environment = null;91 paths = null;
92 if (service is INetworkService)
93 network = null;
94 if (service is IWindowingService)
95 windowing = null;
86 // Although it is not obvious, this also takes care of the ISecurePreferences service.96 // Although it is not obvious, this also takes care of the ISecurePreferences service.
87 if (service is IPreferencesService)97 if (service is IPreferencesService)
88 preferences = null;98 preferences = null;
89 if (service is ILogService)99 if (service is IEnvironmentService)
90 logs = null;100 environment = null;
91 if (service is IUniverseFactoryService)101 if (service is AbstractSystemService)
92 universe_factory = null;102 system = null;
93 if (service is INotificationsService)103 if (service is INotificationsService)
94 notifications = null;104 notifications = null;
95 if (service is IWindowingService)105 if (service is IUniverseFactoryService)
96 windowing = null;106 universe_factory = null;
97 if (service is PathsService)
98 paths = null;
99 if (service is AbstractApplicationService)107 if (service is AbstractApplicationService)
100 application = null;108 application = null;
101 if (service is AbstractSystemService)
102 system = null;
103 if (service is INetworkService)
104 network = null;
105 }109 }
106110
107 /// <summary>111 /// <summary>
@@ -185,9 +189,25 @@
185 network = LocateService<INetworkService, Default.NetworkService> ();189 network = LocateService<INetworkService, Default.NetworkService> ();
186 return network;190 return network;
187 }191 }
188 } 192 }
189 193
194 public static AbstractPackageManagerService PackageManager {
195 get {
196 if (package_manager == null)
197 package_manager = LocateService<AbstractPackageManagerService, Default.DefaultPackageManagerService> ();
198 return package_manager;
199 }
200 }
201 public static IPluginManagerService PluginManager {
202 get {
203 if (plugin_manager == null)
204 plugin_manager = LocateService<IPluginManagerService, Default.PluginManagerService> ();
205 return plugin_manager;
206 }
207 }
208
190 public static PreferencesFactory Preferences {209 public static PreferencesFactory Preferences {
210
191 get {211 get {
192 if (preferences == null) {212 if (preferences == null) {
193 IPreferencesService service = LocateService<IPreferencesService, Default.PreferencesService> ();213 IPreferencesService service = LocateService<IPreferencesService, Default.PreferencesService> ();
@@ -229,5 +249,20 @@
229 return Enumerable.Empty<TService> ();249 return Enumerable.Empty<TService> ();
230 }250 }
231 }251 }
252
253 /// <summary>
254 /// loops through the Property members of this class, and if it's a strict service gets it's value.
255 /// This will in turn cause a LocateService call, and the appropriate service will be loaded.
256 /// </summary>
257 static void InitializeStrictServices ()
258 {
259 foreach (PropertyInfo property in typeof (Services).GetProperties ()) {
260 Type returnType = property.PropertyType;
261 if (returnType.GetInterface ("Do.Platform.IStrictService") != null) {
262 // this looks stupid, but this is how you call the method on static classes.
263 property.GetValue (null, null);
264 }
265 }
266 }
232 }267 }
233}268}
234269
=== modified file 'Do.mds'
--- Do.mds 2009-04-22 04:42:48 +0000
+++ Do.mds 2009-06-22 15:51:57 +0000
@@ -15,6 +15,7 @@
15 <Entry build="True" name="Do.Interface.Linux.HUD" configuration="Debug" />15 <Entry build="True" name="Do.Interface.Linux.HUD" configuration="Debug" />
16 <Entry build="True" name="Do.Interface.Wink" configuration="Debug" />16 <Entry build="True" name="Do.Interface.Wink" configuration="Debug" />
17 <Entry build="True" name="Do.Interface.Linux.AnimationBase" configuration="Debug" />17 <Entry build="True" name="Do.Interface.Linux.AnimationBase" configuration="Debug" />
18 <Entry build="True" name="Do.Platform.Linux.JoliCloud" configuration="Debug" />
18 </Configuration>19 </Configuration>
19 <Configuration name="Release" ctype="CombineConfiguration">20 <Configuration name="Release" ctype="CombineConfiguration">
20 <Entry build="True" name="Do" configuration="Release" />21 <Entry build="True" name="Do" configuration="Release" />
@@ -31,6 +32,7 @@
31 <Entry build="True" name="Do.Interface.Linux.HUD" configuration="Release" />32 <Entry build="True" name="Do.Interface.Linux.HUD" configuration="Release" />
32 <Entry build="True" name="Do.Interface.Wink" configuration="Release" />33 <Entry build="True" name="Do.Interface.Wink" configuration="Release" />
33 <Entry build="True" name="Do.Interface.Linux.AnimationBase" configuration="Release" />34 <Entry build="True" name="Do.Interface.Linux.AnimationBase" configuration="Release" />
35 <Entry build="True" name="Do.Platform.Linux.JoliCloud" configuration="Release" />
34 <CustomCommands>36 <CustomCommands>
35 <Command type="BeforeBuild" command="autogen.sh --enable-release=YES" workingdir="${CombineDir}" />37 <Command type="BeforeBuild" command="autogen.sh --enable-release=YES" workingdir="${CombineDir}" />
36 </CustomCommands>38 </CustomCommands>
@@ -51,6 +53,7 @@
51 <Execute type="None" entry="Do.Interface.Linux.HUD" />53 <Execute type="None" entry="Do.Interface.Linux.HUD" />
52 <Execute type="None" entry="Do.Interface.Wink" />54 <Execute type="None" entry="Do.Interface.Wink" />
53 <Execute type="None" entry="Do.Interface.Linux.AnimationBase" />55 <Execute type="None" entry="Do.Interface.Linux.AnimationBase" />
56 <Execute type="None" entry="Do.Platform.Linux.JoliCloud" />
54 </StartMode>57 </StartMode>
55 <Entries>58 <Entries>
56 <Entry filename="Do/Do.mdp" />59 <Entry filename="Do/Do.mdp" />
@@ -67,5 +70,6 @@
67 <Entry filename="Do.Interface.Linux.HUD/Do.Interface.Linux.HUD.mdp" />70 <Entry filename="Do.Interface.Linux.HUD/Do.Interface.Linux.HUD.mdp" />
68 <Entry filename="Do.Interface.Wink/Do.Interface.Wink.mdp" />71 <Entry filename="Do.Interface.Wink/Do.Interface.Wink.mdp" />
69 <Entry filename="Do.Interface.Linux.AnimationBase/Do.Interface.Linux.AnimationBase.mdp" />72 <Entry filename="Do.Interface.Linux.AnimationBase/Do.Interface.Linux.AnimationBase.mdp" />
73 <Entry filename="Do.Platform.Linux.JoliCloud/Do.Platform.Linux.JoliCloud.mdp" />
70 </Entries>74 </Entries>
71</Combine>75</Combine>
72\ No newline at end of file76\ No newline at end of file
7377
=== modified file 'Do/Do.mdp'
--- Do/Do.mdp 2009-06-17 01:44:57 +0000
+++ Do/Do.mdp 2009-06-23 16:25:39 +0000
@@ -89,13 +89,11 @@
89 <File name="src/Do.Core/Shortcut.cs" subtype="Code" buildaction="Compile" />89 <File name="src/Do.Core/Shortcut.cs" subtype="Code" buildaction="Compile" />
90 <File name="src/Do.Core/ShortcutCallback.cs" subtype="Code" buildaction="Compile" />90 <File name="src/Do.Core/ShortcutCallback.cs" subtype="Code" buildaction="Compile" />
91 <File name="src/Do.Core/Do.Core.Addins/DockletAddinClassifier.cs" subtype="Code" buildaction="Compile" />91 <File name="src/Do.Core/Do.Core.Addins/DockletAddinClassifier.cs" subtype="Code" buildaction="Compile" />
92 <File name="src/Do.Platform/PluginManagerService.cs" subtype="Code" buildaction="Compile" />
92 </Contents>93 </Contents>
93 <References>94 <References>
94 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />95 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
95 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />96 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
96 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
97 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins.Gui, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
98 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins.Setup, Version=0.3.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
99 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />97 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
100 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />98 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
101 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />99 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -107,6 +105,9 @@
107 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />105 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
108 <ProjectReference type="Project" localcopy="True" refto="Do.Interface.Linux.AnimationBase" />106 <ProjectReference type="Project" localcopy="True" refto="Do.Interface.Linux.AnimationBase" />
109 <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />107 <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
108 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
109 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
110 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins.Setup, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
110 </References>111 </References>
111 <LanguageParameters ApplicationIcon="../../../../../jason/do/trunk-merge/Do" ctype="CSharpProjectParameters" />112 <LanguageParameters ApplicationIcon="../../../../../jason/do/trunk-merge/Do" ctype="CSharpProjectParameters" />
112 <Deployment.LinuxDeployData scriptName="gnome-do" />113 <Deployment.LinuxDeployData scriptName="gnome-do" />
113114
=== modified file 'Do/Makefile.am'
--- Do/Makefile.am 2009-06-17 01:44:57 +0000
+++ Do/Makefile.am 2009-06-23 15:35:41 +0000
@@ -41,6 +41,7 @@
41 src/Do.Platform/CoreService.cs \41 src/Do.Platform/CoreService.cs \
42 src/Do.Platform/ApplicationService.cs \42 src/Do.Platform/ApplicationService.cs \
43 src/Do.Platform/WindowingService.cs \43 src/Do.Platform/WindowingService.cs \
44 src/Do.Platform/PluginManagerService.cs \
44 src/Do.UI/ColorConfigurationWidget.cs \45 src/Do.UI/ColorConfigurationWidget.cs \
45 src/Do.UI/DoAddinInstallerDialog.cs \46 src/Do.UI/DoAddinInstallerDialog.cs \
46 src/Do.UI/GeneralPreferencesWidget.cs \47 src/Do.UI/GeneralPreferencesWidget.cs \
4748
=== modified file 'Do/Resources/Do.addin.xml'
--- Do/Resources/Do.addin.xml 2009-01-15 07:05:51 +0000
+++ Do/Resources/Do.addin.xml 2009-06-23 15:35:41 +0000
@@ -11,8 +11,9 @@
1111
12 <Extension path="/Do/Service">12 <Extension path="/Do/Service">
13 <Service type="Do.Platform.CoreService" />13 <Service type="Do.Platform.CoreService" />
14 <Service type="Do.Platform.WindowingService" />
14 <Service type="Do.Platform.ApplicationService" />15 <Service type="Do.Platform.ApplicationService" />
15 <Service type="Do.Platform.WindowingService" />16 <Service type="Do.Platform.PluginManagerService" />
16 </Extension>17 </Extension>
17 18
18 <Extension path="/Do/ItemSource">19 <Extension path="/Do/ItemSource">
1920
=== modified file 'Do/gtk-gui/Do.UI.DoAddinInstallerDialog.cs'
--- Do/gtk-gui/Do.UI.DoAddinInstallerDialog.cs 2009-05-27 14:56:37 +0000
+++ Do/gtk-gui/Do.UI.DoAddinInstallerDialog.cs 2009-06-23 16:25:39 +0000
@@ -122,7 +122,7 @@
122 w11.Spacing = 2;122 w11.Spacing = 2;
123 // Container child GtkHBox1.Gtk.Container+ContainerChild123 // Container child GtkHBox1.Gtk.Container+ContainerChild
124 Gtk.Image w12 = new Gtk.Image();124 Gtk.Image w12 = new Gtk.Image();
125 w12.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-ok", Gtk.IconSize.Button, 16);125 w12.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-ok", Gtk.IconSize.Button, 20);
126 w11.Add(w12);126 w11.Add(w12);
127 // Container child GtkHBox1.Gtk.Container+ContainerChild127 // Container child GtkHBox1.Gtk.Container+ContainerChild
128 Gtk.Label w14 = new Gtk.Label();128 Gtk.Label w14 = new Gtk.Label();
129129
=== modified file 'Do/gtk-gui/Do.UI.ManagePluginsPreferencesWidget.cs'
--- Do/gtk-gui/Do.UI.ManagePluginsPreferencesWidget.cs 2009-05-27 14:56:37 +0000
+++ Do/gtk-gui/Do.UI.ManagePluginsPreferencesWidget.cs 2009-06-23 16:25:39 +0000
@@ -124,7 +124,7 @@
124 w9.Spacing = 2;124 w9.Spacing = 2;
125 // Container child GtkHBox.Gtk.Container+ContainerChild125 // Container child GtkHBox.Gtk.Container+ContainerChild
126 Gtk.Image w10 = new Gtk.Image();126 Gtk.Image w10 = new Gtk.Image();
127 w10.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-preferences", Gtk.IconSize.Button, 16);127 w10.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-preferences", Gtk.IconSize.Button, 20);
128 w9.Add(w10);128 w9.Add(w10);
129 // Container child GtkHBox.Gtk.Container+ContainerChild129 // Container child GtkHBox.Gtk.Container+ContainerChild
130 Gtk.Label w12 = new Gtk.Label();130 Gtk.Label w12 = new Gtk.Label();
131131
=== modified file 'Do/gtk-gui/gui.stetic'
--- Do/gtk-gui/gui.stetic 2009-06-21 02:20:30 +0000
+++ Do/gtk-gui/gui.stetic 2009-06-23 16:48:52 +0000
@@ -5,10 +5,10 @@
5 <target-gtk-version>2.12</target-gtk-version>5 <target-gtk-version>2.12</target-gtk-version>
6 </configuration>6 </configuration>
7 <import>7 <import>
8 <widget-library name="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
9 <widget-library name="../../Do.Platform.Linux/bin/Debug/Do.Platform.Linux.dll" />8 <widget-library name="../../Do.Platform.Linux/bin/Debug/Do.Platform.Linux.dll" />
10 <widget-library name="../../Do.Interface.Linux/bin/Debug/Do.Interface.Linux.dll" />9 <widget-library name="../../Do.Interface.Linux/bin/Debug/Do.Interface.Linux.dll" />
11 <widget-library name="../../Do.Interface.Linux.AnimationBase/bin/Debug/Do.Interface.Linux.AnimationBase.dll" />10 <widget-library name="../../Do.Interface.Linux.AnimationBase/bin/Debug/Do.Interface.Linux.AnimationBase.dll" />
11 <widget-library name="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
12 <widget-library name="../bin/Debug/Do.exe" internal="true" />12 <widget-library name="../bin/Debug/Do.exe" internal="true" />
13 </import>13 </import>
14 <widget class="Gtk.Window" id="Do.UI.PreferencesWindow" design-size="450 470">14 <widget class="Gtk.Window" id="Do.UI.PreferencesWindow" design-size="450 470">
1515
=== modified file 'Do/src/Do.Core/PluginManager.cs'
--- Do/src/Do.Core/PluginManager.cs 2009-06-05 19:45:45 +0000
+++ Do/src/Do.Core/PluginManager.cs 2009-06-23 15:35:41 +0000
@@ -42,7 +42,7 @@
42 /// <summary>42 /// <summary>
43 /// PluginManager serves as Do's primary interface to Mono.Addins.43 /// PluginManager serves as Do's primary interface to Mono.Addins.
44 /// </summary>44 /// </summary>
45 internal class PluginManager45 public class PluginManager
46 {46 {
47 const string DefaultPluginIcon = "folder_tar";47 const string DefaultPluginIcon = "folder_tar";
48 48
@@ -103,6 +103,11 @@
103 manual.ForEach (dll => File.Delete (dll));103 manual.ForEach (dll => File.Delete (dll));
104 }104 }
105105
106 public static IEnumerable<Addin> GetAddins ()
107 {
108 return AddinManager.Registry.GetAddins ();
109 }
110
106 public static bool PluginClassifiesAs (AddinRepositoryEntry entry, string className)111 public static bool PluginClassifiesAs (AddinRepositoryEntry entry, string className)
107 {112 {
108 AddinClassifier classifier = Classifiers.FirstOrDefault (c => c.Name == className);113 AddinClassifier classifier = Classifiers.FirstOrDefault (c => c.Name == className);
109114
=== added file 'Do/src/Do.Platform/PluginManagerService.cs'
--- Do/src/Do.Platform/PluginManagerService.cs 1970-01-01 00:00:00 +0000
+++ Do/src/Do.Platform/PluginManagerService.cs 2009-06-23 16:48:52 +0000
@@ -0,0 +1,45 @@
1// PluginManagerService.cs
2//
3// GNOME Do is the legal property of its developers. Please refer to the
4// COPYRIGHT file distributed with this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20using System.Linq;
21using System.Collections.Generic;
22
23using Mono.Addins;
24
25using Do.Core;
26
27namespace Do.Platform
28{
29
30 public class PluginManagerService : IPluginManagerService
31 {
32#region IPluginManagerService Implementation
33 public Addin [] GetAddins ()
34 {
35 return PluginManager.GetAddins ().ToArray ();
36 }
37
38 public void Install (Addin addin)
39 {
40 addin.Enabled = true;
41 Do.UniverseManager.Reload ();
42 }
43#endregion
44 }
45}
046
=== modified file 'Makefile.am'
--- Makefile.am 2009-04-21 03:00:56 +0000
+++ Makefile.am 2009-06-22 15:51:57 +0000
@@ -11,6 +11,7 @@
11 Do.Interface.Wink \11 Do.Interface.Wink \
12 Do.Interface.Linux \12 Do.Interface.Linux \
13 Do.Platform.Linux \13 Do.Platform.Linux \
14 Do.Platform.Linux.JoliCloud \
14 Do.Interface.Linux.AnimationBase \15 Do.Interface.Linux.AnimationBase \
15 Do.Interface.Linux.Classic \16 Do.Interface.Linux.Classic \
16 Do.Interface.Linux.Docky \17 Do.Interface.Linux.Docky \
1718
=== modified file 'configure.ac'
--- configure.ac 2009-05-15 05:51:40 +0000
+++ configure.ac 2009-06-22 15:51:57 +0000
@@ -141,6 +141,8 @@
141Do.Platform/src/AssemblyInfo.cs141Do.Platform/src/AssemblyInfo.cs
142Do.Platform.Linux/Makefile142Do.Platform.Linux/Makefile
143Do.Platform.Linux/src/AssemblyInfo.cs143Do.Platform.Linux/src/AssemblyInfo.cs
144Do.Platform.Linux.JoliCloud/Makefile
145Do.Platform.Linux.JoliCloud/src/AssemblyInfo.cs
144Do.Platform.OSX/AssemblyInfo.cs146Do.Platform.OSX/AssemblyInfo.cs
145Do.Platform.Windows/AssemblyInfo.cs147Do.Platform.Windows/AssemblyInfo.cs
146Do.Universe/Makefile148Do.Universe/Makefile