aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2010-10-27 13:19:39 +0000
committerCedric BAIL <cedric.bail@free.fr>2010-10-27 13:19:39 +0000
commit4e98f9469b9a4c910a7d5f18743abfbdbfabf999 (patch)
tree8e12ee81cc2b63c6483f08ba677df5c509121171
parent0870bdae68312ed12e796cb3933eb84e39ce2d27 (diff)
downloadenlightenment-4e98f9469b9a4c910a7d5f18743abfbdbfabf999.tar.gz
enlightenment-4e98f9469b9a4c910a7d5f18743abfbdbfabf999.tar.xz
enlightenment-4e98f9469b9a4c910a7d5f18743abfbdbfabf999.zip
* e: add desklock method to E17 dbus api.
SVN revision: 53916
-rw-r--r--data/tools/enlightenment_remote12
-rw-r--r--src/modules/msgbus/msgbus_desktop.c11
2 files changed, 21 insertions, 2 deletions
diff --git a/data/tools/enlightenment_remote b/data/tools/enlightenment_remote
index 109d381e8..7ca60db5a 100644
--- a/data/tools/enlightenment_remote
+++ b/data/tools/enlightenment_remote
@@ -36,6 +36,7 @@ OPTIONS:
-desktop-bg-add OPT1 OPT2 OPT3 OPT4 OPT5 Add a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desk_x. OPT4 = desk_y. OPT5 = bg file path
-desktop-bg-del OPT1 OPT2 OPT3 OPT4 Delete a desktop bg definition. OPT1 = container no. OPT2 = zone no. OPT3 = desk_x. OPT4 = desk_y.
-desktop-bg-list List all current desktop bg definitions
+ -desktop-lock Lock the desktop
-efm-open-dir OPT1 Open dir in OPT1 in EFileManager. Opens /home/$USER if no path is given or it doesn't exist
@@ -191,7 +192,12 @@ ERCII(){
dbus-send --print-reply=literal --dest=org.enlightenment.wm.service /org/enlightenment/wm/RemoteObject "$1" int32:"$2" int32:"$3"
}
-
+#-------------------------------------------------------------------------------
+# E Lock
+#-------------------------------------------------------------------------------
+er_lock(){
+ ERC org.enlightenment.wm.Desktop.Lock
+}
#-------------------------------------------------------------------------------
# E Restart
@@ -383,6 +389,9 @@ case "$1" in
-desks-get|-desktops-get)
er_desktop_get
;;
+ -desktop-lock)
+ er_lock
+ ;;
-desktop-show)
er_desktop_show "$@"
;;
@@ -402,7 +411,6 @@ case "$1" in
er_efm_open_dir "$@"
;;
-
# This entry needs to be always the last option of the list (*)
-h|-help|--help|--h|*)
show_help
diff --git a/src/modules/msgbus/msgbus_desktop.c b/src/modules/msgbus/msgbus_desktop.c
index 5dd230a34..eebbd7f38 100644
--- a/src/modules/msgbus/msgbus_desktop.c
+++ b/src/modules/msgbus/msgbus_desktop.c
@@ -82,6 +82,15 @@ cb_desktop_show_by_name(E_DBus_Object *obj __UNUSED__, DBusMessage *msg)
return dbus_message_new_method_return(msg);
}
+static DBusMessage *
+cb_desktop_lock(E_DBus_Object *obj __UNUSED__, DBusMessage *msg)
+{
+ DBG("desklock requested");
+ e_desklock_show();
+
+ return dbus_message_new_method_return(msg);
+}
+
static DBusMessage*
cb_desktop_bgadd(E_DBus_Object *obj __UNUSED__, DBusMessage *msg)
{
@@ -201,6 +210,8 @@ void msgbus_desktop_init(Eina_Array *ifaces)
cb_desktop_show);
e_dbus_interface_method_add(iface, "ShowByName", "s", "",
cb_desktop_show_by_name);
+ e_dbus_interface_method_add(iface, "Lock", "", "",
+ cb_desktop_lock);
e_msgbus_interface_attach(iface);
eina_array_push(ifaces, iface);
}