Subversion Repositories Filer-Free

Compare Revisions

Ignore whitespace Rev 47 → Rev 48

/trunk/filer/filer_menu.cc
176,6 → 176,31
case 1: /* object */
switch (block.items[1])
{
case 1: /* rename */
switch (block.items[2])
{
case 0:
if (_object&&strlen(_rename_leafname))
{
const size_t max_pathname=255;
size_t max_leafname=
max_pathname-strlen(_owner->pathname())-1;
if (max_leafname>max_pathname) max_leafname=0;
if ((strlen(_object->name)<=max_leafname)&&
(strlen(_rename_leafname)<=max_leafname))
{
static char src_pathname[max_pathname+1];
static char dst_pathname[max_pathname+1];
sprintf(src_pathname,"%s.%s",_owner->pathname(),
_object->name);
sprintf(dst_pathname,"%s.%s",_owner->pathname(),
_rename_leafname);
osfscontrol_rename(src_pathname,dst_pathname);
}
}
break;
}
break;
case 2: /* delete */
{
wimp_t handle=_owner->begin_filer_action();
192,7 → 217,6
break;
case 6: /* info */
break;
}
case 9: /* stamp */
{
wimp_t handle=_owner->begin_filer_action();
200,6 → 224,7
_owner->options().flags()|fileraction_RECURSE);
}
break;
}
break;
case 2: /* select all */
_owner->select_all(1);