From 3dbbb47648d6c33c24ea15cb953a1cb67ce7d3a7 Mon Sep 17 00:00:00 2001 From: auria Date: Wed, 1 Jun 2011 01:26:52 +0000 Subject: [PATCH] Show all tab first, select by default git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8793 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/config/user_config.hpp | 2 +- src/states_screens/kart_selection.cpp | 27 ++++++++------------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index 81fd4c24e..16a6ba6eb 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -313,7 +313,7 @@ namespace UserConfigParams PARAM_PREFIX StringUserConfigParam m_default_kart PARAM_DEFAULT( StringUserConfigParam("tux", "kart", "Kart to select by default (the last used kart)") ); PARAM_PREFIX StringUserConfigParam m_last_used_kart_group - PARAM_DEFAULT( StringUserConfigParam("standard", "last_kart_group", "Last selected kart group") ); + PARAM_DEFAULT( StringUserConfigParam("all", "last_kart_group", "Last selected kart group") ); // ---- Video PARAM_PREFIX GroupUserConfigParam m_video_group diff --git a/src/states_screens/kart_selection.cpp b/src/states_screens/kart_selection.cpp index a9fc549ac..10f517f56 100644 --- a/src/states_screens/kart_selection.cpp +++ b/src/states_screens/kart_selection.cpp @@ -884,16 +884,12 @@ void KartSelectionScreen::beforeAddingWidget() const std::vector& groups = kart_properties_manager->getAllGroups(); const int group_amount = groups.size(); - // add default group first - for (int n=0; n 1) { - if (groups[n] == DEFAULT_GROUP_NAME) - { - //FIXME: group name not translated - tabs->addTextChild( stringw(groups[n].c_str()).c_str() , groups[n]); - break; - } - } // for naddTextChild( _("All") , ALL_KART_GROUPS_ID); + } // Make group names being picked up by gettext #define FOR_GETTEXT_ONLY(x) @@ -902,21 +898,14 @@ void KartSelectionScreen::beforeAddingWidget() //I18N: kart group name FOR_GETTEXT_ONLY( _("Add-Ons") ) + // add others after for (int n=0; naddTextChild( _(groups[n].c_str()) , groups[n]); - } + // try to translate group names + tabs->addTextChild( _(groups[n].c_str()) , groups[n]); } // for n 1) - { - //I18N: name of the tab that will show tracks from all groups - tabs->addTextChild( _("All") , ALL_KART_GROUPS_ID); - } DynamicRibbonWidget* w = getWidget("karts"); assert( w != NULL );