Blob Blame History Raw
diff -up kdebase-workspace-4.1.2/kdm/kfrontend/themer/kdmlabel.cpp.orig kdebase-workspace-4.1.2/kdm/kfrontend/themer/kdmlabel.cpp
--- kdebase-workspace-4.1.2/kdm/kfrontend/themer/kdmlabel.cpp.orig	2008-11-06 11:51:38.000000000 +0100
+++ kdebase-workspace-4.1.2/kdm/kfrontend/themer/kdmlabel.cpp	2008-11-06 11:45:09.000000000 +0100
@@ -233,39 +233,47 @@ KdmLabel::update()
 	}
 }
 
-static const struct {
-	const char *type, *text;
-} stocks[] = {
-	{ "language",          I18N_NOOP2("@action:button", "Lan_guage") },
-	{ "session",           I18N_NOOP2("@action:button", "Session _Type") },
-	{ "system",            I18N_NOOP2("@action:button", "_Menu") },	// i18n("Actions");
-	{ "disconnect",        I18N_NOOP2("@action:button ... from XDMCP server", "Disconn_ect") },
-	{ "quit",              I18N_NOOP2("@action:button", "_Quit") },
-	{ "halt",              I18N_NOOP2("@action:button", "Power o_ff") },
-//	{ "suspend",           I18N_NOOP2("@action:button", "_Suspend") },
-	{ "reboot",            I18N_NOOP2("@action:button", "Re_boot") },
-	{ "chooser",           I18N_NOOP2("@action:button", "_Remote login") },
-	{ "caps-lock-warning", I18N_NOOP("Caps Lock is enabled") },
-	{ "timed-label",       I18N_NOOP("User %u will log in in %t") },
-	{ "welcome-label",     I18N_NOOP("Welcome to %h") },	// _greetString
-	{ "domain-label",      I18N_NOOP("_Domain:") },
-	{ "username-label",    I18N_NOOP("_Username:") },
-	{ "password-label",    I18N_NOOP("_Password:") },
-	{ "login",             I18N_NOOP2("@action:button", "_Login") }
-};
-
 // public static
 QString
 KdmLabel::lookupStock( const QString &stock )
 {
 	QString type( stock.toLower() );
-
-	for (uint i = 0; i < sizeof(stocks)/sizeof(stocks[0]); i++)
-		if (type == stocks[i].type)
-			return i18n(stocks[i].text);
-
-	kWarning() << "Invalid <stock> element '" << stock << "'. Check your theme!";
-	return stock;
+	if (type == "language") {
+		return i18nc("@action:button", "Lan_guage");
+	} else if (type == "session") {
+		return i18nc("@action:button", "Session _Type");
+	} else if (type == "system") {
+		return i18nc("@action:button", "_Menu");
+	} else if (type == "disconnect") {
+		return i18nc("@action:button ... from XDMCP server", "Disconn_ect");
+	} else if (type == "quit") {
+		return i18nc("@action:button", "_Quit");
+	} else if (type == "halt") {
+		return i18nc("@action:button", "Power o_ff");
+	} else if (type == "suspend") {
+		return i18nc("@action:button", "_Suspend");
+	} else if (type == "reboot") {
+		return i18nc("@action:button", "Re_boot");
+	} else if (type == "chooser") {
+		return i18nc("@action:button", "_Remote login");
+	} else if (type == "caps-lock-warning") {
+		return i18n("Caps Lock is enabled");
+	} else if (type == "timed-label") {
+		return i18n("User %u will log in in %t");
+	} else if (type == "welcome-label") {
+		return i18n("Welcome to %h");
+	} else if (type == "domain-label") {
+		return i18n("_Domain:");
+	} else if (type == "username-label") {
+		return i18n("_Username:");
+	} else if (type == "password-label") {
+		return i18n("_Password:");
+	} else if (type == "login") {
+		return i18nc("@action:button", "_Login");
+	} else {
+		kWarning() << "Invalid <stock> element '" << stock << "'. Check your theme!";
+		return stock;
+	}
 }
 
 QString KdmLabel::timedUser = QString();