mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Let DesktopIcon::rename() handle most of the stuff
This commit is contained in:
parent
8d6cb50fb7
commit
cf8f661b17
@ -69,10 +69,6 @@ static void rename_cb(Fl_Widget*, void* d) {
|
|||||||
E_ASSERT(di != NULL);
|
E_ASSERT(di != NULL);
|
||||||
|
|
||||||
const char* new_name = edelib::input(_("New name"), di->label());
|
const char* new_name = edelib::input(_("New name"), di->label());
|
||||||
if(!new_name)
|
|
||||||
return;
|
|
||||||
if(new_name[0] == '\0')
|
|
||||||
return;
|
|
||||||
di->rename(new_name);
|
di->rename(new_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +257,7 @@ int DesktopIcon::drag_icon_y(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DesktopIcon::rename(const char* str) {
|
void DesktopIcon::rename(const char* str) {
|
||||||
if(!str)
|
if(!str ||(str[0] == '\0'))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(settings->name == str)
|
if(settings->name == str)
|
||||||
|
Loading…
Reference in New Issue
Block a user