Patchwork [bitbake-devel,29/32] Hob(crumbs/builder.py): adjust the main window's position and ignore the case lower than 1024x768.

login
register
mail settings
Submitter Shane Wang
Date Feb. 29, 2012, 2:15 p.m.
Message ID <d676659c5d1004ab527f343bc0d757ed61bd6c3f.1330523904.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/22477/
State New
Headers show

Comments

Shane Wang - Feb. 29, 2012, 2:15 p.m.
* don't set the position of the main window to the center always
* don't show the message to users if their screen dimensions are lower than 1024x768

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
Joshua Lock - Feb. 29, 2012, 9:29 p.m.
On 29/02/12 06:15, Shane Wang wrote:
> * don't set the position of the main window to the center always
> * don't show the message to users if their screen dimensions are lower than 1024x768
>
> Signed-off-by: Shane Wang<shane.wang@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>

Thanks!

Joshua

> ---
>   bitbake/lib/bb/ui/crumbs/builder.py |    8 --------
>   1 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
> index e9853f2..f41b6a4 100755
> --- a/bitbake/lib/bb/ui/crumbs/builder.py
> +++ b/bitbake/lib/bb/ui/crumbs/builder.py
> @@ -229,20 +229,12 @@ class Builder(gtk.Window):
>       def create_visual_elements(self):
>           self.set_title("Hob - Image Creator")
>           self.set_icon_name("applications-development")
> -        self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
>           self.set_resizable(True)
>           window_width = self.get_screen().get_width()
>           window_height = self.get_screen().get_height()
>           if window_width>= hwc.MAIN_WIN_WIDTH:
>               window_width = hwc.MAIN_WIN_WIDTH
>               window_height = hwc.MAIN_WIN_HEIGHT
> -        else:
> -            lbl = "<b>Screen dimension mismatched</b>\nfor better usability and visual effects,"
> -            lbl = lbl + " the screen dimension should be 1024x768 or above."
> -            dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
> -            dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
> -            dialog.run()
> -            dialog.destroy()
>           self.set_size_request(window_width, window_height)
>
>           self.vbox = gtk.VBox(False, 0)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index e9853f2..f41b6a4 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -229,20 +229,12 @@  class Builder(gtk.Window):
     def create_visual_elements(self):
         self.set_title("Hob - Image Creator")
         self.set_icon_name("applications-development")
-        self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
         self.set_resizable(True)
         window_width = self.get_screen().get_width()
         window_height = self.get_screen().get_height()
         if window_width >= hwc.MAIN_WIN_WIDTH:
             window_width = hwc.MAIN_WIN_WIDTH
             window_height = hwc.MAIN_WIN_HEIGHT
-        else:
-            lbl = "<b>Screen dimension mismatched</b>\nfor better usability and visual effects,"
-            lbl = lbl + " the screen dimension should be 1024x768 or above."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
-            dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
-            dialog.run()
-            dialog.destroy()
         self.set_size_request(window_width, window_height)
 
         self.vbox = gtk.VBox(False, 0)