示例#1
0
文件: donate.py 项目: zjmmjzzjm/miro
 def __init__(self):
     title = 'Donate PowerToys'
     widget = self.build_widgets()
     w, h = widget.get_size_request()
     rect = widgetset.Rect(0, 0, w, h)
     self.window = widgetset.DialogWindow(title, rect)
     self.window.set_content_widget(widget)
示例#2
0
 def startup(self):
     window = widgetset.MainWindow('Miro Profiler',
                                   widgetset.Rect(100, 100, 700, 500))
     self.vbox = widgetset.VBox()
     button = widgetset.Button("Start Test")
     button.connect('clicked', self.start_button_clicked)
     self.vbox.pack_end(button)
     window.set_content_widget(self.vbox)
     window.show()
     self.set_up()
示例#3
0
 def prepare_detached_playback(self):
     self.emit('will-play-detached')
     detached_window_frame = app.config.get(prefs.DETACHED_WINDOW_FRAME)
     if detached_window_frame is None:
         detached_window_frame = widgetset.Rect(0, 0, 800, 600)
     else:
         detached_window_frame = widgetset.Rect.from_string(detached_window_frame)
     title = self.playlist.currently_playing.title
     self.detached_window = DetachedWindow(title, detached_window_frame)
     self.align = widgetset.DetachedWindowHolder()
     self.align.add(self.video_display.widget)
     self.detached_window.set_content_widget(self.align)
     self.detached_window.show()
示例#4
0
    def __init__(self, done_firsttime_callback, title=None):
        if title == None:
            title = _("%(appname)s Setup",
                      {"appname": app.config.get(prefs.SHORT_APP_NAME)})

        x, y = widgetset.get_first_time_dialog_coordinates(WIDTH, HEIGHT)

        widgetset.DialogWindow.__init__(self, title,
                                        widgetset.Rect(x, y, WIDTH, HEIGHT))

        # the directory panel 3 searches for files in
        self.search_directory = None

        self.finder = None

        self.cancelled = False
        self.gathered_media_files = None
        self.import_media_player_stuff = False
        self.progress_bar = None
        self.progress_label = None
        self.search_cancel_button = None
        self.search_prev_button = None
        self.search_next_button = None

        self._done_firsttime_callback = done_firsttime_callback

        self.mp_name, self.mp_path = get_plat_media_player_name_path()
        self._has_media_player = (self.mp_name is not None
                                  and self.mp_path is not None)

        self._page_box = widgetset.VBox()
        self._pages = self.build_pages()
        self._page_index = -1

        self.set_content_widget(widgetutil.pad(self._page_box, 20, 20, 20, 20))

        self.on_close_handler = self.connect('will-close', self.on_close)