Commit Graph

467 Commits

Author SHA1 Message Date
Michael Hudson-Doyle 237611fda6 change " menu >" to "[ menu ▸ ]" 2018-06-26 10:19:57 +12:00
Michael Hudson-Doyle 1ae09926ca change button_pile to use widget_width 2018-06-26 10:12:09 +12:00
Michael Hudson-Doyle 8854e7aaaa move CursorOverride somewhere generic 2018-06-26 10:05:37 +12:00
Michael Hudson-Doyle 22ae45e99b move widget_width() to its own module
also allow our widget subclasses to specify their width
2018-06-26 09:59:48 +12:00
Michael Hudson-Doyle 5f3ce077ac
Merge pull request #372 from mwhudson/selector-tweaks
Selector tweaks
2018-06-26 09:10:46 +12:00
Michael Hudson-Doyle 8bb5621947
Merge pull request #371 from mwhudson/action-menu-tweaks
do not show > in the context menu for actions that do not open a dialog
2018-06-25 23:50:24 +12:00
Michael Hudson-Doyle 4501aee357 rework look of open selector to match 2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle 391b70cdf5 rework the look of the selector widget 2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle 7ab699716d make Selector.options a public interface 2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle 80bec75871 stop assigning to Selector.value emitting the "select" signal
for the avoidance of infinite recursion
2018-06-25 23:45:21 +12:00
Michael Hudson-Doyle f08b6a42e5 make selector a WidgetWrap rather than a decoration 2018-06-25 23:10:39 +12:00
Michael Hudson-Doyle a6f54be22a fix stupid failure of arithmetic in stretchy 2018-06-25 22:57:57 +12:00
Michael Hudson-Doyle 8b9331e5be do not show > in the context menu for actions that do not open a dialog 2018-06-25 22:52:34 +12:00
Michael Hudson-Doyle 90d580a57e remove DummyView 2018-06-22 09:39:33 +12:00
Michael Hudson-Doyle 9cbaac4542 use our custom WidgetWrap everywhere 2018-06-22 09:38:18 +12:00
Michael Hudson-Doyle ea8f97491f delete old ErrorView 2018-06-22 09:34:02 +12:00
Michael Hudson-Doyle 0e2d376ed0 build a form out of tables 2018-06-21 21:07:02 +12:00
Michael Hudson-Doyle 7093006711 fix binding more than two tables 2018-06-21 20:48:08 +12:00
Michael Hudson-Doyle 88e23fce54 fix distribution of space when widening columns to accommodate a colspan>1 column 2018-06-21 16:07:00 +12:00
Michael Hudson-Doyle f09696862a add a column option to allow a column to take available space 2018-06-21 16:07:00 +12:00
Michael Hudson-Doyle 8eb21bce72 split Table into TablePile and TableListBox
and get rid of that confusing container_maker thing
2018-06-21 16:07:00 +12:00
Michael Hudson-Doyle 119f40b72d
Merge pull request #369 from mwhudson/form-simplify
simplify the way forms are turned into widgets
2018-06-21 16:06:47 +12:00
Michael Hudson-Doyle f037ebd586 add lost_focus/gained_focus to our WidgetWrap 2018-06-21 15:39:14 +12:00
Michael Hudson-Doyle 99dd12f870 simplify how forms are built 2018-06-21 15:38:02 +12:00
Michael Hudson-Doyle ed86028dd2 provide a way for a field to opt out of default styling 2018-06-21 15:37:19 +12:00
Michael Hudson-Doyle 19d43c19c7 make field an ABC 2018-06-21 15:37:19 +12:00
Michael Hudson-Doyle ba809a9e97 simplify how form widgets get styled 2018-06-21 15:37:19 +12:00
Michael Hudson-Doyle 59da0e717b make Toggleable simpler and more robust 2018-06-21 15:37:15 +12:00
Michael Hudson-Doyle eee758d382 update STYLE_NAMES to match the styles that are currently defined 2018-06-21 12:09:40 +12:00
Michael Hudson-Doyle 76835c40ab sort STYLE_NAMES constructor 2018-06-21 12:09:40 +12:00
Michael Hudson-Doyle 8680786da3 make inputs on keyboard and welcome page of consistent width 2018-06-20 09:17:49 +12:00
Michael Hudson-Doyle 9e33874a86
Merge pull request #366 from mwhudson/mwhudson/scrollbar-tweaks
make scrollbar less intrusive
2018-06-20 08:47:56 +12:00
Michael Hudson-Doyle 68c49e5135 add some super basic filesystem tests, fix partition tests 2018-06-19 11:43:59 +12:00
Michael Hudson-Doyle de80a06f47 add actionmenu widget 2018-06-18 21:36:35 +12:00
Michael Hudson-Doyle c0d66f5540 make scrollbar less intrusive
also pretty up its implementation a bit while I am here
2018-06-18 21:24:23 +12:00
Michael Hudson-Doyle 14ad092b9d implement _select_first/last_selectable on our Columns 2018-06-15 12:26:02 +12:00
Michael Hudson-Doyle 3a59925265 work around a strange behaviour of Pile when contents is changed 2018-06-15 11:51:40 +12:00
Michael Hudson-Doyle 66578aff79 account for colspan>1 cells in width computations
I ran into that gotcha pretty quickly.
2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle b34ca65aba a slightly over-engineered table widget
that takes column widths from the contens of the cells, unlike
most things in urwid
2018-06-15 11:48:19 +12:00
Michael Hudson-Doyle 2f184ce9a6 fix display of install progress in footer 2018-06-13 14:02:40 +12:00
Michael Hudson-Doyle 1ab495c0a8 fix refreshing network view on network changes 2018-06-13 13:38:03 +12:00
Michael Hudson-Doyle d315751d60 add our own version of WidgetWrap
urwid doesn't know about the _select_first/last_selectable methods our
containers use to make tab-cycling work so its WidgetWrap doesn't
forward them along. So add a WidgetWrap that does, and use it in the one
place that it matters so far (more coming soon!).
2018-06-11 14:13:44 +12:00
Scott Moser 3e69673501 Fix writing of netplan configs
When user configures network with subiquity, it's rendered
netplan should be wholly definitive.  So, we remove the other files
that may have config.  This fixes a bug where running in an instance
when running on a system where cloud-init had rendered a 'match' with
'macaddress'.

When writing netplan we keep 'macaddress' match in place but drop
others.  The others may just wildcard from the installer environment,
but macaddress are likely by cloud-init or otherwise intentionally
written.

Also add an atomic write in subiquitycore/file_util and move the
netplan code into subiquitycore/netplan.py, and add some unit test
helpers from cloud-init.
2018-06-07 11:46:34 -04:00
Michael Hudson-Doyle 270ba0992a fix selectability in non-scrolling stretchy 2018-06-07 12:50:50 +12:00
Scott Moser 51a7169904 tox: Support running tests and flake8 in tox.
This puts into place a tox.ini for running unit tests without
a large amount of deps installed into the system. For example,
we did not want to need libnl-route-3-dev or build-essential installed
in the system in order to run unit tests.

In order avoid import errors in the modules due to these missing
dependencies, we have added a 'fake_deps/' directory that provides
mock'd objects of the dependencies that were used.

The only installed packages necessary for this to run should be
tox itself and its dependencies (pip and friends).  From a clean new
container we can then do:
  apt-get install tox
  git clone ...
  tox

Also along the way:
 * adjust setup.py to only need the DistUtilsExtra during 'build'.
   This means tox usage doesn't require python3-distutils-extra.
 * drop use of lsb_release in favor of built-in parsing.
   This python module wasn't doing much.  We can parse /etc/lsb-release
   ourselves with less footprint.  Also part of the motivation for this
   is that lsb_release was not on pypi.
 * replace use of StorageInfo in test_partition.py with a FakeStorageInfo
 * .gitignore: ignore only the top level 'probert' directory so that
   we can track fake_deps/probert.
 * fix a couple escape chars, by using raw strings (r'').
 * adjust gettext to return un-modified strings rather than '_(string)',
   but support old style if FAKE_TRANSLATE=mangle.
2018-06-05 17:59:46 -04:00
Michael Hudson-Doyle eab0f668ff use general machinery a little more 2018-05-31 10:28:29 +12:00
Michael Hudson-Doyle ed5e1d86b5 fix lint 2018-05-25 10:43:55 +12:00
Ryan Harper 053a1c249d pyflakes3 fixes for subiquitycore/__init__.py 2018-05-24 16:59:31 -05:00
Ryan Harper d7c8b1111b pep8 fixes for subiquitycore/core.py 2018-05-24 16:59:31 -05:00
Ryan Harper d293c52152 pep8 fixes for subiquitycore/tasksequence.py 2018-05-24 16:59:31 -05:00