• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python widgetutil.pad函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中miro.frontends.widgets.widgetutil.pad函数的典型用法代码示例。如果您正苦于以下问题:Python pad函数的具体用法?Python pad怎么用?Python pad使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: __init__

    def __init__(self):
        self.in_progress = False
        widgetset.Background.__init__(self)
        hbox = widgetset.HBox()
        # left side: labels on first line, progress on second
        vbox = widgetset.VBox()

        line = widgetset.HBox()
        self.size_label = widgetset.Label(u"")
        self.size_label.set_bold(True)
        self.sync_label = widgetset.Label(u"")
        self.sync_label.set_alignment(widgetconst.TEXT_JUSTIFY_RIGHT)
        self.sync_label.set_bold(True)
        line.pack_start(self.size_label)
        line.pack_end(self.sync_label)
        vbox.pack_start(widgetutil.pad(line, bottom=10))

        self.progress = SizeProgressBar()
        self.progress.set_size_request(-1, 14)
        vbox.pack_start(self.progress)

        hbox.pack_start(vbox, expand=True)

        # right size: sync button
        self.sync_button = widgetutil.ThreeImageButton(
            'device-sync', _("Up to date"))
        self.sync_button.set_text_size(1.07) # 14pt
        self.sync_button.disable()
        self.sync_button.set_size_request(150, 23)
        hbox.pack_end(widgetutil.pad(self.sync_button, left=50))
        self.add(widgetutil.align(hbox, 0.5, 1, 1, 0, top_pad=10,
                                  bottom_pad=10, left_pad=50, right_pad=50))
开发者ID:CodeforEvolution,项目名称:miro,代码行数:32,代码来源:devicecontroller.py


示例2: __init__

    def __init__(self):
        self.in_progress = False
        widgetset.Background.__init__(self)
        vbox = widgetset.VBox()
        # first line: size remaining on the left, sync status on the right
        line = widgetset.HBox()
        self.size_label = widgetset.Label(u"")
        self.size_label.set_bold(True)
        self.sync_label = widgetset.Label(u"")
        line.pack_start(self.size_label)
        line.pack_end(self.sync_label)
        vbox.pack_start(widgetutil.pad(line, bottom=10))

        # second line: bigger; size status on left, sync button on right
        line = widgetset.HBox()
        self.progress = SizeProgressBar()
        self.progress.set_size_request(425, 36)
        self.sync_button = widgetutil.ThreeImageButton(
            'device-sync', _("Sync Now"))
        self.sync_button.set_size_request(100, 39)
        line.pack_start(self.progress)
        line.pack_end(widgetutil.pad(self.sync_button, left=50))
        vbox.pack_start(line)
        self.add(widgetutil.align(vbox, 0.5, 1, 0, 0, top_pad=15,
                                  bottom_pad=15, right_pad=20))
开发者ID:kmshi,项目名称:miro,代码行数:25,代码来源:devicecontroller.py


示例3: _pack_extra_buttons

 def _pack_extra_buttons(self, vbox):
     self.sync_unwatched = widgetset.Checkbox(_("Only sync unplayed items"))
     self.sync_unwatched.connect('toggled', self.unwatched_toggled)
     self.expire_podcasts = widgetset.Checkbox(
         _("Delete expired podcasts from my device"))
     self.expire_podcasts.connect('toggled', self.expire_podcasts_toggled)
     vbox.pack_start(widgetutil.pad(self.sync_unwatched, left=20))
     vbox.pack_start(widgetutil.pad(self.expire_podcasts, left=20))
开发者ID:CodeforEvolution,项目名称:miro,代码行数:8,代码来源:devicecontroller.py


示例4: _pack_bottom

 def _pack_bottom(self):
     """Pack the bottom row into the VBox."""
     bottom = [PathField("video_path", self.items, _("Path"), readonly=True)]
     self.vbox.pack_start(widgetutil.pad(widgetset.HLine(), top=25, bottom=10, left=15, right=15))
     for field in bottom:
         self.vbox.pack_start(field.get_box())
     self.vbox.pack_start(widgetutil.pad(widgetset.HLine(), top=10, left=15, right=15))
     self.fields.extend(bottom)
开发者ID:nerdymcgee,项目名称:miro,代码行数:8,代码来源:itemedit.py


示例5: _build_sync_section

    def _build_sync_section(self, bottom):
        hbox = widgetset.HBox()
        vbox = widgetset.VBox()
        label_line = widgetset.HBox()
        label = self.build_header(_("Sync a Phone, Tablet, or Digital Camera"))
        label_line.pack_start(widgetutil.align_left(label, left_pad=20,
                                              bottom_pad=10))
        help_button = HelpButton()
        help_button.connect('clicked', self.help_button_clicked)
        label_line.pack_start(widgetutil.align_top(help_button))
        bottom.pack_start(label_line)

        label = widgetset.Label(
            _("Connect the USB cable to sync your Android device with "
              "%(shortappname)s.  Be sure to set your device to 'USB Mass "
              "Storage' mode in your device settings.  Attach your digital "
              "camera, and convert your video files to be instantly "
              "web-ready.", self.trans_data))
        label.set_size(self.TEXT_SIZE)
        label.set_color(self.TEXT_COLOR)
        label.set_size_request(400, -1)
        label.set_wrap(True)
        vbox.pack_start(widgetutil.align_left(label, left_pad=20,
                                              bottom_pad=20))

        show_all_vbox = widgetset.VBox()
        self.show_unknown = widgetset.Checkbox(
            _("Show all attached devices and drives"))
        self.show_unknown.set_checked(
            app.config.get(prefs.SHOW_UNKNOWN_DEVICES))
        self.show_unknown.connect('toggled', self.show_all_devices_toggled)
        show_all_vbox.pack_start(self.show_unknown)
        padding = self.show_unknown.get_text_padding()
        label = widgetset.Label(
            _("Use this if your phone doesn't appear in %(shortappname)s when "
              "you connect it to the computer, or if you want to sync with an "
              "external drive.", self.trans_data))
        label.set_size(self.TEXT_SIZE)
        label.set_color(self.TEXT_COLOR)
        label.set_size_request(370 - padding, -1)
        label.set_wrap(True)
        show_all_vbox.pack_start(widgetutil.pad(label, top=10, left=padding))
        bg = widgetutil.RoundedSolidBackground(
            widgetutil.css_to_color('#e4e4e4'))
        bg.set_size_request(400, -1)
        bg.add(widgetutil.pad(show_all_vbox, 20, 20, 20, 20))
        vbox.pack_start(widgetutil.pad(bg, left=20, right=10, bottom=50))
        hbox.pack_start(vbox)
        hbox.pack_start(widgetutil.align_top(widgetset.ImageDisplay(
            imagepool.get(resources.path('images/connect-android.png')))))
        bottom.pack_start(hbox)
开发者ID:kmshi,项目名称:miro,代码行数:51,代码来源:tabcontroller.py


示例6: __init__

    def __init__(self):
        widgetset.SolidBackground.__init__(self, itemlistwidgets.StandardView.BACKGROUND_COLOR)
        bg = widgetutil.RoundedSolidBackground(widgetutil.WHITE)
        vbox = widgetset.VBox()
        title = widgetset.HBox()
        logo = imagepool.get_image_display(resources.path("images/icon-search_large.png"))
        title.pack_start(widgetutil.align_middle(logo))
        label = widgetset.Label(self.TITLE)
        label.set_bold(True)
        label.set_size(widgetutil.font_scale_from_osx_points(30))
        title.pack_start(widgetutil.align_middle(label, left_pad=5))
        vbox.pack_start(widgetutil.align_center(title, bottom_pad=20))
        desc = widgetset.Label(self.DESC)
        vbox.pack_start(widgetutil.align_center(desc, bottom_pad=40))

        engine_width = int((desc.get_width() - 30) / 2)

        engine_widgets = self.build_engine_widgets()
        for widgets in engine_widgets[:-1]:  # widgets with borders
            hbox = widgetset.HBox(spacing=30)
            for widget in widgets:
                widget.set_size_request(engine_width, 45)
                hbox.pack_start(widget, expand=True)
            vbox.pack_start(hbox)

        hbox = widgetset.HBox(spacing=30)
        for widget in engine_widgets[-1]:  # has no border
            widget.set_has_border(False)
            widget.set_size_request(engine_width, 45)
            hbox.pack_start(widget, expand=True)

        vbox.pack_start(hbox)

        bg.add(widgetutil.pad(vbox, 45, 45, 45, 45))
        self.add(widgetutil.align(bg, xalign=0.5, top_pad=50))
开发者ID:kmshi,项目名称:miro,代码行数:35,代码来源:searchcontroller.py


示例7: set_device

    def set_device(self, device):
        for child in self.device_choices.children:
            self.device_choices.remove(child)

        self.device = device
        possible_devices = sorted(device.info.devices)
        rbg = widgetset.RadioButtonGroup()

        buttons_to_device_name = {}
        for device_name in possible_devices:
            button = widgetset.RadioButton(device_name, rbg)
            self.device_choices.pack_start(button)
            buttons_to_device_name[button] = device_name

        def _clicked(*args):
            selected_button = rbg.get_selected()
            if selected_button is None:
                return # user didn't actually select a device
            messages.SetDeviceType(
                self.device,
                buttons_to_device_name[selected_button]).send_to_backend()

        select = widgetset.Button(_('This is my device'))
        select.connect('clicked', _clicked)
        self.device_choices.pack_start(widgetutil.pad(select, top=20))
开发者ID:kmshi,项目名称:miro,代码行数:25,代码来源:devicecontroller.py


示例8: __init__

 def __init__(self, items):
     DialogPanel.__init__(self, items)
     self.fields = [
         TextField('show', self.items, _("Show")),
         TextField('episode_id', self.items, _("Episode ID")),
         MultifieldRow(
             NumberField('season_number', self.items, _("Season Number"),
                 width=15),
             NumberField('episode_number', self.items, _("Episode Number"),
                 width=15),
         ),
         OptionsField('kind', self.items, _("Video Kind"), [
             # FIXME: changes here need also be applied in messages
             (None, u""),
             (u'movie', _("Movie")),
             (u'show', _("Show")),
             (u'clip', _("Clip")),
             (u'podcast', _("Podcast")),
         ]),
     ]
     content = widgetset.VBox()
     for field in self.fields:
         field.set_label_width(120)
         content.pack_start(field.get_box(), padding=5)
     # XXX - hack: OS X is cutting off the right side of the box in single
     # selection mode; this seems like a bug in layout. padding the right
     # side causes only padding to be cut off.
     # XXX - this padding fixes 17065. 17065 is the same layout issue?
     self.vbox = widgetutil.pad(content, right=15)
开发者ID:codito,项目名称:miro,代码行数:29,代码来源:itemedit.py


示例9: __init__

 def __init__(self, field, items, label, formatter, multiple=None):
     Field.__init__(self, field, items, label, readonly=True, multiple=multiple)
     value = self.common_value
     if self.mixed_values:
         value = _("(mixed)")
     else:
         value = formatter(value)
     label = widgetset.Label(value)
     self.widget = widgetutil.pad(label, top=6)
开发者ID:nerdymcgee,项目名称:miro,代码行数:9,代码来源:itemedit.py


示例10: build_widget

    def build_widget(self):
        image_path = resources.path("images/icon-conversions_large.png")
        icon = imagepool.get(image_path)
        titlebar = ConversionsTitleBar(_("Conversions"), icon)
        self.widget.pack_start(titlebar)

        sep = separator.HSeparator((0.85, 0.85, 0.85), (0.95, 0.95, 0.95))
        self.widget.pack_start(sep)

        self.stop_all_button = widgetset.Button(_('Stop All Conversions'), style='smooth')
        self.stop_all_button.set_size(widgetconst.SIZE_SMALL)
        self.stop_all_button.set_color(widgetset.TOOLBAR_GRAY)
        self.stop_all_button.disable()
        self.stop_all_button.connect('clicked', self.on_cancel_all)

        reveal_button = widgetset.Button(_('Show Conversion Folder'), style='smooth')
        reveal_button.set_size(widgetconst.SIZE_SMALL)
        reveal_button.set_color(widgetset.TOOLBAR_GRAY)
        reveal_button.connect('clicked', self.on_reveal_conversions_folder)

        self.clear_finished_button = widgetset.Button(
                _('Clear Finished Conversions'), style='smooth')
        self.clear_finished_button.set_size(widgetconst.SIZE_SMALL)
        self.clear_finished_button.set_color(widgetset.TOOLBAR_GRAY)
        self.clear_finished_button.connect('clicked', self.on_clear_finished)

        toolbar = itemlistwidgets.DisplayToolbar()
        hbox = widgetset.HBox()
        hbox.pack_start(widgetutil.pad(self.stop_all_button, top=8, bottom=8, left=8))
        hbox.pack_end(widgetutil.pad(reveal_button, top=8, bottom=8, right=8))
        hbox.pack_end(widgetutil.pad(self.clear_finished_button, top=8, bottom=8, right=8))
        toolbar.add(hbox)
        self.widget.pack_start(toolbar)
        
        self.iter_map = dict()
        self.model = widgetset.TableModel('object')
        self.table = ConversionTableView(self.model)
        self.table.connect_weak('hotspot-clicked', self.on_hotspot_clicked)
        scroller = widgetset.Scroller(False, True)
        scroller.add(self.table)

        self.widget.pack_start(scroller, expand=True)

        conversion_manager.fetch_tasks_list()
开发者ID:cool-RR,项目名称:Miro,代码行数:44,代码来源:conversionscontroller.py


示例11: _build_titlebar_extra

 def _build_titlebar_extra(self):
     self.create_signal('save-search')
     button = widgetset.Button(_('Save Search'))
     button.connect('clicked', self._on_save_search)
     self.save_button = widgetutil.HideableWidget(
             widgetutil.pad(button, right=10))
     return [
         widgetutil.align_middle(self.save_button),
         ItemListTitlebar._build_titlebar_extra(self),
     ]
开发者ID:nxmirrors,项目名称:miro,代码行数:10,代码来源:itemlistwidgets.py


示例12: _make_label

 def _make_label(self, header_text):
     hbox = widgetset.HBox()
     self.header_label = widgetset.Label(header_text)
     self.header_label.set_size(0.85)
     self.header_label.set_bold(True)
     self.header_label.set_color((0.27, 0.27, 0.27))
     hbox.pack_start(self.header_label)
     self.info_label = widgetset.Label("")
     self.info_label.set_size(0.85)
     self.info_label.set_color((0.72, 0.72, 0.72))
     hbox.pack_start(widgetutil.pad(self.info_label, left=7))
     self.expander.set_label(hbox)
开发者ID:nxmirrors,项目名称:miro,代码行数:12,代码来源:itemlistwidgets.py


示例13: __init__

    def __init__(self):
        self.device = None
        widgetset.HBox.__init__(self)
        first_column = widgetset.VBox()
        self.sync_library = widgetset.Checkbox(self.title)
        self.sync_library.connect('toggled', self.sync_library_toggled)
        first_column.pack_start(self.sync_library)
        self.sync_group = widgetset.RadioButtonGroup()
        if self.file_type != 'playlists':
            # don't actually need to create buttons for playlists, since we
            # always sync all items
            all_button = widgetset.RadioButton(self.all_label, self.sync_group)
            all_button.connect('clicked', self.all_button_clicked)
            widgetset.RadioButton(self.unwatched_label,
                                  self.sync_group)
            for button in self.sync_group.get_buttons():
                button.disable()
                first_column.pack_start(button)
        self.pack_start(widgetutil.pad(first_column, 20, 0, 20, 20))

        second_column = widgetset.VBox()
        second_column.pack_start(widgetset.Label(self.list_label))
        self.feed_list = widgetset.VBox()
        self.info_map = {}
        feeds = self.get_feeds()
        if feeds:
            for info in feeds:
                checkbox = widgetset.Checkbox(info.name)
                checkbox.connect('toggled', self.feed_toggled, info)
                self.feed_list.pack_start(checkbox)
                self.info_map[self.info_key(info)] = checkbox
        else:
            self.sync_library.disable()
        scroller = widgetset.Scroller(False, True)
        scroller.set_child(self.feed_list)
        second_column.pack_start(scroller, expand=True)
        self.feed_list.disable()
        self.pack_start(widgetutil.pad(second_column, 20, 20, 20, 20),
                        expand=True)
开发者ID:cool-RR,项目名称:Miro,代码行数:39,代码来源:devicecontroller.py


示例14: __init__

 def __init__(self, title, text):
     MainDialog.__init__(self, title)
     self.progress_bar = widgetset.ProgressBar()
     self.top_label = widgetset.Label()
     self.top_label.set_text(text)
     self.top_label.set_wrap(True)
     self.top_label.set_size_request(350, -1)
     self.label = widgetset.Label()
     self.vbox = widgetset.VBox(spacing=6)
     self.vbox.pack_end(widgetutil.align_center(self.label))
     self.vbox.pack_end(self.progress_bar)
     self.vbox.pack_end(widgetutil.pad(self.top_label, bottom=6))
     self.set_extra_widget(self.vbox)
开发者ID:codito,项目名称:miro,代码行数:13,代码来源:dialogs.py


示例15: _build_stores_section

    def _build_stores_section(self, bottom):
        vbox = widgetset.VBox()
        from miro.frontends.widgets import prefpanel
        self.store_helper = prefpanel.StoreHelper(height=200)
        self.store_helper.store_list.set_size_request(550, -1)
        vbox.pack_start(widgetutil.align_middle(
                self.store_helper.store_list, top_pad=20, bottom_pad=15,
                left_pad=15, right_pad=15))

        bg = widgetutil.RoundedSolidBackground(
            widgetutil.css_to_color('#e4e4e4'))
        bg.add(widgetutil.pad(vbox, 00, 10, 10, 10))

        bottom.pack_start(bg)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:14,代码来源:tabcontroller.py


示例16: _init_widget

    def _init_widget(self):
        toolbar = self.build_header_toolbar()
        self.selected_view = app.widget_state.get_selected_view(self.type,
                                                                self.id)
        self.widget = itemlistwidgets.ItemContainerWidget(toolbar,
                self.selected_view)

        self.build_widget()

        list_view = WidgetStateStore.get_list_view_type()
        self.views[list_view] = self.build_list_view()

        self.expand_or_contract_item_details()

        standard_view = WidgetStateStore.get_standard_view_type()
        standard_view_widget = itemlistwidgets.StandardView(
            self.item_list, self.build_renderer())
        self.views[standard_view] = standard_view_widget
        standard_view_background = widgetset.SolidBackground(
                standard_view_widget.BACKGROUND_COLOR)
        standard_view_background.add(widgetutil.pad(standard_view_widget,
            top=10, bottom=10))

        # set up member attrs to easily get our list/standard view widgets
        self.list_item_view = self.views[list_view]
        self.standard_item_view = self.views[standard_view]
        self.standard_view_toolbar = toolbar
        
        standard_view_scroller = widgetset.Scroller(False, True)
        standard_view_scroller.add(standard_view_background)
        self.widget.vbox[standard_view].pack_start(
                standard_view_scroller, expand=True)
        self.views[standard_view].set_scroller(standard_view_scroller)
        standard_view_scroller.set_background_color(
                standard_view_widget.BACKGROUND_COLOR)

        toolbar.connect_weak('sort-changed',
            self.on_sort_changed, standard_view)
        self.widget.item_details.expander_button.connect_weak('clicked',
                self.on_item_details_expander_clicked)
        self.list_item_view.connect_weak('sort-changed',
            self.on_sort_changed, list_view)
        self.titlebar.connect_weak('list-view-clicked',
            self.set_view, list_view)
        self.titlebar.connect_weak('normal-view-clicked',
            self.set_view, standard_view)
        self.titlebar.connect_weak('resume-playing', self.on_resume_playing)
        self.standard_item_view.renderer.signals.connect_weak(
                'throbber-drawn', self.on_throbber_drawn)
开发者ID:kmshi,项目名称:miro,代码行数:49,代码来源:itemlistcontroller.py


示例17: __init__

    def __init__(self, title):
        widgetset.VBox.__init__(self)
        self.current_limit = self.ITEM_LIMIT
        hbox = widgetset.HBox()
        label = widgetset.Label(title.upper())
        label.set_size(0.7)
        label.set_color((0.5, 0.5, 0.5))
        hbox.pack_start(widgetutil.align_left(label), expand=True)
        self.pack_start(widgetutil.pad(hbox, top=20, bottom=10))

        self.item_box = widgetset.VBox(spacing=8) # we want 17px of padding, so
                                                  # 17/2 is close to 8
        self.pack_start(self.item_box)

        self.item_list = []
开发者ID:dankamongmen,项目名称:miro,代码行数:15,代码来源:guidecontroller.py


示例18: __init__

    def __init__(self):
        DisplayToolbar.__init__(self)
        self.create_signal('remove-feed')
        self.create_signal('show-settings')
        self.create_signal('share')
        self.create_signal('auto-download-changed')
        hbox = widgetset.HBox(spacing=5)

        label = widgetset.Label(_('Auto-download'))
        label.set_size(widgetconst.SIZE_SMALL)
        label.set_color(widgetset.TOOLBAR_GRAY)
        self.autodownload_label = widgetutil.HideableWidget(label)

        self.autodownload_options = (("all", _("All")),
                                     ("new", _("New")),
                                     ("off", _("Off")))

        autodownload_menu = widgetset.OptionMenu(
            [o[1] for o in self.autodownload_options])
        autodownload_menu.set_size(widgetconst.SIZE_SMALL)
        autodownload_menu.connect('changed', self._on_autodownload_changed)
        self.autodownload_menu = widgetutil.HideableWidget(autodownload_menu)

        share_button = widgetset.Button(_("Share feed"), style='smooth')
        share_button.set_size(widgetconst.SIZE_SMALL)
        share_button.set_color(widgetset.TOOLBAR_GRAY)
        share_button.connect('clicked', self._on_share_clicked)
        self.share_button = widgetutil.HideableWidget(share_button)

        settings_button = widgetset.Button(_("Settings"), style='smooth')
        settings_button.set_size(widgetconst.SIZE_SMALL)
        settings_button.set_color(widgetset.TOOLBAR_GRAY)
        settings_button.connect('clicked', self._on_settings_clicked)
        self.settings_button = widgetutil.HideableWidget(settings_button)

        remove_button = widgetset.Button(_("Remove feed"), style='smooth')
        remove_button.set_size(widgetconst.SIZE_SMALL)
        remove_button.set_color(widgetset.TOOLBAR_GRAY)
        remove_button.connect('clicked', self._on_remove_clicked)
        self.remove_button = remove_button

        hbox.pack_start(widgetutil.align_middle(self.autodownload_label,
                                                right_pad=2, left_pad=6))
        hbox.pack_start(widgetutil.align_middle(self.autodownload_menu))
        hbox.pack_end(widgetutil.align_middle(self.remove_button))
        hbox.pack_end(widgetutil.align_middle(self.settings_button))
        hbox.pack_end(widgetutil.align_middle(self.share_button))
        self.add(widgetutil.pad(hbox, top=4, bottom=4, left=10, right=14))
开发者ID:nxmirrors,项目名称:miro,代码行数:48,代码来源:itemlistwidgets.py


示例19: __init__

 def __init__(self, title):
     MainDialog.__init__(self, title)
     self.progress_bar = widgetset.ProgressBar()
     self.top_label = widgetset.Label()
     self.top_label.set_text(_("Miro is upgrading your database of feeds "
         "and files.  This one-time process can take a long time if you "
         "have a large number of items in Miro (it can even take more "
         "than 30 minutes)."))
     self.top_label.set_wrap(True)
     self.top_label.set_size_request(200, -1)
     self.label = widgetset.Label()
     self.vbox = widgetset.VBox(spacing=6)
     self.vbox.pack_end(widgetutil.align_center(self.label))
     self.vbox.pack_end(self.progress_bar)
     self.vbox.pack_end(widgetutil.pad(self.top_label, bottom=6))
     height = self.vbox.get_size_request()[1] + 24
     self.set_extra_widget(self.vbox)
开发者ID:cool-RR,项目名称:Miro,代码行数:17,代码来源:dialogs.py


示例20: build_media_player_import_page

    def build_media_player_import_page(self):
        vbox = widgetset.VBox(spacing=5)

        vbox.pack_start(_build_title_question(_(
                "Would you like to display your %(player)s music and "
                "video in %(appname)s?",
                {"player": self.mp_name,
                 "appname": app.config.get(prefs.SHORT_APP_NAME)})))

        rbg = widgetset.RadioButtonGroup()
        yes_rb = widgetset.RadioButton(_("Yes"), rbg)
        no_rb = widgetset.RadioButton(_("No"), rbg)
        yes_rb.set_selected()

        vbox.pack_start(widgetutil.align_left(yes_rb))
        vbox.pack_start(widgetutil.align_left(no_rb))

        lab = widgetset.Label(_(
                "Note: %(appname)s won't move or copy any files on your "
                "disk.  It will just add them to your %(appname)s library.",
                {"appname": app.config.get(prefs.SHORT_APP_NAME)}))
        lab.set_size_request(WIDTH - 40, -1)
        lab.set_wrap(True)
        vbox.pack_start(widgetutil.align_left(lab))

        def handle_next(widget):
            if rbg.get_selected() == yes_rb:
                self.import_media_player_stuff = True
            else:
                self.import_media_player_stuff = False
            self.next_page()

        prev_button = widgetset.Button(_("< Previous"))
        prev_button.connect('clicked', lambda x: self.prev_page())

        next_button = widgetset.Button(_("Next >"))
        next_button.connect('clicked', handle_next)

        vbox.pack_start(
            widgetutil.align_bottom(widgetutil.align_right(
                    widgetutil.build_hbox((prev_button, next_button)))),
            expand=True)

        vbox = widgetutil.pad(vbox)

        return vbox
开发者ID:codito,项目名称:miro,代码行数:46,代码来源:firsttimedialog.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python gtcache._函数代码示例发布时间:2022-05-27
下一篇:
Python widgetutil.make_surface函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap