Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=ffb2a05ad0fb099ad29be7127d5d7021c8392648
commit ffb2a05ad0fb099ad29be7127d5d7021c8392648 Author: James Buren <[email protected]> Date: Sat Aug 11 13:04:32 2012 -0500 add wrapper function to get_text_size() for newt button widgets. it returns the full size of this particular widget. diff --git a/fwsetup.c b/fwsetup.c index 14a3156..9f06b11 100644 --- a/fwsetup.c +++ b/fwsetup.c @@ -11,7 +11,7 @@ extern int main(void) #ifdef NEWT if(newtInit() != 0) { - eprintf("Failed to initialize NEWT.\n"); + eprintf(NEWTINIT_TEXT); return EXIT_FAILURE; } diff --git a/fwsetup.h b/fwsetup.h index e91924e..fc97f83 100644 --- a/fwsetup.h +++ b/fwsetup.h @@ -12,11 +12,15 @@ #define _(S) S #define memzero(P,N) memset(P,0,N) -#define WINDOW_TITLE _("Frugalware Linux Installer") +#define WINDOWTITLE_TEXT _("Frugalware Linux Installer") #ifdef NEWT #include <newt.h> +#define TEXTSIZE_TEXT _("Failed to retrieve a text block's screen dimensions.\n") +#define NEWTWINDOW_TEXT _("Failed to open a NEWT window.\n") +#define NEWTINIT_TEXT _("Failed to initialize NEWT.\n") + struct database { char *locale; @@ -29,6 +33,7 @@ struct database }; extern bool get_text_size(const char *text,int *width,int *height); +extern bool get_button_size(const char *text,int *width,int *height); #else #error "No known user interface is defined." #endif _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
