Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=91d4f5e4acfa659943837bb1389018d59475eeff
commit 91d4f5e4acfa659943837bb1389018d59475eeff Author: James Buren <[email protected]> Date: Sat Mar 2 06:09:01 2013 -0600 move layout struct back to layout module delete layout UI, as it's been replaced by general list UI. diff --git a/new/fwsetup/layout.c b/new/fwsetup/layout.c index 2b2d382..1827a5e 100644 --- a/new/fwsetup/layout.c +++ b/new/fwsetup/layout.c @@ -17,6 +17,15 @@ #include "local.h" +struct layout +{ + char *kbdlayout; + char *xkblayout; + char *xkbmodel; + char *xkbvariant; + char *xkboptions; +}; + static struct layout **layouts = 0; static char **entries = 0; diff --git a/new/fwsetup/local.h b/new/fwsetup/local.h index be0e02c..bb2639c 100644 --- a/new/fwsetup/local.h +++ b/new/fwsetup/local.h @@ -63,15 +63,6 @@ struct device; struct disk; -struct layout -{ - char *kbdlayout; - char *xkblayout; - char *xkbmodel; - char *xkbvariant; - char *xkboptions; -}; - struct format { char *devicepath; @@ -176,7 +167,6 @@ extern void ui_dialog_text(const char *title,const char *text); extern bool ui_dialog_yesno(const char *title,const char *text,bool defaultno); extern bool ui_dialog_progress(const char *title,const char *text,int percent); extern bool ui_window_list(const char *title,const char *text,char **entries,char **entry); -extern bool ui_window_layout(struct layout **layouts,struct layout **layout); extern bool ui_window_partition(struct device **devices,struct disk **disks); extern bool ui_window_format(struct format **targets); extern bool ui_window_root(struct account *data); diff --git a/new/fwsetup/ui_newt.c b/new/fwsetup/ui_newt.c index ca35d18..129787a 100644 --- a/new/fwsetup/ui_newt.c +++ b/new/fwsetup/ui_newt.c @@ -967,83 +967,6 @@ extern bool ui_window_list(const char *title,const char *text,char **entries,cha return true; } -extern bool ui_window_layout(struct layout **layouts,struct layout **layout) -{ - int textbox_width = 0; - int textbox_height = 0; - int next_width = 0; - int next_height = 0; - int listbox_width = 0; - int listbox_height = 0; - newtComponent textbox = 0; - newtComponent next = 0; - newtComponent listbox = 0; - newtComponent form = 0; - struct newtExitStruct es = {0}; - struct layout **p = 0; - - if(layouts == 0 || layout == 0) - { - errno = EINVAL; - error(strerror(errno)); - return false; - } - - if(!get_text_screen_size(LAYOUT_TEXT,&textbox_width,&textbox_height)) - return false; - - if(!get_button_screen_size(NEXT_BUTTON_TEXT,&next_width,&next_height)) - return false; - - listbox_width = NEWT_WIDTH; - - listbox_height = NEWT_HEIGHT - textbox_height - next_height - 2; - - if(newtCenteredWindow(NEWT_WIDTH,NEWT_HEIGHT,LAYOUT_TITLE) != 0) - { - eprintf("Failed to open a NEWT window.\n"); - return false; - } - - textbox = newtTextbox(0,0,textbox_width,textbox_height,0); - - newtTextboxSetText(textbox,LAYOUT_TEXT); - - next = newtButton(NEWT_WIDTH-next_width,NEWT_HEIGHT-next_height,NEXT_BUTTON_TEXT); - - listbox = newtListbox(0,textbox_height+1,listbox_height,NEWT_FLAG_SCROLL); - - newtListboxSetWidth(listbox,listbox_width); - - for( p = layouts ; *p != 0 ; ++p ) - newtListboxAppendEntry(listbox,(*p)->kbdlayout,*p); - - newtListboxSetCurrent(listbox,0); - - form = newtForm(0,0,NEWT_FLAG_NOF12); - - newtFormAddComponents(form,textbox,next,listbox,(void *) 0); - - newtFormSetCurrent(form,listbox); - - while(true) - { - newtFormRun(form,&es); - - if(es.reason == NEWT_EXIT_COMPONENT && es.u.co == next) - { - *layout = newtListboxGetCurrent(listbox); - break; - } - } - - newtFormDestroy(form); - - newtPopWindow(); - - return true; -} - extern bool ui_window_partition(struct device **devices,struct disk **disks) { int textbox_width = 0; _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
