| Submitter | Shane Wang |
|---|---|
| Date | Feb. 29, 2012, 2:15 p.m. |
| Message ID | <79c20962f88a34c41344c8480aea6368f62c3241.1330523904.git.shane.wang@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/22475/ |
| State | New |
| Headers | show |
Comments
On 29/02/12 06:15, Shane Wang wrote: > From: Dongxiao Xu<dongxiao.xu@intel.com> > > For certain distributions, like FC16, it doesn't have close button in > sub-windows or dialogs. Therefore we need to add an "OK" button to > "BinbDialog" to close the dialog. If it exists for closing the dialogue it should be a 'Close' button. Cheers, Joshua > > Besides, let BinbDialog inherits the CrumbsDialog instead of gtk.Dialog > > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com> > --- > bitbake/lib/bb/ui/crumbs/hig.py | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py > index c5bd27a..20585b7 100644 > --- a/bitbake/lib/bb/ui/crumbs/hig.py > +++ b/bitbake/lib/bb/ui/crumbs/hig.py > @@ -90,13 +90,13 @@ class CrumbsMessageDialog(CrumbsDialog): > # > # Brought-in-by Dialog > # > -class BinbDialog(gtk.Dialog): > +class BinbDialog(CrumbsDialog): > """ > A dialog widget to show "brought in by" info when a recipe/package is clicked. > """ > > def __init__(self, title, content, parent=None): > - super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, None) > + super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("OK", gtk.RESPONSE_OK)) > > self.set_position(gtk.WIN_POS_MOUSE) > self.set_resizable(False)
On Wed, 2012-02-29 at 13:29 -0800, Joshua Lock wrote: > On 29/02/12 06:15, Shane Wang wrote: > > From: Dongxiao Xu<dongxiao.xu@intel.com> > > > > For certain distributions, like FC16, it doesn't have close button in > > sub-windows or dialogs. Therefore we need to add an "OK" button to > > "BinbDialog" to close the dialog. > > If it exists for closing the dialogue it should be a 'Close' button. Thanks, it makes sense to use "close" button. Thanks, Dongxiao > > Cheers, > Joshua > > > > > Besides, let BinbDialog inherits the CrumbsDialog instead of gtk.Dialog > > > > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com> > > --- > > bitbake/lib/bb/ui/crumbs/hig.py | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py > > index c5bd27a..20585b7 100644 > > --- a/bitbake/lib/bb/ui/crumbs/hig.py > > +++ b/bitbake/lib/bb/ui/crumbs/hig.py > > @@ -90,13 +90,13 @@ class CrumbsMessageDialog(CrumbsDialog): > > # > > # Brought-in-by Dialog > > # > > -class BinbDialog(gtk.Dialog): > > +class BinbDialog(CrumbsDialog): > > """ > > A dialog widget to show "brought in by" info when a recipe/package is clicked. > > """ > > > > def __init__(self, title, content, parent=None): > > - super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, None) > > + super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("OK", gtk.RESPONSE_OK)) > > > > self.set_position(gtk.WIN_POS_MOUSE) > > self.set_resizable(False) >
Joshua Lock wrote onĀ 2012-03-01: > On 29/02/12 06:15, Shane Wang wrote: >> From: Dongxiao Xu<dongxiao.xu@intel.com> >> >> For certain distributions, like FC16, it doesn't have close button in >> sub-windows or dialogs. Therefore we need to add an "OK" button to >> "BinbDialog" to close the dialog. > > If it exists for closing the dialogue it should be a 'Close' button. > > Cheers, > Joshua > Agree. -- Shane
Patch
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py index c5bd27a..20585b7 100644 --- a/bitbake/lib/bb/ui/crumbs/hig.py +++ b/bitbake/lib/bb/ui/crumbs/hig.py @@ -90,13 +90,13 @@ class CrumbsMessageDialog(CrumbsDialog): # # Brought-in-by Dialog # -class BinbDialog(gtk.Dialog): +class BinbDialog(CrumbsDialog): """ A dialog widget to show "brought in by" info when a recipe/package is clicked. """ def __init__(self, title, content, parent=None): - super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, None) + super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("OK", gtk.RESPONSE_OK)) self.set_position(gtk.WIN_POS_MOUSE) self.set_resizable(False)