/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-07-01 15:28:30 UTC
  • Revision ID: jelmer@samba.org-20080701152830-bjpita4i0eq69jt0
Remove partial completion support, since I can't find the required functionality in pygtk.

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_menu.add(gtk.SeparatorMenuItem())
 
238
 
 
239
            branch_index_menuitem = gtk.MenuItem("_Index")
 
240
            branch_index_menuitem.connect('activate', self._branch_index_cb)
 
241
            branch_menu.add(branch_index_menuitem)
 
242
 
 
243
            branch_search_menuitem = gtk.MenuItem("_Search")
 
244
            branch_search_menuitem.connect('activate', self._branch_search_cb)
 
245
            branch_menu.add(branch_search_menuitem)
 
246
 
231
247
        help_menu = gtk.Menu()
232
248
        help_menuitem = gtk.MenuItem("_Help")
233
249
        help_menuitem.set_submenu(help_menu)
456
472
        finally:
457
473
            self.treeview.set_sensitive(True)
458
474
 
 
475
    def _branch_index_cb(self, w):
 
476
        from bzrlib.plugins.search import index as _mod_index
 
477
        _mod_index.index_url(self.branch.base)
 
478
 
 
479
    def _branch_search_cb(self, w):
 
480
        from bzrlib.plugins.gtk.search import SearchDialog
 
481
        dialog = SearchDialog(self.branch)
 
482
        
 
483
        if dialog.run() == gtk.RESPONSE_OK:
 
484
            self.set_revision(dialog.get_revision())
 
485
 
 
486
        dialog.destroy()
 
487
 
459
488
    def _about_dialog_cb(self, w):
460
489
        from bzrlib.plugins.gtk.about import AboutDialog
461
490