本文整理汇总了Python中sugar3.graphics.toggletoolbutton.ToggleToolButton.hide方法的典型用法代码示例。如果您正苦于以下问题:Python ToggleToolButton.hide方法的具体用法?Python ToggleToolButton.hide怎么用?Python ToggleToolButton.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sugar3.graphics.toggletoolbutton.ToggleToolButton
的用法示例。
在下文中一共展示了ToggleToolButton.hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GetIABooksActivity
# 需要导入模块: from sugar3.graphics.toggletoolbutton import ToggleToolButton [as 别名]
# 或者: from sugar3.graphics.toggletoolbutton.ToggleToolButton import hide [as 别名]
#.........这里部分代码省略.........
toolbar.source_combo.append_item(mount_point, label)
toolbar.source_combo.set_active(0)
toolbar.source_combo.handler_unblock(toolbar.source_changed_cb_id)
def __format_changed_cb(self, combo):
self.show_book_data(False)
def __language_changed_cb(self, combo):
self.find_books(self.get_search_terms())
def __search_entry_activate_cb(self, entry):
self.find_books(self.get_search_terms())
def __get_book_cb(self, button):
self.get_book()
def enable_button(self, state):
self._download.props.sensitive = state
self.format_combo.props.sensitive = state
def move_up_catalog(self, treeview):
len_cat = len(self.catalog_history)
if len_cat == 1:
return
else:
# move a level up the tree
self.catalog_listview.handler_block(self._catalog_changed_id)
self.catalog_history.pop()
len_cat -= 1
if(len_cat == 1):
title = self.catalog_history[0]['title']
self.bt_move_up_catalog.set_label(title)
self.bt_move_up_catalog.hide_image()
else:
title = self.catalog_history[len_cat - 1]['title']
self.bt_move_up_catalog.set_label(title)
self.bt_move_up_catalog.show_image()
self.catalogs = self.catalog_history[len_cat - 1]['catalogs']
if len(self.catalogs) > 0:
self.path_iter = {}
self.categories = []
for key in self.catalogs.keys():
self.categories.append({'text': key, 'dentro': []})
self.treemodel.clear()
for p in self.categories:
self.path_iter[p['text']] = \
self.treemodel.append([p['text']])
self.catalog_listview.handler_unblock(self._catalog_changed_id)
def move_down_catalog(self, treeview):
treestore, coldex = \
self.catalog_listview.get_selection().get_selected()
len_cat = len(self.catalog_history)
if len_cat > 0 and self.catalog_history[len_cat - 1]['catalogs'] == []:
self.catalog_history.pop()
len_cat = len(self.catalog_history)
# README: when the Activity starts by default there is nothing
# selected and this signal is called, so we have to avoid this
# 'append' because it fails
if coldex is not None:
self.catalog_history.append(
{'title': treestore.get_value(coldex, 0), 'catalogs': []})
self.__switch_catalog_cb(treestore.get_value(coldex, 0))