71 |
71 |
72 @param eventDict dictionary containing the notification event |
72 @param eventDict dictionary containing the notification event |
73 """ |
73 """ |
74 msg = "" |
74 msg = "" |
75 if eventDict["action"] == pysvn.wc_notify_action.update_completed: |
75 if eventDict["action"] == pysvn.wc_notify_action.update_completed: |
76 msg = self.trUtf8("Revision {0}.\n").format(eventDict["revision"].number) |
76 msg = self.trUtf8("Revision {0}.\n").format( |
|
77 eventDict["revision"].number) |
77 elif eventDict["path"] != "" and \ |
78 elif eventDict["path"] != "" and \ |
78 eventDict["action"] in svnNotifyActionMap and \ |
79 eventDict["action"] in svnNotifyActionMap and \ |
79 svnNotifyActionMap[eventDict["action"]] is not None: |
80 svnNotifyActionMap[eventDict["action"]] is not None: |
80 mime = eventDict["mime_type"] == "application/octet-stream" and \ |
81 mime = eventDict["mime_type"] == "application/octet-stream" and \ |
81 self.trUtf8(" (binary)") or "" |
82 self.trUtf8(" (binary)") or "" |
83 .format(self.trUtf8(svnNotifyActionMap[eventDict["action"]]), |
84 .format(self.trUtf8(svnNotifyActionMap[eventDict["action"]]), |
84 eventDict["path"], |
85 eventDict["path"], |
85 mime) |
86 mime) |
86 if '.e4p' in eventDict["path"]: |
87 if '.e4p' in eventDict["path"]: |
87 self.__hasAddOrDelete = True |
88 self.__hasAddOrDelete = True |
88 if eventDict["action"] in \ |
89 if eventDict["action"] in [pysvn.wc_notify_action.add, |
89 [pysvn.wc_notify_action.add, pysvn.wc_notify_action.commit_added, |
90 pysvn.wc_notify_action.commit_added, |
90 pysvn.wc_notify_action.commit_deleted, pysvn.wc_notify_action.delete, |
91 pysvn.wc_notify_action.commit_deleted, |
91 pysvn.wc_notify_action.update_add, pysvn.wc_notify_action.update_delete]: |
92 pysvn.wc_notify_action.delete, |
|
93 pysvn.wc_notify_action.update_add, |
|
94 pysvn.wc_notify_action.update_delete]: |
92 self.__hasAddOrDelete = True |
95 self.__hasAddOrDelete = True |
93 if msg: |
96 if msg: |
94 self.showMessage(msg) |
97 self.showMessage(msg) |
95 |
98 |
96 def showMessage(self, msg): |
99 def showMessage(self, msg): |
114 self.errors.ensureCursorVisible() |
117 self.errors.ensureCursorVisible() |
115 QApplication.processEvents() |
118 QApplication.processEvents() |
116 |
119 |
117 def finish(self): |
120 def finish(self): |
118 """ |
121 """ |
119 Public slot called when the process finished or the user pressed the button. |
122 Public slot called when the process finished or the user pressed the |
|
123 button. |
120 """ |
124 """ |
121 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
125 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
122 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
126 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
123 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
127 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
124 |
128 |