/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/bookmark.py

  • Committer: Jelmer Vernooij
  • Date: 2006-09-28 06:35:56 UTC
  • mto: (0.12.2 olive)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060928063556-62ec354cb06ba38c
Update TODO
integrate the handle and communicator functions into a main class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
    pygtk.require("2.0")
22
22
except:
23
23
    pass
24
 
try:
25
 
    import gtk
26
 
    import gtk.glade
27
 
except:
28
 
    sys.exit(1)
 
24
 
 
25
import gtk
 
26
import gtk.glade
 
27
from olive import gladefile
29
28
 
30
29
class OliveBookmark:
31
30
    """ Display the Edit bookmark dialog and perform the needed actions. """
32
 
    def __init__(self, gladefile, comm, dialog):
 
31
    def __init__(self, comm):
33
32
        """ Initialize the Edit bookmark dialog. """
34
 
        self.gladefile = gladefile
35
 
        self.glade = gtk.glade.XML(self.gladefile, 'window_bookmark', 'olive-gtk')
36
 
        
37
 
        # Communication object
38
 
        self.comm = comm
39
 
        # Dialog object
40
 
        self.dialog = dialog
 
33
        self.glade = gtk.glade.XML(gladefile, 'window_bookmark', 'olive-gtk')
41
34
        
42
35
        self.window = self.glade.get_widget('window_bookmark')
43
36
        
61
54
        
62
55
    def bookmark(self, widget):
63
56
        if self.entry_title.get_text() == '':
64
 
            self.dialog.error_dialog(_('No title given'),
 
57
            error_dialog(_('No title given'),
65
58
                                     _('Please specify a title to continue.'))
66
59
            return
67
60
        
69
62
                                          self.entry_title.get_text())
70
63
        
71
64
        self.close()
72
 
        self.comm.refresh_left()
73
65
    
74
66
    def close(self, widget=None):
75
67
        self.window.destroy()