[Xfce4-commits] <postler:master> Use net.launchpad.DockManager interface name
Christian Dywan
noreply at xfce.org
Sun Mar 20 17:08:02 CET 2011
Updating branch refs/heads/master
to 27cf79ea246afadaddadd670db9d94e7f4b79e7c (commit)
from e8e18a299a4fda6f6cdc7abf30e43ccb8a544528 (commit)
commit 27cf79ea246afadaddadd670db9d94e7f4b79e7c
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Mar 20 16:29:50 2011 +0100
Use net.launchpad.DockManager interface name
This is the DBus interface that should be used now.
Also use the application name instead of the .desktop file.
postler/dockmanager.vala | 24 ++++++++++++------------
postler/postler-service.vala | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/postler/dockmanager.vala b/postler/dockmanager.vala
index f2f3b37..d48df4b 100644
--- a/postler/dockmanager.vala
+++ b/postler/dockmanager.vala
@@ -11,13 +11,13 @@
namespace Dock {
- [DBus (name = "org.freedesktop.DockManager")]
+ [DBus (name = "net.launchpad.DockManager")]
interface DockManagerService : Object {
- public abstract string[] get_items_by_desktop_file (string desktop_file) throws IOError;
+ public abstract string[] get_items_by_name (string app_name) throws IOError;
public signal void item_added (string object_path);
public signal void item_removed (string object_path);
}
- [DBus (name = "org.freedesktop.DockItem")]
+ [DBus (name = "net.launchpad.DockItem")]
interface DockItemService : GLib.DBusProxy {
public abstract void update_dock_item (HashTable<string, Variant> hints) throws IOError;
public abstract int32 add_menu_item (HashTable<string, Variant> hints) throws IOError;
@@ -33,8 +33,8 @@ namespace Dock {
public Manager () {
try {
service = Bus.get_proxy_sync (BusType.SESSION,
- "org.freedesktop.DockManager",
- "/org/freedesktop/DockManager");
+ "net.launchpad.DockManager",
+ "/net/launchpad/DockManager");
service.item_added.connect ((object_path) => {
item_added (object_path);
});
@@ -46,11 +46,11 @@ namespace Dock {
}
}
- public string[] get_items_by_desktop_file (string desktop_file) {
+ public string[] get_items_by_name (string app_name) {
try {
if (service == null)
throw new GLib.IOError.FAILED ("Service unavailable");
- string[] items = service.get_items_by_desktop_file (desktop_file);
+ string[] items = service.get_items_by_name (app_name);
return items;
} catch (GLib.Error error) {
return {};
@@ -65,22 +65,22 @@ namespace Dock {
public signal void menu_item_activated (int32 id);
- public Item.for_desktop_file (string desktop_file) {
+ public Item.for_name (string app_name) {
manager.item_added.connect ((oobject_path) => {
if (service != null)
return;
- var dockitems = manager.get_items_by_desktop_file (desktop_file);
+ var dockitems = manager.get_items_by_name (app_name);
foreach (string object_path in dockitems) {
update_service (object_path);
set_badge (last_count);
}
});
manager.item_removed.connect ((object_path) => {
- if (object_path.has_suffix (desktop_file))
+ if (object_path.has_suffix (app_name))
service = null;
});
- var dockitems = manager.get_items_by_desktop_file (desktop_file);
+ var dockitems = manager.get_items_by_name (app_name);
foreach (string object_path in dockitems) {
update_service (object_path);
break;
@@ -103,7 +103,7 @@ namespace Dock {
void update_service (string object_path) {
try {
service = Bus.get_proxy_sync (BusType.SESSION,
- "org.freedesktop.DockManager",
+ "net.launchpad.DockManager",
object_path);
service.menu_item_activated.connect ((id) => {
menu_item_activated (id);
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index 9b53790..c856456 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -151,7 +151,7 @@ namespace Postler {
public PostlerService () {
GLib.Timeout.add_seconds (interval, new_message_timer);
- dockitem = new Dock.Item.for_desktop_file ("postler.desktop");
+ dockitem = new Dock.Item.for_name (_("Postler"));
#if HAVE_INDICATE
indicator = Indicate.Server.ref_default ();
More information about the Xfce4-commits
mailing list