summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-08-13 13:16:55 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-08-13 13:16:55 (GMT)
commit32963835372e645dde587ac66e63003ff7849434 (patch)
tree5a2dd870fa87ee92e6dd7706a55b7b6cfab62073
parent9182c2064790a8247622117138809d38a6c71f40 (diff)
downloadlinhes_pkgbuild-32963835372e645dde587ac66e63003ff7849434.zip
linhes_pkgbuild-32963835372e645dde587ac66e63003ff7849434.tar.gz
linhes_pkgbuild-32963835372e645dde587ac66e63003ff7849434.tar.bz2
mythinstall: remove duplicate modeline offerings
-rw-r--r--abs/core-testing/mythinstall/PKGBUILD2
-rwxr-xr-xabs/core-testing/mythinstall/xorgsettings.h13
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;