From 56bde5cedb151b36d75b5f14818e440b964cf979 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 4 Nov 2002 14:51:30 +0000 Subject: [PATCH] (Rob Lahaye): fix label of progress slider when spellchecking. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5579 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 8 ++++++-- src/frontends/xforms/FormSpellchecker.C | 9 ++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index ae6a09912a..15caaf19c5 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2002-11-04 Rob Lahaye + + * FormSpellchecker.C (input): fix label of spellchecker progress bar. + 2002-11-04 Lars Gullik Bjønnes * lyx_gui.C (hexname): STRCONV @@ -9,7 +13,7 @@ * FormMathsDelim.C (apply): STRCONV * lyx_gui.C (start): adjust signature - (start): exchange magic integeres for defined values. + (start): exchange magic integers for defined values. 2002-10-31 Rob Lahaye @@ -22,7 +26,7 @@ * FormParagraph.[Ch]: * forms/form_paragraph.fd: a large-scale reorganisation and clean-up of the code to make it more transparent. Use RadioButtonGroup and - ChaekedGlueLength for the same reason. Add tooltips. + CheckedGlueLength for the same reason. Add tooltips. 2002-10-28 Angus Leeming diff --git a/src/frontends/xforms/FormSpellchecker.C b/src/frontends/xforms/FormSpellchecker.C index fccb0f1091..6117f98404 100644 --- a/src/frontends/xforms/FormSpellchecker.C +++ b/src/frontends/xforms/FormSpellchecker.C @@ -161,15 +161,14 @@ ButtonPolicy::SMInput FormSpellchecker::input(FL_OBJECT * ob, long ob_value) } // update slider with word count and progress - double const wordcount = controller().getCount(); int const progress = controller().getProgress(); - if (wordcount > 0.0 && progress > 0) { + if (progress > 0) { + double const wordcount = controller().getCount(); double const total = 100.0 * wordcount / progress; - + string const label = tostr(progress) + " %"; fl_set_slider_bounds(dialog_->slider_progress, 0.0, total); fl_set_slider_value(dialog_->slider_progress, wordcount); - fl_set_object_label(dialog_->slider_progress, - (tostr(progress) + " %").c_str()); + fl_set_object_label(dialog_->slider_progress, label.c_str()); } return ButtonPolicy::SMI_VALID; -- 2.39.2