[Frugalware-darcs] setup: framework utils: added fw_menu()

VMiklos vmiklos at frugalware.org
Fri Mar 31 00:49:32 CEST 2006


[framework utils: added fw_menu()
VMiklos <vmiklos at frugalware.org>**20051106005650
 a wrapper around dialog_menu() to always handle the cancel button
] {
hunk ./src/plugins/asklang.c 45
-	int ret;
hunk ./src/plugins/asklang.c 48
-	while(1)
-	{
-		ret = dialog_menu("Please select your language",
+	fw_menu("Please select your language",
hunk ./src/plugins/asklang.c 52
-		if (ret != DLG_EXIT_CANCEL)
-			break;
-		if(exit_confirm())
-			exit_perform();
-	}
hunk ./src/plugins/layout.c 59
-	int ret;
hunk ./src/plugins/layout.c 69
-	while(1)
-	{
-		ret = dialog_menu(_("Keyboard map selection"),
+	fw_menu(_("Keyboard map selection"),
hunk ./src/plugins/layout.c 75
-		if (ret != DLG_EXIT_CANCEL)
-			break;
-		if(exit_confirm())
-			exit_perform();
-	}
hunk ./src/util.c 113
+int fw_menu(const char *title, const char *cprompt, int height, int width,
+	int menu_height, int item_no, char **items)
+{
+	int ret;
+
+	while(1)
+	{
+		ret = dialog_menu(title, cprompt, height, width, menu_height,
+			item_no, items);
+		if (ret != DLG_EXIT_CANCEL)
+			break;
+		if(exit_confirm())
+			exit_perform();
+	}
+}
+
hunk ./src/util.h 16
+int fw_menu(const char *title, const char *cprompt, int height, int width,
+	int menu_height, int item_no, char **items);
+
}


More information about the Frugalware-darcs mailing list