mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
FileView::update_path() will now also update the displayed filename - this
will simplify FileIconView implementation
This commit is contained in:
@@ -355,15 +355,8 @@ void do_rename(const char* newname) {
|
||||
ede_alert(tsprintf(_("Filename already in use: %s"), newname));
|
||||
else if (!edelib::file_rename(oldpath,newpath))
|
||||
ede_alert(tsprintf(_("Rename %s to %s failed!"), oldname, newname));
|
||||
else {
|
||||
// Insert new name into vline
|
||||
// FIXME text() methods shouldn't be exported by view!
|
||||
edelib::String vline = view->text(focus);
|
||||
vline = newname + vline.substr(vline.find(view->column_char(),0));
|
||||
view->text(focus,vline.c_str());
|
||||
|
||||
else
|
||||
view->update_path(oldpath,newpath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -393,6 +386,7 @@ void do_paste(const char* t) {
|
||||
|
||||
fprintf (stderr, "PASTE from '%s', to '%s', type=%d\n",(char*)Fl::event_text(),to,operation);
|
||||
|
||||
|
||||
if (!strchr(Fl::event_text(), '/'))
|
||||
return; // User is pasting something that isn't files
|
||||
// TODO: create a text file?
|
||||
@@ -474,6 +468,7 @@ fprintf (stderr, "from[%d]='%s'\n", k, from[k]);
|
||||
else
|
||||
c = ede_choice_alert(tsprintf(_("Copy or move these %d files to directory\n\t%s ?"), count, to), _("C&ancel"), _("&Copy"), _("&Move"));
|
||||
|
||||
fprintf(stderr, "Exited choice_alert\n");
|
||||
if (c==0) goto FINISH;
|
||||
if (c==1) operation=COPY; else operation=CUT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user