def toggle_window():
    win = utils.get_main_window()

    if win.get_property('visible'):
        win.tray.cacher()
    else:
        win.tray.montrer()
示例#2
0
 def Enqueue(self, locations):        
     app_instance = utils.get_main_window()
     current_view = app_instance.playlist_ui.get_selected_song_view()
     app_instance.list_manager.switch_to_local()        
     if current_view:
         uris = utils.convert_args_to_uris(locations)                
         current_view.play_uris(uris)
 def __init__(self):
     gtk.VBox.__init__(self)
     
     self.set_spacing(5)
     self.plugins = utils.get_main_window().plugins
     self.plugins_view = TreeView()
     self.plugins_view.add_items = self.plugins_view_add_items
     self.plugins_view.set_expand_column(0)
     self.plugins_view.draw_mask = self.plugins_view_draw_mask
     self.plugins_view.set_size_request(420, 330)        
     self.plugins_view.connect("single-click-item", self.on_plugins_view_single_click)
     self.plugins_view.connect("press-return", self.on_plugins_view_press_return)
             
     self.plugins_view.set_column_titles([_("Name"), _("Version"), _("Enable"), ""],
                                         (self.sort_by_title, self.sort_by_title,
                                          self.sort_by_title, self.sort_by_title))
     plugins_view_align = set_widget_gravity(self.plugins_view, gravity=(1, 1, 1, 1),
                                             paddings=(10, 0, 0, 0))
     
     self.plugin_infos = PluginInfos()
     self.plugin_infos.set_size_request(420, 90)
     
     # plugin info
     self.pack_start(plugins_view_align, False, True)
     self.pack_start(self.plugin_infos, False, True)
 def PlayFile(self, filename):
     """
         Plays the specified file
     """
     app_instance = utils.get_main_window()
     current_view = app_instance.playlist_ui.get_selected_song_view()
     if current_view:
         current_view.add_file(filename, True)
示例#5
0
 def PlayFile(self, filename):
     """
         Plays the specified file
     """
     app_instance = utils.get_main_window()
     current_view = app_instance.playlist_ui.get_selected_song_view()
     if current_view:
         current_view.add_file(filename, True)
示例#6
0
 def GuiToggleVisible(self):
     app_instance = utils.get_main_window()
     app_instance.toggle_visible(True)
def toggle_window():
    instance = utils.get_main_window()
    instance.toggle_window()
示例#8
0
def toggle_window():
    instance = utils.get_main_window()
    instance.toggle_window()
示例#9
0
 def try_to_quit(self, widget):
     self.hide_all()
     main_window = get_main_window()
     main_window.quit()
示例#10
0
 def on_quell_button_clicked(self, widget):    
     main_window = get_main_window()
     main_window.change_app_mode("normal")
     switch_tab(self.body_box, self.info_box)