Top | ![]() |
![]() |
![]() |
![]() |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkEventBox ╰── AnacondaDiskOverview
A AnacondaDiskOverview is a potentially selectable widget that displays a disk device's size, kind, and a prominant icon based on the kind of device. This widget can come in different sizes, depending on where it needs to be used.
As a AnacondaDiskOverview is a subclass of a GtkEventBox, any signals may be caught. The “button-press-event” signal is already handled internally to change the background color, but may also be handled by user code in order to take some action based on the disk clicked upon.
Example 5.
1 2 3 4 5 6 7 |
AnacondaDiskOverview ├── #anaconda-disk-capacity ├── #anaconda-disk-kind ├── #anaconda-disk-description ├── #anaconda-disk-name[.anaconda-disk-details] ├── #anaconda-disk-separator[.anaconda-disk-details] ╰── #anaconda-disk-free[.anaconda-disk-details] |
The internal widgets are accessible by name for the purposes of CSS selectors.
anaconda-disk-capacity
The total size of the disk, plus units
anaconda-disk-kind
The icon displayed for the type of disk this widget is describing
anaconda-disk-description
The string describing the disk
anaconda-disk-name
The name of the device
anaconda-disk-free
The amount of free, unpartitioned space on the disk, plus units
anaconda-disk-separator
A string separating the name and free labels.
Additionally, anaconda-disk-name, anaconda-disk-free, and anaconda-disk-separator are all accessible via the .anaconda-disk-details class.
GtkWidget * anaconda_disk_overview_new ();
Creates a new AnacondaDiskOverview, which is a potentially selectable widget that displays basic information about a single storage device, be that a regular disk or a more complicated network device.
gboolean
anaconda_disk_overview_get_chosen (AnacondaDiskOverview *widget
);
Returns whether or not this disk has been chosen by the user.
Since: 1.0
void anaconda_disk_overview_set_chosen (AnacondaDiskOverview *widget
,gboolean is_chosen
);
Specifies whether the disk shown by this overview has been chosen by the user for inclusion in installation. If so, a special background will be set as a visual indicator.
Since: 1.0
struct AnacondaDiskOverview;
The AnacondaDiskOverview struct contains only private fields and should not be directly accessed.
“capacity”
property“capacity” gchar *
The :capacity string is the total size of the disk, plus units.
Flags: Read / Write
Default value: "0 MB"
Since: 1.0
“description”
property“description” gchar *
The :description string is a very basic description of the device and is displayed in bold letters under the icon.
Flags: Read / Write
Default value: "New Device"
Since: 1.0
“free”
property“free” gchar *
The :free string is the amount of free, unpartitioned space on the disk, plus units.
Flags: Read / Write
Default value: "0 MB"
Since: 1.0
“kind”
property“kind” gchar *
The :kind string specifies what type of disk device this is, used to figure out what icon to be displayed. This should be something like "drive-harddisk", "drive-removable-media", etc.
Flags: Read / Write
Default value: "drive-harddisk"
Since: 1.0
“name”
property“name” gchar *
The :name string provides this device's node name (like 'sda'). Note that these names aren't guaranteed to be consistent across reboots but their use is so ingrained that we need to continue displaying them.
Flags: Read / Write
Default value: ""
Since: 1.0
“popup-info”
property“popup-info” gchar *
The :popup-info string is text that should appear in a tooltip when the AnacondaDiskOverview is hovered over. For normal disk devices, this could be available space information. For more complex devics, this could be WWID, LUN, and so forth.
Flags: Read / Write
Default value: ""
Since: 1.0