diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hig/crumbsdialog.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/crumbsdialog.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig/crumbsdialog.py b/bitbake/lib/bb/ui/crumbs/hig/crumbsdialog.py new file mode 100644 index 0000000000..c679f9a070 --- /dev/null +++ b/bitbake/lib/bb/ui/crumbs/hig/crumbsdialog.py | |||
@@ -0,0 +1,44 @@ | |||
1 | # | ||
2 | # BitBake Graphical GTK User Interface | ||
3 | # | ||
4 | # Copyright (C) 2011-2012 Intel Corporation | ||
5 | # | ||
6 | # Authored by Joshua Lock <josh@linux.intel.com> | ||
7 | # Authored by Dongxiao Xu <dongxiao.xu@intel.com> | ||
8 | # Authored by Shane Wang <shane.wang@intel.com> | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License version 2 as | ||
12 | # published by the Free Software Foundation. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, | ||
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | # GNU General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License along | ||
20 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
22 | |||
23 | import gtk | ||
24 | |||
25 | """ | ||
26 | The following are convenience classes for implementing GNOME HIG compliant | ||
27 | BitBake GUI's | ||
28 | In summary: spacing = 12px, border-width = 6px | ||
29 | """ | ||
30 | |||
31 | class CrumbsDialog(gtk.Dialog): | ||
32 | """ | ||
33 | A GNOME HIG compliant dialog widget. | ||
34 | Add buttons with gtk.Dialog.add_button or gtk.Dialog.add_buttons | ||
35 | """ | ||
36 | def __init__(self, title="", parent=None, flags=0, buttons=None): | ||
37 | super(CrumbsDialog, self).__init__(title, parent, flags, buttons) | ||
38 | |||
39 | self.set_property("has-separator", False) # note: deprecated in 2.22 | ||
40 | |||
41 | self.set_border_width(6) | ||
42 | self.vbox.set_property("spacing", 12) | ||
43 | self.action_area.set_property("spacing", 12) | ||
44 | self.action_area.set_property("border-width", 6) | ||