/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 viz/branchwin.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-15 00:15:25 UTC
  • mto: This revision was merged to the branch mainline in revision 731.
  • Revision ID: jelmer@samba.org-20110415001525-b0oczerhvr9sc07o
Fix some formatting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
        go_menu.add(gtk.SeparatorMenuItem())
269
269
        go_menu.add(self.go_menu_tags)
270
270
 
271
 
        self.revision_menu = RevisionMenu(self.branch.repository, [], self.branch, parent=self)
 
271
        self.revision_menu = RevisionMenu(self.branch.repository, [],
 
272
            self.branch, parent=self)
272
273
        revision_menuitem = gtk.MenuItem("_Revision")
273
274
        revision_menuitem.set_submenu(self.revision_menu)
274
275
 
298
299
        help_menuitem = gtk.MenuItem("_Help")
299
300
        help_menuitem.set_submenu(help_menu)
300
301
 
301
 
        help_about_menuitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT, self.accel_group)
 
302
        help_about_menuitem = gtk.ImageMenuItem(gtk.STOCK_ABOUT,
 
303
            self.accel_group)
302
304
        help_about_menuitem.connect('activate', self._about_dialog_cb)
303
305
 
304
306
        help_menu.add(help_about_menuitem)
318
320
        """Construct the top-half of the window."""
319
321
        # FIXME: Make broken_line_length configurable
320
322
 
321
 
        self.treeview = TreeView(self.branch, self.start_revs, self.maxnum, self.compact_view)
 
323
        self.treeview = TreeView(self.branch, self.start_revs, self.maxnum,
 
324
            self.compact_view)
322
325
 
323
326
        for col in ["revno", "date"]:
324
327
            option = self.config.get_user_option(col + '-column-visible')
325
328
            if option is not None:
326
 
                self.treeview.set_property(col + '-column-visible', option == 'True')
 
329
                self.treeview.set_property(col + '-column-visible',
 
330
                    option == 'True')
327
331
            else:
328
332
                self.treeview.set_property(col + '-column-visible', False)
329
333
 
387
391
        self.revisionview.show()
388
392
        self.revisionview.set_show_callback(self._show_clicked_cb)
389
393
        self.revisionview.connect('notify::revision', self._go_clicked_cb)
390
 
        self.treeview.connect('tag-added', lambda w, t, r: self.revisionview.update_tags())
 
394
        self.treeview.connect('tag-added',
 
395
            lambda w, t, r: self.revisionview.update_tags())
391
396
        self.diff_paned.pack1(self.revisionview)
392
397
 
393
398
        from bzrlib.plugins.gtk.diff import DiffWidget
419
424
                    if parent_id and parent_id != NULL_REVISION:
420
425
                        parent = self.branch.repository.get_revision(parent_id)
421
426
                        try:
422
 
                            str = ' (' + parent.properties['branch-nick'] + ')'
 
427
                            str = ' (%s)' % parent.properties['branch-nick']
423
428
                        except KeyError:
424
429
                            str = ""
425
430
 
440
445
                for child_id in children:
441
446
                    child = self.branch.repository.get_revision(child_id)
442
447
                    try:
443
 
                        str = ' (' + child.properties['branch-nick'] + ')'
 
448
                        str = ' (%s)' % child.properties['branch-nick']
444
449
                    except KeyError:
445
450
                        str = ""
446
451
 
511
516
        _mod_index.index_url(self.branch.base)
512
517
 
513
518
    def _branch_search_cb(self, w):
514
 
        from bzrlib.plugins.search import index as _mod_index
 
519
        from bzrlib.plugins.search import (
 
520
            index as _mod_index,
 
521
            errors as search_errors,
 
522
            )
515
523
        from bzrlib.plugins.gtk.search import SearchDialog
516
 
        from bzrlib.plugins.search import errors as search_errors
517
524
 
518
525
        try:
519
526
            index = _mod_index.open_index_url(self.branch.base)