show 'some rearrangements

This commit is contained in:
Hylke Bons 2010-05-22 16:41:28 +01:00
parent 24b0ecec28
commit 6825077915
6 changed files with 96 additions and 35 deletions

2
README
View file

@ -70,7 +70,7 @@ Frequently Asked Question
=========================
Q: Why is it written in Mono/C#?
A: Because.
A: Because. And I hate freedom too.
Info

View file

@ -0,0 +1,36 @@
// 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 Gtk;
using Notifications;
using SparkleShare;
namespace SparkleShare {
public class SparkleBubble : Notification {
public SparkleBubble (string Title, string Subtext) : base (Title, Subtext) {
Timeout = 4500;
Urgency = Urgency.Low;
Show ();
// TODO: Doesn't work for some reason
AttachToStatusIcon (SparkleUI.NotificationIcon);
}
}
}

View file

@ -0,0 +1,32 @@
// 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 Notifications;
namespace SparkleShare {
public class SparkleBubble : Notification {
public SparkleBubble (string Title, string Subtext) : base (Title, Subtext) {
Timeout = 4500;
Urgency = Urgency.Low;
Show ();
// StatusIcon = SparkleUI.NotificationIcon; // Doesn't work for some reason :(
}
}
}

View file

@ -57,8 +57,8 @@ namespace SparkleShare {
RemoteUrlCombo = new ComboBoxEntry (DefaultUrls);
Label RemoteUrlExample = new Label (_("<span size='small'><i>These usually look something like this:\n ") +
_("ssh://git@github.com/hbons/SparkleShare.</i></span>"));
Label RemoteUrlExample = new Label (_("These usually look something like this:\n ") +
_("ssh://git@github.com/hbons/SparkleShare."));
RemoteUrlExample.UseMarkup = true;
RemoteUrlExample.SetAlignment (0, 0);
RemoteUrlLabel.Xalign = 1;

View file

@ -48,14 +48,32 @@ namespace SparkleShare {
Menu.Add (StatusItem);
Menu.Add (new SeparatorMenuItem ());
MenuItem [] FolderItems =
new MenuItem [SparkleShare.Repositories.Length];
MenuItem OpenFolderItem = new MenuItem (_("SparkleShare Folder"));
OpenFolderItem.Activated += delegate {
Process Process = new Process ();
switch (SparklePlatform.Name) {
case "GNOME":
Process.StartInfo.FileName = "xdg-open";
break;
case "OSX":
Process.StartInfo.FileName = "open";
break;
}
Process.StartInfo.Arguments = SparklePaths.SparklePath;
Process.Start();
};
Menu.Add (OpenFolderItem);
Action [] FolderItems =
new Action [SparkleShare.Repositories.Length];
int i = 0;
foreach (SparkleRepo SparkleRepo in SparkleShare.Repositories) {
FolderItems [i] = new MenuItem (SparkleRepo.Name);
FolderItems [i] = new Action("", SparkleRepo.Name);
FolderItems [i].IconName = "folder";
FolderItems [i].IsImportant = true;
FolderItems [i].Activated += CreateWindowDelegate (SparkleRepo);
Menu.Add (FolderItems [i]);
Menu.Add (FolderItems [i].CreateMenuItem ());
i++;
}
@ -87,22 +105,6 @@ namespace SparkleShare {
}
};
MenuItem OpenFolderItem = new MenuItem (_("Open SparkleShare Folder"));
OpenFolderItem.Activated += delegate {
Process Process = new Process ();
switch (SparklePlatform.Name) {
case "GNOME":
Process.StartInfo.FileName = "xdg-open";
break;
case "OSX":
Process.StartInfo.FileName = "open";
break;
}
Process.StartInfo.Arguments = SparklePaths.SparklePath;
Process.Start();
};
Menu.Add (OpenFolderItem);
MenuItem AboutItem = new MenuItem (_("About SparkleShare"));
AboutItem.Activated += delegate {
Process Process = new Process ();
@ -123,10 +125,9 @@ namespace SparkleShare {
MenuItem QuitItem = new MenuItem ("Quit");
QuitItem.Activated += delegate { Environment.Exit (0); };
Menu.Add (QuitItem);
Menu.ShowAll ();
Menu.Popup ();
// TODO: Make sure the menu never overlaps the status icon
};
SetIdleState ();

View file

@ -49,7 +49,7 @@ namespace SparkleShare {
Title = _("" + SparkleRepo.Name + " on " +
SparkleRepo.RemoteOriginUrl
.TrimEnd (("/" + SparkleRepo.Name + ".git").ToCharArray ()));
IconName = "folder-sparkleshare";
IconName = "folder";
VBox LayoutVertical = new VBox (false, 0);
@ -73,14 +73,6 @@ namespace SparkleShare {
LayoutVertical.PackStart (DialogButtons, false, false, 0);
/* Timer RedrawTimer = new Timer ();
RedrawTimer.Interval = 5000;
RedrawTimer.Elapsed += delegate {
UpdatePeopleList ();
UpdateEventLog ();
};
RedrawTimer.Start();
*/
Add (LayoutVertical);
}
@ -194,7 +186,7 @@ namespace SparkleShare {
Columns [0].MinWidth = 28;
Columns [1].Expand = true;
Columns [2].Expand = true;
Columns [1].MinWidth = 300;
Columns [1].MinWidth = 350;
LogView.CursorChanged += delegate(object o, EventArgs args) {
TreeModel Model;