Image/text class destroy is broken (and never used).
SVN revision: 33819
This commit is contained in:
parent
0a05aafc82
commit
71c2e6f078
|
@ -189,7 +189,7 @@ ActionclassCreate(const char *name, int global)
|
|||
return ac;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ActionclassDestroy(ActionClass * ac)
|
||||
{
|
||||
int i;
|
||||
|
@ -211,6 +211,7 @@ ActionclassDestroy(ActionClass * ac)
|
|||
Efree(ac->list);
|
||||
Efree(ac->name);
|
||||
Efree(ac->tooltipstring);
|
||||
|
||||
Efree(ac);
|
||||
mode_action_destroy = 1;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
/* aclass.c */
|
||||
int AclassConfigLoad(FILE * fs);
|
||||
ActionClass *ActionclassCreate(const char *name, int global);
|
||||
void ActionclassDestroy(ActionClass * ac);
|
||||
Action *ActionCreate(char event, char anymod, int mod, int anybut,
|
||||
int but, char anykey, const char *key,
|
||||
const char *tooltipstring);
|
||||
|
|
10
src/iclass.c
10
src/iclass.c
|
@ -32,6 +32,8 @@
|
|||
#include "tclass.h"
|
||||
#include "xwin.h"
|
||||
|
||||
#define ENABLE_DESTROY 0 /* Broken */
|
||||
|
||||
#if ENABLE_COLOR_MODIFIERS
|
||||
typedef struct
|
||||
{
|
||||
|
@ -223,6 +225,7 @@ ImagestateCreate(const char *file)
|
|||
return is;
|
||||
}
|
||||
|
||||
#if ENABLE_DESTROY
|
||||
static void
|
||||
ImagestateDestroy(ImageState * is)
|
||||
{
|
||||
|
@ -253,6 +256,7 @@ FreeImageStateArray(ImageStateArray * isa)
|
|||
ImagestateDestroy(isa->clicked);
|
||||
ImagestateDestroy(isa->disabled);
|
||||
}
|
||||
#endif /* ENABLE_DESTROY */
|
||||
|
||||
static void
|
||||
ImagestateColorsAlloc(ImageState * is)
|
||||
|
@ -343,6 +347,7 @@ ImageclassCreate(const char *name)
|
|||
return ic;
|
||||
}
|
||||
|
||||
#if ENABLE_DESTROY
|
||||
static void
|
||||
ImageclassDestroy(ImageClass * ic)
|
||||
{
|
||||
|
@ -372,6 +377,7 @@ ImageclassDestroy(ImageClass * ic)
|
|||
|
||||
Efree(ic);
|
||||
}
|
||||
#endif /* ENABLE_DESTROY */
|
||||
|
||||
ImageClass *
|
||||
ImageclassAlloc(const char *name, int fallback)
|
||||
|
@ -1438,7 +1444,9 @@ ImageclassIpc(const char *params)
|
|||
|
||||
if (!strcmp(param2, "delete"))
|
||||
{
|
||||
#if ENABLE_DESTROY
|
||||
ImageclassDestroy(ic);
|
||||
#endif
|
||||
}
|
||||
else if (!strcmp(param2, "modify"))
|
||||
{
|
||||
|
@ -1551,7 +1559,7 @@ static const IpcItem ImageclassIpcArray[] = {
|
|||
{
|
||||
ImageclassIpc,
|
||||
"imageclass", NULL,
|
||||
"List imageclasses, create/delete/modify/apply an imageclass",
|
||||
"List imageclasses, apply an imageclass",
|
||||
NULL}
|
||||
,
|
||||
};
|
||||
|
|
16
src/tclass.c
16
src/tclass.c
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2007 Kim Woelders
|
||||
* Copyright (C) 2004-2008 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -29,6 +29,8 @@
|
|||
#include "tclass.h"
|
||||
#include "xwin.h"
|
||||
|
||||
#define ENABLE_DESTROY 0 /* Broken */
|
||||
|
||||
static Ecore_List *tclass_list = NULL;
|
||||
|
||||
static char *
|
||||
|
@ -66,6 +68,7 @@ TextstateCreate(const char *font)
|
|||
return ts;
|
||||
}
|
||||
|
||||
#if ENABLE_DESTROY
|
||||
static void
|
||||
TextStateDestroy(TextState * ts)
|
||||
{
|
||||
|
@ -78,6 +81,7 @@ TextStateDestroy(TextState * ts)
|
|||
|
||||
Efree(ts);
|
||||
}
|
||||
#endif
|
||||
|
||||
static TextClass *
|
||||
TextclassCreate(const char *name)
|
||||
|
@ -98,6 +102,7 @@ TextclassCreate(const char *name)
|
|||
return tc;
|
||||
}
|
||||
|
||||
#if ENABLE_DESTROY
|
||||
static void
|
||||
TextclassDestroy(TextClass * tc)
|
||||
{
|
||||
|
@ -127,6 +132,7 @@ TextclassDestroy(TextClass * tc)
|
|||
|
||||
Efree(tc);
|
||||
}
|
||||
#endif /* ENABLE_DESTROY */
|
||||
|
||||
TextClass *
|
||||
TextclassAlloc(const char *name, int fallback)
|
||||
|
@ -403,7 +409,7 @@ TextclassIpc(const char *params)
|
|||
p = params;
|
||||
l = 0;
|
||||
param1[0] = param2[0] = '\0';
|
||||
sscanf(params, "%1000s %1000s %n", param1, param2, &l);
|
||||
sscanf(p, "%1000s %1000s %n", param1, param2, &l);
|
||||
p += l;
|
||||
|
||||
if (!strncmp(param1, "list", 2))
|
||||
|
@ -433,7 +439,9 @@ TextclassIpc(const char *params)
|
|||
|
||||
if (!strcmp(param2, "delete"))
|
||||
{
|
||||
#if ENABLE_DESTROY
|
||||
TextclassDestroy(tc);
|
||||
#endif
|
||||
}
|
||||
else if (!strcmp(param2, "modify"))
|
||||
{
|
||||
|
@ -498,7 +506,7 @@ TextclassIpc(const char *params)
|
|||
}
|
||||
else
|
||||
{
|
||||
IpcPrintf("Error: Unknown operation specified\n");
|
||||
IpcPrintf("Error: unknown operation specified\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -506,7 +514,7 @@ static const IpcItem TextclassIpcArray[] = {
|
|||
{
|
||||
TextclassIpc,
|
||||
"textclass", NULL,
|
||||
"List textclasses, create/delete/modify/apply a textclass",
|
||||
"List textclasses, apply a textclass",
|
||||
NULL}
|
||||
,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue