show 'some rearrangements
This commit is contained in:
parent
0a197b9009
commit
7d465a9eb8
2
README
2
README
|
@ -70,7 +70,7 @@ Frequently Asked Question
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
Q: Why is it written in Mono/C#?
|
Q: Why is it written in Mono/C#?
|
||||||
A: Because.
|
A: Because. And I hate freedom too.
|
||||||
|
|
||||||
|
|
||||||
Info
|
Info
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
using Gtk;
|
||||||
using Notifications;
|
using Notifications;
|
||||||
|
using SparkleShare;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
@ -24,7 +26,9 @@ namespace SparkleShare {
|
||||||
Timeout = 4500;
|
Timeout = 4500;
|
||||||
Urgency = Urgency.Low;
|
Urgency = Urgency.Low;
|
||||||
Show ();
|
Show ();
|
||||||
// StatusIcon = SparkleUI.NotificationIcon; // Doesn't work for some reason :(
|
|
||||||
|
// TODO: Doesn't work for some reason
|
||||||
|
AttachToStatusIcon (SparkleUI.NotificationIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
32
SparkleShare/SparkleBubble.osx.cs
Normal file
32
SparkleShare/SparkleBubble.osx.cs
Normal 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 :(
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -57,8 +57,8 @@ namespace SparkleShare {
|
||||||
|
|
||||||
RemoteUrlCombo = new ComboBoxEntry (DefaultUrls);
|
RemoteUrlCombo = new ComboBoxEntry (DefaultUrls);
|
||||||
|
|
||||||
Label RemoteUrlExample = new Label (_("<span size='small'><i>These usually look something like this:\n ") +
|
Label RemoteUrlExample = new Label (_("These usually look something like this:\n ") +
|
||||||
_("‘ssh://git@github.com/hbons/SparkleShare’.</i></span>"));
|
_("‘ssh://git@github.com/hbons/SparkleShare’."));
|
||||||
RemoteUrlExample.UseMarkup = true;
|
RemoteUrlExample.UseMarkup = true;
|
||||||
RemoteUrlExample.SetAlignment (0, 0);
|
RemoteUrlExample.SetAlignment (0, 0);
|
||||||
RemoteUrlLabel.Xalign = 1;
|
RemoteUrlLabel.Xalign = 1;
|
||||||
|
|
|
@ -48,14 +48,32 @@ namespace SparkleShare {
|
||||||
Menu.Add (StatusItem);
|
Menu.Add (StatusItem);
|
||||||
Menu.Add (new SeparatorMenuItem ());
|
Menu.Add (new SeparatorMenuItem ());
|
||||||
|
|
||||||
MenuItem [] FolderItems =
|
MenuItem OpenFolderItem = new MenuItem (_("SparkleShare Folder"));
|
||||||
new MenuItem [SparkleShare.Repositories.Length];
|
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;
|
int i = 0;
|
||||||
foreach (SparkleRepo SparkleRepo in SparkleShare.Repositories) {
|
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);
|
FolderItems [i].Activated += CreateWindowDelegate (SparkleRepo);
|
||||||
Menu.Add (FolderItems [i]);
|
Menu.Add (FolderItems [i].CreateMenuItem ());
|
||||||
i++;
|
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"));
|
MenuItem AboutItem = new MenuItem (_("About SparkleShare"));
|
||||||
AboutItem.Activated += delegate {
|
AboutItem.Activated += delegate {
|
||||||
Process Process = new Process ();
|
Process Process = new Process ();
|
||||||
|
@ -123,10 +125,9 @@ namespace SparkleShare {
|
||||||
MenuItem QuitItem = new MenuItem ("Quit");
|
MenuItem QuitItem = new MenuItem ("Quit");
|
||||||
QuitItem.Activated += delegate { Environment.Exit (0); };
|
QuitItem.Activated += delegate { Environment.Exit (0); };
|
||||||
Menu.Add (QuitItem);
|
Menu.Add (QuitItem);
|
||||||
|
|
||||||
Menu.ShowAll ();
|
Menu.ShowAll ();
|
||||||
Menu.Popup ();
|
Menu.Popup ();
|
||||||
|
// TODO: Make sure the menu never overlaps the status icon
|
||||||
};
|
};
|
||||||
|
|
||||||
SetIdleState ();
|
SetIdleState ();
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace SparkleShare {
|
||||||
Title = _("‘" + SparkleRepo.Name + "’ on " +
|
Title = _("‘" + SparkleRepo.Name + "’ on " +
|
||||||
SparkleRepo.RemoteOriginUrl
|
SparkleRepo.RemoteOriginUrl
|
||||||
.TrimEnd (("/" + SparkleRepo.Name + ".git").ToCharArray ()));
|
.TrimEnd (("/" + SparkleRepo.Name + ".git").ToCharArray ()));
|
||||||
IconName = "folder-sparkleshare";
|
IconName = "folder";
|
||||||
|
|
||||||
VBox LayoutVertical = new VBox (false, 0);
|
VBox LayoutVertical = new VBox (false, 0);
|
||||||
|
|
||||||
|
@ -73,14 +73,6 @@ namespace SparkleShare {
|
||||||
|
|
||||||
LayoutVertical.PackStart (DialogButtons, false, false, 0);
|
LayoutVertical.PackStart (DialogButtons, false, false, 0);
|
||||||
|
|
||||||
/* Timer RedrawTimer = new Timer ();
|
|
||||||
RedrawTimer.Interval = 5000;
|
|
||||||
RedrawTimer.Elapsed += delegate {
|
|
||||||
UpdatePeopleList ();
|
|
||||||
UpdateEventLog ();
|
|
||||||
};
|
|
||||||
RedrawTimer.Start();
|
|
||||||
*/
|
|
||||||
Add (LayoutVertical);
|
Add (LayoutVertical);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -194,7 +186,7 @@ namespace SparkleShare {
|
||||||
Columns [0].MinWidth = 28;
|
Columns [0].MinWidth = 28;
|
||||||
Columns [1].Expand = true;
|
Columns [1].Expand = true;
|
||||||
Columns [2].Expand = true;
|
Columns [2].Expand = true;
|
||||||
Columns [1].MinWidth = 300;
|
Columns [1].MinWidth = 350;
|
||||||
|
|
||||||
LogView.CursorChanged += delegate(object o, EventArgs args) {
|
LogView.CursorChanged += delegate(object o, EventArgs args) {
|
||||||
TreeModel Model;
|
TreeModel Model;
|
||||||
|
|
Loading…
Reference in a new issue