- Remove most use of deprecated stock icons. Without it the UI will
be a lot more ugly in Fedora 36
- Remove deprecated ImageMenuItem usage, convert to regular MenuItem
- Remove most embedded button images
Signed-off-by: Cole Robinson <crobinso@redhat.com>
I removed Portgroup UI in 4c3c53f773 release 3.0.0, but there's been
a steady stream of requests to bring it back. It seems it's commonly
used with some certain openvswitch config.
Maint burden isn't too bad. Let's bring it back
Fixes: https://github.com/virt-manager/virt-manager/issues/169
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Always force a network selection. If we have to fall back to
manual bridge UI because nothing else exists, show a warning.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Similar to the bridge option. We will be removing the explicit
device listing support soon, so this will be required for specifying
a macvtap device
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Some related bits were discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html
"""
* macvtap is kinda problematic in general because it doesn't provide
out of the box host<->guest communication, and it requires a
special XML option just to get working ipv6. Users that know they
want it usually know this distinction, but if someone chooses it
without understanding the implications it can cause confusion.
This puts it hovering the intermediate/advanced user line which
makes me want to not advertise it as prominently as we currently do,
with an explicit list of host interfaces
"""
Part of this is that the only source_mode that will work in a useful
way for the vast majority of users is mode=bridge. Any of the other
modes either require special hardware, permissions, or other
configuration. Default to bridge mode. The XML editor is there for
anyone that knows they need something different
Signed-off-by: Cole Robinson <crobinso@redhat.com>
portgroups are a way to group logical chunks of settings inside
a <network> object. They are a quite advanced feature that I expect
many few users are using, and the ones that are using it are certainly
advanced enough to edit the XML directly.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html
"""
* network virtualport configuration: this is some really obscure
stuff for configuring VEPA for macvtap devices. I don't think it gets
any usage in practice. I think a smaller subset of this UI is shared
with openswitch config but I believe it's just a single field, we
could keep that even though I don't think many people use it either
"""
This removes it all. The openvswitch piece was not properly wired
up anyways, since it requires setting virtualport type for a bridge.
For users that know they need that, they can add it via the XML
editor.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Given that we bumped deps to fairly modern distros with the
python3 change, I think this is safe. gtk 3.22 is from sep 2016, it's
in debian9 and fedora 25+, which seems fine for our needs.
GtkTable was deprecated since Gtk version 3.4 and should not be used
in newly-written code. It should be replaced by GtkGrid.
https://developer.gnome.org/gtk3/stable/GtkTable.htmlhttps://developer.gnome.org/gtk3/stable/GtkGrid.html
GtkTable is mapped to GtkGrid following these rules:
----------------
- n_(row|columns) are removed because they are not required for
GtkGrid
----------------
- Missing "left_attach" and "top_attach" are added with value set to
0.
Example:
<property name="left_attach">0</property>
<property name="top_attach">0</property>
----------------
- (right_attach - left_attach) > 1 is stored in new "width" property
Example:
In case of: (GtkTable)
<property name="left_attach">1</property>
<property name="right_attach">4</property>
Equivalent to: (GtkGrid)
<property name="width">3</property>
----------------
- (bottom_attach - top_attach) > 1 is stored in new "height" property
Example:
In case of: (GtkTable)
<property name="top_attach">1</property>
<property name="bottom_attach">3</property>
Equivalent to: (GtkGrid)
<property name="height">2</property>
----------------
- Missing packing "(x|y)_options" property is represented as no
"(h|v)align" object property and "(h|v)expand" object property
set to "true"
Example:
In case of: (GtkTable)
# Missing y_options property
Equivalent to: (GtkGrid)
<property name="vexpand">True</property>
# No valign property
----------------
- Packing "(x|y)_options" property set to "GTK_FILL" is represented
as no "(h|v)expand" object property and no "(h|v)align" object
property
Example:
In case of: (GtkTable)
<property name="x_options">GTK_FILL</property>
Equivalent to: (GtkGrid)
# No hexpand property
# No halign property
----------------
- Packing "(x|y)_options" property set to "GTK_EXPAND" is
represented as "(h|v)expand" object property set to "true" and
"(h|v)align" object property set to "center"
Example:
In case of: (GtkTable)
<property name="x_options">GTK_EXPAND</property>
Equivalent to: (GtkGrid)
<property name="hexpand">True</property>
<property name="halign">center</property>
----------------
- Packing "(x|y)_options" property set to nothing is represented as
"(h|v)align" object property set to "center"
Example:
In case of: (GtkTable)
<property name="y_options" />
Equivalent to: (GtkGrid)
<property name="valign">center</property>
----------------
- All "(x|y)_options" rules apply but don't change existing
"(h|v)align" and "(h|v)expand" object properties
----------------
- Packing "x_padding" property is converted to "margin_(start|end)"
object property
Example:
In case of: (GtkTable)
<property name="x_padding">6</property>
Equivalent to: (GtkGrid)
<property name="margin_start">6</property>
<property name="margin_end">6</property>
----------------
- Packing "y_padding" property is converted to "margin_(top|bottom)"
object property
Example:
In case of: (GtkTable)
<property name="y_padding">6</property>
Equivalent to: (GtkGrid)
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
Problem:
- GtkHBox and GtkVBox have been deprecated since version 3.2 and should not be used in newly-written code.
Solution: Replace GtkHBox and GtkVBox with GtkBox.
- I have used the find function in text-editor to find all occurances of "GtkVBox" and "GtkHBox" then replaced them with "GtkBox".
- Then append on a new line immediately after "<property name="orientation">...</property>" with value "horizontal" or "vertical" accordingly.
We need to bump the gtk dep to at least 3.10 for GtkRevealer usage,
and I want to bump the pygobject higher to drop some bug workarounds.
But since the oldest thing I have that meets those requirements is
RHEL/Centos 7.3 which is at 3.14 for both, set those as the minimum
versions since that's what I'll be testing against. They are still
1.5 years old and only a bit over a year newer than the previous
versions, so it's not a huge change.