| Submitter | Dongxiao Xu |
|---|---|
| Date | March 14, 2012, 9:26 a.m. |
| Message ID | <479f95f339a42d2d63d652e96f6e1e9d63e9f60d.1331716896.git.dongxiao.xu@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/23289/ |
| State | Accepted |
| Commit | 5d33c355001bec91f4e4c3860db8d7ac2b449782 |
| Headers | show |
Comments
On 14/03/12 02:26, Dongxiao Xu wrote: > For certain distributions, like FC16, it doesn't have close button in > sub-windows or dialogs. Therefore we need to add an "Close" button to > "BinbDialog" to close the dialog. > > Besides, let BinbDialog inherits the CrumbsDialog instead of gtk.Dialog > > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com> I think we want to switch to persistent tooltips for this functionality but until that change is ready this is a good patch. Signed-off-by: Joshua Lock <josh@linux.intel.com> > --- > lib/bb/ui/crumbs/hig.py | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py > index e175a2a..28b7eef 100644 > --- a/lib/bb/ui/crumbs/hig.py > +++ b/lib/bb/ui/crumbs/hig.py > @@ -94,13 +94,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, ("Close", gtk.RESPONSE_CLOSE)) > > self.set_position(gtk.WIN_POS_MOUSE) > self.set_resizable(False)
Patch
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py index e175a2a..28b7eef 100644 --- a/lib/bb/ui/crumbs/hig.py +++ b/lib/bb/ui/crumbs/hig.py @@ -94,13 +94,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, ("Close", gtk.RESPONSE_CLOSE)) self.set_position(gtk.WIN_POS_MOUSE) self.set_resizable(False)
For certain distributions, like FC16, it doesn't have close button in sub-windows or dialogs. Therefore we need to add an "Close" button to "BinbDialog" to close the dialog. Besides, let BinbDialog inherits the CrumbsDialog instead of gtk.Dialog Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> --- lib/bb/ui/crumbs/hig.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)