/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: rodney.dawes at canonical
  • Date: 2008-10-25 06:02:09 UTC
  • Revision ID: rodney.dawes@canonical.com-20081025060209-irlizouino63cs1m
        * preferences/__init__.py:
        Remove the dialog separator
        Remove useless extra call to self._create_pages()
        Make the default window size smaller
        Set the default border width on various widgets
        Set the current notebook page to the first one

        * preferences/identity.py:
        Set various border widths appropriately
        Align the labels to the left
        Remove the unneeded bold markup from the labels
        Change the "User Id" label to "E-Mail"
        Align the radio group labels to the top of the groups

        * preferences/plugins.py:
        Set various border widths appropriately
        Set the default paned position to something more sensible
        Set the shadow type on the treeview's scrolled window to in
        Align the Author and Version labels to the left

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):