/* change the origin to a relative filename */ static int change_relative(void) { char buf[80]; int ret, n; int p = 0; grabber_busy_mouse(TRUE); ret = grabber_foreach_selection(do_change_relative, &n, &p, 0); grabber_busy_mouse(FALSE); if (n <= 0) { alert ("Nothing to change!", NULL, NULL, "OK", NULL, 13, 0); } else if (p > 0) { sprintf(buf, "%d object%s ignored", p, (p==1) ? " was" : "s were"); alert(buf, NULL, NULL, "OK", NULL, 13, 0); } if (n > p) grabber_modified(TRUE); return ret; }
/* changes the color depth of bitmap data */ static int changedepth(void) { int depth = (int)((unsigned long)active_menu->dp); char buf[80]; int ret, n; int p = 0; grabber_busy_mouse(TRUE); ret = grabber_foreach_selection(do_changedepth, &n, &p, depth); grabber_busy_mouse(FALSE); if (n <= 0) { alert ("Nothing to change!", NULL, NULL, "OK", NULL, 13, 0); } else if (p > 0) { sprintf(buf, "%d non-bitmap object%s ignored", p, (p==1) ? " was" : "s were"); alert(buf, NULL, NULL, "OK", NULL, 13, 0); } if (n > p) grabber_modified(TRUE); return ret; }