forked from enlightenment/enlightenment
* e: add desklock method to E17 dbus api.
SVN revision: 53916
This commit is contained in:
parent
0870bdae68
commit
4e98f9469b
|
@ -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-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-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-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
|
-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"
|
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
|
# E Restart
|
||||||
|
@ -383,6 +389,9 @@ case "$1" in
|
||||||
-desks-get|-desktops-get)
|
-desks-get|-desktops-get)
|
||||||
er_desktop_get
|
er_desktop_get
|
||||||
;;
|
;;
|
||||||
|
-desktop-lock)
|
||||||
|
er_lock
|
||||||
|
;;
|
||||||
-desktop-show)
|
-desktop-show)
|
||||||
er_desktop_show "$@"
|
er_desktop_show "$@"
|
||||||
;;
|
;;
|
||||||
|
@ -402,7 +411,6 @@ case "$1" in
|
||||||
er_efm_open_dir "$@"
|
er_efm_open_dir "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
# This entry needs to be always the last option of the list (*)
|
# This entry needs to be always the last option of the list (*)
|
||||||
-h|-help|--help|--h|*)
|
-h|-help|--help|--h|*)
|
||||||
show_help
|
show_help
|
||||||
|
|
|
@ -82,6 +82,15 @@ cb_desktop_show_by_name(E_DBus_Object *obj __UNUSED__, DBusMessage *msg)
|
||||||
return dbus_message_new_method_return(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*
|
static DBusMessage*
|
||||||
cb_desktop_bgadd(E_DBus_Object *obj __UNUSED__, DBusMessage *msg)
|
cb_desktop_bgadd(E_DBus_Object *obj __UNUSED__, DBusMessage *msg)
|
||||||
{
|
{
|
||||||
|
@ -201,6 +210,8 @@ void msgbus_desktop_init(Eina_Array *ifaces)
|
||||||
cb_desktop_show);
|
cb_desktop_show);
|
||||||
e_dbus_interface_method_add(iface, "ShowByName", "s", "",
|
e_dbus_interface_method_add(iface, "ShowByName", "s", "",
|
||||||
cb_desktop_show_by_name);
|
cb_desktop_show_by_name);
|
||||||
|
e_dbus_interface_method_add(iface, "Lock", "", "",
|
||||||
|
cb_desktop_lock);
|
||||||
e_msgbus_interface_attach(iface);
|
e_msgbus_interface_attach(iface);
|
||||||
eina_array_push(ifaces, iface);
|
eina_array_push(ifaces, iface);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue