~woutc/specto/specto-woutc-fake-gconf

« back to all changes in this revision

Viewing changes to spectlib/watch.py

  • Committer: nekohayo
  • Date: 2007-03-14 03:18:57 UTC
  • Revision ID: svn-v3-trunk0:cc143b5f-0d1a-0410-b6b4-bdbe827cf625:trunk:88
    * clean up, rewrite a portion of port watch into something simpler
    * more themable icons
    * port watch is now available in the GUI, please test it. Fixes issue #32

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
            self.tray_y = self.specto.tray.get_y()
94
94
 
95
95
            if self.type==0:#web
96
 
                NotificationToast(self.specto, _("The website, <b>%s</b>, has been updated.") % str(self.name), self.specto.PATH + "icons/notifier/big/web.png", self.tray_x, self.tray_y)
 
96
                NotificationToast(self.specto, _("The website, <b>%s</b>, has been updated.") % str(self.name), self.specto.icon_theme.load_icon("applications-internet", 64, 0), self.tray_x, self.tray_y)
97
97
            elif self.type==1:#email
98
98
 
99
99
                if self.prot!=2:#other account than gmail
114
114
                        notification_toast = None#nothing to notify the user about.
115
115
 
116
116
                if notification_toast:
117
 
                    NotificationToast(self.specto, notification_toast, self.specto.PATH + "icons/notifier/big/mail.png", self.tray_x, self.tray_y)
 
117
                    NotificationToast(self.specto, notification_toast, self.specto.icon_theme.load_icon("emblem-mail", 64, 0), self.tray_x, self.tray_y)
118
118
 
119
119
            elif self.type==2:#folder
120
 
                NotificationToast(self.specto, _("The file/folder, <b>%s</b>, has been updated.") % self.name, self.specto.PATH + "icons/notifier/big/folder.png", self.tray_x, self.tray_y)
 
120
                NotificationToast(self.specto, _("The file/folder, <b>%s</b>, has been updated.") % self.name, self.specto.icon_theme.load_icon("folder", 64, 0), self.tray_x, self.tray_y)
121
121
            elif self.type==3:#process
122
122
                if self.running==False:
123
 
                    NotificationToast(self.specto, _("The process, <b>%s</b>, has stopped.") % self.name, self.specto.PATH + "icons/notifier/big/process.png", self.tray_x, self.tray_y)
 
123
                    NotificationToast(self.specto, _("The process, <b>%s</b>, has stopped.") % self.name, self.specto.icon_theme.load_icon("applications-system", 64, 0), self.tray_x, self.tray_y)
124
124
                elif self.running==True:
125
 
                    NotificationToast(self.specto, _("The process, <b>%s</b>, has started.") % self.name, self.specto.PATH + "icons/notifier/big/process.png", self.tray_x, self.tray_y)
 
125
                    NotificationToast(self.specto, _("The process, <b>%s</b>, has started.") % self.name, self.specto.icon_theme.load_icon("applications-system", 64, 0), self.tray_x, self.tray_y)
126
126
                else:
127
127
                    print "this is a bug. The watch", self.name, "'s value for self.running is", self.running
128
128
            elif self.type==4:#port
129
129
                if self.running==False:
130
 
                    NotificationToast(self.specto, _("The connection, <b>%s</b>, was closed.") % self.name, self.specto.PATH + "icons/notifier/big/process.png", self.tray_x, self.tray_y)
 
130
                    NotificationToast(self.specto, _("The connection, <b>%s</b>, was closed.") % self.name, self.specto.icon_theme.load_icon("network-transmit-receive", 64, 0), self.tray_x, self.tray_y)
131
131
                elif self.running==True:
132
 
                    NotificationToast(self.specto, _("The connection, <b>%s</b>, was established.") % self.name, self.specto.PATH + "icons/notifier/big/process.png", self.tray_x, self.tray_y)
 
132
                    NotificationToast(self.specto, _("The connection, <b>%s</b>, was established.") % self.name, self.specto.icon_theme.load_icon("network-offline", 64, 0), self.tray_x, self.tray_y)
133
133
                else:
134
134
                    print "this is a bug. The watch", self.name, "'s value for self.running is", self.running
135
135
            else: