Commit Graph

26 Commits

Author SHA1 Message Date
Cole Robinson 34543b3ecd ui: Remove use of deprecated GtkAlignment
Mostly this is replaced with widget padding, and GtkBox for generic
containers

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 09:53:17 -05:00
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 f4aea0dca0 ui: Resave all files with latest glade
It creates a lot of churn.

Adjust phantom grid rows + columns while we are at it, not sure why
those counts are suddenly wrong

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-27 13:34:26 -05:00
Cole Robinson 2f7931da63 createvol: Drop Allocation field in favor of checkbox
Inspired by some discussion from here:
https://bugzilla.redhat.com/show_bug.cgi?id=1759454

Most libvirt storage volume creation doesn't actually do anything
with allocation, besides interpreting cap == alloc and cap != alloc.
The exceptions are zfs volumes, and raw file volumes. But it's unclear
what the usecase is for the latter at all.

This drops the allocation spinner and adds checkbox in its place
'Allocate entire volume now'. When enabled, it sets cap == alloc.

We only show this for file volumes. For qcow2 it defaults to unselected
(sparse), for all others it defaults to selected. If it's not showing,
it defaults to selected.

Bundled with this change is showing this field for qcow2, where
we previously only allowed nonsparse here. Libvirt and qemu-img
support non-sparse qcow2 these days.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 17:08:39 -04:00
Pino Toscano 519d409718 i18n: fix string puzzle in volume creation dialog
Use a single label to show the single sentence describing the available
space on the storage pool. This avoids the use of 3 different labels,
partially translated separately, and whose content cannot be moved.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
2020-09-17 14:25:59 -04:00
Cole Robinson 6f8c305d62 tests: uitests: Add createvol.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 67ef81895e virtManager: Convert to CSS for most color usage
* Add CSS data in config.py and install it
* Strip out all hardcoded colors and use style class annotations
* Fix colors to be more theme appropriate to fix dark theme look

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson 0937c1e54b createvol: add xmleditor UI 2019-06-13 07:15:46 -04:00
Cole Robinson bad894ad8c createvol: Modernize code style
* Have clear UI callbacks
* Group functions
* Privatize internal methods
* Don't carry around _vol internally
2019-05-13 12:08:55 -04: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
Cole Robinson f13d10590d createvol: Only show raw+qcow2 as file formats
And turn the combo into a text entry, so users can enter their
own if they want. raw and qcow2 covers the vast majority of usecases
2018-09-06 13:28:21 -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 f7bce4cca7 Use GtkButtonBox instead of GtkHButtonBox
GtkHButtonBox was deprecated since Gtk version 3.2 and should not
be used in newly-written code. Use GtkButtonBox instead. The property
orientation is set by default to horizontal.

https://developer.gnome.org/gtk3/stable/GtkHButtonBox.html
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 55739055fd ui: Set all files to minimum requirement of gtk 3.8
That way gives us better feedback from glade
2014-09-19 21:19:26 -04:00
Cole Robinson cc70aa82ab ui: Fix minor issues, and resave all files with f21 glade 2014-09-06 15:01:12 -04:00
Chen Hanxiao 2f4a424521 use binary prefixes for units where appropriate
https://bugzilla.redhat.com/show_bug.cgi?id=1103893

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-16 11:56:53 +08:00
Giuseppe Scrivano a8db7ec266 createvol: change "Format" key shortcut to Alt-o
Alt+f is already used for Finish.  Choose Alt-o as it is already used
for "Format" in other places.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-06-12 10:03:32 +02:00
Cole Robinson 7009bd2560 createvol: Bunch of misc improvements
- Hide backing store for formats that don't support it
- Hide allocation for qcow2 since it doesn't do anything
- Automatically select the storage format as specified in prefs
2013-10-01 14:50:47 -04:00
Cole Robinson 2b74c46909 snapshots: Pretty up the 'new snapshot' dialog 2013-09-30 15:38:12 -04:00
Cole Robinson b6adf48e56 createvol: Add UI for specifying backing store 2013-09-29 10:53:37 -04:00
Cole Robinson 2da4ed7cf1 createvol: Use blue header like other wizards 2013-09-27 13:17:40 -04:00
Cole Robinson d338bce329 Rename ui files to match source file names 2013-09-22 16:10:16 -04:00