/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: Jelmer Vernooij
  • Date: 2012-07-09 15:23:26 UTC
  • mto: This revision was merged to the branch mainline in revision 794.
  • Revision ID: jelmer@samba.org-20120709152326-dzxb8zoz0btull7n
Remove bzr-notify.

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