~ubuntu-branches/ubuntu/raring/dogtail/raring

« back to all changes in this revision

Viewing changes to dogtail/apps/wrappers/gedit.py

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-12-21 13:33:47 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20061221133347-ljwbyiu04qd6uzvz
Tags: 0.6.1-3ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: use dh_iconcache.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import dogtail.tree
2
 
 
3
 
class Gedit(dogtail.tree.Application):
4
 
        def setText(self, text):
5
 
                buf = self.child(roleName = 'text')
6
 
                buf.text = text
7
 
 
8
 
        def getText(self):
9
 
                return self.child(roleName='text').text
10
 
 
11
 
        def openLocation(self, uri):
12
 
                menuItem = self.menu("File").menuItem("Open Location...")
13
 
                menuItem.click()
14
 
                dlg = self.dialog('Open Location')
15
 
                dlg.child(roleName = 'text').text = uri
16
 
                dlg.button('Open').click()
17
 
 
18
 
        def saveAs(self, uri):
19
 
                menuItem = self.menu("File").menuItem("Save As...")
20
 
                menuItem.click()
21
 
                dlg = self.dialog('Save As...')
22
 
                dlg.child(roleName = 'text').text = uri
23
 
                dlg.button('Save').click()
24
 
 
25
 
        def printPreview(self):
26
 
                menuItem = self.menu("File").menuItem("Print Preview")
27
 
                menuItem.click()
28