Skip to content

Adding word count in view toolbar #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Daksh
Copy link

@Daksh Daksh commented Dec 9, 2015

@i5o
Copy link

i5o commented Dec 9, 2015

This is enough for the task.

Before we merge we should look another solution for replace the GObject.timeout_add, I tested with idle_add, and didn't worked


GObject.timeout_add(2000, internal_callback)

def _word_count_cb(self, abiword_canvas):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use _word...

@samdroid-apps
Copy link
Contributor

Looks good, here are my overall comments:

  • does the regex work with languages other than English? Charectersets other than English?
  • maybe move the label into the activity toolbar (icon: coloured write icon) - there is lots of metadata there already
  • only update it when the toolbar is open (and therefore when the label is visible)
  • add a description explaining WHY you used regex rather than an abiword function - explain that abi doesn't expose this apoi

@samdroid-apps
Copy link
Contributor

Actually have a look at abi's algorithm, it looks very efficient and it also deals with other languages. Maybe you could use it?

https://github.com/AbiWord/abiword/blob/c64130a42934fc5618f56c5ab8d028b52e41db43/plugins/grammar/xp/AbiGrammarUtil.cpp#L64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants