Commit Graph

22 Commits

Author SHA1 Message Date
Cole Robinson 382391eadb Clean up gtk STOCK and various image usage
- 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>
2022-02-19 15:33:42 -05:00
Cole Robinson 6c3b5def81 netlist: Revive portgroup UI
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>
2022-01-25 16:01:17 -05:00
Cole Robinson dc41f61e5e uitests: Add combo selection helpers and use them
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson ea49c1d932 netlist: Rework the 'no network' case
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>
2020-08-26 15:20:05 -04:00
Cole Robinson 66e1eb7324 netlist: Add 'Macvtap device...' manual entry
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>
2020-01-26 11:39:34 -05:00
Cole Robinson 227d6982ae virtManager: Drop macvtap 'source mode' UI
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>
2020-01-26 11:39:34 -05:00
Cole Robinson 4c3c53f773 virtManager: Remove network portgroup UI
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>
2020-01-26 11:39:34 -05:00
Cole Robinson b4b497e28f virtManager: Remove network virtualport UI
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>
2020-01-26 11:22:18 -05:00
Cole Robinson d7fed32947 Bump gtk dep to 3.22 for new popup routines
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.
2019-04-07 13:54:00 -04:00
Radostin Stoyanov e6ae060ceb Convert GtkTable to GtkGrid
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.html
https://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>
2017-05-31 13:27:43 -04:00
Radostin Stoyanov 84419fe90c Remove deprecated GtkMisc:ypad property
GtkMisc:ypad was deprecated since Gtk version 3.14 and should not be
used in newly-written code. Use margin-top and margin-bottom instead.
Both have default value set to 0.

https://developer.gnome.org/gtk3/stable/GtkMisc.html#GtkMisc--ypad

https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--margin-top

https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--margin-bottom
2017-05-31 13:27:43 -04:00
Radostin Stoyanov dd59bd6267 Use valign property instead of yalign
GtkAlignment:yalign was deprecated since Gtk version 3.14 and
should not be used in newly-written code. Use valign property instead.

The behaviour of yalign='0' is identical to valign='start', similar
for yalign='1' and valign='end'. The default value of the property
valign is GTK_ALIGN_FILL which has simmilar behaviour to yalign='0.5'.

https://developer.gnome.org/gtk3/stable/GtkAlignment.html#GtkAlignment--yalign

https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--valign
2017-05-31 13:27:43 -04:00
Radostin Stoyanov 3243a221b5 Replace xalign='1' with halign='end'
GtkAlignment:xalign was deprecated since Gtk version 3.14 and should
not be used in newly-written code. Use halign property instead.

https://developer.gnome.org/gtk3/stable/GtkAlignment.html#GtkAlignment--xalign

https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--halign
2017-05-31 13:27:43 -04:00
Radostin Stoyanov b6731ceaa6 Replace xalign='0' with halign='start'
GtkAlignment:xalign was deprecated since Gtk version 3.14 and should
not be used in newly-written code. Use halign property instead.

https://developer.gnome.org/gtk3/stable/GtkAlignment.html#GtkAlignment--xalign

https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--halign
2017-05-31 13:27:43 -04:00
Radostin Stoyanov 5a658ef6bd Format UI files with Glade 3.20
Glade performs XML formatting on save. The changes in this commit are
generated by Glade 3.20
2017-05-31 13:27:43 -04:00
rst0git 04d46d4baa Replace GtkHBox and GtkVBox with GtkBox.
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.
2017-04-12 09:22:56 -04:00
Cole Robinson dfcac3fe9c Bump gtk and pygobject deps to 3.14
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.
2016-05-17 17:49:55 -04:00
Cole Robinson b6111b5e85 details: Fix misaligned labels (bz 1264628)
Shows up with different sized translation strings

https://bugzilla.redhat.com/show_bug.cgi?id=1264628

Reported-by: João Pirralha <joaopirralha@gmail.com>
2015-09-20 12:58:23 -04:00
Giuseppe Scrivano 2dff68c1df virtManager: Add missing shortcut keys
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1172108

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-13 15:42:46 +01:00
Cole Robinson 9369ad3ac0 virt-manager: Allow setting interface portgroup element
We only show the option if the selected virtual network actually has
portgroups listed in its XML
2014-05-31 15:51:24 -04:00
Cole Robinson f23c031af4 ui: Drop minimum version to match RHEL7
And add unit test to catch future dependency issues
2014-03-10 11:17:58 -04:00
Cole Robinson 169ae1203d Break out shared network list UI to netlist.py
Use this to show vport stuff in addhw, give a warning about macvtap
networking, and allow macvtap from the create wizard.
2014-01-28 10:00:06 -05:00