From 89c10c7779c40547b7ad2155612ec88f04080f94 Mon Sep 17 00:00:00 2001 From: sebastid Date: Sun, 9 Oct 2005 19:10:00 +0000 Subject: [PATCH] Add/delete profiles. SVN revision: 17359 --- src/bin/e_ipc_handlers.h | 36 ++++++++++++++++++++++++++++++++--- src/bin/e_ipc_handlers_list.h | 3 +++ 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/bin/e_ipc_handlers.h b/src/bin/e_ipc_handlers.h index 5ebc8a46a..413058324 100644 --- a/src/bin/e_ipc_handlers.h +++ b/src/bin/e_ipc_handlers.h @@ -4805,8 +4805,6 @@ break; #endif #undef HDL -/****************************************************************************/ - /****************************************************************************/ #define HDL E_IPC_OP_PROFILE_SET #if (TYPE == E_REMOTE_OPTIONS) @@ -4826,7 +4824,7 @@ break; #elif (TYPE == E_REMOTE_IN) #endif #undef HDL - + /****************************************************************************/ #define HDL E_IPC_OP_PROFILE_GET #if (TYPE == E_REMOTE_OPTIONS) @@ -6350,3 +6348,35 @@ break; #endif #undef HDL +/****************************************************************************/ +#define HDL E_IPC_OP_PROFILE_ADD +#if (TYPE == E_REMOTE_OPTIONS) + OP("-profile-add", 1, "Add profile named OPT1", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_STRING(params[0], HDL); +#elif (TYPE == E_WM_IN) + STRING(s, HDL); + e_config_profile_add(s); + END_STRING(s); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_PROFILE_DEL +#if (TYPE == E_REMOTE_OPTIONS) + OP("-profile-add", 1, "Delete profile named OPT1", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_STRING(params[0], HDL); +#elif (TYPE == E_WM_IN) + STRING(s, HDL); + if (!strcmp(e_config_profile_get(), s)) + { + printf("Can't delete active profile\n"); + exit(-1); + } + e_config_profile_del(s); + END_STRING(s); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL diff --git a/src/bin/e_ipc_handlers_list.h b/src/bin/e_ipc_handlers_list.h index 11b293c6a..d868368eb 100644 --- a/src/bin/e_ipc_handlers_list.h +++ b/src/bin/e_ipc_handlers_list.h @@ -306,3 +306,6 @@ #define E_IPC_OP_ACTION_LIST 294 #define E_IPC_OP_ACTION_LIST_REPLY 295 + +#define E_IPC_OP_PROFILE_ADD 296 +#define E_IPC_OP_PROFILE_DEL 297