/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 lock.py

  • Committer: Curtis Hovey
  • Date: 2012-09-02 19:29:42 UTC
  • mfrom: (794.1.1 get_style_context)
  • Revision ID: sinzui.is@verizon.net-20120902192942-cwtww9wxvznx0wod
Do not call deprecated get_style(); use get_style_context().

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
import gtk
 
1
from gi.repository import Gtk
3
2
 
4
3
 
5
4
RESPONSE_BREAK = 0
6
 
RESPONSE_CANCEL = gtk.RESPONSE_CANCEL
 
5
RESPONSE_CANCEL = Gtk.ResponseType.CANCEL
7
6
 
8
7
READ = "read"
9
8
WRITE = "write"
44
43
    return True
45
44
 
46
45
 
47
 
class LockDialog(gtk.Dialog):
 
46
class LockDialog(Gtk.Dialog):
48
47
 
49
48
    def __init__(self, branch):
50
 
        gtk.Dialog.__init__(self)
 
49
        super(LockDialog, self).__init__()
51
50
 
52
51
        self.branch = branch
53
52
 
54
53
        self.set_title('Lock Not Held')
55
54
 
56
 
        self.vbox.add(gtk.Label('This operation cannot be completed as ' \
57
 
                                'another application has locked the branch.'))
 
55
        self.get_content_area().add(
 
56
            Gtk.Label(label=(
 
57
                'This operation cannot be completed as '
 
58
                'another application has locked the branch.')))
58
59
 
59
60
        self.add_button('Break Lock', RESPONSE_BREAK)
60
 
        self.add_button(gtk.STOCK_CANCEL, RESPONSE_CANCEL)
 
61
        self.add_button(Gtk.STOCK_CANCEL, RESPONSE_CANCEL)
61
62
 
62
 
        self.vbox.show_all()
 
63
        self.get_content_area().show_all()