Re-enable libnotify bubbles
This commit is contained in:
parent
53eca6e848
commit
1e665b51fc
10
README
10
README
|
@ -100,14 +100,7 @@ Note:
|
|||
Run on Mac:
|
||||
===========
|
||||
|
||||
You will need to have the Mac version of git installed.
|
||||
|
||||
SparkleShare will look for git in /usr/bin, so you may need to create a symbolic
|
||||
link to git, depending on where it was installed:
|
||||
|
||||
$ sudo ln -s /path/to/your/git /usr/bin/git
|
||||
|
||||
Now just double-click the SparkleShare.app.
|
||||
Just double-click the SparkleShare.app.
|
||||
|
||||
|
||||
Build on Mac:
|
||||
|
@ -126,6 +119,7 @@ Note:
|
|||
$ export PKG_CONFIG=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config
|
||||
$ export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig
|
||||
$ ./autogen.sh
|
||||
$ make
|
||||
|
||||
The last step will give you some errors, but you only need the libraries to be compiled.
|
||||
Open 'SparkleShare/Mac/SparkleShare.sln' in MonoDevelop and start the build.
|
||||
|
|
|
@ -14,38 +14,34 @@
|
|||
// 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 Gtk;
|
||||
using SparkleShare;
|
||||
using Notifications;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
public class SparkleBubble {
|
||||
public class SparkleBubble : Notification {
|
||||
|
||||
public int Timeout;
|
||||
public string IconName;
|
||||
public Gdk.Pixbuf Icon;
|
||||
|
||||
public SparkleBubble (string title, string subtext)
|
||||
public SparkleBubble (string title, string subtext) : base (title, subtext)
|
||||
{
|
||||
|
||||
IconName = "folder-sparkleshare";
|
||||
Timeout = 4500;
|
||||
// Urgency = Urgency.Low;
|
||||
|
||||
//Show ();
|
||||
Urgency = Urgency.Low;
|
||||
|
||||
}
|
||||
|
||||
public void Show () {}
|
||||
// Checks whether the system allows adding buttons to a notification,
|
||||
// prevents error messages in Ubuntu.
|
||||
// new public void AddAction (string action, string label, ActionHandler handler)
|
||||
// {
|
||||
new public void AddAction (string action, string label, ActionHandler handler)
|
||||
{
|
||||
|
||||
// if (System.Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1)
|
||||
// base.AddAction (action, label, handler);
|
||||
if (Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1)
|
||||
base.AddAction (action, label, handler);
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -88,12 +88,10 @@ namespace SparkleShare {
|
|||
open_folder_button.Clicked += delegate (object o, EventArgs args) {
|
||||
|
||||
Process process = new Process ();
|
||||
process.StartInfo.FileName = Defines.OPEN_COMMAND;
|
||||
process.StartInfo.FileName = "xdg-open";
|
||||
process.StartInfo.Arguments = LocalPath.Replace (" ", "\\ "); // Escape space-characters
|
||||
process.Start ();
|
||||
|
||||
Close ();
|
||||
|
||||
};
|
||||
|
||||
Button close_button = new Button (Stock.Close);
|
||||
|
|
|
@ -14,10 +14,7 @@
|
|||
// 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 Mono.Unix;
|
||||
using Mono.Unix.Native;
|
||||
using SparkleLib;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
@ -26,6 +23,11 @@ using System.Runtime.InteropServices;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
using Gtk;
|
||||
using Mono.Unix;
|
||||
using Mono.Unix.Native;
|
||||
using SparkleLib;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
public class SparkleUI {
|
||||
|
@ -137,14 +139,14 @@ namespace SparkleShare {
|
|||
if (log.LocalPath.Equals (repository_path))
|
||||
log.UpdateEventLog ();
|
||||
|
||||
// bubble.AddAction ("", "Show Events", delegate {
|
||||
bubble.AddAction ("", "Show Events", delegate {
|
||||
|
||||
// SparkleLog log = new SparkleLog (repository_path);
|
||||
// log.ShowAll ();
|
||||
SparkleLog log = new SparkleLog (repository_path);
|
||||
log.ShowAll ();
|
||||
|
||||
// });
|
||||
});
|
||||
|
||||
// bubble.Show ();
|
||||
bubble.Show ();
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue