/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: Jelmer Vernooij
  • Date: 2011-03-23 09:49:44 UTC
  • mfrom: (723.1.1 isearch)
  • Revision ID: jelmer@samba.org-20110323094944-7n5h1vif3xpbze3p
Merge support for interactive substring search in bzr viz and annotate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from gi.repository import Gtk
 
17
try:
 
18
    import pygtk
 
19
    pygtk.require("2.0")
 
20
except:
 
21
    pass
 
22
 
 
23
import gtk
18
24
 
19
25
from bzrlib.plugins.gtk.branchbox import BranchSelectionBox
20
26
 
21
 
class CreateMergeDirectiveDialog(Gtk.Dialog):
 
27
class CreateMergeDirectiveDialog(gtk.Dialog):
22
28
    def __init__(self, branch, stop_revid=None):
23
29
        super(CreateMergeDirectiveDialog, self).__init__()
24
30
        self.branch = branch
36
42
        pass
37
43
 
38
44
 
39
 
class SendMergeDirectiveDialog(Gtk.Dialog):
 
45
class SendMergeDirectiveDialog(gtk.Dialog):
40
46
    def __init__(self, branch, parent=None):
41
47
        super(SendMergeDirectiveDialog, self).__init__(parent)
42
48
        self.branch = branch
44
50
        self._create()
45
51
 
46
52
    def _create(self):
47
 
        table = Gtk.Table(rows=3, columns=2)
 
53
        table = gtk.Table(rows=3, columns=2)
48
54
        self.vbox.add(table)
49
55
 
50
 
        label = Gtk.Label()
 
56
        label = gtk.Label()
51
57
        label.set_markup("<b>Branch to Submit:</b>")
52
 
        table.attach(label, 0, 1, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
53
 
 
54
 
        label = Gtk.Label(label=str(self.branch))
55
 
        table.attach(label, 1, 2, 0, 1, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
56
 
 
57
 
        label = Gtk.Label()
 
58
        table.attach(label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
 
59
 
 
60
        label = gtk.Label(str(self.branch))
 
61
        table.attach(label, 1, 2, 0, 1, gtk.FILL, gtk.FILL)
 
62
 
 
63
        label = gtk.Label()
58
64
        label.set_markup("<b>Target Branch:</b>")
59
 
        table.attach(label, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
 
65
        table.attach(label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
60
66
 
61
67
        self.submit_branch = BranchSelectionBox(self.branch.get_submit_branch())
62
 
        table.attach(self.submit_branch, 1, 2, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
 
68
        table.attach(self.submit_branch, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
63
69
 
64
70
        # TODO: Display number of revisions to be send whenever 
65
71
        # submit branch changes
66
72
 
67
 
        label = Gtk.Label()
 
73
        label = gtk.Label()
68
74
        label.set_markup("<b>Email To:</b>")
69
 
        table.attach(label, 0, 1, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
 
75
        table.attach(label, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
70
76
 
71
 
        self.mail_to = Gtk.ComboBoxEntry()
 
77
        self.mail_to = gtk.ComboBoxEntry()
72
78
        mail_to = self.branch.get_config().get_user_option('submit_to')
73
79
        if mail_to is None:
74
80
            submit_branch = self.submit_branch.get_branch()
77
83
                            'child_submit_to')
78
84
        if mail_to is not None:
79
85
            self.mail_to.get_child().set_text(mail_to)
80
 
        table.attach(self.mail_to, 1, 2, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
 
86
        table.attach(self.mail_to, 1, 2, 2, 3, gtk.FILL, gtk.FILL)
81
87
 
82
 
        self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, 
83
 
                         Gtk.STOCK_OK, Gtk.ResponseType.OK)
 
88
        self.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, 
 
89
                         gtk.STOCK_OK, gtk.RESPONSE_OK)
84
90
 
85
91
        self.show_all()
86
92
 
104
110
 
105
111
 
106
112
 
107
 
class ApplyMergeDirectiveDialog(Gtk.Dialog):
 
113
class ApplyMergeDirectiveDialog(gtk.Dialog):
108
114
    def __init__(self):
109
115
        super(ApplyMergeDirectiveDialog, self).__init__()