/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: Vincent Ladeuil
  • Date: 2008-05-05 18:16:46 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505181646-n95l8ltw2u6jtr26
Fix bug #187283 fix replacing _() by _i18n().

* genpot.sh 
Remove duplication. Add the ability to specify the genrated pot
file on command-line for debugging purposes.

* po/olive-gtk.pot:
Regenerated.

* __init__.py, branch.py, branchview/treeview.py, checkout.py,
commit.py, conflicts.py, diff.py, errors.py, initialize.py,
merge.py, nautilus-bzr.py, olive/__init__.py, olive/add.py,
olive/bookmark.py, olive/guifiles.py, olive/info.py,
olive/menu.py, olive/mkdir.py, olive/move.py, olive/remove.py,
olive/rename.py, push.py, revbrowser.py, status.py, tags.py:
Replace all calls to _() by calls to _i18n(), the latter being
defined in __init__.py and imported in the other modules from
there. This fix the problem encountered countless times when
running bzr selftest and getting silly error messages about
boolean not being callables.

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