shana / google-highly-open-participation-mono

Automatically exported from code.google.com/p/google-highly-open-participation-mono
0 stars 0 forks source link

Modify MonoDevelop's Welcome Page to import links and news from an online source. #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Mono IDE MonoDevelop has a "Welcome Page" that presents users with a
selection of useful links and shortcuts when they open MonoDevelop. It
would be useful if this page could update some of its content from an
online source.

Deliverables: A patch against MonoDevelop SVN that modifies the welcome
page to 
* Download an XML file containing a set of links. Ideally it should be
cached in the prefs directory and only updated when needed.
* A simple XML file containing current values for the information.
* Update the Welcome Page (both the HTML and GTK# versions) based on this
information if it's available. The links should replace the existing links.

Timescale: 5 days

Note: If you complete this successfully, I will create another task to
extend this feature to handle displaying a set of news links, and to warn
the user when their MD version is out of date. You will have first call on
the new task if you wish.

Original issue reported on code.google.com by m.j.hutc...@gmail.com on 19 Dec 2007 at 6:09

GoogleCodeExporter commented 9 years ago
At welcome page i would really like to see to have more links to recent 
projects.
Hopefully to config how many do you want to have it on. 

On the other hand it would be great to have modular welcome page, so every user 
can
adjust what he wants on welcome page.

Regards,
Jan Kraljič

Original comment by pchott@gmail.com on 19 Dec 2007 at 7:54

GoogleCodeExporter commented 9 years ago
Both good ideas... though this kind of configurability is probably beyond the 
scope
of a GHOP task.

Original comment by m.j.hutc...@gmail.com on 19 Dec 2007 at 5:55

GoogleCodeExporter commented 9 years ago
I might like to do this, but it would be nice to know what language(s) this 
would
involve.

Original comment by grizl...@gmail.com on 29 Dec 2007 at 3:49

GoogleCodeExporter commented 9 years ago
The Welcome Page addin already exists; it's C#. In addition XML would be needed 
for 
the update file, but it would be a static file on the server -- no server-side 
programming required. You can see the existing code at http://anonsvn.mono-
project.com/viewcvs/trunk/monodevelop/main/src/addins/WelcomePage/

First you'd need to add a startup handler to MD (in the welcome page addin) to 
download the news.xml file to the MD user data directory if it's been updated.

Next, notice that both versions of the welcome page 
(WelcomePageFallbackWidget.cs 
WelcomePageBrowser.cs) inherit from WelcomePageView.cs, and build their content 
from 
the same file, WelcomePageContent.xml. The easiest way would be to move the 
code 
that loads WelcomePageContent.xml into the base class, WelcomePageView.cs. 
Since all 
the links are defined in WelcomePageContent.xml, the loading code could simply 
update it using the news.xml file from the MD user config directory.

Original comment by m.j.hutc...@gmail.com on 29 Dec 2007 at 4:08

GoogleCodeExporter commented 9 years ago
hmmm, i'll have to touch up on c#, i mostly use C++ and VB, but this looks
interesting.  Let me look at it a bit and see if i am capable, probably 
tomorrow i'll
have decided.

Original comment by grizl...@gmail.com on 29 Dec 2007 at 5:56

GoogleCodeExporter commented 9 years ago
I claim this task

Original comment by grizl...@gmail.com on 29 Dec 2007 at 4:49

GoogleCodeExporter commented 9 years ago
Where on the web should nex.xml be stored?

Original comment by grizl...@gmail.com on 29 Dec 2007 at 4:50

GoogleCodeExporter commented 9 years ago
Probably http://monodevelop.com/VERSION/news.xml where VERSION is the release 
version (as this'll allow us to change the format). It does depend what web 
server I 
can get access to, so it could well be 
http://go-mono.com/monodevelop/VERSION/news 
or something. Please use a constant that we can change.

If you need to upload a news.xml file somewhere so that you can test your code, 
just 
post it here, and use the google code attachment URL (I think it'll work).

Original comment by m.j.hutc...@gmail.com on 29 Dec 2007 at 8:20

GoogleCodeExporter commented 9 years ago

Original comment by m.j.hutc...@gmail.com on 29 Dec 2007 at 8:21

GoogleCodeExporter commented 9 years ago
How would i test with the updates? Would I have to build the WHOLE solution, or 
could
is there a "sand-box" for it?

Original comment by grizl...@gmail.com on 29 Dec 2007 at 8:42

GoogleCodeExporter commented 9 years ago
The welcome page pretty much has to be built as part of MD. However, you only 
need 
to build "main", not "extras"...

Check it out, CD into "main", run "./autogen.sh" to set up the build, then 
"make" to 
build it, then "make run", will run MD without installing it.

You may need to install some stuff, like autotools, to get this building. If 
you run 
into any problems, let me know (and tell me your distro).

Original comment by m.j.hutc...@gmail.com on 29 Dec 2007 at 8:47

GoogleCodeExporter commented 9 years ago
I am a windows person :( I really want to switch to linux, but it has some 
stuff on
it that parents want to keep, and are to lazy to move, so i can't convert to 
linux.
Are there windows tools to do this? (I have visual studio .NET 2003). Also, are 
you
in the IRC channels?

Original comment by grizl...@gmail.com on 29 Dec 2007 at 8:51

GoogleCodeExporter commented 9 years ago
On Windows right now you could code and build the welcome page, but you'd need 
to 
make you own project (csproj) file and reference precompiled binaries from a 
Linux 
system. Also you'd need VS2005, because we target the 2.0 runtime, but the 
Express 
editions of VS 2005 are free. Testing it would right now require Linux (you 
might be 
able to do it with Cygwin, but that would be a long story).

Some time in the coming weeks MD will run on Windows, but not yet, sorry. If 
you 
want I can create this as another GHOP task ;-)

For simplicity I suggest using the OpenSUSE Mono VMWare virtual machine image 
from 
http://www.mono-project.com/Downloads. The VMWare player is free and has a 
windows 
version.

I'm in IRC on weekdays, and at weekends you may be able to catch me on Google 
Tak 
(m.j.hutchinson@gmail.com)

Original comment by m.j.hutc...@gmail.com on 29 Dec 2007 at 9:03

GoogleCodeExporter commented 9 years ago
Ok, I have openSuSE VM with monodevelop, what tools do i need?

Original comment by grizl...@gmail.com on 30 Dec 2007 at 4:31

GoogleCodeExporter commented 9 years ago
Check out the MonoDevelop main source from our subversion server with the 
command "svn co http://anonsvn.mono-project.com/source/trunk/monodevelop/main 
md-
main", then initialise its build system with "./autogen.sh". After this you 
will be 
able to build it with the "make" command (in the directory md-main). If you 
want to 
install the newer version use "sudo make install".

You can also open the Monodevelop.mds solution with Monodevelop. You can build 
it 
from MD, but don't run it from MD -- use the "make run" command to test it out 
without installing it (because if your modifications don't work, that could 
possibly 
break your installed copy).

Original comment by m.j.hutc...@gmail.com on 30 Dec 2007 at 7:20

GoogleCodeExporter commented 9 years ago
Thanks, I am working, but its going a little slow cause it is crashing often.  
I have
made a structure for the news.xml and have started the code for loading it from 
the
hard drive, Then I will add a download function.

Original comment by grizl...@gmail.com on 31 Dec 2007 at 9:33

GoogleCodeExporter commented 9 years ago
What kind of crashes are you getting? Updating the VM image to Mono 1.2.6 and 
the
latest GTK# may fix some of the bugs.

Original comment by m.j.hutc...@gmail.com on 31 Dec 2007 at 10:07

GoogleCodeExporter commented 9 years ago
its just slow, oh well - i am going to write the code in VS and then upload it
somewhere to test it.

Original comment by grizl...@gmail.com on 1 Jan 2008 at 12:11

Attachments:

GoogleCodeExporter commented 9 years ago
When will the windows version be released? I am having serious troubles trying 
to
compile and run on the VM because there simply isn't enough memory left after 
so many
layers, so it freezes.

Original comment by grizl...@gmail.com on 1 Jan 2008 at 3:11

GoogleCodeExporter commented 9 years ago
It is in this - I believe it is where i load the news.xml file (line 121)

Original comment by grizl...@gmail.com on 3 Jan 2008 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
ERROR [2008-01-03 10:36:43Z]: System.Reflection.TargetInvocationException: 
Exception
has been thrown by the target of an invocation. ---> 
System.NullReferenceException: A
null value was found where an object instance was required.
  at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x00000] 
  at System.Xml.XmlInputStream..ctor (System.IO.Stream stream) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Xml.XmlInputStream:.ctor
(System.IO.Stream)
  at System.Xml.XmlStreamReader..ctor (System.IO.Stream input) [0x00000] 
  at (wrapper remoting-invoke-with-check) System.Xml.XmlStreamReader:.ctor
(System.IO.Stream)
  at System.Xml.XmlTextReader..ctor (System.IO.Stream input) [0x00000] 
  at MonoDevelop.WelcomePage.WelcomePageFallbackWidget.BuildFromXml () [0x0004b] in
/home/steve/md-main/src/addins/WelcomePage/WelcomePageFallbackWidget.cs:121 
  at MonoDevelop.WelcomePage.WelcomePageFallbackWidget..ctor
(MonoDevelop.WelcomePage.WelcomePageView parentView) [0x00000] 
  at MonoDevelop.WelcomePage.WelcomePageFallbackView..ctor () [0x00000] 
  at MonoDevelop.WelcomePage.WelcomePageView.GetWelcomePage () [0x00000] in
/home/steve/md-main/src/addins/WelcomePage/WelcomePageView.cs:138 
  at MonoDevelop.WelcomePage.ShowWelcomePageOnStartUpHandler.Run () [0x00011] in
/home/steve/md-main/src/addins/WelcomePage/WelcomePageCommands.cs:47 
  at <0x00000> <unknown method>
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception 
stack
trace ---

  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000] 
  at MonoDevelop.Ide.Gui.IdeApp.OnExtensionChanged (System.Object s,
Mono.Addins.ExtensionNodeEventArgs args) [0x0000b] in
/home/steve/md-main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Ide.cs:181 

Original comment by grizl...@gmail.com on 3 Jan 2008 at 6:46

GoogleCodeExporter commented 9 years ago
Here you go:

Original comment by grizl...@gmail.com on 4 Jan 2008 at 6:30

Attachments:

GoogleCodeExporter commented 9 years ago
Updated patch

Original comment by grizl...@gmail.com on 4 Jan 2008 at 7:11

Attachments:

GoogleCodeExporter commented 9 years ago
2007-01-04  Steve Y.  <grizlo42@gmail.com>

    * WelcomePageContent.xml: Added new set of links "News Links" for loading
      online links
    * WelcomePageView.cs: Added function GetUpdatedXmlContent() to download
      news.xml off server, combine with WelcomePageContent.xml, and return
      and XmlDocument.
    * WelcomePageFallbackWidget.cs: Added to BuildFromXml () so that the widget
      includes News links on the Welcome Page by loading them from the XML
      returned from GetUpdatedXmlContent () or adding "No news has been found"
      if the news.xml has no updates.
    * WelcomePage.xsl: Added test if no news links are found, display
      "No news can be found"
    * WelcomePageBrowser.cs: Loads XML from function GetUpdatedXmlContent ()
      instead of resource file.
    * MonoDevelop.WelcomePage.WelcomePageFallbackWidget.cs: Added GTK containers
      for displaying News Links section in between Support Links and Development
      Links.

Original comment by grizl...@gmail.com on 4 Jan 2008 at 8:12

GoogleCodeExporter commented 9 years ago
Excellent work; it works well. I'll make a couple of minor changes (formatting,
Dispose() some stuff etc) and commit.

Original comment by m.j.hutc...@gmail.com on 4 Jan 2008 at 8:37