示例#1
0
 def on_position_toggled(self, widget):
     """ Callback for position_toggled event """
     active = widget.get_active()
     PREFS["notify_position"] = int(active)
     self.main.notify_position = active
     if self.main.notify:
         self.main.notify.close()
         volume = self.main.get_volume()
         icon = get_icon_name(volume)
         self.main.update_notify(volume, icon)
示例#2
0
 def on_position_toggled(self, widget):
     """ Callback for position_toggled event """
     active = widget.get_active()
     PREFS["notify_position"] = int(active)
     self.main.notify_position = active
     if self.main.notify:
         self.main.notify.close()
         volume = self.main.get_volume()
         icon = get_icon_name(volume)
         self.main.update_notify(volume, icon)
示例#3
0
 def on_notify_toggled(self, widget):
     """ Callback for notify_toggled event """
     active = widget.get_active()
     PREFS["show_notify"] = int(active)
     self.main.show_notify = active
     self.main.init_notify()
     self.set_notify_sensitive(active)
     if active and self.main.notify:
         volume = self.main.get_volume()
         icon = get_icon_name(volume)
         self.main.update_notify(volume, icon)
示例#4
0
 def on_notify_toggled(self, widget):
     """ Callback for notify_toggled event """
     active = widget.get_active()
     PREFS["show_notify"] = int(active)
     self.main.show_notify = active
     self.main.init_notify()
     self.set_notify_sensitive(active)
     if active and self.main.notify:
         volume = self.main.get_volume()
         icon = get_icon_name(volume)
         self.main.update_notify(volume, icon)
示例#5
0
    def on_theme_combobox_changed(self, widget=None):
        """ Callback for theme_combobox_changed event """
        model = widget.get_model()
        iter = widget.get_active_iter()
        index = model.get_value(iter, 0)

        icon_theme = self.themes[index]
        PREFS["icon_theme"] = icon_theme
        self.main.icon_theme = icon_theme

        volume = self.main.get_volume()
        icon = get_icon_name(volume)
        self.main.update_icon(volume, icon)
示例#6
0
    def on_theme_combobox_changed(self, widget=None):
        """ Callback for theme_combobox_changed event """
        model = widget.get_model()
        iter = widget.get_active_iter()
        index = model.get_value(iter, 0)

        icon_theme = self.themes[index]
        PREFS["icon_theme"] = icon_theme
        self.main.icon_theme = icon_theme

        volume = self.main.get_volume()
        icon = get_icon_name(volume)
        self.main.update_icon(volume, icon)