Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/test-window-manager.py
blob: 413a9dd55209a781141ad822dd5fbf6502c9574c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python
import pygtk
pygtk.require('2.0')

from sugar.session.UITestSession import UITestSession

session = UITestSession()
session.start()

import gtk

def _show_dialog(window):
	dialog = gtk.Dialog(title='No Unviewed Media', 
						parent=window, flags=gtk.DIALOG_MODAL, 
        	            buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
	label = gtk.Label('There is no unviewed media to download.')
	dialog.vbox.pack_start(label, True, True, 0)
	label.show()
	response = dialog.run()
	dialog.hide()
	del dialog

window = gtk.Window()
window.show()

_show_dialog(window)

gtk.main()