Exemplo n.º 1
0
def newly_active(self):
    cb = ContentBook()
    cv = content_view(service=None, prefix='view')
    cb.add(cv)
    cv = content_view(service=None, prefix='view')
    cb.add(cv)
    assert_equal(cb.get_current_page(), 1)
Exemplo n.º 2
0
def newly_active(self):
    cb = ContentBook()
    cv = content_view(service=None, prefix="view")
    cb.add(cv)
    cv = content_view(service=None, prefix="view")
    cb.add(cv)
    assert_equal(cb.get_current_page(), 1)
Exemplo n.º 3
0
def cycle(self):
    cb = ContentBook()
    cv = content_view(service=None, prefix="view")
    cb.add(cv)
    cv = content_view(service=None, prefix="view")
    cb.add(cv)
    assert_equal(cb.get_current_page(), 1)
    cb.next_page()
    assert_equal(cb.get_current_page(), 0)
    cb.prev_page()
    assert_equal(cb.get_current_page(), 1)
Exemplo n.º 4
0
def cycle(self):
    cb = ContentBook()
    cv = content_view(service=None, prefix='view')
    cb.add(cv)
    cv = content_view(service=None, prefix='view')
    cb.add(cv)
    assert_equal(cb.get_current_page(), 1)
    cb.next_page()
    assert_equal(cb.get_current_page(), 0)
    cb.prev_page()
    assert_equal(cb.get_current_page(), 1)
Exemplo n.º 5
0
def cv(boss):
    svc = boss.get_service('window')
    t = Tree()
    v = content_view(service=svc, prefix='test', widget=t)
    svc.call('append_page', bookname='view', view=v)
    v.show_all()
    return svc, v, t
Exemplo n.º 6
0
def cv(boss):
    svc = boss.get_service('window')
    t = Tree()
    v = content_view(service=svc, prefix='test', widget=t)
    svc.call('append_page', bookname='view', view=v)
    v.show_all()
    return svc, v, t
Exemplo n.º 7
0
def remove(self):
    cv = content_view(service=None, prefix="view")
    cb = ContentBook()
    cb.add(cv)
    assert_equal(cb.get_n_pages(), 1)
    assert_equal(cb.has_uid(cv.unique_id), True)
    cb.remove_view(cv)
    assert_equal(cb.get_n_pages(), 0)
    assert_equal(cb.has_uid(cv.unique_id), False)
Exemplo n.º 8
0
def empty(self):
    cb = ContentBook()
    cv = content_view(service=None, prefix='view')
    cb.add(cv)

    def _e(cb):
        pass

    cb.connect('empty', _e)
Exemplo n.º 9
0
def remove(self):
    cv = content_view(service=None, prefix='view')
    cb = ContentBook()
    cb.add(cv)
    assert_equal(cb.get_n_pages(), 1)
    assert_equal(cb.has_uid(cv.unique_id), True)
    cb.remove_view(cv)
    assert_equal(cb.get_n_pages(), 0)
    assert_equal(cb.has_uid(cv.unique_id), False)
Exemplo n.º 10
0
def empty(self):
    cb = ContentBook()
    cv = content_view(service=None, prefix="view")
    cb.add(cv)

    def _e(cb):
        pass

    cb.connect("empty", _e)
Exemplo n.º 11
0
def icon(self):
    cv = content_view(service=None, prefix="svcprefix", icon_name="gtk-close")
    i1 = cv.icon
    i2 = cv.icon
    assert_notequal(i1, i2)
    assert_equal(isinstance(i1, gtk.Image), True)
Exemplo n.º 12
0
def icon_name(self):
    cv = content_view(service=None, prefix="svcprefix", icon_name="gtk-close")
    assert_equal(cv.icon_name, "gtk-close")
Exemplo n.º 13
0
def short_title_init(self):
    cv = content_view(service=None, prefix="svcprefix", short_title="short")
    assert_equal(cv.short_title, "short")
Exemplo n.º 14
0
def icon_name(self):
    cv = content_view(service=None, prefix='svcprefix', icon_name='gtk-close')
    assert_equal(cv.icon_name, 'gtk-close')
Exemplo n.º 15
0
def _cv():
    return content_view(service=None, prefix='svcprefix')
Exemplo n.º 16
0
def icon(self):
    cv = content_view(service=None, prefix='svcprefix', icon_name='gtk-close')
    i1 = cv.icon
    i2 = cv.icon
    assert_notequal(i1, i2)
    assert_equal(isinstance(i1, gtk.Image), True)
Exemplo n.º 17
0
def _cv():
    return content_view(service=None, prefix="svcprefix")
Exemplo n.º 18
0
def short_title_init(self):
    cv = content_view(service=None, prefix='svcprefix', short_title='short')
    assert_equal(cv.short_title, 'short')