int allusers_flag;
int desktop_flag;
int smprograms_flag;
+ int show_flag;
int offset;
char * name_arg;
char * dir_name_arg;
"offset of icon in icon file (default is 0)", NULL},
{ "name", 'n', POPT_ARG_STRING, NULL, 'n', \
"name for link (defaults to TARGET)", "NAME"},
+ { "show", 's', POPT_ARG_STRING, NULL, 's', \
+ "window to show: normal, minimized, maximized", "norm|min|max"},
{ "workingdir", 'w', POPT_ARG_STRING, NULL, 'w', \
"set working directory (defaults to directory path of TARGET)", "PATH"},
{ "allusers", 'A', POPT_ARG_VAL, &(opts.allusers_flag), 1, \
opts.allusers_flag = 0;
opts.desktop_flag = 0;
opts.smprograms_flag = 0;
+ opts.show_flag = SW_SHOWNORMAL;
opts.target_arg = NULL;
opts.argument_arg = NULL;
opts.name_arg = NULL;
}
}
break;
+ case 's': if (arg = poptGetOptArg(optCon)) {
+ if (strcmp(arg, "min") == 0) {
+ opts.show_flag = SW_SHOWMINNOACTIVE;
+ } else if (strcmp(arg, "max") == 0) {
+ opts.show_flag = SW_SHOWMAXIMIZED;
+ } else if (strcmp(arg, "norm") == 0) {
+ opts.show_flag = SW_SHOWNORMAL;
+ } else {
+ fprintf(stderr, "%s: %s not valid for show window\n",
+ program_name, arg);
+ ec=2;
+ goto exit;
+ }
+ }
+ break;
case 'w': if (arg = poptGetOptArg(optCon)) {
if ((opts.dir_name_arg = strdup(arg)) == NULL ) {
fprintf(stderr, "%s: memory allocation error\n", program_name);
if (opts.icon_flag)
shell_link->lpVtbl->SetIconLocation (shell_link, opts.icon_name_arg,
opts.offset);
+ if (opts.show_flag != SW_SHOWNORMAL)
+ shell_link->lpVtbl->SetShowCmd(shell_link, opts.show_flag);
+
/* Make link name Unicode-compliant */
hres =