| 1 | # -*- coding: utf-8 -*- |
| 2 | # |
| 3 | # QBrz - Qt frontend to Breezy commands |
| 4 | # Copyright (C) 2009 Alexander Belchenko |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or |
| 7 | # modify it under the terms of the GNU General Public License |
| 8 | # as published by the Free Software Foundation; either version 2 |
| 9 | # of the License, or (at your option) any later version. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU General Public License |
| 17 | # along with this program; if not, write to the Free Software |
| 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | |
| 20 | """Simple GUI for `bzr update` command for updating out-of-date working tree |
| 21 | of a branch. |
| 22 | """ |
| 23 | |
| 24 | from breezy.plugins.qbrz.lib.i18n import gettext |
| 25 | from breezy.plugins.qbrz.lib.subprocess import SimpleSubProcessDialog |
| 26 | |
| 27 | |
| 28 | class QBzrUpdateWindow(SimpleSubProcessDialog): |
| 29 | |
| 30 | def __init__(self, tree, ui_mode=True, immediate=False, parent=None): |
| 31 | self.tree = tree |
| 32 | super(QBzrUpdateWindow, self).__init__( |
| 33 | title=gettext("Update working tree"), |
| 34 | desc=gettext("Update tree %s") % tree.basedir, |
| 35 | name="update", |
| 36 | args=["update"], |
| 37 | dir=self.tree.basedir, |
| 38 | default_size=(256, 256), |
| 39 | ui_mode=ui_mode, |
| 40 | parent=parent, |
| 41 | immediate=immediate, |
| 42 | ) |