~ubuntu-branches/ubuntu/precise/gnome-orca/precise-proposed

« back to all changes in this revision

Viewing changes to src/orca/scripts/default.py

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich
  • Date: 2011-09-05 16:11:45 UTC
  • mfrom: (0.9.39 upstream)
  • Revision ID: package-import@ubuntu.com-20110905161145-1hi5a6dva201le8l
Tags: 3.1.90-0ubuntu1
* New upstream release
  - General
    + Fix for bug 626254 - Migrate from PyGTK to PyGObject introspection-
      based bindings
    + Fix for bug 652485 - Remove deprecated (or soon-to-be deprecated)
      GtkBox, GtkTable, etc. and use GtkGrid instead.
    + Fix for bug 657646 - Default stopSpeechOnActiveDescendantChanged()
      should not be so restrictive
    + Fix for bug 657579 - Orca should not present tooltips shown as a
      result of mouse hovering unless the 'present tooltips' setting is
      enabled
  - Gecko
    + Fix for bug 599361 - Significant delay building up the contents
      of certain lines in Firefox
    + Fix for bug 650904 - Work around AT-SPI2 caching issues with
      Thunderbird
  - New and updated translations (THANKS EVERYONE!!!):
    + ca            Catalan              Gil Forcada
    + de            German               Mario Blättermann
    + es            Spanish              Gonzalo Sanhueza, Jorge González
    + id            Indonesian           Andika Triwidada
    + nb            Norwegian bokmål     Kjartan Maraas
    + sr            Serbian              Miroslav Nikolić
    + ug            Uyghur               Abduxukur Abdurixit, Sahran
* debian/control: Update build-depends and package depends as follows:
  - Removed python-gtk2 deps
  - Depend on python-gobject >= 2.91.3
  - Depend on python-pyatspi2 >= 2.1.90
  - Depend on gobject introspection bindings for GTK3, wnck3, and pango

Show diffs side-by-side

added added

removed removed

Lines of Context:
1839
1839
            self.utilities.adjustTextSelection(obj, caretOffset)
1840
1840
            texti = obj.queryText()
1841
1841
            startOffset, endOffset = texti.getSelection(0)
1842
 
            import gtk
1843
 
            clipboard = gtk.clipboard_get()
 
1842
            from gi.repository import Gtk
 
1843
            clipboard = Gtk.clipboard_get()
1844
1844
            clipboard.set_text(texti.getText(startOffset, endOffset))
1845
1845
 
1846
1846
        return True
3314
3314
        # Handle tooltip popups.
3315
3315
        #
3316
3316
        if event.source.getRole() == pyatspi.ROLE_TOOL_TIP:
3317
 
            obj = event.source
3318
 
            if event.type.startswith("object:state-changed:showing"):
3319
 
                if event.detail1 == 1:
3320
 
                    self.presentToolTip(obj)
3321
 
                elif orca_state.locusOfFocus:
3322
 
                    keyString, mods = self.utilities.lastKeyAndModifiers()
3323
 
                    if keyString == "F1":
3324
 
                        self.updateBraille(orca_state.locusOfFocus)
3325
 
                        utterances = self.speechGenerator.generateSpeech(
3326
 
                            orca_state.locusOfFocus)
3327
 
                        utterances.extend(self.tutorialGenerator.getTutorial(
3328
 
                            orca_state.locusOfFocus, False))
3329
 
                        speech.speak(utterances)
3330
 
            return
 
3317
            if not event.type.startswith("object:state-changed:showing"):
 
3318
                return
 
3319
 
 
3320
            keyString, mods = self.utilities.lastKeyAndModifiers()
 
3321
            if keyString != "F1" \
 
3322
               and not  _settingsManager.getSetting('presentToolTips'):
 
3323
                return
 
3324
 
 
3325
            if event.detail1 == 1:
 
3326
                self.presentToolTip(event.source)
 
3327
                return
 
3328
 
 
3329
            if orca_state.locusOfFocus and keyString == "F1":
 
3330
                obj = orca_state.locusOfFocus
 
3331
                self.updateBraille(obj)
 
3332
                utterances = self.speechGenerator.generateSpeech(obj)
 
3333
                utterances.extend(
 
3334
                    self.tutorialGenerator.getTutorial(obj, False))
 
3335
                speech.speak(utterances)
 
3336
                return
3331
3337
 
3332
3338
        if event.source.getRole() in state_change_notifiers:
3333
3339
            notifiers = state_change_notifiers[event.source.getRole()]
4583
4589
        Returns True if speech should be stopped; False otherwise.
4584
4590
        """
4585
4591
 
 
4592
        if not event.any_data:
 
4593
            return True
 
4594
 
 
4595
        if event.source == orca_state.locusOfFocus == event.any_data.parent:
 
4596
            return False
 
4597
 
4586
4598
        return True
4587
4599
 
4588
4600
    def getAtkNameForAttribute(self, attribName):