Entropy/Notification Applet:
- update pixmaps (gfx) git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@3014 cd1c1023-2f26-0410-ae45-c471fc1f0318
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
entropy-notification-applet/gfx/applet/applet-disable.png
Normal file
|
After Width: | Height: | Size: 925 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 887 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -114,16 +114,18 @@ class EntropyApplet:
|
||||
elif new_state == "CRITICAL":
|
||||
self.status_icon.set_blinking(True)
|
||||
if self.never_viewed_notices:
|
||||
self.change_icon("critical", "critical-blank")
|
||||
self.change_icon("critical")
|
||||
else:
|
||||
self.set_displayed_image("critical")
|
||||
elif new_state == "NOCONSENT":
|
||||
if self.never_viewed_consent:
|
||||
self.change_icon("noconsent", "noconsent-blank")
|
||||
self.change_icon("noconsent")
|
||||
else:
|
||||
self.set_displayed_image("noconsent")
|
||||
elif new_state == "DISCONNECTED":
|
||||
self.change_icon("disconnect")
|
||||
elif new_state == "DISABLE":
|
||||
self.change_icon("disable")
|
||||
elif new_state == "ERROR":
|
||||
self.change_icon("error")
|
||||
self.current_state = new_state
|
||||
@@ -182,9 +184,8 @@ class EntropyApplet:
|
||||
self.icons.add_file("error", "applet-error.png")
|
||||
self.icons.add_file("busy", "applet-busy.png")
|
||||
self.icons.add_file("critical", "applet-critical.png")
|
||||
self.icons.add_file("critical-blank", "applet-critical-blank.png")
|
||||
self.icons.add_file("disable", "applet-disable.png")
|
||||
self.icons.add_file("noconsent", "applet-critical.png")
|
||||
self.icons.add_file("noconsent-blank", "applet-critical-blank.png")
|
||||
self.icons.add_file("disconnect", "applet-disconnect.png")
|
||||
self.icons.add_file("spritz","spritz.png")
|
||||
self.icons.add_file("about","applet-about.png")
|
||||
@@ -293,7 +294,7 @@ class EntropyApplet:
|
||||
elif name == "configure_applet":
|
||||
pix = self.icons.best_match("configuration",22)
|
||||
elif name == "disable_applet":
|
||||
pix = self.icons.best_match("disconnect",22)
|
||||
pix = self.icons.best_match("disable",22)
|
||||
elif name == "enable_applet":
|
||||
pix = self.icons.best_match("okay",22)
|
||||
else:
|
||||
@@ -362,7 +363,7 @@ class EntropyApplet:
|
||||
def disable_applet(self, *args):
|
||||
self.update_tooltip(_("Updates Notification Applet Disabled"))
|
||||
self.disable_refresh_timer()
|
||||
self.set_state("DISCONNECTED")
|
||||
self.set_state("DISABLE")
|
||||
etp_applet_config.settings['APPLET_ENABLED'] = 0
|
||||
etp_applet_config.save_settings(etp_applet_config.settings)
|
||||
self.menu_items['disable_applet'].hide()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import os
|
||||
import dumpTools
|
||||
|
||||
APPLET_STATES = [ "STARTUP", "NOCONSENT", "CONFIGURING", "OKAY", "CRITICAL", "BUSY", "ERROR", "DISCONNECTED" ]
|
||||
APPLET_STATES = [ "STARTUP", "NOCONSENT", "CONFIGURING", "OKAY", "CRITICAL", "BUSY", "ERROR", "DISCONNECTED", "DISABLE" ]
|
||||
APPLET_MENUS = [ "about", "update_now", "web_panel", "web_site", "configure_applet", "check_now" ]
|
||||
|
||||
APPLET_SENSITIVE_MENU = {
|
||||
@@ -20,6 +20,7 @@ APPLET_SENSITIVE_MENU = {
|
||||
"BUSY" : [ ],
|
||||
"ERROR" : [ "about", "update_now", "check_now" ],
|
||||
"DISCONNECTED": [ "about", "update_now", "check_now" ],
|
||||
"DISABLE": [ "about", "update_now", "check_now" ],
|
||||
}
|
||||
|
||||
RANDOM_REFRESH_DELTA = abs(hash(os.urandom(2)))%1800
|
||||
|
||||