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

  • Committer: Curtis Hovey
  • Date: 2011-07-31 15:52:43 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110731155243-ln8istmxbryhb4pz
Mechanical changes made by pygi.convert.sh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
except:
21
21
    pass
22
22
 
23
 
import bzrlib
24
 
import gtk
25
 
import os
 
23
from gi.repository import Gtk
26
24
 
27
25
from bzrlib.plugins.gtk.branchbox import BranchSelectionBox
28
26
 
29
 
class CreateMergeDirectiveDialog(gtk.Dialog):
 
27
class CreateMergeDirectiveDialog(Gtk.Dialog):
30
28
    def __init__(self, branch, stop_revid=None):
31
29
        super(CreateMergeDirectiveDialog, self).__init__()
32
30
        self.branch = branch
38
36
        # submittted
39
37
 
40
38
        # TODO: Create a frame with a the ability to select a branch
41
 
        
 
39
 
42
40
        # TODO: Create a frame with a button for selecting a file name 
43
41
        # for the bundle
44
42
        pass
45
43
 
46
44
 
47
 
class SendMergeDirectiveDialog(gtk.Dialog):
 
45
class SendMergeDirectiveDialog(Gtk.Dialog):
48
46
    def __init__(self, branch, parent=None):
49
47
        super(SendMergeDirectiveDialog, self).__init__(parent)
50
48
        self.branch = branch
52
50
        self._create()
53
51
 
54
52
    def _create(self):
55
 
        table = gtk.Table(rows=3, columns=2)
 
53
        table = Gtk.Table(rows=3, columns=2)
56
54
        self.vbox.add(table)
57
55
 
58
 
        label = gtk.Label()
 
56
        label = Gtk.Label()
59
57
        label.set_markup("<b>Branch to Submit:</b>")
60
 
        table.attach(label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
61
 
 
62
 
        label = gtk.Label(str(self.branch))
63
 
        table.attach(label, 1, 2, 0, 1, gtk.FILL, gtk.FILL)
64
 
 
65
 
        label = gtk.Label()
 
58
        table.attach(label, 0, 1, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
 
59
 
 
60
        label = Gtk.Label(label=str(self.branch))
 
61
        table.attach(label, 1, 2, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
 
62
 
 
63
        label = Gtk.Label()
66
64
        label.set_markup("<b>Target Branch:</b>")
67
 
        table.attach(label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
 
65
        table.attach(label, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
68
66
 
69
67
        self.submit_branch = BranchSelectionBox(self.branch.get_submit_branch())
70
 
        table.attach(self.submit_branch, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
 
68
        table.attach(self.submit_branch, 1, 2, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
71
69
 
72
70
        # TODO: Display number of revisions to be send whenever 
73
71
        # submit branch changes
74
72
 
75
 
        label = gtk.Label()
 
73
        label = Gtk.Label()
76
74
        label.set_markup("<b>Email To:</b>")
77
 
        table.attach(label, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
 
75
        table.attach(label, 0, 1, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
78
76
 
79
 
        self.mail_to = gtk.ComboBoxEntry()
 
77
        self.mail_to = Gtk.ComboBoxEntry()
80
78
        mail_to = self.branch.get_config().get_user_option('submit_to')
81
79
        if mail_to is None:
82
80
            submit_branch = self.submit_branch.get_branch()
85
83
                            'child_submit_to')
86
84
        if mail_to is not None:
87
85
            self.mail_to.get_child().set_text(mail_to)
88
 
        table.attach(self.mail_to, 1, 2, 2, 3, gtk.FILL, gtk.FILL)
 
86
        table.attach(self.mail_to, 1, 2, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
89
87
 
90
 
        self.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, 
91
 
                         gtk.STOCK_OK, gtk.RESPONSE_OK)
 
88
        self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, 
 
89
                         Gtk.STOCK_OK, Gtk.ResponseType.OK)
92
90
 
93
91
        self.show_all()
94
92
 
112
110
 
113
111
 
114
112
 
115
 
class ApplyMergeDirectiveDialog(gtk.Dialog):
 
113
class ApplyMergeDirectiveDialog(Gtk.Dialog):
116
114
    def __init__(self):
117
115
        super(ApplyMergeDirectiveDialog, self).__init__()