Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=d08cf857fe58675866e0b7fa9755e941fefa7d18
commit d08cf857fe58675866e0b7fa9755e941fefa7d18 Author: James Buren <[email protected]> Date: Sun Feb 17 15:43:27 2013 -0600 add free space update diff --git a/src/ui_newt.c b/src/ui_newt.c index 622e6d6..b942523 100644 --- a/src/ui_newt.c +++ b/src/ui_newt.c @@ -998,7 +998,7 @@ extern bool ui_window_partition(struct device **devices,struct disk **disks) if(es.reason == NEWT_EXIT_COMPONENT && es.u.co == listbox) { - union partition_action action = { .data = (uintptr_t) newtListboxGetCurrent(listbox) }; + const union partition_action action = { .data = (uintptr_t) newtListboxGetCurrent(listbox) }; union partition_action key = { .data = action.data }; struct device *device = devices[action.device_number]; struct disk *disk = disks[action.device_number]; @@ -1141,6 +1141,20 @@ extern bool ui_window_partition(struct device **devices,struct disk **disks) } disk_delete_partition(disk); + + key.delete = false; + + key.space = true; + + size_to_string(size,10,disk_get_free_size(disk),false); + + snprintf(text,NEWT_WIDTH+1,"free space %s",size); + + newtListboxDeleteEntry(listbox,(void *) key.data); + + newtListboxInsertEntry(listbox,text,(void *) key.data,(void *) action.data); + + key.data = action.data; } } else if(es.reason == NEWT_EXIT_COMPONENT && es.u.co == next) _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
