Exemplo n.º 1
0
def update(w):
	setbusy(w)
	icol, irow = w.selection
	if 0 <= icol < len(w.data) and 2 <= irow < len(w.data[icol]):
		selname = w.data[icol][irow][0]
	else:
		selname = ''
	statcache.forget_dir(w.a)
	statcache.forget_dir(w.b)
	tablewin.select(w, (-1, -1))
	tablewin.update(w, diffdata(w.a, w.b, w.flags))
	if selname:
		for icol in range(len(w.data)):
			for irow in range(2, len(w.data[icol])):
				if w.data[icol][irow][0] == selname:
					tablewin.select(w, (icol, irow))
					break
Exemplo n.º 2
0
def update(w):
    setbusy(w)
    icol, irow = w.selection
    if 0 <= icol < len(w.data) and 2 <= irow < len(w.data[icol]):
        selname = w.data[icol][irow][0]
    else:
        selname = ""
    statcache.forget_dir(w.a)
    statcache.forget_dir(w.b)
    tablewin.select(w, (-1, -1))
    tablewin.update(w, diffdata(w.a, w.b, w.flags))
    if selname:
        for icol in range(len(w.data)):
            for irow in range(2, len(w.data[icol])):
                if w.data[icol][irow][0] == selname:
                    tablewin.select(w, (icol, irow))
                    break
Exemplo n.º 3
0
		selname = ''
	statcache.forget_dir(w.a)
	statcache.forget_dir(w.b)
	tablewin.select(w, (-1, -1))
	tablewin.update(w, diffdata(w.a, w.b, w.flags))
	if selname:
		for icol in range(len(w.data)):
			for irow in range(2, len(w.data[icol])):
				if w.data[icol][irow][0] == selname:
					tablewin.select(w, (icol, irow))
					break

# Action functions for table items in directory diff windows

def header_action(w, string, (icol, irow), (pos, clicks, button, mask)):
	tablewin.select(w, (-1, -1))

def a_only_action(w, string, (icol, irow), (pos, clicks, button, mask)):
	tablewin.select(w, (icol, irow))
	if clicks == 2:
		w2 = anyopen(os.path.join(w.a, string))
		if w2:
			w2.parent = w

def b_only_action(w, string, (icol, irow), (pos, clicks, button, mask)):
	tablewin.select(w, (icol, irow))
	if clicks == 2:
		w2 = anyopen(os.path.join(w.b, string))
		if w2:
			w2.parent = w
Exemplo n.º 4
0
    statcache.forget_dir(w.b)
    tablewin.select(w, (-1, -1))
    tablewin.update(w, diffdata(w.a, w.b, w.flags))
    if selname:
        for icol in range(len(w.data)):
            for irow in range(2, len(w.data[icol])):
                if w.data[icol][irow][0] == selname:
                    tablewin.select(w, (icol, irow))
                    break


# Action functions for table items in directory diff windows


def header_action(w, string, (icol, irow), (pos, clicks, button, mask)):
    tablewin.select(w, (-1, -1))


def a_only_action(w, string, (icol, irow), (pos, clicks, button, mask)):
    tablewin.select(w, (icol, irow))
    if clicks == 2:
        w2 = anyopen(os.path.join(w.a, string))
        if w2:
            w2.parent = w


def b_only_action(w, string, (icol, irow), (pos, clicks, button, mask)):
    tablewin.select(w, (icol, irow))
    if clicks == 2:
        w2 = anyopen(os.path.join(w.b, string))
        if w2: