[PATCH] Mark language search string translatable. (#955229)
by Samantha N. Bueno
---
pyanaconda/ui/gui/spokes/welcome.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/welcome.glade b/pyanaconda/ui/gui/spokes/welcome.glade
index f0a4602..4f79b7c 100644
--- a/pyanaconda/ui/gui/spokes/welcome.glade
+++ b/pyanaconda/ui/gui/spokes/welcome.glade
@@ -367,7 +367,7 @@
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="secondary_icon_name">edit-clear-symbolic</property>
- <property name="placeholder_text">Type here to search.</property>
+ <property name="placeholder_text" translatable="yes">Type here to search.</property>
<signal name="changed" handler="on_entry_changed" swapped="no"/>
<signal name="icon-release" handler="on_clear_icon_clicked" swapped="no"/>
</object>
--
1.7.11.7
10 years, 3 months
[anaconda][PATCH] Allow hubs and standalone spokes decide if it is possible to continue
by Vratislav Podzimek
Related: rhbz#965797
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/hubs/__init__.py | 29 +++++++++++++++++++++++++++--
pyanaconda/ui/gui/spokes/__init__.py | 18 ++++++++++++++++--
2 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 37daf47..bb473b6 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -354,11 +354,36 @@ class Hub(GUIObject, common.Hub):
self._update_spoke_id = GLib.timeout_add_seconds(1, self._update_spokes)
- ### SIGNAL HANDLERS
+ @property
+ def continue_possible(self):
+ """
+ Indicates whether it is possible to continue to the next action (hub,
+ standalone spoke,...). When overridden, IT IS THE HUB'S RESPONSIBILITY
+ to inform user, where the problem is and how to fix it.
+
+ """
+
+ return True
+
+ ### SIGNAL HANDLING
+ def _checked_continue(self, cb):
+ """
+ Checks if continue is possible (from the hub's perspective and if yes,
+ runs the callback.
+
+ """
+
+ if self.continue_possible:
+ cb()
+
+ def _register_continue_event_cb(self, cb):
+ """Registers the callback for the continue event adding the check."""
+
+ self.continueButton.connect("clicked", lambda *args: self._checked_continue(cb))
def register_event_cb(self, event, cb):
if event == "continue" and hasattr(self, "continueButton"):
- self.continueButton.connect("clicked", lambda *args: cb())
+ self._register_continue_event_cb(cb)
elif event == "quit" and hasattr(self, "quitButton"):
self.quitButton.connect("clicked", lambda *args: cb())
diff --git a/pyanaconda/ui/gui/spokes/__init__.py b/pyanaconda/ui/gui/spokes/__init__.py
index c1a35b3..bb85e1e 100644
--- a/pyanaconda/ui/gui/spokes/__init__.py
+++ b/pyanaconda/ui/gui/spokes/__init__.py
@@ -63,9 +63,23 @@ class StandaloneSpoke(Spoke, common.StandaloneSpoke):
Spoke.__init__(self, data)
common.StandaloneSpoke.__init__(self, data, storage, payload, instclass)
+ @property
+ def continue_possible(self):
+ """
+ Indicates whether it is possible to continue to the next action (hub,
+ standalone spoke,...). When overridden, IT IS THE SPOKES'S
+ RESPONSIBILITY to inform user, where the problem is and how to fix it.
+
+ """
+
+ return True
+
+
+ ### SIGNAL HANDLING
def _on_continue_clicked(self, cb):
- self.apply()
- cb()
+ if self.continue_possible:
+ self.apply()
+ cb()
def register_event_cb(self, event, cb):
if event == "continue":
--
1.7.11.7
10 years, 4 months
[blivet/anaconda f20/master] Size translations 3-D: The third dimension is terror
by David Shea
dlehman mentioned in IRC that the Size constructors are already pretty crowded
and don't need another function crudding them up, so here we go again with a
new parameter instead: spec works like before, acting as a string in user's
language, and en_spec is strings that have constant pieces, like a "MB" slapped
onto the end of a number.
10 years, 5 months
[master/f20] btrfs and xfs do not support fsck or dump at boot time (#862871)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
blivet/formats/fs.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 43f9d44..103717e 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1030,8 +1030,6 @@ class BTRFS(FS):
_linuxNative = True
_maxLabelChars = 256
_supported = True
- _dump = True
- _check = True
_packages = ["btrfs-progs"]
_minSize = 256
_maxSize = 16 * 1024 * 1024
@@ -1191,8 +1189,6 @@ class XFS(FS):
_formattable = True
_linuxNative = True
_supported = True
- _dump = True
- _check = True
_packages = ["xfsprogs"]
_infofs = "xfs_db"
_defaultInfoOptions = ["-c", "\"sb 0\"", "-c", "\"p dblocks\"",
--
1.8.3.1
10 years, 5 months
[blivet][master/f20-branch]rhel7-branch] Remove some unnecessary code to check for LVM constraints on s390x. (#873125, #885011)
by Samantha N. Bueno
Related: rhbz#873125
Related: rhbz#885011
---
blivet/__init__.py | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index 9420c50..65e8026 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -1471,20 +1471,6 @@ class Blivet(object):
"which is required for installation of %s "
"to continue.") % (productName,))
- # Prevent users from installing on s390x with (a) no /boot volume, (b) the
- # root volume on LVM, and (c) the root volume not restricted to a single
- # PV
- # NOTE: There is not really a way for users to create a / volume
- # restricted to a single PV. The backend support is there, but there are
- # no UI hook-ups to drive that functionality, but I do not personally
- # care. --dcantrell
- if arch.isS390() and not self.mountpoints.has_key('/boot') and root:
- if root.type == 'lvmlv' and not root.singlePV:
- errors.append(_("This platform requires /boot on a dedicated "
- "partition or logical volume. If you do not "
- "want a /boot volume, you must place / on a "
- "dedicated non-LVM partition."))
-
# FIXME: put a check here for enough space on the filesystems. maybe?
for (mount, size) in checkSizes:
--
1.8.3.1
10 years, 5 months
[master] Friday tests patches
by Vratislav Podzimek
These three patches try to help us with having (password) entries' visibility set
properly.
Vratislav Podzimek (3):
Put tests of .glade files into a separate directory
Add check testing visibility of password entries
Fix issues reported by the check_pw_visibility test
pyanaconda/ui/gui/spokes/advstorage/iscsi.glade | 2 +-
pyanaconda/ui/gui/spokes/lib/passphrase.glade | 2 +-
pyanaconda/ui/gui/spokes/lib/passphrase.py | 2 +-
pyanaconda/ui/gui/spokes/password.glade | 2 +-
pyanaconda/ui/gui/spokes/password.py | 2 +-
tests/Makefile.am | 8 +-
tests/accelerators/check_accelerators.py | 265 ---------------------
tests/accelerators/run_check_accelerators.sh | 22 --
tests/glade/accelerators/check_accelerators.py | 265 +++++++++++++++++++++
tests/glade/accelerators/run_check_accelerators.sh | 22 ++
tests/glade/pw_visibility/check_pw_visibility.py | 81 +++++++
.../glade/pw_visibility/run_check_pw_visibility.sh | 6 +
12 files changed, 384 insertions(+), 295 deletions(-)
delete mode 100755 tests/accelerators/check_accelerators.py
delete mode 100755 tests/accelerators/run_check_accelerators.sh
create mode 100755 tests/glade/accelerators/check_accelerators.py
create mode 100755 tests/glade/accelerators/run_check_accelerators.sh
create mode 100755 tests/glade/pw_visibility/check_pw_visibility.py
create mode 100755 tests/glade/pw_visibility/run_check_pw_visibility.sh
--
1.8.4.2
10 years, 5 months
[initial-setup][master/rhel7-branch] Ignore the SIGINT (#1035590)
by Vratislav Podzimek
We don't want Initial Setup to be interupted with Ctrl+C, especially in the text
mode.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
initial_setup/__main__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py
index a63e5a0..3e0c868 100644
--- a/initial_setup/__main__.py
+++ b/initial_setup/__main__.py
@@ -1,9 +1,12 @@
#!/bin/python
import os
import sys
+import signal
import pykickstart
from pyanaconda.users import Users
+signal.signal(signal.SIGINT, signal.SIG_IGN)
+
if "DISPLAY" in os.environ and os.environ["DISPLAY"]:
mode="gui"
else:
--
1.8.4.2
10 years, 5 months
[blivet 0/2] Make get_device_format_class behave as expected
by Anne Mulhern
Basically, most clients of get_device_format_class expect it to return None
if it can not successfully do a class lookup. However, it has been
returning DeviceFormat instead.
The first patch just sets up a few test cases to capture what is actually
going on. The second patch changes get_device_format_class so that it works
as expected, fixes up some invocations, and changes the tests accordingly.
mulhern (2):
A few simple unit tests for some formats methods.
Make get_device_format_class return None if class not found
blivet/__init__.py | 3 ++-
blivet/formats/__init__.py | 26 ++++++++++++--------------
tests/formats_test/__init__.py | 0
tests/formats_test/init_test.py | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 49 insertions(+), 15 deletions(-)
create mode 100644 tests/formats_test/__init__.py
create mode 100644 tests/formats_test/init_test.py
--
1.8.3.1
10 years, 5 months
[master][PATCH] Fix EditTUISpoke to operate only on visible entries
by Vratislav Podzimek
Entries in the EditTUISpoke may be visible or not. However, if rendering the
entries, the spoke should only count and show those that are visible and the
same applies to accepting input and switching to subscreens.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/tui/spokes/__init__.py | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index c2d0365..9972c26 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -207,6 +207,22 @@ class EditTUISpoke(NormalTUISpoke):
# to edit
self.args = None
+ @property
+ def visible_fields(self):
+ """Get the list of currently visible entries"""
+
+ # it would be nice to have this a static list, but visibility of the
+ # entries often depends on the current state of the spoke and thus
+ # changes dynamically
+ ret = []
+ for entry in self.edit_fields:
+ if callable(entry.visible) and entry.visible(self, self.args):
+ ret.append(entry)
+ elif not callable(entry.visible) and entry.visible:
+ ret.append(entry)
+
+ return ret
+
def refresh(self, args = None):
NormalTUISpoke.refresh(self, args)
@@ -242,12 +258,7 @@ class EditTUISpoke(NormalTUISpoke):
return tui.ColumnWidget([(3, [number]), (None, [title, value])], 1)
- for idx,entry in enumerate(self.edit_fields):
- if callable(entry.visible) and not entry.visible(self, self.args):
- continue
- elif not callable(entry.visible) and not entry.visible:
- continue
-
+ for idx, entry in enumerate(self.visible_fields):
entry_type = entry.aux
if entry_type == self.PASSWORD:
w = _prep_password(idx+1, entry)
@@ -263,16 +274,16 @@ class EditTUISpoke(NormalTUISpoke):
def input(self, args, key):
try:
idx = int(key) - 1
- if idx >= 0 and idx < len(self.edit_fields):
+ if idx >= 0 and idx < len(self.visible_fields):
if self.edit_fields[idx].aux == self.CHECK:
- setdeepattr(self.args, self.edit_fields[idx].attribute,
+ setdeepattr(self.args, self.visible_fields[idx].attribute,
not getdeepattr(self.args, self.edit_fields[idx][1]))
self.app.redraw()
self.apply()
else:
- self.app.switch_screen_modal(self.dialog, self.edit_fields[idx])
+ self.app.switch_screen_modal(self.dialog, self.visible_fields[idx])
if self.dialog.value is not None:
- setdeepattr(self.args, self.edit_fields[idx].attribute,
+ setdeepattr(self.args, self.visible_fields[idx].attribute,
self.dialog.value)
self.apply()
return True
--
1.8.4.2
10 years, 5 months