Commit 8c49e2e1 authored by Kai Willadsen's avatar Kai Willadsen

Modernise our import statements

parent ad2a9208
......@@ -20,7 +20,7 @@ import difflib
import gobject
from matchers import DiffChunk, MyersSequenceMatcher
from .matchers import DiffChunk, MyersSequenceMatcher
opcode_reverse = {
......
......@@ -19,25 +19,26 @@
import collections
import copy
import errno
import paths
from ui import gnomeglade
import gtk
import gtk.keysyms
import misc
import os
from gettext import gettext as _
from gettext import ngettext
import shutil
import melddoc
import tree
import re
import shutil
import stat
import time
import ui.emblemcellrenderer
import gtk
import gtk.keysyms
from . import melddoc
from . import tree
from . import misc
from . import paths
from .ui import gnomeglade
from .ui import emblemcellrenderer
from collections import namedtuple
from meldapp import app
from gettext import gettext as _
from gettext import ngettext
from .meldapp import app
gdk = gtk.gdk
......@@ -294,7 +295,7 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
self.treeview[i].get_selection().set_mode(gtk.SELECTION_MULTIPLE)
column = gtk.TreeViewColumn()
rentext = gtk.CellRendererText()
renicon = ui.emblemcellrenderer.EmblemCellRenderer()
renicon = emblemcellrenderer.EmblemCellRenderer()
column.pack_start(renicon, expand=0)
column.pack_start(rentext, expand=1)
col_index = self.model.column_index
......
......@@ -32,20 +32,20 @@ import gobject
import gtk
import gtk.keysyms
import diffutil
from ui import findbar
from ui import gnomeglade
import matchers
import misc
import meldbuffer
import melddoc
import patchdialog
import paths
import merge
import undo
from meldapp import app
from util.sourceviewer import srcviewer
from . import diffutil
from . import matchers
from . import meldbuffer
from . import melddoc
from . import merge
from . import misc
from . import patchdialog
from . import paths
from . import undo
from .ui import findbar
from .ui import gnomeglade
from .meldapp import app
from .util.sourceviewer import srcviewer
def init_worker():
......
......@@ -20,9 +20,9 @@ from gettext import gettext as _
import gtk
import filediff
import meldbuffer
import merge
from . import filediff
from . import meldbuffer
from . import merge
class FileMerge(filediff.FileDiff):
......
......@@ -21,7 +21,7 @@ import math
import gtk
import diffutil
from . import diffutil
# FIXME: import order issues
......
......@@ -149,6 +149,6 @@ class MeldApp(gobject.GObject):
app = MeldApp()
import filediff
import meldwindow
from . import filediff
from . import meldwindow
......@@ -19,15 +19,15 @@
import sys
from gettext import gettext as _
import meld.util.sourceviewer
from .util import sourceviewer
class MeldBuffer(meld.util.sourceviewer.srcviewer.GtkTextBuffer):
class MeldBuffer(sourceviewer.srcviewer.GtkTextBuffer):
__gtype_name__ = "MeldBuffer"
def __init__(self, filename=None):
meld.util.sourceviewer.srcviewer.GtkTextBuffer.__init__(self)
sourceviewer.srcviewer.GtkTextBuffer.__init__(self)
self.data = MeldBufferData(filename)
def reset_buffer(self, filename):
......
......@@ -25,7 +25,7 @@ import gobject
import gio
import gtk
import task
from . import task
from gettext import gettext as _
......
......@@ -23,19 +23,19 @@ import gio
import gtk
import gobject
import dirdiff
import filediff
import filemerge
import paths
from ui import gnomeglade
import misc
from ui import notebooklabel
import preferences
import task
import vcview
from util.sourceviewer import srcviewer
from meldapp import app
from . import dirdiff
from . import filediff
from . import filemerge
from . import misc
from . import paths
from . import preferences
from . import task
from . import vcview
from .ui import gnomeglade
from .ui import notebooklabel
from .util.sourceviewer import srcviewer
from .meldapp import app
################################################################################
#
......
......@@ -15,9 +15,8 @@
### Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
### USA.
import diffutil
import matchers
#from _patiencediff_py import PatienceSequenceMatcher_py as PatienceSequenceMatcher
from . import diffutil
from . import matchers
class AutoMergeDiffer(diffutil.Differ):
......
......@@ -23,10 +23,10 @@ import os
import gtk
import pango
from ui import gnomeglade
import paths
from . import paths
from .ui import gnomeglade
from util.sourceviewer import srcviewer
from .util.sourceviewer import srcviewer
class PatchDialog(gnomeglade.Component):
......
......@@ -21,15 +21,15 @@ from gettext import gettext as _
import gtk
from ui import gnomeglade
from ui import listwidget
import filters
import misc
import paths
from util import prefs
import vc
from util.sourceviewer import srcviewer
from . import filters
from . import misc
from . import paths
from . import vc
from .ui import gnomeglade
from .ui import listwidget
from .util import prefs
from .util.sourceviewer import srcviewer
class FilterList(listwidget.ListWidget):
......
......@@ -16,11 +16,13 @@
### Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
### USA.
import gnomeglade
from meld import paths
from meld import misc
import gtk
import re
from meld import misc
from meld import paths
from . import gnomeglade
from gettext import gettext as _
class FindBar(gnomeglade.Component):
......
import historyentry
import msgarea
import statusbar
from . import historyentry
from . import msgarea
from . import statusbar
import meld.linkmap
import meld.diffmap
import meld.util.sourceviewer
......@@ -114,4 +114,4 @@ def connect_signal_handlers(obj):
' as a signal handler' % (attr,))
import gladesupport
from . import gladesupport
......@@ -17,8 +17,8 @@
### USA.
import gnomeglade
from meld import paths
from . import gnomeglade
class ListWidget(gnomeglade.Component):
......
......@@ -22,7 +22,7 @@ import logging
import gobject
import gtk
from wraplabel import WrapLabel
from .wraplabel import WrapLabel
_logger = logging.getLogger("hotwire.ui.MsgArea")
......
......@@ -23,7 +23,7 @@
import os
import glob
import _null
from . import _null
def load_plugins():
_vcdir = os.path.dirname(os.path.abspath(__file__))
......
......@@ -21,7 +21,7 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import _vc
from . import _vc
class Vc(_vc.Vc):
......
......@@ -22,11 +22,13 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import errno
import _vc
import os
import re
from . import _vc
class Vc(_vc.CachedVc):
CMD = "bzr"
......
......@@ -21,8 +21,9 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import _vc
import svn
from . import _vc
from . import svn
class Vc(svn.Vc):
......
......@@ -25,8 +25,9 @@ import os
from gettext import gettext as _
import re
import time
from meld import misc
import _vc
from . import _vc
class Vc(_vc.Vc):
CMD = "cvs"
......
......@@ -23,7 +23,8 @@
import os
import errno
import _vc
from . import _vc
class Vc(_vc.CachedVc):
......
......@@ -23,9 +23,10 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import _vc
import errno
import os
from . import _vc
class Vc(_vc.CachedVc):
......
......@@ -28,10 +28,12 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import errno
import os
import re
import errno
import _vc
from . import _vc
class Vc(_vc.CachedVc):
......
......@@ -21,9 +21,10 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import errno
import _vc
import os
from . import _vc
class Vc(_vc.CachedVc):
......
......@@ -22,9 +22,11 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import _vc
import errno
import os
from . import _vc
class Vc(_vc.CachedVc):
NAME = "Monotone"
......
......@@ -23,7 +23,9 @@
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import _vc
from . import _vc
class Vc(_vc.Vc):
CMD = "rcs"
......
......@@ -22,7 +22,8 @@
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from meld import misc
import svn
from . import svn
class Vc(svn.Vc):
......
......@@ -21,12 +21,13 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import errno
import os
import re
import errno
import _vc
import xml.etree.ElementTree as ElementTree
from . import _vc
class Vc(_vc.CachedVc):
......
......@@ -21,7 +21,7 @@
### (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import svn
from . import svn
class Vc(svn.Vc):
......
......@@ -21,9 +21,11 @@
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#SOFTWARE.
import os
import errno
import _vc
import os
from . import _vc
# From the Arch manual (kept here for reference)
......
......@@ -24,13 +24,13 @@ from gettext import gettext as _
import gtk
import pango
import tree
import misc
from ui import gnomeglade
import melddoc
import paths
import ui.emblemcellrenderer
import vc
from . import melddoc
from . import misc
from . import paths
from . import tree
from . import vc
from .ui import emblemcellrenderer
from .ui import gnomeglade
################################################################################
#
......@@ -163,7 +163,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
self.treeview.set_search_equal_func(self.treeview_search_cb)
self.current_path, self.prev_path, self.next_path = None, None, None
column = gtk.TreeViewColumn( _("Name") )
renicon = ui.emblemcellrenderer.EmblemCellRenderer()
renicon = emblemcellrenderer.EmblemCellRenderer()
rentext = gtk.CellRendererText()
column.pack_start(renicon, expand=0)
column.pack_start(rentext, expand=1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment