aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-09-15 07:52:49 -0700
committerMcCabe Maxsted2010-09-15 08:16:53 -0700
commitc486017bf54a4938de8a4b33d1cf26896a3f99fc (patch)
tree3a1ca86aa1dd6b1ed3009ea7571b37655ee7f206 /linden
parentFixed crash when pressing the download dictionary button right after the wind... (diff)
downloadmeta-impy-c486017bf54a4938de8a4b33d1cf26896a3f99fc.zip
meta-impy-c486017bf54a4938de8a4b33d1cf26896a3f99fc.tar.gz
meta-impy-c486017bf54a4938de8a4b33d1cf26896a3f99fc.tar.bz2
meta-impy-c486017bf54a4938de8a4b33d1cf26896a3f99fc.tar.xz
Fixed spellcheck comboboxes showing up as blank (do we even want comboboxes here?)
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llprefsadvanced.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index 898ba2c..73a5827 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -239,41 +239,39 @@ void LLPrefsAdvanced::refresh()
239 } 239 }
240 240
241 LLComboBox* comboBox = getChild<LLComboBox>("EmeraldSpellBase"); 241 LLComboBox* comboBox = getChild<LLComboBox>("EmeraldSpellBase");
242 if(comboBox != NULL) 242 if (comboBox != NULL)
243 { 243 {
244 comboBox->removeall(); 244 comboBox->removeall();
245 std::vector<std::string> names = glggHunSpell->getDicts(); 245 std::vector<std::string> names = glggHunSpell->getDicts();
246 for(int i=0; i<(int)names.size(); i++) 246 for (int i = 0; i < (int)names.size(); i++)
247 { 247 {
248 comboBox->add(names[i]); 248 comboBox->add(names[i]);
249 } 249 }
250 comboBox->setSimple(gSavedSettings.getString("EmeraldSpellBase")); 250 comboBox->setSimple(gSavedSettings.getString("EmeraldSpellBase"));
251 } 251 }
252 comboBox = getChild<LLComboBox>("EmSpell_Avail"); 252 comboBox = getChild<LLComboBox>("EmSpell_Avail");
253 if(comboBox != NULL) 253 if (comboBox != NULL)
254 { 254 {
255 LLSD selected = comboBox->getSelectedValue();
255 comboBox->removeall(); 256 comboBox->removeall();
256
257 comboBox->add("");
258 std::vector<std::string> names = glggHunSpell->getAvailDicts(); 257 std::vector<std::string> names = glggHunSpell->getAvailDicts();
259 for(int i=0; i<(int)names.size(); i++) 258 for (int i = 0; i < (int)names.size(); i++)
260 { 259 {
261 comboBox->add(names[i]); 260 comboBox->add(names[i]);
262 } 261 }
263 comboBox->setSimple(std::string("")); 262 comboBox->selectByValue(selected);
264 } 263 }
265 comboBox = getChild<LLComboBox>("EmSpell_Installed"); 264 comboBox = getChild<LLComboBox>("EmSpell_Installed");
266 if(comboBox != NULL) 265 if (comboBox != NULL)
267 { 266 {
267 LLSD selected = comboBox->getSelectedValue();
268 comboBox->removeall(); 268 comboBox->removeall();
269
270 comboBox->add("");
271 std::vector<std::string> names = glggHunSpell->getInstalledDicts(); 269 std::vector<std::string> names = glggHunSpell->getInstalledDicts();
272 for(int i=0; i<(int)names.size(); i++) 270 for (int i = 0; i < (int)names.size(); i++)
273 { 271 {
274 comboBox->add(names[i]); 272 comboBox->add(names[i]);
275 } 273 }
276 comboBox->setSimple(std::string("")); 274 comboBox->selectByValue(selected);
277 } 275 }
278} 276}
279 277
@@ -311,6 +309,7 @@ void LLPrefsAdvanced::onSpellAdd(void* data)
311 } 309 }
312 panel->refresh(); 310 panel->refresh();
313} 311}
312
314void LLPrefsAdvanced::onSpellRemove(void* data) 313void LLPrefsAdvanced::onSpellRemove(void* data)
315{ 314{
316 LLPrefsAdvanced* panel = (LLPrefsAdvanced*)data; 315 LLPrefsAdvanced* panel = (LLPrefsAdvanced*)data;
@@ -320,23 +319,29 @@ void LLPrefsAdvanced::onSpellRemove(void* data)
320 } 319 }
321 panel->refresh(); 320 panel->refresh();
322} 321}
322
323void LLPrefsAdvanced::onSpellGetMore(void* data) 323void LLPrefsAdvanced::onSpellGetMore(void* data)
324{ 324{
325 glggHunSpell->getMoreButton(data); 325 glggHunSpell->getMoreButton(data);
326} 326}
327
327void LLPrefsAdvanced::onSpellEditCustom(void* data) 328void LLPrefsAdvanced::onSpellEditCustom(void* data)
328{ 329{
329 glggHunSpell->editCustomButton(); 330 glggHunSpell->editCustomButton();
330} 331}
332
331void LLPrefsAdvanced::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata) 333void LLPrefsAdvanced::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata)
332{ 334{
333 335
334 LLComboBox* box = (LLComboBox*)ctrl; 336 LLComboBox* box = (LLComboBox*)ctrl;
335 if(box) 337 if (box)
336 { 338 {
337 glggHunSpell->newDictSelection(box->getValue().asString()); 339 glggHunSpell->newDictSelection(box->getValue().asString());
338 //LLPanelEmerald* panel = (LLPanelEmerald*)userdata;//box->getParent(); 340 //LLPanelEmerald* panel = (LLPanelEmerald*)userdata;//box->getParent();
339 if(sInstance)sInstance->refresh(); 341 if (sInstance)
342 {
343 sInstance->refresh();
344 }
340 } 345 }
341 //LLPanelEmerald* panel = (LLPanelEmerald*)userdata; 346 //LLPanelEmerald* panel = (LLPanelEmerald*)userdata;
342 //if(panel)panel->refresh(); 347 //if(panel)panel->refresh();