/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: 2008-06-29 22:44:42 UTC
  • mfrom: (511.7.1 trunk)
  • Revision ID: jelmer@samba.org-20080629224442-9k97spjgoq0ois28
Remove obsolete tortoisebzr tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from bzrlib.plugins.gtk.tags import AddTagDialog
19
19
from bzrlib.plugins.gtk.preferences import PreferencesWindow
20
20
from bzrlib.plugins.gtk.branchview import TreeView, treemodel
 
21
 
 
22
from bzrlib.config import BranchConfig, GlobalConfig
21
23
from bzrlib.revision import Revision, NULL_REVISION
22
 
from bzrlib.config import BranchConfig
23
 
from bzrlib.config import GlobalConfig
 
24
from bzrlib.trace import mutter
24
25
 
25
26
class BranchWindow(Window):
26
27
    """Branch window.
228
229
        branch_menu.add(gtk.MenuItem("Pu_ll Revisions"))
229
230
        branch_menu.add(gtk.MenuItem("Pu_sh Revisions"))
230
231
 
 
232
        try:
 
233
            from bzrlib.plugins import search
 
234
        except ImportError:
 
235
            mutter("Didn't find search plugin")
 
236
        else:
 
237
            branch_index_menuitem = gtk.MenuItem("_Index")
 
238
            branch_index_menuitem.connect('activate', self._branch_index_cb)
 
239
            branch_menu.add(branch_index_menuitem)
 
240
 
231
241
        help_menu = gtk.Menu()
232
242
        help_menuitem = gtk.MenuItem("_Help")
233
243
        help_menuitem.set_submenu(help_menu)
456
466
        finally:
457
467
            self.treeview.set_sensitive(True)
458
468
 
 
469
    def _branch_index_cb(self, w):
 
470
        from bzrlib.plugins.search import index as _mod_index
 
471
        _mod_index.index_url(self.branch.base)
 
472
 
459
473
    def _about_dialog_cb(self, w):
460
474
        from bzrlib.plugins.gtk.about import AboutDialog
461
475