/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/window.py

  • Committer: Jasper Groenewegen
  • Date: 2008-08-03 10:07:38 UTC
  • mto: This revision was merged to the branch mainline in revision 586.
  • Revision ID: colbrac@xs4al.nl-20080803100738-781zl95up0mkiali
Improvements to path changes in Olive

Fix bug 229044 by adding PermissionDenied error check
Move creation of locationbar icon to window.py
Allow for locationbar icon to be a button so dialogs can be connected
Add info dialog to PermissionDenied error
Rework refresh_right to not double check paths and handle lock 
exceptions

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
19
import os
 
20
import sys
20
21
import gtk
21
22
import gobject
22
23
 
338
339
        self.entry_location.connect("activate", self.signal.on_button_location_jump_clicked)
339
340
        self.locationbar.pack_start(self.entry_location, True, True, 0)
340
341
        
341
 
        self.image_location_error = gtk.Image()
342
 
        self.image_location_error.set_from_stock(gtk.STOCK_DIALOG_ERROR, gtk.ICON_SIZE_BUTTON)
343
 
        self.locationbar.pack_start(self.image_location_error, False, False, 0)
 
342
        self.location_status = gtk.Image()
 
343
        self.location_status.set_from_stock(gtk.STOCK_DIALOG_ERROR, gtk.ICON_SIZE_BUTTON)
 
344
        self.locationbar.pack_start(self.location_status, False, False, 0)
344
345
        
345
346
        self.button_location_jump = gtk.Button(stock=gtk.STOCK_JUMP_TO)
346
347
        self.button_location_jump.set_relief(gtk.RELIEF_NONE)
517
518
        self.tb_pull.set_sensitive(False)
518
519
        self.tb_push.set_sensitive(False)
519
520
        self.tb_update.set_sensitive(False)
 
521
    
 
522
    def set_location_status(self, stock_id, allowPopup=False):
 
523
        self.location_status.destroy()
 
524
        if allowPopup:
 
525
            self.location_status = gtk.Button()
 
526
            self.location_status.set_relief(gtk.RELIEF_NONE)
 
527
            image = gtk.image_new_from_stock(stock_id, gtk.ICON_SIZE_BUTTON)
 
528
            image.show()
 
529
            self.location_status.add(image)
 
530
        else:
 
531
            self.location_status = gtk.image_new_from_stock(stock_id, gtk.ICON_SIZE_BUTTON)
 
532
        self.locationbar.pack_start(self.location_status, False, False, 0)
 
533
        if sys.platform == 'win32':
 
534
            self.locationbar.reorder_child(self.location_status, 2)
 
535
        else:
 
536
            self.locationbar.reorder_child(self.location_status, 1)
 
537
        self.location_status.show()