diff options
| author | Alfonso Siciliano <alfsiciliano@gmail.com> | 2021-12-13 07:54:07 +0000 | 
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-12-13 07:54:07 +0000 | 
| commit | e41955dd2d8635cfbab61acb8ad338e7d9f3e7da (patch) | |
| tree | c4258f9c9a07ea971d4a871a2b5c3454df35d00c /examples_library | |
| parent | 1b308d0631e5d0d21b631a688cdef1afe378e086 (diff) | |
Diffstat (limited to 'examples_library')
| -rw-r--r-- | examples_library/datebox.c | 6 | ||||
| -rw-r--r-- | examples_library/msgbox.c | 2 | ||||
| -rw-r--r-- | examples_library/pause.c | 4 | ||||
| -rw-r--r-- | examples_library/sade.c | 6 | ||||
| -rw-r--r-- | examples_library/theme.c | 11 | ||||
| -rw-r--r-- | examples_library/timebox.c | 6 | ||||
| -rw-r--r-- | examples_library/treeview.c | 2 | 
7 files changed, 16 insertions, 21 deletions
| diff --git a/examples_library/datebox.c b/examples_library/datebox.c index b74146b15f26..4839c3dbd895 100644 --- a/examples_library/datebox.c +++ b/examples_library/datebox.c @@ -30,7 +30,7 @@ int main()  	bsddialog_initconf(&conf);  	conf.title = "datebox"; -	conf.hline = "Press TAB and arrows"; +	conf.bottomtitle = "Press TAB and arrows";  	if (bsddialog_init() < 0)  		return -1; @@ -40,13 +40,13 @@ int main()  	bsddialog_end();  	switch (output) { -	case BSDDIALOG_YESOK: +	case BSDDIALOG_OK:  		printf("Date: %u/%u/%u", yy, mm, dd);  		break;  	case BSDDIALOG_ESC:  		printf("ESC\n");  		break; -	case BSDDIALOG_NOCANCEL: +	case BSDDIALOG_CANCEL:  		printf("Cancel");  		break;  	case BSDDIALOG_ERROR: diff --git a/examples_library/msgbox.c b/examples_library/msgbox.c index 92943d563b78..487266745c65 100644 --- a/examples_library/msgbox.c +++ b/examples_library/msgbox.c @@ -34,7 +34,7 @@ int main()  	printf("User input: ");  	switch (input) {  	case BSDDIALOG_ERROR: printf("Error %s\n", bsddialog_geterror()); break; -	case BSDDIALOG_YESOK: printf("OK\n");  break; +	case BSDDIALOG_OK: printf("OK\n");  break;  	case BSDDIALOG_ESC:   printf("ESC\n"); break;  	} diff --git a/examples_library/pause.c b/examples_library/pause.c index fa38120d989e..eb693325a18d 100644 --- a/examples_library/pause.c +++ b/examples_library/pause.c @@ -29,13 +29,13 @@ int main()  	bsddialog_end();  	switch (output) { -	case BSDDIALOG_YESOK: +	case BSDDIALOG_OK:  		printf("OK\n");  		break;  	case BSDDIALOG_ESC:  		printf("ESC\n");  		break; -	case BSDDIALOG_NOCANCEL: +	case BSDDIALOG_CANCEL:  		printf("Cancel\n");  		break;  	case BSDDIALOG_ERROR: diff --git a/examples_library/sade.c b/examples_library/sade.c index 95bfadc36df1..a159ab2afc0b 100644 --- a/examples_library/sade.c +++ b/examples_library/sade.c @@ -35,12 +35,12 @@ int main()  	conf.button.ok_label = "Create"; -	conf.button.extra_button = true; +	conf.button.with_extra = true;  	conf.button.extra_label = "Delete"; -	conf.button.no_label = "Cancel"; +	conf.button.cancel_label = "Cancel"; -	conf.button.help_button = true; +	conf.button.with_help = true;  	conf.button.help_label = "Revert";  	conf.button.generic1_label = "Auto"; diff --git a/examples_library/theme.c b/examples_library/theme.c index 74bc91b59fe6..305692d39cff 100644 --- a/examples_library/theme.c +++ b/examples_library/theme.c @@ -19,11 +19,10 @@ int main()  	int output;  	struct bsddialog_conf conf;  	enum bsddialog_default_theme theme; -	struct bsddialog_menuitem items[5] = { +	struct bsddialog_menuitem items[4] = {  	    {"", false, 0, "Dialog",    "Current dialog theme",  "BSDDIALOG_THEME_DIALOG" },  	    {"", false, 0, "BSDDialog", "Future default theme",  "BSDDIALOG_THEME_DEFAULT"},  	    {"", false, 0, "BlackWhite","Black and White theme", "BSDDIALOG_THEME_BLACKWHITE"}, -	    {"", false, 0, "Magenta",   "Testing",               "BSDDIALOG_THEME_MAGENTA"},  	    {"", false, 0, "Quit",      "Exit",                  "Quit or Cancel to exit" }  	}; @@ -36,9 +35,9 @@ int main()  	while (true) {  		bsddialog_backtitle(&conf, "Theme Example"); -		output = bsddialog_menu(&conf, "Choose theme", 15, 40, 5, 5, items, NULL); +		output = bsddialog_menu(&conf, "Choose theme", 15, 40, 4, 4, items, NULL); -		if (output != BSDDIALOG_YESOK || items[4].on) +		if (output != BSDDIALOG_OK || items[3].on)  			break;  		if (items[0].on) { @@ -53,10 +52,6 @@ int main()  			theme = BSDDIALOG_THEME_BLACKWHITE;  			conf.menu.default_item = items[2].name;  		} -		else if (items[3].on) { -			theme = BSDDIALOG_THEME_MAGENTA; -			conf.menu.default_item = items[3].name; -		}  		bsddialog_set_default_theme(theme);  	} diff --git a/examples_library/timebox.c b/examples_library/timebox.c index ff7a7c254468..117d45dcdb7b 100644 --- a/examples_library/timebox.c +++ b/examples_library/timebox.c @@ -30,7 +30,7 @@ int main()  	bsddialog_initconf(&conf);  	conf.title = "timebox"; -	conf.hline = "Press TAB and arrows"; +	conf.bottomtitle = "Press TAB and arrows";  	if (bsddialog_init() < 0)  		return -1; @@ -40,13 +40,13 @@ int main()  	bsddialog_end();  	switch (output) { -	case BSDDIALOG_YESOK: +	case BSDDIALOG_OK:  		printf("Time: [%u:%u:%u]\n", hh, mm, ss);  		break;  	case BSDDIALOG_ESC:  		printf("ESC\n");  		break; -	case BSDDIALOG_NOCANCEL: +	case BSDDIALOG_CANCEL:  		printf("Cancel\n");  		break;  	case BSDDIALOG_ERROR: diff --git a/examples_library/treeview.c b/examples_library/treeview.c index 628f24ffb287..7fa3d229adf9 100644 --- a/examples_library/treeview.c +++ b/examples_library/treeview.c @@ -27,7 +27,7 @@ int main()  	bsddialog_initconf(&conf);  	conf.title = "radiolist"; -	conf.menu.no_tags = true; +	conf.menu.no_name = true;  	conf.menu.align_left = true;  	if (bsddialog_init() < 0) | 
