[Xfce4-commits] <postler:master> Use string instead of ObjectPath in DockManager

Christian Dywan noreply at xfce.org
Fri Mar 18 23:46:01 CET 2011


Updating branch refs/heads/master
         to e78b9e7ec5d8c22bca37281b55853be8444a6e65 (commit)
       from 719be1d566604c37da3a6ee6ae3a3fdd62e93f2d (commit)

commit e78b9e7ec5d8c22bca37281b55853be8444a6e65
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Mar 18 23:23:57 2011 +0100

    Use string instead of ObjectPath in DockManager

 postler/dockmanager.vala |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/postler/dockmanager.vala b/postler/dockmanager.vala
index 25d0a5e..f2f3b37 100644
--- a/postler/dockmanager.vala
+++ b/postler/dockmanager.vala
@@ -13,9 +13,9 @@ namespace Dock {
 
     [DBus (name = "org.freedesktop.DockManager")]
     interface DockManagerService : Object {
-        public abstract ObjectPath[] get_items_by_desktop_file (string desktop_file) throws IOError;
-        public signal void item_added (ObjectPath object_path);
-        public signal void item_removed (ObjectPath object_path);
+        public abstract string[] get_items_by_desktop_file (string desktop_file) throws IOError;
+        public signal void item_added (string object_path);
+        public signal void item_removed (string object_path);
     }
     [DBus (name = "org.freedesktop.DockItem")]
     interface DockItemService : GLib.DBusProxy {
@@ -27,8 +27,8 @@ namespace Dock {
     public class Manager : Object {
         DockManagerService? service = null;
 
-        public signal void item_added (ObjectPath object_path);
-        public signal void item_removed (ObjectPath object_path);
+        public signal void item_added (string object_path);
+        public signal void item_removed (string object_path);
 
         public Manager () {
             try {
@@ -46,11 +46,11 @@ namespace Dock {
             }
         }
 
-        public ObjectPath[] get_items_by_desktop_file (string desktop_file) {
+        public string[] get_items_by_desktop_file (string desktop_file) {
             try {
                 if (service == null)
                     throw new GLib.IOError.FAILED ("Service unavailable");
-                ObjectPath[] items = service.get_items_by_desktop_file (desktop_file);
+                string[] items = service.get_items_by_desktop_file (desktop_file);
                 return items;
             } catch (GLib.Error error) {
                 return {};
@@ -70,7 +70,7 @@ namespace Dock {
                 if (service != null)
                     return;
                 var dockitems = manager.get_items_by_desktop_file (desktop_file);
-                foreach (ObjectPath object_path in dockitems) {
+                foreach (string object_path in dockitems) {
                     update_service (object_path);
                     set_badge (last_count);
                }
@@ -81,7 +81,7 @@ namespace Dock {
             });
 
             var dockitems = manager.get_items_by_desktop_file (desktop_file);
-            foreach (ObjectPath object_path in dockitems) {
+            foreach (string object_path in dockitems) {
                 update_service (object_path);
                 break;
             }
@@ -100,7 +100,7 @@ namespace Dock {
             last_count = count;
         }
 
-        void update_service (ObjectPath object_path) {
+        void update_service (string object_path) {
             try {
                 service = Bus.get_proxy_sync (BusType.SESSION,
                                               "org.freedesktop.DockManager",
@@ -113,7 +113,7 @@ namespace Dock {
             }
         }
 
-        public Item (ObjectPath object_path) {
+        public Item (string object_path) {
             update_service (object_path);
         }
 



More information about the Xfce4-commits mailing list