[Frugalware-darcs] setup-current: select: get pkgdesc only if necessary in group2pkgs()

VMiklos vmiklos at frugalware.org
Thu Mar 16 18:01:05 CET 2006


[select: get pkgdesc only if necessary in group2pkgs()
VMiklos <vmiklos at frugalware.org>**20051116001253] {
hunk ./src/plugins/select.c 176
-GList* group2pkgs(char *group)
+// 1: add pkgdesc and On for dialog; 0: don't add
+GList* group2pkgs(char *group, int dialog)
hunk ./src/plugins/select.c 209
-				// TODO: pkgsize()
-				list = g_list_append(list, pkgdesc(ptr2));
-				list = g_list_append(list, strdup("On"));
+				if(dialog)
+				{
+					// TODO: pkgsize()
+					list = g_list_append(list,
+						pkgdesc(ptr2));
+					list = g_list_append(list,
+						strdup("On"));
+				}
hunk ./src/plugins/select.c 229
-	pkglist = group2pkgs(category);
+	pkglist = group2pkgs(category, 1);
hunk ./src/plugins/select.c 246
+	dlg_clear();
hunk ./src/plugins/select.c 339
-	selpkg = selpkg_confirm();
+	selpkgc = selpkg_confirm();
hunk ./src/plugins/select.c 341
-	fw_end_dialog(); ///
hunk ./src/plugins/select.c 342
-		printf("new item: %s\n", (char*)g_list_nth_data(list, i));
-	if (selpkg)
-		printf("expert mode\n");
-	fw_init_dialog(); ///
+	{
+		// TODO: we drop the result here
+		if(selpkgc)
+			selpkg(strdup((char*)g_list_nth_data(list, i)));
+		else
+			group2pkgs((char*)g_list_nth_data(list, i), 0);
+	}
}


More information about the Frugalware-darcs mailing list