Merge https://github.com/alexhudson/SparkleShare into integration
This commit is contained in:
commit
549941fd2a
|
@ -1,95 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2006-2007 Sebastian Dröge <slomo@circular-chaos.org>
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
using NDesk.DBus;
|
|
||||||
using org.freedesktop;
|
|
||||||
using org.freedesktop.DBus;
|
|
||||||
|
|
||||||
namespace Notifications {
|
|
||||||
[Interface ("org.freedesktop.Notifications")]
|
|
||||||
internal interface INotifications : Introspectable, Properties {
|
|
||||||
ServerInformation ServerInformation { get; }
|
|
||||||
string[] Capabilities { get; }
|
|
||||||
void CloseNotification (uint id);
|
|
||||||
uint Notify (string app_name, uint id, string icon, string summary, string body,
|
|
||||||
string[] actions, IDictionary<string, object> hints, int timeout);
|
|
||||||
event NotificationClosedHandler NotificationClosed;
|
|
||||||
event ActionInvokedHandler ActionInvoked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum CloseReason : uint {
|
|
||||||
Expired = 1,
|
|
||||||
User = 2,
|
|
||||||
API = 3,
|
|
||||||
Reserved = 4
|
|
||||||
}
|
|
||||||
|
|
||||||
internal delegate void NotificationClosedHandler (uint id, uint reason);
|
|
||||||
internal delegate void ActionInvokedHandler (uint id, string action);
|
|
||||||
|
|
||||||
public struct ServerInformation {
|
|
||||||
public string Name;
|
|
||||||
public string Vendor;
|
|
||||||
public string Version;
|
|
||||||
public string SpecVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Global {
|
|
||||||
private const string interface_name = "org.freedesktop.Notifications";
|
|
||||||
private const string object_path = "/org/freedesktop/Notifications";
|
|
||||||
|
|
||||||
private static INotifications dbus_object = null;
|
|
||||||
private static object dbus_object_lock = new object ();
|
|
||||||
|
|
||||||
internal static INotifications DBusObject {
|
|
||||||
get {
|
|
||||||
if (dbus_object != null)
|
|
||||||
return dbus_object;
|
|
||||||
|
|
||||||
lock (dbus_object_lock) {
|
|
||||||
if (! Bus.Session.NameHasOwner (interface_name))
|
|
||||||
Bus.Session.StartServiceByName (interface_name);
|
|
||||||
|
|
||||||
dbus_object = Bus.Session.GetObject<INotifications>
|
|
||||||
(interface_name, new ObjectPath (object_path));
|
|
||||||
return dbus_object;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string[] Capabilities {
|
|
||||||
get {
|
|
||||||
return DBusObject.Capabilities;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ServerInformation ServerInformation {
|
|
||||||
get {
|
|
||||||
return DBusObject.ServerInformation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
ASSEMBLY = NotifySharp
|
|
||||||
|
|
||||||
TARGET = library
|
|
||||||
|
|
||||||
LINK = $(REF_NOTIFY_SHARP)
|
|
||||||
|
|
||||||
SOURCES = \
|
|
||||||
Global.cs \
|
|
||||||
Notification.cs
|
|
||||||
|
|
||||||
RESOURCES =
|
|
||||||
|
|
||||||
include $(top_srcdir)/build/build.mk
|
|
|
@ -1,384 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2006-2007 Sebastian Dröge <slomo@circular-chaos.org>
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
using GLib;
|
|
||||||
using Gdk;
|
|
||||||
using Gtk;
|
|
||||||
|
|
||||||
using NDesk.DBus;
|
|
||||||
using org.freedesktop;
|
|
||||||
using org.freedesktop.DBus;
|
|
||||||
|
|
||||||
namespace Notifications {
|
|
||||||
public enum Urgency : byte {
|
|
||||||
Low = 0,
|
|
||||||
Normal,
|
|
||||||
Critical
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ActionArgs : EventArgs {
|
|
||||||
private string action;
|
|
||||||
public string Action {
|
|
||||||
get { return action; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionArgs (string action) {
|
|
||||||
this.action = action;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CloseArgs : EventArgs {
|
|
||||||
private CloseReason reason;
|
|
||||||
public CloseReason Reason {
|
|
||||||
get { return reason; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public CloseArgs (CloseReason reason) {
|
|
||||||
this.reason = reason;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public delegate void ActionHandler (object o, ActionArgs args);
|
|
||||||
public delegate void CloseHandler (object o, CloseArgs args);
|
|
||||||
|
|
||||||
public class Notification {
|
|
||||||
private struct IconData {
|
|
||||||
public int Width;
|
|
||||||
public int Height;
|
|
||||||
public int Rowstride;
|
|
||||||
public bool HasAlpha;
|
|
||||||
public int BitsPerSample;
|
|
||||||
public int NChannels;
|
|
||||||
public byte[] Pixels;
|
|
||||||
}
|
|
||||||
|
|
||||||
private struct ActionTuple {
|
|
||||||
public string Label;
|
|
||||||
public ActionHandler Handler;
|
|
||||||
|
|
||||||
public ActionTuple (string label, ActionHandler handler) {
|
|
||||||
Label = label;
|
|
||||||
Handler = handler;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private INotifications nf;
|
|
||||||
|
|
||||||
private bool updates_pending = false;
|
|
||||||
private bool shown = false;
|
|
||||||
|
|
||||||
private string app_name;
|
|
||||||
private uint id = 0;
|
|
||||||
private int timeout = -1;
|
|
||||||
private string summary = String.Empty, body = String.Empty;
|
|
||||||
private string icon = String.Empty;
|
|
||||||
private Gtk.Widget attach_widget = null;
|
|
||||||
private Gtk.StatusIcon status_icon = null;
|
|
||||||
private IDictionary <string, ActionTuple> action_map = new Dictionary<string, ActionTuple> ();
|
|
||||||
private IDictionary <string, object> hints = new Dictionary<string, object> ();
|
|
||||||
|
|
||||||
public event EventHandler Closed;
|
|
||||||
|
|
||||||
static Notification () {
|
|
||||||
BusG.Init ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification () {
|
|
||||||
nf = Global.DBusObject;
|
|
||||||
|
|
||||||
nf.NotificationClosed += OnClosed;
|
|
||||||
nf.ActionInvoked += OnActionInvoked;
|
|
||||||
|
|
||||||
this.app_name = Assembly.GetCallingAssembly().GetName().Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body) : this () {
|
|
||||||
this.summary = summary;
|
|
||||||
this.body = body;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body, string icon) : this (summary, body) {
|
|
||||||
this.icon = icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body, Pixbuf icon) : this (summary, body) {
|
|
||||||
SetPixbufHint (icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body, Pixbuf icon, Gtk.Widget widget) : this (summary, body, icon) {
|
|
||||||
AttachToWidget (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body, string icon, Gtk.Widget widget) : this (summary, body, icon) {
|
|
||||||
AttachToWidget (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body, Pixbuf icon, Gtk.StatusIcon status_icon) : this (summary, body, icon) {
|
|
||||||
AttachToStatusIcon (status_icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Notification (string summary, string body, string icon, Gtk.StatusIcon status_icon) : this (summary, body, icon) {
|
|
||||||
AttachToStatusIcon (status_icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public string Summary {
|
|
||||||
set {
|
|
||||||
summary = value;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
return summary;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Body {
|
|
||||||
set {
|
|
||||||
body = value;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
return body;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Timeout {
|
|
||||||
set {
|
|
||||||
timeout = value;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
return timeout;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Urgency Urgency {
|
|
||||||
set {
|
|
||||||
hints["urgency"] = (byte) value;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
return hints.ContainsKey ("urgency") ? (Urgency) hints["urgency"] : Urgency.Normal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Category {
|
|
||||||
set {
|
|
||||||
hints["category"] = value;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
return hints.ContainsKey ("category") ? (string) hints["category"] : String.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Pixbuf Icon {
|
|
||||||
set {
|
|
||||||
SetPixbufHint (value);
|
|
||||||
icon = String.Empty;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string IconName {
|
|
||||||
set {
|
|
||||||
icon = value;
|
|
||||||
hints.Remove ("icon_data");
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public uint Id {
|
|
||||||
get {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Gtk.Widget AttachWidget {
|
|
||||||
get {
|
|
||||||
return attach_widget;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
AttachToWidget (value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Gtk.StatusIcon StatusIcon {
|
|
||||||
get {
|
|
||||||
return status_icon;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
AttachToStatusIcon (value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetPixbufHint (Pixbuf pixbuf) {
|
|
||||||
IconData icon_data = new IconData ();
|
|
||||||
icon_data.Width = pixbuf.Width;
|
|
||||||
icon_data.Height = pixbuf.Height;
|
|
||||||
icon_data.Rowstride = pixbuf.Rowstride;
|
|
||||||
icon_data.HasAlpha = pixbuf.HasAlpha;
|
|
||||||
icon_data.BitsPerSample = pixbuf.BitsPerSample;
|
|
||||||
icon_data.NChannels = pixbuf.NChannels;
|
|
||||||
|
|
||||||
int len = (icon_data.Height - 1) * icon_data.Rowstride + icon_data.Width *
|
|
||||||
((icon_data.NChannels * icon_data.BitsPerSample + 7) / 8);
|
|
||||||
icon_data.Pixels = new byte[len];
|
|
||||||
System.Runtime.InteropServices.Marshal.Copy (pixbuf.Pixels, icon_data.Pixels, 0, len);
|
|
||||||
|
|
||||||
hints["icon_data"] = icon_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AttachToWidget (Gtk.Widget widget) {
|
|
||||||
int x, y;
|
|
||||||
|
|
||||||
widget.GdkWindow.GetOrigin (out x, out y);
|
|
||||||
|
|
||||||
if (widget.GetType() != typeof (Gtk.Window) || ! widget.GetType().IsSubclassOf(typeof (Gtk.Window))) {
|
|
||||||
x += widget.Allocation.X;
|
|
||||||
y += widget.Allocation.Y;
|
|
||||||
}
|
|
||||||
|
|
||||||
x += widget.Allocation.Width / 2;
|
|
||||||
y += widget.Allocation.Height / 2;
|
|
||||||
|
|
||||||
SetGeometryHints (widget.Screen, x, y);
|
|
||||||
attach_widget = widget;
|
|
||||||
status_icon = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AttachToStatusIcon (Gtk.StatusIcon status_icon) {
|
|
||||||
Gdk.Screen screen;
|
|
||||||
Gdk.Rectangle rect;
|
|
||||||
Orientation orientation;
|
|
||||||
int x, y;
|
|
||||||
|
|
||||||
if (!status_icon.GetGeometry (out screen, out rect, out orientation)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
x = rect.X + rect.Width / 2;
|
|
||||||
y = rect.Y + rect.Height / 2;
|
|
||||||
|
|
||||||
SetGeometryHints (screen, x, y);
|
|
||||||
|
|
||||||
this.status_icon = status_icon;
|
|
||||||
attach_widget = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetGeometryHints (Screen screen, int x, int y) {
|
|
||||||
hints["x"] = x;
|
|
||||||
hints["y"] = y;
|
|
||||||
hints["xdisplay"] = screen.MakeDisplayName ();
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update () {
|
|
||||||
if (shown && !updates_pending) {
|
|
||||||
updates_pending = true;
|
|
||||||
GLib.Timeout.Add (100, delegate {
|
|
||||||
if (updates_pending) {
|
|
||||||
Show ();
|
|
||||||
updates_pending = false;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Show () {
|
|
||||||
string[] actions;
|
|
||||||
lock (action_map) {
|
|
||||||
actions = new string[action_map.Keys.Count * 2];
|
|
||||||
int i = 0;
|
|
||||||
foreach (KeyValuePair<string,ActionTuple> pair in action_map) {
|
|
||||||
actions[i++] = pair.Key;
|
|
||||||
actions[i++] = pair.Value.Label;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id = nf.Notify (app_name, id, icon, summary, body, actions, hints, timeout);
|
|
||||||
shown = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close () {
|
|
||||||
nf.CloseNotification (id);
|
|
||||||
id = 0;
|
|
||||||
shown = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnClosed (uint id, uint reason) {
|
|
||||||
if (this.id == id) {
|
|
||||||
this.id = 0;
|
|
||||||
shown = false;
|
|
||||||
if (Closed != null) {
|
|
||||||
Closed (this, new CloseArgs ((CloseReason) reason));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddAction (string action, string label, ActionHandler handler) {
|
|
||||||
if (Notifications.Global.Capabilities != null &&
|
|
||||||
Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1) {
|
|
||||||
lock (action_map) {
|
|
||||||
action_map[action] = new ActionTuple (label, handler);
|
|
||||||
}
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveAction (string action) {
|
|
||||||
lock (action_map) {
|
|
||||||
action_map.Remove (action);
|
|
||||||
}
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ClearActions () {
|
|
||||||
lock (action_map) {
|
|
||||||
action_map.Clear ();
|
|
||||||
}
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnActionInvoked (uint id, string action) {
|
|
||||||
lock (action_map) {
|
|
||||||
if (this.id == id && action_map.ContainsKey (action))
|
|
||||||
action_map[action].Handler (this, new ActionArgs (action));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddHint (string name, object value) {
|
|
||||||
hints[name] = value;
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveHint (string name) {
|
|
||||||
hints.Remove (name);
|
|
||||||
Update ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>8.0.50727</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{005CCA8E-DFBF-464A-B6DA-452C62D4589C}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>notifysharp</RootNamespace>
|
|
||||||
<AssemblyName>notify-sharp</AssemblyName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\bin</OutputPath>
|
|
||||||
<DefineConstants>DEBUG</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>none</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>..\bin</OutputPath>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Global.cs" />
|
|
||||||
<Compile Include="Notification.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099">
|
|
||||||
<Package>ndesk-dbus-1.0</Package>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NDesk.DBus.GLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099">
|
|
||||||
<Package>ndesk-dbus-glib-1.0</Package>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
|
|
||||||
<Package>gtk-sharp-2.0</Package>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
|
|
||||||
<Package>glib-sharp-2.0</Package>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
|
|
||||||
<Package>gtk-sharp-2.0</Package>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
|
||||||
<ProjectExtensions>
|
|
||||||
<MonoDevelop>
|
|
||||||
<Properties>
|
|
||||||
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="Makefile.am">
|
|
||||||
<BuildFilesVar Sync="true" Name="SOURCES" />
|
|
||||||
<DeployFilesVar />
|
|
||||||
<ResourcesVar Sync="true" Name="RESOURCES" />
|
|
||||||
<OthersVar />
|
|
||||||
<GacRefVar />
|
|
||||||
<AsmRefVar />
|
|
||||||
<ProjectRefVar />
|
|
||||||
</MonoDevelop.Autotools.MakefileInfo>
|
|
||||||
</Properties>
|
|
||||||
</MonoDevelop>
|
|
||||||
</ProjectExtensions>
|
|
||||||
</Project>
|
|
|
@ -4,7 +4,7 @@ SUBDIRS = \
|
||||||
ASSEMBLY = SparkleShare
|
ASSEMBLY = SparkleShare
|
||||||
TARGET = exe
|
TARGET = exe
|
||||||
|
|
||||||
LINK = $(REF_SPARKLESHARE)
|
LINK = $(REF_SPARKLESHARE) $(NOTIFY_SHARP_LIBS)
|
||||||
|
|
||||||
|
|
||||||
SOURCES = \
|
SOURCES = \
|
||||||
|
|
|
@ -15,37 +15,34 @@
|
||||||
// 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 Gtk;
|
||||||
|
using Notifications;
|
||||||
using SparkleShare;
|
using SparkleShare;
|
||||||
|
|
||||||
namespace SparkleShare {
|
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)
|
||||||
{
|
{
|
||||||
|
|
||||||
IconName = "folder-sparkleshare";
|
IconName = "folder-sparkleshare";
|
||||||
Timeout = 4500;
|
Timeout = 4500;
|
||||||
// Urgency = Urgency.Low;
|
Urgency = Urgency.Low;
|
||||||
|
|
||||||
// AttachToStatusIcon (SparkleUI.StatusIcon);
|
AttachToStatusIcon (SparkleUI.StatusIcon);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 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 (System.Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1)
|
||||||
// base.AddAction (action, label, handler);
|
base.AddAction (action, label, handler);
|
||||||
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
|
||||||
Mono.Posix
|
Mono.Posix
|
||||||
])
|
])
|
||||||
|
|
||||||
|
SPARKLESHARE_CHECK_NOTIFY_SHARP
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
AC_HELP_STRING([--enable-debug],
|
AC_HELP_STRING([--enable-debug],
|
||||||
[Use 'DEBUG' Configuration [default=YES]]),
|
[Use 'DEBUG' Configuration [default=YES]]),
|
||||||
|
@ -76,7 +78,6 @@ dnl package checks, common for all configs
|
||||||
|
|
||||||
|
|
||||||
SPARKLESHARE_CHECK_GTK_SHARP
|
SPARKLESHARE_CHECK_GTK_SHARP
|
||||||
#SPARKLESHARE_CHECK_NOTIFY_SHARP
|
|
||||||
SPARKLESHARE_SMARTIRC4NET
|
SPARKLESHARE_SMARTIRC4NET
|
||||||
SPARKLESHARE_GITSHARP
|
SPARKLESHARE_GITSHARP
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,13 @@ SUBDIRS = \
|
||||||
icons \
|
icons \
|
||||||
html
|
html
|
||||||
|
|
||||||
EXTRA_DIST = \
|
dist_pixmaps_DATA = \
|
||||||
sparkleshare-gnome.svg \
|
sparkleshare-gnome.svg \
|
||||||
sparkleshare-mist.svg \
|
sparkleshare-mist.svg \
|
||||||
sparkleshare-about.png \
|
sparkleshare-about.png \
|
||||||
side-splash.png
|
side-splash.png
|
||||||
|
|
||||||
|
pixmapsdir = $(pkgdatadir)/pixmaps/
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = \
|
MAINTAINERCLEANFILES = \
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
install-data-local:
|
|
||||||
$(mkinstalldirs) $(pkgdatadir)/pixmaps
|
|
||||||
$(INSTALL_DATA) $(srcdir)/side-splash.png $(pkgdatadir)/pixmaps/side-splash.png
|
|
||||||
$(INSTALL_DATA) $(srcdir)/sparkleshare-about.png $(pkgdatadir)/pixmaps/sparkleshare-about.png
|
|
||||||
|
|
||||||
uninstall-hook:
|
|
||||||
rm -f $(pkgdatadir)/pixmaps/side-splash.png
|
|
||||||
rm -f $(pkgdatadir)/pixmaps/sparkleshare-about.png
|
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
EXTRA_DIST = \
|
dist_htmlhelp_DATA = \
|
||||||
day-entry.html \
|
day-entry.html \
|
||||||
event-entry.html \
|
event-entry.html \
|
||||||
event-log.html
|
event-log.html
|
||||||
|
|
||||||
|
htmlhelpdir = $(pkgdatadir)/html/
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = \
|
MAINTAINERCLEANFILES = \
|
||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
install-data-local:
|
|
||||||
$(mkinstalldirs) $(pkgdatadir)/html
|
|
||||||
$(INSTALL_DATA) $(srcdir)/day-entry.html $(pkgdatadir)/html/day-entry.html
|
|
||||||
$(INSTALL_DATA) $(srcdir)/event-entry.html $(pkgdatadir)/html/event-entry.html
|
|
||||||
$(INSTALL_DATA) $(srcdir)/event-log.html $(pkgdatadir)/html/event-log.html
|
|
||||||
|
|
||||||
uninstall-hook:
|
|
||||||
rm -f $(pkgdatadir)/html/day-entry.html
|
|
||||||
rm -f $(pkgdatadir)/html/event-entry.html
|
|
||||||
rm -f $(pkgdatadir)/html/event-log.html
|
|
||||||
|
|
17
po/es.po
17
po/es.po
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: SparklesShare 0.2 Alpha\n"
|
"Project-Id-Version: SparklesShare 0.2 Alpha\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2010-10-30 21:33+0000\n"
|
"POT-Creation-Date: 2010-10-31 07:38+0000\n"
|
||||||
"PO-Revision-Date: 2010-08-30 10:41-0300\n"
|
"PO-Revision-Date: 2010-08-30 10:41-0300\n"
|
||||||
"Last-Translator: Claudio Rodrigo Pereyra Diaz <claudiorodrigo@pereyradiaz.com.ar>\n"
|
"Last-Translator: Claudio Rodrigo Pereyra Diaz <claudiorodrigo@pereyradiaz.com.ar>\n"
|
||||||
"Language-Team: Spanish\n"
|
"Language-Team: Spanish\n"
|
||||||
|
@ -116,23 +116,20 @@ msgid "Free accounts for Free and Open Source projects."
|
||||||
msgstr "Cuentas gratis para proyectos Libres y de Código Abierto."
|
msgstr "Cuentas gratis para proyectos Libres y de Código Abierto."
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleIntro.cs:232
|
#: ../SparkleShare/SparkleIntro.cs:232
|
||||||
#, fuzzy
|
|
||||||
msgid "Username/Folder"
|
msgid "Username/Folder"
|
||||||
msgstr "Abrir carpeta"
|
msgstr "Usuario/Carpeta"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleIntro.cs:239
|
#: ../SparkleShare/SparkleIntro.cs:239
|
||||||
msgid "Project/Folder"
|
msgid "Project/Folder"
|
||||||
msgstr "Proyecto/carpeta"
|
msgstr "Proyecto/carpeta"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleIntro.cs:246
|
#: ../SparkleShare/SparkleIntro.cs:246
|
||||||
#, fuzzy
|
|
||||||
msgid "Project"
|
msgid "Project"
|
||||||
msgstr "Rechazar"
|
msgstr "Proyecto"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleIntro.cs:255 ../SparkleShare/SparkleIntro.cs:278
|
#: ../SparkleShare/SparkleIntro.cs:255 ../SparkleShare/SparkleIntro.cs:278
|
||||||
#, fuzzy
|
|
||||||
msgid "Folder"
|
msgid "Folder"
|
||||||
msgstr "Añade una Carpeta"
|
msgstr "Carpeta"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleIntro.cs:283
|
#: ../SparkleShare/SparkleIntro.cs:283
|
||||||
#: ../SparkleShare/SparkleInvitation.cs:134
|
#: ../SparkleShare/SparkleInvitation.cs:134
|
||||||
|
@ -259,9 +256,8 @@ msgid "_Open Folder"
|
||||||
msgstr "_Abrir Carpeta"
|
msgstr "_Abrir Carpeta"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleLog.cs:246
|
#: ../SparkleShare/SparkleLog.cs:246
|
||||||
#, fuzzy
|
|
||||||
msgid "This folder has unsynced changes"
|
msgid "This folder has unsynced changes"
|
||||||
msgstr "Fallo al sincronizar cambios"
|
msgstr "Esta carpeta no se ha sincronizado"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleLog.cs:247
|
#: ../SparkleShare/SparkleLog.cs:247
|
||||||
msgid "We will sync these once we’re connected again"
|
msgid "We will sync these once we’re connected again"
|
||||||
|
@ -380,9 +376,8 @@ msgid "Quit"
|
||||||
msgstr "Salir"
|
msgstr "Salir"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleStatusIcon.cs:339
|
#: ../SparkleShare/SparkleStatusIcon.cs:339
|
||||||
#, fuzzy
|
|
||||||
msgid "No folders yet"
|
msgid "No folders yet"
|
||||||
msgstr "Todavía no hay carpetas compartidas"
|
msgstr "Todavía no hay carpetas"
|
||||||
|
|
||||||
#: ../SparkleShare/SparkleStatusIcon.cs:348
|
#: ../SparkleShare/SparkleStatusIcon.cs:348
|
||||||
msgid "Not everything is synced"
|
msgid "Not everything is synced"
|
||||||
|
|
Loading…
Reference in a new issue