예제 #1
0
    def __init__(self):
        # KDE doesn't support symbolic icons afaics
        icon_name = app.icon_name if is_plasma() else app.symbolic_icon_name
        self.indicator = AppIndicator3.Indicator.new(
            get_next_app_id(), icon_name,
            AppIndicator3.IndicatorCategory.APPLICATION_STATUS)

        self.indicator.set_icon_theme_path(quodlibet.get_image_dir())
        self.indicator.set_title(app.name)
        self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
        self.menu = IndicatorMenu(app, add_show_item=True)

        def on_action_item_changed(menu, indicator):
            indicator.set_secondary_activate_target(menu.get_action_item())

        self.menu.connect("action-item-changed",
                          on_action_item_changed,
                          self.indicator)
        action_item = self.menu.get_action_item()
        self.indicator.set_secondary_activate_target(action_item)
        self.indicator.set_menu(self.menu)
        self.__scroll_id = self.indicator.connect(
            "scroll_event", self.__on_scroll)

        self.__w_sig_del = app.window.connect('delete-event',
                                              self.__window_delete)
예제 #2
0
    def __init__(self):
        # KDE doesn't support symbolic icons afaics
        icon_name = app.icon_name if is_plasma() else app.symbolic_icon_name
        self.indicator = AppIndicator3.Indicator.new(
            get_next_app_id(), icon_name,
            AppIndicator3.IndicatorCategory.APPLICATION_STATUS)

        self.indicator.set_icon_theme_path(quodlibet.get_image_dir())
        self.indicator.set_title(app.name)
        self.indicator.set_status(AppIndicator3.IndicatorStatus.ACTIVE)
        self.menu = IndicatorMenu(app, add_show_item=True)

        def on_action_item_changed(menu, indicator):
            indicator.set_secondary_activate_target(menu.get_action_item())

        self.menu.connect("action-item-changed",
                          on_action_item_changed,
                          self.indicator)
        action_item = self.menu.get_action_item()
        self.indicator.set_secondary_activate_target(action_item)
        self.indicator.set_menu(self.menu)
        self.__scroll_id = self.indicator.connect(
            "scroll_event", self.__on_scroll)

        self.__w_sig_del = app.window.connect('delete-event',
                                              self.__window_delete)
예제 #3
0
    def test_icon_theme(self):
        theme = Gtk.IconTheme.get_default()
        theme.append_search_path(quodlibet.get_image_dir())

        for i in [
                "io.github.quodlibet.QuodLibet", "io.github.quodlibet.ExFalso",
                "quodlibet-missing-cover"
        ]:
            self.failUnless(theme.has_icon(i))
예제 #4
0
    def test_icon_theme(self):
        theme = Gtk.IconTheme.get_default()
        theme.append_search_path(quodlibet.get_image_dir())

        for i in [
            "io.github.quodlibet.QuodLibet",
            "exfalso",
            "quodlibet-missing-cover"
        ]:
            self.failUnless(theme.has_icon(i))
예제 #5
0
 def test_dirs(self):
     self.assertTrue(isinstance(quodlibet.get_base_dir(), fsnative))
     self.assertTrue(isinstance(quodlibet.get_image_dir(), fsnative))
     self.assertTrue(isinstance(quodlibet.get_user_dir(), fsnative))
     self.assertTrue(isinstance(quodlibet.get_cache_dir(), fsnative))
예제 #6
0
 def test_dirs(self):
     self.assertTrue(isinstance(quodlibet.get_base_dir(), fsnative))
     self.assertTrue(isinstance(quodlibet.get_image_dir(), fsnative))
     self.assertTrue(isinstance(quodlibet.get_user_dir(), fsnative))
예제 #7
0
 def test_dirs(self):
     self.assertTrue(is_fsnative(quodlibet.get_base_dir()))
     self.assertTrue(is_fsnative(quodlibet.get_image_dir()))
     self.assertTrue(is_fsnative(quodlibet.get_user_dir()))