Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Parkinson <sam.parkinson3@gmail.com>2014-01-29 00:41:48 (GMT)
committer Sam Parkinson <sam.parkinson3@gmail.com>2014-01-29 00:41:48 (GMT)
commit98116fe2a53ca38fcdf802cc134698829836a7b7 (patch)
treed8a5992e9b1cd67e524e83022168a9bbea4bd340
parentdfc075728afa89892c0b50d58e3012ae856602a4 (diff)
Hello notifications
-rw-r--r--activity.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/activity.py b/activity.py
index 2252983..5840a45 100644
--- a/activity.py
+++ b/activity.py
@@ -18,6 +18,7 @@
from gi.repository import Gtk
import logging
+import dbus
from gettext import gettext as _
@@ -72,7 +73,15 @@ class HelloWorldActivity(activity.Activity):
self.set_toolbar_box(toolbar_box)
toolbar_box.show()
- # label with the text, make the string translatable
- label = Gtk.Label(_("Hello World!"))
- self.set_canvas(label)
- label.show()
+ button = Gtk.Button(label=_("Notify!"))
+ self.set_canvas(button)
+ button.show()
+ button.connect('clicked', self.__notify_pressed)
+
+ def __notify_pressed(self, bnt):
+ import time
+ time.sleep(3)
+ self.notify("Hello World", "From some <i>activity</i>", None)
+
+ def read_file(self, file_):
+ pass