Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=97b3ece44c013b17470301b5dab17b4ea707a6fd

commit 97b3ece44c013b17470301b5dab17b4ea707a6fd
Author: James Buren <[email protected]>
Date:   Sun Feb 17 01:04:12 2013 -0600

move code for formatting deletion
UI text to right before it is needed

diff --git a/src/ui_newt.c b/src/ui_newt.c
index 863fe4d..7ad64a7 100644
--- a/src/ui_newt.c
+++ b/src/ui_newt.c
@@ -1100,12 +1100,6 @@ extern bool ui_window_partition(struct device 
**devices,struct disk **disks)
key.partition_number = 0;

key.space = true;
-
-            snprintf(text,NEWT_WIDTH+1,"delete last partition");
-          }
-          else
-          {
-            snprintf(text,NEWT_WIDTH+1,"delete extended partition");
}

if(disk_get_free_size(disk) > 0)
@@ -1121,6 +1115,11 @@ extern bool ui_window_partition(struct device 
**devices,struct disk **disks)

key.delete = true;

+          if(strcmp(disk_partition_get_purpose(disk,partition),"extended") != 
0)
+            snprintf(text,NEWT_WIDTH+1,"delete last partition");
+          else
+            snprintf(text,NEWT_WIDTH+1,"delete extended partition");
+
newtListboxInsertEntry(listbox,text,(void *) key.data,(void *) key.data);

newtListboxDeleteEntry(listbox,(void *) key.data);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to