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

commit 8ed8eeb244c1670f2938132740fff4ea4209af04
Author: James Buren <[email protected]>
Date:   Tue Feb 19 02:02:17 2013 -0600

add code for reseting position in the listbox

diff --git a/new/src/ui_newt.c b/new/src/ui_newt.c
index 906a90b..341c0f5 100644
--- a/new/src/ui_newt.c
+++ b/new/src/ui_newt.c
@@ -1060,6 +1060,8 @@ extern bool ui_window_partition(struct device 
**devices,struct disk **disks)
snprintf(text,NEWT_WIDTH+1,"%2cFree Space (%s)",' ',size);

newtListboxInsertEntry(listbox,text,(void *) key.data,(void *) action.data);
+
+          newtListboxSetCurrentByKey(listbox,(void *) action.data);
}
}
else if(action.partition)
@@ -1075,6 +1077,8 @@ extern bool ui_window_partition(struct device 
**devices,struct disk **disks)
newtListboxInsertEntry(listbox,text,(void *) key.data,(void *) key.data);

newtListboxDeleteEntry(listbox,(void *) key.data);
+
+          newtListboxSetCurrentByKey(listbox,(void *) action.data);
}
}
else if(action.space)
@@ -1169,6 +1173,8 @@ extern bool ui_window_partition(struct device 
**devices,struct disk **disks)
newtListboxInsertEntry(listbox,text,(void *) key.data,(void *) action.data);

newtListboxDeleteEntry(listbox,(void *) action.data);
+
+        newtListboxSetCurrentByKey(listbox,(void *) ((partition > 0) ? 
action.data : key.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

Reply via email to