1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

Collect low-hanging fruits

This commit is contained in:
Tamas TEVESZ
2010-03-18 01:25:03 +01:00
committed by Carlos R. Mafra
parent 5f02b1b5f4
commit d51bbe6626
2 changed files with 41 additions and 119 deletions

View File

@@ -373,16 +373,9 @@ void print_help()
puts(" --no-cursors ignore cursor related options");
puts(" --ignore <option> ignore changes in the specified option");
puts(" --help display this help and exit");
/*
puts(" --format <format> specifies the format of the theme to be converted");
*/
puts(" --version output version information and exit");
/*puts("");
puts("Supported formats: blackbox"); */
}
#define F_BLACKBOX 1
int main(int argc, char **argv)
{
WMPropList *prop, *style;
@@ -422,20 +415,6 @@ int main(int argc, char **argv)
} else if (strcmp("--help", argv[i]) == 0) {
print_help();
exit(0);
#if 0
} else if (strcmp("--format", argv[i]) == 0) {
i++;
if (i == argc) {
printf("%s: missing argument for option --format\n", ProgName);
exit(1);
}
if (strcasecmp(argv[i], "blackbox") == 0) {
format = F_BLACKBOX;
} else {
printf("%s: unknown theme format '%s'\n", ProgName, argv[i]);
exit(1);
}
#endif
} else {
if (file) {
printf("%s: invalid argument '%s'\n", ProgName, argv[i]);
@@ -461,16 +440,6 @@ int main(int argc, char **argv)
perror(file);
exit(1);
}
#if 0
if (format == F_BLACKBOX) {
style = readBlackBoxStyle(file);
if (!style) {
printf("%s: could not open style file\n", ProgName);
exit(1);
}
} else
#endif
{
if (S_ISDIR(statbuf.st_mode)) {
char buffer[4018];
char *prefix;
@@ -519,7 +488,6 @@ int main(int argc, char **argv)
exit(1);
}
}
}
if (!WMIsPLDictionary(style)) {
printf("%s: '%s' is not a style file/theme\n", ProgName, file);
@@ -561,32 +529,3 @@ int main(int argc, char **argv)
exit(0);
}
#if 0
char *getToken(char *str, int i, char *buf)
{
}
static WMPropList *readBlackBoxStyle(char *path)
{
FILE *f;
char buffer[128], char token[128];
WMPropList *style, *p;
f = fopen(path, "rb");
if (!f) {
perror(path);
return NULL;
}
while (1) {
if (!fgets(buffer, 127, f))
break;
if (strncasecmp(buffer, "menu.title:", 11) == 0) {
}
}
}
#endif

View File

@@ -306,21 +306,6 @@ void closeWindow(WMWidget * w, void *d)
}
}
#if 0
static void clickHandler(XEvent * event, void *d)
{
BufferData *data = (BufferData *) d;
data->win = WMCreateWindow(scr, "setup");
WMSetWindowTitle(data->win, "Magnify Options");
data->speed = WMCreateSlider(data->win);
data->magnify = WMCreateSlider(data->win);
}
#endif
static void keyHandler(XEvent * event, void *d)
{
BufferData *data = (BufferData *) d;
@@ -417,9 +402,7 @@ int main(int argc, char **argv)
char *display = "";
char *vdisplay = NULL;
int magfactor = 2;
#if 0
WMButton *radio, *tradio;
#endif
WMInitializeApplication("Magnify", &argc, argv);
for (i = 1; i < argc; i++) {