44
44
model.tags = global_model.tags
45
45
model.remotes = global_model.remotes
46
46
parent = qtutils.active_window()
47
view = RemoteDialog(model, parent)
47
view = RemoteDialog(model, parent=parent)
118
118
class RemoteActionDialog(standard.Dialog):
120
def __init__(self, model, action, parent):
120
def __init__(self, model, action, parent=None):
121
121
"""Customizes the dialog based on the remote action
123
123
standard.Dialog.__init__(self, parent=parent)
128
128
self.selected_remotes = []
130
130
self.setAttribute(Qt.WA_MacMetalStyle)
131
self.setWindowModality(Qt.WindowModal)
132
131
self.setWindowTitle(N_(action))
132
if parent is not None:
133
self.setWindowModality(Qt.WindowModal)
134
135
self.progress = QtGui.QProgressDialog(self)
135
136
self.progress.setFont(qtutils.diff_font())
546
547
# Use distinct classes so that each saves its own set of preferences
547
548
class Fetch(RemoteActionDialog):
548
def __init__(self, model, parent):
549
RemoteActionDialog.__init__(self, model, FETCH, parent)
549
def __init__(self, model, parent=None):
550
RemoteActionDialog.__init__(self, model, FETCH, parent=parent)
552
553
class Push(RemoteActionDialog):
553
def __init__(self, model, parent):
554
RemoteActionDialog.__init__(self, model, PUSH, parent)
554
def __init__(self, model, parent=None):
555
RemoteActionDialog.__init__(self, model, PUSH, parent=parent)
557
558
class Pull(RemoteActionDialog):
558
def __init__(self, model, parent):
559
RemoteActionDialog.__init__(self, model, PULL, parent)
559
def __init__(self, model, parent=None):
560
RemoteActionDialog.__init__(self, model, PULL, parent=parent)
561
562
def apply_state(self, state):
562
RemoteActionDialog.apply_state(self, state)
563
result = RemoteActionDialog.apply_state(self, state)
564
565
rebase = state['rebase']
568
569
self.rebase_checkbox.setChecked(rebase)
570
572
def export_state(self):
571
573
state = RemoteActionDialog.export_state(self)