Patchwork [bitbake-devel,5/6] ui/crumbs/builder: remove OK/Cancel buttons on Layer dialog. Use Close.

login
register
mail settings
Submitter Joshua Lock
Date March 20, 2012, 12:18 a.m.
Message ID <4efa2980aa09953bf53ab4da08a0ad50000d4da0.1332202341.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/23835/
State Accepted
Commit 65d92efe2786f21b8a2790ef0383f87b6dc15b57
Headers show

Comments

Joshua Lock - March 20, 2012, 12:18 a.m.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/crumbs/builder.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Dongxiao Xu - March 20, 2012, 6:04 a.m.
On Mon, 2012-03-19 at 17:18 -0700, Joshua Lock wrote:
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
>  lib/bb/ui/crumbs/builder.py |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index 1d255ac..9e85e72 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -668,8 +668,7 @@ class Builder(gtk.Window):
>                       flags = gtk.DIALOG_MODAL
>                           | gtk.DIALOG_DESTROY_WITH_PARENT
>                           | gtk.DIALOG_NO_SEPARATOR,
> -                     buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
> -                                gtk.STOCK_OK, gtk.RESPONSE_YES))
> +                     buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES))

If users did some trial operations, for example deleted some layers, is
it better that we provide a "cancel" button for users to ignore their
changes?

Need comments from Belen and Giulia.

Thanks,
Dongxiao

>          response = dialog.run()
>          if response == gtk.RESPONSE_YES:
>              self.configuration.layers = dialog.layers
Joshua Lock - March 20, 2012, 5:29 p.m.
On 19/03/12 23:04, Xu, Dongxiao wrote:
> On Mon, 2012-03-19 at 17:18 -0700, Joshua Lock wrote:
>> Signed-off-by: Joshua Lock<josh@linux.intel.com>
>> ---
>>   lib/bb/ui/crumbs/builder.py |    3 +--
>>   1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
>> index 1d255ac..9e85e72 100755
>> --- a/lib/bb/ui/crumbs/builder.py
>> +++ b/lib/bb/ui/crumbs/builder.py
>> @@ -668,8 +668,7 @@ class Builder(gtk.Window):
>>                        flags = gtk.DIALOG_MODAL
>>                            | gtk.DIALOG_DESTROY_WITH_PARENT
>>                            | gtk.DIALOG_NO_SEPARATOR,
>> -                     buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
>> -                                gtk.STOCK_OK, gtk.RESPONSE_YES))
>> +                     buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES))
>
> If users did some trial operations, for example deleted some layers, is
> it better that we provide a "cancel" button for users to ignore their
> changes?
>
> Need comments from Belen and Giulia.

Fair point, I'll wait for input from the design team for this one.

Cheers,
Joshua

Patch

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 1d255ac..9e85e72 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -668,8 +668,7 @@  class Builder(gtk.Window):
                      flags = gtk.DIALOG_MODAL
                          | gtk.DIALOG_DESTROY_WITH_PARENT
                          | gtk.DIALOG_NO_SEPARATOR,
-                     buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_NO,
-                                gtk.STOCK_OK, gtk.RESPONSE_YES))
+                     buttons = (gtk.STOCK_CLOSE, gtk.RESPONSE_YES))
         response = dialog.run()
         if response == gtk.RESPONSE_YES:
             self.configuration.layers = dialog.layers