diff options
Diffstat (limited to 'desktop/sweetener/alerts.py')
-rw-r--r-- | desktop/sweetener/alerts.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/desktop/sweetener/alerts.py b/desktop/sweetener/alerts.py deleted file mode 100644 index 7f90efb..0000000 --- a/desktop/sweetener/alerts.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2012 S. Daniel Francis <francis@sugarlabs.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. - -import gtk - -import pynotify -import info -pynotify.init(info.name) - - -class Alert(gtk.MessageDialog): - def __init__(self, parent, title, content, mtype): - gtk.MessageDialog.__init__(self, parent, gtk.DIALOG_MODAL, - type=mtype, - buttons=gtk.BUTTONS_OK) - self.set_markup('<b>%s</b>' % title) - self.format_secondary_markup(content) - - def run(self): - gtk.MessageDialog.run(self) - gtk.MessageDialog.destroy(self) - - -class NotifyAlert(pynotify.Notification): - def __init__(self, parent, title, content, icon, timeout): - pynotify.Notification.__init__(self, title, message=content, icon=icon) - self.set_timeout(timeout) - - def run(self): - self.show() |