Comment on attachment 553143
part2: do not override manually set dictionary

>+  PRBool mUpdateDictionaryRunning;
>+  PRBool mDictWasSetManually;

Please use PRPackedBool.

>+class UpdateDictionnaryHolder {
>+  private:
>+    nsEditorSpellCheck* mSpellCheck;
>+  public:
>+    UpdateDictionnaryHolder(nsEditorSpellCheck* esc): mSpellCheck(esc) {
>+      if (mSpellCheck) {
>+        mSpellCheck->BeginUpdateDictionary();
>+      }
>+    }
>+    ~UpdateDictionnaryHolder() {
>+      if (mSpellCheck) {
>+        mSpellCheck->EndUpdateDictionary();
>+      }
>+    }
> };

Also, please move this class to the cpp file.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/303269

Title:
  Automatically select language for spell check based on user input

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/303269/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to