/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to commit.py

  • Committer: Jelmer Vernooij
  • Date: 2008-06-29 18:12:29 UTC
  • mto: This revision was merged to the branch mainline in revision 519.
  • Revision ID: jelmer@samba.org-20080629181229-1l2m4cf7vvbyh8qg
Simplify progress bar code, use embedded progress bar inside viz window.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
import os.path
18
 
import re
19
 
 
20
17
try:
21
18
    import pygtk
22
19
    pygtk.require("2.0")
27
24
import gobject
28
25
import pango
29
26
 
 
27
import os.path
 
28
import re
 
29
 
30
30
from bzrlib import errors, osutils
31
31
from bzrlib.trace import mutter
32
32
from bzrlib.util import bencode
33
33
 
34
34
from bzrlib.plugins.gtk import _i18n
35
 
from bzrlib.plugins.gtk.dialog import question_dialog
36
 
from bzrlib.plugins.gtk.errors import show_bzr_error
 
35
from dialog import error_dialog, question_dialog
 
36
from errors import show_bzr_error
37
37
 
38
38
try:
39
39
    import dbus
101
101
    """Implementation of Commit."""
102
102
 
103
103
    def __init__(self, wt, selected=None, parent=None):
104
 
        gtk.Dialog.__init__(self, title="Commit to %s" % wt.basedir,
 
104
        gtk.Dialog.__init__(self, title="Commit - Olive",
105
105
                                  parent=parent,
106
106
                                  flags=0,
107
 
                                  buttons=(gtk.STOCK_CANCEL,
108
 
                                           gtk.RESPONSE_CANCEL))
 
107
                                  buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
109
108
        self._question_dialog = question_dialog
110
109
 
111
110
        self._wt = wt
654
653
        if message == '':
655
654
            response = self._question_dialog(
656
655
                _i18n('Commit with an empty message?'),
657
 
                _i18n('You can describe your commit intent in the message.'),
658
 
                parent=self)
 
656
                _i18n('You can describe your commit intent in the message.'))
659
657
            if response == gtk.RESPONSE_NO:
660
658
                # Kindly give focus to message area
661
659
                self._global_message_text_view.grab_focus()
675
673
        for path in self._wt.unknowns():
676
674
            response = self._question_dialog(
677
675
                _i18n("Commit with unknowns?"),
678
 
                _i18n("Unknown files exist in the working tree. Commit anyway?"),
679
 
                parent=self)
680
 
                # Doesn't set a parent for the dialog..
 
676
                _i18n("Unknown files exist in the working tree. Commit anyway?"))
681
677
            if response == gtk.RESPONSE_NO:
682
678
                return
683
679
            break
697
693
            response = self._question_dialog(
698
694
                _i18n('Commit with no changes?'),
699
695
                _i18n('There are no changes in the working tree.'
700
 
                      ' Do you want to commit anyway?'),
701
 
                parent=self)
 
696
                      ' Do you want to commit anyway?'))
702
697
            if response == gtk.RESPONSE_YES:
703
698
                rev_id = self._wt.commit(message,
704
699
                               allow_pointless=True,