本文整理汇总了Python中efl.elementary.table.Table.pack方法的典型用法代码示例。如果您正苦于以下问题:Python Table.pack方法的具体用法?Python Table.pack怎么用?Python Table.pack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.table.Table
的用法示例。
在下文中一共展示了Table.pack方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: video_clicked
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def video_clicked(obj):
win = StandardWindow("video", "video", autodel=True, size=(800, 600))
win.alpha = True # Needed to turn video fast path on
video = Video(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(video)
video.show()
player = Player(win, content=video)
player.show()
notify = Notify(win, orient=ELM_NOTIFY_ORIENT_BOTTOM, timeout=3.0)
notify.content = player
tb = Table(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(tb)
bt = FileselectorButton(win, text="Select Video",
size_hint_weight=EXPAND_BOTH, size_hint_align=(0.5, 0.1))
bt.callback_file_chosen_add(my_bt_open, video)
tb.pack(bt, 0, 0, 1, 1)
bt.show()
tb.show()
video.event_callback_add(EVAS_CALLBACK_MOUSE_MOVE, notify_show, notify)
video.event_callback_add(EVAS_CALLBACK_MOUSE_IN, notify_block, notify)
video.event_callback_add(EVAS_CALLBACK_MOUSE_OUT, notify_unblock, notify)
win.show()
示例2: photo_clicked
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def photo_clicked(obj):
win = StandardWindow("photo", "Photo test", autodel=True, size=(300, 300))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
elementary.need_ethumb()
tb = Table(win, size_hint_weight=EXPAND_BOTH)
tb.show()
sc = Scroller(win, size_hint_weight=EXPAND_BOTH, content=tb)
win.resize_object_add(sc)
sc.show()
n = 0
for j in range(12):
for i in range(12):
ph = Photo(win, aspect_fixed=False, size=80, editable=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
name = os.path.join(img_path, images[n])
n += 1
if n >= 9: n = 0
if n == 8:
ph.thumb = name
else:
ph.file = name
if n in [2, 3]:
ph.fill_inside = True
ph.style = "shadow"
tb.pack(ph, i, j, 1, 1)
ph.show()
win.show()
示例3: table5_clicked
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def table5_clicked(obj, item=None):
win = StandardWindow("table5", "Table 5", autodel=True)
tb = Table(win, homogeneous=True, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(tb)
tb.show()
bt = Button(win, text="A", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 33, 0, 34, 33)
bt.show()
bt = Button(win, text="B", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 67, 33, 33, 34)
bt.show()
bt = Button(win, text="C", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 33, 67, 34, 33)
bt.show()
bt = Button(win, text="D", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 0, 33, 33, 34)
bt.show()
bt = Button(win, text="X", size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_BOTH)
tb.pack(bt, 33, 33, 34, 34)
bt.show()
win.show()
示例4: __init__
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def __init__(self, parent, session):
Frame.__init__(self, parent)
self.text = "Limits"
self.size_hint_align = FILL_HORIZ
base = 1024
units = ( "bytes/s", "KiB/s", "MiB/s", "GiB/s", "TiB/s" )
t = Table(parent)
for r, values in enumerate((
("Upload limit", session.upload_rate_limit, session.set_upload_rate_limit),
("Download limit", session.download_rate_limit, session.set_download_rate_limit),
("Upload limit for local connections", session.local_upload_rate_limit, session.set_local_upload_rate_limit),
("Download limit for local connections", session.local_download_rate_limit, session.set_local_download_rate_limit),
)):
title, rfunc, wfunc = values
l = Label(parent)
l.text = title
l.size_hint_align = FILL_HORIZ
t.pack(l, 0, r, 1, 1)
l.show()
usw = UnitSpinner(parent, base, units)
usw.size_hint_weight = EXPAND_HORIZ
usw.size_hint_align = FILL_HORIZ
usw.set_value(rfunc())
usw.callback_changed_add(wfunc, delay=2.0)
t.pack(usw, 1, r, 1, 1)
usw.show()
self.content = t
示例5: __init__
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def __init__(self, win, url=None):
Popup.__init__(self, win)
self.win = win
# title
self.part_text_set('title,text', 'Recent Repositories')
ic = Icon(self, file=theme_resource_get('egitu.png'))
self.part_content_set('title,icon', ic)
# content: recent list
li = List(self, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
li.callback_activated_add(self.recent_selected_cb)
recents = recent_history_get()
if recents:
for recent_url in recents:
path, name = os.path.split(recent_url)
item = li.item_append(name)
item.data['url'] = recent_url
else:
item = li.item_append('no recent repository')
item.disabled = True
li.show()
# table+rect to respect min size :/
tb = Table(self, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
r = Rectangle(self.evas, color=(0,0,0,0), size_hint_min=(200,200),
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
tb.pack(r, 0, 0, 1, 1)
tb.pack(li, 0, 0, 1, 1)
self.content = tb
# popup auto-list - not expand well :(
# self.size_hint_weight = EXPAND_BOTH
# self.size_hint_align = FILL_BOTH
# self.size_hint_min = 400, 400
# self.item_append('no recent repos', None)
# self.item_append('asd2', None)
# self.item_append('asd2', None)
# buttons
bt = Button(self, text='Open')
bt.callback_clicked_add(self.load_btn_cb)
self.part_content_set('button1', bt)
bt = Button(self, text='Clone (TODO)')
bt.disabled = True
self.part_content_set('button2', bt)
bt = Button(self, text='Create (TODO)')
bt.disabled = True
self.part_content_set('button3', bt)
if url is not None:
self.try_to_load(url)
else:
self.callback_block_clicked_add(lambda p: p.delete())
self.show()
示例6: fileExists
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def fileExists(self, filePath):
self.confirmPopup = Popup(self.mainWindow,
size_hint_weight=EXPAND_BOTH)
# Add a table to hold dialog image and text to Popup
tb = Table(self.confirmPopup, size_hint_weight=EXPAND_BOTH)
self.confirmPopup.part_content_set("default", tb)
tb.show()
# Add dialog-error Image to table
need_ethumb()
icon = Icon(self.confirmPopup, thumb='True')
icon.standard_set('dialog-question')
# Using gksudo or sudo fails to load Image here
# unless options specify using preserving their existing environment.
# may also fail to load other icons but does not raise an exception
# in that situation.
# Works fine using eSudo as a gksudo alternative,
# other alternatives not tested
try:
dialogImage = Image(self.confirmPopup,
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_BOTH,
file=icon.file_get())
tb.pack(dialogImage, 0, 0, 1, 1)
dialogImage.show()
except RuntimeError:
# An error message is displayed for this same error
# when aboutWin is initialized so no need to redisplay.
pass
# Add dialog text to table
dialogLabel = Label(self.confirmPopup, line_wrap=ELM_WRAP_WORD,
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_BOTH)
current_file = os.path.basename(filePath)
dialogLabel.text = "'%s' already exists. Overwrite?<br><br>" \
% (current_file)
tb.pack(dialogLabel, 1, 0, 1, 1)
dialogLabel.show()
# Close without saving button
no_btt = Button(self.mainWindow)
no_btt.text = "No"
no_btt.callback_clicked_add(self.closePopup, self.confirmPopup)
no_btt.show()
# Save the file and then close button
sav_btt = Button(self.mainWindow)
sav_btt.text = "Yes"
sav_btt.callback_clicked_add(self.doSelected)
sav_btt.callback_clicked_add(self.closePopup, self.confirmPopup)
sav_btt.show()
# add buttons to popup
self.confirmPopup.part_content_set("button1", no_btt)
self.confirmPopup.part_content_set("button3", sav_btt)
self.confirmPopup.show()
示例7: __init__
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def __init__(self, parent, repo):
self.repo = repo
Popup.__init__(self, parent)
self.part_text_set("title,text", "Add remote")
tb = Table(self, padding=(3, 3), size_hint_expand=EXPAND_BOTH)
self.content = tb
tb.show()
# name
lb = Label(tb, text="Name")
tb.pack(lb, 0, 0, 1, 1)
lb.show()
en = Entry(
tb, editable=True, single_line=True, scrollable=True, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH
)
en.part_text_set("guide", "Name for the new remote")
en.callback_changed_user_add(lambda e: self.err_unset())
tb.pack(en, 1, 0, 1, 1)
en.show()
self.name_entry = en
# url
lb = Label(tb, text="URL")
tb.pack(lb, 0, 1, 1, 1)
lb.show()
en = Entry(
tb, editable=True, single_line=True, scrollable=True, size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH
)
en.part_text_set("guide", "git://git.example.com/repo.git")
en.callback_changed_user_add(lambda e: self.err_unset())
tb.pack(en, 1, 1, 1, 1)
en.show()
self.url_entry = en
# error label
lb = Label(tb, text="", size_hint_expand=EXPAND_HORIZ)
tb.pack(lb, 0, 2, 2, 1)
lb.show()
self.error_label = lb
# buttons
bt = Button(self, text="Cancel")
bt.callback_clicked_add(lambda b: self.delete())
self.part_content_set("button1", bt)
bt.show()
bt = Button(self, text="Add remote")
bt.callback_clicked_add(self._add_btn_cb)
self.part_content_set("button2", bt)
bt.show()
self.show()
示例8: errorPopup
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def errorPopup(window, errorMsg):
errorPopup = Popup(window, size_hint_weight=EXPAND_BOTH)
errorPopup.callback_block_clicked_add(lambda obj: errorPopup.delete())
# Add a table to hold dialog image and text to Popup
tb = Table(errorPopup, size_hint_weight=EXPAND_BOTH)
errorPopup.part_content_set("default", tb)
tb.show()
# Add dialog-error Image to table
need_ethumb()
icon = Icon(errorPopup, thumb='True')
icon.standard_set('dialog-warning')
# Using gksudo or sudo fails to load Image here
# unless options specify using preserving their existing environment.
# may also fail to load other icons but does not raise an exception
# in that situation.
# Works fine using eSudo as a gksudo alternative,
# other alternatives not tested
try:
dialogImage = Image(errorPopup,
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_BOTH,
file=icon.file_get())
tb.pack(dialogImage, 0, 0, 1, 1)
dialogImage.show()
except RuntimeError:
# An error message is displayed for this same error
# when aboutWin is initialized so no need to redisplay.
pass
# Add dialog text to table
dialogLabel = Label(errorPopup, line_wrap=ELM_WRAP_WORD,
size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_BOTH)
dialogLabel.text = errorMsg
tb.pack(dialogLabel, 1, 0, 1, 1)
dialogLabel.show()
# Ok Button
ok_btt = Button(errorPopup)
ok_btt.text = "Ok"
ok_btt.callback_clicked_add(lambda obj: errorPopup.delete())
ok_btt.show()
# add button to popup
errorPopup.part_content_set("button3", ok_btt)
errorPopup.show()
示例9: __init__
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def __init__(self, parent):
Fileselector.__init__(self, parent, is_save=False, folder_only=True,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
self.path = os.getcwd()
# table+rect to respect min size :/
tb = Table(self, size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
r = Rectangle(self.evas, color=(0,0,0,0), size_hint_min=(300,300),
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
tb.pack(r, 0, 0, 1, 1)
tb.pack(self, 0, 0, 1, 1)
self.popup = Popup(parent)
self.popup.part_text_set('title,text', 'Choose repository')
self.popup.content = tb
self.popup.show()
self.show()
示例10: thumb_clicked
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def thumb_clicked(obj):
if not elementary.need_ethumb():
print("Ethumb not available!")
return
images = (
"panel_01.jpg",
"plant_01.jpg",
"rock_01.jpg",
"rock_02.jpg",
"sky_01.jpg",
"sky_02.jpg",
"sky_03.jpg",
"sky_04.jpg",
"wood_01.jpg",
"mystrale.jpg",
"mystrale_2.jpg"
)
win = StandardWindow("thumb", "Thumb", autodel=True, size=(600, 600))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
tb = Table(win, size_hint_weight=EXPAND_BOTH)
n = 0
for j in range(12):
for i in range(12):
n = (n + 1) % 11
th = Thumb(win, file=os.path.join(img_path, images[n]),
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH,
editable=True)
tb.pack(th, i, j, 1, 1)
th.show()
sc = Scroller(win, size_hint_weight=EXPAND_BOTH, content=tb)
win.resize_object_add(sc)
tb.show()
sc.show()
win.show()
示例11: table4_clicked
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def table4_clicked(obj, item=None):
win = StandardWindow("table4", "Table 4", autodel=True)
tb = Table(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(tb)
win.data["tb"] = tb
tb.show()
bt = Button(win, text="Button 1", size_hint_weight=(0.25, 0.25),
size_hint_align=FILL_BOTH)
tb.pack(bt, 0, 0, 1, 1)
win.data["b1"] = bt
bt.callback_clicked_add(my_tb_ch, win)
bt.show()
bt = Button(win, text="Button 2", size_hint_weight=(0.75, 0.25),
size_hint_align=FILL_BOTH)
tb.pack(bt, 1, 0, 1, 1)
win.data["b2"] = bt
bt.callback_clicked_add(my_tb_ch, win)
bt.show()
bt = Button(win, text="Button 3", size_hint_weight=(0.25, 0.75),
size_hint_align=FILL_BOTH)
tb.pack(bt, 0, 1, 1, 1)
win.data["b3"] = bt
bt.callback_clicked_add(my_tb_ch, win)
bt.show()
win.show()
示例12: _file_change
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def _file_change(self):
# hack to make popup respect min_size
rect = Rectangle(self.parent.evas, size_hint_min=(400,400))
tb = Table(self.parent)
tb.pack(rect, 0, 0, 1, 1)
# show the fileselector inside a popup
popup = Popup(self.top_widget, content=tb)
popup.part_text_set('title,text', 'Choose the Todo.txt file to use')
popup.show()
# the fileselector widget
fs = Fileselector(popup, is_save=False, expandable=False,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
fs.callback_activated_add(self._file_change_done, popup)
fs.callback_done_add(self._file_change_done, popup)
try:
fs.selected = options.txt_file
except:
fs.path = os.path.expanduser('~')
fs.show()
tb.pack(fs, 0, 0, 1, 1)
示例13: ComboBox
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
class ComboBox(Entry):
def __init__(self, parent, text=None, icon=None):
Entry.__init__(self, parent, scrollable=True, single_line=True,
size_hint_expand=EXPAND_BOTH,
size_hint_fill=FILL_BOTH)
self.show()
if text: self.text = text
if icon: self.icon = icon
ic = SafeIcon(self, 'go-down')
ic.size_hint_min = 16, 16 # TODO file a bug for elm on phab
ic.callback_clicked_add(self.activate)
self.part_content_set('end', ic)
self._itc = GenlistItemClass(item_style='default',
text_get_func=self._gl_text_get,
content_get_func=self._gl_content_get)
self._list = Genlist(self)
self._list.callback_selected_add(self._list_selected_cb)
self._hover = Hover(self.parent, target=self)
self._bg = Background(self, size_hint_expand=EXPAND_BOTH,
size_hint_fill=FILL_BOTH)
fr = Frame(self, style='pad_medium',
size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH)
fr.content = self._list
fr.show()
self._table = Table(self, size_hint_expand=EXPAND_BOTH,
size_hint_fill=FILL_BOTH)
self._table.pack(self._bg, 0, 0, 1, 1)
self._table.pack(fr, 0, 0, 1, 1)
self._selected_func = None
def callback_selected_add(self, func):
self._selected_func = func
@property
def icon(self):
return self.part_content_get('icon')
@icon.setter
def icon(self, icon):
icon.size_hint_min = 16, 16 # TODO file a bug for elm on phab
self.part_content_set('icon', icon)
@property
def guide(self):
self.part_text_get('guide')
@guide.setter
def guide(self, text):
self.part_text_set('guide', text)
def item_append(self, label=None, icon=None, end=None):
item_data = (label, icon, end)
self._list.item_append(self._itc, item_data)
def clear(self):
self._list.clear()
def activate(self, source=None):
self.focus = False # :/
# TODO calculate this based on _list and parent size
# print(self._list.size)
# print(self._list.geometry)
self._bg.size_hint_min = 0, 200
loc = self._hover.best_content_location_get(ELM_HOVER_AXIS_VERTICAL)
self._hover.part_content_set(loc, self._table)
self._hover.show()
self._table.show()
self._bg.show()
self._list.show()
def dismiss(self):
self._hover.dismiss()
def _list_selected_cb(self, gl, item):
label, icon, end = item.data
self.text = label
if icon:
self.icon = SafeIcon(self, icon)
item.selected = False
self.dismiss()
if callable(self._selected_func):
self._selected_func(self)
def _gl_text_get(self, gl, part, item_data):
label, icon, end = item_data
return label
def _gl_content_get(self, gl, part, item_data):
label, icon, end = item_data
if icon and part == 'elm.swallow.icon':
return SafeIcon(gl, icon)
elif end and part == 'elm.swallow.end':
return SafeIcon(gl, end)
示例14: toolbar_clicked
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def toolbar_clicked(obj, item=None):
win = StandardWindow("toolbar", "Toolbar", autodel=True, size=(320, 300))
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
bx = Box(win, size_hint_weight=EXPAND_BOTH)
win.resize_object_add(bx)
bx.show()
tbl = Table(win, size_hint_weight=(0.0, EVAS_HINT_EXPAND),
size_hint_align=FILL_BOTH)
tb = Toolbar(win, homogeneous=False, size_hint_weight=(0.0, 0.0),
size_hint_align=(EVAS_HINT_FILL, 0.0))
ph1 = Photo(win, size=40, file=os.path.join(img_path, "plant_01.jpg"),
size_hint_weight=EXPAND_BOTH, size_hint_align=ALIGN_CENTER)
tbl.pack(ph1, 0, 0, 1, 1)
ph1.show()
ph2 = Photo(win, size=80, size_hint_weight=EXPAND_BOTH,
size_hint_align=ALIGN_CENTER)
tbl.pack(ph2, 1, 0, 1, 1)
ph2.show()
ph3 = Photo(win, size=40, file=os.path.join(img_path, "sky_01.jpg"),
size_hint_weight=EXPAND_BOTH, size_hint_align=ALIGN_CENTER)
tbl.pack(ph3, 0, 1, 1, 1)
ph3.show()
ph4 = Photo(win, size=60, file=os.path.join(img_path, "sky_02.jpg"),
size_hint_weight=EXPAND_BOTH, size_hint_align=ALIGN_CENTER)
tbl.pack(ph4, 1, 1, 1, 1)
ph4.show()
item = tb.item_append("document-print", "Hello", tb_1)
item.disabled = True
item = tb.item_append("clock", "World,", tb_2, ph2)
item.selected = True
tb.item_append("folder-new", "here", tb_3, ph4)
tb.item_append("clock", "comes", tb_4, ph4)
tb.item_append("folder-new", "python-elementary!", tb_5, ph4)
item = tb.item_append("clock", "Menu", tb_5, ph4)
item.menu = True
tb.menu_parent = win
menu = item.menu
menu.item_add(None, "Here", "clock", tb_3, ph4)
menu_item = menu.item_add(None, "Comes", "refresh", tb_4, ph4)
menu.item_add(menu_item, "hey ho", "folder-new", tb_4, ph4)
menu.item_add(None, "python-elementary", "document-print", tb_5, ph4)
bx.pack_end(tb)
tb.show()
bx.pack_end(tbl)
tbl.show()
win.show()
示例15: __init__
# 需要导入模块: from efl.elementary.table import Table [as 别名]
# 或者: from efl.elementary.table.Table import pack [as 别名]
def __init__(self, parent, app, title, icon_name):
self.app = app
Popup.__init__(self, parent)
self.part_text_set('title,text', title)
self.part_content_set('title,icon', Icon(self, standard=icon_name))
# TODO padding should be (4,4) but it seems buggy for the big entry
tb = Table(self, padding=(0,4), size_hint_expand=EXPAND_BOTH)
self.content = tb
tb.show()
self.table = tb
# sep
sep = Separator(self, horizontal=True, size_hint_expand=EXPAND_BOTH)
tb.pack(sep, 0, 0, 2, 1)
sep.show()
# remote
lb = Label(tb, text='Remote', size_hint_align=(0.0, 0.5))
tb.pack(lb, 0, 1, 1, 1)
lb.show()
cb = ComboBox(self, icon=Icon(self, standard='git-remote'))
cb.callback_selected_add(self.rbranch_populate)
for remote in app.repo.remotes:
cb.item_append(remote.name, 'git-remote')
tb.pack(cb, 1, 1, 1, 1)
cb.show()
self.remote_combo = cb
# remote branch
lb = Label(tb, text='Remote branch', size_hint_align=(0.0, 0.5))
tb.pack(lb, 0, 2, 1, 1)
lb.show()
cb = ComboBox(self, icon=Icon(cb, standard='git-branch'))
tb.pack(cb, 1, 2, 1, 1)
cb.show()
self.rbranch_combo = cb
# local branch
lb = Label(tb, text='Local branch', size_hint_align=(0.0, 0.5))
tb.pack(lb, 0, 3, 1, 1)
lb.show()
en = Entry(tb, disabled=True, single_line=True, scrollable=True,
text=app.repo.status.current_branch.name,
size_hint_expand=EXPAND_BOTH, size_hint_fill=FILL_BOTH)
tb.pack(en, 1, 3, 1, 1)
en.show()
self.lbranch_entry = en
# output entry
en = CommandOutputEntry(self, min_size=(400, 150))
tb.pack(en, 0, 4, 2, 1)
en.show()
self.output_entry = en
# sep
sep = Separator(self, horizontal=True, size_hint_expand=EXPAND_BOTH)
tb.pack(sep, 0, 5, 2, 1)
sep.show()
# buttons
bt = Button(self, text='Close')
bt.callback_clicked_add(lambda b: self.delete())
self.part_content_set('button1', bt)
bt.show()
self.close_btn = bt
bt = Button(self, text='Action')
bt.callback_clicked_add(self._action_btn_cb)
self.part_content_set('button2', bt)
bt.show()
self.action_btn = bt
self.autopopulate()
self.show()