/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: Gustav Hartvigsson
  • Date: 2014-11-25 15:34:07 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20141125153407-827k8g7qy9u5byd5
* Fixed bzr-gtk's viz util, using the new Gtk Inspector.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from gi.repository import GObject
21
21
 
22
22
from bzrlib.config import GlobalConfig
23
 
from bzrlib.plugins.gtk import _i18n
 
23
from bzrlib.plugins.gtk.i18n import _i18n
24
24
from bzrlib.plugins.gtk.dialog import (
25
25
    error_dialog,
26
26
    warning_dialog,
32
32
 
33
33
    def __init__(self, wt, parent=None):
34
34
        """ Initialize the Conflicts dialog. """
35
 
        GObject.GObject.__init__(self, title="Conflicts - Olive",
36
 
                                  parent=parent,
37
 
                                  flags=0,
38
 
                                  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))
39
38
 
40
39
        # Get arguments
41
40
        self.wt = wt
59
58
        self._button_diff3.set_image(self._image_diff3)
60
59
        self._entry_diff3.set_text(self._get_diff3())
61
60
        self._hbox_diff3.set_spacing(3)
62
 
        self.vbox.set_spacing(3)
 
61
        content_area = self.get_content_area()
 
62
        content_area.set_spacing(3)
63
63
        self.set_default_size(400, 300)
64
64
 
65
65
        # Construct dialog
66
 
        self._hbox_diff3.pack_start(self._label_diff3, False, False)
67
 
        self._hbox_diff3.pack_start(self._entry_diff3, True, True)
68
 
        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)
69
69
        self._scrolledwindow.add(self._treeview)
70
 
        self.vbox.pack_start(self._scrolledwindow, True, True)
71
 
        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)
72
72
 
73
73
        # Create the conflict list
74
74
        self._create_conflicts()
75
75
 
76
76
        # Show the dialog
77
 
        self.vbox.show_all()
 
77
        content_area.show_all()
78
78
 
79
79
    def _get_diff3(self):
80
80
        """ Get the specified diff3 utility. Default is meld. """