当前位置: 首页>>代码示例>>Python>>正文


Python GuiBasic.browse_folder方法代码示例

本文整理汇总了Python中GuiBasic.browse_folder方法的典型用法代码示例。如果您正苦于以下问题:Python GuiBasic.browse_folder方法的具体用法?Python GuiBasic.browse_folder怎么用?Python GuiBasic.browse_folder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GuiBasic的用法示例。


在下文中一共展示了GuiBasic.browse_folder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: add_drive_cb

# 需要导入模块: import GuiBasic [as 别名]
# 或者: from GuiBasic import browse_folder [as 别名]
 def add_drive_cb(button):
     """Callback for adding a drive"""
     title = _("Choose a folder")
     pathname = GuiBasic.browse_folder(self.parent, title,
                                       multiple=False, stock_button=gtk.STOCK_ADD)
     if pathname:
         liststore.append([pathname])
         pathnames.append(pathname)
         options.set_list('shred_drives', pathnames)
开发者ID:Nullstr1ng,项目名称:bleachbit,代码行数:11,代码来源:GuiPreferences.py

示例2: cb_wipe_free_space

# 需要导入模块: import GuiBasic [as 别名]
# 或者: from GuiBasic import browse_folder [as 别名]
    def cb_wipe_free_space(self, action):
        """callback to wipe free space in arbitrary folder"""
        path = GuiBasic.browse_folder(self.window, _("Choose a folder"), multiple=False, stock_button=gtk.STOCK_OK)
        if not path:
            # user cancelled
            return

        backends["_gui"] = Cleaner.create_wipe_cleaner(path)

        # execute
        operations = {"_gui": ["free_disk_space"]}
        self.preview_or_run_operations(True, operations)
开发者ID:jun-zhang,项目名称:bleachbit,代码行数:14,代码来源:GUI.py

示例3: add_custom_folder_cb

# 需要导入模块: import GuiBasic [as 别名]
# 或者: from GuiBasic import browse_folder [as 别名]
 def add_custom_folder_cb(button):
     """Callback for adding a folder"""
     title = _("Choose a folder")
     pathname = GuiBasic.browse_folder(self.parent, title,
                                       multiple=False, stock_button=gtk.STOCK_ADD)
     if pathname:
         for this_pathname in pathnames:
             if pathname == this_pathname[1]:
                 print "warning: '%s' already exists in whitelist" % pathname
                 return
         liststore.append([_('Folder'), pathname])
         pathnames.append(['folder', pathname])
         options.set_custom_paths(pathnames)
开发者ID:Nullstr1ng,项目名称:bleachbit,代码行数:15,代码来源:GuiPreferences.py

示例4: cb_shred_file

# 需要导入模块: import GuiBasic [as 别名]
# 或者: from GuiBasic import browse_folder [as 别名]
    def cb_shred_file(self, action):
        """Callback for shredding a file or folder"""

        # get list of files
        if "ShredFiles" == action.get_name():
            paths = GuiBasic.browse_files(self.window, _("Choose files to shred"))
        elif "ShredFolders" == action.get_name():
            paths = GuiBasic.browse_folder(
                self.window, _("Choose folder to shred"), multiple=True, stock_button=gtk.STOCK_DELETE
            )
        else:
            raise RuntimeError("Unexpected kind in cb_shred_file")

        if not paths:
            return

        self.shred_paths(paths)
开发者ID:jun-zhang,项目名称:bleachbit,代码行数:19,代码来源:GUI.py


注:本文中的GuiBasic.browse_folder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。