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

« back to all changes in this revision

Viewing changes to .pc/02_orca_desktop_environment.patch/src/orca/orca.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:
35
35
import unicodedata
36
36
import shutil
37
37
 
38
 
# This must happen BEFORE we import gtk (until we start using
39
 
# introspection).
40
38
from gi.repository.Gio import Settings
41
39
a11yAppSettings = Settings('org.gnome.desktop.a11y.applications')      
42
40
 
43
 
# We're going to force the name of the app to "orca" so pygtk
 
41
# We're going to force the name of the app to "orca" so we
44
42
# will end up showing us as "orca" to the AT-SPI.  If we don't
45
43
# do this, the name can end up being "-c".  See bug 364452 at
46
44
# http://bugzilla.gnome.org/show_bug.cgi?id=364452 for more
48
46
#
49
47
sys.argv[0] = "orca"
50
48
import pyatspi
51
 
import pygtk
52
 
pygtk.require('2.0')
53
49
try:
54
50
    # This can fail due to gtk not being available.  We want to
55
51
    # be able to recover from that if possible.  The main driver
56
52
    # for this is to allow "orca --text-setup" to work even if
57
53
    # the desktop is not running.
58
54
    #
59
 
    import gtk
 
55
    from gi.repository import Gtk
 
56
    from gi.repository import Gdk
60
57
except:
61
58
    pass
62
59
 
99
96
 
100
97
        self.desktopRunning = False
101
98
        try:
102
 
            if gtk.gdk.display_get_default():
 
99
            if Gdk.Display.get_default():
103
100
                self.desktopRunning = True
104
101
        except:
105
102
            pass
1161
1158
            # If it's not on the keypad, get the name of the unshifted
1162
1159
            # character. (i.e. "1" instead of "!")
1163
1160
            #
1164
 
            keymap = gtk.gdk.keymap_get_default()
1165
 
            entries = keymap.get_entries_for_keycode(event.hw_code)
1166
 
            event.event_string = gtk.gdk.keyval_name(entries[0][0])
 
1161
            keymap = Gdk.Keymap.get_default()
 
1162
            success, entries = keymap.get_entries_for_keycode(event.hw_code)
 
1163
            event.event_string = Gdk.keyval_name(entries[0].keycode)
1167
1164
            if event.event_string.startswith("KP") and \
1168
1165
               event.event_string != "KP_Enter":
1169
 
                name = gtk.gdk.keyval_name(entries[1][0])
 
1166
                name = Gdk.keyval_name(entries[1].keycode)
1170
1167
                if name.startswith("KP"):
1171
1168
                    event.event_string = name
1172
1169
 
1694
1691
    uri = "ghelp:orca"
1695
1692
    if page:
1696
1693
        uri += "?%s" % page
1697
 
    gtk.show_uri(gtk.gdk.screen_get_default(),
 
1694
    Gtk.show_uri(Gdk.Screen.get_default(),
1698
1695
                 uri,
1699
 
                 gtk.get_current_event_time())
 
1696
                 Gtk.get_current_event_time())
1700
1697
    return True
1701
1698
 
1702
1699
def listShortcuts(event):