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