Tue Sep 7 16:33:15 PDT 1999

(Mandrake)

more stuff for KDE support


SVN revision: 195
This commit is contained in:
Mandrake 1999-09-07 23:16:39 +00:00
parent ec015cd3ac
commit be4ee6d342
9 changed files with 155 additions and 75 deletions

View File

@ -1356,3 +1356,10 @@ Tue Sep 7 14:36:02 PDT 1999
yet more KDE stuff. time to make a couple of configuration flags, add in
the stuff to the main event loop, and test test test
-------------------------------------------------------------------------------
Tue Sep 7 16:33:15 PDT 1999
(Mandrake)
more stuff for KDE support

View File

@ -1153,6 +1153,7 @@ typedef struct _emode
TextClass *icon_textclass;
int icon_mode;
EWin *kde_dock;
int kde_support;
}
EMode;

View File

@ -95,6 +95,7 @@
#define CONTROL_WARP_AFTER_NEXT_FOCUS 1355
#define CONTROL_PAGER_SCANSPEED 1356
#define CONTROL_ICONTEXT 1357
#define CONTROL_KDESUPPORT 1358
#define ICLASS_NAME 350
#define ICLASS_NORMAL 351
#define ICLASS_CLICKED 352

View File

@ -640,6 +640,9 @@ Config_Control(FILE * ConfigFile)
sscanf(s, "%*s %d %d ", &mode.dockstartx,
&mode.dockstarty);
break;
case CONTROL_KDESUPPORT:
mode.kde_support = i2;
break;
case CONTROL_ICONTEXT:
{
char s2[FILEPATH_LEN_MAX];
@ -3593,6 +3596,7 @@ SaveUserControlConfig(FILE * autosavefile)
fprintf(autosavefile, "1354 %i\n", (int)mode.display_warp);
fprintf(autosavefile, "1355 %i\n", (int)mode.warp_after_next_focus);
fprintf(autosavefile, "1356 %i\n", (int)mode.pager_scanspeed);
fprintf(autosavefile, "1358 %i\n", (int)mode.kde_support);
fprintf(autosavefile, "1000\n");
fprintf(autosavefile, "1001 0\n");
ac = (ActionClass *) FindItem("KEYBINDINGS", 0,

166
src/ipc.c
View File

@ -54,12 +54,13 @@ void IPC_ListClassMembers(char *params, Client * c);
void IPC_GeneralInfo(char *params, Client * c);
void IPC_Modules(char *params, Client * c);
void IPC_DockPosition(char *params, Client * c);
void IPC_KDE(char *params, Client * c);
/* Changes By Asmodean_ <naru@caltech.edu> / #E@Efnet
*
* IPC_ReloadMenus(...) / reload_menus - Reloads menus from menus.cfg
*
**/
* * IPC_ReloadMenus(...) / reload_menus - Reloads menus from menus.cfg
* *
* * */
void IPC_ReloadMenus(char *params, Client * c);
@ -496,7 +497,7 @@ IPCStruct IPCArray[] =
IPC_GroupInfo,
"group_info",
"Retreive some info on groups",
"use \"group_info [group_index]\"\n"
"use \"group_info [group_index]\""
},
{
IPC_GroupOps,
@ -509,7 +510,7 @@ IPCStruct IPCArray[] =
" group_op <windowid> add [<group_index>]\n"
" group_op <windowid> remove\n"
" group_op <windowid> break\n"
" group_op <windowid> showhide\n"
" group_op <windowid> showhide"
},
{
IPC_Group,
@ -524,7 +525,13 @@ IPCStruct IPCArray[] =
" group <groupid> raise <on/off/?>\n"
" group <groupid> set_border <on/off/?>\n"
" group <groupid> stick <on/off/?>\n"
" group <groupid> shade <on/off/?>\n"
" group <groupid> shade <on/off/?>"
},
{
IPC_KDE,
"kde",
"Turns on and off KDE support",
"use \"kde on\" and \"kde off\" to enable/disable support"
}
};
@ -537,7 +544,51 @@ IPCStruct IPCArray[] =
* - Mandrake
*/
void
void
IPC_KDE(char *params, Client * c)
{
char buf[FILEPATH_LEN_MAX];
buf[0] = 0;
if (params)
{
if (!strcmp(params, "on"))
{
if (!mode.kde_support)
KDE_Init();
}
else if (!strcmp(params, "off"))
{
if (mode.kde_support)
KDE_Shutdown();
}
else if (!strcmp(params, "?"))
{
if (mode.kde_support)
{
Esnprintf(buf, sizeof(buf), "kde: active\n");
}
else
{
Esnprintf(buf, sizeof(buf), "kde: inactive\n");
}
}
else
{
Esnprintf(buf, sizeof(buf), "Error: unknown state specified\n");
}
}
else
Esnprintf(buf, sizeof(buf), "Error: no state specified\n");
if (buf[0])
CommsSend(c, buf);
return;
}
void
IPC_Modules(char *params, Client * c)
{
@ -613,7 +664,7 @@ IPC_Modules(char *params, Client * c)
return;
}
void
void
IPC_DockPosition(char *params, Client * c)
{
@ -736,7 +787,7 @@ IPC_DockPosition(char *params, Client * c)
}
void
void
IPC_GeneralInfo(char *params, Client * c)
{
@ -767,7 +818,7 @@ IPC_GeneralInfo(char *params, Client * c)
}
void
void
IPC_Button(char *params, Client * c)
{
@ -836,7 +887,7 @@ IPC_Button(char *params, Client * c)
return;
}
void
void
IPC_Background(char *params, Client * c)
{
char buf[FILEPATH_LEN_MAX];
@ -1019,7 +1070,7 @@ IPC_Background(char *params, Client * c)
return;
}
void
void
IPC_Border(char *params, Client * c)
{
@ -1088,7 +1139,7 @@ IPC_Border(char *params, Client * c)
return;
}
void
void
IPC_Cursor(char *params, Client * c)
{
@ -1157,7 +1208,7 @@ IPC_Cursor(char *params, Client * c)
return;
}
void
void
IPC_TextClass(char *params, Client * c)
{
@ -1226,7 +1277,7 @@ IPC_TextClass(char *params, Client * c)
return;
}
void
void
IPC_ColorModifierClass(char *params, Client * c)
{
@ -1295,7 +1346,7 @@ IPC_ColorModifierClass(char *params, Client * c)
return;
}
void
void
IPC_ActionClass(char *params, Client * c)
{
@ -1364,7 +1415,7 @@ IPC_ActionClass(char *params, Client * c)
return;
}
void
void
IPC_ImageClass(char *params, Client * c)
{
@ -1472,7 +1523,7 @@ IPC_ImageClass(char *params, Client * c)
return;
}
void
void
IPC_SoundClass(char *params, Client * c)
{
@ -1536,7 +1587,7 @@ IPC_SoundClass(char *params, Client * c)
return;
}
void
void
IPC_PlaySoundClass(char *params, Client * c)
{
char buf[FILEPATH_LEN_MAX];
@ -1565,7 +1616,7 @@ IPC_PlaySoundClass(char *params, Client * c)
}
void
void
IPC_ListClassMembers(char *params, Client * c)
{
@ -1757,7 +1808,7 @@ IPC_ListClassMembers(char *params, Client * c)
return;
}
void
void
IPC_DialogOK(char *params, Client * c)
{
@ -1778,7 +1829,7 @@ IPC_DialogOK(char *params, Client * c)
return;
}
void
void
IPC_SetFocus(char *params, Client * c)
{
@ -1825,7 +1876,7 @@ IPC_SetFocus(char *params, Client * c)
}
void
void
IPC_AdvancedFocus(char *params, Client * c)
{
@ -2191,7 +2242,7 @@ IPC_AdvancedFocus(char *params, Client * c)
}
void
void
IPC_InternalList(char *params, Client * c)
{
@ -2273,7 +2324,7 @@ IPC_InternalList(char *params, Client * c)
}
void
void
IPC_Pager(char *params, Client * c)
{
@ -2505,7 +2556,7 @@ IPC_Pager(char *params, Client * c)
}
void
void
IPC_MoveMode(char *params, Client * c)
{
@ -2576,7 +2627,7 @@ IPC_MoveMode(char *params, Client * c)
}
void
void
IPC_ResizeMode(char *params, Client * c)
{
@ -2641,7 +2692,7 @@ IPC_ResizeMode(char *params, Client * c)
}
void
void
IPC_FX(char *params, Client * c)
{
@ -3126,7 +3177,7 @@ IPC_FX(char *params, Client * c)
}
void
void
IPC_ActiveNetwork(char *params, Client * c)
{
char buf[FILEPATH_LEN_MAX];
@ -3181,7 +3232,7 @@ IPC_ActiveNetwork(char *params, Client * c)
return;
}
void
void
IPC_ButtonShow(char *params, Client * c)
{
c = NULL;
@ -3196,7 +3247,7 @@ IPC_ButtonShow(char *params, Client * c)
return;
}
void
void
IPC_WinList(char *params, Client * c)
{
@ -3242,7 +3293,7 @@ IPC_WinList(char *params, Client * c)
}
void
void
IPC_GotoArea(char *params, Client * c)
{
@ -3320,7 +3371,7 @@ IPC_GotoArea(char *params, Client * c)
}
void
void
IPC_WinOps(char *params, Client * c)
{
@ -3773,7 +3824,7 @@ IPC_WinOps(char *params, Client * c)
}
void
void
IPC_NumAreas(char *params, Client * c)
{
@ -3811,7 +3862,7 @@ IPC_NumAreas(char *params, Client * c)
}
void
void
IPC_NumDesks(char *params, Client * c)
{
@ -3842,7 +3893,7 @@ IPC_NumDesks(char *params, Client * c)
}
void
void
IPC_FocusMode(char *params, Client * c)
{
@ -3913,7 +3964,7 @@ IPC_FocusMode(char *params, Client * c)
}
void
void
IPC_ShowIcons(char *params, Client * c)
{
@ -3957,7 +4008,7 @@ IPC_ShowIcons(char *params, Client * c)
return;
}
void
void
IPC_GotoDesktop(char *params, Client * c)
{
@ -3995,7 +4046,7 @@ IPC_GotoDesktop(char *params, Client * c)
return;
}
void
void
IPC_ListThemes(char *params, Client * c)
{
@ -4036,7 +4087,7 @@ IPC_ListThemes(char *params, Client * c)
}
void
void
IPC_SMFile(char *params, Client * c)
{
@ -4067,7 +4118,7 @@ IPC_SMFile(char *params, Client * c)
}
void
void
IPC_ForceSave(char *params, Client * c)
{
@ -4083,7 +4134,7 @@ IPC_ForceSave(char *params, Client * c)
return;
}
void
void
IPC_Restart(char *params, Client * c)
{
@ -4094,7 +4145,7 @@ IPC_Restart(char *params, Client * c)
}
void
void
IPC_RestartWM(char *params, Client * c)
{
@ -4116,7 +4167,7 @@ IPC_RestartWM(char *params, Client * c)
}
void
void
IPC_RestartTheme(char *params, Client * c)
{
@ -4136,7 +4187,7 @@ IPC_RestartTheme(char *params, Client * c)
return;
}
void
void
IPC_Exit(char *params, Client * c)
{
@ -4150,7 +4201,7 @@ IPC_Exit(char *params, Client * c)
}
void
void
IPC_DefaultTheme(char *params, Client * c)
{
@ -4190,7 +4241,7 @@ IPC_DefaultTheme(char *params, Client * c)
}
void
void
IPC_AutoSave(char *params, Client * c)
{
@ -4227,7 +4278,7 @@ IPC_AutoSave(char *params, Client * c)
}
void
void
IPC_Help(char *params, Client * c)
{
@ -4324,7 +4375,7 @@ IPC_Help(char *params, Client * c)
return;
}
void
void
IPC_Copyright(char *params, Client * c)
{
@ -4373,7 +4424,7 @@ IPC_Copyright(char *params, Client * c)
}
void
void
IPC_Version(char *params, Client * c)
{
@ -4407,7 +4458,7 @@ IPC_Version(char *params, Client * c)
* - Mandrake
*/
int
int
HandleIPC(char *params, Client * c)
{
@ -4443,7 +4494,7 @@ HandleIPC(char *params, Client * c)
* button was depressed
*/
void
void
ButtonIPC(int val, void *data)
{
@ -4458,7 +4509,7 @@ ButtonIPC(int val, void *data)
*
*/
void
void
IPC_ReloadMenus(char *params, Client * c)
{
/*
@ -4491,7 +4542,7 @@ IPC_ReloadMenus(char *params, Client * c)
c = NULL;
}
void
void
IPC_GroupInfo(char *params, Client * c)
{
@ -4522,7 +4573,6 @@ IPC_GroupInfo(char *params, Client * c)
CommsSend(c, buf);
return;
}
groups = (Group **) Emalloc(sizeof(Group **));
if (!groups)
@ -4531,7 +4581,6 @@ IPC_GroupInfo(char *params, Client * c)
CommsSend(c, buf);
return;
}
groups[0] = group;
num_groups = 1;
}
@ -4586,7 +4635,7 @@ IPC_GroupInfo(char *params, Client * c)
}
void
void
IPC_GroupOps(char *params, Client * c)
{
@ -4643,7 +4692,6 @@ IPC_GroupOps(char *params, Client * c)
sscanf(groupid, "%d", &index);
group = FindItem(NULL, index, LIST_FINDBY_ID, LIST_TYPE_GROUP);
}
AddEwinToGroup(ewin, group);
Esnprintf(buf, sizeof(buf), "add %8x\n", win);
}
@ -4683,7 +4731,7 @@ IPC_GroupOps(char *params, Client * c)
}
void
void
IPC_Group(char *params, Client * c)
{

View File

@ -74,7 +74,7 @@ KModuleList;
static KModuleList *KModules = NULL;
void
void
KDE_ClientMessage(EWin * ewin, Atom atom, long data, Time timestamp)
{
@ -97,7 +97,7 @@ KDE_ClientMessage(EWin * ewin, Atom atom, long data, Time timestamp)
}
void
void
KDE_ClientTextMessage(EWin * ewin, Atom atom, char *data)
{
@ -119,7 +119,7 @@ KDE_ClientTextMessage(EWin * ewin, Atom atom, char *data)
}
void
void
KDE_SendMessagesToModules(Atom atom, long data)
{
@ -138,7 +138,7 @@ KDE_SendMessagesToModules(Atom atom, long data)
}
void
void
KDE_AddModule(EWin * ewin)
{
@ -217,7 +217,7 @@ KDE_AddModule(EWin * ewin)
}
void
void
KDE_RemoveModule(EWin * ewin)
{
@ -272,7 +272,7 @@ KDE_RemoveModule(EWin * ewin)
}
void
void
KDE_Init(void)
{
/*
@ -383,7 +383,7 @@ KDE_Init(void)
}
void
void
KDE_Shutdown(void)
{
@ -407,7 +407,7 @@ KDE_Shutdown(void)
}
void
void
KDE_ClientInit(EWin * ewin)
{
@ -437,7 +437,7 @@ KDE_ClientInit(EWin * ewin)
}
void
void
KDE_ClientChange(EWin * ewin, XPropertyEvent * event)
{
@ -508,7 +508,7 @@ KDE_ClientChange(EWin * ewin, XPropertyEvent * event)
}
void
void
KDE_GetDecorationHint(EWin * ewin, long *dechints)
{
@ -571,7 +571,7 @@ KDE_GetDecorationHint(EWin * ewin, long *dechints)
}
void
void
KDE_CheckClientHints(EWin * ewin)
{
@ -594,7 +594,7 @@ KDE_CheckClientHints(EWin * ewin)
}
int
int
KDE_WindowCommand(EWin * ewin, char *cmd)
{
@ -650,7 +650,7 @@ KDE_WindowCommand(EWin * ewin, char *cmd)
}
void
void
KDE_Command(char *cmd, XClientMessageEvent * event)
{
@ -729,7 +729,7 @@ KDE_Command(char *cmd, XClientMessageEvent * event)
}
void
void
KDE_ProcessClientMessage(XClientMessageEvent * event)
{
@ -783,7 +783,7 @@ KDE_ProcessClientMessage(XClientMessageEvent * event)
}
void
void
KDE_ModuleAssert(EWin * ewin)
{
@ -798,7 +798,7 @@ KDE_ModuleAssert(EWin * ewin)
}
void
void
KDE_PrepModuleEvent(EWin * ewin, KMessage msg)
{

View File

@ -252,8 +252,15 @@ main(int argc, char **argv)
init_win_ext = 0;
}
GNOME_SetClientList();
/* start up any kde crap we might need to start up */
if (mode.kde_support)
KDE_Init();
/* sync just to make sure */
XSync(disp, False);
queue_up = 1;
/* hello! we don't have a resizemode of 5! */
if (mode.resizemode == 5)
mode.resizemode = 0;
@ -286,6 +293,7 @@ main(int argc, char **argv)
/* let's make sure we set this up and go to our desk anyways */
ICCCM_GetMainEInfo();
GotoDesktop(desks.current);
/* The primary event loop */
for (;;)
WaitEvent();

View File

@ -488,6 +488,11 @@ doSMExit(void *params)
SetEInfoOnAll();
SaveSession(1);
/* kill off kde */
if (mode.kde_support)
KDE_Shutdown();
if (params)
{
SoundExit();
@ -586,6 +591,7 @@ doSMExit(void *params)
return;
}
}
AUDIO_PLAY("SOUND_EXIT");
if ((!master_flag) && (do_master_kill))
kill(master_pid, SIGTERM);
@ -1084,6 +1090,10 @@ doSMExit(void *params)
if (disp)
SetEInfoOnAll();
/* kill off kde */
if (mode.kde_support)
KDE_Shutdown();
if (master_pid != getpid())
{
if (!restarting)

View File

@ -516,6 +516,7 @@ SetupX()
mode.manual_placement = 0;
mode.raise_on_next_focus = 1;
mode.raise_after_next_focus = 1;
mode.kde_support = 0;
#ifdef WITH_TARTY_WARP
mode.display_warp = 1;
#else