From 32963835372e645dde587ac66e63003ff7849434 Mon Sep 17 00:00:00 2001 From: Greg Frost <gregfrost1@bigpond.com> Date: Thu, 13 Aug 2009 13:16:55 +0000 Subject: mythinstall: remove duplicate modeline offerings --- abs/core-testing/mythinstall/PKGBUILD | 2 +- abs/core-testing/mythinstall/xorgsettings.h | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/abs/core-testing/mythinstall/PKGBUILD b/abs/core-testing/mythinstall/PKGBUILD index 81c6229..5687032 100644 --- a/abs/core-testing/mythinstall/PKGBUILD +++ b/abs/core-testing/mythinstall/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Jams pkgname=mythinstall pkgver=1 -pkgrel=3 +pkgrel=5 pkgdesc="LinHES installer/systemconfig GUI." arch=i686 depends=() diff --git a/abs/core-testing/mythinstall/xorgsettings.h b/abs/core-testing/mythinstall/xorgsettings.h index c17720f..b9513fd 100755 --- a/abs/core-testing/mythinstall/xorgsettings.h +++ b/abs/core-testing/mythinstall/xorgsettings.h @@ -127,6 +127,9 @@ static HostComboBox *HostXres() "s/ Server//g'"; //reformat. cout << mode_extract_command << endl; modelines = popen (mode_extract_command, "r"); + + char previous_mode[200]={0}; + if (modelines) { char line_in[200]; @@ -142,7 +145,15 @@ static HostComboBox *HostXres() if (separator) { separator[0]=0; - gc->addSelection(separator + 1,line_in); + separator++; + + // Skip this mode if the description is identical to the previous. + if (strcmp (previous_mode, separator) == 0) + continue; + + strncpy (previous_mode, separator, 200); + gc->addSelection(separator, line_in); + for (int def = 0; def < num_defaults; def++) if (strncmp (&line_in[1], defaults[def], strlen (defaults[def]))==0) defaults_added[def]=1; -- cgit v0.12