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

  • Committer: Vincent Ladeuil
  • Date: 2008-05-05 18:16:46 UTC
  • mto: (487.1.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: v.ladeuil+lp@free.fr-20080505181646-n95l8ltw2u6jtr26
Fix bug #187283 fix replacing _() by _i18n().

* genpot.sh 
Remove duplication. Add the ability to specify the genrated pot
file on command-line for debugging purposes.

* po/olive-gtk.pot:
Regenerated.

* __init__.py, branch.py, branchview/treeview.py, checkout.py,
commit.py, conflicts.py, diff.py, errors.py, initialize.py,
merge.py, nautilus-bzr.py, olive/__init__.py, olive/add.py,
olive/bookmark.py, olive/guifiles.py, olive/info.py,
olive/menu.py, olive/mkdir.py, olive/move.py, olive/remove.py,
olive/rename.py, push.py, revbrowser.py, status.py, tags.py:
Replace all calls to _() by calls to _i18n(), the latter being
defined in __init__.py and imported in the other modules from
there. This fix the problem encountered countless times when
running bzr selftest and getting silly error messages about
boolean not being callables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
 
18
 
from gi.repository import Gtk
19
 
 
20
 
class RevisionSelectionBox(Gtk.HBox):
21
 
 
 
18
try:
 
19
    import pygtk
 
20
    pygtk.require("2.0")
 
21
except:
 
22
    pass
 
23
 
 
24
import gtk
 
25
 
 
26
class RevisionSelectionBox(gtk.HBox):
22
27
    def __init__(self, branch):
23
28
        super(RevisionSelectionBox, self).__init__()
24
29
        self._branch = branch
25
 
        self._entry_revid = Gtk.Entry()
26
 
        self._button_revid = Gtk.Button('')
27
 
        self._button_revid.set_image(Gtk.Image.new_from_stock(
28
 
            Gtk.STOCK_OPEN, Gtk.IconSize.BUTTON))
 
30
        self._entry_revid = gtk.Entry()
 
31
        self._button_revid = gtk.Button('')
 
32
        self._button_revid.set_image(gtk.image_new_from_stock(
 
33
            gtk.STOCK_OPEN, gtk.ICON_SIZE_BUTTON))
29
34
        self.pack_start(self._entry_revid, True, True)
30
 
        self.pack_start(self._button_revid, False, False)
 
35
        self.pack_start(self._button_revid, False, False) 
31
36
 
32
37
        self._button_revid.connect('clicked', self._on_revid_clicked)
33
38
 
34
39
    def _on_revid_clicked(self, widget):
35
40
        """ Browse for revision button clicked handler. """
36
41
        from revbrowser import RevisionBrowser
37
 
 
 
42
        
38
43
        # FIXME: Should specific parent window here - how to get to it?
39
44
        # JRV 20070715
40
45
        revb = RevisionBrowser(self._branch)
41
46
        response = revb.run()
42
 
        if response != Gtk.ResponseType.NONE:
 
47
        if response != gtk.RESPONSE_NONE:
43
48
            revb.hide()
44
 
 
45
 
            if response == Gtk.ResponseType.OK:
 
49
        
 
50
            if response == gtk.RESPONSE_OK:
46
51
                if revb.selected_revno is not None:
47
52
                    self._entry_revid.set_text(revb.selected_revid)
48
 
 
 
53
            
49
54
            revb.destroy()
50
55
 
51
56
    def get_revision_id(self):