/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 conflicts.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:
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
try:
 
18
    import pygtk
 
19
    pygtk.require("2.0")
 
20
except:
 
21
    pass
 
22
 
17
23
import subprocess
18
24
 
19
25
from gi.repository import Gtk
20
26
from gi.repository import GObject
21
27
 
22
28
from bzrlib.config import GlobalConfig
23
 
from bzrlib.plugins.gtk.i18n import _i18n
 
29
from bzrlib.plugins.gtk import _i18n
24
30
from bzrlib.plugins.gtk.dialog import (
25
31
    error_dialog,
26
32
    warning_dialog,
32
38
 
33
39
    def __init__(self, wt, parent=None):
34
40
        """ Initialize the Conflicts dialog. """
35
 
        super(ConflictsDialog, self).__init__(
36
 
            title="Conflicts - Olive", parent=parent, flags=0,
37
 
            buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CANCEL))
 
41
        GObject.GObject.__init__(self, title="Conflicts - Olive",
 
42
                                  parent=parent,
 
43
                                  flags=0,
 
44
                                  buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CANCEL))
38
45
 
39
46
        # Get arguments
40
47
        self.wt = wt
58
65
        self._button_diff3.set_image(self._image_diff3)
59
66
        self._entry_diff3.set_text(self._get_diff3())
60
67
        self._hbox_diff3.set_spacing(3)
61
 
        content_area = self.get_content_area()
62
 
        content_area.set_spacing(3)
 
68
        self.vbox.set_spacing(3)
63
69
        self.set_default_size(400, 300)
64
70
 
65
71
        # Construct dialog
66
 
        self._hbox_diff3.pack_start(self._label_diff3, False, False, 0)
67
 
        self._hbox_diff3.pack_start(self._entry_diff3, True, True, 0)
68
 
        self._hbox_diff3.pack_start(self._button_diff3, False, False, 0)
 
72
        self._hbox_diff3.pack_start(self._label_diff3, False, False)
 
73
        self._hbox_diff3.pack_start(self._entry_diff3, True, True)
 
74
        self._hbox_diff3.pack_start(self._button_diff3, False, False)
69
75
        self._scrolledwindow.add(self._treeview)
70
 
        content_area.pack_start(self._scrolledwindow, True, True, 0)
71
 
        content_area.pack_start(self._hbox_diff3, False, False, 0)
 
76
        self.vbox.pack_start(self._scrolledwindow, True, True)
 
77
        self.vbox.pack_start(self._hbox_diff3, False, False)
72
78
 
73
79
        # Create the conflict list
74
80
        self._create_conflicts()
75
81
 
76
82
        # Show the dialog
77
 
        content_area.show_all()
 
83
        self.vbox.show_all()
78
84
 
79
85
    def _get_diff3(self):
80
86
        """ Get the specified diff3 utility. Default is meld. """