Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] builder: Add Please Wait Dialog Box [1.3/1.2.1]
Date: Wed,  2 May 2012 18:55:25 -0700	[thread overview]
Message-ID: <1336010125-16381-1-git-send-email-sgw@linux.intel.com> (raw)

Add dialog box while bitbake starts hob to inform user
to please wait for the hob screen to become visible.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-graphics/builder/builder_0.1.bb       |    7 +++-
 .../builder/files/builder_hob_start.sh             |    2 +
 .../builder/files/please_wait_dialog.py            |   28 ++++++++++++++++++++
 3 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-graphics/builder/files/please_wait_dialog.py

diff --git a/meta/recipes-graphics/builder/builder_0.1.bb b/meta/recipes-graphics/builder/builder_0.1.bb
index af6ba51..cb5f440 100644
--- a/meta/recipes-graphics/builder/builder_0.1.bb
+++ b/meta/recipes-graphics/builder/builder_0.1.bb
@@ -1,11 +1,13 @@
 SUMMARY = "New user to do specific job"
 DESCRIPTION = "This recipe create a new user named ${PN}, who is used for specific jobs like building. The task can be auto started via mini X"
 SECTION = "x11"
-PR = "r2"
+PR = "r3"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://builder_hob_start.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e"
 
-SRC_URI = "file://builder_hob_start.sh"
+SRC_URI = "file://builder_hob_start.sh \
+           file://please_wait_dialog.py \
+          "
 
 S = "${WORKDIR}"
 
@@ -23,5 +25,6 @@ do_install () {
 	install -p -m 755 builder_hob_start.sh ${D}/etc/mini_x/session.d/
 
 	chown  ${PN}.${PN} ${D}/etc/mini_x/session.d/builder_hob_start.sh
+        install -p -m 755 please_wait_dialog.py ${D}/etc/mini_x
 }
 
diff --git a/meta/recipes-graphics/builder/files/builder_hob_start.sh b/meta/recipes-graphics/builder/files/builder_hob_start.sh
index 98b2adb..883535b 100644
--- a/meta/recipes-graphics/builder/files/builder_hob_start.sh
+++ b/meta/recipes-graphics/builder/files/builder_hob_start.sh
@@ -18,3 +18,5 @@ sed -i 's/^#PARALLEL_MAKE =/PARALLEL_MAKE =/g' conf/local.conf
 hob &
 
 matchbox-terminal&
+
+/etc/mini_x/please_wait_dialog.py &
diff --git a/meta/recipes-graphics/builder/files/please_wait_dialog.py b/meta/recipes-graphics/builder/files/please_wait_dialog.py
new file mode 100644
index 0000000..fd2381b
--- /dev/null
+++ b/meta/recipes-graphics/builder/files/please_wait_dialog.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+import glib
+import gtk
+ 
+def destroy_window_cb(widget, event):
+    gtk.main_quit()
+ 
+def all_done_cb():
+    gtk.main_quit()
+ 
+def dialogue_ui():
+    window = gtk.Window()
+    window.set_title("Please wait...")
+    window.connect("delete-event", destroy_window_cb)
+    window.show()
+    window.set_border_width(12)
+ 
+    msg = "Please wait while BitBake initializes Hob"
+    label = gtk.Label(msg)
+    label.show()
+    window.add(label)
+ 
+    glib.timeout_add_seconds(10, all_done_cb)
+ 
+if __name__ == "__main__":
+    dialogue_ui()
+    gtk.main()
+
-- 
1.7.7.6




                 reply	other threads:[~2012-05-03  2:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336010125-16381-1-git-send-email-sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox