~ubuntu-branches/ubuntu/oneiric/alarm-clock/oneiric

« back to all changes in this revision

Viewing changes to alarm-clock/BugReport.py

  • Committer: Bazaar Package Importer
  • Author(s): Marco Rodrigues
  • Date: 2008-10-28 19:57:12 UTC
  • mto: (7.1.1 sid) (9.1.1 squeeze) (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20081028195712-e8kusg37fc1hnw0s
Tags: upstream-0.9.17
ImportĀ upstreamĀ versionĀ 0.9.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import gtk
 
2
import gtk.glade
 
3
 
 
4
class BugReport:
 
5
        def __init__(self, Prefix, MainClass, MainWindow):
 
6
                self.WindowGlade = gtk.glade.XML(Prefix + '/glade/main.glade', 'feedback_report')
 
7
                self.Window = self.WindowGlade.get_widget('feedback_report')
 
8
                self.Window.set_transient_for(MainWindow)
 
9
                self.Window.set_icon_from_file(Prefix + '/scalable/alarm-clock.svg')
 
10
                
 
11
                OkButton = self.WindowGlade.get_widget('ok_button')
 
12
                CancelButton = self.WindowGlade.get_widget('cancel_button')
 
13
                Event = self.WindowGlade.get_widget('event')
 
14
                
 
15
                Event.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(65535, 65535, 65535))
 
16
                self.WindowGlade.get_widget('ACIcon').set_from_file(Prefix + '/scalable/alarm-clock.svg')
 
17
                CancelButton.connect('clicked', self.Cancel)
 
18
                
 
19
        def Start(self):
 
20
                self.Window.show()
 
21
                
 
22
        def Cancel(self, Button):
 
23
                self.Window.destroy()