Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 935285 Details for
Bug 1138372
GtkGrid top-attach property not valid
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
reproducer
grid.py (text/plain), 1.65 KB, created by
Giuseppe Scrivano
on 2014-09-08 09:41:08 UTC
(
hide
)
Description:
reproducer
Filename:
MIME Type:
Creator:
Giuseppe Scrivano
Created:
2014-09-08 09:41:08 UTC
Size:
1.65 KB
patch
obsolete
>#!/usr/bin/env python > > >from gi.repository import GObject >from gi.repository import Gtk >from gi.repository import Gdk > > >######## from virt-manager ######################################### > >def child_get_property(parent, child, propname): > """ > Wrapper for child_get_property, which pygobject doesn't properly > introspect > """ > value = GObject.Value() > value.init(GObject.TYPE_INT) > parent.child_get_property(child, propname, value) > return value.get_int() > > >def set_grid_row_visible(child, visible): > """ > For the passed widget, find its parent GtkGrid, and hide/show all > elements that are in the same row as it. Simplifies having to name > every element in a row when we want to dynamically hide things > based on UI interraction > """ > parent = child.get_parent() > if not type(parent) is Gtk.Grid: > raise RuntimeError("Programming error, parent must be grid, " > "not %s" % type(parent)) > > row = child_get_property(parent, child, "top-attach") > for child in parent.get_children(): > if child_get_property(parent, child, "top-attach") == row: > child.set_visible(visible) > >###################################################################### > >def hide_row(widget, data=None): > set_grid_row_visible(widget, False) > >def destroy(widget, data=None): > Gtk.main_quit() > >grid = Gtk.Grid() > >for i in range(5): > button = Gtk.Button("Button " + str(i)) > button.connect("clicked", hide_row) > grid.attach(button, 0, i, 1, 1) > button.show() > >window = Gtk.Window() >window.set_border_width(10) >window.connect("destroy", destroy) > >window.add(grid) >grid.show() >window.show() > >Gtk.main() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1138372
: 935285 |
936981