[pygobject] Remove "label" property from Gtk.MenuItem if it is not set
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Remove "label" property from Gtk.MenuItem if it is not set
- Date: Tue, 26 Jun 2012 04:11:40 +0000 (UTC)
commit a96a26234e2aaa157837d26094864e3ad9b63edf
Author: Micah Carrick <micah quixotix com>
Date: Mon Jun 25 09:05:59 2012 -0700
Remove "label" property from Gtk.MenuItem if it is not set
The Gtk.MenuItem will not render as a separator if the "label" or
"user-underline" properties have been accessed. The constructor
for Gtk.MenuItem override should not pass the "label" property
as an argument if it is None since that will still result in an
empty label widget which breaks Gtk.SeparatorMenuItem.
https://bugzilla.gnome.org/show_bug.cgi?id=670575
Signed-off-by: Martin Pitt <martinpitt gnome org>
gi/overrides/Gtk.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index ff4de24..08b3a4b 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -334,7 +334,10 @@ __all__.append('SizeGroup')
class MenuItem(Gtk.MenuItem):
def __init__(self, label=None, **kwds):
- super(MenuItem, self).__init__(label=label, **kwds)
+ if label:
+ super(MenuItem, self).__init__(label=label, **kwds)
+ else:
+ super(MenuItem, self).__init__(**kwds)
MenuItem = override(MenuItem)
__all__.append('MenuItem')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]