Code cleanup

This commit is contained in:
Hylke Bons 2010-07-27 10:56:20 +01:00
parent d8300cdb5c
commit cd80871acd
6 changed files with 32 additions and 23 deletions

View file

@ -167,7 +167,7 @@ namespace SparkleShare {
}
private void ShowStepTwo ()
public void ShowStepTwo ()
{
Title = _("Add Remote Folder");
@ -199,35 +199,41 @@ namespace SparkleShare {
HBox layout_server = new HBox (true, 0);
ServerEntry = new Entry ("ssh://gitorious.org/sparkleshare");
RadioButton radio_button = new RadioButton ("<b>" + _("On my own server:") + "</b>") {
Xalign = 0
};
ServerEntry = new Entry ("ssh://server.org/");
RadioButton radio_button = new RadioButton ("<b>" + _("On my own server:") + "</b>");
layout_server.Add (radio_button);
layout_server.Add (ServerEntry);
string github_text = "<b>" + "Github" + "</b>\n" +
"<span fgcolor='#777' size='small'>" +
_("Github provides free hosting for Open Source projects, ") +
_("but also has paid accounts for extra space and bandwidth.") +
"</span>";
RadioButton radio_button_github = new RadioButton (radio_button, "<b>" + _("Github") + "</b>\n" +
"<span fgcolor='#777'><small>Github provides free hosting for Open Source projects, " +
"but also has paid accounts for extra space and bandwidth.</small></span>") {
Xalign = 0
};
RadioButton radio_button_github = new RadioButton (radio_button, github_text);
(radio_button_github.Child as Label).UseMarkup = true;
(radio_button_github.Child as Label).Wrap = true;
RadioButton radio_button_gnome = new RadioButton (radio_button, "<b>" + _("The GNOME Project") + "</b>\n" +
"<span fgcolor='#777'><small>GNOME is an easy to understand interface to your computer. Select this option if youre a developer or designer working on GNOME.</small></span>") {
Xalign = 0
};
string gnome_text = "<b>" + _("The GNOME Project") + "</b>\n" +
"<span fgcolor='#777' size='small'>" +
_("GNOME is an easy to understand interface to your computer.") +
_("Select this option if youre a developer or designer working on GNOME.") +
"</span>";
RadioButton radio_button_gnome = new RadioButton (radio_button, gnome_text);
(radio_button_gnome.Child as Label).UseMarkup = true;
(radio_button_gnome.Child as Label).Wrap = true;
RadioButton radio_button_gitorious = new RadioButton (radio_button, "<b>" + _("Gitorious") + "</b>\n" +
"<span fgcolor='#777'><small>Gitorious provides a completely Free and Open Source infrastructure for hosting Open Source projects.</small></span>") {
string gitorious_text = "<b>" + _("Gitorious") + "</b>\n" +
"<span fgcolor='#777' size='small'>" +
_("Gitorious provides a completely Free and Open Source infrastructure ") +
_("for hosting Open Source projects.") +
"</span>";
RadioButton radio_button_gitorious = new RadioButton (radio_button, gitorious_text) {
Xalign = 0
};
@ -495,6 +501,7 @@ namespace SparkleShare {
}
// Checks to see if an email address is valid
private bool IsValidEmail(string email)
{
@ -504,6 +511,7 @@ namespace SparkleShare {
}
// Checks if a url is a valid git url
private static bool IsGitUrl (string url)
{
@ -528,6 +536,7 @@ namespace SparkleShare {
return url;
}
}
}

View file

@ -97,7 +97,7 @@ namespace SparkleShare {
// Fetch remote changes every minute
FetchTimer = new Timer () {
Interval = 30000
Interval = 5000
};
FetchTimer.Elapsed += delegate {

View file

@ -172,8 +172,9 @@ namespace SparkleShare {
add_item.Activated += delegate {
// SparkleDialog dialog = new SparkleDialog ("");
// dialog.ShowAll ();
SparkleIntro intro = new SparkleIntro ();
intro.ShowStepTwo ();
intro.ShowAll ();
};

View file

@ -74,7 +74,7 @@ namespace SparkleShare {
if (!HideUI) {
// Show the intro screen if there are no folders
if (Repositories.Count != 0) { //TODO: CHANGE THIS BACK LATER
if (Repositories.Count == 0) {
SparkleIntro intro = new SparkleIntro ();
intro.ShowAll ();

View file

@ -4,7 +4,6 @@ hicolordir = $(DESTDIR)$(datadir)/icons/hicolor
theme_icons = \
animations,process-syncing-sparkleshare-24.png \
animations,process-working-48.png \
places,folder-16.png \
places,folder-22.png \
places,folder-24.png \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB