[PATCH] Only display the addon separator if there's a reason to.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/software.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 473e0c2..4fbd16c 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -347,11 +347,16 @@ class SoftwareSelectionSpoke(NormalSpoke):
# state will be used. Otherwise, the add-on will be selected if it is a default
# for this environment.
+ addSep = len(self._environmentAddons[self.environment][0]) > 0 and \
+ len(self._environmentAddons[self.environment][1]) > 0
+
for grp in self._environmentAddons[self.environment][0]:
self._addAddon(grp)
- # This marks a separator in the view.
- self._addonStore.append([False, "", "", True])
+ # This marks a separator in the view - only add it if there's both environment
+ # specific and generic addons.
+ if addSep:
+ self._addonStore.append([False, "", "", True])
for grp in self._environmentAddons[self.environment][1]:
self._addAddon(grp)
--
1.8.3.1
10 years, 4 months
[PATCH] Change the Network spoke header to be consistent with hub name
by Martin Kolman
As most spokes have the same name both in the hub & spoke header, this patch changes
the Network spoke from "NETWORK CONFIGURATION" to "NETWORK & HOSTNAME".
For the standalone network spoke, I've left the old name, as in its context
(getting network up before the configuration & installation begins),
IMHO "NETWORK CONFIGURATION" makes more sense.
Martin Kolman (1):
Rename network spoke header
pyanaconda/ui/gui/spokes/network.glade | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
1.8.4.2
10 years, 4 months
[PATCH] Stop using deprecated gtk margin functions.
by Chris Lumens
---
configure.ac | 2 +-
widgets/src/BaseWindow.c | 4 ++--
widgets/src/LayoutIndicator.c | 4 ++--
widgets/src/MountpointSelector.c | 4 ++--
widgets/src/StandaloneWindow.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3b736fa..f1575f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,7 +147,7 @@ PKG_PROG_PKG_CONFIG([0.23])
PKG_CHECK_MODULES([X11], [x11 >= 1.3])
PKG_CHECK_MODULES([XCOMPOSITE], [xcomposite >= 0.4.1])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.1])
-PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0 >= 3.0])
+PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0 >= 3.11.2])
PKG_CHECK_MODULES([GDK], [gdk-3.0])
PKG_CHECK_MODULES([NETWORKMANAGER], [NetworkManager >= 0.7.1])
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= 1.0])
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index 77977cf..26ec2b5 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -229,8 +229,8 @@ static void anaconda_base_window_init(AnacondaBaseWindow *win) {
win->priv->nav_area = gtk_grid_new();
gtk_grid_set_row_homogeneous(GTK_GRID(win->priv->nav_area), FALSE);
gtk_grid_set_column_homogeneous(GTK_GRID(win->priv->nav_area), FALSE);
- gtk_widget_set_margin_left(win->priv->nav_area, 6);
- gtk_widget_set_margin_right(win->priv->nav_area, 6);
+ gtk_widget_set_margin_start(win->priv->nav_area, 6);
+ gtk_widget_set_margin_end(win->priv->nav_area, 6);
gtk_widget_set_margin_top(win->priv->nav_area, 6);
gtk_container_add(GTK_CONTAINER(win->priv->nav_box), win->priv->nav_area);
diff --git a/widgets/src/LayoutIndicator.c b/widgets/src/LayoutIndicator.c
index 2a44560..4e29523 100644
--- a/widgets/src/LayoutIndicator.c
+++ b/widgets/src/LayoutIndicator.c
@@ -224,8 +224,8 @@ static void anaconda_layout_indicator_init(AnacondaLayoutIndicator *self) {
self->priv->main_box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4));
gtk_box_pack_start(self->priv->main_box, self->priv->icon, FALSE, FALSE, 0);
gtk_box_pack_end(self->priv->main_box, GTK_WIDGET(self->priv->layout_label), FALSE, FALSE, 0);
- gtk_widget_set_margin_left(GTK_WIDGET(self->priv->main_box), 4);
- gtk_widget_set_margin_right(GTK_WIDGET(self->priv->main_box), 4);
+ gtk_widget_set_margin_start(GTK_WIDGET(self->priv->main_box), 4);
+ gtk_widget_set_margin_end(GTK_WIDGET(self->priv->main_box), 4);
gtk_widget_set_margin_top(GTK_WIDGET(self->priv->main_box), 3);
gtk_widget_set_margin_bottom(GTK_WIDGET(self->priv->main_box), 3);
diff --git a/widgets/src/MountpointSelector.c b/widgets/src/MountpointSelector.c
index e14072b..24a0855 100644
--- a/widgets/src/MountpointSelector.c
+++ b/widgets/src/MountpointSelector.c
@@ -196,7 +196,7 @@ static void anaconda_mountpoint_selector_init(AnacondaMountpointSelector *mountp
/* Create the grid. */
mountpoint->priv->grid = gtk_grid_new();
gtk_grid_set_column_spacing(GTK_GRID(mountpoint->priv->grid), 12);
- gtk_widget_set_margin_left(GTK_WIDGET(mountpoint->priv->grid), 30);
+ gtk_widget_set_margin_start(GTK_WIDGET(mountpoint->priv->grid), 30);
/* Create the icon. We don't need to check if it returned NULL since
* gtk_image_new_from_file will just display a broken image icon in that
@@ -235,7 +235,7 @@ static void anaconda_mountpoint_selector_init(AnacondaMountpointSelector *mountp
gtk_grid_attach(GTK_GRID(mountpoint->priv->grid), mountpoint->priv->size_label, 1, 0, 1, 2);
gtk_grid_attach(GTK_GRID(mountpoint->priv->grid), mountpoint->priv->arrow, 2, 0, 1, 2);
gtk_grid_attach(GTK_GRID(mountpoint->priv->grid), mountpoint->priv->name_label, 0, 1, 1, 2);
- gtk_widget_set_margin_right(GTK_WIDGET(mountpoint->priv->grid), 12);
+ gtk_widget_set_margin_end(GTK_WIDGET(mountpoint->priv->grid), 12);
gtk_container_add(GTK_CONTAINER(mountpoint), mountpoint->priv->grid);
}
diff --git a/widgets/src/StandaloneWindow.c b/widgets/src/StandaloneWindow.c
index 5bb5b7c..a770bc7 100644
--- a/widgets/src/StandaloneWindow.c
+++ b/widgets/src/StandaloneWindow.c
@@ -145,8 +145,8 @@ static void anaconda_standalone_window_init(AnacondaStandaloneWindow *win) {
/* Create the button box and pack the buttons into it. */
win->priv->button_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_widget_set_margin_left(win->priv->button_box, 6);
- gtk_widget_set_margin_right(win->priv->button_box, 6);
+ gtk_widget_set_margin_start(win->priv->button_box, 6);
+ gtk_widget_set_margin_end(win->priv->button_box, 6);
gtk_widget_set_margin_bottom(win->priv->button_box, 6);
gtk_button_box_set_layout(GTK_BUTTON_BOX(win->priv->button_box), GTK_BUTTONBOX_EDGE);
gtk_container_add(GTK_CONTAINER(win->priv->button_box), win->priv->quit_button);
--
1.8.3.1
10 years, 4 months
[PATCH] Fix the check_accelerators srcdir path.
by David Shea
The check_accelerators script moved to a different directory, so fix the
path it uses for $srcdir when run outside of automake.
---
tests/glade/accelerators/run_check_accelerators.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/glade/accelerators/run_check_accelerators.sh b/tests/glade/accelerators/run_check_accelerators.sh
index d090b29..79a9899 100755
--- a/tests/glade/accelerators/run_check_accelerators.sh
+++ b/tests/glade/accelerators/run_check_accelerators.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-: "${top_srcdir:=$(dirname "$0")/../..}"
+: "${top_srcdir:=$(dirname "$0")/../../..}"
srcdir="${top_srcdir}/tests/glade/accelerators"
# If --translate was specified but not --podir, add --podir
--
1.8.4.2
10 years, 4 months
[PATCHv2] Use libxklavier's new methods instead of our nasty hack
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda.spec.in | 5 +++--
pyanaconda/keyboard.py | 49 +++++++++++++++----------------------------------
2 files changed, 18 insertions(+), 36 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 923a16c..3d8f710 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -41,6 +41,7 @@ Source0: %{name}-%{version}.tar.bz2
%define rpmver 4.10.0
%define libarchivever 3.0.4
%define langtablever 0.0.18-1
+%define libxklavierver 5.4
BuildRequires: audit-libs-devel
BuildRequires: gettext >= %{gettextver}
@@ -55,7 +56,7 @@ BuildRequires: libXt-devel
BuildRequires: libXxf86misc-devel
BuildRequires: libgnomekbd-devel
BuildRequires: libnl-devel >= %{libnlver}
-BuildRequires: libxklavier-devel
+BuildRequires: libxklavier-devel >= %{libxklavierver}
BuildRequires: pango-devel
BuildRequires: pykickstart >= %{pykickstartver}
%if ! 0%{?rhel}
@@ -105,7 +106,7 @@ Requires: python-IPy
Requires: python-nss
Requires: tigervnc-server-minimal
Requires: pytz
-Requires: libxklavier
+Requires: libxklavier >= %{libxklavierver}
Requires: libgnomekbd
Requires: realmd
Requires: teamd
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 21505a2..82ec405 100644
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -32,11 +32,9 @@ keymaps.
"""
-import types
import os
import re
import shutil
-import ctypes
import gettext
import threading
@@ -351,21 +349,6 @@ def background_XklWrapper_initialize():
threadMgr.add(AnacondaThread(name=THREAD_XKL_WRAPPER_INIT, target=XklWrapper.get_instance))
-def item_str(s):
- """Convert a zero-terminated byte array to a proper str"""
-
- # depending of version of libxklavier and the tools generating introspection
- # data the value of 's' can be either byte string or list of integers
- if type(s) == types.StringType:
- i = s.find(b'\x00')
- s = s[:i]
- elif type(s) == types.ListType:
- # XXX: this is the wrong case that should be fixed (rhbz#920595)
- i = s.index(0)
- s = "".join(chr(ctypes.c_uint8(char).value) for char in s[:i])
-
- return s.decode("utf-8") #there are some non-ascii layout descriptions
-
class XklWrapperError(KeyboardConfigError):
"""Exception class for reporting libxklavier-related problems"""
@@ -442,48 +425,46 @@ class XklWrapper(object):
def _get_lang_variant(self, c_reg, item, subitem, lang):
if subitem:
- name = item_str(item.name) + " (" + item_str(subitem.name) + ")"
- description = item_str(subitem.description)
+ name = item.get_name() + " (" + subitem.get_name() + ")"
+ description = subitem.get_description()
else:
- name = item_str(item.name)
- description = item_str(item.description)
+ name = item.get_name()
+ description = item.get_description()
#if this layout has already been added for some other language,
#do not add it again (would result in duplicates in our lists)
if name not in self._layout_infos:
- self._layout_infos[name] = LayoutInfo(lang.encode("utf-8"),
- description.encode("utf-8"))
+ self._layout_infos[name] = LayoutInfo(lang, description)
def _get_country_variant(self, c_reg, item, subitem, country):
if subitem:
- name = item_str(item.name) + " (" + item_str(subitem.name) + ")"
- description = item_str(subitem.description)
+ name = item.get_name() + " (" + subitem.get_name() + ")"
+ description = subitem.get_description()
else:
- name = item_str(item.name)
- description = item_str(item.description)
+ name = item.get_name()
+ description = item.get_description()
# if the layout was not added with any language, add it with a country
if name not in self._layout_infos:
- self._layout_infos[name] = LayoutInfo(country.encode("utf-8"),
- description.encode("utf-8"))
+ self._layout_infos[name] = LayoutInfo(country, description)
def _get_language_variants(self, c_reg, item, user_data=None):
- lang_name, lang_desc = item_str(item.name), item_str(item.description)
+ lang_name, lang_desc = item.get_name(), item.get_description()
c_reg.foreach_language_variant(lang_name, self._get_lang_variant, lang_desc)
def _get_country_variants(self, c_reg, item, user_data=None):
- country_name, country_desc = item_str(item.name), item_str(item.description)
+ country_name, country_desc = item.get_name(), item.get_description()
c_reg.foreach_country_variant(country_name, self._get_country_variant,
country_desc)
def _get_switch_option(self, c_reg, item, user_data=None):
"""Helper function storing layout switching options in foreach cycle"""
- desc = item_str(item.description)
- name = item_str(item.name)
+ desc = item.get_description()
+ name = item.get_name()
- self._switch_opt_infos[name] = desc.encode("utf-8")
+ self._switch_opt_infos[name] = desc
def get_current_layout(self):
"""
--
1.8.4.2
10 years, 4 months
[master/rhel7-branch][PATCH] Move atexit registration before running rescue mode (#1038855)
by Vratislav Podzimek
Otherwise our exit handlers are not called on rescue mode exit.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/anaconda b/anaconda
index 39e7392..2aaa56e 100755
--- a/anaconda
+++ b/anaconda
@@ -1054,6 +1054,7 @@ if __name__ == "__main__":
signal.signal(signal.SIGUSR1, lambda signum, frame:
exception.test_exception_handling())
signal.signal(signal.SIGUSR2, lambda signum, frame: anaconda.dumpState())
+ atexit.register(exitHandler, ksdata.reboot, anaconda.storage)
from blivet import storageInitialize
from pyanaconda.packaging import payloadInitialize
@@ -1075,8 +1076,6 @@ if __name__ == "__main__":
threadMgr.add(AnacondaThread(name=constants.THREAD_WAIT_FOR_CONNECTING_NM, target=wait_for_connecting_NM_thread, args=(ksdata,)))
threadMgr.add(AnacondaThread(name=constants.THREAD_PAYLOAD, target=payloadInitialize, args=(anaconda.storage, ksdata, anaconda.payload)))
- atexit.register(exitHandler, ksdata.reboot, anaconda.storage)
-
# check if geolocation should be enabled for this type of installation
use_geolocation = True
if flags.imageInstall or flags.dirInstall:
--
1.8.4.2
10 years, 4 months
[lorax-master/rhel7] s390 switch to generic condev (#1042766)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
share/config_files/s390/generic.prm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/config_files/s390/generic.prm b/share/config_files/s390/generic.prm
index 2044dd3..e1dc397 100644
--- a/share/config_files/s390/generic.prm
+++ b/share/config_files/s390/generic.prm
@@ -1 +1 @@
-ro ramdisk_size=40000 cio_ignore=all,!0.0.0009
+ro ramdisk_size=40000 cio_ignore=all,!condev
--
1.8.3.1
10 years, 4 months
[master] Enable pylint warning W0223
by David Shea
This lets us catch problems with abstract base class inheritance using 'make
check' instead of at runtime.
This also pulls in a wider concept for "abstract", so, uh, look out.
10 years, 4 months