/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 olive/menu.py

  • Committer: Jelmer Vernooij
  • Date: 2008-06-29 16:20:15 UTC
  • mto: This revision was merged to the branch mainline in revision 519.
  • Revision ID: jelmer@samba.org-20080629162015-amhe7xj4cdmup4id
Rename GtkProgressBarStack to GtkWindowProgressBarStack

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
from bzrlib.plugins.gtk.annotate.gannotate import GAnnotateWindow
37
37
from bzrlib.plugins.gtk.annotate.config import GAnnotateConfig
38
38
from bzrlib.plugins.gtk.diff import DiffWindow
39
 
from bzrlib.plugins.gtk.olive import Preferences, launch
 
39
from launch import launch
 
40
from bzrlib.plugins.gtk.olive import Preferences
40
41
 
41
42
class OliveMenu:
42
43
    """ This class is responsible for building the context menus. """
178
179
                         _i18n('Please select a file from the list,\nor choose the other option.'))
179
180
            return
180
181
        
181
 
        wt, path = WorkingTree.open_containing(os.path.join(directory, filename))
182
 
        wt.add([path])
183
 
        
184
 
        self.app.refresh_right()
 
182
        bzrlib.add.smart_add([os.path.join(directory, filename)])
185
183
    
186
184
    @show_bzr_error
187
185
    def annotate(self, action):
261
259
            # TODO: how to enter a directory?
262
260
            return
263
261
        else:
264
 
            fullpath = os.path.join(self.path, filename)
 
262
            fullpath = self.path + os.sep + filename
265
263
            if os.path.isdir(fullpath):
266
264
                # selected item is an existant directory
267
265
                # TODO: how to enter a directory?
268
 
                # Jasper, 21-7-08: Let's just open the folder in a file browser
269
 
                # instead of ignoring the explicit open (when double
270
 
                # clicking suffices for browsing)
271
 
                launch.launch(fullpath)
 
266
                return
272
267
            else:
273
 
                launch.launch(fullpath) 
 
268
                launch(fullpath) 
274
269
 
275
270
    def revert(self, action):
276
271
        """ Right context menu -> Revert """
360
355
        path = self.selected
361
356
 
362
357
        if path != None:
363
 
            launch.launch(path)
 
358
            launch(path)
364
359
    
365
360
    def diff_selected(self, action):
366
361
        """ Diff toolbutton -> Selected... """