new class [invitation]
This commit is contained in:
parent
db7a4465de
commit
333be72bfe
|
@ -23,8 +23,7 @@ using System.Timers;
|
||||||
|
|
||||||
namespace SparkleLib {
|
namespace SparkleLib {
|
||||||
|
|
||||||
public class SparkleRepo
|
public class SparkleRepo {
|
||||||
{
|
|
||||||
|
|
||||||
private Process Process;
|
private Process Process;
|
||||||
private Timer FetchTimer;
|
private Timer FetchTimer;
|
||||||
|
|
|
@ -11,6 +11,7 @@ SOURCES = \
|
||||||
SparkleBubble.cs \
|
SparkleBubble.cs \
|
||||||
SparkleEntry.cs \
|
SparkleEntry.cs \
|
||||||
SparkleIntro.cs \
|
SparkleIntro.cs \
|
||||||
|
SparkleInvitation.cs \
|
||||||
SparkleShare.cs \
|
SparkleShare.cs \
|
||||||
SparkleSpinner.cs \
|
SparkleSpinner.cs \
|
||||||
SparkleStatusIcon.cs \
|
SparkleStatusIcon.cs \
|
||||||
|
|
43
SparkleShare/SparkleInvitation.cs
Normal file
43
SparkleShare/SparkleInvitation.cs
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
// SparkleShare, an instant update workflow to Git.
|
||||||
|
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
||||||
|
//
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
class SparkleInvitation {
|
||||||
|
|
||||||
|
public SparkleInvitation (string file_path)
|
||||||
|
{
|
||||||
|
|
||||||
|
XmlDocument xml_doc = new XmlDocument ();
|
||||||
|
xml_doc.Load (file_path);
|
||||||
|
|
||||||
|
XmlNodeList server_xml = xml_doc.GetElementsByTagName ("server");
|
||||||
|
XmlNodeList repository_xml = xml_doc.GetElementsByTagName ("repository");
|
||||||
|
XmlNodeList key_xml = xml_doc.GetElementsByTagName ("key");
|
||||||
|
|
||||||
|
string server = server_xml [0].InnerText;
|
||||||
|
string repository = repository_xml [0].InnerText;
|
||||||
|
string key = key_xml [0].InnerText;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -49,6 +49,8 @@ namespace SparkleShare {
|
||||||
BusG.Init ();
|
BusG.Init ();
|
||||||
Gtk.Application.Init ();
|
Gtk.Application.Init ();
|
||||||
|
|
||||||
|
SparkleInvitation i = new SparkleInvitation ("/home/hbons/SparkleShare/sparkleshare.invitation");
|
||||||
|
|
||||||
SetProcessName ("sparkleshare");
|
SetProcessName ("sparkleshare");
|
||||||
|
|
||||||
Repositories = new List <SparkleRepo> ();
|
Repositories = new List <SparkleRepo> ();
|
||||||
|
|
7
data/gnome-design.sparkleshare-invitation
Normal file
7
data/gnome-design.sparkleshare-invitation
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<sparkleshare_invitation>
|
||||||
|
<server="git.gnome.org" />
|
||||||
|
<repository="gnome-design" />
|
||||||
|
<key="a22bc6f4b9ffe8e5acd4be0838d41aa10a1187dd" />
|
||||||
|
<email="hylkebons@gmail.com" />
|
||||||
|
</sparkleshare_invitation>
|
Loading…
Reference in a new issue