/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 annotate/spanselector.py

  • Committer: Curtis Hovey
  • Date: 2011-07-31 15:52:43 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110731155243-ln8istmxbryhb4pz
Mechanical changes made by pygi.convert.sh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
 
18
import pygtk
 
19
pygtk.require("2.0")
18
20
from gi.repository import GObject
19
21
from gi.repository import Gtk
20
22
 
39
41
    last_selected = None
40
42
 
41
43
    def __init__(self, homogeneous=False, spacing=6):
42
 
        super(SpanSelector, self).__init__(
43
 
            homogeneous=homogeneous, spacing=spacing)
 
44
        GObject.GObject.__init__(self, homogeneous, spacing)
44
45
 
45
46
        self.model = self._create_model()
46
47
        self.combo = self._create_combobox(self.model)
49
50
        label = Gtk.Label(label="Highlighting spans:")
50
51
        label.show()
51
52
 
52
 
        self.pack_start(label, False, True, True, 0)
53
 
        self.pack_start(self.combo, False, False, True, 0)
54
 
        self.pack_start(self.entry, False, False, True, 0)
 
53
        self.pack_start(label, expand=False, fill=True)
 
54
        self.pack_start(self.combo, expand=False, fill=False)
 
55
        self.pack_start(self.entry, expand=False, fill=False)
55
56
 
56
57
    def set_to_oldest_span(self, span):
57
58
        """Set the span associated with the "to Oldest Revision" entry."""
99
100
            self.emit("span-changed", model.get_value(iter, SPAN_DAYS_COL))
100
101
 
101
102
    def _activate_custom_span_cb(self, w):
102
 
        self.entry.hide()
 
103
        self.entry.hide_all()
103
104
        self.combo.show()
104
105
 
105
106
        span = float(w.get_text())
179
180
 
180
181
        label = Gtk.Label(label="Days")
181
182
 
182
 
        entry.pack_start(spin, False, False, True, 0)
183
 
        entry.pack_start(label, False, False, True, 0)
 
183
        entry.pack_start(spin, expand=False, fill=False)
 
184
        entry.pack_start(label, expand=False, fill=False)
184
185
 
185
186
        return entry
186
187