/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: 2011-10-30 08:33:37 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: jelmer@samba.org-20111030083337-lp4rzqurtktxr2l8
Fix number of arguments to gtk.Menu.popup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
    """Implementation of Commit."""
109
109
 
110
110
    def __init__(self, wt, selected=None, parent=None):
111
 
        Gtk.Dialog.__init__(self, title="Commit to %s" % wt.basedir,
112
 
                            parent=parent, flags=0,)
 
111
        super(CommitDialog, self).__init__(
 
112
            title="Commit to %s" % wt.basedir, parent=parent, flags=0)
113
113
        self.connect('delete-event', self._on_delete_window)
114
114
        self._question_dialog = question_dialog
115
115
 
228
228
        # This sets the cursor, which causes the expander to close, which
229
229
        # causes the _file_message_text_view to never get realized. So we have
230
230
        # to give it a little kick, or it warns when we try to grab the focus
231
 
        self._treeview_files.set_cursor(initial_cursor, None, None)
 
231
        self._treeview_files.set_cursor(initial_cursor, None, False)
232
232
 
233
233
        def _realize_file_message_tree_view(*args):
234
234
            self._file_message_text_view.realize()
389
389
        # file_label.show()
390
390
        self._files_box.pack_start(file_label, False, True, 0)
391
391
 
392
 
        self._commit_all_files_radio = Gtk.RadioButton(
 
392
        self._commit_all_files_radio = Gtk.RadioButton.new_with_label(
393
393
            None, _i18n("Commit all changes"))
394
394
        self._files_box.pack_start(self._commit_all_files_radio, False, True, 0)
395
395
        self._commit_all_files_radio.show()
396
396
        self._commit_all_files_radio.connect('toggled',
397
397
            self._toggle_commit_selection)
398
 
        self._commit_selected_radio = Gtk.RadioButton(
 
398
        self._commit_selected_radio = Gtk.RadioButton.new_with_label_from_widget(
399
399
            self._commit_all_files_radio, _i18n("Only commit selected changes"))
400
400
        self._files_box.pack_start(self._commit_selected_radio, False, True, 0)
401
401
        self._commit_selected_radio.show()
464
464
                checked_col.set_visible(False)
465
465
            else:
466
466
                checked_col.set_visible(True)
467
 
            renderer = checked_col.get_cell_renderers()[0]
 
467
            renderer = checked_col.get_cells()[0]
468
468
            renderer.set_property('activatable', not all_files)
469
469
 
470
470
    def _construct_pending_list(self):
596
596
            # We have either made it to the end of the list, or nothing was
597
597
            # selected. Either way, select All Files, and jump to the global
598
598
            # commit message.
599
 
            self._treeview_files.set_cursor((0,))
 
599
            self._treeview_files.set_cursor(
 
600
                Gtk.TreePath(path=0), None, False)
600
601
            self._global_message_text_view.grab_focus()
601
602
        else:
602
603
            # Set the cursor to this entry, and jump to the per-file commit
603
604
            # message
604
 
            self._treeview_files.set_cursor(model.get_path(next))
 
605
            self._treeview_files.set_cursor(model.get_path(next), None, False)
605
606
            self._file_message_text_view.grab_focus()
606
607
 
607
608
    def _save_current_file_message(self):