Re-enable libnotify bubbles

This commit is contained in:
Hylke Bons 2011-03-13 22:26:49 +00:00
parent 53eca6e848
commit 1e665b51fc
4 changed files with 26 additions and 36 deletions

10
README
View file

@ -100,14 +100,7 @@ Note:
Run on Mac: Run on Mac:
=========== ===========
You will need to have the Mac version of git installed. Just double-click the SparkleShare.app.
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.
Build on Mac: Build on Mac:
@ -126,6 +119,7 @@ Note:
$ export PKG_CONFIG=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config $ export PKG_CONFIG=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config
$ export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig $ export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig
$ ./autogen.sh $ ./autogen.sh
$ make
The last step will give you some errors, but you only need the libraries to be compiled. 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. Open 'SparkleShare/Mac/SparkleShare.sln' in MonoDevelop and start the build.

View file

@ -14,38 +14,34 @@
// 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 System;
using Gtk; using Gtk;
using SparkleShare; using Notifications;
namespace SparkleShare { namespace SparkleShare {
public class SparkleBubble { public class SparkleBubble : Notification {
public int Timeout; public SparkleBubble (string title, string subtext) : base (title, subtext)
public string IconName;
public Gdk.Pixbuf Icon;
public SparkleBubble (string title, string subtext)
{ {
IconName = "folder-sparkleshare"; IconName = "folder-sparkleshare";
Timeout = 4500; Timeout = 4500;
// Urgency = Urgency.Low; Urgency = Urgency.Low;
//Show ();
} }
public void Show () {}
// Checks whether the system allows adding buttons to a notification, // Checks whether the system allows adding buttons to a notification,
// prevents error messages in Ubuntu. // 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) if (Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1)
// base.AddAction (action, label, handler); base.AddAction (action, label, handler);
// } }
} }

View file

@ -88,12 +88,10 @@ namespace SparkleShare {
open_folder_button.Clicked += delegate (object o, EventArgs args) { open_folder_button.Clicked += delegate (object o, EventArgs args) {
Process process = new Process (); Process process = new Process ();
process.StartInfo.FileName = Defines.OPEN_COMMAND; process.StartInfo.FileName = "xdg-open";
process.StartInfo.Arguments = LocalPath.Replace (" ", "\\ "); // Escape space-characters process.StartInfo.Arguments = LocalPath.Replace (" ", "\\ "); // Escape space-characters
process.Start (); process.Start ();
Close ();
}; };
Button close_button = new Button (Stock.Close); Button close_button = new Button (Stock.Close);

View file

@ -14,10 +14,7 @@
// 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 Mono.Unix;
using Mono.Unix.Native;
using SparkleLib;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@ -26,6 +23,11 @@ using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using Gtk;
using Mono.Unix;
using Mono.Unix.Native;
using SparkleLib;
namespace SparkleShare { namespace SparkleShare {
public class SparkleUI { public class SparkleUI {
@ -137,14 +139,14 @@ namespace SparkleShare {
if (log.LocalPath.Equals (repository_path)) if (log.LocalPath.Equals (repository_path))
log.UpdateEventLog (); log.UpdateEventLog ();
// bubble.AddAction ("", "Show Events", delegate { bubble.AddAction ("", "Show Events", delegate {
// SparkleLog log = new SparkleLog (repository_path); SparkleLog log = new SparkleLog (repository_path);
// log.ShowAll (); log.ShowAll ();
// }); });
// bubble.Show (); bubble.Show ();
}); });